]>
Commit | Line | Data |
---|---|---|
96624385 | 1 | // |
2 | // Calculate the qa in the forward regions event-by-event | |
3 | // | |
4 | #ifndef ALIFORWARDQATASK_H | |
5 | #define ALIFORWARDQATASK_H | |
6 | /** | |
7 | * @file AliForwardQATask.h | |
8 | * @author Christian Holm Christensen <cholm@dalsgaard.hehi.nbi.dk> | |
9 | * @date Wed Mar 23 14:06:42 2011 | |
10 | * | |
11 | * @brief | |
12 | * | |
13 | * | |
bd6f5206 | 14 | * @ingroup pwglf_forward_aod |
96624385 | 15 | */ |
16 | #include <AliAnalysisTaskSE.h> | |
17 | #include "AliFMDEventInspector.h" | |
18 | #include "AliFMDSharingFilter.h" | |
19 | #include "AliFMDDensityCalculator.h" | |
20 | #include "AliFMDEnergyFitter.h" | |
21 | #include <AliESDFMD.h> | |
22 | class AliForwardCorrectionManager; | |
23 | class AliESDEvent; | |
24 | class TH2D; | |
25 | class TList; | |
26 | class TAxis; | |
27 | ||
28 | /** | |
29 | * Calculate the QA in the forward regions | |
30 | * | |
31 | * @par Inputs: | |
32 | * - AliESDEvent | |
33 | * | |
34 | * @par Outputs: | |
35 | * - Histograms | |
36 | * | |
37 | * @par Histograms | |
38 | * | |
39 | * @par Corrections used | |
40 | * | |
bd6f5206 | 41 | * @ingroup pwglf_forward_tasks |
96624385 | 42 | * |
43 | */ | |
44 | class AliForwardQATask : public AliAnalysisTaskSE | |
45 | { | |
46 | public: | |
47 | /** | |
48 | * Constructor | |
49 | * | |
50 | * @param name Name of task | |
51 | */ | |
52 | AliForwardQATask(const char* name); | |
53 | /** | |
54 | * Constructor | |
55 | */ | |
56 | AliForwardQATask(); | |
57 | /** | |
58 | * Copy constructor | |
59 | * | |
60 | * @param o Object to copy from | |
61 | */ | |
62 | AliForwardQATask(const AliForwardQATask& o); | |
63 | /** | |
64 | * Assignment operator | |
65 | * | |
66 | * @param o Object to assign from | |
67 | * | |
68 | * @return Reference to this object | |
69 | */ | |
70 | AliForwardQATask& operator=(const AliForwardQATask& o); | |
71 | /** | |
72 | * @{ | |
73 | * @name Interface methods | |
74 | */ | |
75 | /** | |
76 | * Create output objects | |
77 | * | |
78 | */ | |
79 | virtual void UserCreateOutputObjects(); | |
80 | /** | |
81 | * Process each event | |
82 | * | |
83 | * @param option Not used | |
84 | */ | |
85 | virtual void UserExec(Option_t* option); | |
86 | /** | |
87 | * End of job | |
88 | * | |
89 | * @param option Not used | |
90 | */ | |
91 | virtual void Terminate(Option_t* option); | |
92 | /** | |
93 | * @} | |
94 | */ | |
95 | /** | |
96 | * @{ | |
97 | * @name Access to sub-algorithms | |
98 | */ | |
99 | /** | |
100 | * Get reference to the EventInspector algorithm | |
101 | * | |
102 | * @return Reference to AliFMDEventInspector object | |
103 | */ | |
104 | AliFMDEventInspector& GetEventInspector() { return fEventInspector; } | |
105 | /** | |
106 | * Get reference to the EnergyFitter algorithm | |
107 | * | |
108 | * @return Reference to AliFMDEnergyFitter object | |
109 | */ | |
110 | AliFMDEnergyFitter& GetEnergyFitter() { return fEnergyFitter; } | |
111 | /** | |
112 | * Get reference to the SharingFilter algorithm | |
113 | * | |
114 | * @return Reference to AliFMDSharingFilter object | |
115 | */ | |
116 | AliFMDSharingFilter& GetSharingFilter() { return fSharingFilter; } | |
117 | /** | |
118 | * Get reference to the DensityCalculator algorithm | |
119 | * | |
120 | * @return Reference to AliFMDDensityCalculator object | |
121 | */ | |
122 | AliFMDDensityCalculator& GetDensityCalculator() { return fDensityCalculator; } | |
123 | /** | |
124 | * Get reference to the EventInspector algorithm | |
125 | * | |
126 | * @return Reference to AliFMDEventInspector object | |
127 | */ | |
128 | const AliFMDEventInspector& GetEventInspector() const { return fEventInspector; } | |
129 | /** | |
130 | * Get reference to the EnergyFitter algorithm | |
131 | * | |
132 | * @return Reference to AliFMDEnergyFitter object | |
133 | */ | |
134 | const AliFMDEnergyFitter& GetEnergyFitter() const { return fEnergyFitter; } | |
135 | /** | |
136 | * Get reference to the SharingFilter algorithm | |
137 | * | |
138 | * @return Reference to AliFMDSharingFilter object | |
139 | */ | |
140 | const AliFMDSharingFilter& GetSharingFilter() const { return fSharingFilter; } | |
141 | /** | |
142 | * Get reference to the DensityCalculator algorithm | |
143 | * | |
144 | * @return Reference to AliFMDDensityCalculator object | |
145 | */ | |
146 | const AliFMDDensityCalculator& GetDensityCalculator() const { return fDensityCalculator; } | |
147 | /** | |
148 | * @} | |
149 | */ | |
150 | /** | |
151 | * Set debug level | |
152 | * | |
153 | * @param dbg Debug level | |
154 | */ | |
155 | void SetDebug(Int_t dbg); | |
290052e7 | 156 | /** |
157 | * Print information | |
158 | * | |
159 | * @param option Not used | |
160 | */ | |
96624385 | 161 | void Print(Option_t* option="") const; |
162 | protected: | |
163 | /** | |
164 | * Check if all needed corrections are there and accounted for. If not, | |
165 | * do a Fatal exit | |
166 | * | |
167 | * @param what Which corrections is needed | |
168 | * | |
169 | * @return true if all present, false otherwise | |
170 | */ | |
171 | Bool_t CheckCorrections(UInt_t what) const; | |
290052e7 | 172 | /** |
96624385 | 173 | * Read corrections |
290052e7 | 174 | * |
175 | * | |
176 | * @param pe On return, the eta axis | |
177 | * @param pv On return ,the vertex axis | |
178 | * @param mc True assume MC input | |
179 | * | |
180 | * @return true ons succcss | |
96624385 | 181 | */ |
182 | virtual Bool_t ReadCorrections(const TAxis*& pe, | |
183 | const TAxis*& pv, | |
184 | Bool_t mc=false); | |
185 | /** | |
422a78c8 | 186 | * Get the ESD event. IF this is the first event, initialise. If |
187 | * initialisation failes, return a null pointer. | |
290052e7 | 188 | * |
189 | * @return Pointer to ESD event structure, or null | |
96624385 | 190 | */ |
191 | virtual AliESDEvent* GetESDEvent(); | |
192 | /** | |
193 | * Initialise the sub objects and stuff. Called on first event | |
422a78c8 | 194 | * @return false on error. |
96624385 | 195 | */ |
5934a3e3 | 196 | virtual Bool_t SetupForData(); |
96624385 | 197 | |
198 | Bool_t fEnableLowFlux;// Whether to use low-flux specific code | |
199 | Bool_t fFirstEvent; // Whether the event is the first seen | |
200 | /** | |
201 | * A pointer to the corrections manager. This is here to make the | |
202 | * corrections manager persistent - that is, when we write the | |
203 | * analysis train to a file (as done in PROOF) we should also write | |
204 | * down the corrections mananger. This pointer ensures that. | |
205 | */ | |
206 | AliForwardCorrectionManager* fCorrManager; // Pointer to corrections manager | |
207 | ||
208 | AliESDFMD fESDFMD; // Sharing corrected ESD object | |
209 | AliForwardUtil::Histos fHistos; // Cache histograms | |
210 | ||
211 | AliFMDEventInspector fEventInspector; // Algorithm | |
212 | AliFMDEnergyFitter fEnergyFitter; // Algorithm | |
213 | AliFMDSharingFilter fSharingFilter; // Algorithm | |
214 | AliFMDDensityCalculator fDensityCalculator; // Algorithm | |
215 | ||
216 | TList* fList; // Output list | |
9b2f2e39 | 217 | Int_t fDebug; // Debug flag |
96624385 | 218 | |
5934a3e3 | 219 | ClassDef(AliForwardQATask,2) // Forward QA class |
96624385 | 220 | }; |
221 | ||
222 | #endif | |
223 | // Local Variables: | |
224 | // mode: C++ | |
225 | // End: | |
226 |