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(),
77 DefineOutput(1, TList::Class());
82 * @param o Object to copy from
84 AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o)
85 : AliAnalysisTaskSE(o),
88 fAODCentral(o.fAODCentral),
91 DefineOutput(1, TList::Class());
96 * @param o Object to assign from
98 * @return Reference to this object
100 AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o)
104 fAODCentral = o.fAODCentral;
105 fManager = o.fManager;
108 DefineOutput(1, TList::Class());
113 * Create output objects
116 virtual void UserCreateOutputObjects();
120 * @param option Not used
122 virtual void UserExec(Option_t* option);
126 * @param option Not used
128 virtual void Terminate(Option_t* option);
133 * Init the task and the manager
135 * @param option Not used
137 void InitManager(UShort_t sys,
139 Short_t field) {fManager.Init(sys, sNN, field);}
146 * @param option Not used
148 virtual void Print(Option_t* option="") const;
150 * Set Path for acceptance
154 void SetAcceptancePath(const char* path) {fManager.SetAcceptancePath(path); }
156 * Set Path for Secondary Map
161 void SetSecMapPath(const char* path) {fManager.SetSecMapPath(path); }
163 char* GetFullFileName(UShort_t what ,
166 Short_t field) {return fManager.GetFullFileName(what ,sys, sNN, field); }
168 const char* GetAcceptanceName() {return fManager.GetAcceptanceName(); }
169 const char* GetSecMapName() {return fManager.GetSecMapName(); }
174 // This is a small class to fetch corrections for secondaries and dead
179 Manager(const Manager& o) :
180 fAcceptancePath(o.fAcceptancePath),
181 fSecMapPath(o.fSecMapPath),
182 fAcceptance(o.fAcceptance),
184 fAcceptanceName(o.fAcceptanceName),
185 fSecMapName(o.fSecMapName) {}
188 * Assignment operator
190 * @param o Object to assign from
192 * @return Reference to this object
194 Manager& operator=(const Manager& o)
196 fAcceptancePath = o.fAcceptancePath;
197 fSecMapPath = o.fSecMapPath;
198 fAcceptance = o.fAcceptance;
200 fAcceptanceName = o.fAcceptanceName;
201 fSecMapName = o.fSecMapName;
205 void Init(UShort_t sys,
208 const char* GetAcceptancePath() {return fAcceptancePath.Data(); }
209 const char* GetSecMapPath() {return fSecMapPath.Data(); }
210 void SetAcceptancePath(const char* path) {fAcceptancePath=path; }
211 void SetSecMapPath(const char* path) {fSecMapPath=path; }
212 char* GetFullFileName(UShort_t what ,
215 Short_t field) {return Form("%s/%s",
216 what == 0 ? GetSecMapPath() : GetAcceptancePath(), GetFileName(what, sys, sNN, field));}
217 const char* GetAcceptanceName() {return fAcceptanceName.Data(); }
218 const char* GetSecMapName() {return fSecMapName.Data(); }
220 TH2D* GetSecMapCorrection(UShort_t vtxbin) {return fSecmap->GetCorrection(vtxbin);}
221 TH1D* GetAcceptanceCorrection(UShort_t vtxbin) {return fAcceptance->GetCorrection(vtxbin);}
226 const char* GetFileName(UShort_t what ,
232 TString fAcceptancePath;
234 AliCentralCorrAcceptance* fAcceptance;
235 AliCentralCorrSecondaryMap* fSecmap;
236 TString fAcceptanceName;
246 TH2D* fData; //sum histogram if needed
247 TList* fList; //Output List for diagnostics
248 AliAODCentralMult fAODCentral; // Output object
249 Manager fManager; //Manager object for corrections
250 ClassDef(AliCentralMultiplicityTask,1) // Forward multiplicity class