GWOLLUM  4.2.0
Tools for gravitational-wave analyses
InjCoi Class Reference

Recover injections in a coinc set. More...

#include <InjCoi.h>

Inheritance diagram for InjCoi:
Collaboration diagram for InjCoi:

Public Member Functions

int Recover (const int aInjIndex=-1)
 Recovers injections in the coinc set. More...
 
bool WriteCoinc (const string aOutDir, const string aOutFileName)
 Writes coinc events on disk. More...
 
Constructors and destructors
 InjCoi (InjRec *aRec0, InjRec *aRec1, const int aVerbose=0)
 Constructor of the InjCoi class. More...
 
virtual ~InjCoi (void)
 Destructor of the InjCoi class. More...
 

Private Attributes

vector< int > coinc_injindex
 injection index matching coinc More...
 
InjRecrec0
 first input trigger set More...
 
InjRecrec1
 second input trigger set More...
 
vector< int > rec_injindex
 recovered injection index More...
 
bool status_OK
 
int Verbose
 

Detailed Description

Recover injections in a coinc set.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ InjCoi()

InjCoi::InjCoi ( InjRec aRec0,
InjRec aRec1,
const int  aVerbose = 0 
)

Constructor of the InjCoi class.

Two injection recovery streams (see InjRec class) will be put in coincidence. See the Coinc2 parent class to perform the coincidence.

In this constructor, the set of valid injections is selected. It is defined as the intersection of both valid injection sets. Of course, for both recovery streams, the injection set must be the same!

NOTE: Unless you know what you're doing, it is better not to modify the input injection recovery streams while using the methods of this class.

Parameters
aRec0first input injection recovery stream
aRec1second input injection recovery stream
aVerboseverbosity level

◆ ~InjCoi()

InjCoi::~InjCoi ( void  )
virtual

Destructor of the InjCoi class.

Member Function Documentation

◆ Recover()

int InjCoi::Recover ( const int  aInjIndex = -1)

Recovers injections in the coinc set.

An injection is found if it is recovered in at least one trigger stream. See InjRec::Recover(). Returns the number of found injections. Returns -1 if the function fails in some way. If an injection index is given in argument, information is printed to track the injection through the recovering process.

NOTE1: input clusters for both streams are specifically tagged to map coincs. A discarded cluster is tagged with -1 and a valid cluster is tagged with 1 (see Coinc2::SetTriggerSample()). In this function, clusters involved in a coinc event are tagged with 2.

NOTE2: Coinc matching an injection are tagged to true (false otherwise). See Coinc2::SetCoincTag().

Parameters
aInjIndexinjection index to follow-up

◆ WriteCoinc()

bool InjCoi::WriteCoinc ( const string  aOutDir,
const string  aOutFileName 
)

Writes coinc events on disk.

This function overloads the parent function MorphMatch::WriteCoinc(). Two additional trees are saved. An injection tree is saved with only valid injections. A branch called 'injindex' is used to map this set of valid injections with the original injection tree (entry number). A tree called 'coincmap' connects the injection tree with coinc events. The injection index is reported for each coinc. Only coinc with a tag set to true are considered (i.e. matching a valid injection), see Coinc2::SetCoincTag().

Parameters
aOutDiroutput directory (must exist)
aOutFileNameoutput file name (do not provide an extension)

Member Data Documentation

◆ coinc_injindex

vector<int> InjCoi::coinc_injindex
private

injection index matching coinc

◆ rec0

InjRec* InjCoi::rec0
private

first input trigger set

◆ rec1

InjRec* InjCoi::rec1
private

second input trigger set

◆ rec_injindex

vector<int> InjCoi::rec_injindex
private

recovered injection index

◆ status_OK

bool InjCoi::status_OK
private

◆ Verbose

int InjCoi::Verbose
private

The documentation for this class was generated from the following files: