Veto performance class.
More...
#include <VVetoPerf.h>
|
unsigned int | AddVeto (const string aVetoName, Segments *aVetoSeg) |
| Adds a veto to the veto list.
|
|
unsigned int | AddVetoChannel (const string aVetoChannelName, const double aThreshold) |
| Adds a veto channel to the veto list.
|
|
unsigned int | AddVetoFile (const string aVetoFile) |
| Adds a veto file to the veto list.
|
|
unsigned int | GetClusterN (const unsigned int aSnrIndex) |
| Returns the number of active clusters for a given SNR category.
|
|
double | GetSnrThr (const unsigned int aSnrIndex) |
| Returns the SNR threshold for a given SNR category.
|
|
unsigned int | GetSnrThrN (void) |
| Returns the number of SNR thresholds.
|
|
unsigned int | GetVetoN (void) |
| Returns the number of vetoes.
|
|
bool | MakeReport (void) |
| Make html report.
|
|
bool | MakeVetoPerformance (const unsigned int aVetoIndex) |
| Run the veto performance algorithm.
|
|
void | PrintVeto (const bool aFlag) |
| Sets a flag to print vetoes in a TXT file.
|
|
void | PrintVetoClusters (const bool aFlag) |
| Sets a flag to print vetoed clusters in a TXT file.
|
|
void | PrintVetoSummary (const int aSnrIndex) |
| Prints a summary plot showing the vetoed cluster distribution.
|
|
void | SetFfl (ffl *aFfl=NULL) |
| Sets a ffl pointer to define veto channels.
|
|
void | SetOutputDirectory (const string aOutdir) |
| Sets the path to the output directory.
|
|
void | SetSubTitle (const string aSubTitle) |
| Adds a subtitle in the html report.
|
|
void | SetTriggers (TriggerPlot *aTriggers, Segments *aInSeg=NULL) |
| Sets triggers and generates trigger plots.
|
|
|
| VetoPerf (const vector< double > aSnrThr) |
| Constructor of the VetoPerf class.
|
|
virtual | ~VetoPerf (void) |
| Destructor of the VetoPerf class.
|
|
|
void | MakeCollections (void) |
| Parameterizes the TriggerPlot collections.
|
|
vector< unsigned int > | SortVetoes (void) |
| Sorts vetoes by decreasing efficiencies (for html report).
|
|
|
ffl * | ffldata |
| Pointer to a ffl object.
|
|
TGraph * | gfreqtime |
| Frequency-time distribution.
|
|
TGraph * | gsnrfreq |
| SNR-frequency distribution.
|
|
TGraph * | gsnrtime |
| SNR-time distribution.
|
|
TH1D * | hfreqtime |
| Frequency-time distribution (frame).
|
|
TH1D * | hsnr |
| SNR distribution.
|
|
TH1D * | hsnrfreq |
| SNR-frequency distribution (frame).
|
|
TH1D * | hsnrtime |
| SNR-time distribution (frame).
|
|
Segments * | InSeg |
| Input segments.
|
|
unsigned int * | n_c_snr |
| Number of active clusters in SNR categories.
|
|
string | outdir |
| Output directory.
|
|
bool | printveto |
| Flag to print vetoes in a TXT file.
|
|
bool | printvetoclusters |
| Flag to print vetoed clusters in a TXT file.
|
|
vector< double > | snrthr |
| List of SNR thresholds.
|
|
string | subtitle |
| Subtitle.
|
|
int | summary_snrthr |
| SNR index for the summary plot.
|
|
time_t | timer_start |
| Timer start.
|
|
TriggerPlot * | TP |
| Pointer to triggers.
|
|
vector< Veto * > | veto |
| Veto objects.
|
|
Veto performance class.
This class is designed to evaluate the performance of time-domain vetoes against a set of triggers.
The set of triggers is defined with SetTriggers(). The triggers must be clustered first as clusters are used to test the vetoes. The vetoes can be provided as text files (AddVetoFile()) or as ADC channels (AddVetoChannel) found in frame files.
The performance algorithm is performed with MakeVetoPerformance() called for each veto.
An html report can be generated with MakeReport().
- Author
- Florent Robinet - florent.robinet@ijclab.in2p3.fr
◆ VetoPerf()
VetoPerf::VetoPerf |
( |
const vector< double > |
aSnrThr | ) |
|
Constructor of the VetoPerf class.
A list of SNR thresholds must be provided to define the categories of triggers to evaluate the veto performance.
- Parameters
-
[in] | aSnrThr | List of SNR thresholds. Empty vector = use default values: 5, 8, 10, and 20. |
◆ ~VetoPerf()
VetoPerf::~VetoPerf |
( |
void |
| ) |
|
|
virtual |
◆ AddVeto()
unsigned int VetoPerf::AddVeto |
( |
const string |
aVetoName, |
|
|
Segments * |
aVetoSeg |
|
) |
| |
|
inline |
Adds a veto to the veto list.
- Returns
- The current number of vetoes.
- Parameters
-
[in] | aVetoName | Veto name. |
[in] | aVetoSeg | Pointer to the list of segments when the veto is active. DO NOT DELETE. |
◆ AddVetoChannel()
unsigned int VetoPerf::AddVetoChannel |
( |
const string |
aVetoChannelName, |
|
|
const double |
aThreshold |
|
) |
| |
|
inline |
Adds a veto channel to the veto list.
- Returns
- The current number of vetoes.
- Warning
- The FFL file must be defined first with SetFfl() as the FFL file is associated to the veto definition.
- Parameters
-
[in] | aVetoChannelName | Veto channel name. |
[in] | aThreshold | Channel threshold to define the veto. |
◆ AddVetoFile()
unsigned int VetoPerf::AddVetoFile |
( |
const string |
aVetoFile | ) |
|
|
inline |
Adds a veto file to the veto list.
- Returns
- The current number of vetoes.
- Parameters
-
[in] | aVetoFile | Path to the veto file. |
◆ GetClusterN()
unsigned int VetoPerf::GetClusterN |
( |
const unsigned int |
aSnrIndex | ) |
|
|
inline |
Returns the number of active clusters for a given SNR category.
- Parameters
-
[in] | aSnrIndex | SNR category index. |
- Precondition
- The SNR index must be valid!
◆ GetSnrThr()
double VetoPerf::GetSnrThr |
( |
const unsigned int |
aSnrIndex | ) |
|
|
inline |
Returns the SNR threshold for a given SNR category.
- Parameters
-
[in] | aSnrIndex | SNR category index. |
- Precondition
- The SNR index must be valid!
◆ GetSnrThrN()
unsigned int VetoPerf::GetSnrThrN |
( |
void |
| ) |
|
|
inline |
Returns the number of SNR thresholds.
◆ GetVetoN()
unsigned int VetoPerf::GetVetoN |
( |
void |
| ) |
|
|
inline |
Returns the number of vetoes.
◆ MakeCollections()
void VetoPerf::MakeCollections |
( |
void |
| ) |
|
|
private |
Parameterizes the TriggerPlot collections.
◆ MakeReport()
bool VetoPerf::MakeReport |
( |
void |
| ) |
|
◆ MakeVetoPerformance()
bool VetoPerf::MakeVetoPerformance |
( |
const unsigned int |
aVetoIndex | ) |
|
Run the veto performance algorithm.
The list of veto segments is extracted. It is used to veto clusters set with SetTriggers(). The veto performance is measured. Trigger plots after the veto is applied are saved in the ouput directory.
- Parameters
-
[in] | aVetoIndex | Veto index. Must exist! |
◆ PrintVeto()
void VetoPerf::PrintVeto |
( |
const bool |
aFlag | ) |
|
|
inline |
Sets a flag to print vetoes in a TXT file.
- Parameters
-
[in] | aFlag | Set this flag to true to print vetoes in a file. |
◆ PrintVetoClusters()
void VetoPerf::PrintVetoClusters |
( |
const bool |
aFlag | ) |
|
|
inline |
Sets a flag to print vetoed clusters in a TXT file.
- Parameters
-
[in] | aFlag | Set this flag to true to print clusters in a file. |
◆ PrintVetoSummary()
void VetoPerf::PrintVetoSummary |
( |
const int |
aSnrIndex | ) |
|
|
inline |
Prints a summary plot showing the vetoed cluster distribution.
It is possible to print a summary plot to show the impact of the 10 most efficient vetoes. The summary plot is a time-frequency distribution of the clusters where each cluster is marked when it is vetoed.
The SNR index must be given to select which SNR threshold (defined in the constructor) is applied.
- Warning
- The summary plot is only produced when calling MakeReport().
- Parameters
-
[in] | aSnrIndex | SNR category index. Use -1 to not print the summary plot. |
◆ SetFfl()
void VetoPerf::SetFfl |
( |
ffl * |
aFfl = NULL | ) |
|
|
inline |
Sets a ffl pointer to define veto channels.
Provide the ffl object used to extract veto channels.
- Parameters
-
[in] | aFfl | Pointer to a valid ffl object. Use a pointer to NULL if no veto channels. |
◆ SetOutputDirectory()
void VetoPerf::SetOutputDirectory |
( |
const string |
aOutdir | ) |
|
|
inline |
Sets the path to the output directory.
- Warning
- The directory must exist.
- Parameters
-
[in] | aOutdir | Path to output directory. |
◆ SetSubTitle()
void VetoPerf::SetSubTitle |
( |
const string |
aSubTitle | ) |
|
|
inline |
Adds a subtitle in the html report.
- Parameters
-
[in] | aSubTitle | Subtitle string. |
◆ SetTriggers()
void VetoPerf::SetTriggers |
( |
TriggerPlot * |
aTriggers, |
|
|
Segments * |
aInSeg = NULL |
|
) |
| |
Sets triggers and generates trigger plots.
This function sets the triggers to evaluate the veto performance. The cluster distribution plots are saved in the output directory defined with SetOutputDirectory().
The input TriggerPlot structure must be defined such that the number of collections matches the number of SNR thresholds defined in the constructor. Triggers must be clustered before calling this function. Clusters with a negative tag are ignored.
By default, the active time segments are given by the input trigger structure. Optionally, a list of time segments can be given to select clusters in time.
- Parameters
-
[in] | aTriggers | TriggerPlot structure. |
[in] | aInSeg | Input segments for trigger selection. Set this to NULL to consider all the triggers. |
◆ SortVetoes()
vector< unsigned int > VetoPerf::SortVetoes |
( |
void |
| ) |
|
|
private |
Sorts vetoes by decreasing efficiencies (for html report).
◆ ffldata
◆ gfreqtime
TGraph* VetoPerf::gfreqtime |
|
private |
Frequency-time distribution.
◆ gsnrfreq
TGraph* VetoPerf::gsnrfreq |
|
private |
SNR-frequency distribution.
◆ gsnrtime
TGraph* VetoPerf::gsnrtime |
|
private |
◆ hfreqtime
TH1D* VetoPerf::hfreqtime |
|
private |
Frequency-time distribution (frame).
◆ hsnr
◆ hsnrfreq
SNR-frequency distribution (frame).
◆ hsnrtime
SNR-time distribution (frame).
◆ InSeg
Segments* VetoPerf::InSeg |
|
private |
◆ n_c_snr
unsigned int* VetoPerf::n_c_snr |
|
private |
Number of active clusters in SNR categories.
◆ outdir
◆ printveto
Flag to print vetoes in a TXT file.
◆ printvetoclusters
bool VetoPerf::printvetoclusters |
|
private |
Flag to print vetoed clusters in a TXT file.
◆ snrthr
vector<double> VetoPerf::snrthr |
|
private |
◆ subtitle
string VetoPerf::subtitle |
|
private |
◆ summary_snrthr
int VetoPerf::summary_snrthr |
|
private |
SNR index for the summary plot.
◆ timer_start
time_t VetoPerf::timer_start |
|
private |
◆ TP
TriggerPlot* VetoPerf::TP |
|
private |
◆ veto
vector<Veto*> VetoPerf::veto |
|
private |
The documentation for this class was generated from the following files: