ATLAS Offline Software
Generate_dsid_ranseed.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 
4 
5 import os
6 dsid = os.path.basename(runArgs.jobConfig[0])
7 if not dsid.isdigit():
8  dsid = "999999"
9 dsid = int(dsid)
10 seed = int(runArgs.randomSeed)
11 if runArgs.trfSubstepName == 'afterburn':
12  from PyJobTransforms.trfLogger import msg
13  msg.info("Running in Afterburner mode ..... for now dsid and seed not set")
14 else:
15  if 'Pythia8' in evgenConfig.generators:
16  genSeq.Pythia8.RandomSeed=seed
17  genSeq.Pythia8.Dsid=dsid
18  if 'Pythia8B' in evgenConfig.generators:
19  genSeq.Pythia8B.RandomSeed=seed
20  genSeq.Pythia8B.Dsid=dsid
21  if 'Herwig7' in evgenConfig.generators:
22  genSeq.Herwig7.RandomSeed=seed
23  genSeq.Herwig7.Dsid=dsid
24  if 'Sherpa' in evgenConfig.generators:
25  genSeq.Sherpa_i.RandomSeed=seed
26  genSeq.Sherpa_i.Dsid=dsid
27  if 'Epos' in evgenConfig.generators:
28  genSeq.Epos.RandomSeed=seed
29  genSeq.Epos.Dsid=dsid
30  if 'QGSJet' in evgenConfig.generators:
31  genSeq.QGSJet.RandomSeed = seed
32  genSeq.QGSJet.Dsid=dsid
33  if 'EvtGen' in evgenConfig.generators:
34  genSeq.EvtInclusiveDecay.RandomSeed=seed
35  genSeq.EvtInclusiveDecay.Dsid=dsid
36  if 'Photospp' in evgenConfig.generators:
37  genSeq.Photospp.RandomSeed=seed
38  genSeq.Photospp.Dsid=dsid
39  if 'TauplaPP' in evgenConfig.generators:
40  genSeq.TauolaPP.RandomSeed=seed
41  genSeq.TauolaPP.Dsid=dsid
42  if 'Hijing' in evgenConfig.generators:
43  genSeq.Hijing.RandomSeed=seed
44  genSeq.Hijing.Dsid=dsid
45  if 'Starlight' in evgenConfig.generators:
46  if hasattr(genSeq, 'Starlight'):
47  genSeq.Starlight.RandomSeed=seed
48  genSeq.Starlight.Dsid=dsid
49  if hasattr(genSeq, 'ParticleDecayer'):
50  genSeq.ParticleDecayer.RandomSeed=seed
51  genSeq.ParticleDecayer.Dsid=dsid
52  if 'CosmicGenerator' in evgenConfig.generators:
53  genSeq.CosmicGenerator.RandomSeed=seed
54  genSeq.CosmicGenerator.Dsid=dsid
55 
56 del dsid,seed
57 
58 
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.