]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AliFMDMCDensityCalculator.h
Fixed references from PWG2 -> PWGLF - very efficiently done using ETags.
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDMCDensityCalculator.h
CommitLineData
7984e5f7 1//
2// This class calculates the inclusive charged particle density
3// in each for the 5 FMD rings based on the MC truth.
4//
68d11054 5#ifndef ALIFMDMCDENSITYCALCULATOR_H
6#define ALIFMDMCDENSITYCALCULATOR_H
ffca499d 7/**
8 * @file AliFMDMCDensityCalculator.h
9 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
10 * @date Wed Mar 23 14:03:27 2011
11 *
12 * @brief
13 *
14 *
bd6f5206 15 * @ingroup pwglf_forward_aod
ffca499d 16 */
0bd4b00f 17#include "AliFMDDensityCalculator.h"
18#include <TList.h>
19#include "AliForwardUtil.h"
20class AliMCEvent;
68d11054 21class TH2;
0bd4b00f 22class TH2D;
68d11054 23class TProfile2D;
0bd4b00f 24
25/**
26 * This class calculates the inclusive charged particle density
27 * in each for the 5 FMD rings based on the MC truth.
28 *
29 * @par Input:
30 * - AliMCEvent MC truth event infromation
31 *
32 * @par Output:
33 * - None
34 *
35 * @par Corrections used:
36 * - None
37 *
bd6f5206 38 * @ingroup pwglf_forward_algo
39 * @ingroup pwglf_forward_mc
40 * @ingroup pwglf_forward_aod
0bd4b00f 41 */
42class AliFMDMCDensityCalculator : public AliFMDDensityCalculator
43{
44public:
45 /**
46 * Constructor
47 */
68d11054 48 AliFMDMCDensityCalculator()
49 : AliFMDDensityCalculator(),
50 fFMD1i(0),
51 fFMD2i(0),
52 fFMD2o(0),
53 fFMD3i(0),
54 fFMD3o(0),
55 fFMD1iC(0),
56 fFMD2iC(0),
57 fFMD2oC(0),
58 fFMD3iC(0),
59 fFMD3oC(0),
c6d6aa81 60 fFMD1iD(0),
61 fFMD2iD(0),
62 fFMD2oD(0),
63 fFMD3iD(0),
64 fFMD3oD(0),
68d11054 65 fComps(0)
66 {}
0bd4b00f 67 /**
68 * Constructor
69 *
70 * @param name Name of object
71 */
72 AliFMDMCDensityCalculator(const char* name)
68d11054 73 : AliFMDDensityCalculator(name),
74 fFMD1i(0),
75 fFMD2i(0),
76 fFMD2o(0),
77 fFMD3i(0),
78 fFMD3o(0),
79 fFMD1iC(0),
80 fFMD2iC(0),
81 fFMD2oC(0),
82 fFMD3iC(0),
83 fFMD3oC(0),
c6d6aa81 84 fFMD1iD(0),
85 fFMD2iD(0),
86 fFMD2oD(0),
87 fFMD3iD(0),
88 fFMD3oD(0),
68d11054 89 fComps(0)
0bd4b00f 90 {}
91 /**
92 * Copy constructor
93 *
94 * @param o Object to copy from
95 */
96 AliFMDMCDensityCalculator(const AliFMDMCDensityCalculator& o)
68d11054 97 : AliFMDDensityCalculator(o) ,
98 fFMD1i(o.fFMD1i),
99 fFMD2i(o.fFMD2i),
100 fFMD2o(o.fFMD2o),
101 fFMD3i(o.fFMD3i),
102 fFMD3o(o.fFMD3o),
103 fFMD1iC(o.fFMD1iC),
104 fFMD2iC(o.fFMD2iC),
105 fFMD2oC(o.fFMD2oC),
106 fFMD3iC(o.fFMD3iC),
107 fFMD3oC(o.fFMD3oC),
c6d6aa81 108 fFMD1iD(o.fFMD1iD),
109 fFMD2iD(o.fFMD2iD),
110 fFMD2oD(o.fFMD2oD),
111 fFMD3iD(o.fFMD3iD),
112 fFMD3oD(o.fFMD3oD),
68d11054 113 fComps(0)
0bd4b00f 114 {}
115 /**
116 * Destructor
117 */
68d11054 118 virtual ~AliFMDMCDensityCalculator();
0bd4b00f 119 /**
120 * Assignement operator
121 *
122 * @param o Object to assign from
123 *
124 * @return Reference to this object
125 */
7c1a1f1d 126 AliFMDMCDensityCalculator& operator=(const AliFMDMCDensityCalculator& o);
0bd4b00f 127 /**
68d11054 128 * Initialize this object
0bd4b00f 129 *
68d11054 130 * @param etaAxis Eta axis to use
0bd4b00f 131 */
68d11054 132 void Init(const TAxis& etaAxis);
0bd4b00f 133 /**
134 * Calculate the charged particle density from the MC track references.
135 *
ffca499d 136 * @param fmd FMD ESD event structure
0bd4b00f 137 * @param hists Histograms to fill
0bd4b00f 138 *
139 * @return true on success
140 */
68d11054 141 virtual Bool_t CalculateMC(const AliESDFMD& fmd,
142 AliForwardUtil::Histos& hists);
143
144 /**
145 * Compare the result of analysing the ESD for
146 * the inclusive charged particle density to analysing
147 * MC truth
148 *
149 * @param esd
150 * @param mc
151 *
152 * @return
153 */
154 virtual Bool_t CompareResults(AliForwardUtil::Histos& esd,
155 AliForwardUtil::Histos& mc);
156 /**
157 * Output diagnostic histograms to directory
158 *
159 * @param dir List to write in
160 */
161 void DefineOutput(TList* dir);
0bd4b00f 162protected:
68d11054 163 /**
164 * MAke comparison profiles
165 *
166 * @param d Detector
167 * @param r Ring
168 * @param axis Eta axis
169 *
170 * @return Newly allocated profile object
171 */
172 TProfile2D* Make(UShort_t d, Char_t r, const TAxis& axis) const;
173 /**
174 * MAke comparison profiles
175 *
176 * @param d Detector
177 * @param r Ring
178 *
179 * @return Newly allocated profile object
180 */
181 TH2D* Make(UShort_t d, Char_t r) const;
c6d6aa81 182 /**
c6115ede 183 * Make comparison profiles
c6d6aa81 184 *
185 * @param d Detector
186 * @param r Ring
c6115ede 187 * @param max Maximum
c6d6aa81 188 *
189 * @return Newly allocated profile object
190 */
191 TH1D* Make(UShort_t d, Char_t r, Int_t max) const;
68d11054 192 /**
193 * Fill comparison profiles
194 *
195 * @param d Detector
196 * @param r Ring
197 * @param esd ESD histogram
198 * @param mc MC histogram
199 */
200 void Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc);
201
202 TProfile2D* fFMD1i; // Comparison
203 TProfile2D* fFMD2i; // Comparison
204 TProfile2D* fFMD2o; // Comparison
205 TProfile2D* fFMD3i; // Comparison
206 TProfile2D* fFMD3o; // Comparison
207 TH2D* fFMD1iC; // Correlation in FMD1i
208 TH2D* fFMD2iC; // Correlation in FMD2i
209 TH2D* fFMD2oC; // Correlation in FMD2o
210 TH2D* fFMD3iC; // Correlation in FMD3i
211 TH2D* fFMD3oC; // Correlation in FMD3o
c6d6aa81 212 TH1D* fFMD1iD; // Correlation in FMD1i
213 TH1D* fFMD2iD; // Correlation in FMD2i
214 TH1D* fFMD2oD; // Correlation in FMD2o
215 TH1D* fFMD3iD; // Correlation in FMD3i
216 TH1D* fFMD3oD; // Correlation in FMD3o
68d11054 217 TList* fComps; // List of comparisons
0bd4b00f 218
219 ClassDef(AliFMDMCDensityCalculator,1); // Calculate Nch density
220};
221
222#endif
223// Local Variables:
224// mode: C++
225// End:
226