00001
00002
00004 #ifndef __InjRec__
00005 #define __InjRec__
00006
00007 #include "TObject.h"
00008 #include "EventMap.h"
00009 #include "InjRea.h"
00010
00011 using namespace std;
00012
00017 class InjRec : public InjRea, public EventMap {
00018 friend class InjCoi;
00019
00020 public:
00021
00038 InjRec(const string aTriggerFilePattern, const string aInjFilePattern, const int aVerbose=0);
00039
00043 virtual ~InjRec(void);
00059 int Recover(const int aInjIndex=-1, const int aClusterTagThr=0);
00060
00079 void Draw(const int aPlotIndex, const string aOptions="", const int aPadIndex=0);
00080
00086 void PrintMissedInjection(const double aAmplitudeThr=0.0);
00087
00093 inline int GetNValidInjections(void){
00094 return ValidInjTree->GetEntries();
00095 }
00096
00101 inline int GetNRecInjections(void){
00102 return (int)rec_injindex.size();
00103 }
00104
00109 inline vector <int> GetRecInjections(void){
00110 return rec_injindex;
00111 }
00112
00117 inline int GetNMissedInjections(void){
00118 return (int)mis_injindex.size();
00119 }
00120
00124 inline double GetInjectedAmplitude(void){
00125 double tlocal=GetLocalTime(inj_ra,inj_dec,inj_time);
00126 double fplus, fcross;
00127 GetDetAMResponse(fplus, fcross, inj_ra, inj_dec, inj_psi, GreenwichMeanSiderealTime(tlocal));
00128 return fplus*GetSineGaussh0plus()+fcross*GetSineGaussh0cross();
00129 };
00130
00131
00132 private:
00133
00134 TTree *ValidInjTree;
00135 int injindex;
00136
00137 vector <int> rec_injindex;
00138 vector <int> rec_clindex;
00139 vector <int> mis_injindex;
00140
00141 TH1D *h_inj_amp;
00142 TH1D *h_inj_f0;
00143
00144 TH1D *h1_rec;
00145 TH2D *h2_rec;
00146 TGraph *g_rec;
00147
00148
00149 void make_effamp(void);
00150 void make_efff0(void);
00151 void make_ampamp(void);
00152 void make_f0f0(void);
00153
00154 ClassDef(InjRec,0)
00155 };
00156
00157 #endif
00158
00159