CMS 3D CMS Logo

TtSemiLepHypMVADisc.cc

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

Generated on Tue Jun 9 17:48:13 2009 for CMSSW by  doxygen 1.5.4