]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG4/macros/ConfigGammaConversion.C
Changed to new naming scheme for histograms, added functionality to the analysis...
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigGammaConversion.C
... / ...
CommitLineData
1/** VERSION NUMBER 0 */
2/** new Version Kenneth */
3
4Bool_t usePWG4PartCorr = kTRUE;
5
6
7/** ------------------------------ Monte Carlo flag -----------------------------------------*/
8Bool_t doMCTruth = kTRUE;
9/** ---------------------------- end Monte Carlo flag ---------------------------------------*/
10
11/** ------------------------- Choose KFParticle OR ESDTrack --------------------------------*/
12Bool_t useKFParticle = kTRUE;
13Bool_t useESDTrack = kFALSE;
14/** ----------------------- end Choose KFParticle OR ESDTrack -----------------------------*/
15
16
17Bool_t calculateBackground = kTRUE;
18
19Int_t numberOfFilesToAnalyze=0;
20
21/** ---------------------------------- define cuts here ------------------------------------*/
22
23Int_t pidOfNegativeTrack=11;
24Int_t pidOfPositiveTrack=-11;
25
26Double_t LineCutZRSlope = 0.662487;
27Double_t LineCutZValue = 7.;
28
29Double_t maxRCut = 160.;
30Double_t etaCut = 1.2;
31Double_t ptCut = 0.02;
32Double_t chi2CutConversion = 20.;
33Double_t chi2CutMeson = 20.;
34
35Double_t xVertexCut = 0.;
36Double_t yVertexCut = 0.;
37Double_t zVertexCut = 0.;
38
39Double_t sigmaCutGammaMass=0.0001;
40
41Bool_t useImprovedVertex = kTRUE;
42
43// define masses of different particles, this will be used by the KF particle
44// together with the width to set mass constraints. Units in GeV.
45Double_t electronMass = 0.00051099892;
46Double_t gammaMass = 0.;
47Double_t pi0Mass = 0.1349766;
48Double_t etaMass = 0.54751;
49
50// define the width constraint used by KF particle.
51Double_t gammaWidth = 0.01;
52Double_t pi0Width = 0.01;
53Double_t etaWidth = 0.01;
54
55// define the probability of track being an electron
56Double_t probElectron = 0.002;
57
58Double_t minOpeningAngleGhostCut = 0.01;
59
60/** ----------------------------------end define cuts here----------------------------------*/
61
62/** -------------------------------- Phi/R Mapping ---------------------------------------*/
63Int_t nPhiIndex = 18;
64Int_t nRIndex = 40;
65
66Double_t minRadius = 0.;
67Double_t maxRadius = 200.;
68Double_t minPhi = -TMath::Pi();
69Double_t maxPhi = TMath::Pi();
70/** ------------------------------- end Phi/R Mapping ------------------------------------*/
71
72
73
74/** ------------------- define which histograms to plot here --------------------------------*/
75/** NB: to change the bin numbers, see below the histogram flags */
76Bool_t plotMCConversionR = kTRUE;
77Bool_t plotMCConversionZR = kTRUE;
78Bool_t plotMCConversionXY = kTRUE;
79Bool_t plotMCConversionOpeningAngle = kTRUE;
80
81Bool_t plotMCEEnergy = kTRUE;
82Bool_t plotMCEPt = kTRUE;
83Bool_t plotMCEEta = kTRUE;
84Bool_t plotMCEPhi = kTRUE;
85
86Bool_t plotMCPEnergy = kTRUE;
87Bool_t plotMCPPt = kTRUE;
88Bool_t plotMCPEta = kTRUE;
89Bool_t plotMCPPhi = kTRUE;
90
91Bool_t plotMCallGammaEnergy = kTRUE;
92Bool_t plotMCallGammaPt = kTRUE;
93Bool_t plotMCallGammaEta = kTRUE;
94Bool_t plotMCallGammaPhi = kTRUE;
95Bool_t plotMCallGammaRapid = kTRUE;
96
97
98Bool_t plotMCConvGammaEnergy = kTRUE;
99Bool_t plotMCConvGammaPt = kTRUE;
100Bool_t plotMCConvGammaEta = kTRUE;
101Bool_t plotMCConvGammaPhi = kTRUE;
102Bool_t plotMCConvGammaRapid = kTRUE;
103Bool_t plotMCConvGammaPtvsEta = kTRUE;
104
105Bool_t plotMCallDirectGammaEnergy = kTRUE;
106Bool_t plotMCallDirectGammaPt = kTRUE;
107Bool_t plotMCallDirectGammaEta = kTRUE;
108Bool_t plotMCallDirectGammaPhi = kTRUE;
109Bool_t plotMCallDirectGammaRapid = kTRUE;
110
111
112Bool_t plotMCConvDirectGammaEnergy = kTRUE;
113Bool_t plotMCConvDirectGammaPt = kTRUE;
114Bool_t plotMCConvDirectGammaEta = kTRUE;
115Bool_t plotMCConvDirectGammaPhi = kTRUE;
116Bool_t plotMCConvDirectGammaRapid = kTRUE;
117
118Bool_t plotMCMotherEta = kTRUE;
119Bool_t plotMCMotherRapid = kTRUE;
120Bool_t plotMCMotherPhi = kTRUE;
121Bool_t plotMCMotherPt = kTRUE;
122Bool_t plotMCMotherEnergy = kTRUE;
123Bool_t plotMCMotherMass = kTRUE;
124Bool_t plotMCMotherOpeningAngle = kTRUE;
125Bool_t plotMCMotherR = kTRUE;
126Bool_t plotMCMotherZR = kTRUE;
127Bool_t plotMCMotherXY = kTRUE;
128Bool_t plotMCMotherPtvsEtaWithinAcceptance = kTRUE;
129Bool_t plotMCMotherPtvsRapidWithinAcceptance = kTRUE;
130Bool_t plotMCMotherPtvsEtaConvGammaWithinAcceptance = kTRUE;
131Bool_t plotMCMotherPtvsRapidConvGammaWithinAcceptance = kTRUE;
132Bool_t plotMCMotherSpectra = kTRUE;
133
134Bool_t plotMCPi0Eta = kTRUE;
135Bool_t plotMCPi0Rapid = kTRUE;
136Bool_t plotMCPi0Phi = kTRUE;
137Bool_t plotMCPi0Pt = kTRUE;
138Bool_t plotMCPi0Energy = kTRUE;
139Bool_t plotMCPi0Mass = kTRUE;
140Bool_t plotMCPi0OpeningAngle = kTRUE;
141Bool_t plotMCPi0R = kTRUE;
142Bool_t plotMCPi0ZR = kTRUE;
143Bool_t plotMCPi0XY = kTRUE;
144Bool_t plotMCPi0PtvsEtaWithinAcceptance = kTRUE;
145Bool_t plotMCPi0PtvsRapidWithinAcceptance = kTRUE;
146Bool_t plotMCPi0PtvsEtaConvGammaWithinAcceptance = kTRUE;
147Bool_t plotMCPi0PtvsRapidConvGammaWithinAcceptance = kTRUE;
148
149
150Bool_t plotMCPi0SecondaryEta = kTRUE;
151Bool_t plotMCPi0SecondaryRapid = kTRUE;
152Bool_t plotMCPi0SecondaryPhi = kTRUE;
153Bool_t plotMCPi0SecondaryPt = kTRUE;
154Bool_t plotMCPi0SecondaryEnergy = kTRUE;
155Bool_t plotMCPi0SecondaryMass = kTRUE;
156Bool_t plotMCPi0SecondaryOpeningAngle = kTRUE;
157Bool_t plotMCPi0SecondaryR = kTRUE;
158Bool_t plotMCPi0SecondaryZR = kTRUE;
159Bool_t plotMCPi0SecondaryXY = kTRUE;
160Bool_t plotMCPi0SecondaryPtvsEtaWithinAcceptance = kTRUE;
161Bool_t plotMCPi0SecondaryPtvsRapidWithinAcceptance = kTRUE;
162Bool_t plotMCPi0SecondaryPtvsEtaConvGammaWithinAcceptance = kTRUE;
163Bool_t plotMCPi0SecondaryPtvsRapidConvGammaWithinAcceptance = kTRUE;
164
165
166Bool_t plotMCEtaEta = kTRUE;
167Bool_t plotMCEtaRapid = kTRUE;
168Bool_t plotMCEtaPhi = kTRUE;
169Bool_t plotMCEtaPt = kTRUE;
170Bool_t plotMCEtaEnergy = kTRUE;
171Bool_t plotMCEtaMass = kTRUE;
172Bool_t plotMCEtaOpeningAngleGamma = kTRUE;
173Bool_t plotMCEtaR = kTRUE;
174Bool_t plotMCEtaZR = kTRUE;
175Bool_t plotMCEtaXY = kTRUE;
176Bool_t plotMCEtaPtvsEtaWithinAcceptance = kTRUE;
177Bool_t plotMCEtaPtvsRapidWithinAcceptance = kTRUE;
178Bool_t plotMCEtaPtvsEtaConvGammaWithinAcceptance = kTRUE;
179Bool_t plotMCEtaPtvsRapidConvGammaWithinAcceptance = kTRUE;
180
181
182// Histograms from esd tracks
183Bool_t plotESDConversionR = kTRUE;
184Bool_t plotESDConversionZR = kTRUE;
185Bool_t plotESDConversionXY = kTRUE;
186Bool_t plotESDConversionOpeningAngle = kTRUE;
187
188Bool_t plotESDEEnergy = kTRUE;
189Bool_t plotESDEPt = kTRUE;
190Bool_t plotESDEEta = kTRUE;
191Bool_t plotESDEPhi = kTRUE;
192
193Bool_t plotESDPEnergy = kTRUE;
194Bool_t plotESDPPt = kTRUE;
195Bool_t plotESDPEta = kTRUE;
196Bool_t plotESDPPhi = kTRUE;
197
198Bool_t plotESDConvGammaEnergy = kTRUE;
199Bool_t plotESDConvGammaPt = kTRUE;
200Bool_t plotESDConvGammaEta = kTRUE;
201Bool_t plotESDConvGammaPhi = kTRUE;
202Bool_t plotESDConvGammaMass = kTRUE;
203Bool_t plotESDConvGammaWidth = kTRUE;
204Bool_t plotESDConvGammaChi2 = kTRUE;
205Bool_t plotESDConvGammaNDF = kTRUE;
206Bool_t plotESDConvGammaRapid = kTRUE;
207Bool_t plotESDConvGammaPtvsEta = kTRUE;
208
209Bool_t plotESDTrueConvGammaEnergy = kTRUE;
210Bool_t plotESDTrueConvGammaPt = kTRUE;
211Bool_t plotESDTrueConvGammaEta = kTRUE;
212Bool_t plotESDTrueConvGammaPhi = kTRUE;
213Bool_t plotESDTrueConvGammaMass = kTRUE;
214Bool_t plotESDTrueConvGammaWidth = kTRUE;
215Bool_t plotESDTrueConvGammaChi2 = kTRUE;
216Bool_t plotESDTrueConvGammaNDF = kTRUE;
217Bool_t plotESDTrueConvGammaRapid = kTRUE;
218Bool_t plotESDTrueConvGammaPtvsEta = kTRUE;
219Bool_t plotESDTrueConversionR = kTRUE;
220Bool_t plotESDTrueConversionZR = kTRUE;
221Bool_t plotESDTrueConversionXY = kTRUE;
222Bool_t plotESDTrueConversionOpeningAngle = kTRUE;
223
224Bool_t plotESDNoCutConvGammaEnergy = kTRUE;
225Bool_t plotESDNoCutConvGammaPt = kTRUE;
226Bool_t plotESDNoCutConvGammaEta = kTRUE;
227Bool_t plotESDNoCutConvGammaPhi = kTRUE;
228Bool_t plotESDNoCutConvGammaMass = kTRUE;
229Bool_t plotESDNoCutConvGammaWidth = kTRUE;
230Bool_t plotESDNoCutConvGammaChi2 = kTRUE;
231Bool_t plotESDNoCutConvGammaNDF = kTRUE;
232Bool_t plotESDNoCutConvGammaRapid = kTRUE;
233Bool_t plotESDNoCutConvGammaPtvsEta = kTRUE;
234Bool_t plotESDNoCutConversionR = kTRUE;
235Bool_t plotESDNoCutConversionZR = kTRUE;
236Bool_t plotESDNoCutConversionXY = kTRUE;
237Bool_t plotESDNoCutConversionOpeningAngle = kTRUE;
238
239Bool_t plotESDMotherOpeningAngleGamma = kTRUE;
240Bool_t plotESDMotherEnergy = kTRUE;
241Bool_t plotESDMotherPt = kTRUE;
242Bool_t plotESDMotherEta = kTRUE;
243Bool_t plotESDMotherPhi = kTRUE;
244Bool_t plotESDMotherMass = kTRUE;
245Bool_t plotESDMotherR = kTRUE;
246Bool_t plotESDMotherZR = kTRUE;
247Bool_t plotESDMotherXY = kTRUE;
248Bool_t plotESDMotherRapid = kTRUE;
249
250
251Bool_t plotESDBackgroundOpeningAngleGamma = kTRUE;
252Bool_t plotESDBackgroundEnergy = kTRUE;
253Bool_t plotESDBackgroundPt = kTRUE;
254Bool_t plotESDBackgroundEta = kTRUE;
255Bool_t plotESDBackgroundPhi = kTRUE;
256Bool_t plotESDBackgroundMass = kTRUE;
257Bool_t plotESDBackgroundR = kTRUE;
258Bool_t plotESDBackgroundZR = kTRUE;
259Bool_t plotESDBackgroundXY = kTRUE;
260Bool_t plotESDBackgroundRapid = kTRUE;
261
262
263
264Bool_t plotMapping = kFALSE;
265
266Bool_t plotResolutiondPt = kTRUE;
267Bool_t plotResolutiondR = kTRUE;
268Bool_t plotResolutiondZ = kTRUE;
269
270Bool_t plotResolutiondRdPt = kTRUE;
271
272Bool_t plotResolutionMCPt = kTRUE;
273Bool_t plotResolutionMCR = kTRUE;
274Bool_t plotResolutionMCZ = kTRUE;
275
276Bool_t plotResolutionESDPt = kTRUE;
277Bool_t plotResolutionESDR = kTRUE;
278Bool_t plotResolutionESDZ = kTRUE;
279
280Bool_t plotESDNumberOfV0s = kTRUE;
281Bool_t plotESDNumberOfSurvivingV0s = kTRUE;
282
283// debug histograms
284Bool_t plotESDCutGetOnFly = kTRUE;
285Bool_t plotESDCutNContributors = kTRUE;
286Bool_t plotESDCutLikeSign = kTRUE;
287Bool_t plotESDCutRefit = kTRUE;
288Bool_t plotESDCutKink = kTRUE;
289Bool_t plotESDCutPIDProb = kTRUE;
290Bool_t plotESDCutR = kTRUE;
291Bool_t plotESDCutLine = kTRUE;
292Bool_t plotESDCutNDF = kTRUE;
293Bool_t plotESDCutChi2 = kTRUE;
294Bool_t plotESDCutEta = kTRUE;
295Bool_t plotESDCutPt = kTRUE;
296Bool_t plotESDTrueConvGammaTrackLength =kTRUE;
297Bool_t plotESDTrueConvGammaTrackLengthVSInvMass =kTRUE;
298
299
300Bool_t plotPi0Spectra = kTRUE;
301Bool_t plotEtaSpectra = kTRUE;
302
303
304/** ----------------- end define which histograms to plot here -------------------------------*/
305
306
307
308/** ----------- Define the binning for the different plot types here -------------------------*/
309//R-plots
310Int_t nXBinsR = 500;
311Double_t firstXBinR = 0.;
312Double_t lastXBinR = 250.;
313
314//ZR-plots
315Int_t nXBinsZR = 1200;
316Double_t firstXBinZR = -300.;
317Double_t lastXBinZR = 300.;
318Int_t nYBinsZR = 500;
319Double_t firstYBinZR = 0.;
320Double_t lastYBinZR = 250.;
321
322//XY-plots
323Int_t nXBinsXY = 1000;
324Double_t firstXBinXY = -250.;
325Double_t lastXBinXY = 250.;
326Int_t nYBinsXY = 1000;
327Double_t firstYBinXY = -250.;
328Double_t lastYBinXY = 250.;
329
330//OpenAngle-plots
331Int_t nXBinsOpeningAngle = 400;
332Double_t firstXBinOpeningAngle = 0.;
333Double_t lastXBinOpeningAngle = TMath::Pi();
334
335//Energy-plots
336Int_t nXBinsEnergy = 200;
337Double_t firstXBinEnergy = 0.;
338Double_t lastXBinEnergy = 50.;
339
340//Pt-plots
341Int_t nXBinsPt = 200;
342Double_t firstXBinPt = 0.;
343Double_t lastXBinPt = 50.;
344
345//Eta-plots
346Int_t nXBinsEta = 40;
347Double_t firstXBinEta = -2.;
348Double_t lastXBinEta = 2.;
349
350//Rapidity
351Int_t nXBinsRapid = 200;
352Double_t firstXBinRapid = -10.;
353Double_t lastXBinRapid = 10.;
354
355//Phi-plots
356Int_t nXBinsPhi = 72;
357Double_t firstXBinPhi = -TMath::Pi();
358Double_t lastXBinPhi = TMath::Pi();
359
360//Mapping-plots
361Int_t nXBinsMapping = 400;
362Double_t firstXBinMapping = -100.;
363Double_t lastXBinMapping = 100.;
364Int_t nYBinsMapping = 40;
365Double_t firstYBinMapping = -2;
366Double_t lastYBinMapping = 2;
367
368//ResolutionPlots
369//RESdPt
370Int_t nXBinsResdPt=500;
371Int_t firstXBinResdPt= 0;
372Int_t lastXBinResdPt=5;
373Int_t nYBinsResdPt=1000;
374Int_t firstYBinResdPt= -5;
375Int_t lastYBinResdPt=5;
376
377//RESdR
378Int_t nXBinsResdR=500;
379Int_t firstXBinResdR= 0;
380Int_t lastXBinResdR=250;
381Int_t nYBinsResdR=100;
382Int_t firstYBinResdR= -25;
383Int_t lastYBinResdR=25;
384
385//RESdZ
386Int_t nXBinsResdZ=80;
387Int_t firstXBinResdZ= -20;
388Int_t lastXBinResdZ=20;
389Int_t nYBinsResdZ=80;
390Int_t firstYBinResdZ= -20;
391Int_t lastYBinResdZ=20;
392
393//RESdRdPt
394Int_t nXBinsResdRdPt=440;
395Int_t firstXBinResdRdPt= -22;
396Int_t lastXBinResdRdPt=22;
397Int_t nYBinsResdRdPt=100;
398Int_t firstYBinResdRdPt= -5;
399Int_t lastYBinResdRdPt=5;
400
401//RESMCPt
402Int_t nXBinsResPt=100;
403Int_t firstXBinResPt= 0;
404Int_t lastXBinResPt=5;
405
406//RESMCR
407Int_t nXBinsResR=500;
408Int_t firstXBinResR= 0;
409Int_t lastXBinResR=250;
410
411//RESMCZ
412Int_t nXBinsResZ=500;
413Int_t firstXBinResZ= 0;
414Int_t lastXBinResZ=250;
415
416//GammaMass-plots
417Int_t nXBinsGammaMass = 4000;
418Double_t firstXBinGammaMass = 0.;
419Double_t lastXBinGammaMass = 1.;
420
421//Pi0Mass-plots
422Int_t nXBinsPi0Mass = 100;
423Double_t firstXBinPi0Mass = 0.;
424Double_t lastXBinPi0Mass = 1.;
425
426//EtaMass-plots
427Int_t nXBinsEtaMass = 100;
428Double_t firstXBinEtaMass = 0.;
429Double_t lastXBinEtaMass = 1.;
430
431//GammaWidth-plots
432Int_t nXBinsGammaWidth = 100;
433Double_t firstXBinGammaWidth = 0.;
434Double_t lastXBinGammaWidth = 1.;
435
436//GammaChi2-plots
437Int_t nXBinsGammaChi2 = 100;
438Double_t firstXBinGammaChi2 = 0;
439Double_t lastXBinGammaChi2 = 100.;
440
441//GammaNDF-plots
442Int_t nXBinsGammaNDF = 10;
443Double_t firstXBinGammaNDF = 0.;
444Double_t lastXBinGammaNDF = 10.;
445
446//Spectra-plots
447Int_t nXBinsSpectra = 500;
448Double_t firstXBinSpectra = 0.;
449Double_t lastXBinSpectra = 1.;
450Int_t nYBinsSpectra = 100;
451Double_t firstYBinSpectra = 0.;
452Double_t lastYBinSpectra = 50.;
453
454//track length plots
455Int_t nXBinsTrackLength = 1000;
456Double_t firstXBinTrackLength = 0;
457Double_t lastXBinTrackLength = 500;
458
459/** ---------- end Define the binning for the different plot types here ----------------------*/
460
461
462/************************************************************************************************
463 * *
464 * *
465 * EVERYTHING BELOW IS FOR DEVELOPERS ONLY *
466 * *
467 * *
468 ************************************************************************************************/
469TString outputFileName = "histogramsGammaConversion";
470TString outputFileAppendix = "";
471TString dataList = "";
472Bool_t writeNtuple = kFALSE;
473
474Bool_t scanArguments(TString arguments){
475 Bool_t iResult = kTRUE;
476
477 // cout<<"All arguments: "<<arguments<<endl;
478
479 TString allArgs=arguments;
480 TString argument;
481 int bMissingParam=0;
482
483 TObjArray* pTokens=allArgs.Tokenize(" ");
484 if (pTokens) {
485
486 for(int i=0; i<pTokens->GetEntries() && iResult==kTRUE; i++) {
487 argument=((TObjString*)pTokens->At(i))->GetString();
488
489 if(argument.IsNull()) continue;
490 // -- deconvolute-time option
491 if(argument.CompareTo("-data-list") == 0){
492 if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
493 dataList = ((TObjString*)pTokens->At(i))->GetString();
494 if(dataList.IsNull()){
495 cout<<"-data-list is NULL"<<endl;
496 iResult=kFALSE;
497 }
498 else{
499 cout<<"Data list is set to: "<<dataList<<endl;
500 }
501 }
502 else if(argument.CompareTo("-output-file-name") == 0){
503 if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
504 outputFileName = ((TObjString*)pTokens->At(i))->GetString();
505 if(outputFileName.IsNull()){
506 cout<<"-output-file-name is NULL"<<endl;
507 iResult=kFALSE;
508 }
509 else{
510 cout<<"Setting output file name to: "<<outputFileName<<endl;
511 }
512 }
513 else if (argument.CompareTo("-write-ntuple") == 0){
514 cout<<"Writing ntuple to file."<<endl;
515 writeNtuple = kTRUE;
516 }
517 else if(argument.CompareTo("-append-to-output-file") == 0){
518 if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
519 outputFileAppendix = "_"+((TObjString*)pTokens->At(i))->GetString();
520 if(outputFileAppendix.IsNull()){
521 cout<<"-appending-to-output-file is NULL"<<endl;
522 iResult=kFALSE;
523 }
524 else{
525 cout<<"Appending to the output file: "<<outputFileAppendix<<endl;
526 }
527 }
528 }
529
530 delete pTokens;
531 }
532 if (bMissingParam) {
533 cout<<"Missing parameter for argument "<< argument.Data()<<endl;
534 iResult=kFALSE;
535 }
536 return iResult;
537}
538
539void ConfigGammaConversion(TString arguments){
540
541 if(!scanArguments(arguments)){
542 break;
543 }
544
545 if(numberOfFilesToAnalyze==0){
546 ifstream dataInStream;
547 dataInStream.open(dataList.Data());
548 if ( !dataInStream ){
549 cout<<"Data list file does not exist: "<<dataList.Data()<<endl;
550 return 0;
551 }
552 string line;
553 while ( !dataInStream.eof() )
554 {
555 getline(dataInStream, line);
556 if(line.compare("") != 0){//checks if there is an empty line in the data list
557 numberOfFilesToAnalyze++;
558 }
559 }
560 }
561 cout<<"Number Of files to analyze: "<<numberOfFilesToAnalyze<<endl;
562
563 build();//build (if necessary) and load the libraries needed
564
565 gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C"); // load the CreateChain macro
566
567 AliLog::SetGlobalLogLevel(AliLog::kError);
568
569 //-------------------------------- Creating the histograms -------------------------------
570 AliGammaConversionHistograms * histograms = new AliGammaConversionHistograms();
571
572 if(plotMCConversionR == kTRUE){ histograms->AddHistogram("MC_Conversion_R","Radius of gamma conversion points",nXBinsR, firstXBinR, lastXBinR,"counts","cm");}
573 if(plotMCConversionZR == kTRUE){ histograms->AddHistogram("MC_Conversion_ZR","Radius of gamma conversion points vs Z",nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "cm", "cm");}
574 if(plotMCConversionXY == kTRUE){ histograms->AddHistogram("MC_Conversion_XY","Gamma XY converison point.",nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "cm", "cm");}
575 if(plotMCConversionOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Conversion_OpeningAngle","Opening angle of e+e- pairs from gamma conversion",nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "counts", "cm");}
576
577 if(plotMCEEnergy == kTRUE){ histograms->AddHistogram("MC_E_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
578 if(plotMCEPt == kTRUE){ histograms->AddHistogram("MC_E_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
579 if(plotMCEEta == kTRUE){ histograms->AddHistogram("MC_E_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
580 if(plotMCEPhi == kTRUE){ histograms->AddHistogram("MC_E_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
581
582 if(plotMCPEnergy == kTRUE){ histograms->AddHistogram("MC_P_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
583 if(plotMCPPt == kTRUE){ histograms->AddHistogram("MC_P_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
584 if(plotMCPEta == kTRUE){ histograms->AddHistogram("MC_P_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
585 if(plotMCPPhi == kTRUE){ histograms->AddHistogram("MC_P_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
586
587 if(plotMCallGammaEnergy == kTRUE){ histograms->AddHistogram("MC_allGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
588 if(plotMCallGammaPt == kTRUE){ histograms->AddHistogram("MC_allGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
589 if(plotMCallGammaEta == kTRUE){ histograms->AddHistogram("MC_allGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
590 if(plotMCallGammaPhi == kTRUE){ histograms->AddHistogram("MC_allGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
591 if(plotMCallGammaRapid == kTRUE){ histograms->AddHistogram("MC_allGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
592
593 if(plotMCConvGammaEnergy == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
594 if(plotMCConvGammaPt == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
595 if(plotMCConvGammaEta == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
596 if(plotMCConvGammaPhi == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
597 if(plotMCConvGammaRapid == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
598 if(plotMCConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Pt_Eta","", nXBinsPt, firstXBinPt, lastXBinPt,nXBinsEta, firstXBinEta, lastXBinEta,"","");}
599
600 if(plotMCallDirectGammaEnergy == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
601 if(plotMCallDirectGammaPt == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
602 if(plotMCallDirectGammaEta == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
603 if(plotMCallDirectGammaPhi == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
604 if(plotMCallDirectGammaRapid == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
605
606 if(plotMCConvDirectGammaEnergy == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
607 if(plotMCConvDirectGammaPt == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
608 if(plotMCConvDirectGammaEta == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
609 if(plotMCConvDirectGammaPhi == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
610 if(plotMCConvDirectGammaRapid == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
611
612 if(plotMCMotherEta == kTRUE){ histograms->AddHistogram("MC_Mother_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
613 if(plotMCMotherPhi == kTRUE){ histograms->AddHistogram("MC_Mother_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
614 if(plotMCMotherRapid == kTRUE){ histograms->AddHistogram("MC_Mother_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
615 if(plotMCMotherPt == kTRUE){ histograms->AddHistogram("MC_Mother_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
616 if(plotMCMotherEnergy == kTRUE){ histograms->AddHistogram("MC_Mother_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
617 if(plotMCMotherMass == kTRUE){ histograms->AddHistogram("MC_Mother_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}
618 if(plotMCMotherOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Mother_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
619 if(plotMCMotherR == kTRUE){ histograms->AddHistogram("MC_Mother_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
620 if(plotMCMotherZR == kTRUE){ histograms->AddHistogram("MC_Mother_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
621 if(plotMCMotherXY == kTRUE){ histograms->AddHistogram("MC_Mother_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
622 if(plotMCMotherPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Eta_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
623 if(plotMCMotherPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Rapid_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
624 if(plotMCMotherPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Eta_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
625 if(plotMCMotherPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
626
627 if(plotMCMotherSpectra == kTRUE){
628 histograms->AddHistogram("MC_Mother_InvMass_vs_Pt" ,"" ,nXBinsSpectra, firstXBinSpectra, lastXBinSpectra, nYBinsSpectra, firstYBinSpectra, lastYBinSpectra, "", "");
629 histograms->AddHistogram("MC_Mother_InvMass_vs_Pt_withinAcceptance" ,"" ,nXBinsSpectra, firstXBinSpectra, lastXBinSpectra, nYBinsSpectra, firstYBinSpectra, lastYBinSpectra, "", "");
630 histograms->AddHistogram("MC_Mother_InvMass_vs_Pt_ConvGamma_withinAcceptance" ,"" ,nXBinsSpectra, firstXBinSpectra, lastXBinSpectra, nYBinsSpectra, firstYBinSpectra, lastYBinSpectra, "", "");
631 }
632
633
634 if(plotMCPi0Eta == kTRUE){ histograms->AddHistogram("MC_Pi0_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
635 if(plotMCPi0Rapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
636 if(plotMCPi0Phi == kTRUE){ histograms->AddHistogram("MC_Pi0_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
637 if(plotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
638 if(plotMCPi0Energy == kTRUE){ histograms->AddHistogram("MC_Pi0_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
639 if(plotMCPi0Mass == kTRUE){ histograms->AddHistogram("MC_Pi0_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}
640 if(plotMCPi0OpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
641 if(plotMCPi0R == kTRUE){ histograms->AddHistogram("MC_Pi0_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
642 if(plotMCPi0ZR == kTRUE){ histograms->AddHistogram("MC_Pi0_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
643 if(plotMCPi0XY == kTRUE){ histograms->AddHistogram("MC_Pi0_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
644 if(plotMCPi0PtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Eta_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
645 if(plotMCPi0PtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Rapid_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
646 if(plotMCPi0PtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Eta_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
647 if(plotMCPi0PtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
648
649
650 if(plotMCPi0SecondaryEta == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
651 if(plotMCPi0SecondaryRapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
652 if(plotMCPi0SecondaryPhi == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
653 if(plotMCPi0SecondaryPt == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
654 if(plotMCPi0SecondaryEnergy == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
655 if(plotMCPi0SecondaryMass == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}
656 if(plotMCPi0SecondaryOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
657 if(plotMCPi0SecondaryR == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
658 if(plotMCPi0SecondaryZR == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
659 if(plotMCPi0SecondaryXY == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
660 if(plotMCPi0SecondaryPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Eta_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
661 if(plotMCPi0SecondaryPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Rapid_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
662 if(plotMCPi0SecondaryPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Eta_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
663 if(plotMCPi0SecondaryPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
664
665
666
667 if(plotMCEtaEta == kTRUE){ histograms->AddHistogram("MC_Eta_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
668 if(plotMCEtaRapid == kTRUE){ histograms->AddHistogram("MC_Eta_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
669 if(plotMCEtaPhi == kTRUE){ histograms->AddHistogram("MC_Eta_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
670 if(plotMCEtaPt == kTRUE){ histograms->AddHistogram("MC_Eta_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
671 if(plotMCEtaEnergy == kTRUE){ histograms->AddHistogram("MC_Eta_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
672 if(plotMCEtaMass == kTRUE){ histograms->AddHistogram("MC_Eta_Mass" ,"" , nXBinsEtaMass, firstXBinEtaMass, lastXBinEtaMass, "", "");}
673 if(plotMCEtaOpeningAngleGamma == kTRUE){ histograms->AddHistogram("MC_Eta_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
674 if(plotMCEtaR == kTRUE){ histograms->AddHistogram("MC_Eta_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
675 if(plotMCEtaZR == kTRUE){ histograms->AddHistogram("MC_Eta_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
676 if(plotMCEtaXY == kTRUE){ histograms->AddHistogram("MC_Eta_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
677 if(plotMCEtaPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Eta_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
678 if(plotMCEtaPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Rapid_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
679 if(plotMCEtaPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Eta_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
680 if(plotMCEtaPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
681
682
683 // Histograms from esd tracks
684 if(plotESDEEnergy == kTRUE){ histograms->AddHistogram("ESD_E_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
685 if(plotESDEPt == kTRUE){ histograms->AddHistogram("ESD_E_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
686 if(plotESDEEta == kTRUE){ histograms->AddHistogram("ESD_E_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
687 if(plotESDEPhi == kTRUE){ histograms->AddHistogram("ESD_E_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
688
689 if(plotESDPEnergy == kTRUE){ histograms->AddHistogram("ESD_P_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
690 if(plotESDPPt == kTRUE){ histograms->AddHistogram("ESD_P_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
691 if(plotESDPEta == kTRUE){ histograms->AddHistogram("ESD_P_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
692 if(plotESDPPhi == kTRUE){ histograms->AddHistogram("ESD_P_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
693
694 if(plotESDConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
695 if(plotESDConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
696 if(plotESDConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
697 if(plotESDConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
698 if(plotESDConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}
699 if(plotESDConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Width" ,"" , nXBinsGammaWidth, firstXBinGammaWidth, lastXBinGammaWidth, "", "");}
700 if(plotESDConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Chi2" ,"" , nXBinsGammaChi2, firstXBinGammaChi2, lastXBinGammaChi2, "", "");}
701 if(plotESDConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_NDF" ,"" , nXBinsGammaNDF, firstXBinGammaNDF, lastXBinGammaNDF, "", "");}
702 if(plotESDConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
703 if(plotESDConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt_Eta","", nXBinsPt, firstXBinPt, lastXBinPt,nXBinsEta, firstXBinEta, lastXBinEta,"","" );}
704
705 if(plotESDConversionR == kTRUE){ histograms->AddHistogram("ESD_Conversion_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
706 if(plotESDConversionZR == kTRUE){ histograms->AddHistogram("ESD_Conversion_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
707 if(plotESDConversionXY == kTRUE){ histograms->AddHistogram("ESD_Conversion_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
708 if(plotESDConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_Conversion_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
709
710
711 if(plotESDTrueConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
712 if(plotESDTrueConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
713 if(plotESDTrueConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
714 if(plotESDTrueConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
715 if(plotESDTrueConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}
716 if(plotESDTrueConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Width" ,"" , nXBinsGammaWidth, firstXBinGammaWidth, lastXBinGammaWidth, "", "");}
717 if(plotESDTrueConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Chi2" ,"" , nXBinsGammaChi2, firstXBinGammaChi2, lastXBinGammaChi2, "", "");}
718 if(plotESDTrueConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_NDF" ,"" , nXBinsGammaNDF, firstXBinGammaNDF, lastXBinGammaNDF, "", "");}
719 if(plotESDTrueConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
720 if(plotESDTrueConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Pt_Eta" ,"" , nXBinsPt, firstXBinPt, lastXBinPt,nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
721
722 if(plotESDTrueConversionR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
723 if(plotESDTrueConversionZR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
724 if(plotESDTrueConversionXY == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
725 if(plotESDTrueConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
726
727
728
729 if(plotESDNoCutConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
730 if(plotESDNoCutConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
731 if(plotESDNoCutConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
732 if(plotESDNoCutConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
733 if(plotESDNoCutConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Mass" ,"" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass, "", "");}
734 if(plotESDNoCutConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Width" ,"" , nXBinsGammaWidth, firstXBinGammaWidth, lastXBinGammaWidth, "", "");}
735 if(plotESDNoCutConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Chi2" ,"" , nXBinsGammaChi2, firstXBinGammaChi2, lastXBinGammaChi2, "", "");}
736 if(plotESDNoCutConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_NDF" ,"" , nXBinsGammaNDF, firstXBinGammaNDF, lastXBinGammaNDF, "", "");}
737 if(plotESDNoCutConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
738 if(plotESDNoCutConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Pt_Eta" ,"" , nXBinsPt, firstXBinPt, lastXBinPt,nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
739
740 if(plotESDNoCutConversionR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
741 if(plotESDNoCutConversionZR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
742 if(plotESDNoCutConversionXY == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
743 if(plotESDNoCutConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
744
745
746
747
748 if(plotESDMotherOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Mother_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
749 if(plotESDMotherEnergy == kTRUE){ histograms->AddHistogram("ESD_Mother_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
750 if(plotESDMotherPt == kTRUE){ histograms->AddHistogram("ESD_Mother_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
751 if(plotESDMotherEta == kTRUE){ histograms->AddHistogram("ESD_Mother_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
752 if(plotESDMotherPhi == kTRUE){ histograms->AddHistogram("ESD_Mother_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
753 if(plotESDMotherMass == kTRUE){ histograms->AddHistogram("ESD_Mother_Mass" ,"" , nXBinsPi0Mass, firstXBinPi0Mass, lastXBinPi0Mass, "", "");}
754 if(plotESDMotherR == kTRUE){ histograms->AddHistogram("ESD_Mother_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
755 if(plotESDMotherZR == kTRUE){ histograms->AddHistogram("ESD_Mother_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
756 if(plotESDMotherXY == kTRUE){ histograms->AddHistogram("ESD_Mother_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
757 if(plotESDMotherRapid == kTRUE){ histograms->AddHistogram("ESD_Mother_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
758
759
760 if(plotESDBackgroundOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Background_GammaDaughter_OpeningAngle" ,"" , nXBinsOpeningAngle, firstXBinOpeningAngle, lastXBinOpeningAngle, "", "");}
761 if(plotESDBackgroundEnergy == kTRUE){ histograms->AddHistogram("ESD_Background_Energy" ,"" , nXBinsEnergy, firstXBinEnergy, lastXBinEnergy, "", "");}
762 if(plotESDBackgroundPt == kTRUE){ histograms->AddHistogram("ESD_Background_Pt" ,"" , nXBinsPt, firstXBinPt, lastXBinPt, "", "");}
763 if(plotESDBackgroundEta == kTRUE){ histograms->AddHistogram("ESD_Background_Eta" ,"" , nXBinsEta, firstXBinEta, lastXBinEta, "", "");}
764 if(plotESDBackgroundPhi == kTRUE){ histograms->AddHistogram("ESD_Background_Phi" ,"" , nXBinsPhi, firstXBinPhi, lastXBinPhi, "", "");}
765 if(plotESDBackgroundMass == kTRUE){ histograms->AddHistogram("ESD_Background_Mass" ,"" , nXBinsEtaMass, firstXBinEtaMass, lastXBinEtaMass, "", "");}
766 if(plotESDBackgroundR == kTRUE){ histograms->AddHistogram("ESD_Background_R" ,"" , nXBinsR, firstXBinR, lastXBinR, "", "");}
767 if(plotESDBackgroundZR == kTRUE){ histograms->AddHistogram("ESD_Background_ZR" ,"" , nXBinsZR, firstXBinZR, lastXBinZR, nYBinsZR, firstYBinZR, lastYBinZR, "", "");}
768 if(plotESDBackgroundXY == kTRUE){ histograms->AddHistogram("ESD_Background_XY" ,"" , nXBinsXY, firstXBinXY, lastXBinXY, nYBinsXY, firstYBinXY, lastYBinXY, "", "");}
769 if(plotESDBackgroundRapid == kTRUE){ histograms->AddHistogram("ESD_Background_Rapid" ,"" , nXBinsRapid, firstXBinRapid, lastXBinRapid, "", "");}
770
771
772 if(plotMapping == kTRUE){
773 histograms->InitializeMappingValues(nPhiIndex,nRIndex,nXBinsMapping,minRadius,maxRadius,nYBinsMapping,minPhi,maxPhi);
774 histograms->AddMappingHistograms(nPhiIndex,nRIndex,nXBinsMapping,minRadius,maxRadius,nYBinsMapping,minPhi,maxPhi);
775 }
776
777 if(plotResolutiondPt == kTRUE){histograms->AddHistogram("Resolution_dPt" ,"" , nXBinsResdPt, firstXBinResdPt, lastXBinResdPt, nYBinsResdPt, firstYBinResdPt, lastYBinResdPt, "", "");}
778 if(plotResolutiondR == kTRUE){histograms->AddHistogram("Resolution_dR" ,"" , nXBinsResdR, firstXBinResdR, lastXBinResdR, nYBinsResdR, firstYBinResdR, lastYBinResdR, "", "");}
779 if(plotResolutiondZ == kTRUE){histograms->AddHistogram("Resolution_dZ" ,"" , nXBinsResdZ, firstXBinResdZ, lastXBinResdZ, nYBinsResdZ, firstYBinResdZ, lastYBinResdZ, "", "");}
780
781 if(plotResolutiondRdPt == kTRUE){histograms->AddHistogram("Resolution_dR_dPt" ,"" , nXBinsResdRdPt, firstXBinResdRdPt, lastXBinResdRdPt, nYBinsResdRdPt, firstYBinResdRdPt, lastYBinResdRdPt, "", "");}
782
783 if(plotResolutionMCPt == kTRUE){histograms->AddHistogram("Resolution_MC_Pt" ,"" , nXBinsResPt, firstXBinResPt, lastXBinResPt,"","");}
784 if(plotResolutionMCR == kTRUE){histograms->AddHistogram("Resolution_MC_R" ,"" , nXBinsResR, firstXBinResR, lastXBinResR,"","");}
785 if(plotResolutionMCZ == kTRUE){histograms->AddHistogram("Resolution_MC_Z" ,"" , nXBinsResZ, firstXBinResZ, lastXBinResZ,"","");}
786
787 if(plotResolutionESDPt == kTRUE){histograms->AddHistogram("Resolution_ESD_Pt" ,"" , nXBinsResPt, firstXBinResPt, lastXBinResPt,"","");}
788 if(plotResolutionESDR == kTRUE){histograms->AddHistogram("Resolution_ESD_R" ,"" , nXBinsResR, firstXBinResR, lastXBinResR,"","");}
789 if(plotResolutionESDZ == kTRUE){histograms->AddHistogram("Resolution_ESD_Z" ,"" , nXBinsResZ, firstXBinResZ, lastXBinResZ,"","");}
790
791 if(plotESDNumberOfV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfV0s","Number of v0s",100, 0, 100,"","");}
792 if(plotESDNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfSurvivingV0s","Number of surviving v0s",100, 0, 100,"","");}
793
794 // debug histograms
795 if(plotESDCutGetOnFly == kTRUE){histograms->AddHistogram("ESD_CutGetOnFly_InvMass" ,"Not GetOnFly" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
796 if(plotESDCutNContributors == kTRUE){histograms->AddHistogram("ESD_CutNContributors_InvMass" ,"NContributors <= 0" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
797 if(plotESDCutLikeSign == kTRUE){histograms->AddHistogram("ESD_CutLikeSign_InvMass" ,"LikeSign" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
798 if(plotESDCutRefit == kTRUE){histograms->AddHistogram("ESD_CutRefit_InvMass" ,"No TPC refit" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
799 if(plotESDCutKink == kTRUE){histograms->AddHistogram("ESD_CutKink_InvMass" ,"Kinks" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
800 if(plotESDCutPIDProb == kTRUE){histograms->AddHistogram("ESD_CutPIDProb_InvMass" ,"wrong TPC PID" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
801 if(plotESDCutR == kTRUE){histograms->AddHistogram("ESD_CutR_InvMass" ,"Above RMax" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
802 if(plotESDCutNDF == kTRUE){histograms->AddHistogram("ESD_CutNDF_InvMass" ,"NDF <= 0" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
803 if(plotESDCutChi2 == kTRUE){histograms->AddHistogram("ESD_CutChi2_InvMass" ,"#chi^{2} > Max" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
804 if(plotESDCutEta == kTRUE){histograms->AddHistogram("ESD_CutEta_InvMass" ,"Above #eta max" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
805 if(plotESDCutPt == kTRUE){histograms->AddHistogram("ESD_CutPt_InvMass" ,"Below p_{t} min" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
806 if(plotESDCutLine == kTRUE){histograms->AddHistogram("ESD_CutLine_InvMass" ,"Out of reconstruction area" , nXBinsGammaMass, firstXBinGammaMass, lastXBinGammaMass,"","");}
807 if(plotESDTrueConvGammaTrackLength == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLength","Track length of TrueConvGamma",nXBinsTrackLength,firstXBinTrackLength,lastXBinTrackLength,"","");}
808 if(plotESDTrueConvGammaTrackLengthVSInvMass == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLengthVSInvMass","Track length of TrueConvGamma vs Inv mass",nXBinsTrackLength,firstXBinTrackLength,lastXBinTrackLength,nXBinsPt, firstXBinPt, lastXBinPt,"","");}
809
810
811 if(plotPi0Spectra == kTRUE){
812histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , nXBinsSpectra, firstXBinSpectra, lastXBinSpectra,nYBinsSpectra, firstYBinSpectra, lastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
813}
814 if(plotPi0Spectra == kTRUE && calculateBackground == kTRUE){
815histograms->AddHistogram("ESD_Background_InvMass_vs_Pt" ,"Background Invariant Mass vs Pt" , nXBinsSpectra, firstXBinSpectra, lastXBinSpectra,nYBinsSpectra, firstYBinSpectra, lastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
816}
817
818
819
820 //------------------------------ end Creating the histograms -----------------------------
821
822 // Create the Analysis manager
823 AliAnalysisManager *mgr = new AliAnalysisManager("My Manager", "My Analysis");
824
825 // Define Input Event Handler
826 AliESDInputHandler* inpHandler = new AliESDInputHandler();
827
828 // Define Output Event Handler
829 AliAODHandler* aodHandler = new AliAODHandler();
830 TString fileOutAOD = "AOD_"+ outputFileName + outputFileAppendix + ".root";
831 aodHandler->SetOutputFileName(fileOutAOD);
832 // aodHandler->SetOutputFileName("aodAliGammaConversion.root");
833
834 // Define MC Truth Event Handler
835 AliMCEventHandler* mcHandler = new AliMCEventHandler();
836
837 // Add Handlers to the Task Manager
838 mgr->SetInputEventHandler (inpHandler);
839 mgr->SetOutputEventHandler (aodHandler);
840 mgr->SetMCtruthEventHandler(mcHandler);
841
842 // Be sure you are told what you are doing
843 // mgr->SetDebugLevel(10);
844
845 // Declare Common Input Tchain
846 AliAnalysisDataContainer *cinput1 = NULL;
847 if(usePWG4PartCorr){
848 cinput1 = mgr->CreateContainer("Chain",TChain::Class(),AliAnalysisManager::kInputContainer);
849 }
850 else{
851 cinput1 = mgr->GetCommonInputContainer();
852 }
853
854 // Common Output Tree in common â\80\98defaultâ\80\99 output file
855 AliAnalysisDataContainer *coutput1 = NULL;
856 if(usePWG4PartCorr){
857 coutput1 = mgr->CreateContainer("tree",TTree::Class(),AliAnalysisManager::kOutputContainer, "default");
858 }
859 else{
860 coutput1 = mgr->GetCommonOutputContainer();
861 }
862
863 // Private output objects
864 if(outputFileName.Contains(".root")){
865 outputFileName.ReplaceAll(".root","");
866 }
867 if(outputFileAppendix.Contains(".root")){
868 outputFileAppendix.ReplaceAll(".root","");
869 }
870 TString fileOut = outputFileName + outputFileAppendix + ".root";
871
872 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histogramsAliGammaConversion", TList::Class(),AliAnalysisManager::kOutputContainer, fileOut);
873
874
875 //------------------------ END: Define input/output handlers ---------------------------------------------------
876
877
878 //check for errors in the specified data
879 if(useKFParticle == kTRUE && useESDTrack == kTRUE){
880 //Print warning, cannot use both
881 }
882 if(useKFParticle == kFALSE && useESDTrack == kFALSE){
883 //Print warning, one have to be specified
884 }
885
886
887 //Create the V0Reader
888 AliV0Reader * v0Reader = new AliV0Reader();
889 if(useKFParticle){
890 v0Reader->UseKFParticle();
891 }
892 else if(useESDTrack){
893 v0Reader->UseESDTrack();
894 }
895 v0Reader->SetNegativeTrackPID(pidOfNegativeTrack);
896 v0Reader->SetPositiveTrackPID(pidOfPositiveTrack);
897 v0Reader->SetMaxRCut(maxRCut);
898 v0Reader->SetEtaCut(etaCut);
899 v0Reader->SetPtCut(ptCut);
900 v0Reader->SetLineCutZRSlope(LineCutZRSlope);
901 v0Reader->SetLineCutZValue(LineCutZValue);
902 v0Reader->SetChi2CutConversion(chi2CutConversion);
903 v0Reader->SetChi2CutMeson(chi2CutMeson);
904 v0Reader->SetPIDProbability(probElectron);
905 v0Reader->SetXVertexCut(xVertexCut);
906 v0Reader->SetYVertexCut(yVertexCut);
907 v0Reader->SetZVertexCut(zVertexCut);
908 v0Reader->SetSigmaMass(sigmaCutGammaMass);
909 v0Reader->SetUseImprovedVertex(useImprovedVertex);
910 v0Reader->SetDoMCTruth(doMCTruth);
911
912 // Create the GammaConversionTask
913 AliAnalysisTaskGammaConversion *gammaconversion = new AliAnalysisTaskGammaConversion("GammaConversionTask");
914 gammaconversion->SetDebugLevel(10);
915
916 gammaconversion->SetWriteNtuple(writeNtuple);
917
918 gammaconversion->SetV0Reader(v0Reader);
919 gammaconversion->SetCalculateBackground(calculateBackground);
920 gammaconversion->Init();
921
922 gammaconversion->SetElectronMass(electronMass);
923 gammaconversion->SetGammaMass(gammaMass);
924 gammaconversion->SetPi0Mass(pi0Mass);
925 gammaconversion->SetEtaMass(etaMass);
926
927 gammaconversion->SetGammaWidth(gammaWidth);
928 gammaconversion->SetPi0Width(pi0Width);
929 gammaconversion->SetEtaWidth(etaWidth);
930
931 gammaconversion->SetMinOpeningAngleGhostCut(minOpeningAngleGhostCut);
932
933 // define the width constraint used by KF particle.
934 Double_t gammaWidth = 0.01;
935 Double_t pi0Width = 0.01;
936 Double_t etaWidth = 0.01;
937
938 gammaconversion->SetHistograms(histograms);
939 v0Reader->SetHistograms(histograms);// also give the pointer to the v0reader, for debugging cuts
940
941 gammaconversion->SetDoMCTruth(doMCTruth);
942
943
944 // Add task to the manager
945 mgr->AddTask(gammaconversion);
946
947 // Connect I/O to the task
948 mgr->ConnectInput (gammaconversion, 0, cinput1);
949 mgr->ConnectOutput(gammaconversion, 0, coutput1);
950 mgr->ConnectOutput(gammaconversion, 1, coutput2);
951
952 if(dataList.IsNull()){
953 cout<<"Data list is not set, aborting."<<endl;
954 return;
955 }
956
957 TChain* chain= CreateESDChain(dataList,numberOfFilesToAnalyze);
958
959 mgr->InitAnalysis();
960
961 mgr->PrintStatus();
962
963 mgr->StartAnalysis("local",chain);
964}
965
966void build() {
967 TStopwatch timer;
968 timer.Start();
969 gSystem->Load("libTree.so");
970 gSystem->Load("libGeom");
971 // gSystem->Load("libANALYSISalice");
972
973 ////
974 //Setting up ESD.par//
975 ////
976 cout<<"compiling ESD"<<endl;
977 setupPar("ESD");
978 gSystem->Load("libVMC.so");
979 gSystem->Load("libESD.so");
980
981 ////
982 ////
983 //Setting up STEERBase.par//
984 ////
985 cout<<"compiling STEERBase"<<endl;
986 setupPar("STEERBase");
987 gSystem->Load("libSTEERBase.so");
988
989 ////
990 //Setting up AOD.par//
991 ////
992 cout<<"compiling AOD"<<endl;
993 setupPar("AOD");
994 gSystem->Load("libAOD.so");
995
996 ////
997 //Setting up ANALYSIS.par//
998 ////
999 cout<<"compiling ANALYSIS"<<endl;
1000 setupPar("ANALYSIS");
1001 gSystem->Load("libANALYSIS.so");
1002
1003 ////
1004 //Setting up ANALYSISalice.par//
1005 ////
1006 cout<<"compiling ANALUSISalice"<<endl;
1007 setupPar("ANALYSISalice");
1008 gSystem->Load("libANALYSISalice.so");
1009
1010 ////
1011 //Setting up PWG4Gamma.par//
1012 ////
1013 // cout<<"compiling GammaConv"<<endl;
1014
1015 if(usePWG4PartCorr == kTRUE){
1016 cout<<"Using PWG4PartCorr library"<<endl;
1017 setupPar("PWG4PartCorr");
1018 gSystem->Load("libPWG4PartCorr.so");
1019 }
1020 else{
1021 setupPar("PWG4GammaConv");
1022 gSystem->Load("libPWG4GammaConv.so");
1023 }
1024 //if head:: use PWG4PartCorr
1025}
1026
1027Int_t setupPar(const char* pararchivename) {
1028 ///////////////////
1029 // Setup PAR File//
1030 ///////////////////
1031 if (pararchivename) {
1032 char processline[1024];
1033 sprintf(processline,".! tar xvzf %s.par",pararchivename);
1034 gROOT->ProcessLine(processline);
1035 const char* ocwd = gSystem->WorkingDirectory();
1036 gSystem->ChangeDirectory(pararchivename);
1037
1038 // check for BUILD.sh and execute
1039 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
1040 printf("*******************************\n");
1041 printf("*** Building PAR archive ***\n");
1042 printf("*******************************\n");
1043
1044 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
1045 Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
1046 return -1;
1047 }
1048 }
1049 // check for SETUP.C and execute
1050 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
1051 printf("*******************************\n");
1052 printf("*** Setup PAR archive ***\n");
1053 printf("*******************************\n");
1054 gROOT->Macro("PROOF-INF/SETUP.C");
1055 }
1056
1057 gSystem->ChangeDirectory("../");
1058 }
1059 return 1;
1060}