FairShip
Loading...
Searching...
No Matches
shipRoot_conf Namespace Reference

Functions

None forReadingOldFile ()
 
None pyExit ()
 
None configure (darkphoton=None)
 

Variables

os genfit_root = os.environ.get("GENFIT_ROOT", os.environ.get("GENFIT", ""))
 

Function Documentation

◆ configure()

None shipRoot_conf.configure (   darkphoton = None)

Definition at line 73 of file shipRoot_conf.py.

73def configure(darkphoton=None) -> None:
74 ROOT.gROOT.ProcessLine('#include "' + os.environ["FAIRSHIP"] + '/shipdata/ShipGlobals.h"')
75 pdg = ROOT.TDatabasePDG.Instance()
76 # pythia stuff not known to ROOT
77 pdg.AddParticle("system", "system", 0.0, False, 0.0, 0.0, "XXX", 90)
78 pdg.AddParticle("Pomeron", "Pomeron", 0.0, False, 0.0, 0.0, "Pomeron", 990)
79 pdg.AddParticle("p_diffr+", "p_diffr+", 0.0, False, 0.0, 0.0, "XXX", 9902210)
80 pdg.AddParticle("n_diffr0", "n_diffr0", 0.0, False, 0.0, 0.0, "XXX", 9902110)
81 pdg.AddParticle("C12", "Carbon-12", 12.0, True, 0, 6.0, "nucleus", 1000060120)
82 pdg.AddParticle("C13", "Carbon-13", 13.003355, True, 0, 6.0, "nucleus", 1000060130)
83 pdg.AddParticle("J/psi[3PJ(8)]", "J/psi[3PJ(8)]", 3.29692, False, 0.0, 0.0, "Meson", 9942003)
84 pdg.AddParticle("J/psi[1S0(8)]", "J/psi[1S0(8)]", 3.29692, False, 0.0, 0.0, "Meson", 9941003)
85 pdg.AddParticle("f0(980)", "f0(980)", 1.0, False, 0.0, 0.0, "Meson", 9010221)
86 pdg.AddParticle("psi(3770)", "psi(3770)", 3.77315, False, 0.02720, 0, "Meson", 30443)
87 pdg.AddParticle("psi(3770)[3PJ(8)]", "psi(3770)[3PJ(8)]", 3.97315, False, 0.0, 0, "Meson", 9942033)
88 pdg.AddParticle("J/psi[3S1(8)]", "J/psi[3S1(8)]", 3.29692, False, 0.0, 0, "Meson", 9940003)
89 pdg.AddParticle("chi_0c[3S1(8)]", "chi_0c[3S1(8)]", 3.61475, False, 0.0, 0, "Meson", 9940011)
90 pdg.AddParticle("psi(2S)[1S0(8)]", "psi(2S)[1S0(8)]", 3.88611, False, 0.0, 0, "Meson", 9941103)
91 pdg.AddParticle("psi(2S)[3S1(8)]", "psi(2S)[3S1(8)]", 3.88611, False, 0.0, 0, "Meson", 9940103)
92 pdg.AddParticle("psi(2S)[3PJ(8)]", "psi(2S)[3PJ(8)]", 3.88611, False, 0.0, 0, "Meson", 9942103)
93 pdg.AddParticle("chi_1c[3S1(8)]", "chi_1c[3S1(8)]", 3.71066, False, 0.0, 0, "Meson", 9940023)
94 pdg.AddParticle("chi_2c[3S1(8)]", "chi_2c[3S1(8)]", 3.75620, False, 0.0, 0, "Meson", 9940005)
95 pdg.AddParticle("Upsilon[3S1(8)]", "Upsilon[3S1(8)]", 9.66030, False, 0.0, 0, "Meson", 9950003)
96
97 atexit.register(pyExit)
98 if darkphoton == 0:
99 return # will be added by pythia8_conf
100 if darkphoton:
101 addDPtoROOT()
102 else:
103 addHNLtoROOT()

◆ forReadingOldFile()

None shipRoot_conf.forReadingOldFile ( )

Definition at line 47 of file shipRoot_conf.py.

47def forReadingOldFile() -> None:
48 ROOT.gInterpreter.ProcessLine("typedef double Double32_t")
49
50
51# -----prepare python exit-----------------------------------------------
52
53

◆ pyExit()

None shipRoot_conf.pyExit ( )

Definition at line 54 of file shipRoot_conf.py.

54def pyExit() -> None:
55 for module in sys.modules:
56 if "ROOT.genfit" in module:
57 x = sys.modules["__main__"]
58 if hasattr(x, "run"):
59 del x.run
60 print("make suicid, until better solution found to ROOT/genfit interference")
61 for f in ROOT.gROOT.GetListOfFiles():
62 if f.IsWritable() and f.IsOpen():
63 f.Close()
64 os.system("kill " + str(os.getpid()))
65 if hasattr(x, "fMan"):
66 del x.fMan
67 if hasattr(x, "fRun"):
68 del x.fRun
69 return
70 print("Exit normally")
71
72

Variable Documentation

◆ genfit_root

os shipRoot_conf.genfit_root = os.environ.get("GENFIT_ROOT", os.environ.get("GENFIT", ""))

Definition at line 23 of file shipRoot_conf.py.