1 |
/* |
2 |
* ChargeHistosAction.h |
3 |
* |
4 |
* Created on: 17-mag-2009 |
5 |
* Author: Nicola Mori |
6 |
*/ |
7 |
|
8 |
/*! @file ChargeHistosAction.h The ChargeHistosAction class declaration file */ |
9 |
|
10 |
#ifndef CHARGEHISTOSACTION_H_ |
11 |
#define CHARGEHISTOSACTION_H_ |
12 |
|
13 |
#include "TH1.h" |
14 |
#include "TH2.h" |
15 |
|
16 |
#ifndef NO_TOFNUCLEI |
17 |
#include <ToFNuclei.h> |
18 |
#endif |
19 |
|
20 |
#ifndef NO_CALONUCLEI |
21 |
#include <CaloNuclei.h> |
22 |
#endif |
23 |
|
24 |
#ifndef NO_TRKNUCLEI |
25 |
#include <TrkNuclei.h> |
26 |
#endif |
27 |
|
28 |
#include "../CollectionAction/CollectionAction.h" |
29 |
|
30 |
/*! @brief An action that fills some charge histograms. |
31 |
* |
32 |
* This class uses ToFNuclei, TrkNuclei and CaloNuclei to compute the charge |
33 |
* of the particle and fills various histograms. Note that if the Nuclei routines |
34 |
* are not available in the environment it is possible to exclude the corresponding |
35 |
* code by passing the appropriate flags to the compiler (see the EXCLUDEFLAGS |
36 |
* variable in the PamCut's makefile). |
37 |
* Currently, filled histograms are: |
38 |
* - charge from TrkNuclei (Siegen method); |
39 |
* - charge from CaloNuclei (first plane dE/dx Vs. beta); |
40 |
* - charge from each ToF layer (dE/dx Vs. beta); |
41 |
* - charge correlation for each pair of ToF layers. |
42 |
*/ |
43 |
class ChargeHistosAction: public CollectionAction { |
44 |
|
45 |
public: |
46 |
/*! @brief Constructor. |
47 |
* |
48 |
* @param actionName The action's name. |
49 |
* @param outFileName The output ROOT file name. |
50 |
* @param mode The mode of file creation (see documentation of TFile constructor |
51 |
* in ROOT's reference guide) |
52 |
*/ |
53 |
ChargeHistosAction(const char *actionName, TString outFileName, TString mode = "UPDATE"); |
54 |
|
55 |
/*! @brief Destructor. */ |
56 |
~ChargeHistosAction(); |
57 |
|
58 |
/*! @brief The histogram filling method. |
59 |
* |
60 |
* This routine fills the charge histograms for the selected event. |
61 |
* @param event The selected event. |
62 |
*/ |
63 |
void OnGood(PamLevel2 *event); |
64 |
|
65 |
/*! @brief Saves the histograms and closes the file. */ |
66 |
void Finalize(); |
67 |
|
68 |
private: |
69 |
|
70 |
#ifndef NO_TOFNUCLEI |
71 |
ToFNuclei *_tofNuclei; |
72 |
|
73 |
TH1F _chargeS11; |
74 |
TH1F _chargeS12; |
75 |
TH1F _chargeS21; |
76 |
TH1F _chargeS22; |
77 |
TH1F _chargeS31; |
78 |
TH1F _chargeS32; |
79 |
|
80 |
TH2F _chCorrS11S12; |
81 |
TH2F _chCorrS11S21; |
82 |
TH2F _chCorrS11S22; |
83 |
TH2F _chCorrS11S31; |
84 |
TH2F _chCorrS11S32; |
85 |
TH2F _chCorrS12S21; |
86 |
TH2F _chCorrS12S22; |
87 |
TH2F _chCorrS12S31; |
88 |
TH2F _chCorrS12S32; |
89 |
TH2F _chCorrS21S22; |
90 |
TH2F _chCorrS21S31; |
91 |
TH2F _chCorrS21S32; |
92 |
TH2F _chCorrS22S31; |
93 |
TH2F _chCorrS22S32; |
94 |
TH2F _chCorrS31S32; |
95 |
#endif |
96 |
|
97 |
#ifndef NO_CALONUCLEI |
98 |
CaloNuclei *_caloNuclei; |
99 |
TH1F _chargeCalo; |
100 |
#endif |
101 |
|
102 |
#ifndef NO_TRKNUCLEI |
103 |
TrkNuclei *_trkNuclei; |
104 |
TH1F _chargeTrk; |
105 |
#endif |
106 |
|
107 |
TString _outFileName; |
108 |
TString _mode; |
109 |
|
110 |
}; |
111 |
|
112 |
#endif /* CHARGEHISTOSACTION_H_ */ |