3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from GeneratorConfig.Sequences
import EvgenSequence, EvgenSequenceFactory
10 from AthenaCommon.Logging
import logging
11 log = logging.getLogger(
"EvtGenConfig")
16 allowAllKnownDecays = False,
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"
31 log.info(
"EVTGENVER not available !!! assuming version == 1.7")
32 decayfile_str =
"2014Inclusive_17.dec"
33 default_auxfiles = [decayfile_str]
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]
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))
68 decayFile = decayfile_str
73 CompFactory.EvtInclusiveDecay(
75 decayFile = decayFile,
76 allowAllKnownDecays = allowAllKnownDecays,
83 get_files(auxfiles, keepDir=
False, errorIfNotFound=
True)