]>
Commit | Line | Data |
---|---|---|
68d11054 | 1 | #ifndef ALIFMDMCDENSITYCALCULATOR_H |
2 | #define ALIFMDMCDENSITYCALCULATOR_H | |
0bd4b00f | 3 | #include "AliFMDDensityCalculator.h" |
4 | #include <TList.h> | |
5 | #include "AliForwardUtil.h" | |
6 | class AliMCEvent; | |
68d11054 | 7 | class TH2; |
0bd4b00f | 8 | class TH2D; |
68d11054 | 9 | class TProfile2D; |
0bd4b00f | 10 | |
11 | /** | |
12 | * This class calculates the inclusive charged particle density | |
13 | * in each for the 5 FMD rings based on the MC truth. | |
14 | * | |
15 | * @par Input: | |
16 | * - AliMCEvent MC truth event infromation | |
17 | * | |
18 | * @par Output: | |
19 | * - None | |
20 | * | |
21 | * @par Corrections used: | |
22 | * - None | |
23 | * | |
68d11054 | 24 | * @ingroup pwg2_forward_algo |
25 | * @ingroup pwg2_forward_mc | |
0bd4b00f | 26 | */ |
27 | class AliFMDMCDensityCalculator : public AliFMDDensityCalculator | |
28 | { | |
29 | public: | |
30 | /** | |
31 | * Constructor | |
32 | */ | |
68d11054 | 33 | AliFMDMCDensityCalculator() |
34 | : AliFMDDensityCalculator(), | |
35 | fFMD1i(0), | |
36 | fFMD2i(0), | |
37 | fFMD2o(0), | |
38 | fFMD3i(0), | |
39 | fFMD3o(0), | |
40 | fFMD1iC(0), | |
41 | fFMD2iC(0), | |
42 | fFMD2oC(0), | |
43 | fFMD3iC(0), | |
44 | fFMD3oC(0), | |
45 | fComps(0) | |
46 | {} | |
0bd4b00f | 47 | /** |
48 | * Constructor | |
49 | * | |
50 | * @param name Name of object | |
51 | */ | |
52 | AliFMDMCDensityCalculator(const char* name) | |
68d11054 | 53 | : AliFMDDensityCalculator(name), |
54 | fFMD1i(0), | |
55 | fFMD2i(0), | |
56 | fFMD2o(0), | |
57 | fFMD3i(0), | |
58 | fFMD3o(0), | |
59 | fFMD1iC(0), | |
60 | fFMD2iC(0), | |
61 | fFMD2oC(0), | |
62 | fFMD3iC(0), | |
63 | fFMD3oC(0), | |
64 | fComps(0) | |
0bd4b00f | 65 | {} |
66 | /** | |
67 | * Copy constructor | |
68 | * | |
69 | * @param o Object to copy from | |
70 | */ | |
71 | AliFMDMCDensityCalculator(const AliFMDMCDensityCalculator& o) | |
68d11054 | 72 | : AliFMDDensityCalculator(o) , |
73 | fFMD1i(o.fFMD1i), | |
74 | fFMD2i(o.fFMD2i), | |
75 | fFMD2o(o.fFMD2o), | |
76 | fFMD3i(o.fFMD3i), | |
77 | fFMD3o(o.fFMD3o), | |
78 | fFMD1iC(o.fFMD1iC), | |
79 | fFMD2iC(o.fFMD2iC), | |
80 | fFMD2oC(o.fFMD2oC), | |
81 | fFMD3iC(o.fFMD3iC), | |
82 | fFMD3oC(o.fFMD3oC), | |
83 | fComps(0) | |
0bd4b00f | 84 | {} |
85 | /** | |
86 | * Destructor | |
87 | */ | |
68d11054 | 88 | virtual ~AliFMDMCDensityCalculator(); |
0bd4b00f | 89 | /** |
90 | * Assignement operator | |
91 | * | |
92 | * @param o Object to assign from | |
93 | * | |
94 | * @return Reference to this object | |
95 | */ | |
7c1a1f1d | 96 | AliFMDMCDensityCalculator& operator=(const AliFMDMCDensityCalculator& o); |
0bd4b00f | 97 | /** |
68d11054 | 98 | * Initialize this object |
0bd4b00f | 99 | * |
68d11054 | 100 | * @param etaAxis Eta axis to use |
0bd4b00f | 101 | */ |
68d11054 | 102 | void Init(const TAxis& etaAxis); |
0bd4b00f | 103 | /** |
104 | * Calculate the charged particle density from the MC track references. | |
105 | * | |
106 | * @param event MC event | |
107 | * @param hists Histograms to fill | |
108 | * @param vz Interaction z coordinate @f$ v_z@f$ | |
109 | * @param vtxBin bin corresponding to @f$ v_z@f$ | |
110 | * | |
111 | * @return true on success | |
112 | */ | |
68d11054 | 113 | virtual Bool_t CalculateMC(const AliESDFMD& fmd, |
114 | AliForwardUtil::Histos& hists); | |
115 | ||
116 | /** | |
117 | * Compare the result of analysing the ESD for | |
118 | * the inclusive charged particle density to analysing | |
119 | * MC truth | |
120 | * | |
121 | * @param esd | |
122 | * @param mc | |
123 | * | |
124 | * @return | |
125 | */ | |
126 | virtual Bool_t CompareResults(AliForwardUtil::Histos& esd, | |
127 | AliForwardUtil::Histos& mc); | |
128 | /** | |
129 | * Output diagnostic histograms to directory | |
130 | * | |
131 | * @param dir List to write in | |
132 | */ | |
133 | void DefineOutput(TList* dir); | |
0bd4b00f | 134 | protected: |
68d11054 | 135 | /** |
136 | * MAke comparison profiles | |
137 | * | |
138 | * @param d Detector | |
139 | * @param r Ring | |
140 | * @param axis Eta axis | |
141 | * | |
142 | * @return Newly allocated profile object | |
143 | */ | |
144 | TProfile2D* Make(UShort_t d, Char_t r, const TAxis& axis) const; | |
145 | /** | |
146 | * MAke comparison profiles | |
147 | * | |
148 | * @param d Detector | |
149 | * @param r Ring | |
150 | * | |
151 | * @return Newly allocated profile object | |
152 | */ | |
153 | TH2D* Make(UShort_t d, Char_t r) const; | |
154 | /** | |
155 | * Fill comparison profiles | |
156 | * | |
157 | * @param d Detector | |
158 | * @param r Ring | |
159 | * @param esd ESD histogram | |
160 | * @param mc MC histogram | |
161 | */ | |
162 | void Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc); | |
163 | ||
164 | TProfile2D* fFMD1i; // Comparison | |
165 | TProfile2D* fFMD2i; // Comparison | |
166 | TProfile2D* fFMD2o; // Comparison | |
167 | TProfile2D* fFMD3i; // Comparison | |
168 | TProfile2D* fFMD3o; // Comparison | |
169 | TH2D* fFMD1iC; // Correlation in FMD1i | |
170 | TH2D* fFMD2iC; // Correlation in FMD2i | |
171 | TH2D* fFMD2oC; // Correlation in FMD2o | |
172 | TH2D* fFMD3iC; // Correlation in FMD3i | |
173 | TH2D* fFMD3oC; // Correlation in FMD3o | |
174 | TList* fComps; // List of comparisons | |
0bd4b00f | 175 | |
176 | ClassDef(AliFMDMCDensityCalculator,1); // Calculate Nch density | |
177 | }; | |
178 | ||
179 | #endif | |
180 | // Local Variables: | |
181 | // mode: C++ | |
182 | // End: | |
183 |