ATLAS Offline Software
LArG4GenerateFSStartingPoints.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 
4 import os
5 # print command line for logging
6 from optparse import OptionParser
7 parser = OptionParser(usage = "usage: %prog", version="%prog $Id: LArG4GenerateFSStartingPoints.py 574715 2013-12-09 23:43:19Z gsedov $")
8 
9 parser.add_option("--inputFile", dest="input", default=None, action="append", help="select the input genevent file name (preferred over the particle gun)")
10 parser.add_option("--outputFile", dest="output", default='StartGenEvents', help="select the output file name (default: %default)")
11 parser.add_option("--geometry", dest="geometry", default='', help="select the geometry tag (default can be used)")
12 parser.add_option("--condition", dest="condition", default='', help="select the geometry tag (REQUIRED)")
13 parser.add_option("--runNumber", dest="runNumber", default=410000, type=int, help="run number (default: %default)")
14 parser.add_option("--physlist", dest="physlist", help="select the physics list (default can be used)")
15 parser.add_option("--etaMin", dest="etaMin", default='-3.3', help="particle gun: Minimum Eta (default: %default)")
16 parser.add_option("--etaMax", dest="etaMax", default='3.3', help="particle gun: Maximum Eta (default: %default)")
17 parser.add_option("--energyMin", dest="energyMin", default='20000', help="particle gun: particle Minimum energy (default: %default MeV)")
18 parser.add_option("--energyMax", dest="energyMax", default='50000', help="particle gun: Maximum energy (default: %default MeV)")
19 parser.add_option("--pid", dest="pid", default='11', help="particle gun: particle type (11=electron, 13=muon, 111=pi0 211=pi+, .., default: %default)")
20 parser.add_option("--skipevents", dest="skipevents", default=0, type=int, help="select the number of events to skip (default: 0)")
21 parser.add_option("--nevents", dest="nevents", default=5000, type=int, help="number of events to process (default: %default)")
22 parser.add_option("--spratio", dest="spratio", default=0.02, type=float, help="the ratio of starting points to be saved (default: %default)")
23 parser.add_option("--outputLevel", dest="outLVL", default=3, type=int, help="outputLevel: 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR" )
24 (options, args) = parser.parse_args()
25 
26 if len(options.condition) == 0 :
27  print ("No condition tag set, aborting")
28 
29 exec = __file__.replace("LArG4GenerateFSStartingPoints.py","LArG4GenerateFSStartingPointsBody.py")
30 os.system('athena -c "options={:s}" {:s}'.format(str(options),exec))
vtune_athena.format
format
Definition: vtune_athena.py:14
str
Definition: BTagTrackIpAccessor.cxx:11