8 formatList = [
"PHYSVAL",
"PHYS",
"PHYSLITE",
10 "JETM1",
"JETM2",
"JETM3",
"JETM4",
"JETM5",
"JETM6",
"JETM10",
"JETM11",
"JETM12",
"JETM14",
12 "EGAM1",
"EGAM2",
"EGAM3",
"EGAM4",
"EGAM5",
"EGAM7",
"EGAM8",
"EGAM9",
"EGAM10",
13 "FTAG1",
"FTAG2",
"FTAG3",
14 "BPHY1",
"BPHY2",
"BPHY3",
"BPHY4",
"BPHY5",
"BPHY6",
"BPHY10",
"BPHY12",
"BPHY15",
"BPHY16",
"BPHY18",
"BPHY21",
"BPHY22",
21 truthFormatList = [
"TRUTH0",
"TRUTH1",
"TRUTH3"]
24 [
"EGAM1",
"EGAM2",
"EGAM3",
"EGAM4",
"EGAM5",
"EGAM7",
"EGAM8",
"EGAM9",
"EGAM10",
"JETM1",
"JETM3",
"JETM4",
"JETM6",
"FTAG1",
"FTAG2",
"FTAG3",
"IDTR2",
"TRIG8",
"LLP1",
"STDM7",
"STDM13",
"HIGG1D1",
"MUON1"]
29 com_dir =
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/"
30 mc20File = com_dir+
"mc20/AOD/mc20_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.recon.AOD.e6337_s3681_r13145/1000events.AOD.27121237._002005.pool.root.1"
31 mc23File = com_dir+
"mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4162_r14622/1000events.AOD.33799166._000073.pool.root.1"
32 truthFile = com_dir+
"mc23/EVNT/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8514/EVNT.32288062._002040.pool.root.1"
33 data18File = com_dir+
"data18/AOD/data18_13TeV.00357772.physics_Main.merge.AOD.r13286_p4910/1000events.AOD.27655096._000455.pool.root.1"
34 data22File = com_dir+
"data22/AOD/data22_13p6TeV.00431906.physics_Main.merge.AOD.r13928_p5279/1000events.AOD.30220215._001367.pool.root.1"
35 data23CosFile = com_dir+
"data23_cos/AOD/data23_cos.00459152.physics_CosmicMuons.merge.AOD.f1383_m2195/data23_cos.00459152.physics_CosmicMuons.merge.AOD.f1383_m2195._lb0124-lb0126._0001.1"
40 outputFileName =
"test_"+label+formatName+add_str+
".sh"
41 outputFile =
open(outputFileName,
"w")
42 outputFile.write(
"#!/bin/sh"+
"\n")
43 outputFile.write(
"\n")
44 outputFile.write(
"# art-include: main/Athena"+
"\n")
45 if (formatName.find(
"EGAM")!=-1
or formatName.find(
"JETM")!=-1
or formatName.find(
"FTAG")!=-1
or formatName.find(
"IDTR")!=-1
or formatName.find(
"TRIG")!=-1
or (formatName.find(
"PHYS")!=-1
and formatName.find(
"PHYSLITE")==-1)):
46 outputFile.write(
"# art-include: main/Athena"+
"\n")
47 outputFile.write(
"# art-description: DAOD building "+formatName+
" "+label+
"\n")
48 outputFile.write(
"# art-type: grid"+
"\n")
49 outputFile.write(
"# art-output: *.pool.root"+
"\n")
50 outputFile.write(
"# art-output: checkFile*.txt"+
"\n")
51 outputFile.write(
"# art-output: checkxAOD*.txt"+
"\n")
52 outputFile.write(
"# art-output: checkIndexRefs*.txt"+
"\n")
53 outputFile.write(
"\n")
54 outputFile.write(
"set -e"+
"\n")
55 outputFile.write(
"\n")
57 outputFile.write(
"Derivation_tf.py \\\n")
58 outputFile.write(
"--inputAODFile "+inputFile+
" \\\n")
59 outputFile.write(
"--outputDAODFile art.pool.root \\\n")
60 outputFile.write(
"--formats "+formatName+
" \\\n")
61 outputFile.write(
"--maxEvents "+nEvents+
" \\\n")
63 outputFile.write(
"Derivation_tf.py \\\n")
64 outputFile.write(
"--inputEVNTFile "+inputFile+
" \\\n")
65 outputFile.write(
"--outputDAODFile art.pool.root \\\n")
66 outputFile.write(
"--formats "+formatName+
" \\\n")
67 outputFile.write(
"--maxEvents "+nEvents+
"\n")
68 outputFile.write(
"\n")
69 outputFile.write(
"echo \"art-result: $? reco\""+
"\n")
70 outputFile.write(
"\n")
71 outputFile.write(
"checkFile.py DAOD_"+formatName+
".art.pool.root > checkFile_"+formatName+
".txt"+
"\n")
72 outputFile.write(
"\n")
73 outputFile.write(
"echo \"art-result: $? checkfile\""+
'\n')
74 outputFile.write(
"\n")
75 outputFile.write(
"checkxAOD.py DAOD_"+formatName+
".art.pool.root > checkxAOD_"+formatName+
".txt"+
"\n")
76 outputFile.write(
"\n")
77 outputFile.write(
"echo \"art-result: $? checkxAOD\""+
'\n')
78 outputFile.write(
"\n")
79 outputFile.write(
"checkIndexRefs.py DAOD_"+formatName+
".art.pool.root > checkIndexRefs_"+formatName+
".txt 2>&1"+
"\n")
80 outputFile.write(
"\n")
81 outputFile.write(
"echo \"art-result: $? checkIndexRefs\""+
'\n')
83 os.system(
"chmod +x "+outputFileName)
87 outputFileName =
"test_"+label+
"_".
join(formatList)+add_str+
".sh"
88 outputFile =
open(outputFileName,
"w")
89 outputFile.write(
"#!/bin/sh"+
"\n")
90 outputFile.write(
"\n")
91 outputFile.write(
"# art-include: main/Athena"+
"\n")
92 outputFile.write(
"# art-description: DAOD building "+
" ".
join(formatList)+
" "+label+
"\n")
93 outputFile.write(
"# art-type: grid"+
"\n")
94 outputFile.write(
"# art-output: *.pool.root"+
"\n")
95 outputFile.write(
"# art-output: checkFile*.txt"+
"\n")
96 outputFile.write(
"# art-output: checkxAOD*.txt"+
"\n")
97 outputFile.write(
"# art-output: checkIndexRefs*.txt"+
"\n")
98 outputFile.write(
"\n")
99 outputFile.write(
"set -e"+
"\n")
100 outputFile.write(
"\n")
101 outputFile.write(
"Derivation_tf.py \\\n")
102 outputFile.write(
"--inputAODFile "+inputFile+
" \\\n")
103 outputFile.write(
"--outputDAODFile art.pool.root \\\n")
104 outputFile.write(
"--formats "+
" ".
join(formatList)+
" \\\n")
105 outputFile.write(
"--maxEvents "+nEvents+
" \\\n")
106 outputFile.write(
"\n")
107 outputFile.write(
"echo \"art-result: $? reco\""+
"\n")
108 for formatname
in formatList:
109 outputFile.write(
"\n")
110 outputFile.write(
"checkFile.py DAOD_"+formatname+
".art.pool.root > checkFile_"+formatname+
".txt"+
"\n")
111 outputFile.write(
"\n")
112 outputFile.write(
"echo \"art-result: $? checkfile\""+
'\n')
113 outputFile.write(
"\n")
114 outputFile.write(
"checkxAOD.py DAOD_"+formatname+
".art.pool.root > checkxAOD_"+formatname+
".txt"+
"\n")
115 outputFile.write(
"\n")
116 outputFile.write(
"echo \"art-result: $? checkxAOD\""+
'\n')
117 outputFile.write(
"\n")
118 outputFile.write(
"checkIndexRefs.py DAOD_"+formatname+
".art.pool.root > checkIndexRefs_"+formatname+
".txt 2>&1"+
"\n")
119 outputFile.write(
"\n")
120 outputFile.write(
"echo \"art-result: $? checkIndexRefs\""+
'\n')
122 os.system(
"chmod +x "+outputFileName)
124 if (makeDataDAODs
or makeMCDAODs):
125 for formatName
in formatList:
127 generateText(formatName,
"data18",data18File,
False,
False,
"-1")
128 generateText(formatName,
"data22",data22File,
False,
False,
"-1")
130 generateText(formatName,
"mc20",mc20File,
False,
True,
"-1")
131 generateText(formatName,
"mc23",mc23File,
False,
True,
"-1")
132 generateText(
"NCB1",
"data23cos",data23CosFile,
False,
False,
"-1")
134 for formatName
in truthFormatList:
135 generateText(formatName,
"mc23",truthFile,
True,
False,
"1000")
138 for train
in trainList: