]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisGammaJetFinderCorrelation.C
An artifactual debug streamer removed ( there was a segmentation fault after a call...
[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
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- Jet An correlation
124 AliAnaParticleJetFinderCorrelation *anacorr = new AliAnaParticleJetFinderCorrelation();
125 anacorr->SetInputAODName("Photons");
126 anacorr->SetDebug(-1);
127 anacorr->SetConeSize(1);
128 anacorr->SetPtThresholdInCone(0.5);
129 anacorr->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts
130 anacorr->SetRatioCutRange(0.01,3); //Mostly Open Cuts
131 anacorr->UseJetRefTracks(kFALSE); //Not working now
132 anacorr->Print("");
133
134 //---------------------------------------------------------------------
135 // Set analysis algorithm and reader
136 //---------------------------------------------------------------------
137 maker = new AliAnaPartCorrMaker();
138 maker->SetReader(reader);//pointer to reader
139 maker->AddAnalysis(anaphoton,0);
140 maker->AddAnalysis(anaisol,1);
141 maker->AddAnalysis(anacorr,2);
142 maker->SetAnaDebug(-1) ;
143 maker->SwitchOnHistogramsMaker() ;
144 maker->SwitchOnAODsMaker() ;
145
146 maker->Print("");
147 //
148 printf("======================== \n");
149 printf("END ConfigAnalysis() \n");
150 printf("======================== \n");
151 return maker ;
76518957 152}
153