13 <input>PhokharaEvtgenAnalysis.root</input>
14 <contact>Kirill Chilikin (K.A.Chilikin@inp.nsk.su)</contact>
15 <description>Analysis of e+ e- -> J/psi eta_c events.</description>
120def ratio_measured_ratio(ecms, ecut):
121 alpha = 7.2973525664e-3
123 riemann_zeta_3 = 1.2020569032
125 l_e = math.log(ecms / 2 / ecut)
126 L = 2.0 * math.log(ecms / me)
127 r1 = -2.0 * l_e * (L - 1) + 1.5 * L + pi * pi / 3 - 2
128 r2 = 0.5 * pow(-2.0 * l_e * (L - 1), 2) + \
129 (1.5 * L + pi * pi / 3 - 2) * (-2.0 * l_e * (L - 1)) + L * L * (-l_e / 3 + 11. / 8 - pi * pi / 3) + \
130 L * (2.0 * l_e * l_e / 3 + 10. * l_e / 9 - 203. / 48 + 11. * pi * pi / 12 + 3.0 * riemann_zeta_3) - \
131 (4. * l_e * l_e * l_e / 9 + 10. * l_e * l_e / 9 + 2. * l_e / 9 * (28. / 3 - pi * pi)) - \
132 (pow(L - 2. * l_e, 3) / 18 - 5. / 18 * pow(L - 2. * l_e, 2) + (28. / 3 - pi * pi) * (L - 2. * l_e) / 9)
133 r = 1. + alpha / pi * r1 + alpha * alpha / pi / pi * r2
137def cross_section_ee_mumu(ecms):
138 alpha = 7.2973525664e-3
140 conv = 0.389379338 * 1e12
142 if (ecms < 2.0 * mmu):
144 return 4.0 * math.pi * alpha * alpha / (3.0 * s) * conv * \
145 math.sqrt(1.0 - 4.0 * mmu * mmu / s) * (1.0 + 2.0 * mmu * mmu / s)
148def effective_luminosity(ecms, e):
149 alpha = 7.2973525664e-3
152 L = 2.0 * math.log(ecms / me)
153 beta = 2.0 * alpha / pi * (L - 1)
154 x = 1.0 - pow(e / ecms, 2)
155 lum = beta * pow(x, beta - 1) * \
156 (1. + alpha / pi * (pi * pi / 3 - 1. / 2) + 3. * beta / 4 -
157 beta * beta / 24 * (L / 3 + 2. * pi * pi - 37. / 4)) - \
158 beta * (1. - x / 2) + beta * beta / 8 * \
159 (4. * (2. - x) * math.log(1. / x) + (1. + 3. * pow(1. - x, 2)) / x *
160 math.log(1. / (1. - x)) - 6 + x)
162 lum = lum * 2.0 * e / ecms / ecms
166def effective_luminosity_integral(ecms, emin, emax):
170 for i
in range(0, npoints):
171 e = emin + (emax - emin) / npoints * (float(i) + 0.5)
172 if (e > e_threshold):
173 intg = intg + effective_luminosity(ecms, e)
174 intg = intg / npoints
180 return ratio_measured_ratio(ecms, ecut) / (emax - emin)
185input_file = ROOT.TFile(
'PhokharaEvtgenAnalysis.root')
186tree = input_file.Get(
'tree')
187output_file = ROOT.TFile(
'PhokharaEvtgen.root',
'recreate')
189h_mgamma_exp = ROOT.TH1F(
'h_mgamma_exp',
'Virtual #gamma mass distribution (theory)', nbins_ratio, emin_ratio, emax_ratio)
191h_ratio = ROOT.TH1F(
'h_ratio',
'Virtual #gamma mass distribution / expectation', nbins_ratio, emin_ratio, emax_ratio)
192h_ratio.GetXaxis().SetTitle(
'M_{J/#psi#eta_{c}}, GeV/c^{2}')
193h_ratio.GetYaxis().SetTitle(
'N / N_{expected}')
195h_helicity_gamma = ROOT.TH1F(
'h_helicity_gamma',
'Virtual #gamma helicity angle', 20, -1, 1)
196h_helicity_gamma.GetXaxis().SetTitle(
'cos#theta_{#gamma}')
197h_helicity_gamma.GetYaxis().SetTitle(
'Events / 0.1')
198h_helicity_gamma.SetMinimum(0)
200h_helicity_jpsi = ROOT.TH1F(
'h_helicity_jpsi',
'J/#psi helicity angle', 20, -1, 1)
201h_helicity_jpsi.GetXaxis().SetTitle(
'cos#theta_{J/#psi}')
202h_helicity_jpsi.GetYaxis().SetTitle(
'Events / 0.1')
203h_helicity_jpsi.SetMinimum(0)
210 m = math.sqrt(tree.gamma_e * tree.gamma_e - tree.gamma_px * tree.gamma_px -
211 tree.gamma_py * tree.gamma_py - tree.gamma_pz * tree.gamma_pz)
213 p_gamma = ROOT.TLorentzVector(tree.gamma_px, tree.gamma_py,
214 tree.gamma_pz, tree.gamma_e)
215 p_jpsi = ROOT.TLorentzVector(tree.jpsi_px, tree.jpsi_py,
216 tree.jpsi_pz, tree.jpsi_e)
217 p_lepton = ROOT.TLorentzVector(tree.lepton_px, tree.lepton_py,
218 tree.lepton_pz, tree.lepton_e)
219 v_boost_gamma = -p_gamma.BoostVector()
220 v_boost_jpsi = -p_jpsi.BoostVector()
221 p_jpsi.Boost(v_boost_gamma)
222 h_helicity_gamma.Fill(-math.cos(p_gamma.Vect().Angle(p_jpsi.Vect())))
223 p_lepton.Boost(v_boost_jpsi)
224 p_gamma.Boost(v_boost_jpsi)
225 h_helicity_jpsi.Fill(-math.cos(p_gamma.Vect().Angle(p_lepton.Vect())))
227for i
in range(nbins_ratio, 0, -1):
228 emin = emin_ratio + (emax_ratio - emin_ratio) / nbins_ratio * (i - 1)
229 emax = emin_ratio + (emax_ratio - emin_ratio) / nbins_ratio * i
230 eff_lumi = effective_luminosity_integral(ecms, emin, emax)
231 xs = cross_section_ee_mumu(h_ratio.GetBinLowEdge(i)) * vacpol_coef[i - 1]
232 h_mgamma_exp.SetBinContent(i, xs * eff_lumi)
234h_mgamma_exp.Scale(n / h_mgamma_exp.Integral())
236for i
in range(nbins_ratio, 0, -1):
237 val = h_ratio.GetBinContent(i)
238 err = h_ratio.GetBinError(i)
239 exp = h_mgamma_exp.GetBinContent(i)
240 h_ratio.SetBinContent(i, val / exp)
241 h_ratio.SetBinError(i, err / exp)
243contact =
'Kirill Chilikin (K.A.Chilikin@inp.nsk.su)'
244functions = h_ratio.GetListOfFunctions()
245functions.Add(ROOT.TNamed(
'Description',
'Number of events / theoretical expectation'))
246functions.Add(ROOT.TNamed(
'Check',
'Should be consistent with 1'))
247functions.Add(ROOT.TNamed(
'Contact', contact))
248functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
249functions = h_helicity_gamma.GetListOfFunctions()
250functions.Add(ROOT.TNamed(
'Description',
'Virtual photon helicity angle'))
251functions.Add(ROOT.TNamed(
'Check',
'Should be distributed as (1 + cos^2 theta)'))
252functions.Add(ROOT.TNamed(
'Contact', contact))
253functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
254functions = h_helicity_jpsi.GetListOfFunctions()
255functions.Add(ROOT.TNamed(
'Description',
'J/psi helicity angle'))
256functions.Add(ROOT.TNamed(
'Check',
'Should be distributed as (1 + cos^2 theta)'))
257functions.Add(ROOT.TNamed(
'Contact', contact))
258functions.Add(ROOT.TNamed(
'MetaOptions',
'shifter'))
262h_helicity_gamma.Write()
263h_helicity_jpsi.Write()