]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliFMDMCDensityCalculator.h
Renamed script to add Central AOD task from
[u/mrichter/AliRoot.git] / PWG2 / 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 *
15 * @ingroup pwg2_forward_aod
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 *
68d11054 38 * @ingroup pwg2_forward_algo
39 * @ingroup pwg2_forward_mc
ffca499d 40 * @ingroup pwg2_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),
60 fComps(0)
61 {}
0bd4b00f 62 /**
63 * Constructor
64 *
65 * @param name Name of object
66 */
67 AliFMDMCDensityCalculator(const char* name)
68d11054 68 : AliFMDDensityCalculator(name),
69 fFMD1i(0),
70 fFMD2i(0),
71 fFMD2o(0),
72 fFMD3i(0),
73 fFMD3o(0),
74 fFMD1iC(0),
75 fFMD2iC(0),
76 fFMD2oC(0),
77 fFMD3iC(0),
78 fFMD3oC(0),
79 fComps(0)
0bd4b00f 80 {}
81 /**
82 * Copy constructor
83 *
84 * @param o Object to copy from
85 */
86 AliFMDMCDensityCalculator(const AliFMDMCDensityCalculator& o)
68d11054 87 : AliFMDDensityCalculator(o) ,
88 fFMD1i(o.fFMD1i),
89 fFMD2i(o.fFMD2i),
90 fFMD2o(o.fFMD2o),
91 fFMD3i(o.fFMD3i),
92 fFMD3o(o.fFMD3o),
93 fFMD1iC(o.fFMD1iC),
94 fFMD2iC(o.fFMD2iC),
95 fFMD2oC(o.fFMD2oC),
96 fFMD3iC(o.fFMD3iC),
97 fFMD3oC(o.fFMD3oC),
98 fComps(0)
0bd4b00f 99 {}
100 /**
101 * Destructor
102 */
68d11054 103 virtual ~AliFMDMCDensityCalculator();
0bd4b00f 104 /**
105 * Assignement operator
106 *
107 * @param o Object to assign from
108 *
109 * @return Reference to this object
110 */
7c1a1f1d 111 AliFMDMCDensityCalculator& operator=(const AliFMDMCDensityCalculator& o);
0bd4b00f 112 /**
68d11054 113 * Initialize this object
0bd4b00f 114 *
68d11054 115 * @param etaAxis Eta axis to use
0bd4b00f 116 */
68d11054 117 void Init(const TAxis& etaAxis);
0bd4b00f 118 /**
119 * Calculate the charged particle density from the MC track references.
120 *
ffca499d 121 * @param fmd FMD ESD event structure
0bd4b00f 122 * @param hists Histograms to fill
0bd4b00f 123 *
124 * @return true on success
125 */
68d11054 126 virtual Bool_t CalculateMC(const AliESDFMD& fmd,
127 AliForwardUtil::Histos& hists);
128
129 /**
130 * Compare the result of analysing the ESD for
131 * the inclusive charged particle density to analysing
132 * MC truth
133 *
134 * @param esd
135 * @param mc
136 *
137 * @return
138 */
139 virtual Bool_t CompareResults(AliForwardUtil::Histos& esd,
140 AliForwardUtil::Histos& mc);
141 /**
142 * Output diagnostic histograms to directory
143 *
144 * @param dir List to write in
145 */
146 void DefineOutput(TList* dir);
0bd4b00f 147protected:
68d11054 148 /**
149 * MAke comparison profiles
150 *
151 * @param d Detector
152 * @param r Ring
153 * @param axis Eta axis
154 *
155 * @return Newly allocated profile object
156 */
157 TProfile2D* Make(UShort_t d, Char_t r, const TAxis& axis) const;
158 /**
159 * MAke comparison profiles
160 *
161 * @param d Detector
162 * @param r Ring
163 *
164 * @return Newly allocated profile object
165 */
166 TH2D* Make(UShort_t d, Char_t r) const;
167 /**
168 * Fill comparison profiles
169 *
170 * @param d Detector
171 * @param r Ring
172 * @param esd ESD histogram
173 * @param mc MC histogram
174 */
175 void Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc);
176
177 TProfile2D* fFMD1i; // Comparison
178 TProfile2D* fFMD2i; // Comparison
179 TProfile2D* fFMD2o; // Comparison
180 TProfile2D* fFMD3i; // Comparison
181 TProfile2D* fFMD3o; // Comparison
182 TH2D* fFMD1iC; // Correlation in FMD1i
183 TH2D* fFMD2iC; // Correlation in FMD2i
184 TH2D* fFMD2oC; // Correlation in FMD2o
185 TH2D* fFMD3iC; // Correlation in FMD3i
186 TH2D* fFMD3oC; // Correlation in FMD3o
187 TList* fComps; // List of comparisons
0bd4b00f 188
189 ClassDef(AliFMDMCDensityCalculator,1); // Calculate Nch density
190};
191
192#endif
193// Local Variables:
194// mode: C++
195// End:
196