ATLAS Offline Software
Loading...
Searching...
No Matches
MakeSliceSet.py
Go to the documentation of this file.
1import os
2import argparse
3import sys
4import itertools
5
6# python MakeSliceSet.py /eos/atlas/atlascerngroupdisk/det-htt/HTTsim/user/abkahn/ExtrapolationEngine/ATLAS-P2-ITK-22-02-00/ATLAS-P2-ITK-22-02-00_01eta03_03phi05.root --outfilelabel rmaps/nosmear_eta_01_03_phi_03_05
7
8parser = argparse.ArgumentParser(description='')
9parser.add_argument('--test',dest='test', action='store_true')
10parser.add_argument('inname', metavar='inputfile', type=str, nargs='+',
11 help='input file name (extrapolator files or directory')
12parser.add_argument('--outfilelabel', action='store', type=str,
13 help='label to start outfile with', default="Unlabeled")
14
15
16args = parser.parse_args()
17
18def runAbortIfFails(command):
19 retv=os.system(command)
20 if retv!=0:
21 sys.exit(retv)
22
23
24keylayers=["pixel,barrel,0",
25 "pixel,barrel,4",
26 "strip,barrel,0",
27 "strip,barrel,2"
28]
29
30configs=["--nslices 6",
31 "--fullgran"]
32
33for keylayer,config in itertools.product(keylayers,configs):
34 logname = args.outfilelabel+"_"+keylayer.replace(",","_")+"_"+config.replace("--","").replace(" ","")+".log"
35 runAbortIfFails("python module_driven_slicing.py --keylayer %s %s --outfilelabel %s --trim 0.01 %s > %s" %
36 (keylayer,config,args.outfilelabel," ".join(args.inname),logname))
37
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition hcg.cxx:310
runAbortIfFails(command)