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