]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisGammaPartonCorrelation.C
possiblity to read ESD friends (Jacek)
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaPartonCorrelation.C
CommitLineData
d92b41ad 1/* $Id: $ */
d92b41ad 2
3//------------------------------------
4// Configuration macro example:
5//
3e0577a2 6// Do prompt photon - parton correlation analysis with ESDs
7// First find photons with AliAnaPhoton, then
8// isolate them with AliAnaParticleIsolation and finally correlate
9// them with AliAnaParticlePartonCorrelation
d92b41ad 10//
11// Author : Gustavo Conesa Balbastre (INFN-LNF)
12//------------------------------------
13
c90ac396 14AliAnaPartCorrMaker* ConfigAnalysis()
d92b41ad 15{
3e0577a2 16 //
17 // Configuration goes here
18 //
19 printf("======================== \n");
20 printf("ConfigAnalysis() \n");
21 printf("======================== \n");
22
23
24 //Detector Fidutial Cuts
25 AliFidutialCut * fidCut = new AliFidutialCut();
26 fidCut->DoCTSFidutialCut(kTRUE) ;
27 fidCut->DoEMCALFidutialCut(kTRUE) ;
28 fidCut->DoPHOSFidutialCut(kTRUE) ;
29
30 fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
31 fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
32 fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.);
33
34 fidCut->Print("");
35
36 //-----------------------------------------------------------
37 // Reader
38 //-----------------------------------------------------------
39 AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
40 reader->SetDebug(-1);
41
42 //Switch on or off the detectors information that you want
43 reader->SwitchOnEMCAL();
44 reader->SwitchOnCTS();
45 reader->SwitchOnPHOS();
46
47 //Min particle pT
48 reader->SetEMCALPtMin(0.5);
49 reader->SetPHOSPtMin(0.5);
50 reader->SetCTSPtMin(0.2);
51
52 reader->SetFidutialCut(fidCut);
53 reader->Print("");
54
55
56 //---------------------------------------------------------------------
57 // Analysis algorithm
58 //---------------------------------------------------------------------
59 //<<<< first analysis >>> select the photons
60 //Detector Fidutial Cuts for analysis part
61 AliFidutialCut * fidCut2 = new AliFidutialCut();
62 fidCut2->DoCTSFidutialCut(kFALSE) ;
63 fidCut2->DoEMCALFidutialCut(kTRUE) ;
64 fidCut2->DoPHOSFidutialCut(kFALSE) ;
65
66 fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.);
67 fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.);
68 fidCut2->SetSimplePHOSFidutialCut(0.13,220.,320.);
69 fidCut2->Print("");
70
71 AliCaloPID * pid = new AliCaloPID();
72 // use selection with simple weights
73 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
74 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
75
76 pid->Print("");
77
78 AliAnaPhoton *anaphoton = new AliAnaPhoton();
79 anaphoton->SetDebug(-1); //10 for lots of messages
80 anaphoton->SetMinPt(0.2);
81 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
82 anaphoton->SetCaloPID(pid);
83 anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
84 anaphoton->SetCalorimeter("PHOS");
85 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
86 anaphoton->SwitchOnCaloPID();
87 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
88 anaphoton->SwitchOnFidutialCut();
89 anaphoton->SetOutputAODName("Photons");
90 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
91 //Set Histrograms bins and ranges
92 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
93 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
94 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
95 anaphoton->Print("");
96
97 // >>>> Second Analysis <<<< Isolate the photons
98 AliIsolationCut * ic = new AliIsolationCut();
99 ic->SetConeSize(0.5);
100 ic->SetPtThreshold(1.);
101 ic->SetICMethod(AliIsolationCut::kPtThresIC);
102 ic->Print("");
103
104 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
105 anaisol->SetDebug(-1);
106 anaisol->SetMinPt(5);
107 anaisol->SetInputAODName("Photons");
108 anaisol->SetCalorimeter("PHOS");
109 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
110 //Select clusters with no pair, if both clusters with pi0 mass
111 anaisol->SwitchOffInvariantMass();
112 //anaisol->SetNeutralMesonSelection(nms);
113 //Do isolation cut
114 anaisol->SetIsolationCut(ic);
115 //Do or not do isolation with previously produced AODs.
116 //No effect if use of SwitchOnSeveralIsolation()
117 anaisol->SwitchOffReIsolation();
118 //Multiple IC
119 anaisol->SwitchOffSeveralIsolation() ;
120
121 anaisol->Print("");
122
123 //<<<Third analysis>>> Isolated Photon- parton correlation
124 AliAnaParticlePartonCorrelation *anacorr = new AliAnaParticlePartonCorrelation();
125 anacorr->SetInputAODName("Photons");
126 anacorr->SetDebug(-1);
127
128 anacorr->Print("");
129
130 //---------------------------------------------------------------------
131 // Set analysis algorithm and reader
132 //---------------------------------------------------------------------
133 maker = new AliAnaPartCorrMaker();
134 maker->SetReader(reader);//pointer to reader
135 maker->AddAnalysis(anaphoton,0);
136 maker->AddAnalysis(anaisol,1);
137 maker->AddAnalysis(anacorr,2);
138 maker->SetAnaDebug(-1) ;
139 maker->SwitchOnHistogramsMaker() ;
140 //maker->SwitchOffHistogramsMaker() ;
141 maker->SwitchOnAODsMaker() ;
142 //maker->SwitchOffAODsMaker() ;
143
144 maker->Print("");
145 //
146 printf("======================== \n");
147 printf("END ConfigAnalysis() \n");
148 printf("======================== \n");
149 return maker ;
d92b41ad 150}
3e0577a2 151