Study glitch-to glitch coupling between 2 trigger data sets. More...
#include <GlitchVeto.h>
Public Member Functions | |
double | GetFullDeadTime (void) |
Returns the dead-time induced by all the aux cluster. | |
TH1 * | GetMonitor (const string MonitorName) |
Returns a pointer to a given monitor. | |
double | GetVetoDeadTime (void) |
Returns the veto dead-time. | |
double | GetVetoEfficiency (const bool normalized=true) |
Returns the veto efficiency. | |
Segments * | GetVetoSegments (void) |
Returns a pointer to the current veto Segments object. | |
double | GetVetoUsePercentage (void) |
Returns the veto use-percentage. | |
bool | MakeVeto (void) |
Produces veto thresholds, veto segments and veto monitors. | |
bool | ProcessGlitch2Glitch (void) |
Study the glitch-to-glitch coupling between Main and Aux data streams. | |
bool | SetAuxTriggers (ReadTriggers *Aauxtriggers) |
Sets the aux trigger sample. | |
void | SetFixBins (const int nfixbins=0) |
Fix the number of aux frequency bins. | |
bool | SetMainTriggers (ReadTriggers *Amaintriggers) |
Sets the main trigger sample. | |
bool | SetSegments (Segments *aNewSeg) |
Sets new reference segments By default, the Main triggers segments are considered as the reference. | |
bool | SetThreshold (const string aVariableName, const double aThreshold) |
Sets a condition to define the veto. | |
bool | WriteReport (const string aRootFileName="./myreport.root") |
Writes a ROOT file report with all the monitors. | |
Constructors and destructors | |
GlitchVeto (const int averbose=0) | |
Constructor of the GlitchVeto class. | |
virtual | ~GlitchVeto (void) |
Destructor of the GlitchVeto class. |
Study glitch-to glitch coupling between 2 trigger data sets.
This class offers many functions to build a veto based on triggers (or glitches) found in a given data stream. In addition, some routines are implemented to study glitch-to-glitch coupling mechanisms and to produce effective vetoes.
Things you must know before using this class:
Here is the typical step-by-step use of this class:
GlitchVeto::GlitchVeto | ( | const int | averbose = 0 |
) |
Constructor of the GlitchVeto class.
All the parameters are initialized:
averbose | verbosity level |
GlitchVeto::~GlitchVeto | ( | void | ) | [virtual] |
Destructor of the GlitchVeto class.
double GlitchVeto::GetFullDeadTime | ( | void | ) |
Returns the dead-time induced by all the aux cluster.
TH1 * GlitchVeto::GetMonitor | ( | const string | MonitorName | ) |
Returns a pointer to a given monitor.
Internal monitors of the GlitchVeto class can be accessed. Do not delete or modify the return object since it is internally used by the class. Here are the name of the monitor which can be accessed:
NULL is returned if the monitor does not exist.
MonitorName | name of the monitor to be returned |
double GlitchVeto::GetVetoDeadTime | ( | void | ) |
Returns the veto dead-time.
double GlitchVeto::GetVetoEfficiency | ( | const bool | normalized = true |
) |
Returns the veto efficiency.
if normalized=0, the raw number of vetoed triggers is returned. if normalized=1, the number of vetoed triggers is normalized by the total number of main triggers.
Segments* GlitchVeto::GetVetoSegments | ( | void | ) | [inline] |
Returns a pointer to the current veto Segments object.
Do not delete or modify.
double GlitchVeto::GetVetoUsePercentage | ( | void | ) |
Returns the veto use-percentage.
bool GlitchVeto::MakeVeto | ( | void | ) |
Produces veto thresholds, veto segments and veto monitors.
After the coupling is characterized (see ProcessGlitch2Glitch()), this function produces the veto based on the conditions defined with the SetThreshold() function. 3 steps are performed:
bool GlitchVeto::ProcessGlitch2Glitch | ( | void | ) |
Study the glitch-to-glitch coupling between Main and Aux data streams.
3 trigger parameters are considered to characterize this coupling: time / frequency / SNR. This function should always be called after both the main and aux trigger sample being defined. Four internal steps are performed:
bool GlitchVeto::SetAuxTriggers | ( | ReadTriggers * | Aauxtriggers | ) |
Sets the aux trigger sample.
Input triggers are represented by a ReadTriggers object. It is mandatory that triggers are clustered before calling this function. The coincidence can only be performed over clusters. For more details, see ReadTriggers::Clusterize().
Aauxtriggers | pointer to the aux trigger sample |
void GlitchVeto::SetFixBins | ( | const int | nfixbins = 0 |
) | [inline] |
Fix the number of aux frequency bins.
By default (nfixbins=0), the frequency binning is automatically computed based on the available statistic. This function fixes the number of bins to nfixbins;
nfixbins | number of frequency bins |
bool GlitchVeto::SetMainTriggers | ( | ReadTriggers * | Amaintriggers | ) |
Sets the main trigger sample.
Input triggers are represented by a ReadTriggers object. It is mandatory that triggers are clustered before calling this function. The coincidence can only be performed over clusters. For more details, see ReadTriggers::Clusterize().
Amaintriggers | pointer to the main trigger sample |
bool GlitchVeto::SetSegments | ( | Segments * | aNewSeg | ) |
Sets new reference segments By default, the Main triggers segments are considered as the reference.
It is possible to change the reference segments with this function. The new segments will be intersected with the Main triggers segments before being used as a reference for the coincidence. Therefore, this function should only be called after the Main triggers being set.
aNewSeg | pointer to the new Segments object |
bool GlitchVeto::SetThreshold | ( | const string | aVariableName, | |
const double | aThreshold | |||
) |
Sets a condition to define the veto.
4 types of conditions can be defined with a keyword and a threshold value: 'aVariableName' > 'aThreshold', where aVariableName=
This function should be called several times to define a multi-condition veto.
aVariableName | keyword to define on which variable the condition should be applied | |
aThreshold | threshold value to define the veto condition |
bool GlitchVeto::WriteReport | ( | const string | aRootFileName = "./myreport.root" |
) |
Writes a ROOT file report with all the monitors.
Here is the definition of all the monitors:
aRootFileName | output ROOT file name |