/* * EffRigCollection.h * * Created on: 12/ago/2009 * Author: Nicola Mori */ /*! @file EffRigCollection.h The EffRigCollection class definition file. */ #ifndef EFFRIGCOLLECTION_H_ #define EFFRIGCOLLECTION_H_ #include "../EffCollection/EffCollection.h" /*! @brief A rigidity-binned efficiency collection * * This class inherits from #EffCollection: it has selection and detector4 cuts and actions, and it * computes and saves the integrated detector efficiency. Plus, it will compute and save the efficiency * for each rigidity bin given to the constructor. * * NOTE: to divide the events in rigidity bins, a physical track is required from which the * rigidity can be calculated. It is MANDATORY to add a #TrkPhSinCut object to the selection * cuts, to avoid problems when computing rigidity (it will be done if the event survives the * selection cuts, so a #TrkPhSinCut in selection cuts will ensure a physical track being present * at the moment of rigidity computation). * */ class EffRigCollection: public EffCollection { public: /*! @brief Constructor. * * @param collectionName The collection's name. * @param outFileBase The output file base name. It will produce the same file as the parent class #EffCollection * with the total efficiency, plus a similar file (named outFileBase + "-eff-rig.txt") with a * row for each rigidity bin. * @param rigBinsFile The file with the rigidity bins. * @param absRig If true, the absolute rigidity of the selected events will be considered.. */ EffRigCollection(const char *collectionName, TString outFileBase = "", TString rigBinsFile = "", bool absRig = false); /*! @brief Destructor. */ ~EffRigCollection() { } /*! @brief Applies the selection and detector cuts to the current event. * * @param event The event to analyze. * @return CUTOK if the event survives all the selection and detector cuts. */ int ApplyCut(PamLevel2 *event); /*! @brief The post analysis task. * */ void Finalize(); private: bool _absRig; vector _bins; vector _selVector; vector _detVector; unsigned int _outUp, _outDown; }; #endif /* EFFRIGCOLLECTION_H_ */