Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error including mht() module in post-processor #12

Open
scooperstein opened this issue Jan 22, 2018 · 3 comments
Open

error including mht() module in post-processor #12

scooperstein opened this issue Jan 22, 2018 · 3 comments

Comments

@scooperstein
Copy link

@arizzi
If one tries to include the mht() module in the vhbb post-processor, for example via uncommenting this import line

https://github.com/scooperstein/nanoAOD-tools/blob/vhbb_crab_setup/python/postprocessing/analysis/higgs/vhbb/postproc.py#L12

and including the mht() module in the sequence as in here

https://github.com/scooperstein/nanoAOD-tools/blob/vhbb_crab_setup/python/postprocessing/analysis/higgs/vhbb/postproc.py#L50

it fails with the error below. It seems to be referencing a branch "Electron_miniPFIso_all" that is not in the nanoAOD tree. Should this branch name be updated in NanoAODTools/postprocessing/modules/jme/mht.py?

Thanks,
Stephane

File "postproc_local.py", line 46, in
p.run()
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/framework/postprocessor.py", line 97, in run
(nall, npass, timeLoop) = eventLoop(self.modules, inFile, outFile, inTree, outTree)
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/framework/eventloop.py", line 34, in eventLoop
ret = m.analyze(e)
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/modules/jme/mht.py", line 33, in analyze
for lep in filter(self.elSel,electrons):
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/modules/jme/mht.py", line 58, in
lambda el : el.pt > 20 and el.miniPFIso_all/el.pt < 0.2 )
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/framework/datamodel.py", line 58, in getattr
val = getattr(self._event,self._prefix+name)
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/framework/datamodel.py", line 13, in getattr
return self._tree.readBranch(name)
File "/afs/cern.ch/work/s/scoopers/private/nanoAOD_dev/CMSSW_9_4_0_pre3/python/PhysicsTools/NanoAODTools/postprocessing/framework/treeReaderArrayTools.py", line 63, in readBranch
if not branch: raise RuntimeError, "Unknown branch %s" % branchName
RuntimeError: Unknown branch Electron_miniPFIso_all

@arizzi
Copy link

arizzi commented Jan 22, 2018

probably the example need an update, anyhow we should rather use our own selection of leptons/jets for computing MHT, rather than the selection of the example

@scooperstein
Copy link
Author

I see so instead of importing this directly we can instead just import something like the code here https://github.com/scooperstein/nanoAOD-tools/blob/vhbb_crab_setup/python/postprocessing/modules/jme/mht.py#L24 into VHbbProducer.py and include directly our collection of jets/leptons?

@arizzi
Copy link

arizzi commented Jan 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants