Omicron  4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
Loading...
Searching...
No Matches
OxEventResults.h
Go to the documentation of this file.
1
6#ifndef __OxEventResults__
7#define __OxEventResults__
8
9#include <TGraphErrors.h>
10#include "OxEventUtils.h"
11#include "Oomicron.h"
12
13using namespace std;
14
20
21public:
22
35 OxEventResults(const string aName, OxEventParam* aParam, Omicron *aOmicron);
36
40 virtual ~OxEventResults(void);
41
49 void Reset(void);
50
57 void SaveEvent(const unsigned int aStartTime, const unsigned int aEndTime);
58
68 void Process(const unsigned int aEventsNorm);
69
78 double RateToRank(const double aRate);
79
85 inline void SetLoudestN(const unsigned int aN=0){
86 g_loudest->Set(aN);
87 for(int p=0; p<g_loudest->GetN(); p++) g_loudest->SetPoint(p, -1.0, -1.0);
88 };
89
94 inline unsigned int GetEventN(void){
95 return (unsigned int)h1_rk->GetSumOfWeights();
96 };
97
103 inline double GetEventRate(const double aRank){
104 if(segments->GetLiveTime()>0.0) return h1_rk_cum->Interpolate(aRank)/segments->GetLiveTime();
105 return 0.0;
106 };
107
112 inline unsigned int GetLoudestN(void){ return (unsigned int)g_loudest->GetN(); };
113
120 inline Long64_t GetLoudest(double &aRank, const unsigned int aLoudestIndex){
121 if(aLoudestIndex>=GetLoudestN()) return -1;
122 aRank = g_loudest->GetX()[aLoudestIndex];
123 return (Long64_t)g_loudest->GetY()[aLoudestIndex];
124 };
125
130 inline Segments* GetSegments(void){ return segments; };
131
135 inline unsigned int GetCumulativeLiveTime(void){ return livetime; };
136
141 inline TH1D* GetRankPlot(void){ return h1_rk; };
142
147 inline TH1D* GetCumulativeRankPlot(void){ return h1_rk_cum; };
148
153 inline TH1D* GetFrequencyPlot(void){ return h1_frequency; };
154
159 inline TH1D* GetXiqPlot(void){ return h1_Xiq; };
160
165 inline TH1D* GetXiqMaxPlot(void){ return h1_Xiq_max; };
166
171 inline TH2D* GetRankFrequencyPlot(void){ return h2_rk_frequency; };
172
177 inline TH2D* GetSliceVeto2dPlot(void){ return h2_sliceveto; };
178
184 inline TH1D* GetSliceVeto1dPlot(const unsigned int aQindex){ return h1_sliceveto[aQindex]; };
185
191 inline TH1D* GetTimeVariancePlot(const unsigned int aQindex){ return h1_tvar[aQindex]; };
192
200 TGraphErrors* GetIfarPlot(OxEventResults *aBackground);
201
202private:
203
204 // ANALYSIS CONTAINERS
205 OxEventParam *param;
206 Segments *segments;
207 unsigned int livetime;
208 TH1D *h1_rk;
209 TH1D *h1_rk_cum;
211 TH1D *h1_Xiq;
214 TH1D **h1_tvar;
217 TGraphErrors* g_loudest;
218
219 // OMICRON PARAMETERS
220 unsigned int omicron_nq;
221 unsigned int* omicron_nf;
222
223 ClassDef(OxEventResults,0)
224};
225
226
227#endif
228
229
Omicron processing.
Process data with the Omicron algorithm.
Definition Oomicron.h:36
Ox analysis results.
Definition OxEventResults.h:19
TH2D * GetRankFrequencyPlot(void)
Returns the 2D histogram of the event rank vs.
Definition OxEventResults.h:171
TH1D * h1_rk
Rank distribution.
Definition OxEventResults.h:208
TH2D * GetSliceVeto2dPlot(void)
Returns the 2D histogram of the event slce veto.
Definition OxEventResults.h:177
TH1D * GetFrequencyPlot(void)
Returns the 1D histogram of the event frequency distribution.
Definition OxEventResults.h:153
TH1D * GetCumulativeRankPlot(void)
Returns the cumulative 1D histogram of the event rank distribution.
Definition OxEventResults.h:147
OxEventResults(const string aName, OxEventParam *aParam, Omicron *aOmicron)
Constructor of the OxEventResults class.
void Reset(void)
Resets all the analysis results.
Segments * GetSegments(void)
Returns the analysis segments.
Definition OxEventResults.h:130
TH1D * GetXiqPlot(void)
Returns the 1D histogram of the spread of values across Q planes.
Definition OxEventResults.h:159
virtual ~OxEventResults(void)
Destructor of the OxEventResults class.
TGraphErrors * g_loudest
List of loudest events (X=rank, Y=entry).
Definition OxEventResults.h:217
TH1D * h1_frequency
Frequency distribution [Hz].
Definition OxEventResults.h:210
TH2D * h2_rk_frequency
Rank vs frequency [Hz].
Definition OxEventResults.h:215
unsigned int GetEventN(void)
Returns the number of events saved until now.
Definition OxEventResults.h:94
unsigned int livetime
Analysis cumulative livetime [s].
Definition OxEventResults.h:207
TH1D * GetTimeVariancePlot(const unsigned int aQindex)
Returns the 1D histogram of the time variance along frequency rows.
Definition OxEventResults.h:191
unsigned int omicron_nq
Number of Omicron Q planes.
Definition OxEventResults.h:220
unsigned int * omicron_nf
Number of Omicron frequency rows /Q.
Definition OxEventResults.h:221
OxEventParam * param
Ox event parameters - do not delete.
Definition OxEventResults.h:205
unsigned int GetCumulativeLiveTime(void)
Returns the cumulative livetime [s].
Definition OxEventResults.h:135
Segments * segments
Analysis segments.
Definition OxEventResults.h:206
unsigned int GetLoudestN(void)
Returns the number of loudest events.
Definition OxEventResults.h:112
void SetLoudestN(const unsigned int aN=0)
Sets the number of loudest events to record.
Definition OxEventResults.h:85
Long64_t GetLoudest(double &aRank, const unsigned int aLoudestIndex)
Returns the event TTree index in the list of loudest events.
Definition OxEventResults.h:120
double RateToRank(const double aRate)
Returns the event rank corresponding to a given event rate.
TH1D ** h1_sliceveto
Number of frequency rows rejected by the slice veto / Q plane.
Definition OxEventResults.h:213
void SaveEvent(const unsigned int aStartTime, const unsigned int aEndTime)
Saves an event.
void Process(const unsigned int aEventsNorm)
Processes the results.
TH1D ** h1_tvar
Time variance along frequency rows / Q plane.
Definition OxEventResults.h:214
TGraphErrors * GetIfarPlot(OxEventResults *aBackground)
Returns the inverse false-alarm rate TGraph for the loudest events.
TH1D * GetXiqMaxPlot(void)
Returns the 1D histogram of the maximum spread of values across Q planes.
Definition OxEventResults.h:165
double GetEventRate(const double aRank)
Returns the event rate [Hz] above a given rank value.
Definition OxEventResults.h:103
TH1D * GetRankPlot(void)
Returns the 1D histogram of the event rank distribution.
Definition OxEventResults.h:141
TH1D * h1_Xiq_max
maximum spread across Q planes distribution.
Definition OxEventResults.h:212
TH1D * h1_Xiq
spread across Q planes distribution.
Definition OxEventResults.h:211
TH1D * GetSliceVeto1dPlot(const unsigned int aQindex)
Returns the 1D histogram of the event slice veto.
Definition OxEventResults.h:184
TH2D * h2_sliceveto
Number of frequency rows rejected by the slice veto.
Definition OxEventResults.h:216
TH1D * h1_rk_cum
Rank cumulative distribution.
Definition OxEventResults.h:209