]>
Commit | Line | Data |
---|---|---|
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 | * | |
bd6f5206 | 14 | * @ingroup pwglf_forward_aod |
ffca499d | 15 | * |
16 | */ | |
6f791cc3 | 17 | #include <AliAnalysisTaskSE.h> |
52047b6f | 18 | #include "AliFMDEventInspector.h" |
6f791cc3 | 19 | #include "AliAODCentralMult.h" |
8449e3e0 | 20 | class AliCentralCorrectionManager; |
6f791cc3 | 21 | class AliESDEvent; |
52047b6f | 22 | class AliMultiplicity; |
6f791cc3 | 23 | class TH2D; |
24 | class TList; | |
25 | class TTree; | |
8449e3e0 | 26 | class TObjArray; |
6f791cc3 | 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 | * | |
bd6f5206 | 42 | * @ingroup pwglf_forward_tasks |
43 | * @ingroup pwglf_forward_aod | |
6f791cc3 | 44 | * |
45 | */ | |
46 | class AliCentralMultiplicityTask : public AliAnalysisTaskSE | |
47 | { | |
48 | public: | |
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); |
2a276c75 | 79 | /** |
80 | * Configure this task via a macro | |
81 | * | |
82 | * @param macro Macro to configure va | |
83 | * | |
84 | * @return true on success, false otherwise | |
85 | */ | |
86 | virtual Bool_t Configure(const char* macro="CentralAODConfig.C"); | |
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; } | |
9453b19e | 116 | /** |
117 | * Set whether to use the acceptance corrections | |
118 | * | |
119 | * @param use Whether to use acceptance corrections | |
120 | */ | |
121 | virtual void SetUseAcceptance(Bool_t use) { fUseAcceptance = use; } | |
8449e3e0 | 122 | /** |
123 | * Set whether to make diagnostics or not | |
124 | * | |
125 | * @param use If true, store some extra diagnostic histograms | |
126 | */ | |
127 | virtual void SetMakeDiagnostics(Bool_t use=true) { fStore = use; } | |
128 | /** | |
129 | * Get the event inspector | |
130 | * | |
131 | * @return Reference to used event inspector | |
132 | */ | |
52047b6f | 133 | AliFMDEventInspector& GetInspector() { return fInspector; } |
8449e3e0 | 134 | /** |
135 | * Get the event inspector | |
6f791cc3 | 136 | * |
8449e3e0 | 137 | * @return Reference to used event inspector |
6f791cc3 | 138 | */ |
8449e3e0 | 139 | const AliFMDEventInspector& GetInspector() const { return fInspector; } |
bfab35d9 | 140 | /** |
141 | * Get the event inspector | |
142 | * | |
143 | * @return Reference to used event inspector | |
144 | */ | |
145 | AliFMDEventInspector& GetEventInspector() { return fInspector; } | |
146 | /** | |
147 | * Get the event inspector | |
148 | * | |
149 | * @return Reference to used event inspector | |
150 | */ | |
151 | const AliFMDEventInspector& GetEventInspector() const { return fInspector; } | |
6f791cc3 | 152 | |
8449e3e0 | 153 | protected: |
52047b6f | 154 | /** |
155 | * Get the ESD event and initialise manager on first event if not | |
156 | * done already | |
157 | * | |
158 | * @return Pointer to valid ESD event object | |
159 | */ | |
160 | virtual AliESDEvent* GetESDEvent(); | |
161 | /** | |
162 | * Mark this event for storage in AOD output | |
163 | * | |
164 | */ | |
165 | virtual void MarkEventForStore() const; | |
166 | /** | |
167 | * Process the ESD SPD information | |
168 | * | |
169 | * @param hist Histogram to fill | |
170 | * @param spdmult SPD multiplicity object | |
171 | */ | |
1e0e4b43 | 172 | virtual void ProcessESD(TH2D& hist, |
173 | const AliMultiplicity* spdmult) const; | |
52047b6f | 174 | /** |
8449e3e0 | 175 | * Find our eta limits |
52047b6f | 176 | * |
52047b6f | 177 | */ |
8449e3e0 | 178 | virtual void FindEtaLimits(); |
1e0e4b43 | 179 | /** |
180 | * A vertex bin. | |
181 | * | |
182 | * Used to store and apply corrections and fiducial cuts | |
183 | */ | |
8449e3e0 | 184 | struct VtxBin : public TObject |
185 | { | |
186 | VtxBin(Int_t iVz=0, Double_t minIpZ=0, Double_t maxIpZ=0); | |
187 | VtxBin(const VtxBin& o); | |
188 | VtxBin& operator=(const VtxBin& o); | |
189 | ||
190 | const char* GetName() const; | |
191 | void SetupForData(TList* l, TH2* coverage, Bool_t store=true); | |
192 | void Correct(TH2D& aodHist, | |
193 | Bool_t useSecondary, | |
194 | Bool_t useAcceptance, | |
195 | Bool_t sum=true) const; | |
196 | void Print(Option_t* option="") const; | |
197 | ||
198 | Int_t fId; // Vertex bin number | |
199 | Double_t fMinIpZ; // Least value of ipZ | |
200 | Double_t fMaxIpZ; // Largest value of ipZ | |
201 | Int_t fEtaMin; // Smallest eta bin to use | |
202 | Int_t fEtaMax; // Largest eta bin to use | |
203 | TH2* fSec; // Our secondary correction | |
204 | TH1* fAcc; // Our acceptance correction | |
205 | mutable TH2* fHits; // Diagnostics sum | |
3e478dba | 206 | |
8449e3e0 | 207 | ClassDef(VtxBin,1); |
208 | }; | |
209 | ||
6f791cc3 | 210 | protected: |
bfab35d9 | 211 | /** |
212 | * Make a simple @f$\frac{dN_{ch}}{d\eta}@f$ estimate. | |
213 | * | |
214 | * @param input Sum list | |
215 | * @param output Output list | |
216 | * @param nTr On return, the number of events w/triggers | |
217 | * @param nTrVtx On return, the number of events w/triggers+vertex | |
218 | * @param nAcc On return, the number of accepted events | |
219 | * | |
220 | * @return true on success, false otherwise | |
221 | */ | |
222 | Bool_t MakeSimpledNdeta(const TList* input, | |
223 | TList* output, | |
224 | Double_t& nTr, | |
225 | Double_t& nTrVtx, | |
226 | Double_t& nAcc); | |
28b4012a | 227 | AliFMDEventInspector fInspector; // Inspect events |
8449e3e0 | 228 | TList* fList; // Output list |
28b4012a | 229 | AliAODCentralMult fAODCentral; // Output object |
28b4012a | 230 | Bool_t fUseSecondary; // Whether to secondary map |
231 | Bool_t fUseAcceptance; // Whether to use acceptance corr. | |
232 | Bool_t fFirstEventSeen; // Have we seen first event | |
233 | Int_t fIvz; // Event's vertex bin | |
234 | TH2D* fNClusterTracklet; // # of clusters vs tracklets | |
235 | TH2D* fClusterPerTracklet; // Clusters per tracklet. | |
236 | TH1D* fNCluster; //! Number of clusters | |
237 | TH1D* fNTracklet; //! number of tracklets | |
8449e3e0 | 238 | TObjArray* fVtxList; //! Array of vertex bins |
239 | Bool_t fStore; // Store diagnostics | |
bfab35d9 | 240 | TH2D* fHData; // Sum of signals |
8449e3e0 | 241 | private: |
242 | AliCentralCorrectionManager* fCorrManager; | |
bfab35d9 | 243 | ClassDef(AliCentralMultiplicityTask,4) // Forward multiplicity class |
6f791cc3 | 244 | }; |
245 | ||
246 | #endif | |
247 | // Local Variables: | |
248 | // mode: C++ | |
249 | // End: | |
250 |