| 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 |
#include "../BinnedEffCollection/BinnedEffCollection.h" |
| 14 |
|
| 15 |
/*! @brief A rigidity binned efficiency collection |
| 16 |
* |
| 17 |
* This class inherits from #BinnedEffCollection: it only implements the #GetBinValue method |
| 18 |
* to return event rigidity with sign. |
| 19 |
* |
| 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 |
class EffRigCollection: public BinnedEffCollection { |
| 28 |
|
| 29 |
public: |
| 30 |
|
| 31 |
/*! @brief Constructor. |
| 32 |
* |
| 33 |
* @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 |
* @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection |
| 37 |
* 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 |
* @param rigBinsFile The file with the rigidity bins. |
| 42 |
* @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 |
*/ |
| 46 |
EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", int errMethod = |
| 47 |
EFFERR_SERGIO, bool owns = true); |
| 48 |
|
| 49 |
/*! @brief Destructor. */ |
| 50 |
~EffRigCollection() { |
| 51 |
|
| 52 |
} |
| 53 |
|
| 54 |
/*! @brief The value of binning parameter (rigidity). |
| 55 |
* |
| 56 |
* @param event The current event. |
| 57 |
* @return The rigidity (with sign) of current event. |
| 58 |
*/ |
| 59 |
float GetBinValue(PamLevel2 *event); |
| 60 |
}; |
| 61 |
|
| 62 |
#endif /* EFFRIGCOLLECTION_H_ */ |