111 def totalDecayWidth(self) -> float: # mDarkPhoton in GeV
112 """Total decay width in GeV"""
113 # return hGeV*c / cTau(mDarkPhoton, epsilon)
115 self.leptonicDecayWidth("e-")
116 + self.leptonicDecayWidth("mu-")
117 + self.leptonicDecayWidth("tau-")
118 + self.hadronicDecayWidth()
121 # print 'Total decay width %e'%(tdw)
125 def cTau(self) -> float: # decay length in meters, dark photon mass in GeV
126 """Dark Photon lifetime in cm"""
127 ctau = hGeV * ccm / self.totalDecayWidth()
128 # print "ctau dp.py %.3e"%(ctau)
129 return ctau # GeV/MeV conversion
134 def findBranchingRatio(self, decayString) -> float:
136 if decayString == "A -> e- e+":
137 br = self.leptonicBranchingRatio("e-")
138 elif decayString == "A -> mu- mu+":
139 br = self.leptonicBranchingRatio("mu-")
140 elif decayString == "A -> tau- tau+":
141 br = self.leptonicBranchingRatio("tau-")
142 elif decayString == "A -> hadrons":
143 br = self.hadronicBranchingRatio()
145 print("findBranchingRatio ERROR: unknown decay %s" % decayString)
150 def allowedChannels(self) -> dict[str, str]:
151 print("Allowed channels for dark photon mass = %3.3f" % self.mDarkPhoton)
152 allowedDecays = {"A -> hadrons": "yes"}
153 if self.mDarkPhoton > 2.0 * mass("e-"):
154 allowedDecays.update({"A -> e- e+": "yes"})
155 print("allowing decay to e")
156 if self.mDarkPhoton > 2.0 * mass("mu-"):
157 allowedDecays.update({"A -> mu- mu+": "yes"})
158 print("allowing decay to mu")
159 if self.mDarkPhoton > 2.0 * mass("tau-"):
160 allowedDecays.update({"A -> tau- tau+": "yes"})
161 print("allowing decay to tau")
165 def scaleNEventsIncludingHadrons(self, n):
166 """Very simple patch to take into account A' -> hadrons"""
167 brh = self.hadronicBranchingRatio()
170 if self.mDarkPhoton > 2.0 * mass("c"):
173 visible_frac = 2.0 / 3.0
175 increase = brh * visible_frac
177 return n * (1.0 + increase)