]>
Commit | Line | Data |
---|---|---|
bdcfac30 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | /* $Id$ */ | |
16 | ||
17 | /* History of cvs commits: | |
18 | * | |
19 | * $Log$ | |
4b707925 | 20 | * Revision 1.2 2007/08/17 12:40:04 schutz |
21 | * New analysis classes by Gustavo Conesa | |
22 | * | |
bdcfac30 | 23 | * Revision 1.1.2.1 2007/07/26 10:32:09 schutz |
24 | * new analysis classes in the the new analysis framework | |
25 | * | |
26 | * | |
27 | */ | |
28 | ||
29 | //_________________________________________________________________________ | |
30 | // Base class for reading data in order to do prompt gamma correlations | |
31 | //*-- Author: Gustavo Conesa (LNF-INFN) | |
32 | ////////////////////////////////////////////////////////////////////////////// | |
33 | ||
34 | ||
35 | // --- ROOT system --- | |
36 | ||
37 | //---- ANALYSIS system ---- | |
38 | #include "Riostream.h" | |
39 | #include "AliLog.h" | |
40 | #include "AliGammaReader.h" | |
41 | ||
42 | ClassImp(AliGammaReader) | |
43 | ||
44 | ||
45 | //____________________________________________________________________________ | |
46 | AliGammaReader::AliGammaReader() : | |
47 | TObject(), fDataType(0), | |
48 | fCTSEtaCut(0.), fEMCALEtaCut(0.), fPHOSEtaCut(0.), | |
4b707925 | 49 | fNeutralPtCut(0.), fChargedPtCut(0.), |
50 | fEMCALIPDistance(0.), fPHOSIPDistance(0.), | |
51 | fEMCALMinAngle(0.), fPHOSMinAngle(0.), | |
52 | fEMCALPID(0),fPHOSPID(0), | |
53 | fEMCALPhotonWeight(0.), fEMCALPi0Weight(0.), fEMCALElectronWeight(0.), | |
54 | fEMCALChargeWeight(0.),fEMCALNeutralWeight(0.), | |
55 | fPHOSPhotonWeight(0.), fPHOSPi0Weight(0.), fPHOSElectronWeight(0.), | |
56 | fPHOSChargeWeight(0.) , fPHOSNeutralWeight(0.) , | |
57 | fPHOSWeightFormula(0), fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0) | |
bdcfac30 | 58 | { |
59 | //Ctor | |
60 | ||
61 | fPhiEMCALCut[0]=0.; | |
62 | fPhiEMCALCut[1]=0.; | |
63 | fPhiPHOSCut[0]=0.; | |
64 | fPhiPHOSCut[1]=0.; | |
65 | ||
66 | //Initialize parameters | |
67 | InitParameters(); | |
68 | } | |
69 | ||
70 | //____________________________________________________________________________ | |
71 | AliGammaReader::AliGammaReader(const AliGammaReader & g) : | |
72 | TObject(g), fDataType(g.fDataType), | |
73 | fCTSEtaCut(g.fCTSEtaCut), fEMCALEtaCut(g.fEMCALEtaCut), fPHOSEtaCut(g.fPHOSEtaCut), | |
4b707925 | 74 | fNeutralPtCut(g.fNeutralPtCut), fChargedPtCut(g.fChargedPtCut), |
75 | fEMCALIPDistance(g.fEMCALIPDistance), fPHOSIPDistance(g.fPHOSIPDistance), | |
76 | fEMCALMinAngle(g.fEMCALMinAngle), fPHOSMinAngle(g.fPHOSMinAngle), | |
77 | fEMCALPID(g.fEMCALPID), | |
78 | fPHOSPID(g.fPHOSPID), | |
79 | fEMCALPhotonWeight(g.fEMCALPhotonWeight), | |
80 | fEMCALPi0Weight(g.fEMCALPi0Weight), | |
81 | fEMCALElectronWeight(g.fEMCALElectronWeight), | |
82 | fEMCALChargeWeight(g.fEMCALChargeWeight), | |
83 | fEMCALNeutralWeight(g.fEMCALNeutralWeight), | |
84 | fPHOSPhotonWeight(g.fPHOSPhotonWeight), | |
85 | fPHOSPi0Weight(g.fPHOSPi0Weight), | |
86 | fPHOSElectronWeight(g.fPHOSElectronWeight), | |
87 | fPHOSChargeWeight(g.fPHOSChargeWeight), | |
88 | fPHOSNeutralWeight(g.fPHOSNeutralWeight), | |
89 | fPHOSWeightFormula(g.fPHOSWeightFormula), | |
90 | fPHOSPhotonWeightFormula(g.fPHOSPhotonWeightFormula), | |
91 | fPHOSPi0WeightFormula(g.fPHOSPi0WeightFormula) | |
bdcfac30 | 92 | { |
93 | // cpy ctor | |
94 | ||
95 | fPhiEMCALCut[0]=g.fPhiEMCALCut[0]; | |
96 | fPhiEMCALCut[1]=g.fPhiEMCALCut[1]; | |
97 | fPhiPHOSCut[0]=g.fPhiPHOSCut[0]; | |
98 | fPhiPHOSCut[1]=g.fPhiPHOSCut[1]; | |
99 | } | |
100 | ||
101 | //_________________________________________________________________________ | |
102 | AliGammaReader & AliGammaReader::operator = (const AliGammaReader & source) | |
103 | { | |
104 | // assignment operator | |
105 | ||
106 | if(&source == this) return *this; | |
107 | ||
108 | fDataType = source.fDataType ; | |
109 | fCTSEtaCut = source.fCTSEtaCut; | |
110 | fEMCALEtaCut = source.fEMCALEtaCut; | |
111 | fPHOSEtaCut = source.fPHOSEtaCut; | |
112 | fNeutralPtCut = source.fNeutralPtCut; | |
113 | fChargedPtCut = source.fChargedPtCut; | |
114 | ||
115 | fPhiEMCALCut[0]=source.fPhiEMCALCut[0]; | |
116 | fPhiEMCALCut[1]=source.fPhiEMCALCut[1]; | |
117 | fPhiPHOSCut[0]=source.fPhiPHOSCut[0]; | |
118 | fPhiPHOSCut[1]=source.fPhiPHOSCut[1]; | |
119 | ||
4b707925 | 120 | fEMCALIPDistance = source.fEMCALIPDistance; |
121 | fPHOSIPDistance = source.fPHOSIPDistance; | |
122 | fEMCALMinAngle = source.fEMCALMinAngle; | |
123 | fPHOSMinAngle = source.fPHOSMinAngle; | |
124 | ||
125 | fEMCALPID = source.fEMCALPID ; | |
126 | fPHOSPID = source.fPHOSPID ; | |
127 | ||
128 | fEMCALPhotonWeight = source. fEMCALPhotonWeight ; | |
129 | fEMCALPi0Weight = source.fEMCALPi0Weight ; | |
130 | fEMCALElectronWeight = source.fEMCALElectronWeight; | |
131 | fEMCALChargeWeight = source.fEMCALChargeWeight; | |
132 | fEMCALNeutralWeight = source.fEMCALNeutralWeight; | |
133 | ||
134 | fPHOSPhotonWeight = source.fPHOSPhotonWeight ; | |
135 | fPHOSPi0Weight = source.fPHOSPi0Weight ; | |
136 | fPHOSElectronWeight = source.fPHOSElectronWeight; | |
137 | fPHOSChargeWeight = source.fPHOSChargeWeight; | |
138 | fPHOSNeutralWeight = source.fPHOSNeutralWeight; | |
139 | ||
140 | fPHOSWeightFormula = source.fPHOSWeightFormula; | |
141 | fPHOSPhotonWeightFormula = source.fPHOSPhotonWeightFormula; | |
142 | fPHOSPi0WeightFormula = source.fPHOSPi0WeightFormula; | |
143 | ||
144 | ||
bdcfac30 | 145 | return *this; |
146 | ||
147 | } | |
148 | ||
149 | //_______________________________________________________________ | |
150 | void AliGammaReader::InitParameters() | |
151 | { | |
152 | ||
153 | //Initialize the parameters of the analysis. | |
154 | fDataType = kData ; | |
155 | fCTSEtaCut = 0.7 ; | |
156 | fEMCALEtaCut = 0.7 ; | |
157 | fPHOSEtaCut = 0.12 ; | |
158 | fPhiEMCALCut[0] = 80 *TMath::DegToRad(); | |
159 | fPhiEMCALCut[1] = 190*TMath::DegToRad(); | |
160 | fPhiPHOSCut[0] = 220. *TMath::DegToRad(); | |
161 | fPhiPHOSCut[1] = 320.*TMath::DegToRad(); | |
162 | fNeutralPtCut = 0.5 ; | |
163 | fChargedPtCut = 0.5 ; | |
164 | ||
4b707925 | 165 | fEMCALMinAngle = 2.5 * TMath::DegToRad() ; |
166 | fPHOSMinAngle = 0.45 * TMath::DegToRad() ; //3.6 ; | |
167 | fEMCALIPDistance = 450. ;//cm | |
168 | fPHOSIPDistance = 445. ;//cm 460 (EMCA) - 15 (CPV) | |
169 | ||
170 | //pid, only for ESD data | |
171 | fEMCALPID = kFALSE; | |
172 | fPHOSPID = kFALSE; | |
173 | ||
174 | fEMCALPhotonWeight = 0.8 ; | |
175 | fEMCALPi0Weight = 0.5 ; | |
176 | fEMCALElectronWeight = 0.8 ; | |
177 | fEMCALChargeWeight = 0.5 ; | |
178 | fEMCALNeutralWeight = 0.5 ; | |
179 | ||
180 | fPHOSPhotonWeight = 0.75 ; | |
181 | fPHOSPi0Weight = 0.8 ; | |
182 | fPHOSElectronWeight = 0.5 ; | |
183 | fPHOSChargeWeight = 0.5 ; | |
184 | fPHOSNeutralWeight = 0.5 ; | |
185 | ||
186 | //Formula to set the PID weight threshold for photon or pi0 | |
187 | fPHOSWeightFormula = kTRUE; | |
188 | fPHOSPhotonWeightFormula = | |
189 | 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))"); | |
190 | fPHOSPi0WeightFormula = | |
191 | 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))"); | |
192 | ||
bdcfac30 | 193 | } |
194 | ||
195 | ||
196 | //________________________________________________________________ | |
197 | void AliGammaReader::Print(const Option_t * opt) const | |
198 | { | |
199 | ||
200 | //Print some relevant parameters set for the analysis | |
201 | if(! opt) | |
202 | return; | |
203 | ||
204 | Info("Print", "%s %s", GetName(), GetTitle() ) ; | |
205 | printf("Data type : %d\n", fDataType) ; | |
206 | printf("CTS Eta cut : %f\n", fCTSEtaCut) ; | |
207 | printf("EMCAL Eta cut : %f\n", fEMCALEtaCut) ; | |
208 | printf("PHOS Eta cut : %f\n", fPHOSEtaCut) ; | |
209 | printf("Phi EMCAL cut : [%f, %f]\n", fPhiEMCALCut[0],fPhiEMCALCut[1]) ; | |
210 | printf("Phi PHOS cut : [%f, %f]\n", fPhiPHOSCut[0],fPhiPHOSCut[1]) ; | |
211 | printf("pT neutral cut : %f GeV/c\n", fNeutralPtCut) ; | |
212 | printf("pT charged cut : %f GeV/c\n", fChargedPtCut) ; | |
213 | ||
4b707925 | 214 | if(fDataType == kMC || fDataType == kMCData){ |
215 | printf("IP distance to PHOS : %f\n", fPHOSIPDistance) ; | |
216 | printf("IP distance to EMCAL : %f\n", fEMCALIPDistance) ; | |
217 | printf("Min gamma decay aperture angle in PHOS : %f\n", fPHOSMinAngle) ; | |
218 | printf("Min gamma decay aperture angle in EMCAL : %f\n", fEMCALMinAngle) ; | |
219 | } | |
220 | ||
221 | if(fDataType != kMC){ | |
222 | printf("PHOS PID on? = %d\n", fPHOSPID) ; | |
223 | printf("EMCAL PID on? = %d\n", fEMCALPID) ; | |
224 | printf("PHOS PID weight , photon %f, pi0 %f, e %f, charge %f, neutral %f \n", | |
225 | fPHOSPhotonWeight, fPHOSPi0Weight, | |
226 | fPHOSElectronWeight, fPHOSChargeWeight, fPHOSNeutralWeight) ; | |
227 | printf("EMCAL PID weight, photon %f, pi0 %f, e %f, charge %f, neutral %f\n", | |
228 | fEMCALPhotonWeight, fEMCALPi0Weight, | |
229 | fEMCALElectronWeight, fEMCALChargeWeight, fEMCALNeutralWeight) ; | |
230 | ||
231 | printf("PHOS Parametrized weight on? = %d\n", fPHOSWeightFormula) ; | |
232 | if(fPHOSWeightFormula){ | |
233 | printf(">>>>>>>>>>> Photon weight formula<<<<<<<<<<<<\n"); | |
234 | fPHOSPhotonWeightFormula->Print(); | |
235 | printf(">>>>>>>>>>> Pi0 weight formula<<<<<<<<<<<<\n"); | |
236 | fPHOSPhotonWeightFormula->Print(); | |
237 | } | |
238 | } | |
239 | ||
bdcfac30 | 240 | } |
241 | ||
242 |