ATLAS Offline Software
Functions | Variables
makeARTScripts Namespace Reference

Functions

def generateText (formatName, label, inputFile, isTruth, isMC, nEvents)
 
def generateTrains (formatList, label, inputFile, isMC, nEvents)
 

Variables

bool makeDataDAODs = True
 
bool makeMCDAODs = True
 
bool makeTruthDAODs = True
 
bool makeTrains = True
 
list formatList
 
list truthFormatList = ["TRUTH0", "TRUTH1", "TRUTH3"]
 
list trainList
 
string com_dir = "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/"
 
string 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"
 
string 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"
 
string truthFile = com_dir+"mc23/EVNT/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8514/EVNT.32288062._002040.pool.root.1"
 
string data18File = com_dir+"data18/AOD/data18_13TeV.00357772.physics_Main.merge.AOD.r13286_p4910/1000events.AOD.27655096._000455.pool.root.1"
 
string data22File = com_dir+"data22/AOD/data22_13p6TeV.00431906.physics_Main.merge.AOD.r13928_p5279/1000events.AOD.30220215._001367.pool.root.1"
 
string 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"
 

Function Documentation

◆ generateText()

def makeARTScripts.generateText (   formatName,
  label,
  inputFile,
  isTruth,
  isMC,
  nEvents 
)

Definition at line 38 of file makeARTScripts.py.

38 def generateText(formatName,label,inputFile,isTruth,isMC,nEvents):
39  add_str = ""
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")
56  if (not isTruth):
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")
62  if isTruth:
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')
82  outputFile.close()
83  os.system("chmod +x "+outputFileName)
84 

◆ generateTrains()

def makeARTScripts.generateTrains (   formatList,
  label,
  inputFile,
  isMC,
  nEvents 
)

Definition at line 85 of file makeARTScripts.py.

85 def generateTrains(formatList,label,inputFile,isMC,nEvents):
86  add_str = ""
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')
121  outputFile.close()
122  os.system("chmod +x "+outputFileName)
123 

Variable Documentation

◆ com_dir

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

Definition at line 29 of file makeARTScripts.py.

◆ data18File

string makeARTScripts.data18File = com_dir+"data18/AOD/data18_13TeV.00357772.physics_Main.merge.AOD.r13286_p4910/1000events.AOD.27655096._000455.pool.root.1"

Definition at line 33 of file makeARTScripts.py.

◆ data22File

string makeARTScripts.data22File = com_dir+"data22/AOD/data22_13p6TeV.00431906.physics_Main.merge.AOD.r13928_p5279/1000events.AOD.30220215._001367.pool.root.1"

Definition at line 34 of file makeARTScripts.py.

◆ data23CosFile

string 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.

◆ formatList

list makeARTScripts.formatList
Initial value:
1 = ["PHYSVAL","PHYS","PHYSLITE",
2  "LLP1","HIGG1D1",
3  "JETM1","JETM2","JETM3","JETM4","JETM5","JETM6","JETM10","JETM11","JETM12","JETM14",
4  "IDTR2",
5  "EGAM1","EGAM2","EGAM3","EGAM4","EGAM5","EGAM7","EGAM8","EGAM9","EGAM10",
6  "FTAG1","FTAG2","FTAG3",
7  "BPHY1","BPHY2","BPHY3","BPHY4","BPHY5","BPHY6","BPHY10","BPHY12","BPHY15","BPHY16","BPHY18","BPHY21","BPHY22",
8  "BPHY23","BPHY24",
9  "STDM7","STDM13",
10  "TRIG8",
11  "MUON1"
12 ]

Definition at line 8 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.

◆ 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.

◆ mc20File

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

Definition at line 30 of file makeARTScripts.py.

◆ mc23File

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

Definition at line 31 of file makeARTScripts.py.

◆ trainList

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

Definition at line 23 of file makeARTScripts.py.

◆ truthFile

string makeARTScripts.truthFile = com_dir+"mc23/EVNT/mc23_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8514/EVNT.32288062._002040.pool.root.1"

Definition at line 32 of file makeARTScripts.py.

◆ truthFormatList

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

Definition at line 21 of file makeARTScripts.py.

makeARTScripts.generateTrains
def generateTrains(formatList, label, inputFile, isMC, nEvents)
Definition: makeARTScripts.py:85
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
makeARTScripts.generateText
def generateText(formatName, label, inputFile, isTruth, isMC, nEvents)
Definition: makeARTScripts.py:38
Trk::open
@ open
Definition: BinningType.h:40