![]() |
GWOLLUM 4.2.0
Tools for gravitational-wave analyses
|
Set two trigger sets in coincidence. More...
#include <Coinc2.h>
Public Member Functions | |
unsigned int | GetActiveClusterN (const unsigned int aSampleIndex) |
Gets the number of active clusters. | |
unsigned int | GetClusterIndex (const unsigned int aSampleIndex, const unsigned int aCoincIndex) |
Returns the cluster index involved in a given coinc event. | |
double | GetCoincDeltat (void) |
Returns the chacteristic duration defining a coinc \(\delta t\) [s]. | |
double | GetCoincLiveTime (void) |
Returns the livetime of coinc segments [s]. | |
unsigned int | GetCoincN (void) |
Returns the current number of coinc events. | |
Segments * | GetCoincSegments (void) |
Returns a pointer to the coincidence segments. | |
Segments * | GetCoincSegmentsCopy (void) |
Returns a copy of coincidence segments. | |
bool | GetCoincTag (const unsigned int aCoincIndex) |
Gets the tag value of a given coinc event. | |
double | GetCoincTimeWindowEnd (const unsigned int aSampleIndex, const unsigned int aClusterIndex) |
Returns the coincidence time window end \(\tau_e\)[s]. | |
double | GetCoincTimeWindowStart (const unsigned int aSampleIndex, const unsigned int aClusterIndex) |
Returns the coincidence time window start \(\tau_s\)[s]. | |
double | GetFrequencyMax (const unsigned int aSampleIndex) |
Returns the miaximum frequency used to select input clusters [Hz]. | |
double | GetFrequencyMin (const unsigned int aSampleIndex) |
Returns the minimum frequency used to select input clusters [Hz]. | |
double | GetSnrMin (const unsigned int aSampleIndex) |
Returns the minimum SNR used to select input clusters [Hz]. | |
bool | GetStatus (void) |
Returns the class status. | |
double | GetTimeOffset (const unsigned int aSampleIndex) |
Returns the time offset of a trigger set [s]. | |
unsigned int | MakeCoinc (void) |
Runs the coincidence algorithm. | |
bool | MakeComparators (void) |
Produce plots for coinc events. | |
void | PrintCoinc (void) |
Prints the list of coinc events in the standard output. | |
void | PrintCoincNot (const unsigned int aSampleIndex) |
Prints the list of active clusters NOT participating to a coinc event. | |
void | PrintComparators (const string aFileName) |
Prints plots for coinc events. | |
void | SetCoincDeltat (const double aDeltat) |
Sets the chacteristic duration to define a coinc \(\delta t\). | |
void | SetCoincTag (const bool aNewTag) |
Sets a new tag for all coinc events. | |
void | SetCoincTag (const unsigned int aCoincIndex, const bool aNewTag) |
Sets a new tag to a given coinc event. | |
void | SetFrequencyRange (const unsigned int aSampleIndex, const double aFrequencyMin, const double aFrequencyMax) |
Sets a frequency range to select input clusters. | |
void | SetSnrMin (const unsigned int aSampleIndex, const double aSnrMin) |
Sets a minimum SNR to select input clusters. | |
bool | SetTriggers (ReadTriggers *aTrigger0, ReadTriggers *aTrigger1, const double aTimeOffset0=0.0, const double aTimeOffset1=0.0, Segments *aValidSegments=NULL) |
Sets the trigger sets. | |
Constructors and destructors | |
Coinc2 (const unsigned int aVerbose=0) | |
Constructor of the Coinc2 class. | |
virtual | ~Coinc2 (void) |
Destructor of the Coinc2 class. | |
![]() | |
void | AddLegendEntry (const TObject *aObj, const string aLabel, const string aStyle="LPF") |
Adds a legend entry. | |
void | AddLegendHeader (const string aLabel) |
Adds a legend header. | |
void | AddText (const string aText, const double aX, const double aY, const double aSize, const int aPadIndex=0) |
Adds text in the plot. | |
void | Clear (const int aPadIndex=0) |
Clear pad. | |
void | DivideCanvas (const unsigned int aNpads) |
Divides current canvas into sub-pads. | |
void | DivideCanvas (const unsigned int aNx, const unsigned int aNy) |
Divides current canvas into sub-pads. | |
void | Draw (TObject *aObj, const string aOptions="", const int aPadIndex=0) |
Draws ROOT object. | |
void | DrawLegend (void) |
Draws current legend box. | |
unsigned int | GetColorPalette (const unsigned int i) |
Returns color number i in current palette. | |
string | GetCurrentStyle (void) |
Returns current style name. | |
int | GetHeight (void) |
Returns the canvas height. | |
unsigned int | GetNumberOfColors (void) |
Returns the number of colors in current palette. | |
int | GetWidth (void) |
Returns the canvas width. | |
void | Print (const string aFileName) |
Prints current canvas in a file. | |
void | Print (const string aFileName, const double aScaleFactor) |
Prints current canvas in a file with a rescaling factor. | |
void | Print (const string aFileName, const unsigned int aNewWidth, const unsigned int aNewHeight) |
Prints current canvas in a file with a new size. | |
void | RedrawAxis (Option_t *option="", int aPadIndex=0) |
Redraw the frame axis. | |
void | ResetLegend (void) |
Resets and removes current legend box. | |
void | ResizePlot (const unsigned int aWidth, const unsigned int aHeight) |
Resizes the global canvas to new dimensions. | |
void | SetGridx (const int aValue=1, const int aPadIndex=0) |
Set/Unset grid for X. | |
void | SetGridy (const int aValue=1, const int aPadIndex=0) |
Set/Unset grid for Y. | |
void | SetLogx (const int aValue, const int aPadIndex=0) |
Set Lin/Log scale for X. | |
void | SetLogy (const int aValue, const int aPadIndex=0) |
Set Lin/Log scale for Y. | |
void | SetLogz (const int aValue, const int aPadIndex=0) |
Set Lin/Log scale for Z. | |
void | UnDraw (TObject *aObj, const int aPadIndex=0) |
UnDraws a ROOT object. | |
void | UnDrawLegend (void) |
Removes the legend box from the pad. | |
void | UpdateText (const string aText) |
Updates text in the plot. | |
GwollumPlot (const string aName, const string aStyleName="GWOLLUM") | |
Constructor of the GwollumPlot class. | |
virtual | ~GwollumPlot (void) |
Destructor of the GwollumPlot class. | |
Private Member Functions | |
void | SelectClusters (const unsigned int aSampleIndex) |
Select input clusters. | |
Private Attributes | |
vector< unsigned int > | CoC [COINC2_NT] |
Coinc cluster index. | |
double | coinc_dt |
Coinc time distance [s]. | |
Segments * | CoSeg |
Coinc segments. | |
bool * | CoTag |
Coinc tags. | |
double | freqmax [COINC2_NT] |
Frequency max selection [Hz]. | |
double | freqmin [COINC2_NT] |
Frequency min selection [Hz]. | |
TGraph * | gc_freqfreq |
Frequency vs frequency. | |
TGraph * | gc_freqtime [4] |
Coinc Frequency vs time. | |
TGraph * | gc_snrsnr |
Coinc SNR vs SNR. | |
TGraph * | gc_snrtime [4] |
SNR vs time. | |
TH1D * | hc_freqfrac [2] |
coinc fraction vs frequency | |
TH1D * | hc_snrfrac [2] |
coinc fraction vs SNR | |
Monitor * | mon |
Class monitor. | |
unsigned int | nactive [COINC2_NT] |
Number of active clusters. | |
double | snrmin [COINC2_NT] |
SNR min selection. | |
double | toffset [COINC2_NT] |
Time offsets [s]. | |
ReadTriggers * | triggers [COINC2_NT] |
Trigger sets. | |
Additional Inherited Members | |
![]() | |
string | name |
Name. | |
int | randid |
Random integer id. | |
string | srandid |
Random string id. | |
string | stylename |
Style name. | |
TCanvas * | Wcan |
Working canvas. | |
TLegend * | Wleg |
Plot legends. | |
TPad * | Wpad |
Working pad. | |
TText * | Wtext |
Additional text. | |
Set two trigger sets in coincidence.
A time coincidence algorithm is implemented in MakeCoinc(). The trigger sets must be defined with SetTriggers(). This class also offers methods to plot coincident triggers. These plots are generated with MakeComparators().
Coinc2::Coinc2 | ( | const unsigned int | aVerbose = 0 | ) |
Constructor of the Coinc2 class.
[in] | aVerbose | Verbosity level. |
|
virtual |
Destructor of the Coinc2 class.
|
inline |
Gets the number of active clusters.
Active clusters are used by the coincidence algorithm. They are defined when calling SetTriggers().
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
|
inline |
Returns the cluster index involved in a given coinc event.
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
[in] | aCoincIndex | Coinc index. |
|
inline |
Returns the chacteristic duration defining a coinc \(\delta t\) [s].
|
inline |
Returns the livetime of coinc segments [s].
|
inline |
Returns the current number of coinc events.
|
inline |
Returns a pointer to the coincidence segments.
|
inline |
Returns a copy of coincidence segments.
|
inline |
Gets the tag value of a given coinc event.
[in] | aCoincIndex | Coinc index. |
|
inline |
Returns the coincidence time window end \(\tau_e\)[s].
The window end is defined as:
\[ \tau_e = \mathrm{Min}(t_p+\delta t/2, t_e) \]
where \(t_e\) and \(t_p\) are the cluster end time and peak time respectively.
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
[in] | aClusterIndex | Cluster index for the selected trigger sample. |
|
inline |
Returns the coincidence time window start \(\tau_s\)[s].
The window start is defined as:
\[ \tau_s = \mathrm{Max}(t_p-\delta t/2, t_s) \]
where \(t_s\) and \(t_p\) are the cluster start time and peak time respectively.
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
[in] | aClusterIndex | Cluster index for the selected trigger sample. |
|
inline |
Returns the miaximum frequency used to select input clusters [Hz].
[in] | aSampleIndex | Trigger sample index. |
|
inline |
Returns the minimum frequency used to select input clusters [Hz].
[in] | aSampleIndex | Trigger sample index. |
|
inline |
Returns the minimum SNR used to select input clusters [Hz].
[in] | aSampleIndex | Trigger sample index. |
|
inline |
Returns the class status.
|
inline |
Returns the time offset of a trigger set [s].
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
unsigned int Coinc2::MakeCoinc | ( | void | ) |
Runs the coincidence algorithm.
The trigger sets must first be defined with SetTriggers(). Only active clusters are considered (see SelectClusters()). For each cluster, an effective duration is defined between \(\tau_s\) and \(\tau_e\):
\[ \tau_s = \mathrm{Max}(t_p-\delta t/2, t_s) \]
\[ \tau_e = \mathrm{Min}(t_p+\delta t/2, t_e) \]
where \(t_s\), \(t_e\), and \(t_p\) are the cluster start time, end time and peak time respectively. Two clusters are said to coincide if their effective durations overlap. All coinc events are tagged to true.
bool Coinc2::MakeComparators | ( | void | ) |
Produce plots for coinc events.
List of plots:
void Coinc2::PrintCoinc | ( | void | ) |
Prints the list of coinc events in the standard output.
void Coinc2::PrintCoincNot | ( | const unsigned int | aSampleIndex | ) |
Prints the list of active clusters NOT participating to a coinc event.
[in] | aSampleIndex | Trigger sample index: 0 or 1. |
void Coinc2::PrintComparators | ( | const string | aFileName | ) |
Prints plots for coinc events.
After calling MakeComparators(), the plots are printed in png files.
[in] | aFileName | Output file name. Do not provide the file extension, it will be automatically added. For example: "/path/to/directory/filename" . |
|
private |
Select input clusters.
The input clusters are set to "active" if all the following condition are met:
[in] | aSampleIndex | Trigger sample index. |
|
inline |
Sets the chacteristic duration to define a coinc \(\delta t\).
[in] | aDeltat | Chacteristic duration \(\delta t\) [s]. |
|
inline |
Sets a new tag for all coinc events.
[in] | aNewTag | New tag value. |
|
inline |
Sets a new tag to a given coinc event.
[in] | aCoincIndex | Coinc index. |
[in] | aNewTag | New tag value. |
|
inline |
Sets a frequency range to select input clusters.
[in] | aSampleIndex | Trigger sample index. |
[in] | aFrequencyMin | Minimum frequency [Hz]. |
[in] | aFrequencyMax | Maximum frequency [Hz]. |
|
inline |
Sets a minimum SNR to select input clusters.
[in] | aSampleIndex | Trigger sample index. |
[in] | aSnrMin | Minimum SNR. |
bool Coinc2::SetTriggers | ( | ReadTriggers * | aTrigger0, |
ReadTriggers * | aTrigger1, | ||
const double | aTimeOffset0 = 0.0 , |
||
const double | aTimeOffset1 = 0.0 , |
||
Segments * | aValidSegments = NULL |
||
) |
Sets the trigger sets.
The two input ReadTriggers objects define the trigger sets. Only clusters are used in the coincidence. Therefore, triggers must be clustered first using Triggers::Clusterize().
Clusters are selected based on time and frequency: see SelectClusters(). After selection, a cluster is said to be "active".
Clusters can be time-shifted with a given time offset.
In this function, the coinc segments are constructed. The coinc segments are the intersection of:
[in] | aTrigger0 | Pointer to the first trigger object (must be a valid object). |
[in] | aTrigger1 | Pointer to the second trigger object (must be a valid object). |
[in] | aTimeOffset0 | Time offset to apply to the clusters of the first set. |
[in] | aTimeOffset1 | Time offset to apply to the clusters of the second set. |
[in] | aValidSegments | List of segments to consider clusters (before time offset!). Set this to NULL to only use the input trigger segments. |
|
private |
Coinc cluster index.
|
private |
Coinc time distance [s].
|
private |
Coinc segments.
|
private |
Coinc tags.
|
private |
Frequency max selection [Hz].
|
private |
Frequency min selection [Hz].
|
private |
Frequency vs frequency.
|
private |
Coinc Frequency vs time.
|
private |
Coinc SNR vs SNR.
|
private |
SNR vs time.
|
private |
coinc fraction vs frequency
|
private |
coinc fraction vs SNR
|
private |
Class monitor.
|
private |
Number of active clusters.
|
private |
SNR min selection.
|
private |
Time offsets [s].
|
private |
Trigger sets.