Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/dump_processed.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def dump_lumi(output, fname):
json.dump(dicts, outfile, indent=2)

lumi_in_pb = os.popen(
f"export PATH=$HOME/.local/bin:/cvmfs/cms-bril.cern.ch/brilconda3/bin:$PATH; brilcalc lumi -c web -i {fname}_lumi.json -u /pb "
# Using recommended temporary Run 3 normtag
# https://twiki.cern.ch/twiki/bin/viewauth/CMS/BrilcalcQuickStart
f"source /cvmfs/cms-bril.cern.ch/cms-lumi-pog/brilws-docker/brilws-env; eval \'brilcalc lumi --normtag /cvmfs/cms-bril.cern.ch/cms-lumi-pog/Normtags/normtag_PHYSICS.json -c web -i {fname}_lumi.json -u /pb \'"
).read()
lumi_in_pb = lumi_in_pb[
lumi_in_pb.find("#Summary:") : lumi_in_pb.find("#Check JSON:")
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def validate(file):
return fin["Events"].num_entries
except:
print("retries", n_tries, file)
n_tries += n_tries
n_tries += 1
if not_able_open:
return f"FailedRetries: {file}"

Expand Down
10 changes: 9 additions & 1 deletion src/BTVNanoCommissioning/utils/histogrammer.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,15 @@ def histo_writter(pruned_ev, output, weights, systematics, isSyst, SF_map):
# define Jet flavor

# Reduce the jet to the correct dimension in the plot
nj = 4 if "jet4" in output.keys() else 2 if "jet2" in output.keys() else 1
found4jets = False
found2jets = False
for key in output.keys():
if "jet3" in key: # Because 0-indexing
found4jets = True
break
if "jet1" in key: # Because 0-indexing
found2jets = True
nj = 4 if found4jets else 2 if found2jets else 1
pruned_ev.SelJet = pruned_ev.SelJet if nj == 1 else pruned_ev.SelJet[:, :nj]
if "var" in str(ak.type(pruned_ev.SelJet.pt)) and nj == 1:
pruned_ev.SelJet = pruned_ev.SelJet[:, 0]
Expand Down
Loading