From 1f4333e52bd81a5feeaa3dda37789a6e2f4e0008 Mon Sep 17 00:00:00 2001 From: Sebastian Mirko Naumann-Emme Date: Mon, 19 Oct 2009 08:51:18 +0000 Subject: [PATCH] --- yaml --- r: 75679 b: "refs/heads/CMSSW_7_1_X" c: e1c0c423a96b6b94304c770c6ac0ac4ce2d3bed8 h: "refs/heads/CMSSW_7_1_X" i: 75677: 414f280f354ce26c5ff19ca262eaac6784cba105 75675: 1f90ca2c94ea905cf3b2fa3db68a95eee627f4f2 75671: dcf748bde7f9af36552e7251896636fd6dbe8fd8 75663: 6305ecbf34c7b15c7a363e35c435a2009f60704c 75647: d3dbd958501700ff33d63b61130528d111ebb2f2 v: v3 --- [refs] | 2 +- .../plugins/TtSemiLepKinFitProducer.h | 22 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index f0a5e59850832..18250619862d5 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": d774bc9adf6abfda7d9f984ee62e60edf472a601 +"refs/heads/CMSSW_7_1_X": e1c0c423a96b6b94304c770c6ac0ac4ce2d3bed8 diff --git a/trunk/TopQuarkAnalysis/TopKinFitter/plugins/TtSemiLepKinFitProducer.h b/trunk/TopQuarkAnalysis/TopKinFitter/plugins/TtSemiLepKinFitProducer.h index 5b5d573607489..1ca643557d576 100644 --- a/trunk/TopQuarkAnalysis/TopKinFitter/plugins/TtSemiLepKinFitProducer.h +++ b/trunk/TopQuarkAnalysis/TopKinFitter/plugins/TtSemiLepKinFitProducer.h @@ -127,16 +127,18 @@ void TtSemiLepKinFitProducer::produce(edm::Event& evt, const e unsigned int nPartons = 4; - edm::Handle > match; - bool unvalidMatch = false; + std::vector match; + bool invalidMatch = false; if(useOnlyMatch_) { - evt.getByLabel(match_, match); + edm::Handle > > matchHandle; + evt.getByLabel(match_, matchHandle); + match = *(matchHandle->begin()); // check if match is valid - if(match->size()!=nPartons) unvalidMatch=true; + if(match.size()!=nPartons) invalidMatch=true; else { - for(unsigned int idx=0; idxsize(); ++idx) { - if(idx<0 || idx>=jets->size()) { - unvalidMatch=true; + for(unsigned int idx=0; idx=(int)jets->size()) { + invalidMatch=true; break; } } @@ -145,10 +147,10 @@ void TtSemiLepKinFitProducer::produce(edm::Event& evt, const e // ----------------------------------------------------- // skip events with no appropriate lepton candidate in - // or empty MET or less jets than partons or unvalid match + // or empty MET or less jets than partons or invalid match // ----------------------------------------------------- - if( leps->empty() || mets->empty() || jets->size()empty() || mets->empty() || jets->size()push_back( fitter->fittedHadP() ); pPartonsHadQ->push_back( fitter->fittedHadQ() ); @@ -196,7 +198,7 @@ void TtSemiLepKinFitProducer::produce(edm::Event& evt, const e std::vector combi; for(unsigned int i=0; i