2 // Base class for classes that calculate the multiplicity in the
3 // SPD clusters event-by-event
5 #ifndef ALICENTRALMULTIPLICITYTASK_H
6 #define ALICENTRALMULTIPLICITYTASK_H
7 #include <AliAnalysisTaskSE.h>
8 #include "AliForwardUtil.h"
9 #include "AliAODCentralMult.h"
10 #include "AliCentralCorrAcceptance.h"
11 #include "AliCentralCorrSecondaryMap.h"
12 //class AliForwardCorrectionManager;
20 * @mainpage ALICE PWG2 Forward Multiplcity Analysis
23 * @defgroup pwg2_forward PWG2 Forward analysis
25 * Code to do the multiplicity analysis in the central pseudo-rapidity
30 * @defgroup pwg2_forward_tasks Tasks
32 * Code to do the multiplicity analysis in the central pseudo-rapidity
35 * @ingroup pwg2_forward
38 * Class that calculates the multiplicity in the
39 * central region event-by-event
49 * @par Corrections used
51 * @ingroup pwg2_forward_tasks
54 class AliCentralMultiplicityTask : public AliAnalysisTaskSE
59 * @name Interface methods
64 * @param name Name of task
66 AliCentralMultiplicityTask(const char* name);
70 AliCentralMultiplicityTask()
71 : AliAnalysisTaskSE(),
81 * @param o Object to copy from
83 AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o)
84 : AliAnalysisTaskSE(o),
87 fAODCentral(o.fAODCentral),
90 DefineOutput(1, TList::Class());
95 * @param o Object to assign from
97 * @return Reference to this object
99 AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o)
103 fAODCentral = o.fAODCentral;
104 fManager = o.fManager;
107 DefineOutput(1, TList::Class());
112 * Create output objects
115 virtual void UserCreateOutputObjects();
119 * @param option Not used
121 virtual void UserExec(Option_t* option);
125 * @param option Not used
127 virtual void Terminate(Option_t* option);
132 * Init the task and the manager
134 * @param option Not used
136 void InitManager(UShort_t sys,
138 Short_t field) {fManager.Init(sys, sNN, field);}
145 * @param option Not used
147 virtual void Print(Option_t* option="") const;
149 //__________________________________________________________________
151 * Manager of corrections
153 * This is a small class to fetch corrections for secondaries and
170 Manager(const Manager& o);
174 virtual ~Manager() {}
176 * Assignment operator
178 * @param o Object to assign from
180 * @return Reference to this object
182 Manager& operator=(const Manager& o);
187 * @param sys Collision system (1: pp, 2: PbPb)
188 * @param sNN Center of mass energy per nucleon pair [GeV]
189 * @param field Magnetic field [kG]
191 void Init(UShort_t sys, UShort_t sNN, Short_t field);
193 * Get the acceptance path
197 const char* GetAcceptancePath() const {return fAcceptancePath.Data(); }
199 * Get the secondary path
203 const char* GetSecMapPath() const {return fSecMapPath.Data(); }
205 * Set the path to the acceptance maps
207 * @param path PAth to object file
209 void SetAcceptancePath(const char* path) {fAcceptancePath=path; }
211 * Set the path to the secondary maps
213 * @param path Path to object files
215 void SetSecMapPath(const char* path) {fSecMapPath=path; }
217 * Get full path name to object file
219 * @param what What to get
220 * @param sys Collision system
221 * @param sNN Center of mass energy
222 * @param field Magnetic field
226 const char* GetFullFileName(UShort_t what, UShort_t sys, UShort_t sNN,
227 Short_t field) const;
229 * Get the acceptance object name
233 const char* GetAcceptanceName() const {return fAcceptanceName.Data(); }
235 * Get the secondary object name
239 const char* GetSecMapName() const {return fSecMapName.Data(); }
242 * Get the secondary map
248 TH2D* GetSecMapCorrection(UShort_t vtxbin) const;
250 * Get the acceptance correction
256 TH1D* GetAcceptanceCorrection(UShort_t vtxbin) const;
259 * Get the full path name
261 * @param what What to get
262 * @param sys Collision system
263 * @param sNN Center of mass energy
264 * @param field Magnetic field
268 const char* GetFileName(UShort_t what, UShort_t sys, UShort_t sNN,
269 Short_t field) const;
272 TString fAcceptancePath; // Path to acceptance
273 TString fSecMapPath; // Path to secondary map
274 AliCentralCorrAcceptance* fAcceptance; // Acceptance
275 AliCentralCorrSecondaryMap* fSecmap; // Secindary map
276 TString fAcceptanceName; // Acceptance name
277 TString fSecMapName; // Secindary name
279 ClassDef(Manager,1); // Manager of data
283 * Get a reference to the manager
285 * @return Reference to corrections manager
287 Manager& GetManager() { return fManager; }
289 * Get a reference to the manager
291 * @return Reference to corrections manager
293 const Manager& GetManager() const { return fManager; }
298 TH2D* fData; //sum histogram if needed
299 TList* fList; //Output List for diagnostics
300 AliAODCentralMult fAODCentral; // Output object
301 Manager fManager; //Manager object for corrections
302 ClassDef(AliCentralMultiplicityTask,1) // Forward multiplicity class