CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TtSemiLepHypGeom Class Reference

#include <TtSemiLepHypGeom.h>

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

List of all members.

Public Member Functions

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

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

Private Attributes

int neutrinoSolutionType_

Detailed Description

Definition at line 7 of file TtSemiLepHypGeom.h.


Constructor & Destructor Documentation

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

Definition at line 4 of file TtSemiLepHypGeom.cc.

                                                            :
  TtSemiLepHypothesis( cfg ),
  neutrinoSolutionType_(cfg.getParameter<int>("neutrinoSolutionType"))
{ }
TtSemiLepHypGeom::~TtSemiLepHypGeom ( )

Definition at line 9 of file TtSemiLepHypGeom.cc.

{ }

Member Function Documentation

void TtSemiLepHypGeom::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 12 of file TtSemiLepHypGeom.cc.

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

{
  // -----------------------------------------------------
  // 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_,    jetCorrectionLevel("wQuarkMix")); break;
      case TtSemiLepEvtPartons::LightQBar:
        setCandidate(jets, match[idx], lightQBar_, jetCorrectionLevel("wQuarkMix")); break;
      case TtSemiLepEvtPartons::HadB:
        setCandidate(jets, match[idx], hadronicB_, jetCorrectionLevel("bQuark")); break;
      case TtSemiLepEvtPartons::LepB: 
        setCandidate(jets, match[idx], leptonicB_, jetCorrectionLevel("bQuark")); break;
      }
    }
  }

  // -----------------------------------------------------
  // add lepton
  // -----------------------------------------------------
  if( leps->empty() )
    return;
  setCandidate(leps, 0, lepton_);
  match.push_back( 0 );
  
  // -----------------------------------------------------
  // add neutrino
  // -----------------------------------------------------
  if( mets->empty() )
    return;
  if(neutrinoSolutionType_ == -1)
    setCandidate(mets, 0, neutrino_);
  else
    setNeutrino(mets, leps, 0, neutrinoSolutionType_);
}
virtual void TtSemiLepHypGeom::buildKey ( ) [inline, private, virtual]

build the event hypothesis key

Implements TtSemiLepHypothesis.

Definition at line 17 of file TtSemiLepHypGeom.h.

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


Member Data Documentation

Definition at line 27 of file TtSemiLepHypGeom.h.

Referenced by buildHypo().