/* * TrkDedxVsRigHistoAction.h * * Created on: 9-giu-2009 * Author: Nicola Mori */ /*! @file TrkDedxVsRigHistoAction.h The TrkDedxVsRigHistoAction class declaration file. */ #include "../CollectionAction/CollectionAction.h" #include #ifndef TRKDEDXVSRIGHISTOACTION_H_ #define TRKDEDXVSRIGHISTOACTION_H_ /*! @brief An action that fills a TRK dE/dx Vs rigidity histogram. */ class TrkDedxVsRigHistoAction: public CollectionAction { public: /*! @brief Constructor. * * * @param actionName The action's name. * @param outFileName The output file name. * @param mode The mode of ROOT file creation (see documentation of TFile constructor * in ROOT's reference guide). * @param logBinningR If true, the rigidity axis will be binned logarithmically. * @param minDedx The lower limit for dE/dx axis (in MIP). * @param maxDedx The upper limit for dE/dx axis (in MIP). * @param nBinsDedx The number of dE/dx bins. * @param minR The lower limit for rigidity axis (in GV). * @param maxR The upper limit for rigidity axis (in GV). * @param nBinsR The number of rigidity bins. */ TrkDedxVsRigHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE", bool logBinningR = false, float minDedx = 0., float maxDedx = 50., unsigned int nBinsDedx = 100, float minR = -100., float maxR = 100., unsigned int nBinsR = 100); /*! @brief Destructor. */ ~TrkDedxVsRigHistoAction() { } /*! @brief Fills histogram with the selected event. * * @param event The selected event. */ void OnGood(PamLevel2 *event); /*! @brief Writes the histogram to the output ROOT file.*/ void Finalize(); private: TString _outFileName; TH2F _histo; TString _mode; }; #endif /* TRKDEDXVSRIGHISTOACTION_H_ */