]>
Commit | Line | Data |
---|---|---|
3e0577a2 | 1 | /* $Id: $ */ |
2 | /* $Log$ */ | |
d92b41ad | 3 | |
4 | //------------------------------------ | |
5 | // Configuration macro example: | |
6 | // | |
7 | // Do prompt photon analysis with ESDs | |
8 | // Gamma in PHOS, | |
9 | // for EMCAL, PHOS by EMCAL where necessary | |
3e0577a2 | 10 | // First find photons with AliAnaPhoton, then |
11 | // isolate them with AliAnaParticleIsolation | |
d92b41ad | 12 | // |
13 | // Author : Gustavo Conesa Balbastre (INFN-LNF) | |
14 | //------------------------------------ | |
15 | ||
c90ac396 | 16 | AliAnaPartCorrMaker* ConfigAnalysis() |
d92b41ad | 17 | { |
3e0577a2 | 18 | // |
19 | // Configuration goes here | |
20 | // | |
21 | printf("======================== \n"); | |
22 | printf("ConfigAnalysis() \n"); | |
23 | printf("======================== \n"); | |
24 | ||
25 | ||
ff45398a | 26 | //Detector Fiducial Cuts |
27 | AliFiducialCut * fidCut = new AliFiducialCut(); | |
28 | fidCut->DoCTSFiducialCut(kFALSE) ; | |
29 | fidCut->DoEMCALFiducialCut(kFALSE) ; | |
30 | fidCut->DoPHOSFiducialCut(kFALSE) ; | |
3e0577a2 | 31 | |
ff45398a | 32 | //fidCut->SetSimpleCTSFiducialCut(0.9,0.,360.); |
33 | //fidCut->SetSimpleEMCALFiducialCut(0.7,80.,190.); | |
34 | //fidCut->SetSimplePHOSFiducialCut(0.13,220.,320.); | |
3e0577a2 | 35 | |
36 | fidCut->Print(""); | |
37 | ||
38 | //----------------------------------------------------------- | |
39 | // Reader | |
40 | //----------------------------------------------------------- | |
41 | AliCaloTrackESDReader *reader = new AliCaloTrackESDReader(); | |
42 | reader->SetDebug(-1); | |
43 | ||
44 | //Switch on or off the detectors information that you want | |
45 | reader->SwitchOffEMCAL(); | |
46 | reader->SwitchOnCTS(); | |
47 | reader->SwitchOnPHOS(); | |
48 | ||
49 | //Min particle pT | |
50 | reader->SetEMCALPtMin(0.2); | |
51 | reader->SetPHOSPtMin(0.2); | |
52 | reader->SetCTSPtMin(0.2); | |
53 | ||
ff45398a | 54 | reader->SetFiducialCut(fidCut); |
1caab52d | 55 | |
56 | // //We want tracks fitted in the detectors: | |
57 | // ULong_t status=AliAODTrack::kTPCrefit; | |
58 | // status|=AliAODTrack::kITSrefit; //(default settings) | |
59 | ||
60 | // We want tracks whose PID bit is set: | |
61 | // ULong_t status =AliAODTrack::kITSpid; | |
62 | // status|=AliAODTrack::kTPCpid; | |
63 | ||
64 | // reader->SetTrackStatus(status); | |
65 | ||
66 | //Remove the temporal AODs we create. | |
08a064bc | 67 | reader->SwitchOnCleanStdAOD(); |
1caab52d | 68 | |
3e0577a2 | 69 | reader->Print(""); |
70 | ||
71 | ||
72 | //--------------------------------------------------------------------- | |
73 | // Analysis algorithm | |
74 | //--------------------------------------------------------------------- | |
75 | //>>>> First Analysis <<<< | |
ff45398a | 76 | //Detector Fiducial Cuts for analysis part |
77 | AliFiducialCut * fidCut2 = new AliFiducialCut(); | |
78 | fidCut2->DoCTSFiducialCut(kFALSE) ; | |
79 | fidCut2->DoEMCALFiducialCut(kFALSE) ; | |
80 | fidCut2->DoPHOSFiducialCut(kFALSE) ; | |
3e0577a2 | 81 | |
ff45398a | 82 | //fidCut2->SetSimpleCTSFiducialCut(0.9,0.,360.); |
83 | //fidCut2->SetSimpleEMCALFiducialCut(0.7,80.,190.); | |
84 | fidCut2->SetSimplePHOSFiducialCut(0.12,220.,320.); | |
3e0577a2 | 85 | |
86 | // //Select particles in N regions of the detectors | |
87 | // Float_t etamax[]={0.67,0.51,0.16,-0.21,-0.61}; | |
88 | // TArrayF etamaxarr(5,etamax); | |
89 | // fidCut2->AddEMCALFidCutMaxEtaArray(etamaxarr); | |
90 | // Float_t etamin[]={0.61,0.21,-0.16,-0.51,-0.67}; | |
91 | // TArrayF etaminarr(5,etamin); | |
92 | // fidCut2->AddEMCALFidCutMinEtaArray(etaminarr); | |
93 | // Float_t phimax[]={99., 119., 139., 159., 179., 189.}; | |
94 | // TArrayF phimaxarr(6,phimax); | |
95 | // fidCut2->AddEMCALFidCutMaxPhiArray(phimaxarr); | |
96 | // Float_t phimin[]={81., 101. , 121. , 141. , 161. , 181. }; | |
97 | // TArrayF phiminarr(6,phimin); | |
98 | // fidCut2->AddEMCALFidCutMinPhiArray(phiminarr); | |
99 | // fidCut2->Print(""); | |
100 | // | |
101 | AliCaloPID * pid = new AliCaloPID(); | |
102 | // use selection with simple weights | |
103 | pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7); | |
104 | pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7); | |
105 | // use more complicated selection, particle weight depending on cluster energy | |
106 | // pid->UsePHOSPIDWeightFormula(kTRUE); | |
107 | // TFormula * photonF = new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))"); | |
108 | // TFormula * pi0F = new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))"); | |
109 | // pid->SetPHOSPhotonWeightFormula(photonF); | |
110 | // pid->SetPHOSPi0WeightFormula(pi0F); | |
111 | pid->Print(""); | |
112 | ||
113 | ||
114 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
115 | anaphoton->SetDebug(-1); //10 for lots of messages | |
116 | anaphoton->SetMinPt(0.2); | |
117 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); | |
118 | anaphoton->SetCaloPID(pid); | |
ff45398a | 119 | anaphoton->SetFiducialCut(fidCut2); //More acceptance selections if needed at this level |
3e0577a2 | 120 | anaphoton->SetCalorimeter("PHOS"); |
121 | anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
122 | anaphoton->SwitchOnCaloPID(); | |
123 | anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
ff45398a | 124 | anaphoton->SwitchOnFiducialCut(); |
3e0577a2 | 125 | anaphoton->SetOutputAODName("Photons"); |
126 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
127 | //Set Histrograms bins and ranges | |
128 | // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
129 | // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
130 | // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
131 | anaphoton->Print(""); | |
132 | ||
133 | // >>>> Second Analysis <<<< Isolate the photons | |
134 | AliIsolationCut * ic = new AliIsolationCut(); | |
135 | ic->SetConeSize(0.5); | |
136 | ic->SetPtThreshold(1.); | |
137 | ic->SetICMethod(AliIsolationCut::kPtThresIC); | |
138 | ic->Print(""); | |
139 | ||
140 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); | |
141 | anaisol->SetDebug(-1); | |
142 | anaisol->SetMinPt(5); | |
143 | anaisol->SetInputAODName("Photons"); | |
144 | anaisol->SetCalorimeter("PHOS"); | |
145 | anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
146 | //Select clusters with no pair, if both clusters with pi0 mass | |
147 | anaisol->SwitchOffInvariantMass(); | |
148 | //anaisol->SetNeutralMesonSelection(nms); | |
149 | //Do isolation cut | |
150 | anaisol->SetIsolationCut(ic); | |
151 | //Do or not do isolation with previously produced AODs. | |
152 | //No effect if use of SwitchOnSeveralIsolation() | |
153 | anaisol->SwitchOffReIsolation(); | |
154 | //Multiple IC | |
155 | anaisol->SwitchOffSeveralIsolation() ; | |
156 | ||
157 | anaisol->Print(""); | |
158 | ||
159 | ||
160 | //--------------------------------------------------------------------- | |
161 | // Set analysis algorithm and reader | |
162 | //--------------------------------------------------------------------- | |
163 | maker = new AliAnaPartCorrMaker(); | |
164 | maker->SetReader(reader);//pointer to reader | |
165 | maker->AddAnalysis(anaphoton,0); | |
166 | maker->AddAnalysis(anaisol,1); | |
167 | maker->SetAnaDebug(-1) ; | |
168 | maker->SwitchOnHistogramsMaker() ; | |
169 | //maker->SwitchOffHistogramsMaker() ; | |
170 | maker->SwitchOnAODsMaker() ; | |
171 | //maker->SwitchOffAODsMaker() ; | |
172 | ||
173 | maker->Print(""); | |
174 | // | |
175 | printf("======================== \n"); | |
176 | printf("END ConfigAnalysis() \n"); | |
177 | printf("======================== \n"); | |
178 | return maker ; | |
d92b41ad | 179 | } |