]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JetTasks/AliUEHistograms.h
11d01d38bb248debf7aac4c725fbc9adddecc1f0
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliUEHistograms.h
1 #ifndef AliUEHistograms_H
2 #define AliUEHistograms_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id: AliUEHistograms.h 20164 2007-08-14 15:31:50Z morsch $ */
8
9 // encapsulates several AliUEHist objects for a full UE analysis plus additional control histograms
10
11 #include "TNamed.h"
12 #include "AliUEHist.h"
13
14 class AliVParticle;
15
16 class TList;
17 class TSeqCollection;
18 class TObjArray;
19 class TH1F;
20 class TH2F;
21 class TH3F;
22
23 class AliUEHistograms : public TNamed
24 {
25  public:
26   AliUEHistograms(const char* name = "AliUEHistograms", const char* histograms = "123");
27   virtual ~AliUEHistograms();
28   
29   void Fill(Int_t eventType, Float_t zVtx, AliUEHist::CFStep step, AliVParticle* leading, TList* toward, TList* away, TList* min, TList* max);
30   void FillCorrelations(Double_t centrality, Float_t zVtx, AliUEHist::CFStep step, TObjArray* particles, TObjArray* mixed = 0, Float_t weight = 1, Bool_t firstTime = kTRUE);
31   void Fill(AliVParticle* leadingMC, AliVParticle* leadingReco);
32   void FillEvent(Int_t eventType, Int_t step);
33   void FillEvent(Double_t centrality, Int_t step);
34   void FillTrackingEfficiency(TObjArray* mc, TObjArray* recoPrim, TObjArray* recoAll, Int_t particleType, Double_t centrality = 0);
35   
36   void CopyReconstructedData(AliUEHistograms* from);
37   
38   AliUEHist* GetUEHist(Int_t id);
39   
40   AliUEHist* GetNumberDensitypT() { return fNumberDensitypT; }
41   AliUEHist* GetSumpT() { return fSumpT; }
42   AliUEHist* GetNumberDensityPhi() { return fNumberDensityPhi; }
43   
44   void SetNumberDensitypT(AliUEHist* obj) { fNumberDensitypT = obj; }
45   void SetSumpT(AliUEHist* obj) { fSumpT = obj; }
46   void SetNumberDensityPhi(AliUEHist* obj) { fNumberDensityPhi = obj; }
47   
48   void SetRunNumber(Long64_t runNumber) { fRunNumber = runNumber; }
49   
50   TH2F* GetCorrelationpT()  { return fCorrelationpT; }
51   TH2F* GetCorrelationEta() { return fCorrelationEta; }
52   TH2F* GetCorrelationPhi() { return fCorrelationPhi; }
53   TH2F* GetCorrelationR()   { return fCorrelationR; }
54   TH2F* GetCorrelationLeading2Phi() { return fCorrelationLeading2Phi; }
55   TH2F* GetCorrelationMultiplicity() { return fCorrelationMultiplicity; }
56   
57   TH2F* GetEventCount()     { return fEventCount; }
58   TH3F* GetEventCountDifferential() { return fEventCountDifferential; }
59   TH1F* GetVertexContributors() { return fVertexContributors; }
60   TH1F* GetCentralityDistribution() { return fCentralityDistribution; }
61   Long64_t GetRunNumber() { return fRunNumber; }
62   
63   void Correct(AliUEHistograms* corrections);
64   
65   void SetEtaRange(Float_t etaMin, Float_t etaMax);
66   void SetPtRange(Float_t ptMin, Float_t ptMax);
67   void SetZVtxRange(Float_t min, Float_t max);
68   void SetContaminationEnhancement(TH1F* hist);
69   void SetCombineMinMax(Bool_t flag);
70   void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
71   
72   void ExtendTrackingEfficiency(Bool_t verbose = kFALSE);
73   void Reset();
74
75   AliUEHistograms(const AliUEHistograms &c);
76   AliUEHistograms& operator=(const AliUEHistograms& c);
77   virtual void Copy(TObject& c) const;
78
79   virtual Long64_t Merge(TCollection* list);
80   void Scale(Double_t factor);
81   
82 protected:
83   void FillRegion(AliUEHist::Region region, Float_t zVtx, AliUEHist::CFStep step, AliVParticle* leading, TList* list, Int_t multiplicity);
84   Int_t CountParticles(TList* list, Float_t ptMin);
85   
86   static const Int_t fgkUEHists; // number of histograms
87
88   AliUEHist* fNumberDensitypT;   // d^2N/dphideta vs pT,lead
89   AliUEHist* fSumpT;             // d^2 sum(pT)/dphideta vs pT,lead
90   AliUEHist* fNumberDensityPhi;  // d^2N/dphideta vs delta phi,lead (in pT,lead bins)
91   
92   TH2F* fCorrelationpT;         // pT,lead: true vs reco
93   TH2F* fCorrelationEta;        // #eta,lead; true vs reco
94   TH2F* fCorrelationPhi;        // #phi,lead; true vs reco
95   TH2F* fCorrelationR;          // R = sqrt(delta eta^2 + delta phi^2) (true vs reco) vs pT,lead,MC
96   TH2F* fCorrelationLeading2Phi;// delta phi (true vs reco) vs pT,lead,MC
97   TH2F* fCorrelationMultiplicity; // number of mc particls vs reco particles (for pT > 0.5 GeV/c)
98   
99   TH2F* fEventCount;            // event count as function of step, (for pp: event type (plus additional step -1 for all events without vertex range even in MC)) (for PbPb: centrality)
100   TH3F* fEventCountDifferential;// event count as function of leading pT, step, event type
101   
102   TH1F* fVertexContributors;    // number of contributors to the vertex
103   TH1F* fCentralityDistribution; // distribution of the variable used for centrality selection
104   
105   TH3F* fITSClusterMap;          // its cluster map vs centrality vs pT
106   
107   Int_t fSelectCharge;           // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
108   
109   Long64_t fRunNumber;           // run number that has been processed
110   
111   ClassDef(AliUEHistograms, 7)  // underlying event histogram container
112 };
113
114 #endif