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 <AliAnalysisTaskSE.h>
17 #include "AliFMDMCEventInspector.h"
18 #include "AliSPDMCTrackDensity.h"
20 class AliCentralCorrSecondaryMap;
28 * Calculate the corrections in the central regions
38 * @par Corrections used
40 * @ingroup pwglf_central_tasks
41 * @ingroup pwglf_central_mc
42 * @ingroup pwglf_central_aod
45 class AliCentralMCCorrectionsTask : public AliAnalysisTaskSE
51 * @param name Name of task
53 AliCentralMCCorrectionsTask(const char* name);
57 AliCentralMCCorrectionsTask();
61 * @param o Object to copy from
63 AliCentralMCCorrectionsTask(const AliCentralMCCorrectionsTask& o);
67 * @param o Object to assign from
69 * @return Reference to this object
71 AliCentralMCCorrectionsTask& operator=(const AliCentralMCCorrectionsTask& o);
74 * @name Interface methods
82 * Create output objects
85 virtual void UserCreateOutputObjects();
89 * @param option Not used
91 virtual void UserExec(Option_t* option);
95 * @param option Not used
97 virtual void Terminate(Option_t* option);
104 * @param option Not used
106 void Print(Option_t* option="") const;
109 * Set the vertex axis to use
111 * @param nBins Number of bins
112 * @param vzMin Least @f$z@f$ coordinate of interation point
113 * @param vzMax Largest @f$z@f$ coordinate of interation point
115 void SetVertexAxis(Int_t nBins, Double_t vzMin, Double_t vzMax=-1000000);
117 * Set the vertex axis to use
121 void SetVertexAxis(const TAxis& axis);
123 * Set the eta axis to use
125 * @param nBins Number of bins
126 * @param etaMin Least @f$\eta@f$
127 * @param etaMax Largest @f$\eta@f$
129 void SetEtaAxis(Int_t nBins, Double_t etaMin, Double_t etaMax=-1000000);
131 * Set the eta axis to use
135 void SetEtaAxis(const TAxis& axis);
137 * Set the number of phi bins to use
141 void SetNPhiBins(UShort_t nBins) { fNPhiBins = nBins; }
143 * Get a reference to the track density calculator
145 * @return Reference to the track density calculator
147 AliSPDMCTrackDensity& GetTrackDensity() { return fTrackDensity; }
149 * Get a reference to the track density calculator
151 * @return Reference to the track density calculator
153 const AliSPDMCTrackDensity& GetTrackDensity() const { return fTrackDensity; }
155 * Get a reference to the event inspector
157 * @return Reference to the event inspector
159 AliFMDMCEventInspector& GetEventInspector() { return fInspector; }
161 * Get a reference to the event inspector
163 * @return Reference to the event inspector
165 const AliFMDMCEventInspector& GetEventInspector() const { return fInspector;}
171 struct VtxBin : public TNamed
180 * @param low Lower @f$v_z@f$ bound
181 * @param high Upper @f$v_z@f$ bound
182 * @param etaAxis @f$\eta@f$ axis to use
183 * @param nPhi Number of phi bins
185 VtxBin(Double_t low, Double_t high, const TAxis& etaAxis, UShort_t nPhi);
189 * @param o Object to copy from
191 VtxBin(const VtxBin& o);
193 * Assignment operator
195 * @param o Object to assign from
197 * @return Reference to this object
199 VtxBin& operator=(const VtxBin& o);
203 * @param low Lower @f$v_z@f$ bound
204 * @param high Upper @f$v_z@f$ bound
208 static const char* BinName(Double_t low, Double_t high);
210 * Declare output in passed list
212 * @param list List to put output in
214 void DefineOutput(TList* list);
218 * @param o List to add output to
219 * @param i Input list
220 * @param iVz Vertex bin
221 * @param map Correctons map
223 void Finish(const TList* i,
226 AliCentralCorrSecondaryMap* map);
228 TH2D* fHits; // Cache of per-ring histograms
229 TH2D* fPrimary; // Cache or primary
230 TH1D* fCounts; // Event count
232 ClassDef(VtxBin,1); // Vertex bin
235 * Define our vertex bins
237 * @param list List to read or add binst from/to
239 void DefineBins(TList* list);
241 AliFMDMCEventInspector fInspector; // Event inspector
242 AliSPDMCTrackDensity fTrackDensity; // Get the track density
244 TObjArray* fVtxBins; // Vertex bins
245 Bool_t fFirstEvent; // First event flag
246 TH1I* fHEvents; // All Events
247 TH1I* fHEventsTr; // Histogram of events w/trigger
248 TH1I* fHEventsTrVtx; // Events w/trigger and vertex
249 TAxis fVtxAxis; // Vertex axis
250 TAxis fEtaAxis; // Eta axis
251 TList* fList; // Output list
252 UShort_t fNPhiBins; // Nunber of phi bins
253 ClassDef(AliCentralMCCorrectionsTask,1) // Central corrections class