Set trigger streams in coincidence. More...
#include <Coinc.h>


Public Member Functions | |
| vector< int > | GetCoincEvents (const int aS, const int aNetID=-1) |
| Returns list of coincident cluster indexes. | |
| int | GetNCoinc (void) |
| Returns the current number of found coincidence. | |
| bool | MakeCoinc (const bool aUniq=false) |
| Runs the coincidence. | |
| bool | SaveCoinc (const string aCoincFileName) |
| Saves the coincidence. | |
| bool | SetAf (const double aAf) |
| Sets all the coinc frequency asymmetry parameters. | |
| bool | SetDt (const double aDt) |
| Sets all the coinc time window parameters. | |
| bool | SetParameters (vector< double > aDt, vector< double > aAf) |
| Sets coinc parameters. | |
| bool | SetSegments (Segments *aSeg) |
| Sets new reference segments. | |
| bool | SetTriggers (const int aS, ReadTriggers *aTriggers) |
| Links stream aS to trigger set aTriggers. | |
Constructors and destructors | |
| Coinc (const int aNstreams, const int aAlgoMode=0, const int aVerbose=0) | |
| Constructor of the Coinc class. | |
| virtual | ~Coinc (void) |
| Destructor of the Coinc class. | |
Protected Attributes | |
| vector< double > | caf |
| coinc frequency asymmetry (f1-f2/f1+f2) | |
| vector< double > | cdt |
| coinc dt windows in s | |
| int * | CoCluster |
| TTree * | CoincTree |
| coincidence tree | |
| int | CoLagID |
| coincidence lag index | |
| int | CoNet |
| coincidence network index | |
| int | CoType |
| coincidence type | |
| ReadTriggers ** | InputTriggers |
| input triggers - DO NOT DELETE | |
Set trigger streams in coincidence.
This class was designed to perform a coincidence scheme in a network of N trigger streams. Coincidences are defined using the GWOLLUM convention. The coincidence scheme is based on 2 parameters: a time window dt and a frequency asymetry Af. Two triggers are in coincidence if the distance between the time boundaries of the 2 triggers is less than t. In addition, a frequency coherence test can be performed: 2 triggers are in coincidence if abs(log10(f1)-log10(f2))/(log10(f1)+log10(f2)) is less than Af.
This class deals with sub-network coincidences. For example if one works with 4 streams, this class will identify all the coincident events between 2, 3 and 4 stream combinations.
This class relies on the ReadTriggers class for the inputs. Each input streams is represented by a ReadTriggers object. It is mandatory that input triggers are clustered before performing the coincidence algorithm.
The coincidence can be performed on time-slid data streams. For this, the TimeSlides class is used.
Found coincidences can be saved in a ROOT file following the GWOLLUM convention.
| Coinc::Coinc | ( | const int | aNstreams, | |
| const int | aAlgoMode = 0, |
|||
| const int | aVerbose = 0 | |||
| ) |
Constructor of the Coinc class.
Several coincidence algorithms are available:
| aNstreams | number of input trigger streams defining the network | |
| aAlgoMode | coinc algo | |
| aVerbose | verbosity level |
| Coinc::~Coinc | ( | void | ) | [virtual] |
Destructor of the Coinc class.
| vector< int > Coinc::GetCoincEvents | ( | const int | aS, | |
| const int | aNetID = -1 | |||
| ) |
Returns list of coincident cluster indexes.
The list of cluster indexes involved in a coincidence is returned for stream index 'aS' in the network indexed with 'aNetID'.
| aS | stream index | |
| aNetID | network index |
| int Coinc::GetNCoinc | ( | void | ) | [inline] |
Returns the current number of found coincidence.
| bool Coinc::MakeCoinc | ( | const bool | aUniq = false |
) |
Runs the coincidence.
This function performs the coincidence according to the mode chosen in the constructor. The coincidence is performed pair-wise. Two clusters are in a concident pair if:
The argument 'aUniq' is only used for the FULL mode. If 'aUniq=false', every coincident event is saved with redundancies. For example, if a cluster pair is coincident with an event of a third stream, BOTH the pair AND the triple event are saved. If 'aUniq=true', only the higher-type coincidence is saved.
| aUniq | remove redundancies if set to true |
| bool Coinc::SaveCoinc | ( | const string | aCoincFileName | ) |
Saves the coincidence.
This function saves the found coincidences in a TTree in a ROOT file named 'aCoincFileName'. The Coinc object follows the GWOLLUM convention for coincidence.
Once this is done, all coincidences are erased and new inputs can be set and a new coincidence can be performed.
| aCoincFileName | output ROOT file name |
| bool Coinc::SetAf | ( | const double | aAf | ) |
Sets all the coinc frequency asymmetry parameters.
The requency asymmetry Af is set to aAf for every pairs.
| aAf | new frequency asymmetries Af |
| bool Coinc::SetDt | ( | const double | aDt | ) |
Sets all the coinc time window parameters.
The time distance dt is set to aDt for every pairs.
| aDt | new time windows dt |
| bool Coinc::SetParameters | ( | vector< double > | aDt, | |
| vector< double > | aAf | |||
| ) |
Sets coinc parameters.
The time distance and the frequency asymmetry are defined with vectors of values. The vector size should match the number of pairs considered in the coincidence. The order of the parameters should follow the pair indexes defined in the GWOLLUM convention for coincidence.
| aDt | list of time windows dt (as many as stream pairs) | |
| aAf | list of frequency asymmetries Af (as many as stream pairs) |
| bool Coinc::SetSegments | ( | Segments * | aSeg | ) |
Sets new reference segments.
No check is performed with respect to input triggers. if aSeg=NULL, no reference segments.
| aSeg | new reference segments |
| bool Coinc::SetTriggers | ( | const int | aS, | |
| ReadTriggers * | aTriggers | |||
| ) |
Links stream aS to trigger set aTriggers.
This function associates triggers to the stream index 'aS'. 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().
The user must provide the appropriate trigger files to operate the time coincidence. No check will be performed to know whether the timing of each stream makes sense. In particular, care must be taken when time-sliding the data.
If 'aTriggers==NULL' then the stream 'aS' is de-activated and the coincidence will be performed between the remaining streams.
For the MAIN mode, the convention is that main stream is ALWAYS associated to the FIRST stream: aS=0.
| aS | stream index | |
| aTriggers | pointer to the trigger data to consider |
vector<double> Coinc::caf [protected] |
coinc frequency asymmetry (f1-f2/f1+f2)
vector<double> Coinc::cdt [protected] |
coinc dt windows in s
int* Coinc::CoCluster [protected] |
TTree* Coinc::CoincTree [protected] |
coincidence tree
int Coinc::CoLagID [protected] |
coincidence lag index
int Coinc::CoNet [protected] |
coincidence network index
int Coinc::CoType [protected] |
coincidence type
ReadTriggers** Coinc::InputTriggers [protected] |
input triggers - DO NOT DELETE
1.6.1