| 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; |
* and the efficiency (3rd column). |
|
* - outFileBase + "-eff.txt": efficiency for each bin (will be 0 if no event survives selection cuts). |
|
|
* @param absRig If true, the absolute rigidity of the selected events will be considered. |
|
|
* |
|
| 40 |
*/ |
*/ |
| 41 |
EffCollection(const char *collectionName, TString rigBinsFile, TString &outFileBase = "", bool absRig = false); |
EffCollection(const char *collectionName, TString outFileBase = ""); |
| 42 |
|
|
| 43 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
| 44 |
~EffCollection() { |
~EffCollection() { |
| 113 |
*/ |
*/ |
| 114 |
void Finalize(); |
void Finalize(); |
| 115 |
|
|
| 116 |
private: |
protected: |
| 117 |
|
|
| 118 |
SmartCollection _selCollection; |
SmartCollection _selCollection; |
| 119 |
SmartCollection _detCollection; |
SmartCollection _detCollection; |
| 120 |
TString _outFileBase; |
TString _outFileBase; |
| 121 |
bool _absRig; |
unsigned int _det, _sel; |
|
vector<float> _bins; |
|
|
vector<unsigned int> _sel; |
|
|
vector<unsigned int> _det; |
|
| 122 |
|
|
|
unsigned int _outUp, _outDown; |
|
| 123 |
}; |
}; |
| 124 |
|
|
| 125 |
#endif /* EFFCOLLECTION_H_ */ |
#endif /* EFFCOLLECTION_H_ */ |