00001
00002
00004 #ifndef __InjRea__
00005 #define __InjRea__
00006
00007 #include "Chain.h"
00008 #include "TH1.h"
00009 #include "TMath.h"
00010
00011 using namespace std;
00012
00018 class InjRea {
00019
00020 friend class InjRec;
00021
00022 public:
00023
00035 InjRea(const string aPattern, const int aVerbose=0);
00036
00040 virtual ~InjRea();
00049 inline bool LoadInjection(const int aInjIndex){if(InjTree->GetEntry(aInjIndex)>0){ InjIndex=aInjIndex; return true; } return false; };
00050
00055 double GetSineGaussh0plus(void);
00056
00061 double GetSineGaussh0cross(void);
00062
00066 inline double GetInjectionTime(void){ return inj_time; };
00067
00071 inline double GetInjectionRa(void){ return inj_ra; };
00072
00076 inline double GetInjectionDec(void){ return inj_dec; };
00077
00081 inline double GetInjectionEccentricity(void){ return inj_ecc; };
00082
00086 inline double GetInjectionPolarization(void){ return inj_psi; };
00087
00091 inline double GetInjectionAmplitude(void){ return inj_amp; };
00092
00096 inline double GetInjectionAmplitudeMin(void){ return inj_ampmin; };
00097
00101 inline double GetInjectionAmplitudeMax(void){ return inj_ampmax; };
00102
00106 inline double GetInjectionSigma(void){ return inj_sigma; };
00107
00111 inline double GetInjectionFrequency(void){ return inj_f0; };
00112
00116 inline double GetInjectionFrequencyMin(void){ return inj_f0min; };
00117
00121 inline double GetInjectionFrequencyMax(void){ return inj_f0max; };
00122
00126 inline bool GetInjectionTag(void){ return inj_tag[InjIndex]; };
00127
00131 inline void SetInjectionTag(const bool aNewTag){ inj_tag[InjIndex]=aNewTag; };
00132
00139 int GetFirstInjectionIndex(const double aTimeStart, const double aTimeEnd);
00140
00147 int GetLastInjectionIndex(const double aTimeStart, const double aTimeEnd);
00148
00152 inline bool GetStatus(void){ return status_OK; };
00153
00157 inline int GetNInjections(void){ return InjTree->GetEntries(); };
00158
00162 inline string GetInjectionType(void){ return (string)InjTree->GetName(); };
00163
00167 inline double GetInjectionSigmaMax(void){ return inj_sigmamax; };
00168
00177 TH1D* GetInjectionParamDist(const string aParamName, const int aNbins=1, const string aBinType="UNIFORM");
00178
00182 string GetInputFilePattern(void){ return InjTree->GetInputFilePattern(); };
00183
00184 protected:
00185
00186 bool status_OK;
00187 int Verbose;
00188
00189
00190 inline Long64_t* GetTreeOffset(void){ return InjTree->GetTreeOffset(); };
00191
00192 double inj_ra,
00193 inj_dec,
00194 inj_psi,
00195 inj_time,
00196 inj_amp,
00197 inj_f0,
00198 inj_sigma,
00199 inj_ecc;
00200
00201 double inj_sigmamin;
00202 double inj_sigmamax;
00203 double inj_ampmin;
00204 double inj_ampmax;
00205 double inj_f0min;
00206 double inj_f0max;
00207
00208 private:
00209
00210 Chain *InjTree;
00211 bool *inj_tag;
00212 int InjIndex;
00213 double inj_timefirst;
00214 double inj_timelast;
00215
00216 ClassDef(InjRea,0)
00217 };
00218
00219 #endif
00220
00221