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