Recover injections in a trigger set. More...
#include <InjRec.h>
Public Member Functions | |
void | Draw (const int aPlotIndex, const string aOptions="", const int aPadIndex=0) |
Draws diagnostic plots. | |
double | GetInjectedAmplitude (void) |
Returns the injected amplitude. | |
int | GetNMissedInjections (void) |
Returns the number missed injections. | |
int | GetNRecInjections (void) |
Returns the number of recovered injections. | |
int | GetNValidInjections (void) |
Returns the number of valid injections. | |
vector< int > | GetRecInjections (void) |
Returns the list of recovered injection. | |
void | PrintMissedInjection (const double aAmplitudeThr=0.0) |
Prints missed injections above a given amplitude threshold. | |
int | Recover (const int aInjIndex=-1, const int aClusterTagThr=0) |
Recovers injections in the trigger set. | |
Constructors and destructors | |
InjRec (const string aTriggerFilePattern, const string aInjFilePattern, const int aVerbose=0) | |
Constructor of the InjRec class. | |
virtual | ~InjRec (void) |
Destructor of the InjRec class. | |
Friends | |
class | InjCoi |
Recover injections in a trigger set.
InjRec::InjRec | ( | const string | aTriggerFilePattern, | |
const string | aInjFilePattern, | |||
const int | aVerbose = 0 | |||
) |
Constructor of the InjRec class.
Triggers and injections are loaded (see parent classes). Triggers must be clustered as injections will only searched in the cluster sample, see Recover().
Injections are discarded (tagged to false, see InjRea::SetInjectionTag()) if:
aTriggerFilePattern | trigger file pattern | |
aInjFilePattern | injection file pattern | |
aVerbose | verbosity level |
InjRec::~InjRec | ( | void | ) | [virtual] |
Destructor of the InjRec class.
void InjRec::Draw | ( | const int | aPlotIndex, | |
const string | aOptions = "" , |
|||
const int | aPadIndex = 0 | |||
) |
Draws diagnostic plots.
Many diagnostic plots are avalaible and can be drawn with this function. Plots are indexed:
A bit of semantic (using amplitude as an example):
aPlotIndex | plot index | |
aOptions | draw options (see GwollumPlot::Draw()) | |
aPadIndex | pad index (see GwollumPlot::Draw()) |
double InjRec::GetInjectedAmplitude | ( | void | ) | [inline] |
Returns the injected amplitude.
int InjRec::GetNMissedInjections | ( | void | ) | [inline] |
Returns the number missed injections.
This function only works if called after Recover().
int InjRec::GetNRecInjections | ( | void | ) | [inline] |
Returns the number of recovered injections.
This function only works if called after Recover().
int InjRec::GetNValidInjections | ( | void | ) | [inline] |
Returns the number of valid injections.
An injection is said to be valid if it overlaps the parameter space covered by the trigger set (in time and frequency). This function only works if called after Recover().
vector<int> InjRec::GetRecInjections | ( | void | ) | [inline] |
Returns the list of recovered injection.
The returned vector contains a list of injection idexes.
void InjRec::PrintMissedInjection | ( | const double | aAmplitudeThr = 0.0 |
) |
Prints missed injections above a given amplitude threshold.
This function only works if called after Recover().
aAmplitudeThr | amplitude threshold |
int InjRec::Recover | ( | const int | aInjIndex = -1 , |
|
const int | aClusterTagThr = 0 | |||
) |
Recovers injections in the trigger set.
Triggers must be clustered first, use Clusterize(). 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.
IMPORTANT1: injections tagged to 'false' are not valid and discarded. See InjRea::SetInjectionTag().
aInjIndex | injection index to follow-up | |
aClusterTagThr | only clusters tagged with a value greater than this parameter are considered in the recovery procedure |
friend class InjCoi [friend] |