1 |
/* |
2 |
* MassVsRigHistoAction.h |
3 |
* |
4 |
* Created on: 28-marth-2010 |
5 |
* Author: Vitaly Malakhov |
6 |
*/ |
7 |
|
8 |
/*! @file MassVsRigHistoAction.h The MassVsRigHistoAction class declaration file. */ |
9 |
|
10 |
#include "../Histo2DAction/Histo2DAction.h" |
11 |
|
12 |
#ifndef MASSVSRIGHISTOACTION_H_ |
13 |
#define MASSVSRIGHISTOACTION_H_ |
14 |
|
15 |
/*! @brief An action that fills a Mass of particle Vs its Rigidity and builds 1D-Mass histoggrams which |
16 |
* cuts it for rigidities given in an acording file. Mass calculated using input parameter Z. |
17 |
* |
18 |
*/ |
19 |
|
20 |
class MassVsRigHistoAction: public Histo2DAction<Int_t> { |
21 |
public: |
22 |
|
23 |
/*! @brief Constructor. |
24 |
* |
25 |
* @param actionName The action's name. |
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. |
34 |
* @param Z Charge of particle, necessary for calulating mass. |
35 |
* @param rigBinFile File included binning for rigidity cut view 1D-Mass histogramm. Uses in finalize function. |
36 |
*/ |
37 |
MassVsRigHistoAction(const char *actionName, TString outFileBase = "", TString mode = "UPDATE", bool outRoot = true, bool outText = true, TString title = "Mass Vs. Rigidity", Int_t Z = 1, TString rigBinFile = ""); |
38 |
|
39 |
/*! @brief Destructor. */ |
40 |
~MassVsRigHistoAction() { |
41 |
} |
42 |
|
43 |
/*! @brief Fills histogram with the selected event. |
44 |
* |
45 |
* @param event The selected event. |
46 |
*/ |
47 |
void OnGood(PamLevel2 *event); |
48 |
|
49 |
/*! @brief Cuts Mass vs Rigidity 2D histogram into 1D Mass histogramms for rigidity range given in _rigBinFile. |
50 |
* |
51 |
*/ |
52 |
void Finalize(); |
53 |
|
54 |
private: |
55 |
|
56 |
Int_t _Z; |
57 |
vector<TH1F> _fixedRigHisto; |
58 |
vector<Float_t> _xRBins; |
59 |
TString _rigBinFile; |
60 |
|
61 |
}; |
62 |
#endif /* MASSVSRIGHISTOACTION_H_ */ |