]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisGammaJetLCCorrelation.C
Added new background scheeme, did some cleanup. added new bethe block parameters...
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaJetLCCorrelation.C
CommitLineData
bc636d26 1/* $Id: $ */
2
3//------------------------------------
4// Configuration macro example:
5//
3e0577a2 6// Do prompt photon - jet correlation analysis with ESDs
7// First find photons with AliAnaPhoton, then
8// isolate them with AliAnaParticleIsolation and finally correlate
9// them with AliAnaParticleJetLeadingConeCorrelation
bc636d26 10//
11// Author : Gustavo Conesa Balbastre (INFN-LNF)
12//------------------------------------
13
c90ac396 14AliAnaPartCorrMaker* ConfigAnalysis()
bc636d26 15{
3e0577a2 16 //
17 // Configuration goes here
18 //
19 printf("======================== \n");
20 printf("ConfigAnalysis() \n");
21 printf("======================== \n");
22
23
ff45398a 24 //Detector Fiducial Cuts
25 AliFiducialCut * fidCut = new AliFiducialCut();
26 fidCut->DoCTSFiducialCut(kTRUE) ;
27 fidCut->DoEMCALFiducialCut(kTRUE) ;
28 fidCut->DoPHOSFiducialCut(kTRUE) ;
3e0577a2 29
ff45398a 30 fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.);
31 fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.);
32 fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.);
3e0577a2 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
ff45398a 52 reader->SetFiducialCut(fidCut);
1caab52d 53
54 // //We want tracks fitted in the detectors:
55 // ULong_t status=AliAODTrack::kTPCrefit;
56 // status|=AliAODTrack::kITSrefit; //(default settings)
57
58 // We want tracks whose PID bit is set:
59 // ULong_t status =AliAODTrack::kITSpid;
60 // status|=AliAODTrack::kTPCpid;
61
62 // reader->SetTrackStatus(status);
63
64 //Remove the temporal AODs we create.
08a064bc 65 reader->SwitchOnCleanStdAOD();
1caab52d 66
3e0577a2 67 reader->Print("");
68
69
70 //---------------------------------------------------------------------
71 // Analysis algorithm
72 //---------------------------------------------------------------------
73 //<<<< first analysis >>> select the photons
ff45398a 74 //Detector Fiducial Cuts for analysis part
75 AliFiducialCut * fidCut2 = new AliFiducialCut();
76 fidCut2->DoCTSFiducialCut(kFALSE) ;
77 fidCut2->DoEMCALFiducialCut(kTRUE) ;
78 fidCut2->DoPHOSFiducialCut(kFALSE) ;
79
80 fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.);
81 fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);
82 fidCut2->SetSimplePHOSFiducialCut(0.13,220.,320.);
3e0577a2 83 fidCut2->Print("");
84
85 AliCaloPID * pid = new AliCaloPID();
86 // use selection with simple weights
87 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
88 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
89
90 pid->Print("");
91
92 AliAnaPhoton *anaphoton = new AliAnaPhoton();
93 anaphoton->SetDebug(-1); //10 for lots of messages
94 anaphoton->SetMinPt(0.2);
95 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
96 anaphoton->SetCaloPID(pid);
ff45398a 97 anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
3e0577a2 98 anaphoton->SetCalorimeter("PHOS");
99 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
100 anaphoton->SwitchOnCaloPID();
101 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
ff45398a 102 anaphoton->SwitchOnFiducialCut();
3e0577a2 103 anaphoton->SetOutputAODName("Photons");
104 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
105 //Set Histrograms bins and ranges
106 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
107 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
108 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
109 anaphoton->Print("");
110
111 // >>>> Second Analysis <<<< Isolate the photons
112 AliIsolationCut * ic = new AliIsolationCut();
113 ic->SetConeSize(0.5);
114 ic->SetPtThreshold(1.);
115 ic->SetICMethod(AliIsolationCut::kPtThresIC);
116 ic->Print("");
117
118 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
119 anaisol->SetDebug(-1);
120 anaisol->SetMinPt(5);
121 anaisol->SetInputAODName("Photons");
122 anaisol->SetCalorimeter("PHOS");
123 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
124 //Select clusters with no pair, if both clusters with pi0 mass
125 anaisol->SwitchOffInvariantMass();
126 //anaisol->SetNeutralMesonSelection(nms);
127 //Do isolation cut
128 anaisol->SetIsolationCut(ic);
129 //Do or not do isolation with previously produced AODs.
130 //No effect if use of SwitchOnSeveralIsolation()
131 anaisol->SwitchOffReIsolation();
132 //Multiple IC
133 anaisol->SwitchOffSeveralIsolation() ;
134
135 anaisol->Print("");
136
137 //<<<Third analysis>>> Isolated Photon- Jet Leading in opposite Cone correlation
138 AliAnaParticleJetLeadingConeCorrelation *anacorr = new AliAnaParticleJetLeadingConeCorrelation();
139 anacorr->SetDebug(-1);
140 anacorr->SetInputAODName("Photons");
141 anacorr->SwitchOnCaloPID();
142 anacorr->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
ff45398a 143 anacorr->SwitchOffFiducialCut();
3e0577a2 144 anacorr->SwitchOffJetsOnlyInCTS();
145 anacorr->SwitchOffJetsRecalculation();
146 //Analysis cuts for leading particle selection
147 anacorr->SetDeltaPhiCutRange(1.5,4.5); //Back-Leading particle angular cut
148 anacorr->SetLeadingRatioCutRange(0.,3);//Cut for the momentum of leading
149 //Analysis cuts for jet selection
150 anacorr->SetppCollisions(); //Jet particles Pt threshold for different collisions
151 anacorr->SetCone(0.7); //Jet cone size
152 anacorr->SetJetPtThreshold(0.2); //Jet particle threshold
153 anacorr->SetJetRatioCutRange(0.7, 1.3);//Only if SwitchOffJetsOnlyInCTS(); and SetJetSelectionMode(2)
154 anacorr->SetJetCTSRatioCutRange(0.3,1.3); //Only if SwitchOnJetsOnlyInCTS(); and SetJetSelectionMode(2)
bc636d26 155
3e0577a2 156 anacorr->Print("");
157 //---------------------------------------------------------------------
158 // Set analysis algorithm and reader
159 //---------------------------------------------------------------------
160 maker = new AliAnaPartCorrMaker();
161 maker->SetReader(reader);//pointer to reader
162 maker->AddAnalysis(anaphoton,0);
163 maker->AddAnalysis(anaisol,1);
164 maker->AddAnalysis(anacorr,2);
165 maker->SetAnaDebug(-1) ;
166 maker->SwitchOnHistogramsMaker() ;
167 maker->SwitchOnAODsMaker() ;
168
169 maker->Print("");
170 //
171 printf("======================== \n");
172 printf("END ConfigAnalysis() \n");
173 printf("======================== \n");
174 return maker ;
bc636d26 175}
176