| 1 | pam-fi | 1.1 | /* | 
| 2 |  |  | * TrkDedxVsRigHistoAction.h | 
| 3 |  |  | * | 
| 4 |  |  | *  Created on: 9-giu-2009 | 
| 5 |  |  | *      Author: Nicola Mori | 
| 6 |  |  | */ | 
| 7 |  |  |  | 
| 8 |  |  | /*! @file TrkDedxVsRigHistoAction.h The TrkDedxVsRigHistoAction class declaration file. */ | 
| 9 |  |  |  | 
| 10 |  |  | #include "../CollectionAction/CollectionAction.h" | 
| 11 |  |  | #include <TH2F.h> | 
| 12 |  |  |  | 
| 13 |  |  | #ifndef TRKDEDXVSRIGHISTOACTION_H_ | 
| 14 |  |  | #define TRKDEDXVSRIGHISTOACTION_H_ | 
| 15 |  |  |  | 
| 16 | pam-fi | 1.2 | /*! @brief An action that fills a TRK dE/dx Vs rigidity histogram. */ | 
| 17 | pam-fi | 1.1 | class TrkDedxVsRigHistoAction: public CollectionAction { | 
| 18 |  |  | public: | 
| 19 |  |  |  | 
| 20 |  |  | /*! @brief Constructor. | 
| 21 |  |  | * * | 
| 22 |  |  | * @param actionName The action's name. | 
| 23 |  |  | * @param outFileName The output file name. | 
| 24 |  |  | * @param mode The mode of ROOT file creation (see documentation of TFile constructor | 
| 25 |  |  | *             in ROOT's reference guide). | 
| 26 | pam-fi | 1.3 | * @param logBinningR If true, the rigidity axis will be binned logarithmically. | 
| 27 | pam-fi | 1.1 | * @param minDedx The lower limit for dE/dx axis (in MIP). | 
| 28 | pam-fi | 1.2 | * @param maxDedx The upper limit for dE/dx axis (in MIP). | 
| 29 | pam-fi | 1.1 | * @param nBinsDedx The number of dE/dx bins. | 
| 30 |  |  | * @param minR The lower limit for rigidity axis (in GV). | 
| 31 |  |  | * @param maxR The upper limit for rigidity axis (in GV). | 
| 32 |  |  | * @param nBinsR The number of rigidity bins. | 
| 33 |  |  | */ | 
| 34 | pam-fi | 1.3 | TrkDedxVsRigHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE", bool logBinningR = | 
| 35 |  |  | false, float minDedx = 0., float maxDedx = 50., unsigned int nBinsDedx = 100, float minR = -100., float maxR = | 
| 36 |  |  | 100., unsigned int nBinsR = 100); | 
| 37 | pam-fi | 1.1 |  | 
| 38 |  |  | /*! @brief Destructor. */ | 
| 39 |  |  | ~TrkDedxVsRigHistoAction() { | 
| 40 |  |  | } | 
| 41 |  |  |  | 
| 42 |  |  | /*! @brief Fills histogram with the selected event. | 
| 43 |  |  | * | 
| 44 |  |  | * @param event The selected event. | 
| 45 |  |  | */ | 
| 46 |  |  | void OnGood(PamLevel2 *event); | 
| 47 |  |  |  | 
| 48 |  |  | /*! @brief Writes the histogram to the output ROOT file.*/ | 
| 49 |  |  | void Finalize(); | 
| 50 |  |  | private: | 
| 51 |  |  |  | 
| 52 |  |  | TString _outFileName; | 
| 53 |  |  | TH2F _histo; | 
| 54 |  |  | TString _mode; | 
| 55 |  |  |  | 
| 56 |  |  | }; | 
| 57 |  |  | #endif /* TRKDEDXVSRIGHISTOACTION_H_ */ |