Skip to content
Snippets Groups Projects
Commit 68ac2e54 authored by Johannes Elmsheuser's avatar Johannes Elmsheuser Committed by Peter Berta
Browse files

PROCTools: Add nTauTracks and nTauJets to the xAODDigest outputs

parent 044f4944
No related branches found
No related tags found
No related merge requests found
run event nTopo nIdTracks nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot
327265 186524665 430 416 0 0 0 0 0 0 0
327265 186525031 451 430 0 0 0 0 0 0 0
327265 186542447 338 293 0 0 0 0 0 0 0
327265 186543405 425 320 0 0 0 0 0 0 0
327265 186548387 537 513 0 0 0 0 0 0 0
run event nTopo nIdTracks nTauTracks nTaus nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot
327265 186524665 430 416 0 0 0 0 0 0 0 0 0
327265 186525031 451 430 0 0 0 0 0 0 0 0 0
327265 186542447 338 293 0 0 0 0 0 0 0 0 0
327265 186543405 425 320 0 0 0 0 0 0 0 0 0
327265 186548387 537 513 0 0 0 0 0 0 0 0 0
run event nTopo nIdTracks nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot
284500 87473001 116 129 1 8 2 6 7 4 3
284500 87473014 89 79 0 11 1 10 6 4 2
284500 87473022 35 30 0 4 2 2 5 4 1
284500 87473032 29 33 1 10 4 6 6 2 4
284500 87473037 65 43 0 11 2 9 6 4 2
284500 87473040 104 93 1 16 1 15 14 7 7
284500 87473051 135 111 1 11 1 10 22 16 6
284500 87473063 62 76 3 6 2 4 6 4 2
284500 87473068 26 33 1 0 0 0 0 0 0
284500 87473075 67 87 2 5 0 5 5 4 1
284500 87473084 84 86 2 13 1 12 10 5 5
284500 87473091 40 49 0 2 1 1 6 3 3
284500 87473096 68 75 2 3 0 3 5 2 3
284500 87473104 64 63 0 6 2 4 4 3 1
284500 87473114 88 77 2 12 1 11 9 6 3
284500 87473121 86 100 3 14 4 10 9 6 3
284500 87473132 85 59 1 12 0 12 4 4 0
284500 87473137 90 71 3 15 0 15 7 7 0
284500 87473144 83 68 1 9 2 7 8 6 2
284500 87473154 92 88 0 11 2 9 8 4 4
284500 87473162 49 53 0 4 0 4 6 5 1
284500 87473167 74 55 3 15 2 13 14 9 5
284500 87473171 80 69 3 4 2 2 5 4 1
284500 87473184 69 86 2 7 1 6 5 3 2
284500 87473192 53 52 1 6 4 2 6 5 1
run event nTopo nIdTracks nTauTracks nTaus nMuons nElec nTrueElec nFakeElec nPhot nTruePhot nFakePhot
284500 87473001 116 129 35 3 1 8 2 6 7 4 3
284500 87473014 89 79 31 6 0 11 1 10 6 4 2
284500 87473022 35 30 17 2 0 4 2 2 5 4 1
284500 87473032 29 33 24 4 1 10 4 6 6 2 4
284500 87473037 65 43 39 7 0 11 2 9 6 4 2
284500 87473040 104 93 66 9 1 16 1 15 14 7 7
284500 87473051 135 111 61 11 1 11 1 10 22 16 6
284500 87473063 62 76 31 5 3 6 2 4 6 4 2
284500 87473068 26 33 4 1 1 0 0 0 0 0 0
284500 87473075 67 87 28 5 2 5 0 5 5 4 1
284500 87473084 84 86 54 6 2 13 1 12 10 5 5
284500 87473091 40 49 15 3 0 2 1 1 6 3 3
284500 87473096 68 75 19 3 2 3 0 3 5 2 3
284500 87473104 64 63 34 4 0 6 2 4 4 3 1
284500 87473114 88 77 47 7 2 12 1 11 9 6 3
284500 87473121 86 100 51 7 3 14 4 10 9 6 3
284500 87473132 85 59 42 8 1 12 0 12 4 4 0
284500 87473137 90 71 58 7 3 15 0 15 7 7 0
284500 87473144 83 68 34 5 1 9 2 7 8 6 2
284500 87473154 92 88 46 6 0 11 2 9 8 4 4
284500 87473162 49 53 29 4 0 4 0 4 6 5 1
284500 87473167 74 55 38 6 3 15 2 13 14 9 5
284500 87473171 80 69 21 4 3 4 2 2 5 4 1
284500 87473184 69 86 32 5 2 7 1 6 5 3 2
284500 87473192 53 52 25 4 1 6 4 2 6 5 1
This diff is collapsed.
......@@ -57,14 +57,16 @@ def compare2Files(file1,file2):
print("Summary of differences:")
noChanges=""
nEvt=len(res1)
changed = False
for (name,count) in diffCounter.items():
if (count>0):
#print (name,":",count,"(of ",nEvt,")")
print ("{}: {} events (out of {})".format(name,count,nEvt))
changed = True
else:
noChanges+=" "+name
print("No changes for:",noChanges)
return changed
def compareDigest(filelist):
if len(filelist)<2:
......@@ -126,4 +128,6 @@ if __name__ == "__main__":
print("Usage:")
print("{} <file1> <file2>".format(sys.argv[0].split("/")[-1]))
else:
compare2Files(sys.argv[1],sys.argv[2])
retval=compare2Files(sys.argv[1],sys.argv[2])
sys.exit(retval)
......@@ -32,6 +32,17 @@ def xAODDigest(evt, counter=False, extravars=False):
"xAOD::TrackParticleContainer", "InDetTrackParticles")
nIdTracks = len(idTracks)
tautracks = safeRetrieve(evt, "xAOD::TauTrackContainer", "TauTracks")
nTauTracks = len(tautracks)
taus = safeRetrieve(evt, "xAOD::TauJetContainer", "TauJets")
nTaus = len(taus)
if taus:
tau1pt = taus[0].pt()
tau1eta = taus[0].eta()
tau1phi = taus[0].phi()
else:
tau1pt = tau1eta = tau1phi = 0
muons = safeRetrieve(evt, "xAOD::MuonContainer", "Muons")
nMuons = len(muons)
if muons:
......@@ -85,11 +96,12 @@ def xAODDigest(evt, counter=False, extravars=False):
if extravars:
result.append((runnbr, evtnbr, nclus, nIdTracks,
nTauTracks, nTaus, tau1pt, tau1eta, tau1phi,
nMuons, muon1pt, muon1eta, muon1phi,
nElec, elec1pt, elec1eta, elec1phi, nTrueElectrons, nFakeElectrons,
nPhot, phot1pt, phot1eta, phot1phi ,nTruePhotons, nFakePhotons))
else:
result.append((runnbr, evtnbr, nclus, nIdTracks, nMuons,
result.append((runnbr, evtnbr, nclus, nIdTracks, nTauTracks, nTaus, nMuons,
nElec, nTrueElectrons, nFakeElectrons,
nPhot, nTruePhotons, nFakePhotons))
......@@ -156,6 +168,7 @@ def main():
if args.extravars:
header = ("run", "event", "nTopo", "nIdTracks",
"nTauTracks", "nTaus", "tau1pt", "tau1eta", "tau1phi",
"nMuons", "muon1pt", "muon1eta", "muon1phi",
"nElec", "elec1pt", "elec1eta", "elec1phi", "nTrueElec", "nFakeElec",
"nPhot", "phot1pt", "phot1eta", "phot1phi", "nTruePhot", "nFakePhot")
......@@ -164,7 +177,7 @@ def main():
row_format_data = "{:d} {:d} " + "{:20.4f}" * (len(header)-2)
row_format_data += os.linesep
else:
header = ("run", "event", "nTopo", "nIdTracks", "nMuons",
header = ("run", "event", "nTopo", "nIdTracks", "nTauTracks", "nTaus", "nMuons",
"nElec", "nTrueElec", "nFakeElec",
"nPhot", "nTruePhot", "nFakePhot")
row_format_header = "{:>12}" * len(header)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment