ATLAS Offline Software
Loading...
Searching...
No Matches
makeARTScripts Namespace Reference

Functions

 generateText (formatName, label, inputFile, isTruth, nEvents, inputExpression="", artInput="")
 generateTrains (formatList, label, inputFile, nEvents, inputExpression="")
 generatePHYStoPHYSLITE (label, inputFile, nEvents)

Variables

bool makeDataDAODs = True
bool makeMCDAODs = True
bool makeTruthDAODs = True
bool makeTrains = True
bool makePHYStoPHYSLITE = True
list formatList
list truthFormatList = ["TRUTH0", "TRUTH1", "TRUTH3"]
list trainList
str com_dir = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/"
str data23File = com_dir+"data23/AOD/data23_13p6TeV.00453713.physics_Main.recon.AOD.f1357/2012events.data23_13p6TeV.00453713.physics_Main.recon.AOD.f1357._lb1416._0006.1"
str 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"
str data24File = com_dir+"data24/AOD/data24_13p6TeV.00486658.physics_Main.recon.AOD.f1522_m2262_r16385_r16377/AOD.43718985._000221.pool.root.1"
str data25Input = "user.martindl.data25_13p6TeV.00498515.physics_Main.merge.AOD.r17521_p7232"
str data25File = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/data25/AOD/data25_13p6TeV.00498515.physics_Main.merge.AOD.r17521_p7232/AOD.49752827._000024.pool.root.1"
str mc23dInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4159_r15530"
str mc23dFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4159_r15530/AOD.38803011._001713.pool.root.1"
str mc23eInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4369_r16083"
str mc23eFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4369_r16083/AOD.41608496._001231.pool.root.1"
str mc23gInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4618_r17610"
str mc23gFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4618_r17610/AOD.50092877._002250.pool.root.1"
str mc21_14TeV_JETM42_Input = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/AOD/ATLAS-P2-RUN4-03-00-01/mc21_14TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4422_r16129/AOD.41929775._000127.pool.root.1"
 mc20PHYSFile = os.getenv('ASG_TEST_FILE_MC')
 mc23PHYSFile = os.getenv('ASG_TEST_FILE_RUN3_MC')
 data18PHYSFile = os.getenv('ASG_TEST_FILE_DATA')
 data23PHYSFile = os.getenv('ASG_TEST_FILE_RUN3_DATA')
 artInput

Function Documentation

◆ generatePHYStoPHYSLITE()

generatePHYStoPHYSLITE ( label,
inputFile,
nEvents )

Definition at line 184 of file makeARTScripts.py.

184def generatePHYStoPHYSLITE(label,inputFile,nEvents):
185 add_str = "PHYStoPHYSLITE"
186 outputFileName = "test_"+label+"_"+add_str+".sh"
187 outputFile = open(outputFileName,"w")
188 outputFile.write("#!/bin/sh"+"\n")
189 outputFile.write("\n")
190 outputFile.write("# art-include: main/Athena"+"\n")
191 outputFile.write("# art-description: DAOD building PHYStoPHYSLITE "+label+"\n")
192 outputFile.write("# art-type: grid"+"\n")
193 outputFile.write("# art-output: *.pool.root"+"\n")
194 outputFile.write("# art-output: checkFile*.txt"+"\n")
195 outputFile.write("# art-output: checkxAOD*.txt"+"\n")
196 outputFile.write("# art-output: checkIndexRefs*.txt"+"\n")
197 outputFile.write("\n")
198 outputFile.write("set -e"+"\n")
199 outputFile.write("\n")
200 outputFile.write("Derivation_tf.py \\\n")
201 outputFile.write("--inputDAOD_PHYSFile "+inputFile+" \\\n")
202 outputFile.write("--outputD2AODFile art.pool.root \\\n")
203 outputFile.write("--formats PHYSLITE \\\n")
204 outputFile.write("--maxEvents "+nEvents+" \\\n")
205 outputFile.write("\n")
206 outputFile.write("echo \"art-result: $? reco\""+"\n")
207 outputFile.write("\n")
208 outputFile.write("checkFile.py D2AOD_PHYSLITE.art.pool.root > checkFile_PHYSLITE.txt"+"\n")
209 outputFile.write("\n")
210 outputFile.write("echo \"art-result: $? checkfile\""+'\n')
211 outputFile.write("\n")
212 outputFile.write("checkxAOD.py D2AOD_PHYSLITE.art.pool.root > checkxAOD_PHYSLITE.txt"+"\n")
213 outputFile.write("\n")
214 outputFile.write("echo \"art-result: $? checkxAOD\""+'\n')
215 outputFile.write("\n")
216 outputFile.write("checkIndexRefs.py D2AOD_PHYSLITE.art.pool.root > checkIndexRefs_PHYSLITE.txt 2>&1"+"\n")
217 outputFile.write("\n")
218 outputFile.write("echo \"art-result: $? checkIndexRefs\""+'\n')
219 outputFile.close()
220 os.system("chmod +x "+outputFileName)
221

◆ generateText()

generateText ( formatName,
label,
inputFile,
isTruth,
nEvents,
inputExpression = "",
artInput = "" )

Definition at line 57 of file makeARTScripts.py.

57def generateText(formatName,label,inputFile,isTruth,nEvents,inputExpression="",artInput=""):
58 add_str = ""
59 outputFileName = "test_"+label+formatName+add_str+".sh"
60 outputFile = open(outputFileName,"w")
61 outputFile.write("#!/bin/sh"+"\n")
62 outputFile.write("\n")
63 outputFile.write("# art-include: main/Athena"+"\n")
64 outputFile.write("# art-description: DAOD building "+formatName+" "+label+"\n")
65 outputFile.write("# art-type: grid"+"\n")
66 outputFile.write("# art-memory: 4096"+"\n")
67 if artInput:
68 outputFile.write("# art-input: "+artInput+"\n")
69 outputFile.write("# art-input-nfiles: 1 \n")
70 outputFile.write("# art-output: *.pool.root"+"\n")
71 outputFile.write("# art-output: checkFile*.txt"+"\n")
72 outputFile.write("# art-output: checkxAOD*.txt"+"\n")
73 outputFile.write("# art-output: checkIndexRefs*.txt"+"\n")
74 outputFile.write("\n")
75
76 if artInput:
77 outputFile.write("if [[ -z ${ArtInFile} ]]; then\n")
78 outputFile.write(" ArtInFile=\""+inputFile+"\"\n")
79 outputFile.write("fi\n")
80 outputFile.write("\n")
81 elif inputExpression:
82 inputVariable = "EVNT_File" if isTruth else "AOD_File"
83 outputFile.write(
84 inputVariable+"=$(python -c \"from AthenaConfiguration.TestDefaults import defaultTestFiles; print("
85 + inputExpression + ")\")\n"
86 )
87 outputFile.write("\n")
88
89 outputFile.write("set -e"+"\n")
90 outputFile.write("\n")
91
92 outputFile.write("Derivation_tf.py \\\n")
93 if isTruth:
94 if inputExpression:
95 outputFile.write("--inputEVNTFile ${EVNT_File} \\\n")
96 else:
97 outputFile.write("--inputEVNTFile "+inputFile+" \\\n")
98 else:
99 if artInput:
100 outputFile.write("--inputAODFile ${ArtInFile} \\\n")
101 elif inputExpression:
102 outputFile.write("--inputAODFile ${AOD_File} \\\n")
103 else:
104 outputFile.write("--inputAODFile "+inputFile+" \\\n")
105 outputFile.write("--outputDAODFile art.pool.root \\\n")
106 outputFile.write("--formats "+formatName+" \\\n")
107 outputFile.write("--maxEvents "+nEvents+" \\\n")
108
109 outputFile.write("\n")
110 outputFile.write("echo \"art-result: $? reco\""+"\n")
111 outputFile.write("\n")
112 outputFile.write("checkFile.py DAOD_"+formatName+".art.pool.root > checkFile_"+formatName+".txt"+"\n")
113 outputFile.write("\n")
114 outputFile.write("echo \"art-result: $? checkfile\""+'\n')
115 outputFile.write("\n")
116 outputFile.write("checkxAOD.py DAOD_"+formatName+".art.pool.root > checkxAOD_"+formatName+".txt"+"\n")
117 outputFile.write("\n")
118 outputFile.write("echo \"art-result: $? checkxAOD\""+'\n')
119 outputFile.write("\n")
120 outputFile.write("checkIndexRefs.py DAOD_"+formatName+".art.pool.root > checkIndexRefs_"+formatName+".txt 2>&1"+"\n")
121 outputFile.write("\n")
122 outputFile.write("echo \"art-result: $? checkIndexRefs\""+'\n')
123 outputFile.close()
124 os.system("chmod +x "+outputFileName)
125

◆ generateTrains()

generateTrains ( formatList,
label,
inputFile,
nEvents,
inputExpression = "" )

Definition at line 126 of file makeARTScripts.py.

126def generateTrains(formatList,label,inputFile,nEvents,inputExpression=""):
127 add_str = ""
128 outputFileName = "test_"+label+"_".join(formatList)+add_str+".sh"
129 outputFile = open(outputFileName,"w")
130 outputFile.write("#!/bin/sh"+"\n")
131 outputFile.write("\n")
132 outputFile.write("# art-include: main/Athena"+"\n")
133 outputFile.write("# art-description: DAOD building "+" ".join(formatList)+" "+label+"\n")
134 outputFile.write("# art-type: grid"+"\n")
135 outputFile.write("# art-output: *.pool.root"+"\n")
136 outputFile.write("# art-output: checkFile*.txt"+"\n")
137 outputFile.write("# art-output: checkxAOD*.txt"+"\n")
138 outputFile.write("# art-output: checkIndexRefs*.txt"+"\n")
139 outputFile.write("\n")
140
141 outputFile.write("set -e"+"\n")
142 outputFile.write("\n")
143
144 outputFile.write("formats=\"")
145 outputFile.write(" ".join(formatList))
146 outputFile.write("\"\n")
147 outputFile.write("\n")
148
149 if inputExpression:
150 outputFile.write(
151 'AOD_File=$(python -c "from AthenaConfiguration.TestDefaults import defaultTestFiles; print('
152 + inputExpression + ')")\n' )
153 outputFile.write("\n")
154
155 outputFile.write("Derivation_tf.py \\\n")
156 if inputExpression:
157 outputFile.write("--inputAODFile ${AOD_File} \\\n")
158 else:
159 outputFile.write("--inputAODFile "+inputFile+" \\\n")
160 outputFile.write("--outputDAODFile art.pool.root \\\n")
161 outputFile.write("--formats $formats \\\n")
162 outputFile.write("--maxEvents "+nEvents+" \\\n")
163 outputFile.write("\n")
164
165 outputFile.write("echo \"art-result: $? reco\""+"\n")
166 outputFile.write("\n")
167 outputFile.write("function checkFormat()\n")
168 outputFile.write("{\n")
169 outputFile.write(" format=$1\n")
170 outputFile.write(" checkFile.py DAOD_${format}.art.pool.root > checkFile_${format}.txt\n")
171 outputFile.write(" echo \"art-result: $? checkfile $format\"\n")
172 outputFile.write(" checkxAOD.py DAOD_${format}.art.pool.root > checkxAOD_${format}.txt\n")
173 outputFile.write(" echo \"art-result: $? checkxAOD $format\"\n")
174 outputFile.write(" checkIndexRefs.py DAOD_${format}.art.pool.root > checkIndexRefs_${format}.txt 2>&1\n")
175 outputFile.write(" echo \"art-result: $? checkIndexRefs $format\"\n")
176 outputFile.write("}\n")
177 outputFile.write("\n")
178 outputFile.write("for f in $formats; do\n")
179 outputFile.write(" checkFormat $f;\n")
180 outputFile.write("done\n")
181 outputFile.close()
182 os.system("chmod +x "+outputFileName)
183

Variable Documentation

◆ artInput

makeARTScripts.artInput

Definition at line 255 of file makeARTScripts.py.

◆ com_dir

str makeARTScripts.com_dir = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/"

Definition at line 33 of file makeARTScripts.py.

◆ data18PHYSFile

makeARTScripts.data18PHYSFile = os.getenv('ASG_TEST_FILE_DATA')

Definition at line 54 of file makeARTScripts.py.

◆ data23CosFile

str makeARTScripts.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"

Definition at line 35 of file makeARTScripts.py.

◆ data23File

str makeARTScripts.data23File = com_dir+"data23/AOD/data23_13p6TeV.00453713.physics_Main.recon.AOD.f1357/2012events.data23_13p6TeV.00453713.physics_Main.recon.AOD.f1357._lb1416._0006.1"

Definition at line 34 of file makeARTScripts.py.

◆ data23PHYSFile

makeARTScripts.data23PHYSFile = os.getenv('ASG_TEST_FILE_RUN3_DATA')

Definition at line 55 of file makeARTScripts.py.

◆ data24File

str makeARTScripts.data24File = com_dir+"data24/AOD/data24_13p6TeV.00486658.physics_Main.recon.AOD.f1522_m2262_r16385_r16377/AOD.43718985._000221.pool.root.1"

Definition at line 36 of file makeARTScripts.py.

◆ data25File

str makeARTScripts.data25File = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/data25/AOD/data25_13p6TeV.00498515.physics_Main.merge.AOD.r17521_p7232/AOD.49752827._000024.pool.root.1"

Definition at line 39 of file makeARTScripts.py.

◆ data25Input

str makeARTScripts.data25Input = "user.martindl.data25_13p6TeV.00498515.physics_Main.merge.AOD.r17521_p7232"

Definition at line 38 of file makeARTScripts.py.

◆ formatList

list makeARTScripts.formatList
Initial value:
= ["PHYSVAL","PHYS","PHYSLITE",
"LLP1","LLJ1","HIGG1D1","HIGG1D2", "HIGG9D1",
"JETM1","JETM2","JETM3","JETM4","JETM5","JETM7","JETM12","JETM42",
"IDTR2",
"EGAM1","EGAM2","EGAM3","EGAM4","EGAM5","EGAM7","EGAM8","EGAM9","EGAM10",
"FTAG1","FTAG1LITE","FTAG2","FTAG3","FTAG4","FTAG5","FTAGPU","FTAGXBB","FTAGSSV",
"BPHY1","BPHY2","BPHY3","BPHY4","BPHY5","BPHY6","BPHY10","BPHY12","BPHY14","BPHY15","BPHY16","BPHY18","BPHY21","BPHY22",
"BPHY23","BPHY24","BPHY28",
"STDM6","STDM7","STDM13","STDM16","STDM17",
"SUSY20", "TLA2",
"TRIG8","TRIG9","TRIG10",
"MUON1", "MUON5",
"TCAL1",
"TOPQ7"
]

Definition at line 9 of file makeARTScripts.py.

◆ makeDataDAODs

bool makeARTScripts.makeDataDAODs = True

Definition at line 3 of file makeARTScripts.py.

◆ makeMCDAODs

bool makeARTScripts.makeMCDAODs = True

Definition at line 4 of file makeARTScripts.py.

◆ makePHYStoPHYSLITE

bool makeARTScripts.makePHYStoPHYSLITE = True

Definition at line 7 of file makeARTScripts.py.

◆ makeTrains

bool makeARTScripts.makeTrains = True

Definition at line 6 of file makeARTScripts.py.

◆ makeTruthDAODs

bool makeARTScripts.makeTruthDAODs = True

Definition at line 5 of file makeARTScripts.py.

◆ mc20PHYSFile

makeARTScripts.mc20PHYSFile = os.getenv('ASG_TEST_FILE_MC')

Definition at line 52 of file makeARTScripts.py.

◆ mc21_14TeV_JETM42_Input

str makeARTScripts.mc21_14TeV_JETM42_Input = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/AOD/ATLAS-P2-RUN4-03-00-01/mc21_14TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4422_r16129/AOD.41929775._000127.pool.root.1"

Definition at line 48 of file makeARTScripts.py.

◆ mc23dFile

str makeARTScripts.mc23dFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4159_r15530/AOD.38803011._001713.pool.root.1"

Definition at line 42 of file makeARTScripts.py.

◆ mc23dInput

str makeARTScripts.mc23dInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4159_r15530"

Definition at line 41 of file makeARTScripts.py.

◆ mc23eFile

str makeARTScripts.mc23eFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4369_r16083/AOD.41608496._001231.pool.root.1"

Definition at line 44 of file makeARTScripts.py.

◆ mc23eInput

str makeARTScripts.mc23eInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4369_r16083"

Definition at line 43 of file makeARTScripts.py.

◆ mc23gFile

str makeARTScripts.mc23gFile = "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/data-art/large-input/CampaignInputs/mc23/AOD/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4618_r17610/AOD.50092877._002250.pool.root.1"

Definition at line 46 of file makeARTScripts.py.

◆ mc23gInput

str makeARTScripts.mc23gInput = "user.martindl.mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.recon.AOD.e8514_s4618_r17610"

Definition at line 45 of file makeARTScripts.py.

◆ mc23PHYSFile

makeARTScripts.mc23PHYSFile = os.getenv('ASG_TEST_FILE_RUN3_MC')

Definition at line 53 of file makeARTScripts.py.

◆ trainList

list makeARTScripts.trainList
Initial value:
= [
["EGAM1","EGAM2","EGAM3","EGAM4","EGAM5","EGAM7","EGAM8","EGAM9","EGAM10","JETM1","JETM3","JETM4","FTAG1","FTAG2","FTAG3","IDTR2","TRIG8","TRIG9","LLP1","STDM7","STDM13","HIGG1D1","MUON1"]
]

Definition at line 27 of file makeARTScripts.py.

◆ truthFormatList

list makeARTScripts.truthFormatList = ["TRUTH0", "TRUTH1", "TRUTH3"]

Definition at line 25 of file makeARTScripts.py.