Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

TopHatFitObject.cpp

00001 #include "TopHatFitObject.h"
00002 #include "FitFunctions.h"
00003 #include "Sct/LogicErrors.h"
00004 
00005 #include <TF1.h>
00006 #include <TMath.h>
00007 
00008 using namespace Sct;
00009 
00010 namespace SctData {
00011     
00015 vector<string> TopHatFitObject::createParNames() {
00016     vector<string> parNames(5);
00017     parNames[0] = "Prefact";
00018     parNames[1] = "MidRise";
00019     parNames[2] = "RiseTime";
00020     parNames[3] = "MidFall";
00021     parNames[4] = "FallTime";
00022     return parNames;
00023 }
00024 
00025 vector<string> TopHatFitObject::parNames = createParNames();    
00026 
00027 TopHatFitObject::TopHatFitObject() : FitObject("tophat", 5, parNames) {
00028 }
00029 
00030 TopHatFitObject::TopHatFitObject(const TF1& f) : FitObject("tophat", 5, parNames, f){
00031 }
00032 
00033 shared_ptr<FitObject> TopHatFitObject::clone() const throw() {
00034     return shared_ptr<FitObject>(new TopHatFitObject(*this));
00035 }
00036 
00037 TopHatFitObject& TopHatFitObject::operator=(const TF1& f) throw(LogicError) {
00038     this->FitObject::operator=(f);
00039     return *this;
00040 }
00041 
00042 // Call the appropriate constructor for making a ROOT TF1 object from this
00043 // TopHatFitObject::
00044 auto_ptr<TF1> TopHatFitObject::makeBasicRootTF1() const throw(LogicError) {
00045     auto_ptr<TF1> r (new ::TF1("tophat", tophat, this->getVarMin(0), this->getVarMax(0), 5));
00046     if (!r.get())
00047         throw IllegalStateError("TopHatFitObject::makeBasicRootTF1()", __FILE__, __LINE__);
00048     return r;
00049 }
00050 
00051 } // end of namespace SctData

Generated on Thu Jul 15 09:51:01 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5