| 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 |
|
|
* @param minDedx The lower limit for dE/dx axis (in MIP). |
| 27 |
pam-fi |
1.2 |
* @param maxDedx The upper limit for dE/dx axis (in MIP). |
| 28 |
pam-fi |
1.1 |
* @param nBinsDedx The number of dE/dx bins. |
| 29 |
|
|
* @param minR The lower limit for rigidity axis (in GV). |
| 30 |
|
|
* @param maxR The upper limit for rigidity axis (in GV). |
| 31 |
|
|
* @param nBinsR The number of rigidity bins. |
| 32 |
|
|
*/ |
| 33 |
|
|
TrkDedxVsRigHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE", float minDedx = 0., |
| 34 |
|
|
float maxDedx = 50., unsigned int nBinsDedx = 100, float minR = -100., float maxR = 100., unsigned int nBinsR = 100); |
| 35 |
|
|
|
| 36 |
|
|
/*! @brief Destructor. */ |
| 37 |
|
|
~TrkDedxVsRigHistoAction() { |
| 38 |
|
|
} |
| 39 |
|
|
|
| 40 |
|
|
/*! @brief Fills histogram with the selected event. |
| 41 |
|
|
* |
| 42 |
|
|
* @param event The selected event. |
| 43 |
|
|
*/ |
| 44 |
|
|
void OnGood(PamLevel2 *event); |
| 45 |
|
|
|
| 46 |
|
|
/*! @brief Writes the histogram to the output ROOT file.*/ |
| 47 |
|
|
void Finalize(); |
| 48 |
|
|
private: |
| 49 |
|
|
|
| 50 |
|
|
TString _outFileName; |
| 51 |
|
|
TH2F _histo; |
| 52 |
|
|
TString _mode; |
| 53 |
|
|
|
| 54 |
|
|
}; |
| 55 |
|
|
#endif /* TRKDEDXVSRIGHISTOACTION_H_ */ |