]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/FORWARD/analysis2/AliCentralMCCorrectionsTask.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliCentralMCCorrectionsTask.h
CommitLineData
600b313f 1//
2// Calculate the corrections in the central regions
3//
4#ifndef ALICENTRALMCCORRECTIONS_H
5#define ALICENTRALMCCORRECTIONS_H
6/**
7 * @file AliCentralMCCorrectionsTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:05:51 2011
10 *
11 * @brief
12 *
13 *
bd6f5206 14 * @ingroup pwglf_central_aod
600b313f 15 */
c8b1a7db 16#include "AliBaseMCCorrectionsTask.h"
600b313f 17#include "AliSPDMCTrackDensity.h"
600b313f 18class AliCentralCorrSecondaryMap;
ea6f96fb 19class AliCentralCorrAcceptance;
600b313f 20
21
22/**
23 * Calculate the corrections in the central regions
24 *
25 * @par Inputs:
26 * - AliESDEvent
27 *
28 * @par Outputs:
29 * - AliAODCentralMult
30 *
31 * @par Histograms
32 *
33 * @par Corrections used
34 *
bd6f5206 35 * @ingroup pwglf_central_tasks
36 * @ingroup pwglf_central_mc
37 * @ingroup pwglf_central_aod
600b313f 38 *
39 */
c8b1a7db 40class AliCentralMCCorrectionsTask : public AliBaseMCCorrectionsTask
600b313f 41{
42public:
43 /**
44 * Constructor
45 *
46 * @param name Name of task
47 */
48 AliCentralMCCorrectionsTask(const char* name);
49 /**
50 * Constructor
51 */
52 AliCentralMCCorrectionsTask();
600b313f 53 /**
54 * @{
55 * @name Interface methods
56 */
600b313f 57 /**
58 * Print this object
59 *
60 * @param option Not used
61 */
62 void Print(Option_t* option="") const;
63
600b313f 64 /**
65 * Set the number of phi bins to use
66 *
67 * @param nBins
68 */
69 void SetNPhiBins(UShort_t nBins) { fNPhiBins = nBins; }
ea6f96fb 70 /**
71 * Whether to make effective corrections
72 *
73 * @param e if true, make effective correction
74 */
75 void SetEffectiveCorrection(Bool_t e) { fEffectiveCorr = e; }
bfab35d9 76 /**
77 * Set the maximum @f$|\eta|@f$ to accept.
78 *
79 * @param maxEta maximum @f$|\eta|@f$
80 */
81 void SetEtaCut(Double_t maxEta=1.9) { fEtaCut = maxEta; }
82 /**
83 * If a particular phi bin has less then this fraction of the
84 * largest signal in the corresponding @f$\eta@f$ slice, then it is
85 * not used.
86 *
87 * @param least Lower bound on fraction of largest signal in this
88 * @f$\eta@f$ slice
89 */
90 void SetAcceptanceCut(Double_t least=0.8) { fCorrCut = least; }
600b313f 91 /**
92 * Get a reference to the track density calculator
93 *
94 * @return Reference to the track density calculator
95 */
96 AliSPDMCTrackDensity& GetTrackDensity() { return fTrackDensity; }
97 /**
98 * Get a reference to the track density calculator
99 *
100 * @return Reference to the track density calculator
101 */
102 const AliSPDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
c8b1a7db 103protected:
600b313f 104 /**
c8b1a7db 105 * Copy constructor
600b313f 106 *
c8b1a7db 107 * @param o Object to copy from
600b313f 108 */
c8b1a7db 109 AliCentralMCCorrectionsTask(const AliCentralMCCorrectionsTask& o);
600b313f 110 /**
c8b1a7db 111 * Assignment operator
112 *
113 * @param o Object to assign from
600b313f 114 *
c8b1a7db 115 * @return Reference to this object
600b313f 116 */
c8b1a7db 117 AliCentralMCCorrectionsTask& operator=(const AliCentralMCCorrectionsTask& o);
600b313f 118 /**
119 * A vertex bin
120 *
121 */
c8b1a7db 122 struct VtxBin : public AliBaseMCCorrectionsTask::VtxBin
600b313f 123 {
124 /**
125 * Constructor
126 */
127 VtxBin();
128 /**
129 * Constructor
130 *
131 * @param low Lower @f$v_z@f$ bound
132 * @param high Upper @f$v_z@f$ bound
133 * @param etaAxis @f$\eta@f$ axis to use
c6115ede 134 * @param nPhi Number of phi bins
600b313f 135 */
136 VtxBin(Double_t low, Double_t high, const TAxis& etaAxis, UShort_t nPhi);
137 /**
138 * Copy constructor
139 *
140 * @param o Object to copy from
141 */
ee83b849 142 VtxBin(const VtxBin& o){;}
600b313f 143 /**
144 * Assignment operator
145 *
146 * @param o Object to assign from
147 *
148 * @return Reference to this object
149 */
ee83b849 150 VtxBin& operator=(const VtxBin& o){return *this;}
600b313f 151 /**
152 * Declare output in passed list
153 *
154 * @param list List to put output in
155 */
c8b1a7db 156 TList* CreateOutputObjects(TList* list);
600b313f 157 /**
158 * End of job process
159 *
bfab35d9 160 * @param o List to add output to
161 * @param i Input list
162 * @param iVz Vertex bin
ea6f96fb 163 * @param effective Make an effective correction
bfab35d9 164 * @param etaCut Maximum @f$|\eta|@f$ to use
165 * @param accCut Cut on acceptance
166 * @param acorr Acceptance correction
167 * @param map Corrections map
600b313f 168 */
5934a3e3 169 void Terminate(const TList* i,
bfab35d9 170 TList* o,
171 UShort_t iVz,
172 Bool_t effective,
173 Double_t etaCut,
174 Double_t accCut,
175 AliCentralCorrSecondaryMap* map,
176 AliCentralCorrAcceptance* acorr);
177
ea6f96fb 178 TH2D* fHits; // Cache of MC-truth hits
179 TH2D* fClusters; // Cache of reconstructed hits
600b313f 180
5934a3e3 181 ClassDef(VtxBin,3); // Vertex bin
600b313f 182 };
183 /**
184 * Define our vertex bins
185 *
186 * @param list List to read or add binst from/to
187 */
188 void DefineBins(TList* list);
c8b1a7db 189 /**
190 * Create a vertex bin
191 *
192 * @param low Low cut on @f$IP_{z}@f$
193 * @param high High cut on @f$IP_{z}@f$
194 *
195 * @return Newly created vertex bin
196 */
197 AliBaseMCCorrectionsTask::VtxBin* CreateVtxBin(Double_t low, Double_t high);
198 /**
199 * Process an ESD event
200 *
201 * @param esd ESD event
202 * @param mc MC event
203 * @param bin Vertex bin
204 * @param vz @f$IP_{z}@f$
205 *
206 * @return true on success
207 */
208 Bool_t ProcessESD(const AliESDEvent& esd, const AliMCEvent& mc,
209 AliBaseMCCorrectionsTask::VtxBin& bin,
210 Double_t vz);
211 /**
212 * Create corrections objects and store them in passed list
213 *
214 * @param results Output list
215 */
216 virtual void CreateCorrections(TList* results);
217 /**
218 * Do the final processing of a vertex bin
219 *
220 * @param bin Vertex bin
221 * @param iVz Vertex bin number
222 *
223 * @return true on successd
224 */
225 virtual Bool_t FinalizeVtxBin(AliBaseMCCorrectionsTask::VtxBin* bin,
226 UShort_t iVz);
227
600b313f 228
c8b1a7db 229 AliSPDMCTrackDensity fTrackDensity; // Get the track density
230 AliCentralCorrSecondaryMap* fSecCorr;
231 AliCentralCorrAcceptance* fAccCorr;
600b313f 232
ea6f96fb 233 UShort_t fNPhiBins; // Nunber of phi bins
234 Bool_t fEffectiveCorr; // Whether to make effective corrections
bfab35d9 235 Double_t fEtaCut; // Maximum Eta
236 Double_t fCorrCut; // Correction cut
237 ClassDef(AliCentralMCCorrectionsTask,3) // Central corrections class
600b313f 238};
239
240#endif
241// Local Variables:
242// mode: C++
243// End:
244