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
8 * @file AliCentralMultiplicityTask.h
9 * @author Hans Hjersing Dalsgaard
10 * @date Wed Mar 23 14:00:03 2011
14 * @ingroup pwglf_forward_aod
17 #include <AliAnalysisTaskSE.h>
18 #include "AliFMDEventInspector.h"
19 #include "AliAODCentralMult.h"
20 class AliCentralCorrectionManager;
22 class AliMultiplicity;
29 * Class that calculates the multiplicity in the
30 * central region event-by-event
40 * @par Corrections used
42 * @ingroup pwglf_forward_tasks
43 * @ingroup pwglf_forward_aod
46 class AliCentralMultiplicityTask : public AliAnalysisTaskSE
51 * @name Interface methods
56 * @param name Name of task
58 AliCentralMultiplicityTask(const char* name);
62 * Reserved for ROOT's I/O system - do not use
64 AliCentralMultiplicityTask();
68 * @param o Object to copy from
70 AliCentralMultiplicityTask(const AliCentralMultiplicityTask& o);
74 * @param o Object to assign from
76 * @return Reference to this object
78 AliCentralMultiplicityTask& operator=(const AliCentralMultiplicityTask& o);
80 * Configure this task via a macro
82 * @param macro Macro to configure va
84 * @return true on success, false otherwise
86 virtual Bool_t Configure(const char* macro="CentralAODConfig.C");
88 * Create output objects
91 virtual void UserCreateOutputObjects();
95 * @param option Not used
97 virtual void UserExec(Option_t* option);
101 * @param option Not used
103 virtual void Terminate(Option_t* option);
107 * @param option Not used
109 virtual void Print(Option_t* option="") const;
111 * Set whether to use the secondary corrections
113 * @param use Whether to use secondary corrections
115 virtual void SetUseSecondary(Bool_t use) { fUseSecondary = use; }
117 * Set whether to use the acceptance corrections
119 * @param use Whether to use acceptance corrections
121 virtual void SetUseAcceptance(Bool_t use) { fUseAcceptance = use; }
123 * Set whether to make diagnostics or not
125 * @param use If true, store some extra diagnostic histograms
127 virtual void SetMakeDiagnostics(Bool_t use=true) { fStore = use; }
129 * Get the event inspector
131 * @return Reference to used event inspector
133 AliFMDEventInspector& GetInspector() { return fInspector; }
135 * Get the event inspector
137 * @return Reference to used event inspector
139 const AliFMDEventInspector& GetInspector() const { return fInspector; }
143 * Get the ESD event and initialise manager on first event if not
146 * @return Pointer to valid ESD event object
148 virtual AliESDEvent* GetESDEvent();
150 * Mark this event for storage in AOD output
153 virtual void MarkEventForStore() const;
155 * Process the ESD SPD information
157 * @param hist Histogram to fill
158 * @param spdmult SPD multiplicity object
160 virtual void ProcessESD(TH2D& hist, const AliMultiplicity* spdmult) const;
162 * Find our eta limits
165 virtual void FindEtaLimits();
167 struct VtxBin : public TObject
169 VtxBin(Int_t iVz=0, Double_t minIpZ=0, Double_t maxIpZ=0);
170 VtxBin(const VtxBin& o);
171 VtxBin& operator=(const VtxBin& o);
173 const char* GetName() const;
174 void SetupForData(TList* l, TH2* coverage, Bool_t store=true);
175 void Correct(TH2D& aodHist,
177 Bool_t useAcceptance,
178 Bool_t sum=true) const;
179 void Print(Option_t* option="") const;
181 Int_t fId; // Vertex bin number
182 Double_t fMinIpZ; // Least value of ipZ
183 Double_t fMaxIpZ; // Largest value of ipZ
184 Int_t fEtaMin; // Smallest eta bin to use
185 Int_t fEtaMax; // Largest eta bin to use
186 TH2* fSec; // Our secondary correction
187 TH1* fAcc; // Our acceptance correction
188 mutable TH2* fHits; // Diagnostics sum
194 AliFMDEventInspector fInspector; // Inspect events
195 TList* fList; // Output list
196 AliAODCentralMult fAODCentral; // Output object
197 Bool_t fUseSecondary; // Whether to secondary map
198 Bool_t fUseAcceptance; // Whether to use acceptance corr.
199 Bool_t fFirstEventSeen; // Have we seen first event
200 Int_t fIvz; // Event's vertex bin
201 TH2D* fNClusterTracklet; // # of clusters vs tracklets
202 TH2D* fClusterPerTracklet; // Clusters per tracklet.
203 TH1D* fNCluster; //! Number of clusters
204 TH1D* fNTracklet; //! number of tracklets
205 TObjArray* fVtxList; //! Array of vertex bins
206 Bool_t fStore; // Store diagnostics
208 AliCentralCorrectionManager* fCorrManager;
209 ClassDef(AliCentralMultiplicityTask,5) // Forward multiplicity class