| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* EffRigCollection.h |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 12/ago/2009 |
| 5 |
|
|
* Author: Nicola Mori |
| 6 |
|
|
*/ |
| 7 |
|
|
|
| 8 |
|
|
/*! @file EffRigCollection.h The EffRigCollection class definition file. */ |
| 9 |
|
|
|
| 10 |
|
|
#ifndef EFFRIGCOLLECTION_H_ |
| 11 |
|
|
#define EFFRIGCOLLECTION_H_ |
| 12 |
|
|
|
| 13 |
pam-fi |
1.6 |
#include "../BinnedEffCollection/BinnedEffCollection.h" |
| 14 |
pam-fi |
1.1 |
|
| 15 |
pam-fi |
1.6 |
/*! @brief A rigidity binned efficiency collection |
| 16 |
pam-fi |
1.1 |
* |
| 17 |
pam-fi |
1.6 |
* This class inherits from #BinnedEffCollection: it only implements the #GetBinValue method |
| 18 |
|
|
* to return event rigidity with sign. |
| 19 |
pam-fi |
1.1 |
* |
| 20 |
|
|
* NOTE: to divide the events in rigidity bins, a physical track is required from which the |
| 21 |
|
|
* rigidity can be calculated. It is MANDATORY to add a #TrkPhSinCut object to the selection |
| 22 |
|
|
* cuts, to avoid problems when computing rigidity (it will be done if the event survives the |
| 23 |
|
|
* selection cuts, so a #TrkPhSinCut in selection cuts will ensure a physical track being present |
| 24 |
|
|
* at the moment of rigidity computation). |
| 25 |
|
|
* |
| 26 |
|
|
*/ |
| 27 |
pam-fi |
1.6 |
class EffRigCollection: public BinnedEffCollection { |
| 28 |
pam-fi |
1.1 |
|
| 29 |
|
|
public: |
| 30 |
|
|
|
| 31 |
|
|
/*! @brief Constructor. |
| 32 |
|
|
* |
| 33 |
pam-fi |
1.3 |
* @param collectionName The collection's name. The graph in the ROOT output will have the same name, so be |
| 34 |
|
|
* careful to name the collection respecting the C++ rules for the names of the variables |
| 35 |
|
|
* (eg. don't use - in the name) otherwise the graph will be unusable. |
| 36 |
pam-fi |
1.1 |
* @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection |
| 37 |
pam-fi |
1.4 |
* with the total efficiency, plus a similar file (named outFileBase + collection's name + "-rig.txt") |
| 38 |
|
|
* with a row for each rigidity bin. At the beginning of each row there will be two additional columns |
| 39 |
|
|
* with the edges of the bin. Additionally, a ROOT file (outFileBase + collection's name +"-rig.root") |
| 40 |
|
|
* will be produced, containing the efficiency graph. |
| 41 |
pam-fi |
1.1 |
* @param rigBinsFile The file with the rigidity bins. |
| 42 |
pam-fi |
1.5 |
* @param errMethod The method to use for error computation. Possible values are defined in #EffCollection_ErrMethod. |
| 43 |
|
|
* @param owns If true, the collection will own the cuts and the actions, ie., it will |
| 44 |
|
|
* destroy them in its destructor. |
| 45 |
pam-fi |
1.1 |
*/ |
| 46 |
pam-fi |
1.3 |
EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", int errMethod = |
| 47 |
pam-fi |
1.7 |
EFFERR_SERGIO, bool owns = true); |
| 48 |
pam-fi |
1.1 |
|
| 49 |
|
|
/*! @brief Destructor. */ |
| 50 |
|
|
~EffRigCollection() { |
| 51 |
|
|
|
| 52 |
|
|
} |
| 53 |
|
|
|
| 54 |
pam-fi |
1.6 |
/*! @brief The value of binning parameter (rigidity). |
| 55 |
pam-fi |
1.1 |
* |
| 56 |
pam-fi |
1.6 |
* @param event The current event. |
| 57 |
|
|
* @return The rigidity (with sign) of current event. |
| 58 |
pam-fi |
1.1 |
*/ |
| 59 |
pam-fi |
1.6 |
float GetBinValue(PamLevel2 *event); |
| 60 |
pam-fi |
1.1 |
}; |
| 61 |
|
|
|
| 62 |
|
|
#endif /* EFFRIGCOLLECTION_H_ */ |