CMS 3D CMS Logo

Public Member Functions | Private Member Functions

TtSemiLepHypMVADisc Class Reference

#include <TtSemiLepHypMVADisc.h>

Inheritance diagram for TtSemiLepHypMVADisc:
TtSemiLepHypothesis edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 TtSemiLepHypMVADisc (const edm::ParameterSet &)
 ~TtSemiLepHypMVADisc ()

Private Member Functions

virtual void buildHypo (edm::Event &, const edm::Handle< edm::View< reco::RecoCandidate > > &, const edm::Handle< std::vector< pat::MET > > &, const edm::Handle< std::vector< pat::Jet > > &, std::vector< int > &, const unsigned int iComb)
 build event hypothesis from the reco objects of a semi-leptonic event
virtual void buildKey ()
 build the event hypothesis key

Detailed Description

Definition at line 7 of file TtSemiLepHypMVADisc.h.


Constructor & Destructor Documentation

TtSemiLepHypMVADisc::TtSemiLepHypMVADisc ( const edm::ParameterSet cfg) [explicit]

Definition at line 4 of file TtSemiLepHypMVADisc.cc.

                                                                  :
  TtSemiLepHypothesis( cfg ) { }
TtSemiLepHypMVADisc::~TtSemiLepHypMVADisc ( )

Definition at line 7 of file TtSemiLepHypMVADisc.cc.

{ }

Member Function Documentation

void TtSemiLepHypMVADisc::buildHypo ( edm::Event evt,
const edm::Handle< edm::View< reco::RecoCandidate > > &  leps,
const edm::Handle< std::vector< pat::MET > > &  mets,
const edm::Handle< std::vector< pat::Jet > > &  jets,
std::vector< int > &  match,
const unsigned int  iComb 
) [private, virtual]

build event hypothesis from the reco objects of a semi-leptonic event

Implements TtSemiLepHypothesis.

Definition at line 10 of file TtSemiLepHypMVADisc.cc.

References TtSemiLepEvtPartons::HadB, TtSemiLepHypothesis::hadronicB_, UserOptions_cff::idx, TtSemiLepHypothesis::isValid(), analyzePatCleaning_cfg::jets, TtSemiLepEvtPartons::LepB, TtSemiLepHypothesis::lepton_, TtSemiLepHypothesis::leptonicB_, TtSemiLepEvtPartons::LightQ, TtSemiLepHypothesis::lightQ_, TtSemiLepEvtPartons::LightQBar, TtSemiLepHypothesis::lightQBar_, TtSemiLepHypothesis::neutrino_, and TtSemiLepHypothesis::setCandidate().

{
  // -----------------------------------------------------
  // add jets
  // -----------------------------------------------------
  for(unsigned idx=0; idx<match.size(); ++idx){
    if( isValid(match[idx], jets) ){
      switch(idx){
      case TtSemiLepEvtPartons::LightQ:
        setCandidate(jets, match[idx], lightQ_); break;
      case TtSemiLepEvtPartons::LightQBar:
        setCandidate(jets, match[idx], lightQBar_); break;
      case TtSemiLepEvtPartons::HadB:
        setCandidate(jets, match[idx], hadronicB_); break;
      case TtSemiLepEvtPartons::LepB: 
        setCandidate(jets, match[idx], leptonicB_); break;
      }
    }
  }

  // -----------------------------------------------------
  // add lepton
  // -----------------------------------------------------
  if( !leps->empty() )
    setCandidate(leps, 0, lepton_);
  match.push_back( 0 );
  
  // -----------------------------------------------------
  // add neutrino
  // -----------------------------------------------------
  if( !mets->empty() )
    setCandidate(mets, 0, neutrino_);
}
virtual void TtSemiLepHypMVADisc::buildKey ( ) [inline, private, virtual]

build the event hypothesis key

Implements TtSemiLepHypothesis.

Definition at line 17 of file TtSemiLepHypMVADisc.h.

References TtSemiLepHypothesis::key_, and TtEvent::kMVADisc.