]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/ConfigAnalysisPi0EbEIsolated.C
ana.C: Included possibility to read MC data directly from galice.root
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigAnalysisPi0EbEIsolated.C
CommitLineData
3e0577a2 1/* $Id: $ */
2/* $Log$ */
3
4//------------------------------------
5// Configuration macro example:
6//
7// Do photon identification analysis with ESDs
8// in EMCAL, after pi0 identification event by event
9// in photon paris invariant mass and aperture angle widow.
10// After, study the isolation of the selected pi0.
11// For PHOS, change EMCAL by PHOS where necessary
12// Do photon identification analysis with ESDs
13//
14// Author : Gustavo Conesa Balbastre (INFN-LNF)
15//------------------------------------
16
17AliAnaPartCorrMaker* ConfigAnalysis()
18{
19 //
20 // Configuration goes here
21 //
22 printf("======================== \n");
23 printf("ConfigAnalysis() \n");
24 printf("======================== \n");
25
26
27 //Detector Fidutial Cuts
28 AliFidutialCut * fidCut = new AliFidutialCut();
29 fidCut->DoCTSFidutialCut(kFALSE) ;
30 fidCut->DoEMCALFidutialCut(kFALSE) ;
31 fidCut->DoPHOSFidutialCut(kTRUE) ;
32
33 //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.);
34 //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.);
35 //fidCut->SetSimplePHOSFidutialCut(0.12,220.,320.);
36
37 fidCut->Print("");
38
39 //-----------------------------------------------------------
40 // Reader
41 //-----------------------------------------------------------
42 AliCaloTrackESDReader *reader = new AliCaloTrackESDReader();
43 reader->SetDebug(-1);//10 for lots of messages
44
45 //Switch on or off the detectors information that you want
46 reader->SwitchOnEMCAL();
47 reader->SwitchOnCTS();
48 reader->SwitchOffPHOS();
49
50 //Min particle pT
51 reader->SetEMCALPtMin(0.5);
52 //reader->SetPHOSPtMin(0.5);
53 reader->SetCTSPtMin(0.2);
54
55 reader->SetFidutialCut(fidCut);
56 reader->Print("");
57
58
59 //---------------------------------------------------------------------
60 // Analysis algorithm
61 //---------------------------------------------------------------------
62
63 AliCaloPID * pid = new AliCaloPID();
64 // use selection with simple weights
65 pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7);
66 pid->SetDispersionCut(1.5);
67 pid->SetTOFCut(5.e-9);
68 pid->SetDebug(-1);
69 pid->Print("");
70
71 AliAnaPhoton *anaphoton = new AliAnaPhoton();
72 anaphoton->SetDebug(-1); //10 for lots of messages
73 anaphoton->SetMinPt(1);
74 anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
75 anaphoton->SetCaloPID(pid);
76 //anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level
77 anaphoton->SetCalorimeter("EMCAL");
78 anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms
79 anaphoton->SwitchOffCaloPID();
80 anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
81 anaphoton->SwitchOffFidutialCut();
82 anaphoton->SetOutputAODName("Photons");
83 anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
84 //Set Histrograms bins and ranges
85// anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ;
86// anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
87// anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
88 anaphoton->Print("");
89
90 // >>> Second Analysis <<<
91
92 AliNeutralMesonSelection *nms = new AliNeutralMesonSelection();
93 nms->SetInvMassCutRange(0.10, 0.17) ;
94 nms->KeepNeutralMesonSelectionHistos(kTRUE);
95 //Set Histrograms bins and ranges
96// nms->SetHistoERangeAndNBins(0, 50, 100) ;
97// nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
98// nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
99// nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ;
100
101 AliAnaPi0EbE *anapi0 = new AliAnaPi0EbE();
102 anapi0->SetDebug(-1);//10 for lots of messages
103 anapi0->SetAnalysisType(AliAnaPi0EbE::kIMCalo);
104 anapi0->SetInputAODName("Photons");
105 anapi0->SetOutputAODName("Pi0s");
106 anapi0->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
107 anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
108 anapi0->SetNeutralMesonSelection(nms);
109 //Set Histrograms bins and ranges
110// anapi0->SetHistoPtRangeAndNBins(0, 50, 100) ;
111// anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
112// anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
113 anapi0->Print("");
114
115 // >>>> Third Analysis <<<<
116 AliIsolationCut * ic = new AliIsolationCut();
117 ic->SetConeSize(0.4);
118 ic->SetPtThreshold(1.);
119 ic->SetICMethod(AliIsolationCut::kPtThresIC);
120 ic->Print("");
121
122 AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
123 anaisol->SetDebug(-1);
124 anaisol->SetInputAODName("Pi0s");
125 anaisol->SetMinPt(5);
126 anaisol->SetCalorimeter("EMCAL"); //Must be the same calorimeter where pi0/photon falls
127 anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms
128 //Select clusters with no pair, if both clusters with pi0 mass
129 anaisol->SwitchOffInvariantMass(); //It is a pi0 not needed
130 //anaisol->SetNeutralMesonSelection(nms);
131 //Do isolation cut
132 anaisol->SetIsolationCut(ic);
133 //Do or not do isolation with previously produced AODs.
134 //No effect if use of SwitchOnSeveralIsolation()
135 anaisol->SwitchOffReIsolation();
136
137 //Multiple IC
138 anaisol->SwitchOffSeveralIsolation() ;
139 //Make sure that the initial isolation cut parameters set in AliIsolationCut
140 //pointer are relativelly open.
141// anaisol->SetNCones(2) ;
142// anaisol->SetNPtThresFrac(2) ;
143// anaisol->SetConeSizes(0, 0.3) ; anaisol->SetConeSizes(1, 0.4) ;
144// anaisol->SetPtThresholds(0, 0.5) ; anaisol->SetPtThresholds(1, 1.) ;
145// anaisol->SetPtFractions(0, 1.) ; anaisol->SetPtFractions(1, 1.5) ;
146 //Set Histrograms bins and ranges
147// anaisol->SetHistoPtRangeAndNBins(0, 50, 100) ;
148// anaisol->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
149// anaisol->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
150 anaisol->SetHistoPtSumRangeAndNBins(0, 10, 100) ;
151 anaisol->SetHistoPtInConeRangeAndNBins(0, 50, 100) ;
152 anaisol->Print("");
153
154
155 //---------------------------------------------------------------------
156 // Set analysis algorithm and reader
157 //---------------------------------------------------------------------
158 maker = new AliAnaPartCorrMaker();
159 maker->SetReader(reader);//pointer to reader
160 maker->AddAnalysis(anaphoton,0);
161 maker->AddAnalysis(anapi0,1);
162 maker->AddAnalysis(anaisol,2);
163 maker->SetAnaDebug(-1) ;
164 maker->SwitchOnHistogramsMaker() ;
165 maker->SwitchOnAODsMaker() ;
166
167 maker->Print("");
168 //
169 printf("======================== \n");
170 printf("END ConfigAnalysis() \n");
171 printf("======================== \n");
172 return maker ;
173}