CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

tautools::RecoTauDecayModeTruthMatchPlugin Class Reference

Inheritance diagram for tautools::RecoTauDecayModeTruthMatchPlugin:
reco::tau::RecoTauCleanerPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

List of all members.

Public Member Functions

void beginEvent ()
double operator() (const reco::PFTauRef &) const
 RecoTauDecayModeTruthMatchPlugin (const edm::ParameterSet &pset)
virtual ~RecoTauDecayModeTruthMatchPlugin ()

Private Types

typedef edm::Association
< reco::GenJetCollection
GenJetAssociation

Private Attributes

edm::Handle< GenJetAssociationgenTauMatch_
edm::InputTag matchingSrc_

Detailed Description

Definition at line 30 of file RecoTauDecayModeTruthMatchPlugin.cc.


Member Typedef Documentation

Definition at line 40 of file RecoTauDecayModeTruthMatchPlugin.cc.


Constructor & Destructor Documentation

tautools::RecoTauDecayModeTruthMatchPlugin::RecoTauDecayModeTruthMatchPlugin ( const edm::ParameterSet pset) [explicit]

Definition at line 45 of file RecoTauDecayModeTruthMatchPlugin.cc.

virtual tautools::RecoTauDecayModeTruthMatchPlugin::~RecoTauDecayModeTruthMatchPlugin ( ) [inline, virtual]

Definition at line 34 of file RecoTauDecayModeTruthMatchPlugin.cc.

{}

Member Function Documentation

void tautools::RecoTauDecayModeTruthMatchPlugin::beginEvent ( ) [virtual]
double tautools::RecoTauDecayModeTruthMatchPlugin::operator() ( const reco::PFTauRef tau) const [virtual]

Implements reco::tau::RecoTauCleanerPlugin.

Definition at line 57 of file RecoTauDecayModeTruthMatchPlugin.cc.

References abs, edm::Ref< C, T, F >::get(), reco::tau::getDecayMode(), infinity, edm::Ref< C, T, F >::isNull(), and metsig::tau.

        {
  GenJetAssociation::reference_type truth = (*genTauMatch_)[tau];
  // Check if the matching exists, if not return +infinity
  if (truth.isNull())
    return std::numeric_limits<double>::infinity();
  // Get the difference in decay mode.  The closer to zero, the more the decay
  // mode is matched.
  return std::abs(
      reco::tau::getDecayMode(truth.get()) - tau->decayMode());
}

Member Data Documentation

Definition at line 41 of file RecoTauDecayModeTruthMatchPlugin.cc.

Referenced by beginEvent().

Definition at line 39 of file RecoTauDecayModeTruthMatchPlugin.cc.

Referenced by beginEvent().