16hGeV = 6.58211928 * pow(10.0, -16) * pow(10.0, -9)
32 """Returns R data from PDG in a easy to use format"""
33 ecm = r.vector(
"double")()
34 ratio = r.vector(
"double")()
35 """ecm,ratio = [],[]"""
36 with open(os.path.expandvars(
"$FAIRSHIP/input/rpp2012-hadronicrpp_page1001.dat"))
as f:
40 numEcm = float(line[0])
46 if (
"EXCLSUM" in strType)
or (
"EDWARDS" in strType)
or (
"BLINOV" in strType):
50 if "BAI" in strType
and "01" in strBis:
59 """Find the best value for R for the given center-of-mass energy"""
60 fun = r.Math.Interpolator(len(self.dataEcm), r.Math.Interpolation.kLINEAR)
61 fun.SetData(self.dataEcm, self.
dataR)
65 """Using PDG values for sigma(e+e- -> hadrons) / sigma(e+e- -> mu+mu-)"""
71 "Warning! Asking for interpolation beyond 10.29 GeV: not implemented, needs extending! Taking value at 10.29 GeV"
73 result = float(self.
PdgR.Eval(10.29))
74 elif ecm >= self.dataEcm[0]:
75 result = float(self.
PdgR.Eval(ecm))
82 """Dark photon decay width into leptons, in GeV (input short name of lepton family)"""
93 tdw = math.fabs(constant * rad * par)
101 """Dark photon decay into hadrons"""
112 """Total decay width in GeV"""
126 """Dark Photon lifetime in cm"""
132 return self.
cTau() / ccm
136 if decayString ==
"A -> e- e+":
138 elif decayString ==
"A -> mu- mu+":
140 elif decayString ==
"A -> tau- tau+":
142 elif decayString ==
"A -> hadrons":
145 print(
"findBranchingRatio ERROR: unknown decay %s" % decayString)
151 print(
"Allowed channels for dark photon mass = %3.3f" % self.
mDarkPhoton)
152 allowedDecays = {
"A -> hadrons":
"yes"}
154 allowedDecays.update({
"A -> e- e+":
"yes"})
155 print(
"allowing decay to e")
157 allowedDecays.update({
"A -> mu- mu+":
"yes"})
158 print(
"allowing decay to mu")
160 allowedDecays.update({
"A -> tau- tau+":
"yes"})
161 print(
"allowing decay to tau")
166 """Very simple patch to take into account A' -> hadrons"""
173 visible_frac = 2.0 / 3.0
175 increase = brh * visible_frac
177 return n * (1.0 + increase)
float leptonicBranchingRatio(self, str lepton)
float totalDecayWidth(self)
None __init__(self, mass, eps)
def scaleNEventsIncludingHadrons(self, n)
float hadronicBranchingRatio(self)
def interpolatePDGtable(self)
float hadronicDecayWidth(self)
float leptonicDecayWidth(self, str lepton)
dict[str, str] allowedChannels(self)
float findBranchingRatio(self, decayString)
float|int Ree_interp(self, s)
int open(const char *, int)
Opens a file descriptor.