00001 #include "TDetectorPulse.h" 00002 00003 #include <cmath> 00004 #include <sstream> 00005 #include <cstdlib> 00006 00007 using std::vector; 00008 using std::string; 00009 00010 ClassImp(TDetectorPulse); 00011 00012 TDetectorPulse::~TDetectorPulse(){} 00013 00014 TDetectorPulse::TDetectorPulse(){ 00015 Reset(); 00016 } 00017 00018 TDetectorPulse::TDetectorPulse(const IDs::source& sourceID, 00019 int f_parentID, const TAnalysedPulse* f_parent, 00020 int s_parentID, const TAnalysedPulse* s_parent 00021 ){ 00022 Reset(); 00023 fParentPulse[kSlow] = s_parent; 00024 fParentPulse[kFast] = f_parent; 00025 if(s_parent) fParentSource[kSlow]= s_parent->GetSource(); 00026 if(f_parent) fParentSource[kFast]= f_parent->GetSource(); 00027 fParentID[kSlow]=s_parentID; 00028 fParentID[kFast]=f_parentID; 00029 fSource=sourceID; 00030 fCouldBePaired=(GetSource().Generator().Type()!="PassThrough"); 00031 } 00032 00033 void TDetectorPulse::Reset(Option_t* o) { 00034 for(int i=0;i<kNumParents;++i){ 00035 fParentPulse[i] = NULL; 00036 fParentID[i]=-1; 00037 fParentSource[i].Reset(); 00038 } 00039 fCheckedForPileUp=false; 00040 fPileUpSafe=false; 00041 fCouldBePaired=false; 00042 }