1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TofDedxVsBetaHistoAction.h |
3 |
|
|
* |
4 |
|
|
* Created on: 25-giu-2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TofDedxVsBetaHistoAction.h The TofDedxVsBetaHistoAction class declaration file. */ |
9 |
|
|
|
10 |
|
|
#ifndef TOFDEDXVSBETAHISTOACTION_H_ |
11 |
|
|
#define TOFDEDXVSBETAHISTOACTION_H_ |
12 |
|
|
|
13 |
|
|
#include "../Histo2DAction/Histo2DAction.h" |
14 |
|
|
|
15 |
|
|
/*! @brief An action that fills a TOF dE/dx Vs Beta histogram. */ |
16 |
|
|
class TofDedxVsBetaHistoAction: public Histo2DAction<Int_t> { |
17 |
|
|
public: |
18 |
|
|
|
19 |
|
|
/*! @brief Constructor. |
20 |
|
|
* |
21 |
|
|
* @param actionName The action's name. |
22 |
|
|
* @param layers The layers from which dE/dx is measured. See #TOFLAYERS. If combinations like |
23 |
|
|
* S11+S12 are used, the mean dE/dx will be used. |
24 |
|
|
* @param standAlone If true, the standalone TOF track will be used to compute beta; otherwise |
25 |
|
|
* the track associated to the physical track will be used. |
26 |
|
|
* @param outFileBase The file base name for the ROOT histogram output (".root" will be appended). |
27 |
|
|
* If "", no ROOT output will be produced. |
28 |
|
|
* @param mode The mode of ROOT file creation (see documentation of TFile constructor |
29 |
|
|
* in ROOT's reference guide). |
30 |
|
|
* @param outRoot If true, an output ROOT file named outFileBase + ".root" will be produced. |
31 |
|
|
* @param outText If true, an output text file named outFileBase + ".txt" will be produced. It will overwrite an |
32 |
|
|
* eventually existing file with the same name. |
33 |
|
|
* @param title The ROOT histogram title. If "", the constructor will create a title based on the layers parameter. |
34 |
|
|
*/ |
35 |
|
|
TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone = true, TString outFileBase = |
36 |
|
|
"", TString mode = "UPDATE", bool outRoot = true, bool outText = true, TString title = ""); |
37 |
|
|
|
38 |
|
|
/*! @brief Destructor. */ |
39 |
|
|
~TofDedxVsBetaHistoAction() { |
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 |
|
|
unsigned int GetNBadEvents() { |
49 |
|
|
return _badEvents; |
50 |
|
|
} |
51 |
|
|
private: |
52 |
|
|
|
53 |
|
|
unsigned int _layers; |
54 |
|
|
unsigned int _nLayers; |
55 |
|
|
unsigned int _badEvents; |
56 |
|
|
bool _standAlone; |
57 |
|
|
|
58 |
|
|
}; |
59 |
|
|
#endif /* TOFDEDXVSBETAHISTOACTION_H_ */ |