#101318: Patch for various problems in AliROOT
[u/mrichter/AliRoot.git] / PWGCF / EBYE / LRC / AliLRCProcess.cxx
CommitLineData
41f63c69 1/**************************************************************************\r
75f8532d 2 * Authors: Andrey Ivanov, Igor Altsybeev. *\r
41f63c69 3 * Contributors are mentioned in the code where appropriate. *\r
4 * *\r
5 * Permission to use, copy, modify and distribute this software and its *\r
6 * documentation strictly for non-commercial purposes is hereby granted *\r
7 * without fee, provided that the above copyright notice appears in all *\r
8 * copies and that both the copyright notice and this permission notice *\r
9 * appear in the supporting documentation. The authors make no claims *\r
10 * about the suitability of this software for any purpose. It is *\r
11 * provided "as is" without express or implied warranty. *\r
12 **************************************************************************/\r
13\r
75f8532d 14// This class creates TH2D histogramms for Nch - Nch , Nch - Pt , Pt - Pt \r
d96e5666 15// dirtributions for given ETA windows and some supplementary data for Long Range Correlation (LRC) analysis . \r
16// Class is designid to work with AliAnalysisTaskLRC\r
17\r
75f8532d 18// Authors : Andrey Ivanov, Igor Altsybeev, St.Peterburg State University\r
19// Email: Igor.Altsybeev@cern.ch\r
d96e5666 20\r
d96e5666 21#include "Riostream.h"\r
22#include "AliLRCProcess.h"\r
75f8532d 23//#include "THnSparse.h"\r
41f63c69 24#include "TH1F.h"\r
25#include "TH1D.h"\r
26#include "TH2D.h"\r
27#include "TProfile.h"\r
28#include "TList.h"\r
29#include "TString.h"\r
30#include "TMath.h"\r
75f8532d 31//#include "TClonesArray.h"\r
c2aad3ae 32using std::cout;\r
33using std::endl;\r
34using std::cerr;\r
c64cb1f6 35\r
75f8532d 36//#include <AliPID.h> //for particle mass only\r
d96e5666 37ClassImp(AliLRCProcess)\r
38\r
75f8532d 39//const bool useSparse = false;//false;\r
40//const bool useAccumulatingHist = true;//false;\r
41\r
42AliLRCProcess::AliLRCProcess():fIsEventOpend(kFALSE), fIsOnline(kFALSE), fDisplayInitOnDemandWarning(kTRUE)\r
43 ,fUseSparse(false)\r
44 ,fUseAccumulatingHist(true)\r
45 ,fEventCount(0),fStartForwardETA(0), fEndForwardETA(0)\r
46 ,fStartForwardPhi(0)\r
47 ,fEndForwardPhi(0)\r
48 ,fStartBackwardETA(0)\r
49 ,fEndBackwardETA(0)\r
50 ,fStartBackwardPhi(0)\r
51 ,fEndBackwardPhi(0)\r
52 ,fDoubleSidedBackwardPhiWindow(kFALSE)\r
53 ,fHiPt(0)\r
54 ,fLoPt(0)\r
55 ,fHiMultHor(0)\r
56 ,fLowMultHor(0)\r
57 ,fHiMultVert(0)\r
58 ,fLowMultVert(0)\r
59 ,fMultBinsHor(0)\r
60 ,fMultBinsVert(0)\r
61 ,fPtBins(0)\r
62 ,fPtHistXaxisRebinFactor(1)\r
63 ,fSumPtFw(0)\r
64 ,fSumPtBw(0)\r
65 ,fSumPtBw2(0)\r
66 ,fNchFw(0)\r
67 ,fNchBw(0)\r
68 ,fNchFwPlus(0)\r
69 ,fNchBwPlus(0)\r
70 ,fNchFwMinus(0)\r
71 ,fNchBwMinus(0)\r
72 ,fOutList(0), fShortDef(0),fOutputSlot(0), fHistPt(0),fHistEta(0),fHistClouds(0),fHistNN(0),fHistPtN(0),fHistPtPt(0),fProfNberr(0),fProfNberrPtPt(0),fProfdPtB(0),fProfTestLRC(0),fHistSparseDimensionLabeling(0),fHistSparsePIDblocksLabeling(0),fHistPtForward(0),fHistEtaForward(0),fHistNchForward(0),fHistNchForwardPtPt(0)\r
73 ,fHistPhiForward(0)\r
74 ,fHistTracksChargeForward(0)\r
75 ,fHistPtBackward(0)\r
76 ,fHistEtaBackward(0)\r
77 ,fHistNchBackward(0)\r
78 ,fHistPhiBackward(0)\r
79 ,fHistTracksChargeBackward(0)\r
80 ,fArrAccumulatedValues(0)\r
81 // ,fHistArrayLabeling(0)\r
82 ,fEventCentrality(0)\r
83 ,fHistNfCentrality(0)\r
84 ,fHistTestPIDForward(0)\r
85 ,fHistTestPIDBackward(0)\r
86 ,fHistDifferenceNf(0)\r
87 ,fHistDifferenceNb(0)\r
41f63c69 88\r
75f8532d 89 ,fPidForward(-1)//kLRCany)\r
90 ,fPidBackward(-1)//kLRCany)\r
91 //,fWhichParticleToProcess(kLRCany)//kLRCany)\r
92 //,fPidFillCondition(kLRCpidIgnored)\r
93 //,fNumberOfSectors(1)\r
94 //,fNeedToRotateSector(kFALSE)\r
d96e5666 95{\r
75f8532d 96 //fWhichParticleToProcess = kLRCany; //default - all particle types\r
97 //fPidFillCondition = kLRCpidIgnored;\r
c8ffda94 98}\r
99\r
75f8532d 100AliLRCProcess::AliLRCProcess(Double_t _StartForwardETA,Double_t _EndForwardETA,Double_t _StartBakwardETA,Double_t _EndBakwardETA ): fIsEventOpend(kFALSE), fIsOnline(kFALSE), fDisplayInitOnDemandWarning(kTRUE)\r
101 ,fUseSparse(false)\r
102 ,fUseAccumulatingHist(true)\r
103 ,fEventCount(0),fStartForwardETA(0), fEndForwardETA(0), fStartForwardPhi(0),fEndForwardPhi(0),fStartBackwardETA(0), fEndBackwardETA(0),fStartBackwardPhi(0)\r
104 ,fEndBackwardPhi(0)\r
105 ,fDoubleSidedBackwardPhiWindow(kFALSE)\r
106 ,fHiPt(0)\r
107 ,fLoPt(0)\r
108 ,fHiMultHor(0)\r
109 ,fLowMultHor(0)\r
110 ,fHiMultVert(0)\r
111 ,fLowMultVert(0)\r
112 ,fMultBinsHor(0)\r
113 ,fMultBinsVert(0)\r
114 ,fPtBins(0)\r
115 ,fPtHistXaxisRebinFactor(1)\r
116 ,fSumPtFw(0), fSumPtBw(0), fSumPtBw2(0),fNchFw(0)\r
117 ,/*fNchFwPtPt(0),*/ fNchBw(0)\r
118 ,fNchFwPlus(0)\r
119 ,fNchBwPlus(0)\r
120 ,fNchFwMinus(0)\r
121 ,fNchBwMinus(0)\r
122 ,fOutList(0), fShortDef(0),fOutputSlot(0), fHistPt(0),fHistEta(0),fHistClouds(0),fHistNN(0),fHistPtN(0),fHistPtPt(0),fProfNberr(0),fProfNberrPtPt(0),fProfdPtB(0),fProfTestLRC(0),fHistSparseDimensionLabeling(0),fHistSparsePIDblocksLabeling(0),fHistPtForward(0),fHistEtaForward(0),fHistNchForward(0),fHistNchForwardPtPt(0)\r
123 ,fHistPhiForward(0)\r
124 ,fHistTracksChargeForward(0)\r
125 ,fHistPtBackward(0)\r
126 ,fHistEtaBackward(0)\r
127 ,fHistNchBackward(0)\r
128 ,fHistPhiBackward(0)\r
129 ,fHistTracksChargeBackward(0)\r
130 ,fArrAccumulatedValues(0)\r
131 // ,fHistArrayLabeling(0)\r
132 ,fEventCentrality(0)\r
133 ,fHistNfCentrality(0)\r
134 ,fHistTestPIDForward(0)\r
135 ,fHistTestPIDBackward(0)\r
136 ,fHistDifferenceNf(0)\r
137 ,fHistDifferenceNb(0)\r
138 ,fPidForward(-1)//kLRCany)\r
139 ,fPidBackward(-1)//kLRCany)\r
140 //,fWhichParticleToProcess(kLRCany)//kLRCany)\r
141 //,fPidFillCondition(kLRCpidIgnored)\r
142 //,fNumberOfSectors(1)\r
143 //,fNeedToRotateSector(kFALSE)\r
d96e5666 144{\r
75f8532d 145 // Constructor with window setup makes ready-to-run processor\r
146 fEventCount=0;\r
147\r
148 //fWhichParticleToProcess = kLRCany; //default - all particle types\r
149 //fPidFillCondition = kLRCpidIgnored;\r
150 \r
151 //cout << "TEST" << endl;\r
152 SetETAWindows( _StartForwardETA, _EndForwardETA,_StartBakwardETA,_EndBakwardETA);\r
153 SetHistPtRange( 0.15, 1.5, 270 );\r
154 SetHistMultRange( 0, 0, 100 );\r
155 SetForwardWindowPhi( 0, 2*TMath::Pi() );\r
156 SetBackwardWindowPhi( 0, 2*TMath::Pi() );\r
157 \r
158\r
d96e5666 159}\r
75f8532d 160\r
161Bool_t AliLRCProcess::InitDataMembers()\r
162{\r
163 //Printf("INITDATAMEMBERS");\r
164 // This method is actualy creating output histogramms\r
165 // Thist method is to be called in CreateOutputObjects method of AliAnalysisTask\r
166 //cout<<" # Init for "<<fShortDef<<" this="<<this<<"\n";\r
167 if( fIsOnline )\r
168 {\r
169 Printf("Can't init data members more then one time! \n");\r
170 return kFALSE;\r
171 }\r
172 fEventCount=0;\r
173 fOutList = new TList();\r
fbe139eb 174 fOutList->SetOwner(); // IMPORTANT!\r
175\r
75f8532d 176 fOutList->SetName(fShortDef);\r
177\r
178 Double_t lowMultHor, hiMultHor;\r
179 Double_t lowMultVert, hiMultVert;\r
180\r
181 lowMultHor = fLowMultHor - 0.5;\r
182 hiMultHor = fHiMultHor + 0.5;\r
183\r
184 lowMultVert = fLowMultVert - 0.5;\r
185 hiMultVert = fHiMultVert + 0.5;\r
186\r
187\r
188 //TArray to accumulate data, with names hist\r
189 //26.01.2013: array with accumulated values\r
190 //fArrAccumulatedValues = new TClonesArray("Float_t", en_arr_labels_total );//TArrayF(en_arr_labels_total);\r
191 if ( fUseAccumulatingHist )\r
192 {\r
193 fArrAccumulatedValues = new TH1D( "fArrAccumulatedValues", "Accumulating hist with labeling", en_arr_labels_total,-0.5,en_arr_labels_total-0.5);\r
194 TString gArrayMemberNames[en_arr_labels_total];\r
195 gArrayMemberNames[ en_arr_labels_NN_Nevents ] = "NN_Nevents" ;\r
196 gArrayMemberNames[ en_arr_labels_NN_Nf ] = "NN_Nf" ;\r
197 gArrayMemberNames[ en_arr_labels_NN_Nb ] = "NN_Nb" ;\r
198 gArrayMemberNames[ en_arr_labels_NN_N2_f ] = "NN_N2_f" ;\r
199 gArrayMemberNames[ en_arr_labels_NN_Nf_Nb ] = "NN_Nf_Nb" ;\r
200\r
201 gArrayMemberNames[ en_arr_labels_PtN_Nevents ] = "PtN_Nevents" ;\r
202 gArrayMemberNames[ en_arr_labels_PtN_Nf ] = "PtN_Nf" ;\r
203 gArrayMemberNames[ en_arr_labels_PtN_PtB ] = "PtN_PtB" ;\r
204 gArrayMemberNames[ en_arr_labels_PtN_N2_f ] = "PtN_N2_f" ;\r
205 gArrayMemberNames[ en_arr_labels_PtN_Ptb_Nf ] = "PtN_Ptb_Nf" ;\r
206\r
207 gArrayMemberNames[ en_arr_labels_PtPt_Nevents] = "PtPt_Nevents" ;\r
208 gArrayMemberNames[ en_arr_labels_PtPt_PtF ] = "PtPt_PtF" ;\r
209 gArrayMemberNames[ en_arr_labels_PtPt_PtB ] = "PtPt_PtB" ;\r
210 gArrayMemberNames[ en_arr_labels_PtPt_Pt2_f ] = "PtPt_Pt2_f" ;\r
211 gArrayMemberNames[ en_arr_labels_PtPt_Ptf_Ptb] = "PtPt_Ptf_Ptb" ;\r
212\r
213 for( Int_t i = 1; i <= en_arr_labels_total; i++ )\r
214 fArrAccumulatedValues->GetXaxis()->SetBinLabel(i,gArrayMemberNames[i-1].Data());\r
215 //fOutList->Add(fArrAccumulatedValues);\r
216 fOutList->Add(fArrAccumulatedValues);\r
217 }\r
218\r
219\r
220\r
41f63c69 221 \r
75f8532d 222 // Window statistics histograms\r
223\r
224 // Forward\r
225\r
226 fHistPtForward = new TH1D("fHistPtForward", "P_{T} distribution in Forward window", 100, 0.0, 5);\r
227 fHistPtForward->GetXaxis()->SetTitle("P_{T} (GeV/c)");\r
228 fHistPtForward->GetYaxis()->SetTitle("dN/dP_{T} (c/GeV)");\r
229 fHistPtForward->SetMarkerStyle(kFullCircle);\r
230\r
231\r
232 fHistEtaForward = new TH1D("fEtaForward", "#eta distribution in Forward window", 200, -2, 2);\r
233 fHistEtaForward->GetXaxis()->SetTitle("ETA");\r
234 fHistEtaForward->GetYaxis()->SetTitle("dN/ETA");\r
235 fHistEtaForward->SetMarkerStyle(kFullCircle);\r
236\r
237 \r
238 fHistNchForward = new TH1D("fHistNchForward", "N_{ch} distribution in Forward window", fMultBinsHor, lowMultHor, hiMultHor);\r
239 fHistNchForward->GetXaxis()->SetTitle("N_{ch}");\r
240 fHistNchForward->GetYaxis()->SetTitle("dN/dN_{ch}");\r
241 fHistNchForward->SetMarkerStyle(kFullCircle);\r
242\r
243 fHistNchForwardPtPt = new TH1D("fHistNchForwardPtPt", "N_{ch} distribution in Forward window for PtPt accept conditions", fMultBinsHor, lowMultHor, hiMultHor);\r
244 fHistNchForwardPtPt->GetXaxis()->SetTitle("N_{ch}");\r
245 fHistNchForwardPtPt->GetYaxis()->SetTitle("dN/dN_{ch}");\r
246 fHistNchForwardPtPt->SetMarkerStyle(kFullCircle);\r
247\r
fbe139eb 248 fHistPhiForward = new TH1D("fPhiForward", "#phi distribution in Forward window", 144, 0, 2*TMath::Pi());\r
75f8532d 249 fHistPhiForward->GetXaxis()->SetTitle("Phi");\r
250 fHistPhiForward->GetYaxis()->SetTitle("dN/Phi");\r
251 fHistPhiForward->SetMarkerStyle(kFullCircle);\r
252\r
253 fHistTestPIDForward = new TH1D("fHistTestPIDForward","PID distribution in Forward window;PID;N",5,-0.5,4.5);\r
254 TString gBinParticleNames[5] = {/*"Other",*/"Electron","Muon","Pion","Kaon", "Proton"};\r
255 for(Int_t i = 1; i <= 5; i++)\r
256 fHistTestPIDForward->GetXaxis()->SetBinLabel(i,gBinParticleNames[i-1].Data());\r
257\r
258 //15/12/2012: charge hist\r
259 fHistTracksChargeForward = new TH1D("fHistTracksChargeForward","Accepted tracks charge;charge;Entries",3,-1.5,1.5);\r
260\r
261 // Backward\r
262\r
263 fHistPtBackward = new TH1D("fHistPtBakward", "P_{T} distribution in Backward window", 100, 0.0, 5);\r
264 fHistPtBackward->GetXaxis()->SetTitle("P_{T} (GeV/c)");\r
265 fHistPtBackward->GetYaxis()->SetTitle("dN/dP_{T} (c/GeV)");\r
266 fHistPtBackward->SetMarkerStyle(kFullCircle);\r
267\r
268\r
269 fHistEtaBackward = new TH1D("fEtaBakward", "#eta distribution in Backward window", 200, -2, 2);\r
270 fHistEtaBackward->GetXaxis()->SetTitle("ETA");\r
271 fHistEtaBackward->GetYaxis()->SetTitle("dN/ETA");\r
272 fHistEtaBackward->SetMarkerStyle(kFullCircle);\r
273\r
274\r
275 fHistNchBackward = new TH1D("fHistNchBakward", "N_{ch} distribution in Backward window", fMultBinsVert, lowMultVert, hiMultVert);\r
276 fHistNchBackward->GetXaxis()->SetTitle("N_{ch}");\r
277 fHistNchBackward->GetYaxis()->SetTitle("dN/dN_{ch}");\r
278 fHistNchBackward->SetMarkerStyle(kFullCircle);\r
279\r
fbe139eb 280 fHistPhiBackward = new TH1D("fPhiBakward", "#phi distribution in Backward window", 144, 0, 2*TMath::Pi());\r
75f8532d 281 fHistPhiBackward->GetXaxis()->SetTitle("Phi");\r
282 fHistPhiBackward->GetYaxis()->SetTitle("dN/Phi");\r
283 fHistPhiBackward->SetMarkerStyle(kFullCircle);\r
284\r
285 fHistTestPIDBackward = new TH1D("fHistTestPIDBackward","PID distribution in Backward window;PID;N",5,-0.5,4.5);\r
286 for(Int_t i = 1; i <= 5; i++)\r
287 fHistTestPIDBackward->GetXaxis()->SetBinLabel(i,gBinParticleNames[i-1].Data());\r
288\r
289\r
290 //15/12/2012: charge hist\r
291 fHistTracksChargeBackward = new TH1D("fHistTracksChargeBackward","Accepted tracks charge;charge;Entries",3,-1.5,1.5);\r
292\r
293\r
294\r
295\r
296\r
d96e5666 297\r
298 //Overal statistics histograms\r
75f8532d 299\r
300 fHistPt = new TH1F("fHistPt", "P_{T} distribution", 100, 0.0, 5.0);\r
301 fHistPt->GetXaxis()->SetTitle("P_{T} (GeV/c)");\r
302 fHistPt->GetYaxis()->SetTitle("dN/dP_{T} (c/GeV)");\r
303 fHistPt->SetMarkerStyle(kFullCircle);\r
304\r
305\r
306 fHistEta = new TH1F("fHistEta", "#eta distribution", 200, -2, 2);\r
307 fHistEta->GetXaxis()->SetTitle("ETA");\r
308 fHistEta->GetYaxis()->SetTitle("dN/ETA");\r
309 fHistEta->SetMarkerStyle(kFullCircle);\r
d96e5666 310 \r
311 \r
312 \r
313 // -------- LRC histograms\r
75f8532d 314 //new cloud implementation\r
315 //const int lSparseDim = en_sparse_total;\r
316 //const int nSparseBins = 1000;\r
317 fCorrespondanceWithAliROOTpid[kSparsePIDany] = kSparsePIDany;\r
318 fCorrespondanceWithAliROOTpid[kSparsePIDdefined] = -1000;\r
319 fCorrespondanceWithAliROOTpid[kSparsePIDpion] = 2;\r
320 fCorrespondanceWithAliROOTpid[kSparsePIDkaon] = 3;\r
321 fCorrespondanceWithAliROOTpid[kSparsePIDproton] = 4;\r
322\r
323 /* from AliROOT //deprecated!\r
324 enum EParticleType {\r
325 kElectron = 0,\r
326 kMuon = 1,\r
327 kPion = 2,\r
328 kKaon = 3,\r
329 kProton = 4,\r
330 kPhoton = 5,\r
331 kPi0 = 6,\r
332 kNeutron = 7,\r
333 kKaon0 = 8,\r
334 kEleCon = 9,\r
335 kDeuteron = 10,\r
336 kTriton = 11,\r
337 kHe3 = 12,\r
338 kAlpha = 13,\r
339 kUnknown = 14\r
340 };*/\r
341\r
342\r
343 if ( fUseSparse )\r
344 {\r
345\r
346 //correspondance of PID blocks\r
347 //it's a way to unlink THnSparse data dimenstion from enum\r
348 fHistSparsePIDblocksLabeling = new TH1D("fHistSparsePIDblocksLabeling","THnSparse PID blocks labeling", kSparsePIDtotal,-0.5,kSparsePIDtotal-0.5);\r
349 TString gEventCutBinPIDblocksNames[kSparsePIDtotal]; // = {"Total","No trigger","Centrality","No vertex","Bad vertex position","HighMult cut","LowMult cut","Analyzed"};\r
350 gEventCutBinPIDblocksNames[kSparsePIDany] = "any";\r
351 gEventCutBinPIDblocksNames[kSparsePIDdefined] = "defined";\r
352 gEventCutBinPIDblocksNames[kSparsePIDpion] = "pion";\r
353 gEventCutBinPIDblocksNames[kSparsePIDkaon] = "kaon";\r
354 gEventCutBinPIDblocksNames[kSparsePIDproton] = "proton";\r
355\r
356\r
357 for(Int_t i = 1; i <= kSparsePIDtotal; i++)fHistSparsePIDblocksLabeling->GetXaxis()->SetBinLabel(i,gEventCutBinPIDblocksNames[i-1].Data());\r
358 //for(Int_t i = 0; i < nEnumBins; i++)fHistSparseDimensionLabeling->Fill( i );\r
359\r
360 //dimensions labelling\r
361\r
362 fHistSparseDimensionLabeling = new TH1D("fHistSparseDimensionLabeling","THnSparse labeling", kSparseTotal,-0.5,kSparseTotal-0.5);\r
363 TString gSparseDimensionsNames[kSparseTotal]; // = {"Total","No trigger","Centrality","No vertex","Bad vertex position","HighMult cut","LowMult cut","Analyzed"};\r
364 gSparseDimensionsNames[kSparseNf] = "N_f";\r
365 gSparseDimensionsNames[kSparseNb] = "N_b";\r
366 gSparseDimensionsNames[kSparsePtF] = "Pt_f";\r
367 gSparseDimensionsNames[kSparsePtB] = "Pt_b";\r
368 gSparseDimensionsNames[en_sparse_N2_f] = "N2_f";\r
369 gSparseDimensionsNames[en_sparse_Nf_Nb] = "Nf_Nb";\r
370 gSparseDimensionsNames[en_sparse_Ptb_Nf] = "Ptb_Nf";\r
371 gSparseDimensionsNames[en_sparse_Pt2_f] = "Pt2_f";\r
372 gSparseDimensionsNames[en_sparse_Ptf_Ptb] = "Ptf_Ptb";\r
373\r
374 for( Int_t i = 1; i <= kSparseTotal; i++ )\r
375 fHistSparseDimensionLabeling->GetXaxis()->SetBinLabel(i,gSparseDimensionsNames[i-1].Data());\r
376\r
377\r
378\r
379 Int_t* lSparseBins = new Int_t[kSparseTotal*kSparsePIDtotal];\r
380 Double_t *lSparseXmin = new Double_t[kSparseTotal*kSparsePIDtotal];\r
381 Double_t *lSparseXmax = new Double_t[kSparseTotal*kSparsePIDtotal];\r
382 TString *lSparseAxisNames = new TString[kSparseTotal*kSparsePIDtotal];\r
383\r
384 TString *lPIDNames = new TString[kSparsePIDtotal];\r
385 lPIDNames[ kSparsePIDany ] = Form( "any" );\r
386 lPIDNames[ kSparsePIDdefined ] = Form( "defined" );\r
387 lPIDNames[ kSparsePIDpion ] = Form( "pion" );\r
388 lPIDNames[ kSparsePIDkaon ] = Form( "kaon" );\r
389 lPIDNames[ kSparsePIDproton ] = Form( "proton" );\r
390\r
391\r
392\r
393 for ( Int_t d = 0; d < kSparsePIDtotal; ++d )\r
394 {\r
395 Int_t binShift = kSparseTotal*d;\r
396\r
397 lSparseAxisNames[kSparseNf + binShift] = Form( "axisNf_%s", lPIDNames[ d ].Data() );\r
398 lSparseAxisNames[kSparseNb + binShift] = Form( "axisNb_%s", lPIDNames[ d ].Data() );\r
399 lSparseAxisNames[kSparsePtF + binShift] = Form( "axisPtf_%s", lPIDNames[ d ].Data() );\r
400 lSparseAxisNames[kSparsePtB + binShift] = Form( "axisPtb_%s", lPIDNames[ d ].Data() );\r
401\r
402 lSparseAxisNames[en_sparse_N2_f + binShift] = Form( "axisN2_%s", lPIDNames[ d ].Data() );\r
403 lSparseAxisNames[en_sparse_Nf_Nb + binShift] = Form( "axisNf_Nb_%s", lPIDNames[ d ].Data() );\r
404 lSparseAxisNames[en_sparse_Ptb_Nf + binShift] = Form( "axisPtb_Nf_%s", lPIDNames[ d ].Data() );\r
405 lSparseAxisNames[en_sparse_Pt2_f + binShift] = Form( "axisPt2_f_%s", lPIDNames[ d ].Data() );\r
406 lSparseAxisNames[en_sparse_Ptf_Ptb + binShift] = Form( "axisPtf_Ptb_%s", lPIDNames[ d ].Data() );\r
407\r
408\r
409 lSparseBins[kSparseNf + binShift ] = fMultBinsHor;\r
410 lSparseXmin[kSparseNf + binShift ] = lowMultHor;\r
411 lSparseXmax[kSparseNf + binShift ] = hiMultHor;\r
412 lSparseBins[kSparseNb + binShift ] = fMultBinsVert;\r
413 lSparseXmin[kSparseNb + binShift ] = lowMultVert;\r
414 lSparseXmax[kSparseNb + binShift ] = hiMultVert;\r
415 //}\r
416 //for (Int_t d = 2; d < lSparseDim; ++d) {\r
417 lSparseBins[kSparsePtF + binShift ] = fPtBins;\r
418 lSparseXmin[kSparsePtF + binShift ] = fLoPt;\r
419 lSparseXmax[kSparsePtF + binShift ] = fHiPt;\r
420 lSparseBins[kSparsePtB + binShift ] = fPtBins;\r
421 lSparseXmin[kSparsePtB + binShift ] = fLoPt;\r
422 lSparseXmax[kSparsePtB + binShift ] = fHiPt;\r
423\r
424\r
425\r
426\r
427\r
428 //}\r
429 /*\r
430 lSparseBins[en_sparse_Et_f + binShift ] = 500;\r
431 lSparseXmin[en_sparse_Et_f + binShift ] = 0.2;\r
432 lSparseXmax[en_sparse_Et_f + binShift ] = 2.7;\r
433 lSparseBins[en_sparse_Et_b + binShift ] = 500;\r
434 lSparseXmin[en_sparse_Et_b + binShift ] = 0.2;\r
435 lSparseXmax[en_sparse_Et_b + binShift ] = 2.7;\r
436*/\r
437\r
438 lSparseBins[en_sparse_N2_f + binShift ] = (fMultBinsHor-1)*(fMultBinsHor-1)+1;\r
439 lSparseXmin[en_sparse_N2_f + binShift ] = fLowMultHor*fLowMultHor-0.5; // ! use global mult without shift\r
440 lSparseXmax[en_sparse_N2_f + binShift ] = fHiMultHor*fHiMultHor+0.5;\r
441 //lSparseBins[en_sparse_N_b] = fMultBinsVert;\r
442 //lSparseXmin[en_sparse_N_b] = lowMultVert;\r
443 //lSparseXmax[en_sparse_N_b] = hiMultVert;\r
444 lSparseBins[en_sparse_Nf_Nb + binShift ] = (fMultBinsHor-1)*(fMultBinsVert-1)+1;\r
445 lSparseXmin[en_sparse_Nf_Nb + binShift ] = fLowMultHor*fLowMultVert-0.5;\r
446 lSparseXmax[en_sparse_Nf_Nb + binShift ] = fHiMultHor*fHiMultVert+0.5;\r
447\r
448\r
449\r
450 lSparseBins[en_sparse_Ptb_Nf + binShift ] = /*(fMultBinsHor-1)**/(10*fPtBins);//+1;\r
451 lSparseXmin[en_sparse_Ptb_Nf + binShift ] = fLowMultHor*fLoPt-0.5;\r
452 lSparseXmax[en_sparse_Ptb_Nf + binShift ] = fHiMultHor*fHiPt+0.5;\r
453\r
454 lSparseBins[en_sparse_Pt2_f + binShift ] = (10*fPtBins);//*(fPtBins);//+1;\r
455 lSparseXmin[en_sparse_Pt2_f + binShift ] = fLoPt*fLoPt;\r
456 lSparseXmax[en_sparse_Pt2_f + binShift ] = fHiPt*fHiPt;\r
457\r
458 lSparseBins[en_sparse_Ptf_Ptb + binShift ] = (10*fPtBins);//*(fPtBins)+1;\r
459 lSparseXmin[en_sparse_Ptf_Ptb + binShift ] = fLoPt*fLoPt;\r
460 lSparseXmax[en_sparse_Ptf_Ptb + binShift ] = fHiPt*fHiPt;\r
461\r
462 /*\r
463 lSparseBins[en_sparse_Nf_plus + binShift ] = fMultBinsHor;\r
464 lSparseXmin[en_sparse_Nf_plus + binShift ] = lowMultHor;\r
465 lSparseXmax[en_sparse_Nf_plus + binShift ] = hiMultHor;\r
466 lSparseBins[en_sparse_Nf_minus + binShift ] = fMultBinsHor;\r
467 lSparseXmin[en_sparse_Nf_minus + binShift ] = lowMultHor;\r
468 lSparseXmax[en_sparse_Nf_minus + binShift ] = hiMultHor;\r
469\r
470 lSparseBins[en_sparse_Nb_plus + binShift ] = fMultBinsVert;\r
471 lSparseXmin[en_sparse_Nb_plus + binShift ] = lowMultVert;\r
472 lSparseXmax[en_sparse_Nb_plus + binShift ] = hiMultVert;\r
473 lSparseBins[en_sparse_Nb_minus + binShift ] = fMultBinsVert;\r
474 lSparseXmin[en_sparse_Nb_minus + binShift ] = lowMultVert;\r
475 lSparseXmax[en_sparse_Nb_minus + binShift ] = hiMultVert;\r
476\r
477 lSparseBins[en_sparse_Nf_plus_Nb_minus + binShift ] = (fMultBinsHor-1)*(fMultBinsVert-1)+1;\r
478 lSparseXmin[en_sparse_Nf_plus_Nb_minus + binShift ] = fLowMultHor*fLowMultVert-0.5;\r
479 lSparseXmax[en_sparse_Nf_plus_Nb_minus + binShift ] = fHiMultHor*fHiMultVert+0.5;\r
480\r
481 lSparseBins[en_sparse_Nb_plus_Nf_minus + binShift ] = (fMultBinsHor-1)*(fMultBinsVert-1);\r
482 lSparseXmin[en_sparse_Nb_plus_Nf_minus + binShift ] = fLowMultHor*fLowMultVert-0.5;\r
483 lSparseXmax[en_sparse_Nb_plus_Nf_minus + binShift ] = fHiMultHor*fHiMultVert+0.5;\r
484 */\r
485 }\r
486\r
487 fHistClouds = new THnSparseD("cloudLRC", "cloudLRC", kSparseTotal*kSparsePIDtotal, lSparseBins, lSparseXmin, lSparseXmax);\r
488 //end of cloud implementation\r
489\r
490 //set axis names\r
491 TAxis *lSparseAxis = 0x0;\r
492 for ( Int_t d = 0; d < kSparseTotal*kSparsePIDtotal; ++d )\r
493 {\r
494 lSparseAxis = fHistClouds->GetAxis( d );\r
495 lSparseAxis->SetNameTitle( lSparseAxisNames[d], lSparseAxisNames[d] );\r
496 }\r
497\r
498\r
499 delete [] lSparseBins;\r
500 delete [] lSparseXmin;\r
501 delete [] lSparseXmax;\r
502 delete [] lSparseAxisNames;\r
503\r
504\r
505 fOutList->Add(fHistSparseDimensionLabeling);\r
506 fOutList->Add(fHistSparsePIDblocksLabeling);\r
507\r
508 // bool useSparse = false;\r
509\r
510 // !!!!!! temp comment!\r
511 fOutList->Add(fHistClouds);\r
512 }\r
513\r
514\r
515 fHistNN = new TH2D("NN","NN",fMultBinsHor, lowMultHor, hiMultHor,fMultBinsVert, lowMultVert, hiMultVert );\r
516 fHistPtN = new TH2D("PtN","PtN",fMultBinsHor, lowMultHor, hiMultHor,fPtBins/* /fPtHistXaxisRebinFactor*/,fLoPt,fHiPt);\r
517 fHistPtPt = new TH2D("PtPt","PtPt",fPtBins/fPtHistXaxisRebinFactor,fLoPt,fHiPt,fPtBins,fLoPt,fHiPt);\r
518 fProfNberr = new TProfile("nber","nber",fMultBinsHor, lowMultHor, hiMultHor);\r
519 fProfNberrPtPt = new TProfile("nberPtPt","nberPtPt",fPtBins/fPtHistXaxisRebinFactor,fLoPt,fHiPt);\r
520 fProfdPtB = new TProfile("dPtB","Overal multievent Pt_Backward (first bin) Pt_Backward^2 (sec. bin) ",16,0.5,16.5);\r
521 fProfTestLRC = new TProfile("TestLRC","Test LRC calculaion via TProfile",fMultBinsHor, lowMultHor, hiMultHor);\r
522\r
523 fHistNfCentrality = new TH2D("NfCentrality","NfCentrality",fMultBinsHor, lowMultHor, hiMultHor,101,-1.01,100.01);\r
524 fHistDifferenceNf = new TH2D("fHistDifferenceNf","Hist nF-nB;nF;nF-nB",fMultBinsHor, lowMultHor, hiMultHor,fMultBinsHor,-hiMultHor,hiMultHor);\r
525 fHistDifferenceNb = new TH2D("fHistDifferenceNb","Hist nB-nF;nB;nB-nF",fMultBinsVert, lowMultVert, hiMultVert,fMultBinsVert,-hiMultVert,hiMultVert);\r
526\r
527 // ---------- Adding data members to output list\r
528\r
529 // Adding overal statistics\r
530\r
531 //commented: to save memory\r
532 //fOutList->Add(fHistPt);\r
533 //fOutList->Add(fHistEta);\r
534\r
535 //Adding LRC hists\r
536\r
537 \r
538 if (1)\r
539 {\r
540 fOutList->Add(fHistNN);\r
541 fOutList->Add(fHistPtN);\r
542 fOutList->Add(fHistPtPt);\r
543 }\r
544 fOutList->Add(fProfNberr);\r
545 fOutList->Add(fProfNberrPtPt);\r
546 fOutList->Add(fProfdPtB);\r
547 fOutList->Add(fProfTestLRC);\r
548\r
549\r
550 //Adding window statistics\r
551 \r
552\r
553\r
554 fOutList->Add(fHistNchForward);\r
555 fOutList->Add(fHistNchBackward);\r
556 fOutList->Add(fHistNchForwardPtPt);\r
557\r
558 fOutList->Add(fHistPtForward);\r
559 fOutList->Add(fHistPtBackward);\r
560\r
561 fOutList->Add(fHistEtaForward);\r
562 fOutList->Add(fHistEtaBackward);\r
563\r
564 fOutList->Add(fHistPhiForward);\r
565 fOutList->Add(fHistPhiBackward);\r
566\r
567 fOutList->Add(fHistTracksChargeForward);\r
568 fOutList->Add(fHistTracksChargeBackward);\r
569\r
570 fOutList->Add(fHistTestPIDForward);\r
571 fOutList->Add(fHistTestPIDBackward);\r
572\r
fbe139eb 573 // fOutList->Add(fHistNfCentrality);\r
75f8532d 574 \r
575 \r
576 //fOutList->Add(fHistDifferenceNf);\r
577 //fOutList->Add(fHistDifferenceNb);\r
578\r
579 // Adding status to dPtB\r
580\r
581 fProfdPtB->Fill(3 , fStartForwardETA);\r
582 fProfdPtB->Fill(4 , fEndForwardETA);\r
583 fProfdPtB->Fill(5 , fStartBackwardETA);\r
584 fProfdPtB->Fill(6 , fEndBackwardETA);\r
585 fProfdPtB->Fill(7 , fStartForwardPhi);\r
586 fProfdPtB->Fill(8 , fEndForwardPhi);\r
587 fProfdPtB->Fill(9 , fStartBackwardPhi);\r
588 fProfdPtB->Fill(10 , fEndBackwardPhi);\r
589\r
590\r
591\r
592\r
593 fIsOnline = kTRUE;\r
594 return kTRUE;\r
d96e5666 595}\r
596AliLRCProcess::~AliLRCProcess()\r
597{\r
75f8532d 598 //Destructor\r
d96e5666 599\r
600}\r
601\r
602// --------------------------------------- Setters ------------------\r
75f8532d 603void AliLRCProcess::SetShortDef()\r
604{\r
605 // Creating task and output container name\r
fbe139eb 606 char str[200];\r
607 snprintf(str,200, "TaskLRCw%3.1fto%3.1fvs%3.1fto%3.1f",fStartForwardETA,fEndForwardETA,fStartBackwardETA,fEndBackwardETA);\r
75f8532d 608 /*if ( fWhichParticleToProcess != kLRCany\r
609 && (int)fWhichParticleToProcess > 0 && (int)fWhichParticleToProcess <= 6 ) //to avoid program falling\r
610 {\r
611 char str2[80];\r
612 TString gBinParticleNames[6] = {"Other","Electron","Muon","Pion","Kaon", "Proton"};\r
613 snprintf(str2,80, "%s_%s",str,gBinParticleNames[(int)fWhichParticleToProcess].Data());\r
614 fShortDef= str2;\r
615 }\r
616 else*/\r
617 fShortDef= str;\r
d96e5666 618\r
75f8532d 619}\r
d96e5666 620\r
75f8532d 621void AliLRCProcess::SetForwardWindow(Double_t StartETA,Double_t EndETA)\r
622{\r
d96e5666 623 //setter for the forward eta window\r
75f8532d 624 fStartForwardETA=StartETA;\r
625 fEndForwardETA=EndETA;\r
626 SetShortDef();\r
627}\r
628void AliLRCProcess::SetBackwardWindow(Double_t StartETA,Double_t EndETA)\r
629{\r
d96e5666 630 //setter for the backward eta window\r
75f8532d 631 fStartBackwardETA=StartETA;\r
632 fEndBackwardETA=EndETA;\r
633 SetShortDef();\r
634}\r
635void AliLRCProcess::SetETAWindows(Double_t _StartForwardETA,Double_t _EndForwardETA,Double_t _StartBakwardETA,Double_t _EndBakwardETA)\r
636{\r
637 //setter for the eta windows\r
638 fStartForwardETA=_StartForwardETA;\r
639 fEndForwardETA=_EndForwardETA;\r
640 fStartBackwardETA=_StartBakwardETA;\r
641 fEndBackwardETA=_EndBakwardETA;\r
642 SetShortDef();\r
643}\r
644void AliLRCProcess::GetETAWindows(Double_t &_StartForwardETA,Double_t &_EndForwardETA,Double_t &_StartBakwardETA,Double_t &_EndBakwardETA)\r
645{\r
646 //getter for the eta windows\r
647 _StartForwardETA = fStartForwardETA;\r
648 _EndForwardETA = fEndForwardETA;\r
649 _StartBakwardETA = fStartBackwardETA;\r
650 _EndBakwardETA = fEndBackwardETA;\r
651}\r
652\r
653void AliLRCProcess::GetPhiWindows(Double_t &_StartForwardPhi,Double_t &_EndForwardPhi,Double_t &_StartBakwardPhi,Double_t &_EndBakwardPhi)\r
654{\r
655 //getter for the eta windows\r
656 _StartForwardPhi = fStartForwardPhi;\r
657 _EndForwardPhi = fEndForwardPhi;\r
658 _StartBakwardPhi = fStartBackwardPhi;\r
659 _EndBakwardPhi = fEndBackwardPhi;\r
660}\r
661\r
662void AliLRCProcess::SetParticleType( char* strForwardOrBackward, char* strPid )\r
663{\r
664 //cout << "hm! strForwardOrBackward = " << strForwardOrBackward\r
665 // << ", strPid = " << strPid << endl;\r
666 //cout << "before ae! fPidForward = " << fPidForward << ", fPidBackward = " << fPidBackward << endl;\r
667\r
668 int lPid = -1;//kLRCany;\r
669 if ( !strcmp( strPid, "pion") )\r
670 lPid = 2;//kLRCpion;\r
671 else if ( !strcmp( strPid, "kaon") )\r
672 lPid = 3;//kLRCkaon;\r
673 else if ( !strcmp( strPid, "proton") )\r
674 lPid = 4;//kLRCproton;\r
675 else if ( !strcmp( strPid, "knownpid") )\r
676 lPid = 100;//will will histos if we KNOW PID! (not important which)\r
677\r
678 //set pid for window\r
679 if ( !strcmp( strForwardOrBackward, "fwd") )\r
680 fPidForward = lPid;\r
681 else if ( !strcmp( strForwardOrBackward, "bkwd") )\r
682 fPidBackward = lPid;\r
683 //cout << "ae! lPid = " << lPid << ", fPidForward = " << fPidForward << ", fPidBackward = " << fPidBackward << endl;\r
684 //int aaaa;\r
685 //cin>> aaaa;\r
686}\r
687\r
688\r
689void AliLRCProcess::SetHistPtRangeForwardWindowRebinFactor( Int_t ptHistXaxisRebinFactor )\r
690{\r
691 // Rebining for Pt histograms X-axis\r
692 if(fIsOnline)\r
693 {\r
694 Printf("Can't change histos paramiters after InitDataMembers() was called! \n");\r
695 return ;\r
696 }\r
697 fPtHistXaxisRebinFactor = ptHistXaxisRebinFactor;\r
698}\r
699\r
700void AliLRCProcess::SetHistPtRange(Double_t LoPt,Double_t HiPt,Int_t PtBins)\r
701{\r
702 // Sets Pt range and number of bins for Pt axis of histos\r
703 if(fIsOnline)\r
704 {\r
705 Printf("Can't change histos paramiters after InitDataMembers() was called! \n");\r
706 return ;\r
707 }\r
708 // Setter for Pt range and N bins in histos\r
709 fLoPt=LoPt;\r
710 fHiPt=HiPt;\r
711 fPtBins=PtBins;\r
712}\r
713void AliLRCProcess::SetHistMultRange( Int_t whichWindow, Int_t LoMult,Int_t HiMult,Int_t MultBins)\r
714{\r
715 // Setter for multiplicity range and N bins in histos\r
716 if ( whichWindow == 0 ) //set range for both windows\r
717 {\r
718 SetHistMultRangeHor( LoMult, HiMult, MultBins) ;\r
719 SetHistMultRangeVert( LoMult, HiMult, MultBins) ;\r
720 }\r
721 else if ( whichWindow == 1 ) //for fwd\r
722 SetHistMultRangeHor( LoMult, HiMult, MultBins) ;\r
723 else if ( whichWindow == 2 ) //for bwd\r
724 SetHistMultRangeVert( LoMult, HiMult, MultBins) ;\r
725 /*\r
726\r
727 if(fIsOnline)\r
728 {\r
729 Printf("Can't change histos paramiters after InitDataMembers() was called! \n");\r
730 return ;\r
731 }\r
732 fLoMult=LoMult;\r
733 fHiMult=HiMult;\r
734 if(!MultBins)\r
735 {\r
736 fMultBins=fHiMult-fLoMult+1;\r
737 }else\r
738 {\r
739 fMultBins=MultBins;\r
740 }*/\r
741}\r
742\r
743void AliLRCProcess::SetHistMultRangeHor(Int_t LoMult,Int_t HiMult,Int_t MultBins)\r
744{\r
745 // Setter for multiplicity range and N bins in histos\r
746 if(fIsOnline)\r
747 {\r
748 Printf("Can't change histos paramiters after InitDataMembers() was called! \n");\r
749 return ;\r
750 }\r
751 fLowMultHor = LoMult;\r
752 fHiMultHor = HiMult;\r
753 if(!MultBins)\r
754 {\r
755 fMultBinsHor = fHiMultHor-fLowMultHor+1;\r
756 }else\r
757 {\r
758 fMultBinsHor = MultBins;\r
759 }\r
760}\r
761\r
762void AliLRCProcess::SetHistMultRangeVert(Int_t LoMult,Int_t HiMult,Int_t MultBins)\r
763{\r
764 // Setter for multiplicity range and N bins in histos\r
765 if(fIsOnline)\r
766 {\r
767 Printf("Can't change histos parameters after InitDataMembers() was called! \n");\r
768 return ;\r
769 }\r
770 fLowMultVert = LoMult;\r
771 fHiMultVert = HiMult;\r
772 if(!MultBins)\r
773 {\r
774 fMultBinsVert = fHiMultVert-fLowMultVert+1;\r
775 }else\r
776 {\r
777 fMultBinsVert = MultBins;\r
778 }\r
779}\r
780\r
781void AliLRCProcess::SetOutputSlotNumber(Int_t SlotNumber)\r
782{\r
783 //Sets number of output slot for LRCProcessor\r
784 fOutputSlot=SlotNumber;\r
785}\r
d96e5666 786\r
787//________________________________________________________________________\r
788\r
789\r
790\r
41f63c69 791TList* AliLRCProcess::CreateOutput() const\r
d96e5666 792{\r
75f8532d 793 // Creates a link to output data TList\r
794 return fOutList;\r
d96e5666 795}\r
796\r
75f8532d 797TString AliLRCProcess::GetShortDef() const\r
d96e5666 798{\r
75f8532d 799 return fShortDef;\r
d96e5666 800}\r
801\r
41f63c69 802Int_t AliLRCProcess::GetOutputSlotNumber() const\r
803{\r
75f8532d 804 // Returns number of output slot for LRCProcessor\r
805 return fOutputSlot;\r
41f63c69 806}\r
807\r
d96e5666 808void AliLRCProcess::StartEvent()\r
809{\r
75f8532d 810 // Open new Event for track by track event import\r
811 if(fIsEventOpend) // Check if trying to open event more than once !\r
812 {\r
813 Printf("Event is already opened! Auto finishing ! \n");\r
814 cout<<fShortDef<<": event count = "<<fEventCount<<" ";\r
815 Printf("NchF = %i,NchB = %i \n",fNchFw,fNchBw);\r
41f63c69 816\r
75f8532d 817 FinishEvent();\r
818 }\r
819 if(!fIsOnline) // Autocreating histos if InitDataMembers was not called by hand\r
820 {\r
821 Printf("InitDataMembers was not called by hand ! Autocreating histos...\n");\r
822 InitDataMembers();\r
823 }\r
d96e5666 824\r
75f8532d 825 fNchFw=0;\r
826 fSumPtFw=0;\r
827 fNchBw=0;\r
828 fSumPtBw=0;\r
829 fSumPtBw2=0;\r
830 \r
831 fNchFwPlus = 0;\r
832 fNchBwPlus = 0;\r
833 fNchFwMinus = 0;\r
834 fNchBwMinus = 0;\r
835 \r
836 //added 23.03\r
837 for ( int pid = 0; pid < kSparsePIDtotal; pid++ )\r
838 {\r
839 fNchFwPID[pid] = 0;\r
840 fNchFwPlusPID[pid] = 0;\r
841 fNchFwMinusPID[pid] = 0;\r
842 fSumPtFwPID[pid] = 0;\r
843 fSumEtFwPID[pid] = 0;\r
844 \r
845 fNchBwPID[pid] = 0;\r
846 fNchBwPlusPID[pid] = 0;\r
847 fNchBwMinusPID[pid] = 0;\r
848 fSumPtBwPID[pid] = 0;\r
849 fSumEtBwPID[pid] = 0;\r
850 }\r
851 \r
852 //fNchFwPtPt = 0;\r
853\r
854 fIsEventOpend=kTRUE;\r
d96e5666 855}\r
75f8532d 856void AliLRCProcess::AddTrackForward(Double_t Pt, Double_t Eta ,Double_t Phi, Short_t Charge, Int_t particleType )\r
41f63c69 857{\r
75f8532d 858 // Imports track to the event directly to Forward window\r
859 if(!fIsEventOpend)\r
860 {Printf("Event is not opened!\n");\r
861 return;}\r
862\r
863 //Bool_t lAddDecision = kFALSE;\r
864\r
865 //if ( fPidForward == 100 ) //add particle if we know pid (i.e. particleType != -1)\r
866 //{\r
867 //if ( particleType != -1 )\r
868 //{\r
869 // lAddDecision = kTRUE;\r
870 //cout << "fill fwd with pid " << particleType << endl;\r
871 //}\r
872 //}\r
873 //else if ( fPidForward != -1 ) //if we specify pid for this window - just check it\r
874 //{\r
875 //if ( particleType == fPidForward )\r
876 //{\r
877 //lAddDecision = kTRUE;\r
878 //cout << "fill fwd with pid " << particleType << endl;\r
879 //}\r
880 //}\r
881 //else\r
882 //lAddDecision = kTRUE;\r
883\r
884 //if ( !lAddDecision )\r
885 //return;\r
886\r
887 fHistTestPIDForward->Fill( particleType );\r
888\r
889 fNchFw++;\r
890 Charge > 0 ? fNchFwPlus++ : fNchFwMinus++;\r
891 fSumPtFw+=Pt;\r
892 fHistPtForward->Fill(Pt);\r
893 fHistEtaForward->Fill(Eta);\r
894 fHistPhiForward->Fill(Phi);\r
41f63c69 895\r
75f8532d 896 //added 15.12.12\r
897 fHistTracksChargeForward->Fill(Charge);\r
898 \r
899 //added 23.03\r
900 for ( int pid = 0; pid < kSparsePIDtotal; pid++ )\r
901 {\r
902 if ( pid == kSparsePIDany //write ALL pid types\r
903 ||\r
904 ( pid == kSparsePIDdefined && particleType != -1 ) //write defined particles\r
905 ||\r
906 ( fCorrespondanceWithAliROOTpid[pid] == particleType ) //write not defined particles\r
907 )\r
908 {\r
909 fNchFwPID[pid]++;\r
910 Charge > 0 ? fNchFwPlusPID[pid]++ : fNchFwMinusPID[pid]++;\r
911 fSumPtFwPID[pid] += Pt;\r
912 if ( pid != kSparsePIDany )\r
913 {\r
914 Double_t lMass = 0;//AliPID::ParticleMass( particleType );\r
915 fSumEtFwPID[pid] += sqrt( Pt*Pt + lMass*lMass ) ;\r
916 }\r
917 }\r
918 }\r
41f63c69 919\r
920}\r
75f8532d 921void AliLRCProcess::AddTrackBackward(Double_t Pt, Double_t Eta ,Double_t Phi, Short_t Charge, Int_t particleType )\r
41f63c69 922{\r
75f8532d 923 // Imports track to the event directly to Backward window\r
924 if(!fIsEventOpend)\r
925 {Printf("Event is not opened!\n");\r
926 return;}\r
927\r
928 /*Bool_t lAddDecision = kFALSE;\r
929\r
930 if ( fPidBackward == 100 ) //add particle if we know pid (i.e. particleType != -1)\r
931 {\r
932 if ( particleType != -1 )\r
933 {\r
934 lAddDecision = kTRUE;\r
935 //cout << "fill fwd with pid " << particleType << endl;\r
936 }\r
937 }\r
938 else if ( fPidBackward != -1 ) //if we specify pid for this window - just check it\r
939 {\r
940 if ( particleType == fPidBackward )\r
941 {\r
942 lAddDecision = kTRUE;\r
943 //cout << "fill fwd with pid " << particleType << endl;\r
944 }\r
945 }\r
946 else\r
947 lAddDecision = kTRUE;\r
948\r
949 if ( !lAddDecision )\r
950 return;\r
951 */\r
952 fHistTestPIDBackward->Fill( particleType );\r
953\r
954 fNchBw++;\r
955 Charge > 0 ? fNchBwPlus++ : fNchBwMinus++;\r
956 fSumPtBw += Pt;\r
957 fSumPtBw2 += Pt*Pt;\r
958 fProfdPtB->Fill( 1, Pt );\r
959 fProfdPtB->Fill( 2, Pt*Pt );\r
960 fHistPtBackward->Fill( Pt );\r
961 fHistEtaBackward->Fill( Eta );\r
962 fHistPhiBackward->Fill( Phi );\r
963\r
964 //added 15.12.12\r
965 fHistTracksChargeBackward->Fill(Charge);\r
966\r
967 //added 23.03\r
968 for ( int pid = 0; pid < kSparsePIDtotal; pid++ )\r
969 {\r
970 if ( pid == kSparsePIDany //write ALL pid types\r
971 ||\r
972 ( pid == kSparsePIDdefined && particleType != -1 ) //write defined particles\r
973 ||\r
974 ( fCorrespondanceWithAliROOTpid[pid] == particleType )\r
975 )\r
976 {\r
977 fNchBwPID[pid]++;\r
978 Charge > 0 ? fNchBwPlusPID[pid]++ : fNchBwMinusPID[pid]++;\r
979 fSumPtBwPID[pid] += Pt;\r
980 if ( pid != kSparsePIDany )\r
981 {\r
982 Double_t lMass = 0;//AliPID::ParticleMass( particleType );\r
983 fSumEtBwPID[pid] += sqrt( Pt*Pt + lMass*lMass ) ;\r
984 }\r
985 \r
986 }\r
987 }\r
988\r
41f63c69 989}\r
990\r
991\r
992\r
75f8532d 993void AliLRCProcess::AddTrackPtEta(Double_t Pt, Double_t Eta ,Double_t Phi, Short_t Charge, Int_t particleType )\r
d96e5666 994{\r
75f8532d 995 //cout << Pt << endl;\r
996\r
997\r
998 //if particle type is different - ignore the track\r
999 //if ( fWhichParticleToFill != -1 && ParticleType != fWhichParticleToFill )\r
1000 // return;\r
1001 //Track by track event import : Imports track to the event\r
1002\r
1003 //cout << "fWhichParticleToProcess = " << fWhichParticleToProcess\r
1004 // << ", particleType = " << particleType << endl;\r
1005 if(!fIsEventOpend)\r
1006 {Printf("Event is not opened!\n");\r
1007 return;}\r
1008\r
1009 // Global track data\r
1010 fHistPt->Fill(Pt);\r
1011 fHistEta->Fill(Eta);\r
1012\r
1013 //Bool_t lAddForwardDecision = kFALSE;\r
1014 //Bool_t lAddBackwardDecision = kFALSE;\r
1015\r
1016 //Forward window\r
1017 if( ( fStartForwardETA < Eta ) && ( Eta < fEndForwardETA ) )\r
1018 if( IsPhiInRange( Phi, fStartForwardPhi, fEndForwardPhi) )//( fStartForwardPhi < Phi ) && ( Phi < fEndForwardPhi ) )\r
1019 {\r
1020 AddTrackForward( Pt, Eta, Phi, Charge, particleType );\r
1021 //if ( fPidFillCondition == kLRCpidForForwardOnly\r
1022 // || fPidFillCondition == kLRCpidForBoth )\r
1023 //if ( fPidForward != -1 )//kLRCany )\r
1024 //{\r
1025 // if ( particleType == fPidForward )//kLRCpion )//particleType )\r
1026 // {\r
1027 // lAddForwardDecision = kTRUE;//AddTrackForward( Pt, Eta, Phi );\r
1028 //cout << "fill fwd with pid " << particleType << endl;\r
1029 // }\r
1030 //}\r
1031 //else\r
1032 // lAddForwardDecision = kTRUE;//AddTrackForward( Pt, Eta, Phi );\r
1033 }\r
1034 //if ( lAddForwardDecision )\r
1035 //{\r
1036 // AddTrackForward( Pt, Eta, Phi, particleType );\r
1037 // fHistTestPIDForward->Fill( particleType );\r
1038 //}\r
1039\r
1040 //Backward window\r
1041 if( ( fStartBackwardETA < Eta ) && ( Eta < fEndBackwardETA ) )\r
1042 if (\r
1043 (\r
1044 IsPhiInRange( Phi, fStartBackwardPhi, fEndBackwardPhi) //( fStartBackwardPhi < Phi ) && ( Phi < fEndBackwardPhi )\r
1045 )\r
1046 ||\r
1047 (\r
1048 fDoubleSidedBackwardPhiWindow //if this option is true\r
1049 && IsPhiInRange( Phi, fStartBackwardPhi + TMath::Pi(), fEndBackwardPhi + TMath::Pi() ) //\r
1050 //&& ( fStartBackwardPhi + TMath::Pi() < Phi )\r
1051 //&& ( Phi < fEndBackwardPhi + TMath::Pi() )\r
1052 )\r
1053 )\r
1054 {\r
1055 AddTrackBackward( Pt, Eta, Phi, Charge, particleType );\r
1056 //if ( fPidFillCondition == kLRCpidForBackwardOnly\r
1057 // || fPidFillCondition == kLRCpidForBoth )\r
1058 //if ( fPidBackward != -1 )//kLRCany )\r
1059 //{\r
1060 // if ( particleType == fPidBackward )//kLRCpion )//particleType )\r
1061 // {\r
1062 // lAddBackwardDecision = kTRUE;//AddTrackBackward( Pt, Eta, Phi );\r
1063 //cout << "fill bkwd with pid " << particleType << endl;\r
1064 // }\r
1065\r
1066 //}\r
1067 //else\r
1068 // lAddBackwardDecision = kTRUE;//AddTrackBackward( Pt, Eta, Phi );\r
1069 }\r
1070 //if ( lAddBackwardDecision )\r
1071 //{\r
1072 // AddTrackBackward( Pt, Eta, Phi, particleType );\r
1073 // fHistTestPIDBackward->Fill( particleType );\r
1074 //}\r
1075\r
1076}\r
1077\r
d96e5666 1078\r
d96e5666 1079\r
75f8532d 1080void AliLRCProcess::AddTrackPtEtaMixing( Int_t winFB, Double_t Pt, Double_t Eta ,Double_t Phi, Short_t Charge, Int_t particleType )\r
1081{\r
1082 // put track in F or B window using varible winFB\r
1083 if(!fIsEventOpend)\r
1084 {\r
1085 Printf("Event is not opened!\n");\r
1086 return;\r
1087 }\r
1088\r
1089 // Global track data\r
41f63c69 1090 fHistPt->Fill(Pt);\r
1091 fHistEta->Fill(Eta);\r
1092\r
1093\r
d96e5666 1094 //Forward window\r
75f8532d 1095 if( winFB == 0\r
1096 && ( fStartForwardETA < Eta ) && ( Eta < fEndForwardETA ) )\r
1097 if( IsPhiInRange( Phi, fStartForwardPhi, fEndForwardPhi) ) // (fStartForwardPhi < Phi ) && ( Phi < fEndForwardPhi ) )\r
1098 {\r
1099 AddTrackForward( Pt, Eta, Phi, Charge, particleType );\r
1100 }\r
41f63c69 1101\r
d96e5666 1102 //Backward window\r
75f8532d 1103 if( winFB == 1\r
1104 && ( fStartBackwardETA < Eta ) && ( Eta < fEndBackwardETA ) )\r
1105 if (\r
1106 (\r
1107 IsPhiInRange( Phi, fStartBackwardPhi, fEndBackwardPhi) //( fStartBackwardPhi < Phi ) && ( Phi < fEndBackwardPhi )\r
1108 )\r
1109 ||\r
1110 (\r
1111 fDoubleSidedBackwardPhiWindow //if this option is true\r
1112 && IsPhiInRange( Phi, fStartBackwardPhi + TMath::Pi(), fEndBackwardPhi + TMath::Pi() )\r
1113 //&& ( fStartBackwardPhi + TMath::Pi() < Phi )\r
1114 //&& ( Phi < fEndBackwardPhi + TMath::Pi() )\r
1115 )\r
1116 )\r
1117 {\r
1118 AddTrackBackward( Pt, Eta, Phi, Charge, particleType );\r
1119 }\r
1120\r
d96e5666 1121\r
1122}\r
75f8532d 1123\r
1124void AliLRCProcess::FinishEvent(Bool_t kDontCount)\r
d96e5666 1125{\r
75f8532d 1126 // Track by track event import : Close opened event and fill event summary histos\r
1127\r
1128 if(!fIsEventOpend)\r
1129 {\r
1130 Printf("Event is not opened!\n");\r
1131 return;\r
1132 }\r
1133 if ( kDontCount ) //don't count this event! just ignore it\r
1134 {\r
1135 fIsEventOpend = kFALSE;\r
1136 return;\r
1137 }\r
1138 //fHistSparseDimensionLabeling->Fill(1);\r
1139 //Filling even-total data\r
1140 //cout << "filling" << endl;\r
1141 /*Double_t lCloudData[en_sparse_total*en_sparse_PID_total];\r
1142 lCloudData[en_sparse_N_f] = fNchFw; //write Nf\r
1143 lCloudData[en_sparse_N_b] = fNchBw; //write Nb\r
1144 lCloudData[en_sparse_N2_f] = fNchFw*fNchFw; //write Nf^2\r
1145 lCloudData[en_sparse_Nf_Nb] = fNchFw*fNchBw; //write Nb\r
1146 \r
1147 lCloudData[en_sparse_Pt_f] = 0; //fill bin 0, if don't have appropriate PtSum\r
1148 lCloudData[en_sparse_Pt_b] = 0; //fill bin 0, if don't have appropriate PtSum\r
1149\r
1150 lCloudData[en_sparse_Nf_plus] = fNchFwPlus;\r
1151 lCloudData[en_sparse_Nf_minus] = fNchFwMinus;\r
1152 lCloudData[en_sparse_Nb_plus] = fNchBwPlus;\r
1153 lCloudData[en_sparse_Nb_minus] = fNchBwMinus;\r
1154 lCloudData[en_sparse_Nf_plus_Nb_minus] = fNchFwPlus * fNchBwMinus;\r
1155 lCloudData[en_sparse_Nb_plus_Nf_minus] = fNchBwPlus * fNchFwMinus; */\r
1156 \r
1157 fHistNN->Fill(fNchFw,fNchBw);\r
1158\r
1159 if ( fUseAccumulatingHist )\r
1160 {\r
1161\r
1162 fArrAccumulatedValues->Fill( en_arr_labels_NN_Nevents, 1 );\r
1163 fArrAccumulatedValues->Fill( en_arr_labels_NN_Nf , fNchFw );\r
1164 fArrAccumulatedValues->Fill( en_arr_labels_NN_Nb , fNchBw );\r
1165 fArrAccumulatedValues->Fill( en_arr_labels_NN_N2_f , fNchFw*fNchFw );\r
1166 fArrAccumulatedValues->Fill( en_arr_labels_NN_Nf_Nb , fNchFw*fNchBw );\r
1167 }\r
1168\r
1169 if( fNchBw != 0 )\r
1170 {\r
1171 fSumPtBw = fSumPtBw / fNchBw;\r
1172 //lCloudData[en_sparse_Pt_b] = fSumPtBw; //write <PtB>\r
1173 fProfTestLRC->Fill( fNchFw, fSumPtBw );\r
1174 fHistPtN->Fill( fNchFw, fSumPtBw );\r
1175 //cout << "fill PtN: fNchFw = " << fNchFw << ", fSumPtBw=" << fSumPtBw << endl;\r
1176 fProfNberr->Fill(fNchFw, 1.0 / fNchBw);\r
1177\r
1178 if ( fUseAccumulatingHist )\r
1179 {\r
1180 fArrAccumulatedValues->Fill( en_arr_labels_PtN_Nevents, 1 );\r
1181 fArrAccumulatedValues->Fill( en_arr_labels_PtN_Nf , fNchFw );\r
1182 fArrAccumulatedValues->Fill( en_arr_labels_PtN_PtB , fSumPtBw );\r
1183 fArrAccumulatedValues->Fill( en_arr_labels_PtN_N2_f , fNchFw*fNchFw );\r
1184 fArrAccumulatedValues->Fill( en_arr_labels_PtN_Ptb_Nf , fSumPtBw*fNchFw );\r
1185 }\r
1186\r
1187 if( fNchFw != 0 )\r
1188 {\r
1189 fSumPtFw = fSumPtFw / fNchFw;\r
1190 //lCloudData[en_sparse_Pt_f] = fSumPtFw; //write <PtF>\r
1191 fHistPtPt->Fill( fSumPtFw, fSumPtBw );\r
1192 fProfNberrPtPt->Fill( fSumPtFw, 1.0 / fNchBw );\r
1193 // dPtB for PtPt\r
1194 fProfdPtB->Fill( 15, fSumPtBw, fNchBw );\r
1195 fProfdPtB->Fill( 16, fSumPtBw2 / fNchBw, fNchBw );\r
1196 fHistNchForwardPtPt->Fill(fNchFw);\r
1197\r
1198 if ( fUseAccumulatingHist )\r
1199 {\r
1200 fArrAccumulatedValues->Fill( en_arr_labels_PtPt_Nevents, 1 );\r
1201 fArrAccumulatedValues->Fill( en_arr_labels_PtPt_PtF , fSumPtFw );\r
1202 fArrAccumulatedValues->Fill( en_arr_labels_PtPt_PtB , fSumPtBw );\r
1203 fArrAccumulatedValues->Fill( en_arr_labels_PtPt_Pt2_f , fSumPtFw*fSumPtFw );\r
1204 fArrAccumulatedValues->Fill( en_arr_labels_PtPt_Ptf_Ptb, fSumPtBw*fSumPtFw );\r
1205 }\r
1206\r
1207 }\r
1208 }\r
1209\r
1210\r
1211\r
1212\r
1213\r
1214 if ( fUseSparse )\r
1215 {\r
1216 Double_t lCloudData[kSparseTotal*kSparsePIDtotal];\r
1217\r
1218 for (Int_t d = 0; d < kSparsePIDtotal; ++d)\r
1219 {\r
1220 Int_t binShift = kSparseTotal*d; //step over dimension set\r
1221\r
1222 lCloudData[kSparseNf + binShift ] = fNchFwPID[d]; //write Nf\r
1223 lCloudData[kSparseNb + binShift ] = fNchBwPID[d]; //write Nb\r
1224 lCloudData[en_sparse_N2_f + binShift ] = fNchFwPID[d]*fNchFwPID[d]; //write Nf^2\r
1225 lCloudData[en_sparse_Nf_Nb + binShift ] = fNchFwPID[d]*fNchBwPID[d]; //write Nb\r
1226\r
1227 lCloudData[kSparsePtF + binShift ] = 0; //fill bin 0, if don't have appropriate PtSum\r
1228 lCloudData[kSparsePtB + binShift ] = 0; //fill bin 0, if don't have appropriate PtSum\r
1229\r
1230 lCloudData[en_sparse_Ptb_Nf + binShift ] = 0;\r
1231 lCloudData[en_sparse_Pt2_f + binShift ] = 0;\r
1232 lCloudData[en_sparse_Ptf_Ptb + binShift ] = 0;\r
1233\r
1234\r
1235 if( fNchBwPID[d] != 0 )\r
1236 {\r
1237 double lSumPtBwPID = fSumPtBwPID[d] / fNchBwPID[d];\r
1238 lCloudData[kSparsePtB + binShift ] = lSumPtBwPID; //write <PtB>\r
1239\r
1240 fSumEtBwPID[d] = fSumEtBwPID[d] / fNchBwPID[d];\r
1241 //lCloudData[en_sparse_Et_b + binShift ] = fSumEtBwPID[d]; //write <PtB>\r
1242 lCloudData[en_sparse_Ptb_Nf + binShift ] = lSumPtBwPID * fNchFwPID[d];\r
1243\r
1244 //fProfTestLRC->Fill( fNchFw, fSumPtBw );\r
1245 //fHistPtN->Fill( fNchFw, fSumPtBw );\r
1246 //cout << "fill PtN: fNchFw = " << fNchFw << ", fSumPtBw=" << fSumPtBw << endl;\r
1247\r
1248 //fProfNberr->Fill(fNchFw, 1.0 / fNchBw);\r
1249\r
1250\r
1251 if( fNchFwPID[d] != 0 )\r
1252 {\r
1253 double lSumPtFwPID = fSumPtFwPID[d] / fNchFwPID[d];\r
1254 lCloudData[kSparsePtF + binShift ] = lSumPtFwPID; //write <PtF>\r
1255\r
1256 fSumEtFwPID[d] = fSumEtFwPID[d] / fNchFwPID[d];\r
1257\r
1258 lCloudData[en_sparse_Pt2_f + binShift ] = lSumPtFwPID * lSumPtFwPID;\r
1259 lCloudData[en_sparse_Ptf_Ptb + binShift ] = lSumPtFwPID*lSumPtBwPID;\r
1260\r
1261 //lCloudData[en_sparse_Et_f + binShift ] = fSumEtFwPID[d]; //write <PtF>\r
1262 //fHistPtPt->Fill( fSumPtFw, fSumPtBw );\r
1263 //fProfNberrPtPt->Fill( fSumPtFw, 1.0 / fNchBw );\r
1264 // dPtB for PtPt\r
1265 //fProfdPtB->Fill( 15, fSumPtBw, fNchBw );\r
1266 //fProfdPtB->Fill( 16, fSumPtBw2 / fNchBw, fNchBw );\r
1267 //fHistNchForwardPtPt->Fill(fNchFw);\r
1268\r
1269 }\r
1270 }\r
1271 /*\r
1272 lCloudData[en_sparse_Nf_plus + binShift ] = fNchFwPlusPID[d];\r
1273 lCloudData[en_sparse_Nf_minus + binShift ] = fNchFwMinusPID[d];\r
1274 lCloudData[en_sparse_Nb_plus + binShift ] = fNchBwPlusPID[d];\r
1275 lCloudData[en_sparse_Nb_minus + binShift ] = fNchBwMinusPID[d];\r
1276 lCloudData[en_sparse_Nf_plus_Nb_minus + binShift ] = fNchFwPlusPID[d] * fNchBwMinusPID[d];\r
1277 lCloudData[en_sparse_Nb_plus_Nf_minus + binShift ] = fNchBwPlusPID[d] * fNchFwMinusPID[d];\r
1278 */\r
1279 }\r
1280\r
1281 //tmp (22.03): fill pid with fignya data\r
1282 /* for (Int_t d = 1; d < en_sparse_PID_total; ++d)\r
1283 {\r
1284 Int_t binShift = en_sparse_total*d;\r
1285 lCloudData[en_sparse_N_f + binShift ] = 1+d; //write Nf\r
1286 lCloudData[en_sparse_N_b + binShift ] = 2+d; //write Nb\r
1287 lCloudData[en_sparse_N2_f + binShift ] = 3+d; //write Nf^2\r
1288 lCloudData[en_sparse_Nf_Nb + binShift ] = 4+d; //write Nb\r
1289\r
1290 lCloudData[en_sparse_Pt_f + binShift ] = 5+d; //fill bin 0, if don't have appropriate PtSum\r
1291 lCloudData[en_sparse_Pt_b + binShift ] = 6+d; //fill bin 0, if don't have appropriate PtSum\r
1292\r
1293 lCloudData[en_sparse_Nf_plus + binShift ] = 7+d;\r
1294 lCloudData[en_sparse_Nf_minus + binShift ] = 8+d;\r
1295 lCloudData[en_sparse_Nb_plus + binShift ] = 9+d;\r
1296 lCloudData[en_sparse_Nb_minus + binShift ] = 10+d;\r
1297 lCloudData[en_sparse_Nf_plus_Nb_minus + binShift ] = 11+d;\r
1298 lCloudData[en_sparse_Nb_plus_Nf_minus + binShift ] = 12+d;\r
1299 }\r
1300 */\r
1301\r
1302 // cout << "before filling" << endl;\r
1303 fHistClouds->Fill( lCloudData ); //fill sparse hist with Nf, Nb, <PtF>, <PtB>\r
1304 // cout << "filled." << endl;\r
1305 }\r
1306\r
1307\r
1308\r
1309\r
1310 //additional info-hist\r
1311 if ( fNchFw > 0 || fNchBw > 0 )\r
1312 {\r
1313 Double_t lAvMult = ( fNchFw + fNchBw ) / 2.;\r
1314 fHistDifferenceNf->Fill( fNchFw, ( fNchFw-fNchBw ) / lAvMult );\r
1315 fHistDifferenceNb->Fill( fNchBw, ( fNchBw-fNchFw ) / lAvMult);\r
1316 }\r
1317\r
1318 //cout << "n particles: " << fNchFw << " , Back = " << fNchBw << endl;\r
1319 //cout << "fHistNN: " << fHistNN->GetEntries() << endl;\r
1320 //cout << "mean= " << fHistNN->GetMean() << endl;\r
1321\r
1322\r
1323 fHistNchForward->Fill(fNchFw);\r
1324 fHistNchBackward->Fill(fNchBw);\r
1325\r
1326 fEventCount++;\r
1327 fIsEventOpend = kFALSE;\r
1328 \r
1329 //fill nf-centr plot\r
1330 fHistNfCentrality->Fill( fNchFw, fEventCentrality );\r
1331 \r
1332 //cout<<fShortDef<<": event count = "<<fEventCount<<" ";\r
1333 // Printf("NchF = %i,NchB = %i",fNchFw,fNchBw);\r
d96e5666 1334}\r
1335\r
75f8532d 1336Bool_t AliLRCProcess::IsPhiInRange( Double_t phi, Double_t phiBoundMin, Double_t phiBoundMax )\r
1337{\r
1338 if ( ( phiBoundMin < phi ) && ( phi < phiBoundMax ) )\r
1339 return kTRUE;\r
1340\r
1341 //when bound is more than 2pi - check phi+2pi!\r
1342 phi += 2 * TMath::Pi();\r
1343 if ( ( phiBoundMin < phi ) && ( phi < phiBoundMax ) )\r
1344 return kTRUE;\r
1345\r
1346 return kFALSE; //phi not in range\r
1347}\r