]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliFMDMCCorrections.h
cbb2083f5b3451189ae630625045ba18b9d91708
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliFMDMCCorrections.h
1 // 
2 // This class calculates the exclusive charged particle density
3 // in each for the 5 FMD rings. 
4 //
5 #ifndef ALIFMDMCCORRECTIONS_H
6 #define ALIFMDMCCORRECTIONS_H
7 #include "AliFMDCorrections.h"
8 #include <TList.h>
9 class TProfile2D;
10 class TH2;
11
12 /** 
13  * @defgroup pwg2_forward_mc  Monte-carlo code
14  * 
15  * @ingroup pwg2_forward
16  */
17 /** 
18  * This class calculates the exclusive charged particle density
19  * in each for the 5 FMD rings. 
20  *
21  * @par Input:
22  *   - 5 RingHistos objects - each with a number of vertex dependent 
23  *     2D histograms of the inclusive charge particle density 
24  *
25  * @par Output:
26  *   - 5 RingHistos objects - each with a number of vertex dependent 
27  *     2D histograms of the exclusive charge particle density 
28  * 
29  * @par Corrections used: 
30  *   - AliFMDCorrSecondaryMap;
31  *   - AliFMDCorrVertexBias
32  *   - AliFMDCorrMergingEfficiency
33  *
34  * @ingroup pwg2_forward_algo
35  * @ingroup pwg2_forward_mc
36  */
37 class AliFMDMCCorrections : public AliFMDCorrections
38 {
39 public:
40   /** 
41    * Constructor 
42    */
43   AliFMDMCCorrections()
44     : AliFMDCorrections(),
45       fFMD1i(0), 
46       fFMD2i(0),
47       fFMD2o(0),
48       fFMD3i(0),
49       fFMD3o(0),
50       fComps(0)
51   {}
52   /** 
53    * Constructor 
54    * 
55    * @param name Name of object
56    */
57   AliFMDMCCorrections(const char* name)
58     : AliFMDCorrections(name),
59       fFMD1i(0), 
60       fFMD2i(0),
61       fFMD2o(0),
62       fFMD3i(0),
63       fFMD3o(0),
64       fComps(0)
65   {}
66   /** 
67    * Copy constructor 
68    * 
69    * @param o Object to copy from 
70    */
71   AliFMDMCCorrections(const AliFMDMCCorrections& o)
72     : AliFMDCorrections(o),
73       fFMD1i(o.fFMD1i), 
74       fFMD2i(o.fFMD2i),
75       fFMD2o(o.fFMD2o),
76       fFMD3i(o.fFMD3i),
77       fFMD3o(o.fFMD3o),
78       fComps(0)
79   {}
80   /** 
81    * Destructor 
82    */
83   virtual ~AliFMDMCCorrections();
84   /** 
85    * Assignement operator
86    * 
87    * @param o Object to assign from 
88    * 
89    * @return Reference to this object
90    */
91   AliFMDMCCorrections& operator=(const AliFMDMCCorrections&);
92   /** 
93    * Initialize this object 
94    * 
95    * @param etaAxis Eta axis to use 
96    */
97   void Init(const TAxis& etaAxis);
98   /** 
99    * Do the calculations 
100    * 
101    * @param hists    Cache of histograms 
102    * @param vtxBin   Vertex bin 
103    * 
104    * @return true on successs 
105    */
106   virtual Bool_t CorrectMC(AliForwardUtil::Histos& hists, UShort_t vtxBin);
107   /** 
108    * Compare the result of analysing the ESD for 
109    * the inclusive charged particle density to analysing 
110    * MC truth 
111    * 
112    * @param esd 
113    * @param mc 
114    * 
115    * @return 
116    */
117   virtual Bool_t CompareResults(AliForwardUtil::Histos& esd, 
118                                 AliForwardUtil::Histos& mc);
119   /** 
120    * Output diagnostic histograms to directory 
121    * 
122    * @param dir List to write in
123    */  
124   void DefineOutput(TList* dir);
125 protected:
126   /** 
127    * MAke comparison profiles
128    * 
129    * @param d     Detector 
130    * @param r     Ring 
131    * @param axis  Eta axis 
132    * 
133    * @return Newly allocated profile object
134    */
135   TProfile2D* Make(UShort_t d, Char_t r, const TAxis& axis) const;
136   /** 
137    * Fill comparison profiles
138    * 
139    * @param d    Detector 
140    * @param r    Ring 
141    * @param esd  ESD histogram
142    * @param mc   MC histogram
143    */
144   void Fill(UShort_t d, Char_t r, TH2* esd, TH2* mc);
145
146   TProfile2D* fFMD1i; // Comparison
147   TProfile2D* fFMD2i; // Comparison
148   TProfile2D* fFMD2o; // Comparison
149   TProfile2D* fFMD3i; // Comparison
150   TProfile2D* fFMD3o; // Comparison
151   TList*      fComps; // List of comparisons 
152   
153   ClassDef(AliFMDMCCorrections,1); // Calculate Nch density 
154 };
155
156 #endif
157 // Local Variables:
158 //   mode: C++
159 // End:
160