Coinc Class Reference

Set trigger streams in coincidence. More...

#include <Coinc.h>

Inheritance diagram for Coinc:
Inheritance graph
[legend]
Collaboration diagram for Coinc:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.

Author:
Florent Robinet

Constructor & Destructor Documentation

Coinc::Coinc ( const int  aNstreams,
const int  aAlgoMode = 0,
const int  aVerbose = 0 
)

Constructor of the Coinc class.

Several coincidence algorithms are available:

  • aAlgoMode=0: FULL coinc mode. Every network of streams is considered. For example, when working with streams 0, 1, 2 and 3, the following networks will be considered: 01, 02, 03, 12, 13, 23, 012, 013, 023, 123 and 0123. A coincident event is defined if coincidence conditions are verified for EVERY pairs contained in the network. Given the large number of possible networks, the number of input streams IS limited.
  • aAlgoMode=1: MAIN coinc mode. Only coincidences with a designated main stream are considered. By convention, stream 0 is always consider as the main stream. For example, with a total 4 streams, only the following networks will be considered: 01, 02, 03, 012, 013, 023, and 0123. Another important difference with the previous mode is that only coincidence conditions involving the main stream are used to define an event. For example, for an event of type 023, the coincidence is verified only for 02 and 03, NOT for 23. This mode has no limitation for the number of input streams (the only limit is the RAM)
    Parameters:
    aNstreams number of input trigger streams defining the network
    aAlgoMode coinc algo
    aVerbose verbosity level
Coinc::~Coinc ( void   )  [virtual]

Destructor of the Coinc class.


Member Function Documentation

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'.

Parameters:
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 distance between the time boundaries of the 2 clusters is less than dt
  • the frequency asymmetry is less than Af

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
aS stream index
aTriggers pointer to the trigger data to consider

Member Data Documentation

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

input triggers - DO NOT DELETE


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 26 Sep 2014 by  doxygen 1.6.1