]>
Commit | Line | Data |
---|---|---|
9efce966 | 1 | #ifndef ALIBALANCEPSI_H |
0879e280 | 2 | #define ALIBALANCEPSI_H |
3 | /* See cxx source for full Copyright notice */ | |
4 | ||
5 | ||
6 | /* $Id: AliBalancePsi.h 54125 2012-01-24 21:07:41Z miweber $ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // Class AliBalancePsi | |
10 | // This is the class for the Balance Function writ Psi analysis | |
11 | // | |
12 | // Origin: Panos Christakoglou, Nikhef, Panos.Christakoglou@cern.ch | |
13 | //------------------------------------------------------------------------- | |
14 | ||
c64cb1f6 | 15 | #include <vector> |
0879e280 | 16 | #include <TObject.h> |
17 | #include "TString.h" | |
73609a48 | 18 | #include "TH2D.h" |
0879e280 | 19 | |
a38fd7f3 | 20 | #include "AliTHn.h" |
21 | ||
c64cb1f6 | 22 | using std::vector; |
23 | ||
0879e280 | 24 | #define ANALYSIS_TYPES 7 |
25 | #define MAXIMUM_NUMBER_OF_STEPS 1024 | |
26 | #define MAXIMUM_STEPS_IN_PSI 360 | |
27 | ||
0879e280 | 28 | class TH1D; |
29 | class TH2D; | |
30 | class TH3D; | |
31 | ||
683cbfb5 | 32 | const Int_t kTrackVariablesSingle = 3; // track variables in histogram (event class, pTtrig, vertexZ) |
33 | const Int_t kTrackVariablesPair = 6; // track variables in histogram (event class, dEta, dPhi, pTtrig, ptAssociated, vertexZ) | |
0879e280 | 34 | const TString gBFPsiAnalysisType[ANALYSIS_TYPES] = {"y","eta","qlong","qout","qside","qinv","phi"}; |
35 | ||
36 | class AliBalancePsi : public TObject { | |
37 | public: | |
38 | enum EAnalysisType { | |
39 | kRapidity = 0, | |
40 | kEta = 1, | |
41 | kQlong = 2, | |
42 | kQout = 3, | |
43 | kQside = 4, | |
44 | kQinv = 5, | |
45 | kPhi = 6 | |
46 | }; | |
47 | ||
48 | AliBalancePsi(); | |
49 | AliBalancePsi(const AliBalancePsi& balance); | |
50 | ~AliBalancePsi(); | |
51 | ||
0879e280 | 52 | void SetCentralityIdentifier(const char* centralityId) { |
53 | fCentralityId = centralityId;} | |
54 | ||
55 | void SetAnalysisLevel(const char* analysisLevel) { | |
56 | fAnalysisLevel = analysisLevel;} | |
9fd4b54e | 57 | void SetShuffle(Bool_t shuffle) {fShuffle = shuffle;} |
0879e280 | 58 | void SetCentralityInterval(Double_t cStart, Double_t cStop) { fCentStart = cStart; fCentStop = cStop;}; |
f0fb4ac1 | 59 | void SetEventClass(TString receivedEventClass){ fEventClass = receivedEventClass; } |
7c04a4d2 | 60 | void SetDeltaEtaMax(Double_t receivedDeltaEtaMax){ fDeltaEtaMax = receivedDeltaEtaMax; } |
683cbfb5 | 61 | void SetVertexZBinning(Bool_t receivedVertexBinning=kTRUE){ fVertexBinning = receivedVertexBinning; } |
ea9867da | 62 | void SetCustomBinning(TString receivedCustomBinning) { fCustomBinning = receivedCustomBinning; } |
0879e280 | 63 | |
64 | void InitHistograms(void); | |
65 | ||
66 | const char* GetAnalysisLevel() {return fAnalysisLevel.Data();} | |
67 | Int_t GetNumberOfAnalyzedEvent() {return fAnalyzedEvents;} | |
68 | ||
621329de | 69 | void CalculateBalance(Double_t gReactionPlane, |
f06d59b3 | 70 | TObjArray* particles, |
73609a48 | 71 | TObjArray* particlesMixed, |
f0fb4ac1 | 72 | Float_t bSign, |
683cbfb5 | 73 | Double_t kMultorCent = -100, |
74 | Double_t vertexZ = 0); | |
0879e280 | 75 | |
34616eda | 76 | TH2D *GetCorrelationFunction(TString type, |
77 | Double_t psiMin, Double_t psiMax, | |
78 | Double_t vertexZMin=-1, | |
79 | Double_t vertexZMax=-1, | |
80 | Double_t ptTriggerMin=-1., | |
81 | Double_t ptTriggerMax=-1., | |
82 | Double_t ptAssociatedMin=-1., | |
83 | Double_t ptAssociatedMax=-1, | |
bd7bf11d | 84 | AliBalancePsi *bMixed=NULL, |
94415ad1 | 85 | Bool_t normToTrig = kFALSE, |
c965fa95 | 86 | Double_t normalizationRangePhi = TMath::Pi()/6.); |
6acdbcb2 | 87 | TH2D *GetCorrelationFunctionPN(Double_t psiMin, Double_t psiMax, |
20006629 | 88 | Double_t vertexZMin=-1, |
89 | Double_t vertexZMax=-1, | |
6acdbcb2 | 90 | Double_t ptTriggerMin=-1., |
91 | Double_t ptTriggerMax=-1., | |
92 | Double_t ptAssociatedMin=-1., | |
47e040b5 | 93 | Double_t ptAssociatedMax=-1); |
6acdbcb2 | 94 | TH2D *GetCorrelationFunctionNP(Double_t psiMin, Double_t psiMax, |
20006629 | 95 | Double_t vertexZMin=-1, |
96 | Double_t vertexZMax=-1, | |
6acdbcb2 | 97 | Double_t ptTriggerMin=-1., |
98 | Double_t ptTriggerMax=-1., | |
99 | Double_t ptAssociatedMin=-1., | |
47e040b5 | 100 | Double_t ptAssociatedMax=-1); |
6acdbcb2 | 101 | TH2D *GetCorrelationFunctionPP(Double_t psiMin, Double_t psiMax, |
20006629 | 102 | Double_t vertexZMin=-1, |
103 | Double_t vertexZMax=-1, | |
6acdbcb2 | 104 | Double_t ptTriggerMin=-1., |
105 | Double_t ptTriggerMax=-1., | |
106 | Double_t ptAssociatedMin=-1., | |
47e040b5 | 107 | Double_t ptAssociatedMax=-1); |
6acdbcb2 | 108 | TH2D *GetCorrelationFunctionNN(Double_t psiMin, Double_t psiMax, |
20006629 | 109 | Double_t vertexZMin=-1, |
110 | Double_t vertexZMax=-1, | |
6acdbcb2 | 111 | Double_t ptTriggerMin=-1., |
112 | Double_t ptTriggerMax=-1., | |
113 | Double_t ptAssociatedMin=-1., | |
20006629 | 114 | Double_t ptAssociatedMax=-1); |
7b610f27 | 115 | TH2D *GetCorrelationFunctionChargeIndependent(Double_t psiMin, Double_t psiMax, |
20006629 | 116 | Double_t vertexZMin=-1, |
117 | Double_t vertexZMax=-1, | |
7b610f27 | 118 | Double_t ptTriggerMin=-1., |
119 | Double_t ptTriggerMax=-1., | |
120 | Double_t ptAssociatedMin=-1., | |
47e040b5 | 121 | Double_t ptAssociatedMax=-1); |
a38fd7f3 | 122 | |
9afe3098 | 123 | AliTHn *GetHistNp() {return fHistP;} |
124 | AliTHn *GetHistNn() {return fHistN;} | |
125 | AliTHn *GetHistNpn() {return fHistPN;} | |
126 | AliTHn *GetHistNnp() {return fHistNP;} | |
127 | AliTHn *GetHistNpp() {return fHistPP;} | |
128 | AliTHn *GetHistNnn() {return fHistNN;} | |
129 | ||
a38fd7f3 | 130 | void SetHistNp(AliTHn *gHist) { |
131 | fHistP = gHist; }//fHistP->FillParent(); fHistP->DeleteContainers();} | |
132 | void SetHistNn(AliTHn *gHist) { | |
133 | fHistN = gHist; }//fHistN->FillParent(); fHistN->DeleteContainers();} | |
134 | void SetHistNpn(AliTHn *gHist) { | |
135 | fHistPN = gHist; }//fHistPN->FillParent(); fHistPN->DeleteContainers();} | |
136 | void SetHistNnp(AliTHn *gHist) { | |
137 | fHistNP = gHist; }//fHistNP->FillParent(); fHistNP->DeleteContainers();} | |
138 | void SetHistNpp(AliTHn *gHist) { | |
139 | fHistPP = gHist; }//fHistPP->FillParent(); fHistPP->DeleteContainers();} | |
140 | void SetHistNnn(AliTHn *gHist) { | |
141 | fHistNN = gHist; }//fHistNN->FillParent(); fHistNN->DeleteContainers();} | |
9afe3098 | 142 | |
143 | TH1D *GetBalanceFunctionHistogram(Int_t iVariableSingle, | |
144 | Int_t iVariablePair, | |
6acdbcb2 | 145 | Double_t psiMin, Double_t psiMax, |
20006629 | 146 | Double_t vertexZMin=-1, |
147 | Double_t vertexZMax=-1, | |
6acdbcb2 | 148 | Double_t ptTriggerMin=-1., |
149 | Double_t ptTriggerMax=-1., | |
150 | Double_t ptAssociatedMin=-1., | |
20006629 | 151 | Double_t ptAssociatedMax=-1); // |
6acdbcb2 | 152 | |
f0c5040c | 153 | TH1D *GetBalanceFunctionHistogram2pMethod(Int_t iVariableSingle, |
20006629 | 154 | Int_t iVariablePair, |
155 | Double_t psiMin, Double_t psiMax, | |
156 | Double_t vertexZMin=-1, | |
157 | Double_t vertexZMax=-1, | |
158 | Double_t ptTriggerMin=-1., | |
159 | Double_t ptTriggerMax=-1., | |
160 | Double_t ptAssociatedMin=-1., | |
161 | Double_t ptAssociatedMax=-1, | |
162 | AliBalancePsi *bfMix=NULL); | |
f0c5040c | 163 | |
6acdbcb2 | 164 | TH2D *GetBalanceFunctionDeltaEtaDeltaPhi(Double_t psiMin, Double_t psiMax, |
20006629 | 165 | Double_t vertexZMin=-1, |
166 | Double_t vertexZMax=-1, | |
6acdbcb2 | 167 | Double_t ptTriggerMin=-1., |
168 | Double_t ptTriggerMax=-1., | |
169 | Double_t ptAssociatedMin=-1., | |
20006629 | 170 | Double_t ptAssociatedMax=-1); |
621329de | 171 | |
f0c5040c | 172 | TH2D *GetBalanceFunctionDeltaEtaDeltaPhi2pMethod(Double_t psiMin, Double_t psiMax, |
20006629 | 173 | Double_t vertexZMin=-1, |
174 | Double_t vertexZMax=-1, | |
f0c5040c | 175 | Double_t ptTriggerMin=-1., |
176 | Double_t ptTriggerMax=-1., | |
177 | Double_t ptAssociatedMin=-1., | |
178 | Double_t ptAssociatedMax=-1., | |
179 | AliBalancePsi *bfMix=NULL); | |
f2e8af26 | 180 | |
181 | TH1D *GetBalanceFunction1DFrom2D2pMethod(Bool_t bPhi, | |
182 | Double_t psiMin, Double_t psiMax, | |
20006629 | 183 | Double_t vertexZMin=-1, |
184 | Double_t vertexZMax=-1, | |
f2e8af26 | 185 | Double_t ptTriggerMin=-1., |
186 | Double_t ptTriggerMax=-1., | |
187 | Double_t ptAssociatedMin=-1., | |
188 | Double_t ptAssociatedMax=-1., | |
189 | AliBalancePsi *bfMix=NULL); | |
190 | ||
1822002d | 191 | Bool_t GetMomentsAnalytical(Int_t fVariable, TH1D* gHist, Bool_t kUseZYAM, |
f2e8af26 | 192 | Double_t &mean, Double_t &meanError, |
193 | Double_t &sigma, Double_t &sigmaError, | |
194 | Double_t &skewness, Double_t &skewnessError, | |
195 | Double_t &kurtosis, Double_t &kurtosisError); | |
7827f01e | 196 | |
197 | //++++++++++++++++++// | |
198 | Double_t GetFWHM(Int_t gDeltaEtaPhi, TH1D* gHist, | |
199 | Double_t &fwhm_spline, Double_t &fwhmError); | |
200 | //++++++++++++++++++// | |
f0c5040c | 201 | |
73609a48 | 202 | TH2D *GetQAHistHBTbefore() {return fHistHBTbefore;} |
203 | TH2D *GetQAHistHBTafter() {return fHistHBTafter;} | |
03f5696b | 204 | TH3D *GetQAHistConversionbefore() {return fHistConversionbefore;} |
205 | TH3D *GetQAHistConversionafter() {return fHistConversionafter;} | |
e9caebd2 | 206 | TH2D *GetQAHistPsiMinusPhi() {return fHistPsiMinusPhi;} |
f0754617 | 207 | TH3D *GetQAHistResonancesBefore() {return fHistResonancesBefore;} |
208 | TH3D *GetQAHistResonancesRho() {return fHistResonancesRho;} | |
209 | TH3D *GetQAHistResonancesK0() {return fHistResonancesK0;} | |
210 | TH3D *GetQAHistResonancesLambda() {return fHistResonancesLambda;} | |
5a861dc6 | 211 | TH3D *GetQAHistQbefore() {return fHistQbefore;} |
212 | TH3D *GetQAHistQafter() {return fHistQafter;} | |
73609a48 | 213 | |
2922bbe3 | 214 | void UseResonancesCut() {fResonancesCut = kTRUE;} |
d9eb282c | 215 | void UseHBTCut(Double_t setHBTCutValue = 0.02) { |
216 | fHBTCut = kTRUE; fHBTCutValue = setHBTCutValue;} | |
a9737921 | 217 | void UseConversionCut(Double_t setInvMassCutConversion = 0.04) { |
218 | fConversionCut = kTRUE; fInvMassCutConversion = setInvMassCutConversion; } | |
6fa567bd | 219 | void UseMomentumDifferenceCut(Double_t gDeltaPtCutMin) { |
220 | fQCut = kTRUE; fDeltaPtMin = gDeltaPtCutMin;} | |
73609a48 | 221 | |
ea9867da | 222 | // related to customized binning of output AliTHn |
223 | Bool_t IsUseVertexBinning() { return fVertexBinning; } | |
224 | TString GetBinningString() { return fBinningString; } | |
225 | Double_t* GetBinning(const char* configuration, const char* tag, Int_t& nBins); | |
226 | ||
0879e280 | 227 | private: |
ea9867da | 228 | 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); |
73609a48 | 229 | |
9fd4b54e | 230 | Bool_t fShuffle; //shuffled balance function object |
0879e280 | 231 | TString fAnalysisLevel; //ESD, AOD or MC |
232 | Int_t fAnalyzedEvents; //number of events that have been analyzed | |
233 | ||
234 | TString fCentralityId;//Centrality identifier to be used for the histo naming | |
235 | ||
0879e280 | 236 | Double_t fCentStart; |
237 | Double_t fCentStop; | |
238 | ||
9afe3098 | 239 | AliTHn *fHistP; //N+ |
240 | AliTHn *fHistN; //N- | |
241 | AliTHn *fHistPN; //N+- | |
242 | AliTHn *fHistNP; //N-+ | |
243 | AliTHn *fHistPP; //N++ | |
244 | AliTHn *fHistNN; //N-- | |
0879e280 | 245 | |
73609a48 | 246 | //QA histograms |
247 | TH2D *fHistHBTbefore; // Delta Eta vs. Delta Phi before HBT inspired cuts | |
248 | TH2D *fHistHBTafter; // Delta Eta vs. Delta Phi after HBT inspired cuts | |
03f5696b | 249 | TH3D *fHistConversionbefore; // 3D histogram (Deta,Dphi,Invmass) before Conversion cuts |
250 | TH3D *fHistConversionafter; // 3D histogram (Deta,Dphi,Invmass) before Conversion cuts | |
f0754617 | 251 | TH2D *fHistPsiMinusPhi;// psi - phi QA histogram |
252 | TH3D *fHistResonancesBefore; // 3D histogram (Deta,Dphi,Invmass) before resonance cuts | |
253 | TH3D *fHistResonancesRho; // 3D histogram (Deta,Dphi,Invmass) after removing rho | |
254 | TH3D *fHistResonancesK0; // 3D histogram (Deta,Dphi,Invmass) after removing rho, K0 | |
5a861dc6 | 255 | TH3D *fHistResonancesLambda; // 3D histogram (Deta,Dphi,Invmass) after removing rho, K0, and Lambda |
256 | TH3D *fHistQbefore; // Delta Eta vs. Delta Phi before cut on momentum difference | |
257 | TH3D *fHistQafter; // Delta Eta vs. Delta Phi after cut on momentum difference | |
73609a48 | 258 | |
0879e280 | 259 | Double_t fPsiInterval;// interval in Psi-phi1 |
7c04a4d2 | 260 | Double_t fDeltaEtaMax;// maximum delta eta for output THnSparse |
0879e280 | 261 | |
2922bbe3 | 262 | Bool_t fResonancesCut;//resonances cut |
5a861dc6 | 263 | Bool_t fHBTCut;//cut for two-track efficiency (like HBT group) |
d9eb282c | 264 | Double_t fHBTCutValue;// value for two-track efficiency cut (default = 0.02 from dphicorrelations) |
73609a48 | 265 | Bool_t fConversionCut;//conversion cut |
a9737921 | 266 | Double_t fInvMassCutConversion;//invariant mass for conversion cut |
5a861dc6 | 267 | Bool_t fQCut;//cut on momentum difference to suppress femtoscopic effect correlations |
6fa567bd | 268 | Double_t fDeltaPtMin;//delta pt cut: minimum value |
683cbfb5 | 269 | Bool_t fVertexBinning;//use vertex z binning in AliTHn |
ea9867da | 270 | TString fCustomBinning;//for setting customized binning |
271 | TString fBinningString;//final binning string | |
73609a48 | 272 | |
7c04a4d2 | 273 | TString fEventClass; |
f0fb4ac1 | 274 | |
0879e280 | 275 | AliBalancePsi & operator=(const AliBalancePsi & ) {return *this;} |
276 | ||
a9737921 | 277 | ClassDef(AliBalancePsi, 2) |
0879e280 | 278 | }; |
279 | ||
280 | #endif |