12 |
|
|
13 |
#include "../VerboseCollection/VerboseCollection.h" |
#include "../VerboseCollection/VerboseCollection.h" |
14 |
|
|
15 |
|
/*! @enum Flags to select the method of error computation */ |
16 |
|
enum EffRigCollection_ErrMethod { |
17 |
|
EFFRIG_SERGIO, ///< Flag for Sergio Ricciarini's Fortran routine |
18 |
|
EFFRIG_ROOT |
19 |
|
///< Flag for ROOT TGraphAsymErrors::BayesDivide() |
20 |
|
}; |
21 |
|
|
22 |
/*! @brief A verbose collection which computes the efficiency of a set of cuts. |
/*! @brief A verbose collection which computes the efficiency of a set of cuts. |
23 |
* |
* |
24 |
* This class subdivides the cuts it contains into two classes: selection and detector |
* This class subdivides the cuts it contains into two classes: selection and detector |
30 |
* the cuts. |
* the cuts. |
31 |
* 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 |
32 |
* 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. |
33 |
* |
* Error computation is done either using Sergio Ricciarini's Fortran routine or ROOT's |
34 |
|
* TGraphAsimmErrors::BayesDivide(). For both methods, the efficiency is arbitrarily set to |
35 |
|
* 1.1 when less than 8 events survive the selection cuts. This is needed to avoid convergence |
36 |
|
* problems in Sergio's routine, and the ROOT output has been consequently adapted to this |
37 |
|
* convention. |
38 |
* |
* |
39 |
*/ |
*/ |
40 |
class EffCollection: public VerboseCollection { |
class EffCollection: public VerboseCollection { |
49 |
* events surviving the detector cuts (1st column), the selection cuts (2nd column), |
* events surviving the detector cuts (1st column), the selection cuts (2nd column), |
50 |
* the efficiency (3rd column), the lower (4th column) and upper (5th column) length |
* the efficiency (3rd column), the lower (4th column) and upper (5th column) length |
51 |
* of the efficiency's error bar. |
* of the efficiency's error bar. |
52 |
|
* @param errMethod The method to use for error computation. Possible values are defined in #EffRigCollection_ErrMethod. |
53 |
*/ |
*/ |
54 |
EffCollection(const char *collectionName, TString outFileBase = ""); |
EffCollection(const char *collectionName, TString outFileBase = "", int errMethod = EFFRIG_ROOT); |
55 |
|
|
56 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
57 |
~EffCollection() { |
~EffCollection() { |
137 |
/*! The base name of the output file. */ |
/*! The base name of the output file. */ |
138 |
TString _outFileBase; |
TString _outFileBase; |
139 |
|
|
140 |
|
/*! The method used for error computation. */ |
141 |
|
int _errMethod; |
142 |
|
|
143 |
/*! The number of events surviving the detector cuts. */ |
/*! The number of events surviving the detector cuts. */ |
144 |
unsigned int _det; |
unsigned int _det; |
145 |
|
|