-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comments
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 |
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? |
nope, you just
import mhtProducer
and then define a different
mht = lambda : mhtProducer( lambda j : j.pt > 40,
lambda mu : ...something.....,
lambda el : ...something..... )
or
mhtVhbb = same
…On Mon, Jan 22, 2018 at 1:59 PM, scooperstein ***@***.***> wrote:
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?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEyilk4rnJGOTaJV8ePdqCOyM17pBhSfks5tNIY5gaJpZM4RmnfF>
.
|
@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
The text was updated successfully, but these errors were encountered: