]>
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 | ||
26 | //Detector Fidutial Cuts | |
27 | AliFidutialCut * fidCut = new AliFidutialCut(); | |
28 | fidCut->DoCTSFidutialCut(kFALSE) ; | |
29 | fidCut->DoEMCALFidutialCut(kFALSE) ; | |
30 | fidCut->DoPHOSFidutialCut(kFALSE) ; | |
31 | ||
32 | //fidCut->SetSimpleCTSFidutialCut(0.9,0.,360.); | |
33 | //fidCut->SetSimpleEMCALFidutialCut(0.7,80.,190.); | |
34 | //fidCut->SetSimplePHOSFidutialCut(0.13,220.,320.); | |
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 | ||
54 | reader->SetFidutialCut(fidCut); | |
55 | reader->Print(""); | |
56 | ||
57 | ||
58 | //--------------------------------------------------------------------- | |
59 | // Analysis algorithm | |
60 | //--------------------------------------------------------------------- | |
61 | //>>>> First Analysis <<<< | |
62 | //Detector Fidutial Cuts for analysis part | |
63 | AliFidutialCut * fidCut2 = new AliFidutialCut(); | |
64 | fidCut2->DoCTSFidutialCut(kFALSE) ; | |
65 | fidCut2->DoEMCALFidutialCut(kFALSE) ; | |
66 | fidCut2->DoPHOSFidutialCut(kFALSE) ; | |
67 | ||
68 | //fidCut2->SetSimpleCTSFidutialCut(0.9,0.,360.); | |
69 | //fidCut2->SetSimpleEMCALFidutialCut(0.7,80.,190.); | |
70 | fidCut2->SetSimplePHOSFidutialCut(0.12,220.,320.); | |
71 | ||
72 | // //Select particles in N regions of the detectors | |
73 | // Float_t etamax[]={0.67,0.51,0.16,-0.21,-0.61}; | |
74 | // TArrayF etamaxarr(5,etamax); | |
75 | // fidCut2->AddEMCALFidCutMaxEtaArray(etamaxarr); | |
76 | // Float_t etamin[]={0.61,0.21,-0.16,-0.51,-0.67}; | |
77 | // TArrayF etaminarr(5,etamin); | |
78 | // fidCut2->AddEMCALFidCutMinEtaArray(etaminarr); | |
79 | // Float_t phimax[]={99., 119., 139., 159., 179., 189.}; | |
80 | // TArrayF phimaxarr(6,phimax); | |
81 | // fidCut2->AddEMCALFidCutMaxPhiArray(phimaxarr); | |
82 | // Float_t phimin[]={81., 101. , 121. , 141. , 161. , 181. }; | |
83 | // TArrayF phiminarr(6,phimin); | |
84 | // fidCut2->AddEMCALFidCutMinPhiArray(phiminarr); | |
85 | // fidCut2->Print(""); | |
86 | // | |
87 | AliCaloPID * pid = new AliCaloPID(); | |
88 | // use selection with simple weights | |
89 | pid->SetPHOSPhotonWeight(0.7); pid->SetPHOSPi0Weight(0.7); | |
90 | pid->SetEMCALPhotonWeight(0.7); pid->SetEMCALPi0Weight(0.7); | |
91 | // use more complicated selection, particle weight depending on cluster energy | |
92 | // pid->UsePHOSPIDWeightFormula(kTRUE); | |
93 | // 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))"); | |
94 | // 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))"); | |
95 | // pid->SetPHOSPhotonWeightFormula(photonF); | |
96 | // pid->SetPHOSPi0WeightFormula(pi0F); | |
97 | pid->Print(""); | |
98 | ||
99 | ||
100 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
101 | anaphoton->SetDebug(-1); //10 for lots of messages | |
102 | anaphoton->SetMinPt(0.2); | |
103 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); | |
104 | anaphoton->SetCaloPID(pid); | |
105 | anaphoton->SetFidutialCut(fidCut2); //More acceptance selections if needed at this level | |
106 | anaphoton->SetCalorimeter("PHOS"); | |
107 | anaphoton->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
108 | anaphoton->SwitchOnCaloPID(); | |
109 | anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
110 | anaphoton->SwitchOnFidutialCut(); | |
111 | anaphoton->SetOutputAODName("Photons"); | |
112 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
113 | //Set Histrograms bins and ranges | |
114 | // anaphoton->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
115 | // anaphoton->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
116 | // anaphoton->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
117 | anaphoton->Print(""); | |
118 | ||
119 | // >>>> Second Analysis <<<< Isolate the photons | |
120 | AliIsolationCut * ic = new AliIsolationCut(); | |
121 | ic->SetConeSize(0.5); | |
122 | ic->SetPtThreshold(1.); | |
123 | ic->SetICMethod(AliIsolationCut::kPtThresIC); | |
124 | ic->Print(""); | |
125 | ||
126 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); | |
127 | anaisol->SetDebug(-1); | |
128 | anaisol->SetMinPt(5); | |
129 | anaisol->SetInputAODName("Photons"); | |
130 | anaisol->SetCalorimeter("PHOS"); | |
131 | anaisol->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
132 | //Select clusters with no pair, if both clusters with pi0 mass | |
133 | anaisol->SwitchOffInvariantMass(); | |
134 | //anaisol->SetNeutralMesonSelection(nms); | |
135 | //Do isolation cut | |
136 | anaisol->SetIsolationCut(ic); | |
137 | //Do or not do isolation with previously produced AODs. | |
138 | //No effect if use of SwitchOnSeveralIsolation() | |
139 | anaisol->SwitchOffReIsolation(); | |
140 | //Multiple IC | |
141 | anaisol->SwitchOffSeveralIsolation() ; | |
142 | ||
143 | anaisol->Print(""); | |
144 | ||
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->SetAnaDebug(-1) ; | |
154 | maker->SwitchOnHistogramsMaker() ; | |
155 | //maker->SwitchOffHistogramsMaker() ; | |
156 | maker->SwitchOnAODsMaker() ; | |
157 | //maker->SwitchOffAODsMaker() ; | |
158 | ||
159 | maker->Print(""); | |
160 | // | |
161 | printf("======================== \n"); | |
162 | printf("END ConfigAnalysis() \n"); | |
163 | printf("======================== \n"); | |
164 | return maker ; | |
d92b41ad | 165 | } |