Skip to content

Commit

Permalink
Merge pull request cms-sw#40 from veelken/cecilecaillol-master
Browse files Browse the repository at this point in the history
MVA met updates
  • Loading branch information
l-cadamuro committed Mar 25, 2016
2 parents 43948fd + e66f063 commit 7053056
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 3 additions & 1 deletion NtupleProducer/plugins/PairUnpacker.cc
Expand Up @@ -56,6 +56,8 @@ PairUnpacker::PairUnpacker (const edm::ParameterSet& iConfig) :
_InputPairsTag (iConfig.getParameter<InputTag>("src")),
_pairIndex (iConfig.getParameter<int> ("pairIndex"))
{
consumes<View<reco::CompositeCandidate> >(_InputPairsTag);

produces<reco::CandidateCollection>();
}

Expand Down Expand Up @@ -91,4 +93,4 @@ void PairUnpacker::produce(edm::Event& iEvent, const edm::EventSetup& iSetup)


#include <FWCore/Framework/interface/MakerMacros.h>
DEFINE_FWK_MODULE(PairUnpacker);
DEFINE_FWK_MODULE(PairUnpacker);
17 changes: 11 additions & 6 deletions NtupleProducer/python/HiggsTauTauProducer.py
Expand Up @@ -525,14 +525,14 @@

# apply new jet energy corrections
from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cff import patJetCorrFactorsUpdated
levels = None
jecLevels = None
if IsMC:
levels = [ 'L1FastJet', 'L2Relative', 'L3Absolute' ]
jecLevels = [ 'L1FastJet', 'L2Relative', 'L3Absolute' ]
else:
levels = [ 'L1FastJet', 'L2Relative', 'L3Absolute', 'L2L3Residual' ]
jecLevels = [ 'L1FastJet', 'L2Relative', 'L3Absolute', 'L2L3Residual' ]
process.patJetCorrFactorsReapplyJEC = patJetCorrFactorsUpdated.clone(
src = cms.InputTag("slimmedJets"),
levels = [],
levels = jecLevels,
payload = 'AK4PFchs' # Make sure to choose the appropriate levels and payload here!
)
from PhysicsTools.PatAlgos.producersLayer1.jetUpdater_cff import patJetsUpdated
Expand Down Expand Up @@ -591,10 +591,14 @@
process.MVAMET.requireOS = cms.bool(False)

process.MVAMETInputs = cms.Sequence(
process.slimmedElectronsTight + process.slimmedMuonsTight + process.slimmedTausLoose + process.slimmedTausLooseCleaned + process.patJetsReapplyJECCleaned +
process.pfCHS + process.pfChargedPV + process.pfChargedPU + process.pfNeutrals + process.neutralInJets +
process.pfMETCands + process.pfTrackMETCands + process.pfNoPUMETCands + process.pfPUCorrectedMETCands + process.pfPUMETCands +
##process.pfChargedPUMETCands + process.pfNeutralPUMETCands + process.pfNeutralPVMETCands + process.pfNeutralUnclusteredMETCands +
process.pfChs
process.pfChargedPUMETCands + process.pfNeutralPUMETCands + process.pfNeutralPVMETCands + process.pfNeutralUnclusteredMETCands +
process.pfChs +
process.ak4PFCHSL1FastjetCorrector + process.ak4PFCHSL2RelativeCorrector + process.ak4PFCHSL3AbsoluteCorrector + process.ak4PFCHSResidualCorrector +
process.ak4PFCHSL1FastL2L3Corrector + process.ak4PFCHSL1FastL2L3ResidualCorrector +
process.tauDecayProducts + process.tauPFMET + process.tauMET + process.tausSignificance
)
for met in ["pfMET", "pfTrackMET", "pfNoPUMET", "pfPUCorrectedMET", "pfPUMET", "pfChargedPUMET", "pfNeutralPUMET", "pfNeutralPVMET", "pfNeutralUnclusteredMET"]:
process.MVAMETInputs += getattr(process, met)
Expand Down Expand Up @@ -773,3 +777,4 @@
)
# always run ntuplizer
process.trees = cms.EndPath(process.HTauTauTree)# + process.HTauTauTreeTauUp + process.HTauTauTreeTauDown)

4 changes: 3 additions & 1 deletion NtupleProducer/test/analyzer.py
Expand Up @@ -23,7 +23,7 @@
APPLYMETCORR=True # flag to enable (True) and disable (False) Z-recoil corrections for MVA MET response and resolution
USE_NOHFMET = False # True to exclude HF and run on silver json

SVFITBYPASS=True # use SVFitBypass module, no SVfit computation, adds dummy userfloats for MET and SVfit mass
SVFITBYPASS=False # use SVFitBypass module, no SVfit computation, adds dummy userfloats for MET and SVfit mass
BUILDONLYOS=False #If true don't create the collection of SS candidates (and thus don't run SV fit on them)

IsMC=True
Expand Down Expand Up @@ -119,3 +119,5 @@
#)
#process.MessageLogger.threshold = cms.untracked.string('ERROR')

#processDumpFile = open('process.dump' , 'w')
#print >> processDumpFile, process.dumpPython()

0 comments on commit 7053056

Please sign in to comment.