]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliFMDMCDensityCalculator.h
Fixed references from PWG2 -> PWGLF - very efficiently done using ETags.
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliFMDMCDensityCalculator.h
1 // 
2 // This class calculates the inclusive charged particle density
3 // in each for the 5 FMD rings based on the MC truth.
4 //
5 #ifndef ALIFMDMCDENSITYCALCULATOR_H
6 #define ALIFMDMCDENSITYCALCULATOR_H
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 pwglf_forward_aod
16  */
17 #include "AliFMDDensityCalculator.h"
18 #include <TList.h>
19 #include "AliForwardUtil.h"
20 class AliMCEvent;
21 class TH2;
22 class TH2D;
23 class TProfile2D;
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  *
38  * @ingroup pwglf_forward_algo
39  * @ingroup pwglf_forward_mc
40  * @ingroup pwglf_forward_aod
41  */
42 class AliFMDMCDensityCalculator : public AliFMDDensityCalculator
43 {
44 public:
45   /** 
46    * Constructor 
47    */
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       fFMD1iD(0), 
61       fFMD2iD(0),
62       fFMD2oD(0),
63       fFMD3iD(0),
64       fFMD3oD(0),
65       fComps(0)
66   {}
67   /** 
68    * Constructor 
69    * 
70    * @param name Name of object
71    */
72   AliFMDMCDensityCalculator(const char* name) 
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),
84       fFMD1iD(0), 
85       fFMD2iD(0),
86       fFMD2oD(0),
87       fFMD3iD(0),
88       fFMD3oD(0),
89       fComps(0)
90   {}
91   /** 
92    * Copy constructor 
93    * 
94    * @param o Object to copy from 
95    */
96   AliFMDMCDensityCalculator(const AliFMDMCDensityCalculator& o)
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),
108       fFMD1iD(o.fFMD1iD), 
109       fFMD2iD(o.fFMD2iD),
110       fFMD2oD(o.fFMD2oD),
111       fFMD3iD(o.fFMD3iD),
112       fFMD3oD(o.fFMD3oD),
113       fComps(0)
114   {}
115   /** 
116    * Destructor 
117    */
118   virtual ~AliFMDMCDensityCalculator();
119   /** 
120    * Assignement operator
121    * 
122    * @param o Object to assign from 
123    * 
124    * @return Reference to this object
125    */
126   AliFMDMCDensityCalculator& operator=(const AliFMDMCDensityCalculator& o);
127   /** 
128    * Initialize this object 
129    * 
130    * @param etaAxis Eta axis to use 
131    */
132   void Init(const TAxis& etaAxis);
133   /** 
134    * Calculate the charged particle density from the MC track references. 
135    * 
136    * @param fmd    FMD ESD event structure
137    * @param hists  Histograms to fill
138    * 
139    * @return true on success
140    */
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);
162 protected:
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;
182   /** 
183    * Make comparison profiles
184    * 
185    * @param d     Detector 
186    * @param r     Ring 
187    * @param max   Maximum 
188    * 
189    * @return Newly allocated profile object
190    */
191   TH1D* Make(UShort_t d, Char_t r, Int_t max) const;
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
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
217   TList*      fComps; // List of comparisons 
218
219   ClassDef(AliFMDMCDensityCalculator,1); // Calculate Nch density 
220 };
221
222 #endif
223 // Local Variables:
224 //   mode: C++
225 // End:
226