GWOLLUM 4.2.0
Tools for gravitational-wave analyses
Loading...
Searching...
No Matches
TriggerSelect.h
Go to the documentation of this file.
1
6#ifndef __TriggerSelect__
7#define __TriggerSelect__
8
9#include "ReadTriggers.h"
10#include <TH2.h>
11
12using namespace std;
13
24
25 public:
26
37 TriggerSelect(const string aName, const unsigned int aVerbose=0);
38
47 TriggerSelect(ReadTriggers *aTriggers, const unsigned int aVerbose=0);
48
52 virtual ~TriggerSelect(void);
60 void ResetSelection(void);
61
65 inline void UseDateTime(void){ usedate = true; };
66
70 inline void UseGpsTime(void){ usedate = false; };
71
77 inline void UseClusterTag(unsigned int aTag){ clustertag=(int)aTag; };
78
82 inline void UseTriggers(void){ clustertag=-1; };
83
88 inline int GetClusterTag(void){ return clustertag; };
89
95 inline string GetTimeStamp(void){
96 return sstart;
97 };
98
105 void SetTimeSelection(const unsigned int aResolution,
106 const double aMin, const double aMax);
107
112 inline void SetTimeResolution(const unsigned int aResolution){
113 SetTimeSelection(aResolution, tmin, tmax);
114 };
115
120 inline void SetTimeMin(const double aMin){
122 };
123
128 inline void SetTimeMax(const double aMax){
130 };
131
137 inline void SetTimeRange(const double aMin, const double aMax){
138 SetTimeSelection(ntbins, aMin, aMax);
139 };
140
147 void SetFrequencySelection(const unsigned int aResolution,
148 const double aMin, const double aMax);
149
154 inline void SetFrequencyResolution(const unsigned int aResolution){
155 SetFrequencySelection(aResolution, fmin, fmax);
156 };
157
162 inline void SetFrequencyMin(const double aMin){
164 };
165
170 inline void SetFrequencyMax(const double aMax){
172 };
173
179 inline void SetFrequencyRange(const double aMin, const double aMax){
180 SetFrequencySelection(nfbins, aMin, aMax);
181 };
182
189 void SetQSelection(const unsigned int aResolution,
190 const double aMin, const double aMax);
191
196 inline void SetQResolution(const unsigned int aResolution){
197 SetQSelection(aResolution, qmin, qmax);
198 };
199
204 inline void SetQMin(const double aMin){
205 SetQSelection(nqbins, aMin, qmax);
206 };
207
212 inline void SetQMax(const double aMax){
213 SetQSelection(nqbins, qmin, aMax);
214 };
215
221 inline void SetQRange(const double aMin, const double aMax){
222 SetQSelection(nqbins, aMin, aMax);
223 };
224
231 void SetSnrSelection(const unsigned int aResolution,
232 const double aMin, const double aMax);
233
238 inline void SetSnrResolution(const unsigned int aResolution){
239 SetSnrSelection(aResolution, smin, smax);
240 };
241
246 inline void SetSnrMin(const double aMin){
248 };
249
254 inline void SetSnrMax(const double aMax){
256 };
257
263 inline void SetSnrRange(const double aMin, const double aMax){
264 SetSnrSelection(nsbins, aMin, aMax);
265 };
266
270 inline double GetTimeMin(void){ return tmin; };
271
275 inline double GetTimeMax(void){ return tmax; };
276
280 inline double GetTimeRange(void){ return tmax-tmin; };
281
285 inline unsigned int GetTimeResolution(void){ return ntbins; };
286
290 inline double GetFrequencyMin(void){ return fmin; };
291
295 inline double GetFrequencyMax(void){ return fmax; };
296
300 inline double GetFrequencyRange(void){ return fmax-fmin; };
301
305 inline unsigned int GetFrequencyResolution(void){ return nfbins; };
306
310 inline double GetQMin(void){ return qmin; };
311
315 inline double GetQMax(void){ return qmax; };
316
320 inline double GetQRange(void){ return qmax-qmin; };
321
325 inline unsigned int GetQResolution(void){ return nqbins; };
326
330 inline double GetSnrMin(void){ return smin; };
331
335 inline double GetSnrMax(void){ return smax; };
336
340 inline double GetSnrRange(void){ return smax-smin; };
341
345 inline unsigned int GetSnrResolution(void){ return nsbins; };
346
358 TH1D* GetTH1D(const string aParameter);
359
372 TH2D* GetTH2D(const string aParameterX, const string aParameterY);
373
374 private:
375
377 string name;
379 bool usedate;
380 string sstart;
381
382 // TIME
383 double tmin;
384 double tmin_0;
385 double tmax;
386 double tmax_0;
387 unsigned int ntbins;
388 unsigned int ntbins_0;
389 double *tbins;
390
391 // FREQUENCY
392 double fmin;
393 double fmin_0;
394 double fmax;
395 double fmax_0;
396 unsigned int nfbins;
397 unsigned int nfbins_0;
398 double *fbins;
399
400 // Q
401 double qmin;
402 double qmin_0;
403 double qmax;
404 double qmax_0;
405 unsigned int nqbins;
406 unsigned int nqbins_0;
407 double *qbins;
408
409 // SNR
410 double smin;
411 double smin_0;
412 double smax;
413 double smax_0;
414 unsigned int nsbins;
415 unsigned int nsbins_0;
416 double *sbins;
417
421 void MakeTbins(void);
422
426 void MakeFbins(void);
427
431 void MakeQbins(void);
432
436 void MakeSbins(void);
437
438
439 ClassDef(TriggerSelect,0)
440};
441
442#endif
443
444
Read triggers in ROOT files.
Monitor a GWOLLUM processing.
Definition Monitor.h:39
Read trigger files.
Definition ReadTriggers.h:19
Select trigger parameters.
Definition TriggerSelect.h:23
double qmin
Q min (current).
Definition TriggerSelect.h:401
double qmin_0
Q min (default).
Definition TriggerSelect.h:402
void SetTimeMax(const double aMax)
Sets the maximal time value.
Definition TriggerSelect.h:128
double * fbins
Frequency bins.
Definition TriggerSelect.h:398
void SetSnrResolution(const unsigned int aResolution)
Sets the SNR resolution.
Definition TriggerSelect.h:238
unsigned int nsbins
Number of SNR bins (current).
Definition TriggerSelect.h:414
double fmax_0
Frequency max (default).
Definition TriggerSelect.h:395
double GetQMax(void)
Returns the maximal Q value.
Definition TriggerSelect.h:315
double smax
SNR max (current).
Definition TriggerSelect.h:412
double GetTimeMax(void)
Returns the maximal time value.
Definition TriggerSelect.h:275
void SetSnrRange(const double aMin, const double aMax)
Sets the SNR range.
Definition TriggerSelect.h:263
void SetQResolution(const unsigned int aResolution)
Sets the Q resolution.
Definition TriggerSelect.h:196
void SetFrequencyResolution(const unsigned int aResolution)
Sets the frequency resolution.
Definition TriggerSelect.h:154
double * tbins
Time bins.
Definition TriggerSelect.h:389
void MakeSbins(void)
Makes SNR binning (log).
Definition TriggerSelect.cc:496
double tmin
Time min (current).
Definition TriggerSelect.h:383
int clustertag
cluster tag: -1 for triggers.
Definition TriggerSelect.h:378
TriggerSelect(const string aName, const unsigned int aVerbose=0)
Constructor of the TriggerSelect class.
unsigned int GetTimeResolution(void)
Returns the time resolution value.
Definition TriggerSelect.h:285
void SetFrequencyRange(const double aMin, const double aMax)
Sets the frequency range.
Definition TriggerSelect.h:179
double GetTimeMin(void)
Returns the minimal time value.
Definition TriggerSelect.h:270
double qmax
Q max (current).
Definition TriggerSelect.h:403
void SetQMax(const double aMax)
Sets the maximal Q value.
Definition TriggerSelect.h:212
void UseClusterTag(unsigned int aTag)
Use cluster tags.
Definition TriggerSelect.h:77
double fmax
Frequency max (current).
Definition TriggerSelect.h:394
double GetSnrRange(void)
Returns the SNR range value.
Definition TriggerSelect.h:340
double GetFrequencyRange(void)
Returns the frequency range value.
Definition TriggerSelect.h:300
bool usedate
Flag to use a date format.
Definition TriggerSelect.h:379
void MakeTbins(void)
Makes time binning (linear).
Definition TriggerSelect.cc:443
double * sbins
SNR bins.
Definition TriggerSelect.h:416
void SetSnrMin(const double aMin)
Sets the minimal SNR value.
Definition TriggerSelect.h:246
TH2D * GetTH2D(const string aParameterX, const string aParameterY)
Returns an empty 2-D histogram binned in a given combination of parameters.
Definition TriggerSelect.cc:264
void SetSnrMax(const double aMax)
Sets the maximal SNR value.
Definition TriggerSelect.h:254
void SetTimeMin(const double aMin)
Sets the minimal time value.
Definition TriggerSelect.h:120
void ResetSelection(void)
Resets the selection back to default.
Definition TriggerSelect.cc:111
void UseGpsTime(void)
Use a GPS format for time axes.
Definition TriggerSelect.h:70
unsigned int nqbins_0
Number of Q bins (default).
Definition TriggerSelect.h:406
unsigned int nfbins
Number of frequency bins (current).
Definition TriggerSelect.h:396
double smin_0
SNR min (default).
Definition TriggerSelect.h:411
double fmin
Frequency min (current).
Definition TriggerSelect.h:392
unsigned int GetSnrResolution(void)
Returns the SNR resolution value.
Definition TriggerSelect.h:345
string GetTimeStamp(void)
Returns the time stamp for this selection.
Definition TriggerSelect.h:95
unsigned int GetQResolution(void)
Returns the Q resolution value.
Definition TriggerSelect.h:325
virtual ~TriggerSelect(void)
Destructor of the TriggerSelect class.
Definition TriggerSelect.cc:99
double qmax_0
Q max (default).
Definition TriggerSelect.h:404
double smax_0
SNR max (default).
Definition TriggerSelect.h:413
double fmin_0
Frequency min (default).
Definition TriggerSelect.h:393
unsigned int nqbins
Number of Q bins (current).
Definition TriggerSelect.h:405
void SetQMin(const double aMin)
Sets the minimal Q value.
Definition TriggerSelect.h:204
void SetFrequencyMax(const double aMax)
Sets the maximal frequency value.
Definition TriggerSelect.h:170
double GetTimeRange(void)
Returns the time range value.
Definition TriggerSelect.h:280
string sstart
Start time string. See MakeTbins().
Definition TriggerSelect.h:380
void SetQSelection(const unsigned int aResolution, const double aMin, const double aMax)
Sets the Q selection.
Definition TriggerSelect.cc:175
double GetQRange(void)
Returns the Q range value.
Definition TriggerSelect.h:320
double GetFrequencyMax(void)
Returns the maximal frequency value.
Definition TriggerSelect.h:295
void SetFrequencyMin(const double aMin)
Sets the minimal frequency value.
Definition TriggerSelect.h:162
void MakeQbins(void)
Makes Q binning (log).
Definition TriggerSelect.cc:480
int GetClusterTag(void)
Returns the cluster tag used for the selection.
Definition TriggerSelect.h:88
TH1D * GetTH1D(const string aParameter)
Returns an empty 1-D histogram binned in a given parameter.
Definition TriggerSelect.cc:203
double GetFrequencyMin(void)
Returns the minimal frequency value.
Definition TriggerSelect.h:290
Monitor * mon
Class monitor.
Definition TriggerSelect.h:376
void SetTimeSelection(const unsigned int aResolution, const double aMin, const double aMax)
Sets the time selection.
Definition TriggerSelect.cc:147
void MakeFbins(void)
Makes frequency binning (log).
Definition TriggerSelect.cc:464
string name
Name.
Definition TriggerSelect.h:377
void SetTimeResolution(const unsigned int aResolution)
Sets the time resolution.
Definition TriggerSelect.h:112
unsigned int nsbins_0
Number of SNR bins (default).
Definition TriggerSelect.h:415
void SetTimeRange(const double aMin, const double aMax)
Sets the time range.
Definition TriggerSelect.h:137
void SetFrequencySelection(const unsigned int aResolution, const double aMin, const double aMax)
Sets the frequency selection.
Definition TriggerSelect.cc:161
double GetSnrMin(void)
Returns the minimal SNR value.
Definition TriggerSelect.h:330
unsigned int ntbins
Number of time bins (current).
Definition TriggerSelect.h:387
void SetQRange(const double aMin, const double aMax)
Sets the Q range.
Definition TriggerSelect.h:221
void UseTriggers(void)
Use triggers.
Definition TriggerSelect.h:82
unsigned int ntbins_0
Number of time bins (default).
Definition TriggerSelect.h:388
void UseDateTime(void)
Use a date format for time axes.
Definition TriggerSelect.h:65
double * qbins
Q bins.
Definition TriggerSelect.h:407
double tmax_0
Time max (default).
Definition TriggerSelect.h:386
unsigned int nfbins_0
Number of frequency bins (default).
Definition TriggerSelect.h:397
double tmin_0
Time min (default).
Definition TriggerSelect.h:384
double GetSnrMax(void)
Returns the maximal SNR value.
Definition TriggerSelect.h:335
void SetSnrSelection(const unsigned int aResolution, const double aMin, const double aMax)
Sets the SNR selection.
Definition TriggerSelect.cc:189
double smin
SNR min (current).
Definition TriggerSelect.h:410
double GetQMin(void)
Returns the minimal Q value.
Definition TriggerSelect.h:310
double tmax
Time max (current).
Definition TriggerSelect.h:385
unsigned int GetFrequencyResolution(void)
Returns the frequency resolution value.
Definition TriggerSelect.h:305