AliPhysics  d565ceb (d565ceb)
AliCentralMultiplicityTask.h
Go to the documentation of this file.
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 
17 #include "AliBaseESDTask.h"
18 #include "AliFMDEventInspector.h"
19 #include "AliAODCentralMult.h"
21 class AliESDEvent;
22 class AliMultiplicity;
23 class TH2D;
24 class TList;
25 class TTree;
26 class TObjArray;
27 
47 {
48 public:
58  AliCentralMultiplicityTask(const char* name);
70  virtual Bool_t Book();
76  virtual void CreateBranches(AliAODHandler* ah);
85  virtual Bool_t PreData(const TAxis& v, const TAxis& e);
91  virtual Bool_t PreEvent();
99  virtual Bool_t Event(AliESDEvent& esd);
105  virtual Bool_t Finalize();
111  virtual void Print(Option_t* option="") const;
117  virtual void SetUseSecondary(Bool_t use) { fUseSecondary = use; }
123  virtual void SetUseAcceptance(Bool_t use) { fUseAcceptance = use; }
129  virtual void SetMakeDiagnostics(Bool_t use=true) { fStore = use; }
142 
143 protected:
164  virtual void ProcessESD(TH2D& hist,
165  const AliMultiplicity* spdmult) const;
172  struct VtxBin : public TObject
173  {
181  VtxBin(Int_t iVz=0, Double_t minIpZ=0, Double_t maxIpZ=0);
187  VtxBin(const VtxBin& o);
195  VtxBin& operator=(const VtxBin& o);
201  const char* GetName() const;
209  void SetupForData(TList* l, TH2* coverage, Bool_t store=true);
218  void Correct(TH2D& aodHist,
219  Bool_t useSecondary,
220  Bool_t useAcceptance,
221  Bool_t sum=true) const;
227  void Print(Option_t* option="") const;
228 
229  Int_t fId; // Vertex bin number
230  Double_t fMinIpZ; // Least value of ipZ
231  Double_t fMaxIpZ; // Largest value of ipZ
232  Int_t fEtaMin; // Smallest eta bin to use
233  Int_t fEtaMax; // Largest eta bin to use
234  TH2* fSec; // Our secondary correction
235  TH1* fAcc; // Our acceptance correction
236  mutable TH2* fHits; // Diagnostics sum
237 
238  // ClassDef(VtxBin,1);
239  };
240 
241 protected:
253  Bool_t MakeSimpledNdeta(const TList* input,
254  TList* output,
255  Double_t& nTr,
256  Double_t& nTrVtx,
257  Double_t& nAcc);
258  TAxis* DefaultEtaAxis() const { return new TAxis(200,-4,6); }
259  TAxis* DefaultVertexAxis() const { return new TAxis(10,-10,10); }
260  AliFMDEventInspector fInspector; // Inspect events
261  AliAODCentralMult fAODCentral; // Output object
262  Bool_t fUseSecondary; // Whether to secondary map
263  Bool_t fUseAcceptance; // Whether to use acceptance corr.
264  Int_t fIvz; // Event's vertex bin
265  TH2D* fNClusterTracklet; // # of clusters vs tracklets
266  TH2D* fClusterPerTracklet; // Clusters per tracklet.
270  Bool_t fStore; // Store diagnostics
271  TH2D* fHData; // Sum of signals
272 private:
273  ClassDef(AliCentralMultiplicityTask,5) // Forward multiplicity class
274 };
275 
276 #endif
277 // Local Variables:
278 // mode: C++
279 // End:
280 
virtual void Print(Option_t *option="") const
virtual void ProcessESD(TH2D &hist, const AliMultiplicity *spdmult) const
double Double_t
Definition: External.C:58
void SetupForData(TList *l, TH2 *coverage, Bool_t store=true)
void Correct(TH2D &aodHist, Bool_t useSecondary, Bool_t useAcceptance, Bool_t sum=true) const
virtual Bool_t Event(AliESDEvent &esd)
virtual void SetUseAcceptance(Bool_t use)
virtual void SetUseSecondary(Bool_t use)
int Int_t
Definition: External.C:63
VtxBin(Int_t iVz=0, Double_t minIpZ=0, Double_t maxIpZ=0)
Definition: External.C:228
Definition: External.C:212
TH1D * fNTracklet
Number of clusters.
Bool_t MakeSimpledNdeta(const TList *input, TList *output, Double_t &nTr, Double_t &nTrVtx, Double_t &nAcc)
const AliFMDEventInspector & GetEventInspector() const
virtual Bool_t PreData(const TAxis &v, const TAxis &e)
Definition: External.C:220
virtual void CreateBranches(AliAODHandler *ah)
virtual void SetMakeDiagnostics(Bool_t use=true)
const char Option_t
Definition: External.C:48
AliCentralMultiplicityTask & operator=(const AliCentralMultiplicityTask &o)
TObjArray * fVtxList
number of tracklets
Bool_t fStore
Array of vertex bins.
bool Bool_t
Definition: External.C:53
AliFMDEventInspector & GetEventInspector()
void Print(Option_t *option="") const
Definition: External.C:196