| 1 |
/* |
| 2 |
* TrkDedxVsBetaHistoAction.h |
| 3 |
* |
| 4 |
* Created on: 18-feb-2010 |
| 5 |
* Author: Nicola Mori |
| 6 |
*/ |
| 7 |
|
| 8 |
/*! @file TrkDedxVsBetaHistoAction.h The TrkDedxVsBetaHistoAction class declaration file. */ |
| 9 |
|
| 10 |
#include "../Histo2DAction/Histo2DAction.h" |
| 11 |
|
| 12 |
#ifndef TRKDEDXVSBETAHISTOACTION_H_ |
| 13 |
#define TRKDEDXVSBETAHISTOACTION_H_ |
| 14 |
|
| 15 |
/*! @enum WHICHBETA Aliases to select which beta to use in TrkDedxVsBetaHistoAction. */ |
| 16 |
enum WHICHBETA { |
| 17 |
BETA12, BETA12_STANDALONE, BETABEST, BETABEST_STANDALONE |
| 18 |
}; |
| 19 |
|
| 20 |
/*! @brief An action that fills a TRK dE/dx Vs beta histogram. |
| 21 |
* |
| 22 |
* beta can be recomputed by using the appropriate input parameters of the constructor |
| 23 |
*/ |
| 24 |
class TrkDedxVsBetaHistoAction: public Histo2DAction<Int_t> { |
| 25 |
public: |
| 26 |
|
| 27 |
/*! @brief Constructor. |
| 28 |
* |
| 29 |
* @param actionName The action's name. |
| 30 |
* @param outFileBase The file base name for the ROOT histogram output (".root" will be appended). |
| 31 |
* If "", no ROOT output will be produced. |
| 32 |
* @param mode The mode of ROOT file creation (see documentation of TFile constructor |
| 33 |
* in ROOT's reference guide). |
| 34 |
* @param whichBeta the beta to use. Actually BETA12 and BETABEST are supported. |
| 35 |
* @param outRoot If true, an output ROOT file named outFileBase + ".root" will be produced. |
| 36 |
* @param outText If true, an output text file named outFileBase + ".txt" will be produced. It will overwrite an |
| 37 |
* eventually existing file with the same name. |
| 38 |
* @param title The ROOT histogram title. |
| 39 |
*/ |
| 40 |
TrkDedxVsBetaHistoAction(const char *actionName, TString outFileBase = "", TString mode = "UPDATE", int whichBeta = |
| 41 |
BETA12, bool outRoot = true, bool outText = true, |
| 42 |
TString title = "TRK dE/dx Vs. #beta"); |
| 43 |
|
| 44 |
/*! @brief Destructor. */ |
| 45 |
~TrkDedxVsBetaHistoAction() { |
| 46 |
} |
| 47 |
|
| 48 |
/*! @brief Fills histogram with the selected event. |
| 49 |
* |
| 50 |
* @param event The selected event. |
| 51 |
*/ |
| 52 |
void OnGood(PamLevel2 *event); |
| 53 |
|
| 54 |
private: |
| 55 |
|
| 56 |
int _whichBeta; |
| 57 |
|
| 58 |
}; |
| 59 |
#endif /* TRKDEDXVSBETAHISTOACTION_H_ */ |