Omicron  4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
Loading...
Searching...
No Matches
OxInj.h
Go to the documentation of this file.
1
6#ifndef __OxInj__
7#define __OxInj__
8#include <InjRea.h>
9
10using namespace std;
11
19class OxInj: public InjRea{
20
21public:
22
39 OxInj(const string aFilePattern, const unsigned int aNbins=20);
40
44 virtual ~OxInj(void);
45
54 void Reset(void);
55
56
68 void Match(const Long64_t aEventEntry, const double aEventRank, const unsigned int aEventStartTime, const unsigned int aEventEndTime);
69
77 void Process(const double aRankDetectionThreshold);
78
84 void SaveTree(void);
85
91 void ReadTree(const string aFilePattern);
92
98 inline unsigned int GetValidN(const unsigned int aNameIndex){ return (unsigned int)h1_inj_amp_tot[aNameIndex]->GetEntries(); };
99
105 inline unsigned int GetDetectedN(const unsigned int aNameIndex){ return (unsigned int)h1_inj_amp_det[aNameIndex]->GetEntries(); };
106
114 inline TH1D* GetHistoInjectionAmplitude(const unsigned int aNameIndex, const bool aDetectedOnly = false){
115 if(aDetectedOnly==true) return h1_inj_amp_det[aNameIndex];
116 return h1_inj_amp_tot[aNameIndex];
117 }
118
126 inline TH1D* GetHistoInjectionTime(const unsigned int aNameIndex, const bool aDetectedOnly = false){
127 if(aDetectedOnly==true) return h1_inj_time_det[aNameIndex];
128 return h1_inj_time_tot[aNameIndex];
129 }
130
138 inline TH1D* GetHistoInjectionFrequency(const unsigned int aNameIndex, const bool aDetectedOnly = false){
139 if(aDetectedOnly==true) return h1_inj_freq_det[aNameIndex];
140 return h1_inj_freq_tot[aNameIndex];
141 }
142
143private:
144
145 double *inj_rk;
146 Long64_t *inj_entry;
147
154
155 ClassDef(OxInj,0)
156};
157
158
159#endif
160
161
Manage injections for Ox analyses.
Definition OxInj.h:19
double * inj_rk
List of event ranks.
Definition OxInj.h:145
Long64_t * inj_entry
List of event entries.
Definition OxInj.h:146
TH1D * GetHistoInjectionAmplitude(const unsigned int aNameIndex, const bool aDetectedOnly=false)
Returns a pointer to the injection amplitude histogram.
Definition OxInj.h:114
TH1D ** h1_inj_freq_det
Detected frequency amplitude distribution /injection name.
Definition OxInj.h:153
void ReadTree(const string aFilePattern)
Reads injection analysis results from a list of TTrees.
Definition OxInj.cc:234
void Process(const double aRankDetectionThreshold)
Processes injections.
Definition OxInj.cc:150
TH1D ** h1_inj_time_tot
Injection time distribution /injection name.
Definition OxInj.h:150
TH1D * GetHistoInjectionTime(const unsigned int aNameIndex, const bool aDetectedOnly=false)
Returns a pointer to the injection time histogram.
Definition OxInj.h:126
TH1D ** h1_inj_time_det
Detected time amplitude distribution /injection name.
Definition OxInj.h:151
virtual ~OxInj(void)
Destructor of the OxInj class.
Definition OxInj.cc:74
void SaveTree(void)
Fill and save a TTree with the results of the injection analysis.
Definition OxInj.cc:194
OxInj(const string aFilePattern, const unsigned int aNbins=20)
Constructor of the OxInj class.
unsigned int GetValidN(const unsigned int aNameIndex)
Returns the number of valid injections of a given name.
Definition OxInj.h:98
TH1D ** h1_inj_amp_tot
Injection amplitude distribution /injection name.
Definition OxInj.h:148
void Match(const Long64_t aEventEntry, const double aEventRank, const unsigned int aEventStartTime, const unsigned int aEventEndTime)
Matches injections with an Ox event.
Definition OxInj.cc:118
TH1D ** h1_inj_amp_det
Detected injection amplitude distribution /injection name.
Definition OxInj.h:149
void Reset(void)
Resets the ijection set.
Definition OxInj.cc:96
unsigned int GetDetectedN(const unsigned int aNameIndex)
Returns the number of detected injections of a given name.
Definition OxInj.h:105
TH1D ** h1_inj_freq_tot
Injection frequency distribution /injection name.
Definition OxInj.h:152
TH1D * GetHistoInjectionFrequency(const unsigned int aNameIndex, const bool aDetectedOnly=false)
Returns a pointer to the injection frequency histogram.
Definition OxInj.h:138