ATLAS Offline Software
Functions | Variables
skel Namespace Reference

Functions

def OutputTXTFile ()
 ============================================================== More...
 
def _norm (s)
 
def _norm2 (s)
 
def _short2 (s)
 
def find_unique_file (pattern)
 Helper functions for input file handling. More...
 
def mk_symlink (srcfile, dstfile)
 
def _checkattr (attr, required=False)
 ============================================================== More...
 
def get_immediate_subdirectories (a_dir)
 ============================================================== More...
 
def checkBlackList (relFlavour, cache, generatorName)
 Propagate debug output level requirement to generators. More...
 
def checkPurpleList (relFlavour, cache, generatorName)
 
def merge_lhe_files (listOfFiles, outputFile)
 Check that there is exactly 1 match. More...
 

Variables

 xAODKey
 
 theApp = acam.theApp
 
 genSeq = acam.athMasterSeq.EvgenGenSeq
 
 prefiltSeq = acam.athMasterSeq.EvgenPreFilterSeq
 
 testSeq = acam.athMasterSeq.EvgenTestSeq
 
 filtSeq = acam.athMasterSeq.EvgenFilterSeq
 
 topSeq = acas.AlgSequence()
 
 anaSeq = topSeq
 
 postSeq = topSeq.EvgenPostSeq
 
 doMonitoring
 
 doSemiDetailedMonitoring
 
 AllowIgnoreConfigError
 Jobs should stop if an include fails. More...
 
 evgenLog = logging.getLogger('Generate_ab')
 
 CmEnergy
 
 Output
 
 FirstEvent
 
 EvtMax
 
 InputEventInfo
 
 OutputEventInfo
 
 mcEventWeightsKey
 
 CorrectHepMC
 
 CorrectEventID
 
 CorrectRunNumber
 
 runNum = int((runArgs.jobConfig[0])[-6:])
 
 MinMaxRunNumbers
 
 McEventKey
 
 VerboseOutput
 
 PrintStyle
 
 LastEvent
 
 Analyses
 
 AnalysisPath
 
 HistoFile
 
tuple FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0]
 Main job option include Only permit one jobConfig argument for evgen: does more than one ever make sense? More...
 
list jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))]
 
list jofile = jofiles[0]
 Only permit one JO file in each dsid folder. More...
 
tuple joparts = (os.path.basename(jofile)).split(".")
 
bool officialJO = True
 Perform some consistency checks if this appears to be an "official" production JO. More...
 
tuple jo_physshortpart = joparts[1]
 Check that there are exactly 3 name parts separated by '. More...
 
int max_jo_physshort_length = 50
 
tuple jo_physshortparts = jo_physshortpart.split("_")
 There must be at least 2 physicsShort sub-parts separated by '_': gens, (tune)+PDF, and process. More...
 
string check_jofiles = "/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py"
 NOTE: a further check on physicsShort consistency is done below, after fragment loading. More...
 
 gennames = sorted(evgenConfig.generators, key=gen_sortkey)
 Include the JO fragment. More...
 
tuple genpart = jo_physshortparts[0]
 Check that the actual generators, tune, and main PDF are consistent with the JO name. More...
 
string expectedgenpart = ''.join(gennames)
 We want to record that HERWIG was used in metadata, but in the JO naming we just use a "Herwig" label. More...
 
int rounding = 0
 Check if the tune/PDF part is needed, and if so whether it's present. More...
 
int multiInput = runArgs.inputGeneratorFile.count(',')+1
 
list allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]
 
string msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob
 
 RequestedOutput
 
string kwfile = "EvgenJobTransforms/evgenkeywords.txt"
 Check that the keywords are in the list of allowed words (and exit if processing an official JO) More...
 
 kwpath = None
 
list allowed_keywords = []
 Load the allowed keywords from the file. More...
 
 kwf = open(kwpath, "r")
 
list evil_keywords = []
 Check the JO keywords against the allowed ones. More...
 
 poolFile = runArgs.outputEVNTFile
 
 StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", poolFile, asAlg=True, noTag=True , eventInfoKey="EventInfo")
 
 InputCollections
 
 TakeItemsFromInput
 
 ForceRead
 
 dsid = os.path.basename(runArgs.jobConfig[0])
 Used for pile-up (remove dynamic variables except flavour labels) More...
 
 RunNumber
 
 NewRunNumber
 
 runArgs
 
 datFile = None
 Propagate energy argument to the generators TODO: Standardise energy setting in the GenModule interface. More...
 
 eventsFile = None
 Events files. More...
 
 auxfiles
 
 keepDir
 
 False
 
 errorIfNotFound
 
 required
 
list filterNames = [alg.getType() for alg in acas.iter_algseq(filtSeq)]
 
list excludedNames = ['AthSequencer', 'PyAthena::Alg', 'TestHepMC']
 
 runPars = RunArguments()
 
 nEventsPerJob
 
 maxeventsstrategy
 
 fixSeq = acam.athMasterSeq.EvgenFixSeq
 
 mcFilterHTKey
 
 rel = os.popen("echo $AtlasVersion").read()
 Announce start of JO checkingrelease nimber checking. More...
 
 EventsPerRun
 
 inputFilesPerJob
 Include the JO fragment. More...
 
string lkwfile = "CategoryList.txt"
 Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO) More...
 
 lkwpath = None
 
list allowed_cat = []
 Load the allowed categories names from the file. More...
 
 allowed_list = ast.literal_eval(line)
 
list bad_cat = []
 Check the JO categories against the allowed ones. More...
 
 it = iter(evgenConfig.categories)
 
 l1 = x
 
 l2 = next(it)
 
 gendict = generatorsGetInitialVersionedDictionary(gennames)
 
 gennamesvers = generatorsVersionedStringList(gendict)
 
def errorBL = checkBlackList("AthGeneration",rel,gennames)
 Announce start of JO checkingrelease number checking. More...
 
def errorPL = checkPurpleList("AthGeneration",rel,gennames)
 
bool inHeader = False
 Reading first event signals that we are done with all the header information Using this approach means the script will properly handle any metadata stored at the beginning of the file. More...
 
 holdHeader = header
 
 tmp = line.split("=")
 each input file ends with "</LesHouchesEvents>". More...
 
 line = line.replace(tmp[0],str(nevents))
 
 nnn = str(nevents)
 
 inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0]
 Find and symlink dat and event files, so they are available via the name expected by the generator. More...
 
def realDatFile = find_unique_file('*%s*.dat' % inputroot)
 
 myinputfiles = runArgs.inputGeneratorFile
 
 genInputFiles = myinputfiles.split(',')
 
 numberOfFiles = len(genInputFiles)
 
def realEventsFile = find_unique_file('*%s.*ev*ts' % inputroot)
 
list allFiles = []
 
 input0 = os.path.basename(file).split("._")[0]
 
tuple input1 = (os.path.basename(file).split("._")[1]).split(".")[0]
 
 first_line = f.readline()
 
int count_ev = 0
 
 dsid_param = runArgs.jobConfig[0]
 

Function Documentation

◆ _checkattr()

def skel._checkattr (   attr,
  required = False 
)
private

==============================================================

Write out metadata for reporting to AMI

Write out metadata for reporting to AMI

Write out metadata for reporting to AMI

Definition at line 522 of file skel.ABtoEVGEN.py.

522 def _checkattr(attr, required=False):
523  if not hasattr(evgenConfig, attr) or not getattr(evgenConfig, attr):
524  msg = "evgenConfig attribute '%s' not found." % attr
525  if required:
526  raise RuntimeError("Required " + msg)
527  return False
528  return True
529 

◆ _norm()

def skel._norm (   s)
private

Definition at line 267 of file skel.ABtoEVGEN.py.

267  def _norm(s):
268  # TODO: add EvtGen to this normalization for MC14?
269  return s.replace("Photospp", "").replace("Photos", "").replace("TauolaPP", "").replace("Tauolapp", "").replace("Tauola", "")

◆ _norm2()

def skel._norm2 (   s)
private

Definition at line 270 of file skel.ABtoEVGEN.py.

270  def _norm2(s):
271  return s.replace("Py", "Pythia").replace("MG","MadGraph").replace("Ph","Powheg").replace("Hpp","Herwigpp").replace("H7","Herwig7").replace("Sh","Sherpa").replace("Ag","Alpgen").replace("EG","EvtGen").replace("PG","ParticleGun")
272 

◆ _short2()

def skel._short2 (   s)
private

Definition at line 273 of file skel.ABtoEVGEN.py.

273  def _short2(s):
274  return s.replace("Pythia","Py").replace("MadGraph","MG").replace("Powheg","Ph").replace("Herwigpp","Hpp").replace("Herwig7","H7").replace("Sherpa","Sh").replace("Alpgen","Ag").replace("EvtGen","EG").replace("PG","ParticleGun")
275 

◆ checkBlackList()

def skel.checkBlackList (   relFlavour,
  cache,
  generatorName 
)

Propagate debug output level requirement to generators.

Handle beam info.

Add special config option (extended model info for BSM scenarios) Remove TestHepMC if it's inappropriate for this generator combination TODO: replace with direct del statements in the generator common JO fragments? =============================================================

Check release number

Function to check blacklist (from Spyros'es logParser.py)

Propagate energy argument to the generators TODO: Standardise energy setting in the GenModule interface Propagate debug output level requirement to generators =============================================================

Check release number

Function to check blacklist (from Spyros'es logParser.py)

Definition at line 540 of file skel.GENtoEVGEN.py.

540 def checkBlackList(relFlavour,cache,generatorName) :
541  isError = None
542  with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt') as bfile:
543  for line in bfile.readlines():
544  if not line.strip():
545  continue
546  # Blacklisted release flavours
547  badRelFlav=line.split(',')[0].strip()
548  # Blacklisted caches
549  badCache=line.split(',')[1].strip()
550  # Blacklisted generators
551  badGens=line.split(',')[2].strip()
552 
553  used_gens = ','.join(generatorName)
554  #Match Generator and release type e.g. AtlasProduction, MCProd
555  if relFlavour==badRelFlav and cache==badCache and re.search(badGens,used_gens) is not None:
556  if badGens=="": badGens="all generators"
557  isError=relFlavour+","+cache+" is blacklisted for " + badGens
558  return isError
559  return isError
560 

◆ checkPurpleList()

def skel.checkPurpleList (   relFlavour,
  cache,
  generatorName 
)

Definition at line 561 of file skel.GENtoEVGEN.py.

561 def checkPurpleList(relFlavour,cache,generatorName) :
562  isError = None
563  with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/PurpleList_generators.txt') as bfile:
564  for line in bfile.readlines():
565  if not line.strip():
566  continue
567  # Purple-listed release flavours
568  purpleRelFlav=line.split(',')[0].strip()
569  # Purple-listed caches
570  purpleCache=line.split(',')[1].strip()
571  # Purple-listed generators
572  purpleGens=line.split(',')[2].strip()
573  # Purple-listed process
574  purpleProcess=line.split(',')[3].strip()
575 
576  used_gens = ','.join(generatorName)
577  #Match Generator and release type e.g. AtlasProduction, MCProd
578  if relFlavour==purpleRelFlav and cache==purpleCache and re.search(purpleGens,used_gens) is not None:
579  isError=relFlavour+","+cache+" is blacklisted for " + purpleGens + " if it uses " + purpleProcess
580  return isError
581  return isError
582 

◆ find_unique_file()

def skel.find_unique_file (   pattern)

Helper functions for input file handling.

Definition at line 489 of file skel.ABtoEVGEN.py.

489 def find_unique_file(pattern):
490  "Return a matching file, provided it is unique"
491  import glob
492  files = glob.glob(pattern)
493 
494  if not files:
495  raise RuntimeError("No '%s' file found" % pattern)
496  elif len(files) > 1:
497  raise RuntimeError("More than one '%s' file found" % pattern)
498  return files[0]
499 

◆ get_immediate_subdirectories()

def skel.get_immediate_subdirectories (   a_dir)

==============================================================

Pre- and main config parsing

Announce JO loading Pre-include Pre-exec

Pre- and main config parsing

Announce JO loading Pre-include Pre-exec

Definition at line 208 of file skel.GENtoEVGEN.py.

209  return [name for name in os.listdir(a_dir)
210  if os.path.isdir(os.path.join(a_dir, name))]
211 
212 # TODO: Explain!!!

◆ merge_lhe_files()

def skel.merge_lhe_files (   listOfFiles,
  outputFile 
)

Check that there is exactly 1 match.

Definition at line 673 of file skel.GENtoEVGEN.py.

673 def merge_lhe_files(listOfFiles,outputFile):
674  if(os.path.exists(outputFile)):
675  print ("outputFile ",outputFile," already exists. Will rename to ",outputFile,".OLD")
676  os.rename(outputFile,outputFile+".OLD")
677  output = open(outputFile,'w')
678  holdHeader = ""
679  nevents=0
680  for file in listOfFiles:
681  cmd = "grep /event "+file+" | wc -l"
682  nevents+=int(subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True))
683 
684  for file in listOfFiles:
685  inHeader = True
686  header = ""
687  print ("*** Starting file ",file)
688  for line in open(file,"r"):

◆ mk_symlink()

def skel.mk_symlink (   srcfile,
  dstfile 
)

Definition at line 500 of file skel.ABtoEVGEN.py.

500 def mk_symlink(srcfile, dstfile):
501  "Make a symlink safely"
502  if dstfile:
503  if os.path.exists(dstfile) and not os.path.samefile(dstfile, srcfile):
504  os.remove(dstfile)
505  if not os.path.exists(dstfile):
506  evgenLog.info("Symlinking %s to %s" % (srcfile, dstfile))
507  os.symlink(srcfile, dstfile)
508  else:
509  evgenLog.debug("Symlinking: %s is already the same as %s" % (dstfile, srcfile))
510 
511 

◆ OutputTXTFile()

def skel.OutputTXTFile ( )

==============================================================

Pre- and main config parsing

Announce JO loading Pre-include Pre-exec

Definition at line 182 of file skel.ABtoEVGEN.py.

182 def OutputTXTFile():
183  outputTXTFile = None
184  if hasattr(runArgs,"outputTXTFile"): outputTXTFile=runArgs.outputTXTFile
185  return outputTXTFile
186 

Variable Documentation

◆ allFiles

list skel.allFiles = []

Definition at line 763 of file skel.GENtoEVGEN.py.

◆ allowed_cat

list skel.allowed_cat = []

Load the allowed categories names from the file.

Definition at line 415 of file skel.GENtoEVGEN.py.

◆ allowed_keywords

list skel.allowed_keywords = []

Load the allowed keywords from the file.

Definition at line 341 of file skel.ABtoEVGEN.py.

◆ allowed_list

skel.allowed_list = ast.literal_eval(line)

Definition at line 419 of file skel.GENtoEVGEN.py.

◆ allowed_nEventsPerJob_lt1000

list skel.allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]

Definition at line 314 of file skel.ABtoEVGEN.py.

◆ AllowIgnoreConfigError

skel.AllowIgnoreConfigError

Jobs should stop if an include fails.

Definition at line 56 of file skel.ABtoEVGEN.py.

◆ Analyses

skel.Analyses

Definition at line 157 of file skel.ABtoEVGEN.py.

◆ AnalysisPath

skel.AnalysisPath

Definition at line 158 of file skel.ABtoEVGEN.py.

◆ anaSeq

skel.anaSeq = topSeq

Definition at line 32 of file skel.ABtoEVGEN.py.

◆ auxfiles

skel.auxfiles

Definition at line 515 of file skel.ABtoEVGEN.py.

◆ bad_cat

list skel.bad_cat = []

Check the JO categories against the allowed ones.

Definition at line 423 of file skel.GENtoEVGEN.py.

◆ check_jofiles

string skel.check_jofiles = "/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py"

NOTE: a further check on physicsShort consistency is done below, after fragment loading.

Definition at line 222 of file skel.ABtoEVGEN.py.

◆ CmEnergy

skel.CmEnergy

Definition at line 109 of file skel.ABtoEVGEN.py.

◆ CorrectEventID

skel.CorrectEventID

Definition at line 130 of file skel.ABtoEVGEN.py.

◆ CorrectHepMC

skel.CorrectHepMC

Definition at line 129 of file skel.ABtoEVGEN.py.

◆ CorrectRunNumber

skel.CorrectRunNumber

Definition at line 131 of file skel.ABtoEVGEN.py.

◆ count_ev

int skel.count_ev = 0

Definition at line 811 of file skel.GENtoEVGEN.py.

◆ datFile

string skel.datFile = None

Propagate energy argument to the generators TODO: Standardise energy setting in the GenModule interface.

Add special config option (extended model info for BSM scenarios)

==============================================================

Propagate DSID and seed to the generators Propagate debug output level requirement to generators Add special config option (extended model info for BSM scenarios) Remove TestHepMC if it's inappropriate for this generator combination TODO: replace with direct del statements in the generator common JO fragments? ==============================================================

Handling of a post-include/exec args at the end of standard configuration

==============================================================

Show the algorithm sequences and algs now that config is complete

==============================================================

Input file arg handling

Announce start of input file handling Dat files

Handling of a post-include/exec args at the end of standard configuration

==============================================================

Show the algorithm sequences and algs now that config is complete

==============================================================

Input file arg handling

Announce start of input file handling Dat files

Process random seed arg and pass to generators include("EvgenJobTransforms/Generate_randomseeds.py") ==============================================================

Handling of a post-include/exec args at the end of standard configuration

==============================================================

Show the algorithm sequences and algs now that config is complete

==============================================================

Input file arg handling

Announce start of input file handling Dat files

Definition at line 471 of file skel.ABtoEVGEN.py.

◆ doMonitoring

skel.doMonitoring

Definition at line 48 of file skel.ABtoEVGEN.py.

◆ doSemiDetailedMonitoring

skel.doSemiDetailedMonitoring

Definition at line 49 of file skel.ABtoEVGEN.py.

◆ dsid

string skel.dsid = os.path.basename(runArgs.jobConfig[0])

Used for pile-up (remove dynamic variables except flavour labels)

Set the run numbers.

Set the run numbers

Definition at line 398 of file skel.ABtoEVGEN.py.

◆ dsid_param

skel.dsid_param = runArgs.jobConfig[0]

Definition at line 152 of file skel.GENtoTXT.py.

◆ errorBL

def skel.errorBL = checkBlackList("AthGeneration",rel,gennames)

Announce start of JO checkingrelease number checking.

Definition at line 585 of file skel.GENtoEVGEN.py.

◆ errorIfNotFound

skel.errorIfNotFound

Definition at line 515 of file skel.ABtoEVGEN.py.

◆ errorPL

def skel.errorPL = checkPurpleList("AthGeneration",rel,gennames)

Definition at line 592 of file skel.GENtoEVGEN.py.

◆ eventsFile

string skel.eventsFile = None

Events files.

Definition at line 486 of file skel.ABtoEVGEN.py.

◆ EventsPerRun

skel.EventsPerRun

Definition at line 187 of file skel.GENtoEVGEN.py.

◆ evgenLog

skel.evgenLog = logging.getLogger('Generate_ab')

Definition at line 64 of file skel.ABtoEVGEN.py.

◆ evil_keywords

list skel.evil_keywords = []

Check the JO keywords against the allowed ones.

Definition at line 348 of file skel.ABtoEVGEN.py.

◆ EvtMax

skel.EvtMax

Definition at line 121 of file skel.ABtoEVGEN.py.

◆ excludedNames

list skel.excludedNames = ['AthSequencer', 'PyAthena::Alg', 'TestHepMC']

Definition at line 557 of file skel.ABtoEVGEN.py.

◆ expectedgenpart

string skel.expectedgenpart = ''.join(gennames)

We want to record that HERWIG was used in metadata, but in the JO naming we just use a "Herwig" label.

Definition at line 264 of file skel.ABtoEVGEN.py.

◆ False

skel.False

Definition at line 515 of file skel.ABtoEVGEN.py.

◆ filterNames

list skel.filterNames = [alg.getType() for alg in acas.iter_algseq(filtSeq)]

Definition at line 556 of file skel.ABtoEVGEN.py.

◆ filtSeq

skel.filtSeq = acam.athMasterSeq.EvgenFilterSeq

Definition at line 30 of file skel.ABtoEVGEN.py.

◆ FIRST_DIR

tuple skel.FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0]

Main job option include Only permit one jobConfig argument for evgen: does more than one ever make sense?

Definition at line 193 of file skel.ABtoEVGEN.py.

◆ first_line

skel.first_line = f.readline()

Definition at line 777 of file skel.GENtoEVGEN.py.

◆ FirstEvent

skel.FirstEvent

Definition at line 120 of file skel.ABtoEVGEN.py.

◆ fixSeq

skel.fixSeq = acam.athMasterSeq.EvgenFixSeq

Definition at line 25 of file skel.GENtoEVGEN.py.

◆ ForceRead

skel.ForceRead

Definition at line 385 of file skel.ABtoEVGEN.py.

◆ gendict

skel.gendict = generatorsGetInitialVersionedDictionary(gennames)

Definition at line 484 of file skel.GENtoEVGEN.py.

◆ genInputFiles

skel.genInputFiles = myinputfiles.split(',')

Definition at line 749 of file skel.GENtoEVGEN.py.

◆ gennames

skel.gennames = sorted(evgenConfig.generators, key=gen_sortkey)

Include the JO fragment.

Print out options.

==============================================================

Config validation and propagation to services, generators, etc.

Announce start of JO checking Print out options Sort and check generator name / JO name consistency

Check that the common fragments are not obsolete: Check that the generators list is not empty: Check for duplicates: Sort the list of generator names into standard form

Print platform Sort and check generator name / JO name consistency

Check that the common fragments are not obsolete: Check that the generators list is not empty: Check for duplicates: Sort the list of generator names into standard form

==============================================================

Config validation and propagation to services, generators, etc.

Announce start of JO checking Print out options Sort and check generator name / JO name consistency

Check that the common fragments are not obsolete: Check that the generators list is not empty: Check for duplicates: Sort the list of generator names into standard form

Definition at line 260 of file skel.ABtoEVGEN.py.

◆ gennamesvers

skel.gennamesvers = generatorsVersionedStringList(gendict)

Definition at line 485 of file skel.GENtoEVGEN.py.

◆ genpart

tuple skel.genpart = jo_physshortparts[0]

Check that the actual generators, tune, and main PDF are consistent with the JO name.

Definition at line 263 of file skel.ABtoEVGEN.py.

◆ genSeq

skel.genSeq = acam.athMasterSeq.EvgenGenSeq

Definition at line 22 of file skel.ABtoEVGEN.py.

◆ HistoFile

skel.HistoFile

Definition at line 160 of file skel.ABtoEVGEN.py.

◆ holdHeader

skel.holdHeader = header

Definition at line 697 of file skel.GENtoEVGEN.py.

◆ inHeader

bool skel.inHeader = False

Reading first event signals that we are done with all the header information Using this approach means the script will properly handle any metadata stored at the beginning of the file.

Note: aside from the number of events, no metadata is updated after the first header is read (eg the random number seed recorded will be that of the first file.

Definition at line 695 of file skel.GENtoEVGEN.py.

◆ input0

skel.input0 = os.path.basename(file).split("._")[0]

Definition at line 770 of file skel.GENtoEVGEN.py.

◆ input1

tuple skel.input1 = (os.path.basename(file).split("._")[1]).split(".")[0]

Definition at line 771 of file skel.GENtoEVGEN.py.

◆ InputCollections

skel.InputCollections

Definition at line 381 of file skel.ABtoEVGEN.py.

◆ InputEventInfo

skel.InputEventInfo

Definition at line 123 of file skel.ABtoEVGEN.py.

◆ inputFilesPerJob

skel.inputFilesPerJob

Include the JO fragment.

==============================================================

Config validation and propagation to services, generators, etc.

Announce start of JO checking

Definition at line 273 of file skel.GENtoEVGEN.py.

◆ inputroot

string skel.inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0]

Find and symlink dat and event files, so they are available via the name expected by the generator.

Definition at line 741 of file skel.GENtoEVGEN.py.

◆ it

skel.it = iter(evgenConfig.categories)

Definition at line 424 of file skel.GENtoEVGEN.py.

◆ jo_physshortpart

tuple skel.jo_physshortpart = joparts[1]

Check that there are exactly 3 name parts separated by '.

Check that there are exactly 4 name parts separated by '.

': mc, physicsShort, .py Check the length limit on the physicsShort portion of the filename

': MCxx, DSID, physicsShort, .py Check the length limit on the physicsShort portion of the filename

Definition at line 211 of file skel.ABtoEVGEN.py.

◆ jo_physshortparts

tuple skel.jo_physshortparts = jo_physshortpart.split("_")

There must be at least 2 physicsShort sub-parts separated by '_': gens, (tune)+PDF, and process.

Definition at line 217 of file skel.ABtoEVGEN.py.

◆ jofile

list skel.jofile = jofiles[0]

Only permit one JO file in each dsid folder.

Definition at line 201 of file skel.ABtoEVGEN.py.

◆ jofiles

list skel.jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))]

Definition at line 195 of file skel.ABtoEVGEN.py.

◆ joparts

tuple skel.joparts = (os.path.basename(jofile)).split(".")

Definition at line 202 of file skel.ABtoEVGEN.py.

◆ keepDir

skel.keepDir

Definition at line 515 of file skel.ABtoEVGEN.py.

◆ kwf

skel.kwf = open(kwpath, "r")

Definition at line 344 of file skel.ABtoEVGEN.py.

◆ kwfile

string skel.kwfile = "EvgenJobTransforms/evgenkeywords.txt"

Check that the keywords are in the list of allowed words (and exit if processing an official JO)

NB: postSeq.CountHepMC.RequestedOutput is set to 1 in LHEonly.py.

Get the allowed keywords file from the JO package if possibe TODO: Make the package name configurable

Check that the keywords list is not empty: Check that the keywords are in the list of allowed words (and exit if processing an official JO) Get the allowed keywords file from the JO package if possibe TODO: Make the package name configurable

Definition at line 333 of file skel.ABtoEVGEN.py.

◆ kwpath

skel.kwpath = None

Definition at line 334 of file skel.ABtoEVGEN.py.

◆ l1

skel.l1 = x

Definition at line 426 of file skel.GENtoEVGEN.py.

◆ l2

skel.l2 = next(it)

Definition at line 427 of file skel.GENtoEVGEN.py.

◆ LastEvent

skel.LastEvent

Definition at line 150 of file skel.ABtoEVGEN.py.

◆ line

skel.line = line.replace(tmp[0],str(nevents))

Definition at line 709 of file skel.GENtoEVGEN.py.

◆ lkwfile

string skel.lkwfile = "CategoryList.txt"

Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO)

Check that the categories list is not empty:

Get the allowed categories file from the JO package if possibe TODO: Make the package name configurable

Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO) Get the allowed categories file from the JO package if possibe TODO: Make the package name configurable

Definition at line 407 of file skel.GENtoEVGEN.py.

◆ lkwpath

skel.lkwpath = None

Definition at line 408 of file skel.GENtoEVGEN.py.

◆ max_jo_physshort_length

int skel.max_jo_physshort_length = 50

Definition at line 212 of file skel.ABtoEVGEN.py.

◆ maxeventsstrategy

skel.maxeventsstrategy

Definition at line 569 of file skel.ABtoEVGEN.py.

◆ McEventKey

skel.McEventKey

Definition at line 146 of file skel.ABtoEVGEN.py.

◆ mcEventWeightsKey

skel.mcEventWeightsKey

Definition at line 125 of file skel.ABtoEVGEN.py.

◆ mcFilterHTKey

skel.mcFilterHTKey

Definition at line 135 of file skel.GENtoEVGEN.py.

◆ MinMaxRunNumbers

skel.MinMaxRunNumbers

Definition at line 139 of file skel.ABtoEVGEN.py.

◆ msg

string skel.msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob

Definition at line 315 of file skel.ABtoEVGEN.py.

◆ multiInput

int skel.multiInput = runArgs.inputGeneratorFile.count(',')+1

Definition at line 294 of file skel.ABtoEVGEN.py.

◆ myinputfiles

skel.myinputfiles = runArgs.inputGeneratorFile

Definition at line 748 of file skel.GENtoEVGEN.py.

◆ nEventsPerJob

skel.nEventsPerJob

Definition at line 568 of file skel.ABtoEVGEN.py.

◆ NewRunNumber

skel.NewRunNumber

Definition at line 404 of file skel.ABtoEVGEN.py.

◆ nnn

skel.nnn = str(nevents)

Definition at line 713 of file skel.GENtoEVGEN.py.

◆ numberOfFiles

skel.numberOfFiles = len(genInputFiles)

Definition at line 750 of file skel.GENtoEVGEN.py.

◆ officialJO

bool skel.officialJO = True

Perform some consistency checks if this appears to be an "official" production JO.

Definition at line 205 of file skel.ABtoEVGEN.py.

◆ Output

skel.Output

Definition at line 113 of file skel.ABtoEVGEN.py.

◆ OutputEventInfo

skel.OutputEventInfo

Definition at line 124 of file skel.ABtoEVGEN.py.

◆ poolFile

skel.poolFile = runArgs.outputEVNTFile

Definition at line 372 of file skel.ABtoEVGEN.py.

◆ postSeq

skel.postSeq = topSeq.EvgenPostSeq

Definition at line 34 of file skel.ABtoEVGEN.py.

◆ prefiltSeq

skel.prefiltSeq = acam.athMasterSeq.EvgenPreFilterSeq

Definition at line 24 of file skel.ABtoEVGEN.py.

◆ PrintStyle

skel.PrintStyle

Definition at line 148 of file skel.ABtoEVGEN.py.

◆ realDatFile

def skel.realDatFile = find_unique_file('*%s*.dat' % inputroot)

Definition at line 745 of file skel.GENtoEVGEN.py.

◆ realEventsFile

def skel.realEventsFile = find_unique_file('*%s.*ev*ts' % inputroot)

Definition at line 760 of file skel.GENtoEVGEN.py.

◆ rel

skel.rel = os.popen("echo $AtlasVersion").read()

Announce start of JO checkingrelease nimber checking.

Definition at line 183 of file skel.GENtoEVGEN.py.

◆ RequestedOutput

skel.RequestedOutput

Definition at line 326 of file skel.ABtoEVGEN.py.

◆ required

skel.required

Definition at line 530 of file skel.ABtoEVGEN.py.

◆ rounding

int skel.rounding = 0

Check if the tune/PDF part is needed, and if so whether it's present.

Check that the evgenConfig.nEventsPerJob setting is acceptable nEventsPerJob defines the production event sizes and must be sufficiently "round"

Check the "--steering=afterburn" command line argument has been set if EvtGen is in the JO name Dont't have access to steering flag so check it's effect on output files Check that the evgenConfig.nEventsPerJob setting is acceptable nEventsPerJob defines the production event sizes and must be sufficiently "round"

Definition at line 292 of file skel.ABtoEVGEN.py.

◆ runArgs

skel.runArgs

Definition at line 419 of file skel.ABtoEVGEN.py.

◆ runNum

skel.runNum = int((runArgs.jobConfig[0])[-6:])

Definition at line 138 of file skel.ABtoEVGEN.py.

◆ RunNumber

skel.RunNumber

Definition at line 401 of file skel.ABtoEVGEN.py.

◆ runPars

skel.runPars = RunArguments()

Definition at line 567 of file skel.ABtoEVGEN.py.

◆ StreamEVGEN

skel.StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", poolFile, asAlg=True, noTag=True , eventInfoKey="EventInfo")

Definition at line 379 of file skel.ABtoEVGEN.py.

◆ TakeItemsFromInput

skel.TakeItemsFromInput

Definition at line 382 of file skel.ABtoEVGEN.py.

◆ testSeq

skel.testSeq = acam.athMasterSeq.EvgenTestSeq

Definition at line 26 of file skel.ABtoEVGEN.py.

◆ theApp

skel.theApp = acam.theApp

Definition at line 20 of file skel.ABtoEVGEN.py.

◆ tmp

skel.tmp = line.split("=")

each input file ends with "</LesHouchesEvents>".

Powheg format is numevts n.

We don't want to write this out until all the files have been read. The elif below writes out all the events. Format for storing number of events different in MG and Powheg MG5 format is "n = nevents"

Definition at line 708 of file skel.GENtoEVGEN.py.

◆ topSeq

skel.topSeq = acas.AlgSequence()

Definition at line 31 of file skel.ABtoEVGEN.py.

◆ VerboseOutput

skel.VerboseOutput

Definition at line 147 of file skel.ABtoEVGEN.py.

◆ xAODKey

skel.xAODKey

Definition at line 18 of file skel.ABtoEVGEN.py.

replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
skel.find_unique_file
def find_unique_file(pattern)
Helper functions for input file handling.
Definition: skel.ABtoEVGEN.py:489
skel.merge_lhe_files
def merge_lhe_files(listOfFiles, outputFile)
Check that there is exactly 1 match.
Definition: skel.GENtoEVGEN.py:673
skel.OutputTXTFile
def OutputTXTFile()
==============================================================
Definition: skel.ABtoEVGEN.py:182
skel.checkBlackList
def checkBlackList(relFlavour, cache, generatorName)
Propagate debug output level requirement to generators.
Definition: skel.GENtoEVGEN.py:540
skel._short2
def _short2(s)
Definition: skel.ABtoEVGEN.py:273
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
skel._norm
def _norm(s)
Definition: skel.ABtoEVGEN.py:267
skel.checkPurpleList
def checkPurpleList(relFlavour, cache, generatorName)
Definition: skel.GENtoEVGEN.py:561
skel.get_immediate_subdirectories
def get_immediate_subdirectories(a_dir)
==============================================================
Definition: skel.GENtoEVGEN.py:208
Trk::open
@ open
Definition: BinningType.h:40
skel._checkattr
def _checkattr(attr, required=False)
==============================================================
Definition: skel.ABtoEVGEN.py:522
skel.mk_symlink
def mk_symlink(srcfile, dstfile)
Definition: skel.ABtoEVGEN.py:500
readCCLHist.int
int
Definition: readCCLHist.py:84
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
skel._norm2
def _norm2(s)
Definition: skel.ABtoEVGEN.py:270