6 <input>PhokharaEvtgenAnalysis.root</input>
7 <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</contact>
8 <description>Analysis of e+ e- -> J/psi eta_c events.</description>
18 e_threshold = 6.077216
113 def ratio_measured_ratio(ecms, ecut):
114 alpha = 7.2973525664e-3
116 riemann_zeta_3 = 1.2020569032
118 l_e = math.log(ecms / 2 / ecut)
119 L = 2.0 * math.log(ecms / me)
120 r1 = -2.0 * l_e * (L - 1) + 1.5 * L + pi * pi / 3 - 2
121 r2 = 0.5 * pow(-2.0 * l_e * (L - 1), 2) + \
122 (1.5 * L + pi * pi / 3 - 2) * (-2.0 * l_e * (L - 1)) + L * L * (-l_e / 3 + 11. / 8 - pi * pi / 3) + \
123 L * (2.0 * l_e * l_e / 3 + 10. * l_e / 9 - 203. / 48 + 11. * pi * pi / 12 + 3.0 * riemann_zeta_3) - \
124 (4. * l_e * l_e * l_e / 9 + 10. * l_e * l_e / 9 + 2. * l_e / 9 * (28. / 3 - pi * pi)) - \
125 (pow(L - 2. * l_e, 3) / 18 - 5. / 18 * pow(L - 2. * l_e, 2) + (28. / 3 - pi * pi) * (L - 2. * l_e) / 9)
126 r = 1. + alpha / pi * r1 + alpha * alpha / pi / pi * r2
130 def cross_section_ee_mumu(ecms):
131 alpha = 7.2973525664e-3
133 conv = 0.389379338 * 1e12
135 if (ecms < 2.0 * mmu):
137 return 4.0 * math.pi * alpha * alpha / (3.0 * s) * conv * \
138 math.sqrt(1.0 - 4.0 * mmu * mmu / s) * (1.0 + 2.0 * mmu * mmu / s)
141 def effective_luminosity(ecms, e):
142 alpha = 7.2973525664e-3
145 L = 2.0 * math.log(ecms / me)
146 beta = 2.0 * alpha / pi * (L - 1)
147 x = 1.0 - pow(e / ecms, 2)
148 lum = beta * pow(x, beta - 1) * \
149 (1. + alpha / pi * (pi * pi / 3 - 1. / 2) + 3. * beta / 4 -
150 beta * beta / 24 * (L / 3 + 2. * pi * pi - 37. / 4)) - \
151 beta * (1. - x / 2) + beta * beta / 8 * \
152 (4. * (2. - x) * math.log(1. / x) + (1. + 3. * pow(1. - x, 2)) / x *
153 math.log(1. / (1. - x)) - 6 + x)
155 lum = lum * 2.0 * e / ecms / ecms
159 def effective_luminosity_integral(ecms, emin, emax):
163 for i
in range(0, npoints):
164 e = emin + (emax - emin) / npoints * (float(i) + 0.5)
165 if (e > e_threshold):
166 intg = intg + effective_luminosity(ecms, e)
167 intg = intg / npoints
173 return ratio_measured_ratio(ecms, ecut) / (emax - emin)
178 input_file = ROOT.TFile(
'PhokharaEvtgenAnalysis.root')
179 tree = input_file.Get(
'tree')
180 output_file = ROOT.TFile(
'PhokharaEvtgen.root',
'recreate')
182 h_mgamma_exp = ROOT.TH1F(
'h_mgamma_exp',
'Virtual #gamma mass distribution (theory)', nbins_ratio, emin_ratio, emax_ratio)
184 h_ratio = ROOT.TH1F(
'h_ratio',
'Virtual #gamma mass distribution / expectation', nbins_ratio, emin_ratio, emax_ratio)
185 h_ratio.GetXaxis().SetTitle(
'M_{J/#psi#eta_{c}}, GeV/c^{2}')
186 h_ratio.GetYaxis().SetTitle(
'N / N_{expected}')
188 h_helicity_gamma = ROOT.TH1F(
'h_helicity_gamma',
'Virtual #gamma helicity angle', 20, -1, 1)
189 h_helicity_gamma.GetXaxis().SetTitle(
'cos#theta_{#gamma}')
190 h_helicity_gamma.GetYaxis().SetTitle(
'Events / 0.1')
191 h_helicity_gamma.SetMinimum(0)
193 h_helicity_jpsi = ROOT.TH1F(
'h_helicity_jpsi',
'J/#psi helicity angle', 20, -1, 1)
194 h_helicity_jpsi.GetXaxis().SetTitle(
'cos#theta_{J/#psi}')
195 h_helicity_jpsi.GetYaxis().SetTitle(
'Events / 0.1')
196 h_helicity_jpsi.SetMinimum(0)
198 n = tree.GetEntries()
201 for i
in range(0, n):
203 m = math.sqrt(tree.gamma_e * tree.gamma_e - tree.gamma_px * tree.gamma_px -
204 tree.gamma_py * tree.gamma_py - tree.gamma_pz * tree.gamma_pz)
206 p_gamma = ROOT.TLorentzVector(tree.gamma_px, tree.gamma_py,
207 tree.gamma_pz, tree.gamma_e)
208 p_jpsi = ROOT.TLorentzVector(tree.jpsi_px, tree.jpsi_py,
209 tree.jpsi_pz, tree.jpsi_e)
210 p_lepton = ROOT.TLorentzVector(tree.lepton_px, tree.lepton_py,
211 tree.lepton_pz, tree.lepton_e)
212 v_boost_gamma = -p_gamma.BoostVector()
213 v_boost_jpsi = -p_jpsi.BoostVector()
214 p_jpsi.Boost(v_boost_gamma)
215 h_helicity_gamma.Fill(-math.cos(p_gamma.Vect().Angle(p_jpsi.Vect())))
216 p_lepton.Boost(v_boost_jpsi)
217 p_gamma.Boost(v_boost_jpsi)
218 h_helicity_jpsi.Fill(-math.cos(p_gamma.Vect().Angle(p_lepton.Vect())))
220 for i
in range(nbins_ratio, 0, -1):
221 emin = emin_ratio + (emax_ratio - emin_ratio) / nbins_ratio * (i - 1)
222 emax = emin_ratio + (emax_ratio - emin_ratio) / nbins_ratio * i
223 eff_lumi = effective_luminosity_integral(ecms, emin, emax)
224 xs = cross_section_ee_mumu(h_ratio.GetBinLowEdge(i)) * vacpol_coef[i - 1]
225 h_mgamma_exp.SetBinContent(i, xs * eff_lumi)
227 h_mgamma_exp.Scale(n / h_mgamma_exp.Integral())
229 for i
in range(nbins_ratio, 0, -1):
230 val = h_ratio.GetBinContent(i)
231 err = h_ratio.GetBinError(i)
232 exp = h_mgamma_exp.GetBinContent(i)
233 h_ratio.SetBinContent(i, val / exp)
234 h_ratio.SetBinError(i, err / exp)
236 contact =
'Kirill Chilikin (K.A.Chilikin@inp.nsk.su)'
237 functions = h_ratio.GetListOfFunctions()
238 functions.Add(ROOT.TNamed(
'Description',
'Number of events / theoretical expectation'))
239 functions.Add(ROOT.TNamed(
'Check',
'Should be consistent with 1'))
240 functions.Add(ROOT.TNamed(
'Contact', contact))
241 functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
242 functions = h_helicity_gamma.GetListOfFunctions()
243 functions.Add(ROOT.TNamed(
'Description',
'Virtual photon helicity angle'))
244 functions.Add(ROOT.TNamed(
'Check',
'Should be distributed as (1 + cos^2 theta)'))
245 functions.Add(ROOT.TNamed(
'Contact', contact))
246 functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
247 functions = h_helicity_jpsi.GetListOfFunctions()
248 functions.Add(ROOT.TNamed(
'Description',
'J/psi helicity angle'))
249 functions.Add(ROOT.TNamed(
'Check',
'Should be distributed as (1 + cos^2 theta)'))
250 functions.Add(ROOT.TNamed(
'Contact', contact))
251 functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
255 h_helicity_gamma.Write()
256 h_helicity_jpsi.Write()