00001
00002
00004 #ifndef __SearchRead__
00005 #define __SearchRead__
00006
00007 #include "GwollumPlot.h"
00008 #include "ReadTriggers.h"
00009 #include "InjRea.h"
00010
00011 using namespace std;
00012
00020 class SearchRead: public GwollumPlot, public Chain, public InjRea {
00021
00022 public:
00023
00034 SearchRead(const string aFilePattern, const int aVerbose=0);
00035
00039 virtual ~SearchRead(void);
00048 inline Long64_t Draw(const string varexp, const string selection="", string option=""){
00049 Wpad->cd();
00050 return Chain::Draw(varexp.c_str(), selection.c_str(), option.c_str());
00051 };
00052
00057 inline double GetCoincTime0(void) {return triggers_0->Ttime;};
00058
00063 inline double GetCoincTime1(void) {return triggers_1->Ttime;};
00064
00069 inline double GetCoincSNR0(void) {return triggers_0->Tsnr;};
00070
00075 inline double GetCoincSNR1(void) {return triggers_1->Tsnr;};
00076
00080 inline double GetCoincFrequency0(void) {return triggers_0->Tfreq;};
00081
00086 inline double GetCoincFrequency1(void) {return triggers_1->Tfreq;};
00087
00092 inline double GetCoincTimeOffset0(void) {return toffset_0;};
00093
00098 inline double GetCoincTimeOffset1(void) {return toffset_1;};
00099
00104 inline double GetCoincMorphMatch(void) {return CoMatch;};
00105
00110 inline double GetCoincMorphMatchSumw2(void) {return CoMatchSumw2;};
00111
00116 inline double GetCoincMorphMatchShift(void) {return CoMatchShift;};
00117
00122 inline bool IsInjectionBestMatch(void) {return injbestmatch;};
00123
00128 inline int GetCoincInjectionIndex(void){
00129 if(CoInjIndex>=0) return CoInjIndex+InjRea::GetTreeOffset()[TChain::GetTreeNumber()];
00130 return -1;
00131 };
00132
00139 inline int GetEntry(Long64_t aCoincIndex = 0, Int_t getall = 0){
00140 int res = TChain::GetEntry(aCoincIndex,getall);
00141 InjRea::LoadInjection(GetCoincInjectionIndex());
00142 return res;
00143 };
00144
00148 inline double GetStatus(void){ return status_OK; };
00149
00153 inline double GetCoincLiveTime(void) {
00154 return triggers_0->GetSegments()->GetLiveTime();
00155 };
00156
00157
00158 protected:
00159 int verbosity;
00160 bool status_OK;
00161
00162 private:
00163
00164 ReadTriggers *triggers_0;
00165 ReadTriggers *triggers_1;
00166 double toffset_0;
00167 double toffset_1;
00168
00169 double CoMatch,
00170 CoMatchSumw2,
00171 CoMatchShift;
00172
00173
00174 Chain *coincmap;
00175 int CoInjIndex;
00176
00177 TTree *tinj;
00178 bool injbestmatch;
00179
00180 ClassDef(SearchRead,0)
00181 };
00182
00183 #endif
00184
00185