| 24 |
* This class implements specific methods to add selection and detector cuts; cuts added |
* This class implements specific methods to add selection and detector cuts; cuts added |
| 25 |
* with the standard #AddCut method will be treated as detector cuts. The same for actions. |
* with the standard #AddCut method will be treated as detector cuts. The same for actions. |
| 26 |
* |
* |
| 27 |
|
* |
| 28 |
*/ |
*/ |
| 29 |
class EffCollection: public VerboseCollection { |
class EffCollection: public VerboseCollection { |
| 30 |
|
|
| 33 |
/*! @brief Constructor. |
/*! @brief Constructor. |
| 34 |
* |
* |
| 35 |
* @param collectionName The collection's name. |
* @param collectionName The collection's name. |
| 36 |
* @param rigBinsFile The file with the rigidity bins. |
* @param outFileBase The output file base name. If "", no file output will be produced; otherwise, |
| 37 |
* @param outFileBase The output file base name. If != "", 3 text files will be produced: |
* a file named outFilebase + "-eff.txt" will be produced, containing the number of |
| 38 |
* - outFileBase + "-sel.txt": events surviving the selection cuts for each bin; |
* events surviving the detector cuts (1st column), the selection cuts (2nd column), |
| 39 |
* - outFileBase + "-det.txt": events surviving the detector cuts for each bin; |
* the efficiency (3rd column), the lower (4th column) and upper (5th column) length |
| 40 |
* - outFileBase + "-eff.txt": efficiency for each bin (will be 0 if no event survives selection cuts). |
* of the efficiency's error bar. |
|
* @param absRig If true, the absolute rigidity of the selected events will be considered. |
|
|
* |
|
| 41 |
*/ |
*/ |
| 42 |
EffCollection(const char *collectionName, TString rigBinsFile, TString &outFileBase = "", bool absRig = false); |
EffCollection(const char *collectionName, TString outFileBase = ""); |
| 43 |
|
|
| 44 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
| 45 |
~EffCollection() { |
~EffCollection() { |
| 114 |
*/ |
*/ |
| 115 |
void Finalize(); |
void Finalize(); |
| 116 |
|
|
| 117 |
private: |
protected: |
| 118 |
|
|
| 119 |
|
/*! This collection contains the selection cuts. */ |
| 120 |
SmartCollection _selCollection; |
SmartCollection _selCollection; |
| 121 |
|
|
| 122 |
|
/*! This collection contains the detector cuts. */ |
| 123 |
SmartCollection _detCollection; |
SmartCollection _detCollection; |
| 124 |
|
|
| 125 |
|
/*! The base name of the output file. */ |
| 126 |
TString _outFileBase; |
TString _outFileBase; |
|
bool _absRig; |
|
|
vector<float> _bins; |
|
|
vector<unsigned int> _sel; |
|
|
vector<unsigned int> _det; |
|
| 127 |
|
|
| 128 |
unsigned int _outUp, _outDown; |
/*! The number of events surviving the detector cuts. */ |
| 129 |
|
unsigned int _det; |
| 130 |
|
|
| 131 |
|
/*! The number of events surviving the selection cuts. */ |
| 132 |
|
unsigned int _sel; |
| 133 |
|
|
| 134 |
}; |
}; |
| 135 |
|
|
| 136 |
#endif /* EFFCOLLECTION_H_ */ |
#endif /* EFFCOLLECTION_H_ */ |