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