ATLAS Offline Software
LHEonly.py
Go to the documentation of this file.
1 # Common fragment for generation of 1 Pythia8 event, when producing LHE output only
2 # the number of events is set to 1 in two places: as Pythia param: Main:numberOfEvents = 1 and postSeq.CountHepMC.RequestedOutput=1 (the later one is stronger)
3 # It is needed to make the transform run
4 # No output is kept from this generation
5 # We don't modify nEventsPerJob anymore,
6 # which now corresponds to the number of
7 # events in the output LHE file
8 
9 
10 from __main__ import opts
11 import os
12 if 'ATHENA_CORE_NUMBER' in os.environ:
13  evgenLog.info('Noticed that you have run with an athena MP-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.')
14  njobs = os.environ.pop('ATHENA_CORE_NUMBER')
15  # Try to modify the opts underfoot
16  if not hasattr(opts,'nprocs'): mglog.warning('Did not see option!')
17  else: opts.nprocs = 0
18  evgenLog.info('Options: ' + str(opts))
19 
20 from Pythia8_i.Pythia8_iConf import Pythia8_i
21 genSeq += Pythia8_i("Pythia8")
22 
23 genSeq.Pythia8.Commands += [
24  "Main:timesAllowErrors = 500",
25  "Main:numberOfEvents = 1",
26  "6:m0 = 172.5",
27  "23:m0 = 91.1876",
28  "23:mWidth = 2.4952",
29  "24:m0 = 80.399",
30  "24:mWidth = 2.085",
31  "StandardModel:sin2thetaW = 0.23113",
32  "StandardModel:sin2thetaWbar = 0.23146",
33  "ParticleDecays:limitTau0 = on",
34  "ParticleDecays:tau0Max = 10.0"]
35 
36 genSeq.Pythia8.Commands += [
37  "Tune:pp = 5",
38  "MultipartonInteractions:bProfile = 4",
39  "MultipartonInteractions:a1 = 0.03",
40  "MultipartonInteractions:pT0Ref = 1.90",
41  "MultipartonInteractions:ecmPow = 0.30",
42  "PDF:pSet=LHAPDF6:MSTW2008lo68cl",
43  "ColourReconnection:range=2.28",
44  "SoftQCD:inelastic = on",
45  "SpaceShower:rapidityOrder=0"]
46 
47 
48 if not hasattr(postSeq, "CountHepMC"):
49  postSeq += CountHepMC()
50 postSeq.CountHepMC.RequestedOutput = 1
51 
52 del testSeq.TestHepMC
53 
CountHepMC
Count the number of events to pass all algorithms/filters.
Definition: CountHepMC.h:22
str
Definition: BTagTrackIpAccessor.cxx:11