CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/TopQuarkAnalysis/TopJetCombination/plugins/TtSemiLepHypMVADisc.cc

Go to the documentation of this file.
00001 #include "AnalysisDataFormats/TopObjects/interface/TtSemiLepEvtPartons.h"
00002 #include "TopQuarkAnalysis/TopJetCombination/plugins/TtSemiLepHypMVADisc.h"
00003 
00004 TtSemiLepHypMVADisc::TtSemiLepHypMVADisc(const edm::ParameterSet& cfg):
00005   TtSemiLepHypothesis( cfg ) { }
00006 
00007 TtSemiLepHypMVADisc::~TtSemiLepHypMVADisc() { }
00008 
00009 void
00010 TtSemiLepHypMVADisc::buildHypo(edm::Event& evt,
00011                                const edm::Handle<edm::View<reco::RecoCandidate> >& leps, 
00012                                const edm::Handle<std::vector<pat::MET> >& mets, 
00013                                const edm::Handle<std::vector<pat::Jet> >& jets, 
00014                                std::vector<int>& match, const unsigned int iComb)
00015 {
00016   // -----------------------------------------------------
00017   // add jets
00018   // -----------------------------------------------------
00019   for(unsigned idx=0; idx<match.size(); ++idx){
00020     if( isValid(match[idx], jets) ){
00021       switch(idx){
00022       case TtSemiLepEvtPartons::LightQ:
00023         setCandidate(jets, match[idx], lightQ_); break;
00024       case TtSemiLepEvtPartons::LightQBar:
00025         setCandidate(jets, match[idx], lightQBar_); break;
00026       case TtSemiLepEvtPartons::HadB:
00027         setCandidate(jets, match[idx], hadronicB_); break;
00028       case TtSemiLepEvtPartons::LepB: 
00029         setCandidate(jets, match[idx], leptonicB_); break;
00030       }
00031     }
00032   }
00033 
00034   // -----------------------------------------------------
00035   // add lepton
00036   // -----------------------------------------------------
00037   if( !leps->empty() )
00038     setCandidate(leps, 0, lepton_);
00039   match.push_back( 0 );
00040   
00041   // -----------------------------------------------------
00042   // add neutrino
00043   // -----------------------------------------------------
00044   if( !mets->empty() )
00045     setCandidate(mets, 0, neutrino_);
00046 }