]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliCentralMultiplicityTask.h
adding planes
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliCentralMultiplicityTask.h
CommitLineData
6f791cc3 1//
2// Base class for classes that calculate the multiplicity in the
3// SPD clusters event-by-event
4//
5#ifndef ALICENTRALMULTIPLICITYTASK_H
6#define ALICENTRALMULTIPLICITYTASK_H
ffca499d 7/**
8 * @file AliCentralMultiplicityTask.h
9 * @author Hans Hjersing Dalsgaard
10 * @date Wed Mar 23 14:00:03 2011
11 *
12 * @brief
13 *
14 * @ingroup pwg2_forward_aod
15 *
16 */
6f791cc3 17#include <AliAnalysisTaskSE.h>
18#include "AliForwardUtil.h"
19#include "AliAODCentralMult.h"
20#include "AliCentralCorrAcceptance.h"
21#include "AliCentralCorrSecondaryMap.h"
22//class AliForwardCorrectionManager;
23class AliESDEvent;
24class TH2D;
25class TList;
26class TTree;
27
6f791cc3 28/**
29 * Class that calculates the multiplicity in the
30 * central region event-by-event
31 *
32 * @par Inputs:
33 * - AliESDEvent
34 *
35 * @par Outputs:
36 * - AliAODCentralMult
37 *
38 * @par Histograms
39 *
40 * @par Corrections used
41 *
42 * @ingroup pwg2_forward_tasks
ffca499d 43 * @ingroup pwg2_forward_aod
6f791cc3 44 *
45 */
46class AliCentralMultiplicityTask : public AliAnalysisTaskSE
47{
48public:
49 /**
50 * @{
51 * @name Interface methods
52 */
53 /**
54 * Constructor
55 *
56 * @param name Name of task
57 */
58 AliCentralMultiplicityTask(const char* name);
59 /**
9c825779 60 * Constructor
61 *
62 * Reserved for ROOT's I/O system - do not use
6f791cc3 63 */
9c825779 64 AliCentralMultiplicityTask();
6f791cc3 65 /**
66 * Copy constructor
67 *
68 * @param o Object to copy from
69 */
9c825779 70 AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o);
6f791cc3 71 /**
72 * Assignment operator
73 *
74 * @param o Object to assign from
75 *
76 * @return Reference to this object
77 */
9c825779 78 AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o);
6f791cc3 79 /**
80 * Create output objects
81 *
82 */
83 virtual void UserCreateOutputObjects();
84 /**
85 * Process each event
86 *
87 * @param option Not used
88 */
89 virtual void UserExec(Option_t* option);
90 /**
91 * End of job
92 *
93 * @param option Not used
94 */
95 virtual void Terminate(Option_t* option);
6f791cc3 96 /**
97 * Print information
98 *
99 * @param option Not used
100 */
101 virtual void Print(Option_t* option="") const;
3b2bfb07 102 /**
103 * Set whether to use the secondary corrections
104 *
105 * @param use Whether to use secondary corrections
106 */
107 virtual void SetUseSecondary(Bool_t use) { fUseSecondary = use; }
9453b19e 108 /**
109 * Set whether to use the acceptance corrections
110 *
111 * @param use Whether to use acceptance corrections
112 */
113 virtual void SetUseAcceptance(Bool_t use) { fUseAcceptance = use; }
3e478dba 114
115 //__________________________________________________________________
116 /**
117 * Manager of corrections
118 *
119 * This is a small class to fetch corrections for secondaries and
120 * dead channels.
6f791cc3 121 *
6f791cc3 122 */
3e478dba 123 class Manager
124 {
6f791cc3 125 public:
3e478dba 126 /**
127 * Constructor
128 *
129 */
6f791cc3 130 Manager();
3e478dba 131 /**
132 * Copy constructor
133 *
134 * @param o
135 */
136 Manager(const Manager& o);
137 /**
138 * Destructor
139 */
140 virtual ~Manager() {}
141 /**
142 * Assignment operator
143 *
144 * @param o Object to assign from
145 *
146 * @return Reference to this object
147 */
148 Manager& operator=(const Manager& o);
6f791cc3 149
3e478dba 150 /**
151 * Initialize
152 *
153 * @param sys Collision system (1: pp, 2: PbPb)
154 * @param sNN Center of mass energy per nucleon pair [GeV]
155 * @param field Magnetic field [kG]
156 */
157 void Init(UShort_t sys, UShort_t sNN, Short_t field);
e58000b7 158
159 /**
160 * Is initialized
161 *
162 */
163 Bool_t IsInit() { return fIsInit; }
164
165
3e478dba 166 /**
167 * Get the acceptance path
168 *
169 * @return
170 */
171 const char* GetAcceptancePath() const {return fAcceptancePath.Data(); }
172 /**
173 * Get the secondary path
174 *
175 * @return
176 */
177 const char* GetSecMapPath() const {return fSecMapPath.Data(); }
178 /**
179 * Set the path to the acceptance maps
180 *
181 * @param path PAth to object file
182 */
183 void SetAcceptancePath(const char* path) {fAcceptancePath=path; }
184 /**
185 * Set the path to the secondary maps
186 *
187 * @param path Path to object files
188 */
189 void SetSecMapPath(const char* path) {fSecMapPath=path; }
190 /**
191 * Get full path name to object file
192 *
193 * @param what What to get
194 * @param sys Collision system
195 * @param sNN Center of mass energy
196 * @param field Magnetic field
197 *
198 * @return
199 */
200 const char* GetFullFileName(UShort_t what, UShort_t sys, UShort_t sNN,
201 Short_t field) const;
202 /**
203 * Get the acceptance object name
204 *
205 * @return
206 */
207 const char* GetAcceptanceName() const {return fAcceptanceName.Data(); }
208 /**
209 * Get the secondary object name
210 *
211 * @return
212 */
213 const char* GetSecMapName() const {return fSecMapName.Data(); }
6f791cc3 214
3e478dba 215 /**
216 * Get the secondary map
217 *
218 * @param vtxbin
219 *
220 * @return
221 */
222 TH2D* GetSecMapCorrection(UShort_t vtxbin) const;
223 /**
224 * Get the acceptance correction
225 *
226 * @param vtxbin
227 *
228 * @return
229 */
230 TH1D* GetAcceptanceCorrection(UShort_t vtxbin) const;
6f791cc3 231 private:
3e478dba 232 /**
233 * Get the full path name
234 *
235 * @param what What to get
236 * @param sys Collision system
237 * @param sNN Center of mass energy
238 * @param field Magnetic field
239 *
240 * @return
241 */
242 const char* GetFileName(UShort_t what, UShort_t sys, UShort_t sNN,
243 Short_t field) const;
6f791cc3 244
245
3e478dba 246 TString fAcceptancePath; // Path to acceptance
247 TString fSecMapPath; // Path to secondary map
248 AliCentralCorrAcceptance* fAcceptance; // Acceptance
249 AliCentralCorrSecondaryMap* fSecmap; // Secindary map
250 TString fAcceptanceName; // Acceptance name
251 TString fSecMapName; // Secindary name
e58000b7 252 Bool_t fIsInit; // Are we init
6f791cc3 253
3e478dba 254 ClassDef(Manager,1); // Manager of data
6f791cc3 255 };
256
3e478dba 257 /**
258 * Get a reference to the manager
259 *
260 * @return Reference to corrections manager
261 */
262 Manager& GetManager() { return fManager; }
263 /**
264 * Get a reference to the manager
265 *
266 * @return Reference to corrections manager
267 */
268 const Manager& GetManager() const { return fManager; }
269
270
6f791cc3 271protected:
6f791cc3 272
fb3430ac 273 TH2D* fData; //sum histogram if needed
274 TList* fList; //Output List for diagnostics
275 AliAODCentralMult fAODCentral; // Output object
276 Manager fManager; //Manager object for corrections
277 Bool_t fUseSecondary; // Whether to secondary map
9453b19e 278 Bool_t fUseAcceptance; // Whether to use acceptance corr.
fb3430ac 279 Bool_t fFirstEventSeen; // Have we seen first event
280 ClassDef(AliCentralMultiplicityTask,1) // Forward multiplicity class
6f791cc3 281};
282
283#endif
284// Local Variables:
285// mode: C++
286// End:
287