ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8BConfig Namespace Reference

Functions

 _commands_cfg (flags, source, commands, precedence, name)
 _with_process_commands (flags, *, ShowerCfg, commands, **kwargs)
 Pythia8BBaseCfg (flags, name="Pythia8B", **kwargs)
 Pythia8B_A14_CTEQ6L1_Common_Cfg (flags, name="Pythia8B", **kwargs)
 Pythia8B_exclusiveB_Common_Cfg (flags, *, ShowerCfg, **kwargs)
 Pythia8B_Photospp_Cfg (flags, *, ShowerCfg, **kwargs)

Variables

tuple _BASE_COMMANDS
tuple _A14_CTEQ6L1_COMMANDS
tuple _EXCLUSIVE_B_COMMANDS
tuple _B_PARTICLE_PDG_CODES = (511, 521, 531, 541, 5122, 5132, 5232, 5332)
tuple _B_PDG_CODES

Detailed Description

ComponentAccumulator configuration for Pythia8B.

Function Documentation

◆ _commands_cfg()

_commands_cfg ( flags,
source,
commands,
precedence,
name )
protected

Definition at line 65 of file Pythia8BConfig.py.

65def _commands_cfg(flags, source, commands, precedence, name):
66 ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
67 ca.addEventAlgo(CompFactory.Pythia8B_i(
68 name,
69 Commands=GeneratorSettingsLayer(
70 source=source,
71 values=tuple(commands),
72 precedence=precedence,
73 report_context="Pythia8BCfg.Commands",
74 ),
75 ))
76 return ca
77
78

◆ _with_process_commands()

_with_process_commands ( flags,
* ,
ShowerCfg,
commands,
** kwargs )
protected
Collect nested fragments into one layer, with inner commands first.

The resolver accepts only one distinct layer at each precedence. Pass the
private _process_commands argument down to the base fragment so production
and Photos settings share a layer while Commands remains the user layer.

Definition at line 79 of file Pythia8BConfig.py.

79def _with_process_commands(flags, *, ShowerCfg, commands, **kwargs):
80 """Collect nested fragments into one layer, with inner commands first.
81
82 The resolver accepts only one distinct layer at each precedence. Pass the
83 private _process_commands argument down to the base fragment so production
84 and Photos settings share a layer while Commands remains the user layer.
85 """
86 pending_commands = tuple(kwargs.pop("_process_commands", ()))
87 return ShowerCfg(
88 flags,
89 _process_commands=tuple(commands) + pending_commands,
90 **kwargs,
91 )
92
93

◆ Pythia8B_A14_CTEQ6L1_Common_Cfg()

Pythia8B_A14_CTEQ6L1_Common_Cfg ( flags,
name = "Pythia8B",
** kwargs )
Configure Pythia8B with the A14 CTEQ6L1 tune.

Definition at line 129 of file Pythia8BConfig.py.

129def Pythia8B_A14_CTEQ6L1_Common_Cfg(flags, name="Pythia8B", **kwargs):
130 """Configure Pythia8B with the A14 CTEQ6L1 tune."""
131 ca = Pythia8BBaseCfg(flags, name=name, **kwargs)
132
133 from Pythia8_i.Pythia8Config import ensureRapidityOrderMPI
134 tune_commands = ensureRapidityOrderMPI(list(_A14_CTEQ6L1_COMMANDS))
135 ca.merge(_commands_cfg(
136 flags, "pythia8b_tune_A14_CTEQ6L1", tune_commands,
137 GeneratorSettingsPrecedence.TUNE, name,
138 ))
139
140 from GeneratorConfig.GeneratorInfoSvcConfig import GeneratorInfoSvcCfg
141 ca.merge(GeneratorInfoSvcCfg(flags, Tune="A14 CTEQ6L1"),
142 sequenceName=EvgenSequence.Generator.value)
143 return ca
144
145

◆ Pythia8B_exclusiveB_Common_Cfg()

Pythia8B_exclusiveB_Common_Cfg ( flags,
* ,
ShowerCfg,
** kwargs )
Configure exclusive B-hadron production.

Definition at line 146 of file Pythia8BConfig.py.

146def Pythia8B_exclusiveB_Common_Cfg(flags, *, ShowerCfg, **kwargs):
147 """Configure exclusive B-hadron production."""
148 kwargs.setdefault("SelectBQuarks", True)
149 kwargs.setdefault("SelectCQuarks", False)
150 kwargs.setdefault("VetoDoubleBEvents", True)
151 kwargs.setdefault("BPDGCodes", list(_B_PDG_CODES))
152 return _with_process_commands(
153 flags, ShowerCfg=ShowerCfg,
154 commands=_EXCLUSIVE_B_COMMANDS, **kwargs,
155 )
156
157

◆ Pythia8B_Photospp_Cfg()

Pythia8B_Photospp_Cfg ( flags,
* ,
ShowerCfg,
** kwargs )
Disable native lepton QED showering and append Photos++.

Definition at line 158 of file Pythia8BConfig.py.

158def Pythia8B_Photospp_Cfg(flags, *, ShowerCfg, **kwargs):
159 """Disable native lepton QED showering and append Photos++."""
160 ca = _with_process_commands(
161 flags, ShowerCfg=ShowerCfg,
162 commands=("TimeShower:QEDshowerByL = off",), **kwargs,
163 )
164
165 from Photospp_i.PhotosppConfig import PhotosppCfg
166 ca.merge(PhotosppCfg(flags))
167 return ca

◆ Pythia8BBaseCfg()

Pythia8BBaseCfg ( flags,
name = "Pythia8B",
** kwargs )
Configure Pythia8B with the standard generator settings.

Definition at line 94 of file Pythia8BConfig.py.

94def Pythia8BBaseCfg(flags, name="Pythia8B", **kwargs):
95 """Configure Pythia8B with the standard generator settings."""
96 user_commands = kwargs.pop("Commands", ())
97 process_commands = kwargs.pop("_process_commands", ())
98 kwargs.setdefault("CollisionEnergy", flags.Beam.Energy * 2 / GeV)
99 kwargs.setdefault("RandomSeed", flags.Random.SeedOffset)
100 kwargs.setdefault("Dsid", flags.Generator.DSID)
101 kwargs["Commands"] = GeneratorSettingsLayer(
102 source="base_fragment_commands",
103 values=_BASE_COMMANDS,
104 precedence=GeneratorSettingsPrecedence.BASE,
105 report_context="Pythia8BCfg.Commands",
106 )
107
108 ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
109 ca.addEventAlgo(CompFactory.Pythia8B_i(name, **kwargs))
110 if process_commands:
111 # MATCHING places process/decay settings above the tune and below user
112 # overrides; the shared resolver has no separate PROCESS precedence.
113 ca.merge(_commands_cfg(
114 flags, "process_commands", process_commands,
115 GeneratorSettingsPrecedence.MATCHING, name,
116 ))
117 if user_commands:
118 ca.merge(_commands_cfg(
119 flags, "user_commands", user_commands,
120 GeneratorSettingsPrecedence.USER, name,
121 ))
122
123 from GeneratorConfig.GeneratorInfoSvcConfig import GeneratorInfoSvcCfg
124 ca.merge(GeneratorInfoSvcCfg(flags, Generators=["Pythia8B"]),
125 sequenceName=EvgenSequence.Generator.value)
126 return ca
127
128

Variable Documentation

◆ _A14_CTEQ6L1_COMMANDS

tuple Pythia8BConfig._A14_CTEQ6L1_COMMANDS
protected
Initial value:
= (
"Tune:ee = 7",
"Tune:pp = 14",
"PDF:pSet = LHAPDF6:cteq6l1",
"SpaceShower:rapidityOrder = on",
"SigmaProcess:alphaSvalue = 0.144",
"SpaceShower:pT0Ref = 1.30",
"SpaceShower:pTmaxFudge = 0.95",
"SpaceShower:pTdampFudge = 1.21",
"SpaceShower:alphaSvalue = 0.125",
"TimeShower:alphaSvalue = 0.126",
"BeamRemnants:primordialKThard = 1.72",
"MultipartonInteractions:pT0Ref = 1.98",
"MultipartonInteractions:alphaSvalue = 0.118",
"ColourReconnection:range = 2.08",
)

Definition at line 28 of file Pythia8BConfig.py.

◆ _B_PARTICLE_PDG_CODES

tuple Pythia8BConfig._B_PARTICLE_PDG_CODES = (511, 521, 531, 541, 5122, 5132, 5232, 5332)
protected

Definition at line 59 of file Pythia8BConfig.py.

◆ _B_PDG_CODES

tuple Pythia8BConfig._B_PDG_CODES
protected
Initial value:
= _B_PARTICLE_PDG_CODES + tuple(
-pdg for pdg in _B_PARTICLE_PDG_CODES
)

Definition at line 60 of file Pythia8BConfig.py.

◆ _BASE_COMMANDS

tuple Pythia8BConfig._BASE_COMMANDS
protected
Initial value:
= (
"Main:timesAllowErrors = 500",
"6:m0 = 172.5",
"23:m0 = 91.1876",
"23:mWidth = 2.4952",
"24:m0 = 80.399",
"24:mWidth = 2.085",
"StandardModel:sin2thetaW = 0.23113",
"StandardModel:sin2thetaWbar = 0.23146",
"ParticleDecays:limitTau0 = on",
"ParticleDecays:tau0Max = 10.0",
)

Definition at line 15 of file Pythia8BConfig.py.

◆ _EXCLUSIVE_B_COMMANDS

tuple Pythia8BConfig._EXCLUSIVE_B_COMMANDS
protected
Initial value:
= (
"HardQCD:all = on",
"ParticleDecays:mixB = off",
"HadronLevel:all = off",
"511:onMode = 3",
"521:onMode = 3",
"531:onMode = 3",
"541:onMode = 3",
"5122:onMode = 2",
"5132:onMode = 2",
"5232:onMode = 2",
"5332:onMode = 2",
)

Definition at line 45 of file Pythia8BConfig.py.