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

Functions

 SuperChicBaseCfg (flags, Config={}, safety=1.1, **kwargs)
 SuperChicPythia8BaseCfg (flags, Commands=[], LHEFile=None, Config={}, **kwargs)
 SuperChic_Pythia8_A14_NNPDF23LO_Common_Cfg (flags, Commands=[], LHEFile=None, Config={}, **kwargs)
 SuperChicPythia8LheConverterUpcCfg (flags, inputLHEFile="evrecs/evrecout.dat", **kwargs)
 SuperChicLheEvntFillerCfg (flags, name="LheEVNTFiller", **kwargs)

Variables

 log = logging.getLogger("SuperChicConfig")

Function Documentation

◆ SuperChic_Pythia8_A14_NNPDF23LO_Common_Cfg()

SuperChic_Pythia8_A14_NNPDF23LO_Common_Cfg ( flags,
Commands = [],
LHEFile = None,
Config = {},
** kwargs )
Modular fragment for setting up Pythia8 with A14_NNPDF23LO
tunes on top of SuperChic.

LHEFile is the path to LHE output file produced by SuperChic,
that is taken as input for Pythia8. It can be set explicitly,
or read from the Config dictionary. Otherwise it is set to
the default "evrecs/evrecout.dat".

TestHepMC selection is additionally loosened to avoid crashes.

Definition at line 87 of file SuperChicConfig.py.

88 LHEFile=None, Config={}, **kwargs):
89 """
90 Modular fragment for setting up Pythia8 with A14_NNPDF23LO
91 tunes on top of SuperChic.
92
93 LHEFile is the path to LHE output file produced by SuperChic,
94 that is taken as input for Pythia8. It can be set explicitly,
95 or read from the Config dictionary. Otherwise it is set to
96 the default "evrecs/evrecout.dat".
97
98 TestHepMC selection is additionally loosened to avoid crashes.
99 """
100
101 if LHEFile is None:
102 # if no path for LHE file was specify try to read it from Config
103 if 'outtg' in Config:
104 LHEFile = f"evrecs/evrec{Config['outtg']}.dat"
105 # if there was none set in Config use the default
106 else:
107 LHEFile = "evrecs/evrecout.dat"
108
109 # Add Pythia8
110 ca = Pythia8_A14_NNPDF23LO_Common_Cfg(
111 flags,
112 Commands=Commands,
113 LHEFile=LHEFile,
114 **kwargs
115 )
116
117 # Add TestHepMC configuration
118 from EvgenProdTools.EvgenProdToolsConfig import TestHepMCCfg
119 ca.merge(TestHepMCCfg(
120 flags,
121 MaxTransVtxDisp=1000000,
122 MaxVtxDisp=1000000000
123 ))
124
125 return ca
126
127

◆ SuperChicBaseCfg()

SuperChicBaseCfg ( flags,
Config = {},
safety = 1.1,
** kwargs )
The main SuperChic configuration fragment. It creates a SuperChicControl
instance that stores the generator configuration parameters and is used
to call SuperChicUtils functions responsible for event generation.

All the configurable parameters and their default values can be found
in SuperChicUtils.

Definition at line 17 of file SuperChicConfig.py.

17def SuperChicBaseCfg(flags, Config={}, safety=1.1, **kwargs):
18 """
19 The main SuperChic configuration fragment. It creates a SuperChicControl
20 instance that stores the generator configuration parameters and is used
21 to call SuperChicUtils functions responsible for event generation.
22
23 All the configurable parameters and their default values can be found
24 in SuperChicUtils.
25 """
26
27 Config.setdefault("rts", 2*flags.Beam.Energy/GeV)
28 Config.setdefault("nev", _get_nevents(flags, safety))
29 Config.setdefault("iseed", flags.Random.SeedOffset)
30
31 # Create SuperChicControl instance and generate events
32 from Superchic_i.SuperChicControl import SuperChicControl
33 control = SuperChicControl(Config=Config)
34 control.initialize()
35 control.generate()
36
37 # Create CA object
38 ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
39
40 # Announce generator to service
41 from GeneratorConfig.GeneratorInfoSvcConfig import GeneratorInfoSvcCfg
42 ca.merge(GeneratorInfoSvcCfg(flags, Generators=["SuperChic"]), sequenceName=EvgenSequence.Generator.value)
43
44 return ca
45
46

◆ SuperChicLheEvntFillerCfg()

SuperChicLheEvntFillerCfg ( flags,
name = "LheEVNTFiller",
** kwargs )
Modular fragment for setting the LheEVNTFiller.

Definition at line 146 of file SuperChicConfig.py.

146def SuperChicLheEvntFillerCfg(flags, name="LheEVNTFiller", **kwargs):
147 """
148 Modular fragment for setting the LheEVNTFiller.
149 """
150
151 from Superchic_i.EventFiller import LheEVNTFiller
152
153 # Create CA object
154 ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
155 ca.addEventAlgo(LheEVNTFiller(
156 flags,
157 ecmEnergy=2*flags.Beam.Energy/GeV,
158 name=name,
159 **kwargs
160 ))
161
162 return ca
163

◆ SuperChicPythia8BaseCfg()

SuperChicPythia8BaseCfg ( flags,
Commands = [],
LHEFile = None,
Config = {},
** kwargs )
Modular fragment for setting up base Pythia8 on top of SuperChic.

LHEFile is the path to LHE output file produced by SuperChic,
that is taken as input for Pythia8. It can be set explicitly,
or read from the Config dictionary. Otherwise it is set to
the default "evrecs/evrecout.dat".

TestHepMC selection is additionally loosened to avoid crashes.

Definition at line 47 of file SuperChicConfig.py.

48 LHEFile=None, Config={}, **kwargs):
49 """
50 Modular fragment for setting up base Pythia8 on top of SuperChic.
51
52 LHEFile is the path to LHE output file produced by SuperChic,
53 that is taken as input for Pythia8. It can be set explicitly,
54 or read from the Config dictionary. Otherwise it is set to
55 the default "evrecs/evrecout.dat".
56
57 TestHepMC selection is additionally loosened to avoid crashes.
58 """
59
60 if LHEFile is None:
61 # if no path for LHE file was specify try to read it from Config
62 if 'outtg' in Config:
63 LHEFile = f"evrecs/evrec{Config['outtg']}.dat"
64 # if there was none set in Config use the default
65 else:
66 LHEFile = "evrecs/evrecout.dat"
67
68 # Add Pythia8
69 ca = Pythia8BaseCfg(
70 flags,
71 Commands=Commands,
72 LHEFile=LHEFile,
73 **kwargs
74 )
75
76 # Add TestHepMC configuration
77 from EvgenProdTools.EvgenProdToolsConfig import TestHepMCCfg
78 ca.merge(TestHepMCCfg(
79 flags,
80 MaxTransVtxDisp=1000000,
81 MaxVtxDisp=1000000000
82 ))
83
84 return ca
85
86

◆ SuperChicPythia8LheConverterUpcCfg()

SuperChicPythia8LheConverterUpcCfg ( flags,
inputLHEFile = "evrecs/evrecout.dat",
** kwargs )
Modular fragment for setting the LheConverterUpc.

Definition at line 128 of file SuperChicConfig.py.

129 inputLHEFile="evrecs/evrecout.dat", **kwargs):
130 """
131 Modular fragment for setting the LheConverterUpc.
132 """
133 from MCJobOptionUtils.LheConverterUpc import LheConverterUpc
134 lheConverter = LheConverterUpc(generator='SuperChic',
135 mode='Pythia8',
136 energy=2*flags.Beam.Energy/GeV)
137 lheConverter.fileName = inputLHEFile
138
139 # Create CA object
140 ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
141 ca.addEventAlgo(lheConverter)
142
143 return ca
144
145

Variable Documentation

◆ log

SuperChicConfig.log = logging.getLogger("SuperChicConfig")

Definition at line 14 of file SuperChicConfig.py.