2 // Calculate the corrections in the central regions
4 #ifndef ALICENTRALMCCORRECTIONS_H
5 #define ALICENTRALMCCORRECTIONS_H
7 * @file AliCentralMCCorrectionsTask.h
8 * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk>
9 * @date Wed Mar 23 14:05:51 2011
14 * @ingroup pwglf_central_aod
16 #include "AliBaseMCCorrectionsTask.h"
17 #include "AliSPDMCTrackDensity.h"
18 class AliCentralCorrSecondaryMap;
19 class AliCentralCorrAcceptance;
23 * Calculate the corrections in the central regions
33 * @par Corrections used
35 * @ingroup pwglf_central_tasks
36 * @ingroup pwglf_central_mc
37 * @ingroup pwglf_central_aod
40 class AliCentralMCCorrectionsTask : public AliBaseMCCorrectionsTask
46 * @param name Name of task
48 AliCentralMCCorrectionsTask(const char* name);
52 AliCentralMCCorrectionsTask();
55 * @name Interface methods
60 * @param option Not used
62 void Print(Option_t* option="") const;
65 * Set the number of phi bins to use
69 void SetNPhiBins(UShort_t nBins) { fNPhiBins = nBins; }
71 * Whether to make effective corrections
73 * @param e if true, make effective correction
75 void SetEffectiveCorrection(Bool_t e) { fEffectiveCorr = e; }
77 * Set the maximum @f$|\eta|@f$ to accept.
79 * @param maxEta maximum @f$|\eta|@f$
81 void SetEtaCut(Double_t maxEta=1.9) { fEtaCut = maxEta; }
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
87 * @param least Lower bound on fraction of largest signal in this
90 void SetAcceptanceCut(Double_t least=0.8) { fCorrCut = least; }
92 * Get a reference to the track density calculator
94 * @return Reference to the track density calculator
96 AliSPDMCTrackDensity& GetTrackDensity() { return fTrackDensity; }
98 * Get a reference to the track density calculator
100 * @return Reference to the track density calculator
102 const AliSPDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
107 * @param o Object to copy from
109 AliCentralMCCorrectionsTask(const AliCentralMCCorrectionsTask& o);
111 * Assignment operator
113 * @param o Object to assign from
115 * @return Reference to this object
117 AliCentralMCCorrectionsTask& operator=(const AliCentralMCCorrectionsTask& o);
122 struct VtxBin : public AliBaseMCCorrectionsTask::VtxBin
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
134 * @param nPhi Number of phi bins
136 VtxBin(Double_t low, Double_t high, const TAxis& etaAxis, UShort_t nPhi);
140 * @param o Object to copy from
142 VtxBin(const VtxBin& o);
144 * Assignment operator
146 * @param o Object to assign from
148 * @return Reference to this object
150 VtxBin& operator=(const VtxBin& o);
152 * Declare output in passed list
154 * @param list List to put output in
156 TList* CreateOutputObjects(TList* list);
160 * @param o List to add output to
161 * @param i Input list
162 * @param iVz Vertex bin
163 * @param effective Make an effective correction
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
169 void Terminate(const TList* i,
175 AliCentralCorrSecondaryMap* map,
176 AliCentralCorrAcceptance* acorr);
178 TH2D* fHits; // Cache of MC-truth hits
179 TH2D* fClusters; // Cache of reconstructed hits
181 ClassDef(VtxBin,3); // Vertex bin
184 * Define our vertex bins
186 * @param list List to read or add binst from/to
188 void DefineBins(TList* list);
190 * Create a vertex bin
192 * @param low Low cut on @f$IP_{z}@f$
193 * @param high High cut on @f$IP_{z}@f$
195 * @return Newly created vertex bin
197 AliBaseMCCorrectionsTask::VtxBin* CreateVtxBin(Double_t low, Double_t high);
199 * Process an ESD event
201 * @param esd ESD event
203 * @param bin Vertex bin
204 * @param vz @f$IP_{z}@f$
206 * @return true on success
208 Bool_t ProcessESD(const AliESDEvent& esd, const AliMCEvent& mc,
209 AliBaseMCCorrectionsTask::VtxBin& bin,
212 * Create corrections objects and store them in passed list
214 * @param results Output list
216 virtual void CreateCorrections(TList* results);
218 * Do the final processing of a vertex bin
220 * @param bin Vertex bin
221 * @param iVz Vertex bin number
223 * @return true on successd
225 virtual Bool_t FinalizeVtxBin(AliBaseMCCorrectionsTask::VtxBin* bin,
229 AliSPDMCTrackDensity fTrackDensity; // Get the track density
230 AliCentralCorrSecondaryMap* fSecCorr;
231 AliCentralCorrAcceptance* fAccCorr;
233 UShort_t fNPhiBins; // Nunber of phi bins
234 Bool_t fEffectiveCorr; // Whether to make effective corrections
235 Double_t fEtaCut; // Maximum Eta
236 Double_t fCorrCut; // Correction cut
237 ClassDef(AliCentralMCCorrectionsTask,3) // Central corrections class