/* * CaloDedxVsBetaHistoAction.h * * Created on: 03/ago/2009 * Author: Nicola Mori */ /*! @file CaloDedxVsBetaHistoAction.h The CaloDedxVsBetaHistoAction class declaration file. */ #ifndef CALODEDXVSBETAHISTOACTION_H_ #define CALODEDXVSBETAHISTOACTION_H_ #include "../CollectionAction/CollectionAction.h" #include /*! @brief An action that fills a CALO dE/dx Vs beta (from TOF) histogram. */ class CaloDedxVsBetaHistoAction: public CollectionAction { public: /*! @brief Constructor. * * * @param actionName The action's name. * @param outFileName The output file name. * @param plane The plane from which dE/dx is retrieved (range: [0,21]). * @param view The view to use ( 0 = X, 1 = Y). * @param mode The mode of ROOT file creation (see documentation of TFile constructor * in ROOT's reference guide). * @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 minBeta The lower limit for beta axis. * @param maxBeta The upper limit for beta axis. * @param nBinsBeta The number of beta bins. */ CaloDedxVsBetaHistoAction(const char *actionName, TString outFileName, unsigned int plane, unsigned int view, TString mode = "UPDATE", float minDedx = 0., float maxDedx = 50., unsigned int nBinsDedx = 100, float minBeta = 0., float maxBeta = 2., unsigned int nBinsBeta = 100); /*! @brief Destructor. */ ~CaloDedxVsBetaHistoAction() { } /*! @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(); /*! Returns the number of bad events. * * Bad events are those events for which no valid dE/dx information (dE/dx > 0 && dE/dx < 4090) * can be found for any layer. */ /*unsigned int GetNBadEvents() { return _badEvents; }*/ private: TString _outFileName; unsigned int _plane; unsigned int _view; TH2F _histo; TString _mode; }; #endif /* CALODEDXVSBETAHISTOACTION_H_ */