]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisGammaJetFinderCorrelation.C
adding further track cuts (new TPC cuts on fraction of crossed rows)
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisGammaJetFinderCorrelation.C
CommitLineData
76518957 1/* $Id: $ */
2
3//------------------------------------
4// Configuration macro example:
5//
6// Do prompt photon - jet (JETAN) correlation analysis with ESDs
3e0577a2 7// First find photons with AliAnaPhoton, then
8// isolate them with AliAnaParticleIsolation and finally correlate
9// them with AliAnaParticleJetFinderCorrelation
76518957 10//
11// Author : Gustavo Conesa Balbastre (INFN-LNF)
12//------------------------------------
13
14AliAnaPartCorrMaker* ConfigAnalysis()
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
3e0577a2 65 reader->Print("");
66
67
68 //---------------------------------------------------------------------
69 // Analysis algorithm
70 //---------------------------------------------------------------------
71 //<<<< first analysis >>> select the photons
ff45398a 72 //Detector Fiducial Cuts for analysis part
73 AliFiducialCut * fidCut2 = new AliFiducialCut();
74 fidCut2->DoCTSFiducialCut(kFALSE) ;
75 fidCut2->DoEMCALFiducialCut(kTRUE) ;
76 fidCut2->DoPHOSFiducialCut(kFALSE) ;
77
78 fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.);
79 fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.);
80 fidCut2->SetSimplePHOSFiducialCut(0.13,220.,320.);
3e0577a2 81 fidCut2->Print("");
82
83 AliCaloPID * pid = new AliCaloPID();
84 // use selection with simple weights
85 pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7);
86 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
87
88 pid->Print("");
89
90 AliAnaPhoton *anaphoton = new AliAnaPhoton();
91 anaphoton->SetDebug(-1); //10 for lots of messages
92 anaphoton->SetMinPt(0.2);
93 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
94 anaphoton->SetCaloPID(pid);
ff45398a 95 anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level
3e0577a2 96 anaphoton->SetCalorimeter("PHOS");
97 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
98 anaphoton->SwitchOnCaloPID();
99 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
ff45398a 100 anaphoton->SwitchOnFiducialCut();
3e0577a2 101 anaphoton->SetOutputAODName("Photons");
102 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
103 //Set Histrograms bins and ranges
104 // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
105 // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
106 // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
107 anaphoton->Print("");
108
109 // >>>> Second Analysis <<<< Isolate the photons
110 AliIsolationCut * ic = new AliIsolationCut();
111 ic->SetConeSize(0.5);
112 ic->SetPtThreshold(1.);
113 ic->SetICMethod(AliIsolationCut::kPtThresIC);
114 ic->Print("");
115
116 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
117 anaisol->SetDebug(-1);
118 anaisol->SetMinPt(5);
119 anaisol->SetInputAODName("Photons");
120 anaisol->SetCalorimeter("PHOS");
121 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
122 //Select clusters with no pair, if both clusters with pi0 mass
123 anaisol->SwitchOffInvariantMass();
124 //anaisol->SetNeutralMesonSelection(nms);
125 //Do isolation cut
126 anaisol->SetIsolationCut(ic);
127 //Do or not do isolation with previously produced AODs.
128 //No effect if use of SwitchOnSeveralIsolation()
129 anaisol->SwitchOffReIsolation();
130 //Multiple IC
131 anaisol->SwitchOffSeveralIsolation() ;
132
133 anaisol->Print("");
134
135 //<<<Third analysis>>> Isolated Photon- Jet An correlation
136 AliAnaParticleJetFinderCorrelation *anacorr = new AliAnaParticleJetFinderCorrelation();
137 anacorr->SetInputAODName("Photons");
138 anacorr->SetDebug(-1);
139 anacorr->SetConeSize(1);
140 anacorr->SetPtThresholdInCone(0.5);
141 anacorr->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts
142 anacorr->SetRatioCutRange(0.01,3); //Mostly Open Cuts
143 anacorr->UseJetRefTracks(kFALSE); //Not working now
144 anacorr->Print("");
145
146 //---------------------------------------------------------------------
147 // Set analysis algorithm and reader
148 //---------------------------------------------------------------------
149 maker = new AliAnaPartCorrMaker();
150 maker->SetReader(reader);//pointer to reader
151 maker->AddAnalysis(anaphoton,0);
152 maker->AddAnalysis(anaisol,1);
153 maker->AddAnalysis(anacorr,2);
154 maker->SetAnaDebug(-1) ;
155 maker->SwitchOnHistogramsMaker() ;
156 maker->SwitchOnAODsMaker() ;
157
158 maker->Print("");
159 //
160 printf("======================== \n");
161 printf("END ConfigAnalysis() \n");
162 printf("======================== \n");
163 return maker ;
76518957 164}
165