FairShip
Loading...
Searching...
No Matches
rpvsusy.py
Go to the documentation of this file.
1# SPDX-License-Identifier: LGPL-3.0-or-later
2# SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP Collaboration
3
4r"""
5# ==================================================================
6# Python module
7#
8# This module provides methods to compute the lifetime and
9# branching ratio of SUSY RPV neutralino given its mass and couplings as
10# input parameters.
11#
12# Created: 30/04/2016 Konstantinos A. Petridis (konstantinos.petridis@cern.ch)
13#
14# Sample usage:
15# ipython -i rpvsusy.py
16# In [1]: b = RPVSYSY(1.,[1, 1],1e3,1,True)
17# HNLbranchings instance initialized with couplings:
18# \lambda_{production} = 1GeV
19# \lambda_{decay} = 1GeV
20# universal sfermion mass = 1e3GeV
21#
22# benchmark scenario:
23# 1 (values between 1 and 5)
24# and mass:
25# m = 1.0 GeV
26# In [2]: b.computeNLifetime()
27# Out[2]: 0.0219634078804
28# In [3]: b.findBranchingRatio('N -> K+ mu-')
29# Out[3]: 0.11826749348890987
30#
31# ==================================================================
32"""
33
34import math
35import re
36
37import shipunit as u
38from rootUtils import get_particle
39
40
41def PDGname(particle):
42 """
43 Trim particle name for use with the PDG database
44 """
45 if "down" in particle:
46 return "d"
47 if "up" in particle:
48 return "u"
49 if "strange" in particle:
50 return "s"
51 if "charm" in particle:
52 return "c"
53 if "bottom" in particle:
54 return "b"
55 if "beauty" in particle:
56 return "b"
57 if "top" in particle:
58 return "t"
59 if "1" in particle:
60 particle = particle.replace("1", "'")
61 if not (
62 ("-" in particle)
63 or ("+" in particle)
64 or ("0" in particle)
65 or ("nu_" in particle)
66 or ("eta" in particle)
67 or ("phi" in particle)
68 ) and (particle not in ["d", "u", "s", "c", "b", "t"]):
69 particle += "+"
70 return particle
71
72
73def PDGcode(particle: str) -> int:
74 """
75 Read particle ID from PDG database
76 """
77 particle = PDGname(particle)
78 tPart = get_particle(particle)
79 return int(tPart.PdgCode())
80
81
82def mass(particle):
83 """
84 Read particle mass from PDG database
85 """
86 particle = PDGname(particle)
87 tPart = get_particle(particle)
88 return tPart.Mass()
89
90
91def width(particle):
92 """
93 Read particle width from PDG database
94 """
95 particle = PDGname(particle)
96 tPart = get_particle(particle)
97 return tPart.Width()
98
99
100def lifetime(particle):
101 """
102 Read particle lifetime from PDG database
103 """
104 particle = PDGname(particle)
105 if particle == "D0" or particle == "D0bar":
106 return 4.1e-13
107 elif particle == "D+" or particle == "D-":
108 return 1.0e-12
109 elif particle == "D_s+" or particle == "D_s-":
110 return 5.0e-13
111 elif particle == "B0" or particle == "B0bar":
112 return 1.5e-12
113 elif particle == "B+" or particle == "B-":
114 return 1.6e-12
115
116 return get_particle(particle).Lifetime()
117
118
120 """
121 Store some constants useful for HNL physics
122 """
123
124 def __init__(self) -> None:
126 "K+": 0.156 * u.GeV,
127 "K-": 0.156 * u.GeV,
128 "K_L0": 0.156 / math.sqrt(2) * u.GeV,
129 "K_S0": 0.156 / math.sqrt(2) * u.GeV,
130 "K*0": 0.230 * u.GeV,
131 "K*0_bar": 0.230 * u.GeV,
132 "K*+": 0.230 * u.GeV,
133 "K*-": 0.230 * u.GeV,
134 "phi": 0.230 * u.GeV,
135 "eta": -0.142 * u.GeV,
136 "eta'": 0.038 * u.GeV,
137 "D+": 0.205 * u.GeV,
138 "D*+": 0.205 * u.GeV,
139 "D-": 0.205 * u.GeV,
140 "D*-": 0.205 * u.GeV,
141 "D_s+": 0.259 * u.GeV,
142 "D*_s+": 0.259 * u.GeV,
143 "D_s-": 0.259 * u.GeV,
144 "D*_s-": 0.259 * u.GeV,
145 "B+": 0.191 * u.GeV,
146 "B-": 0.191 * u.GeV,
147 "B0": 0.191 * u.GeV,
148 "B_s0": 0.228 * u.GeV,
149 "B0_bar": 0.191 * u.GeV,
150 "B_s0_bar": 0.228 * u.GeV,
151 }
152
153 self.GF = 1.166379e-05 / (u.GeV * u.GeV) # Fermi's constant (GeV^-2)
154 self.MW = 80.385 * u.GeV
155 self.gW2 = self.GF / math.sqrt(2) * 8 * self.MW * self.MW # SU(2)L gauge coupling squared
156 self.s2thetaw = 0.23126 # square sine of the Weinberg angle
157 self.t2thetaw = self.s2thetaw / (1 - self.s2thetaw) # square tan of the Weinberg angle
158 self.heV = 6.58211928 * pow(10.0, -16) # no units or it messes up!!
159 self.hGeV = self.heV * pow(10.0, -9) # no units or it messes up!!
160 # defined in Eq (30)--(32) of [1511.07436], but without
161 # the coupling over sfermion mass, that will come later
162 self.GST2 = {
163 "slepton": self.gW2 * self.t2thetaw * 9.0 / 8.0,
164 "sneutrino": self.gW2 * self.t2thetaw * 9.0 / 8.0,
165 "tlepton": self.gW2 * self.t2thetaw * 1.0 / 32.0,
166 "tneutrino": self.gW2 * self.t2thetaw * 1.0 / 32.0,
167 }
168
169
170# Load some useful constants
172
173
175 """
176 Lifetime and total and partial decay widths of an RPV neutralino
177 """
178
179 def __init__(self, mass, couplings, sfmass, benchmark, debug: bool = False) -> None:
180 r"""
181 Initialize with mass and couplings of the RPV neutralino
182
183 Inputs:
184 mass (GeV)
185 which benchmark scenario (1,2,3,4,5)
186 couplings (list of [\lambda production, \lambda decay])
187 sfermion mass to normalise the couplings by (GeV)
188 """
189 self.MN = mass * u.GeV
190 self.U = couplings
191 self.U2 = [ui * ui for ui in self.U]
192 self.sfmass = sfmass
193 self.bench = benchmark
194 self.decays = {
195 1: ["N -> K+ mu-", "N -> K*+ mu-", "N -> K*0 nu_mu", "N -> K_L0 nu_mu", "N -> K_S0 nu_mu"],
196 2: [
197 "N -> K+ mu-",
198 "N -> K*+ mu-",
199 "N -> K*0 nu_mu",
200 "N -> K_L0 nu_mu",
201 "N -> K_S0 nu_mu",
202 "N -> eta nu_mu",
203 "N -> eta' nu_mu",
204 "N -> phi nu_mu",
205 ],
206 3: ["N -> K+ mu-", "N -> K*+ mu-", "N -> K*0 nu_mu", "N -> K_L0 nu_mu", "N -> K_S0 nu_mu"],
207 4: ["N -> D+ mu-", "N -> D*+ mu-", "N -> K*0 nu_mu", "N -> K_L0 nu_mu", "N -> K_S0 nu_mu"],
208 5: ["N -> K+ tau-", "N -> K*+ tau-", "N -> K*0 nu_tau", "N -> K_L0 nu_tau", "N -> K_S0 nu_tau"],
209 }
210
211 self.prods = {
212 1: ["D+ -> N mu+"],
213 2: ["D_s+ -> N mu+"],
214 3: ["B0 -> N nu_mu"],
215 4: ["B0 -> N nu_mu"],
216 5: ["B0 -> N nu_tau", "B+ -> N tau+"],
217 }
218
219 if debug:
220 print("RPVSUSYbranchings instance initialized with couplings:")
221 print("\t benchmark scenario = %d" % self.bench)
222 print("\t production coupling = %s" % self.U[0])
223 print("\t decay coupling = %s" % self.U[1])
224 print("\t sfermion mass = %s" % self.sfmass)
225 print("\t total prod coupling = %s" % (self.U[0] / self.sfmass**2))
226 print("\t total decay coupling = %s" % (self.U[1] / self.sfmass**2))
227 print("and mass:")
228 print("\tm = %s GeV" % (self.MN))
229
230 def Get_Prod_Modes(self) -> list[str]:
231 return self.prods[self.bench]
232
233 def Get_Dec_Modes(self) -> list[str]:
234 return self.decays[self.bench]
235
236 def AddChannelsToPythia(self, P8Gen, verbose: bool = True) -> None:
237 decays_tmp = self.decays[self.bench]
238 for decay in decays_tmp:
239 decay_cpy = decay
240 decay_cpy = decay_cpy.replace("N -> ", "")
241 particles = decay_cpy.split()
242 codes = [PDGcode(p) for p in particles]
243 print(decay)
244 bf = self.findDecayBranchingRatio(decay)
245 if (
246 any("K+" in s for s in particles)
247 or any("K-" in s for s in particles)
248 or any("K*+" in s for s in particles)
249 or any("K*-" in s for s in particles)
250 or any("K*0" in s for s in particles)
251 or any("K*0_bar" in s for s in particles)
252 ):
253 bf = bf / 2.0
254 P8Gen.SetParameters(
255 "9900015:addChannel = 1 {:.12} 0 {}".format(bf, " ".join(str(code) for code in codes))
256 )
257 P8Gen.SetParameters(
258 "9900015:addChannel = 1 {:.12} 0 {}".format(bf, " ".join(str(-code) for code in codes))
259 )
260 else:
261 P8Gen.SetParameters(
262 "9900015:addChannel = 1 {:.12} 0 {}".format(bf, " ".join(str(code) for code in codes))
263 )
264 if verbose:
265 print("debug readdecay table", particles, codes, bf)
266
267 def Width_H_L(self, H, L):
268 """
269 Returns the RPV neutralino decay width into neutral meson and lepton
270
271 Inputs:
272 - H is a string (name of the meson)
273 - L is a string (name of the lepton)
274 """
275 if (mass(H) + mass(L)) > self.MN:
276 return 0.0
277
278 phsp = math.sqrt(
279 self.MN**4
280 + mass(H) ** 4
281 + mass(L) ** 4
282 - 2 * self.MN**2 * mass(H) ** 2
283 - 2 * self.MN**2 * mass(L) ** 2
284 - 2 * mass(H) ** 2 * mass(L) ** 2
285 )
286 tmp_width = 0
287 if "nu_mu" in L or "nu_e" in L or "nu_tau" in L:
288 tmp_width = (
289 phsp
290 / (self.sfmass**4 * 128 * u.pi * self.MN**3)
291 * c.GST2["sneutrino"]
292 * c.decayConstant[H] ** 2
293 * (self.MN**2 + mass(L) ** 2 - mass(H) ** 2)
294 )
295 else:
296 tmp_width = (
297 phsp
298 / (self.sfmass**4 * 128 * u.pi * self.MN**3)
299 * c.GST2["slepton"]
300 * c.decayConstant[H] ** 2
301 * (self.MN**2 + mass(L) ** 2 - mass(H) ** 2)
302 )
303
304 if "K*" in H or "D*" in H or "phi" in H:
305 if "nu_mu" in L or "nu_e" in L or "nu_tau" in L:
306 tmp_width = (
307 phsp
308 / (self.sfmass**4 * 2 * u.pi * self.MN**3)
309 * c.GST2["tneutrino"]
310 * c.decayConstant[H] ** 2
311 * (2 * (self.MN**2 - mass(L) ** 2) ** 2 - mass(H) ** 2 * (mass(H) ** 2 + self.MN**2 + mass(L) ** 2))
312 )
313 else:
314 tmp_width = (
315 phsp
316 / (self.sfmass**4 * 2 * u.pi * self.MN**3)
317 * c.GST2["tlepton"]
318 * c.decayConstant[H] ** 2
319 * (2 * (self.MN**2 - mass(L) ** 2) ** 2 - mass(H) ** 2 * (mass(H) ** 2 + self.MN**2 + mass(L) ** 2))
320 )
321 width = self.U2[1] * tmp_width
322 # contributions both from decay and production couplings
323 if self.bench == 1 and ("K_" in H or "K*" in H):
324 width = (self.U2[0] + self.U2[1]) * tmp_width
325 # contributions only from production coupling
326 if self.bench == 2 and ("eta" in H or "phi" in H):
327 width = self.U2[0] * tmp_width
328
329 # Majorana case (charge conjugate channels)
330 width = 2.0 * width
331 return width
332
333 def Width_N_L(self, H, L):
334 """
335 Returns the Meson decay width to RPV neutralino and lepton
336 Inputs:
337 - H is a string (name of the meson)
338 - L is a string (name of the lepton)
339 """
340
341 if mass(H) < (self.MN + mass(L)):
342 return 0.0
343 phsp = math.sqrt(
344 self.MN**4
345 + mass(H) ** 4
346 + mass(L) ** 4
347 - 2 * self.MN**2 * mass(H) ** 2
348 - 2 * self.MN**2 * mass(L) ** 2
349 - 2 * mass(H) ** 2 * mass(L) ** 2
350 )
351
352 tmp_width = 0
353 if "nu_mu" in L or "nu_e" in L or "nu_tau" in L:
354 tmp_width = (
355 phsp
356 / (self.sfmass**4 * 64 * u.pi * mass(H) ** 3)
357 * c.GST2["sneutrino"]
358 * c.decayConstant[H] ** 2
359 * (mass(H) ** 2 - self.MN**2 - mass(L) ** 2)
360 )
361 else:
362 tmp_width = (
363 phsp
364 / (self.sfmass**4 * 64 * u.pi * mass(H) ** 3)
365 * c.GST2["slepton"]
366 * c.decayConstant[H] ** 2
367 * (mass(H) ** 2 - self.MN**2 - mass(L) ** 2)
368 )
369
370 if "K*" in H or "D*" in H or "phi" in H:
371 if "nu_mu" in L or "nu_e" in L or "nu_tau" in L:
372 tmp_width = (
373 phsp
374 / (self.sfmass**4 * 3 * u.pi * mass(H) ** 3)
375 * c.GST2["tneutrino"]
376 * c.decayConstant[H] ** 2
377 * (2 * (self.MN**2 - mass(L) ** 2) ** 2 - mass(H) ** 2 * (mass(H) ** 2 + self.MN**2 + mass(L) ** 2))
378 )
379 else:
380 tmp_width = (
381 phsp
382 / (self.sfmass**4 * 3 * u.pi * mass(H) ** 3)
383 * c.GST2["tlepton"]
384 * c.decayConstant[H] ** 2
385 * (2 * (self.MN**2 - mass(L) ** 2) ** 2 - mass(H) ** 2 * (mass(H) ** 2 + self.MN**2 + mass(L) ** 2))
386 )
387
388 width = self.U2[0] * tmp_width
389
390 return width
391
392 def NdecayWidth(self):
393 """
394 Returns the total SUSYRPV neutralino decay width
395 """
396 declist = self.decays[self.bench]
397 hadlist = [m.group(1) for dec in declist if (m := re.search(r"->\ (.+?)\ ", dec))]
398 leplist = [dlist[1].strip() for dlist in [re.findall(r"\ \w+", dec) for dec in declist]]
399 print(leplist, hadlist)
400 totalwidth = sum([self.Width_H_L(hadlist[i], leplist[i]) for i in range(0, len(hadlist))])
401 return totalwidth
402
403 def NprodWidth(self):
404 """
405 Returns the total SUSYRPV neutralino production width
406 """
407 declist = self.prods[self.bench]
408 hadlist = [m.group(1) for dec in declist if (m := re.search(r"(.+?)\ ->", dec))]
409 leplist = [dlist[1].strip() for dlist in [re.findall(r"\ \w+", dec) for dec in declist]]
410 totalwidth = sum([self.Width_N_L(hadlist[i], leplist[i]) for i in range(0, len(hadlist))])
411 return totalwidth
412
413 def findDecayBranchingRatio(self, decayString: str):
414 """
415 Returns the branching ratio of the selected SUSY RPV neutralino decay channel
416
417 Inputs:
418 - decayString is a string describing the decay, in the form 'N -> stuff1 ... stuffN'
419 """
420 match = re.search(r"->\ (.+?)\ ", decayString)
421 if match is None:
422 raise ValueError(f"Malformed decay string: {decayString!r}")
423 had = match.group(1)
424 decaysplit = decayString.split(" ")
425 lep = ""
426 for split in decaysplit:
427 if split.find("mu") > -1 or split.find("e") > -1 or split.find("tau") > -1:
428 lep = split
429 if had == "pi+" or had == "pi-" or had == "pi0":
430 print(
431 "findBranchingRatio() ERROR: Pions in final "
432 "state have not been implemented, please choose "
433 "a different decay mode of out...\n"
434 )
435 print(self.decays)
436 return -999
437
438 corrdecstring = f"N -> {had} {lep}"
439 listdecs = self.decays[self.bench]
440 gooddec = False
441 print("findBranchingRation() INFO: You have chosen the decay: '", corrdecstring)
442 for dec in listdecs:
443 if corrdecstring in dec:
444 gooddec = True
445 if gooddec is False:
446 print("findBranchingRation() ERROR: Badly formulated decay string, please choose one of the following\n")
447 print(self.decays)
448 return -999
449
450 br = 0.0
451 totalwidth = self.NdecayWidth()
452 if totalwidth > 0.0:
453 br = self.Width_H_L(had, lep) / totalwidth
454 return br
455
456 def findProdBranchingRatio(self, decayString):
457 """
458 Returns the branching ratio of the selected SUSY RPV neutralino product channel
459
460 Inputs:
461 - decayString is a string describing the decay, in the form 'H -> N ... stuffN'
462 """
463 match = re.search(r"(.+?)\ ->", decayString)
464 if match is None:
465 raise ValueError(f"Malformed decay string: {decayString!r}")
466 had = match.group(1)
467 decaysplit = decayString.split(" ")
468 lep = ""
469 for split in decaysplit:
470 if split.find("mu") > -1 or split.find("e") > -1 or split.find("tau") > -1:
471 lep = split
472 if had == "pi+" or had == "pi-" or had == "pi0":
473 print(
474 "findProdBranchingRatio() ERROR: Pions in final "
475 "state have not been implemented, please choose "
476 "a different decay mode of out...\n"
477 )
478 print(self.decays)
479 return -999
480
481 corrdecstring = f"{had} -> N {lep}"
482 listdecs = self.prods[self.bench]
483 gooddec = False
484 print("findProdBranchingRation() INFO: You have chosen the decay: '", corrdecstring)
485 for dec in listdecs:
486 if corrdecstring in dec:
487 gooddec = True
488 if gooddec is False:
489 print(
490 "findProdBranchingRation() ERROR: Badly formulated decay string, please choose one of the following\n"
491 )
492 print(self.decays)
493 return -999
494
495 br = self.Width_N_L(had, lep) / (self.Width_N_L(had, lep) + c.hGeV / lifetime(had))
496 return br
497
498
500 """
501 SUSY RPV neutralino physics according to the nuMSM
502 """
503
504 def __init__(self, mass, couplings, sfmass, benchmark, debug: bool = False) -> None:
505 r"""
506 Initialize with mass and couplings of the HNL
507
508 Inputs:
509 mass (GeV)
510 couplings (list of [\lambda_{production}^{2}, \lambda_{decay}^{2}])
511 mass of universal sfermion
512 which benchmark (integer between 1 and 5 inclusive)
513 """
514 RPVSUSYbranchings.__init__(self, mass, couplings, sfmass, benchmark, debug)
515
516 def computeNLifetime(self, system: str = "SI"):
517 """
518 Compute the RPV neutralino lifetime
519
520 Inputs:
521 - system: choose between default (i.e. SI, result in s) or FairShip (result in ns)
522 """
523 decwidth = self.NdecayWidth()
524 if decwidth == 0.0:
525 return 0.0
526 self.NLifetime = c.hGeV / decwidth
527 if system == "FairShip":
528 self.NLifetime *= 1.0e9
529 return self.NLifetime
computeNLifetime(self, str system="SI")
Definition rpvsusy.py:516
None __init__(self, mass, couplings, sfmass, benchmark, bool debug=False)
Definition rpvsusy.py:504
list[str] Get_Dec_Modes(self)
Definition rpvsusy.py:233
list[str] Get_Prod_Modes(self)
Definition rpvsusy.py:230
None __init__(self, mass, couplings, sfmass, benchmark, bool debug=False)
Definition rpvsusy.py:179
findDecayBranchingRatio(self, str decayString)
Definition rpvsusy.py:413
findProdBranchingRatio(self, decayString)
Definition rpvsusy.py:456
None AddChannelsToPythia(self, P8Gen, bool verbose=True)
Definition rpvsusy.py:236
None __init__(self)
Definition rpvsusy.py:124
PDGname(particle)
Definition rpvsusy.py:41
lifetime(particle)
Definition rpvsusy.py:100
width(particle)
Definition rpvsusy.py:91
int PDGcode(str particle)
Definition rpvsusy.py:73
mass(particle)
Definition rpvsusy.py:82