ATLAS Offline Software
Functions | Variables
python.EvtGenConfig Namespace Reference

Functions

def EvtGenCfg (flags, decayFile=None, whiteList=None, allowAllKnownDecays=False, auxfiles=None)
 

Variables

 log = logging.getLogger("EvtGenConfig")
 

Function Documentation

◆ EvtGenCfg()

def python.EvtGenConfig.EvtGenCfg (   flags,
  decayFile = None,
  whiteList = None,
  allowAllKnownDecays = False,
  auxfiles = None 
)

Definition at line 13 of file EvtGenConfig.py.

13 def EvtGenCfg(flags,
14  decayFile = None,
15  whiteList = None,
16  allowAllKnownDecays = False,
17  auxfiles = None):
18 
19  # Propagate EvtGen information
20  # evgenConfig.generators += ["EvtGen"]
21 
22  # Set defaults
23  if flags.Beam.Energy*2/GeV > 13001.:
24  decayfile_str = "2022inclusive_BELLE.dec"
25  log.info("Belle decay table updated Nov 2022")
26  elif "EVTGENVER" in os.environ:
27  evtgenver = float(str(os.environ['EVTGENVER'])[:3])
28  log.info(" ver of EvtGen ", evtgenver)
29  decayfile_str = "2014Inclusive_17.dec" if evtgenver == 1.7 else "2014Inclusive.dec"
30  else:
31  log.info("EVTGENVER not available !!! assuming version == 1.7")
32  decayfile_str = "2014Inclusive_17.dec"
33  default_auxfiles = [decayfile_str]
34 
35  default_whitelist = [-411, -421, -10411, -10421, -413, -423,
36  -10413, -10423, -20413, -20423, -415, -425, -431, -10431, -433, -10433, -20433,
37  -435, -511, -521, -10511, -10521, -513, -523, -10513, -10523, -20513, -20523,
38  -515, -525, -531, -10531, -533, -10533, -20533, -535, -541, -10541, -543,
39  -10543, -20543, -545, -441, -10441, -100441, -443, -10443, -20443, -100443,
40  -30443, -9000443, -9010443, -9020443, -445, -100445, -551, -10551, -100551,
41  -110551, -200551, -210551, -553, -10553, -20553, -30553, -100553, -110553,
42  -120553, -130553, -200553, -210553, -220553, -300553, -9000553, -9010553, -555,
43  -10555, -20555, -100555, -110555, -120555, -200555, -557, -100557, -4122, -4222,
44  -4212, -4112, -4224, -4214, -4114, -4232, -4132, -4322, -4312, -4324, -4314,
45  -4332, -4334, -4412, -4422, -4414, -4424, -4432, -4434, -4444, -5122, -5112,
46  -5212, -5222, -5114, -5214, -5224, -5132, -5232, -5312, -5322, -5314, -5324,
47  -5332, -5142, -5242, -5412, -5422, -5414, -5424, -5342, -5432, -5434, -5442,
48  -5444, -5512, -5522, -5514, -5524, -5532, -5534, -5542, -5544, -5554, -204126,
49  -104312, -104322, -105122, -105312, -105322, -104124, -104314, -104324, 411,
50  421, 10411, 10421, 413, 423, 10413, 10423, 20413, 20423, 415, 425, 431, 10431,
51  433, 10433, 20433, 435, 511, 521, 10511, 10521, 513, 523, 10513, 10523, 20513,
52  20523, 515, 525, 531, 10531, 533, 10533, 20533, 535, 541, 10541, 543, 10543,
53  20543, 545, 441, 10441, 100441, 443, 10443, 20443, 100443, 30443, 9000443,
54  9010443, 9020443, 445, 100445, 551, 10551, 100551, 110551, 200551, 210551, 553,
55  10553, 20553, 30553, 100553, 110553, 120553, 130553, 200553, 210553, 220553,
56  300553, 9000553, 9010553, 555, 10555, 20555, 100555, 110555, 120555, 200555,
57  557, 100557, 4122, 4222, 4212, 4112, 4224, 4214, 4114, 4232, 4132, 4322, 4312,
58  4324, 4314, 4332, 4334, 4412, 4422, 4414, 4424, 4432, 4434, 4444, 5122, 5112,
59  5212, 5222, 5114, 5214, 5224, 5132, 5232, 5312, 5322, 5314, 5324, 5332, 5142,
60  5242, 5412, 5422, 5414, 5424, 5342, 5432, 5434, 5442, 5444, 5512, 5522, 5514,
61  5524, 5532, 5534, 5542, 5544, 5554, 204126, 104312, 104322, 105122, 105312,
62  105322, 104124, 104314, 104324]
63 
64  # Merge custom settings with defaults
65  whiteList = default_whitelist if whiteList is None else list(set(whiteList+default_whitelist))
66  auxfiles = default_auxfiles if auxfiles is None else list(set(auxfiles+default_auxfiles))
67  if decayFile is None:
68  decayFile = decayfile_str
69 
70  # Define CA object
71  ca = ComponentAccumulator(EvgenSequenceFactory(EvgenSequence.Generator))
72  ca.addEventAlgo(
73  CompFactory.EvtInclusiveDecay(
74  "EvtInclusiveDecay",
75  decayFile = decayFile,
76  allowAllKnownDecays = allowAllKnownDecays,
77  whiteList = whiteList
78  )
79  )
80 
81  # Copy necessary files
82  from PyJobTransformsCore.trfutil import get_files
83  get_files(auxfiles, keepDir=False, errorIfNotFound=True)
84 
85  return ca

Variable Documentation

◆ log

python.EvtGenConfig.log = logging.getLogger("EvtGenConfig")

Definition at line 11 of file EvtGenConfig.py.

python.Sequences.EvgenSequenceFactory
def EvgenSequenceFactory(sequence)
Definition: Sequences.py:18
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
trfutil
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.EvtGenConfig.EvtGenCfg
def EvtGenCfg(flags, decayFile=None, whiteList=None, allowAllKnownDecays=False, auxfiles=None)
Definition: EvtGenConfig.py:13
str
Definition: BTagTrackIpAccessor.cxx:11
python.trfutil.get_files
def get_files(listOfFiles, fromWhere='data', doCopy='ifNotLocal', errorIfNotFound=True, keepDir=True, depth=0, sep=os.pathsep)
Definition: trfutil.py:40
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65