FairShip
Loading...
Searching...
No Matches
makeCascadePythia8.PythiaFactory Class Reference

Public Member Functions

 __init__ (self, seed, tune_settings, stable_ids)
 __call__ (self, settings)

Public Attributes

 seeds = random.Random(f"pythia8-{seed}")
 tune_settings = tune_settings
 stable_ids = stable_ids
int n_instances = 0

Detailed Description

Create initialised Pythia8 instances with the tune, their own seed and stable cascade and signal
particles. The seeds are drawn from a generator of their own, so that they do not follow the draws
of the cascade; Pythia8 accepts seeds up to 900000000.

Definition at line 314 of file makeCascadePythia8.py.

Constructor & Destructor Documentation

◆ __init__()

makeCascadePythia8.PythiaFactory.__init__ ( self,
seed,
tune_settings,
stable_ids )

Definition at line 319 of file makeCascadePythia8.py.

319 def __init__(self, seed, tune_settings, stable_ids):
320 self.seeds = random.Random(f"pythia8-{seed}")
321 self.tune_settings = tune_settings
322 self.stable_ids = stable_ids
323 self.n_instances = 0
324

Member Function Documentation

◆ __call__()

makeCascadePythia8.PythiaFactory.__call__ ( self,
settings )

Definition at line 325 of file makeCascadePythia8.py.

325 def __call__(self, settings):
326 self.n_instances += 1
327 pythia = pythia8.Pythia("", False)
328 for setting in [*self.tune_settings, *settings, "Print:quiet = on", "Random:setSeed = on"]:
329 pythia.readString(setting)
330 pythia.readString(f"Random:seed = {self.seeds.randint(1, 900000000)}")
331 for pdg_id in self.stable_ids:
332 pythia.readString(f"{pdg_id}:mayDecay = off")
333 if not pythia.init():
334 raise RuntimeError(f"Pythia8 initialisation failed for {settings}")
335 return pythia
336
337

Member Data Documentation

◆ n_instances

int makeCascadePythia8.PythiaFactory.n_instances = 0

Definition at line 323 of file makeCascadePythia8.py.

◆ seeds

makeCascadePythia8.PythiaFactory.seeds = random.Random(f"pythia8-{seed}")

Definition at line 320 of file makeCascadePythia8.py.

◆ stable_ids

makeCascadePythia8.PythiaFactory.stable_ids = stable_ids

Definition at line 322 of file makeCascadePythia8.py.

◆ tune_settings

makeCascadePythia8.PythiaFactory.tune_settings = tune_settings

Definition at line 321 of file makeCascadePythia8.py.


The documentation for this class was generated from the following file: