Recover injections in a coinc set.
More...
#include <InjCoi.h>
Recover injections in a coinc set.
- Author
- Florent Robinet
◆ 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
-
aRec0 | first input injection recovery stream |
aRec1 | second input injection recovery stream |
aVerbose | verbosity level |
◆ ~InjCoi()
Destructor of the InjCoi class.
◆ 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
-
aInjIndex | injection 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
-
aOutDir | output directory (must exist) |
aOutFileName | output file name (do not provide an extension) |
◆ coinc_injindex
vector<int> InjCoi::coinc_injindex |
|
private |
injection index matching coinc
◆ rec0
◆ rec1
◆ rec_injindex
vector<int> InjCoi::rec_injindex |
|
private |
recovered injection index
◆ status_OK
◆ Verbose
The documentation for this class was generated from the following files: