| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* TrkBetaPrVsTofBetaHistoAction.h |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 2009-06-05 |
| 5 |
|
|
* Author: S. Ricciarini |
| 6 |
|
|
*/ |
| 7 |
|
|
/*! @file TrkBetaPrVsTofBetaHistoAction.h The TrkBetaPrVsTofBetaHistoAction class declaration file. */ |
| 8 |
|
|
|
| 9 |
|
|
#ifndef TrkBetaPrVsTofBetaHISTOACTION_H_ |
| 10 |
|
|
#define TrkBetaPrVsTofBetaHISTOACTION_H_ |
| 11 |
|
|
|
| 12 |
|
|
#include "../CollectionAction/CollectionAction.h" |
| 13 |
|
|
#include <TH2F.h> |
| 14 |
|
|
|
| 15 |
|
|
/*! @brief An action that fills the histogram: TRK beta modulus (assuming proton) vs TOF beta modulus. |
| 16 |
|
|
*/ |
| 17 |
|
|
class TrkBetaPrVsTofBetaHistoAction: public CollectionAction { |
| 18 |
|
|
|
| 19 |
|
|
public: |
| 20 |
|
|
/*! @brief Constructor. |
| 21 |
|
|
* |
| 22 |
|
|
* @param actionName The action's name. |
| 23 |
pam-fi |
1.2 |
* @param outFileName The output file name. |
| 24 |
pam-fi |
1.1 |
* |
| 25 |
|
|
* @param mode The mode of file creation (see documentation of TFile constructor |
| 26 |
|
|
* in ROOT's reference guide) |
| 27 |
|
|
*/ |
| 28 |
|
|
|
| 29 |
|
|
TrkBetaPrVsTofBetaHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE"); |
| 30 |
|
|
|
| 31 |
|
|
/*! @brief Destructor */ |
| 32 |
|
|
~TrkBetaPrVsTofBetaHistoAction() { |
| 33 |
|
|
} |
| 34 |
|
|
|
| 35 |
|
|
/*! @brief Fills histogram with the selected event. |
| 36 |
|
|
* |
| 37 |
|
|
* @param event The selected event. |
| 38 |
|
|
*/ |
| 39 |
|
|
void OnGood(PamLevel2 *event); |
| 40 |
|
|
|
| 41 |
|
|
/*! @brief Writes the histogram to the output file. */ |
| 42 |
|
|
void Finalize(); |
| 43 |
|
|
|
| 44 |
|
|
private: |
| 45 |
|
|
|
| 46 |
|
|
TString _outFileName; |
| 47 |
|
|
TH2F _histo; |
| 48 |
|
|
TString _mode; |
| 49 |
|
|
|
| 50 |
|
|
}; |
| 51 |
|
|
|
| 52 |
|
|
#endif /* TrkBetaPrVsTofBetaHISTOACTION_H_ */ |