]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/Base/AliUEHistograms.h
correlation function calculation uses averages of ratios also for centrality
[u/mrichter/AliRoot.git] / PWGCF / Correlations / Base / AliUEHistograms.h
CommitLineData
a75aacd6 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
e0331fd9 11#include "TNamed.h"
a75aacd6 12#include "AliUEHist.h"
7fd35fdd 13#include "TMath.h"
a75aacd6 14
15class AliVParticle;
16
17class TList;
bf58cbde 18class TSeqCollection;
eed401dc 19class TObjArray;
a75aacd6 20class TH1F;
21class TH2F;
22class TH3F;
23
e0331fd9 24class AliUEHistograms : public TNamed
a75aacd6 25{
26 public:
0ffdaf17 27 AliUEHistograms(const char* name = "AliUEHistograms", const char* histograms = "");
a75aacd6 28 virtual ~AliUEHistograms();
29
85bfac17 30 void Fill(Int_t eventType, Float_t zVtx, AliUEHist::CFStep step, AliVParticle* leading, TList* toward, TList* away, TList* min, TList* max);
d4b3dbfc 31 void FillCorrelations(Double_t centrality, Float_t zVtx, AliUEHist::CFStep step, TObjArray* particles, TObjArray* mixed = 0, Float_t weight = 1, Bool_t firstTime = kTRUE, Bool_t twoTrackEfficiencyCut = kFALSE, Float_t bSign = 0, Float_t twoTrackEfficiencyCutValue = 0.02);
a75aacd6 32 void Fill(AliVParticle* leadingMC, AliVParticle* leadingReco);
33 void FillEvent(Int_t eventType, Int_t step);
2a910c25 34 void FillEvent(Double_t centrality, Int_t step);
c7245604 35 void FillTrackingEfficiency(TObjArray* mc, TObjArray* recoPrim, TObjArray* recoAll, Int_t particleType, Double_t centrality = 0);
b1831bcb 36
37 void CopyReconstructedData(AliUEHistograms* from);
0ffdaf17 38 void DeepCopy(AliUEHistograms* from);
a75aacd6 39
ada1a03f 40 AliUEHist* GetUEHist(Int_t id);
41
a75aacd6 42 AliUEHist* GetNumberDensitypT() { return fNumberDensitypT; }
43 AliUEHist* GetSumpT() { return fSumpT; }
44 AliUEHist* GetNumberDensityPhi() { return fNumberDensityPhi; }
45
2a910c25 46 void SetNumberDensitypT(AliUEHist* obj) { fNumberDensitypT = obj; }
47 void SetSumpT(AliUEHist* obj) { fSumpT = obj; }
48 void SetNumberDensityPhi(AliUEHist* obj) { fNumberDensityPhi = obj; }
49
85bfac17 50 void SetRunNumber(Long64_t runNumber) { fRunNumber = runNumber; }
51
a75aacd6 52 TH2F* GetCorrelationpT() { return fCorrelationpT; }
53 TH2F* GetCorrelationEta() { return fCorrelationEta; }
54 TH2F* GetCorrelationPhi() { return fCorrelationPhi; }
55 TH2F* GetCorrelationR() { return fCorrelationR; }
56 TH2F* GetCorrelationLeading2Phi() { return fCorrelationLeading2Phi; }
57 TH2F* GetCorrelationMultiplicity() { return fCorrelationMultiplicity; }
58
59 TH2F* GetEventCount() { return fEventCount; }
60 TH3F* GetEventCountDifferential() { return fEventCountDifferential; }
61 TH1F* GetVertexContributors() { return fVertexContributors; }
bf58cbde 62 TH1F* GetCentralityDistribution() { return fCentralityDistribution; }
85bfac17 63 Long64_t GetRunNumber() { return fRunNumber; }
670e1d49 64 TH3F* GetTwoTrackDistance(Int_t i) { return fTwoTrackDistancePt[i]; }
a75aacd6 65
66 void Correct(AliUEHistograms* corrections);
67
68 void SetEtaRange(Float_t etaMin, Float_t etaMax);
69 void SetPtRange(Float_t ptMin, Float_t ptMax);
85bfac17 70 void SetZVtxRange(Float_t min, Float_t max);
144bd037 71 void SetContaminationEnhancement(TH1F* hist);
a75aacd6 72 void SetCombineMinMax(Bool_t flag);
c7245604 73 void SetSelectCharge(Int_t selectCharge) { fSelectCharge = selectCharge; }
d38fa455 74 void SetTriggerRestrictEta(Float_t eta) { fTriggerRestrictEta = eta; }
00b6f3c6 75 void SetEtaOrdering(Bool_t flag) { fEtaOrdering = flag; }
b0d56b29 76 void SetPairCuts(Bool_t conversions, Bool_t resonances) { fCutConversions = conversions; fCutResonances = resonances; }
9da2f080 77 void SetOnlyOneEtaSide(Int_t flag) { fOnlyOneEtaSide = flag; }
a75aacd6 78
2a910c25 79 void ExtendTrackingEfficiency(Bool_t verbose = kFALSE);
c7245604 80 void Reset();
6f803f6c 81
d1c75d06 82 AliUEHistograms(const AliUEHistograms &c);
a75aacd6 83 AliUEHistograms& operator=(const AliUEHistograms& c);
84 virtual void Copy(TObject& c) const;
85
86 virtual Long64_t Merge(TCollection* list);
c7245604 87 void Scale(Double_t factor);
a75aacd6 88
89protected:
85bfac17 90 void FillRegion(AliUEHist::Region region, Float_t zVtx, AliUEHist::CFStep step, AliVParticle* leading, TList* list, Int_t multiplicity);
a75aacd6 91 Int_t CountParticles(TList* list, Float_t ptMin);
b0d56b29 92 void DeleteContainers();
93 Float_t GetInvMassSquared(Float_t pt1, Float_t eta1, Float_t phi1, Float_t pt2, Float_t eta2, Float_t phi2, Float_t m0);
7fd35fdd 94 inline Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign);
bf58cbde 95
96 static const Int_t fgkUEHists; // number of histograms
a75aacd6 97
98 AliUEHist* fNumberDensitypT; // d^2N/dphideta vs pT,lead
99 AliUEHist* fSumpT; // d^2 sum(pT)/dphideta vs pT,lead
100 AliUEHist* fNumberDensityPhi; // d^2N/dphideta vs delta phi,lead (in pT,lead bins)
101
102 TH2F* fCorrelationpT; // pT,lead: true vs reco
103 TH2F* fCorrelationEta; // #eta,lead; true vs reco
104 TH2F* fCorrelationPhi; // #phi,lead; true vs reco
105 TH2F* fCorrelationR; // R = sqrt(delta eta^2 + delta phi^2) (true vs reco) vs pT,lead,MC
106 TH2F* fCorrelationLeading2Phi;// delta phi (true vs reco) vs pT,lead,MC
107 TH2F* fCorrelationMultiplicity; // number of mc particls vs reco particles (for pT > 0.5 GeV/c)
108
2a910c25 109 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)
a75aacd6 110 TH3F* fEventCountDifferential;// event count as function of leading pT, step, event type
111
112 TH1F* fVertexContributors; // number of contributors to the vertex
bf58cbde 113 TH1F* fCentralityDistribution; // distribution of the variable used for centrality selection
447d47d8 114 TH2F* fCentralityCorrelation; // centrality vs multiplicity
a75aacd6 115
2a910c25 116 TH3F* fITSClusterMap; // its cluster map vs centrality vs pT
117
670e1d49 118 TH3F* fTwoTrackDistancePt[2]; // control histograms for two-track efficiency study: dphi*_min vs deta (0 = before cut, 1 = after cut)
1bba939a 119
c7245604 120 Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign
d38fa455 121 Float_t fTriggerRestrictEta; // restrict eta range for trigger particle (default: -1 [off])
00b6f3c6 122 Bool_t fEtaOrdering; // activate eta ordering to prevent shape distortions. see FillCorrelation for the details
b0d56b29 123 Bool_t fCutConversions; // cut on conversions (inv mass)
124 Bool_t fCutResonances; // cut on resonances (inv mass)
9da2f080 125 Int_t fOnlyOneEtaSide; // decides that only trigger particle from one eta side are considered (0 = all; -1 = negative, 1 = positive)
c7245604 126
85bfac17 127 Long64_t fRunNumber; // run number that has been processed
128
9da2f080 129 ClassDef(AliUEHistograms, 14) // underlying event histogram container
a75aacd6 130};
131
7fd35fdd 132Float_t AliUEHistograms::GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign)
133{
134 //
135 // calculates dphistar
136 //
137
138 Float_t dphistar = phi1 - phi2 - charge1 * bSign * TMath::ASin(0.075 * radius / pt1) + charge2 * bSign * TMath::ASin(0.075 * radius / pt2);
139
140 static const Double_t kPi = TMath::Pi();
141
142 // circularity
143// if (dphistar > 2 * kPi)
144// dphistar -= 2 * kPi;
145// if (dphistar < -2 * kPi)
146// dphistar += 2 * kPi;
147
148 if (dphistar > kPi)
149 dphistar = kPi * 2 - dphistar;
150 if (dphistar < -kPi)
151 dphistar = -kPi * 2 - dphistar;
152 if (dphistar > kPi) // might look funny but is needed
153 dphistar = kPi * 2 - dphistar;
154
155 return dphistar;
156}
157
a75aacd6 158#endif