Recover injections in a coinc set. More...
#include <InjCoi.h>
Public Member Functions | |
int | Recover (const int aInjIndex=-1) |
Recovers injections in the coinc set. | |
bool | WriteCoinc (const string aOutDir, const string aOutFileName) |
Writes coinc events on disk. | |
Constructors and destructors | |
InjCoi (InjRec *aRec0, InjRec *aRec1, const int aVerbose=0) | |
Constructor of the InjCoi class. | |
virtual | ~InjCoi (void) |
Destructor of the InjCoi class. |
Recover injections in a coinc set.
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.
aRec0 | first input injection recovery stream | |
aRec1 | second input injection recovery stream | |
aVerbose | verbosity level |
InjCoi::~InjCoi | ( | void | ) | [virtual] |
Destructor of the InjCoi class.
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().
aInjIndex | injection index to follow-up |
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().
aOutDir | output directory (must exist) | |
aOutFileName | output file name (do not provide an extension) |
Reimplemented from Coinc2.