1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TofBetaVsTrkBetaHistoAction.h |
3 |
|
|
* |
4 |
|
|
* Created on: 15/set/2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TofBetaVsTrkBetaHistoAction.h The TofBetaVsTrkBetaHistoAction class declaration file. */ |
9 |
|
|
|
10 |
|
|
#ifndef TOFBETAVSTRKBETAHISTOACTION_H_ |
11 |
|
|
#define TOFBETAVSTRKBETAHISTOACTION_H_ |
12 |
|
|
|
13 |
|
|
#include "../Histo2DAction/Histo2DAction.h" |
14 |
|
|
|
15 |
|
|
/*! @brief An action that fills a Tof Beta Vs. Trk Beta histogram. |
16 |
|
|
* |
17 |
|
|
* Beta from TRK is obtained from rigidity by: |
18 |
|
|
* |
19 |
|
|
* Beta_trk = ( 1 / (1 + m^2/(ZR)^2) )^0.5 |
20 |
|
|
*/ |
21 |
|
|
class TofBetaVsTrkBetaHistoAction: public Histo2DAction<Int_t> { |
22 |
|
|
|
23 |
|
|
public: |
24 |
|
|
|
25 |
|
|
/*! @brief Constructor. |
26 |
|
|
* |
27 |
|
|
* @param actionName The action's name. |
28 |
|
|
* @param mass The particle's mass. |
29 |
|
|
* @param charge The absolute value of the particle's charge. |
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 outRoot If true, an output ROOT file named outFileBase + ".root" will be produced. |
35 |
|
|
* @param outText If true, an output text file named outFileBase + ".txt" will be produced. It will overwrite an |
36 |
|
|
* eventually existing file with the same name. |
37 |
|
|
* @param title The ROOT histogram title. |
38 |
|
|
*/ |
39 |
|
|
TofBetaVsTrkBetaHistoAction(const char *actionName, float mass, unsigned int charge, TString outFileBase = "", |
40 |
|
|
TString mode = "UPDATE", bool outRoot = true, bool outText = true, TString title = "TOF Beta Vs. TRK Beta"); |
41 |
|
|
|
42 |
|
|
/*! @brief Destructor */ |
43 |
|
|
~TofBetaVsTrkBetaHistoAction() { |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
/*! @brief Fills histogram with the selected event. |
47 |
|
|
* |
48 |
|
|
* @param event The selected event. |
49 |
|
|
*/ |
50 |
|
|
void OnGood(PamLevel2 *event); |
51 |
|
|
|
52 |
|
|
private: |
53 |
|
|
float _Z2; |
54 |
|
|
float _m2; |
55 |
|
|
}; |
56 |
|
|
#endif /* TOFBETAVSTRKBETAHISTOACTION_H_ */ |