CMS 3D CMS Logo

Public Member Functions | Private Types | Private Attributes

tautools::RecoTauDistanceFromTruthPlugin Class Reference

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

List of all members.

Public Member Functions

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

Private Types

typedef edm::Association
< reco::GenJetCollection
GenJetAssociation

Private Attributes

edm::Handle< GenJetAssociationgenTauMatch_
edm::InputTag matchingSrc_

Detailed Description

Definition at line 16 of file RecoTauDistanceFromTruthPlugin.cc.


Member Typedef Documentation

Definition at line 24 of file RecoTauDistanceFromTruthPlugin.cc.


Constructor & Destructor Documentation

tautools::RecoTauDistanceFromTruthPlugin::RecoTauDistanceFromTruthPlugin ( const edm::ParameterSet pset)
virtual tautools::RecoTauDistanceFromTruthPlugin::~RecoTauDistanceFromTruthPlugin ( ) [inline, virtual]

Definition at line 19 of file RecoTauDistanceFromTruthPlugin.cc.

{}

Member Function Documentation

void tautools::RecoTauDistanceFromTruthPlugin::beginEvent ( ) [virtual]
double tautools::RecoTauDistanceFromTruthPlugin::operator() ( const reco::PFTauRef tauRef) const [virtual]

Implements reco::tau::RecoTauCleanerPlugin.

Definition at line 38 of file RecoTauDistanceFromTruthPlugin.cc.

References abs, infinity, and edm::Ref< C, T, F >::isNull().

                                                                                  {

  GenJetAssociation::reference_type truth = (*genTauMatch_)[tauRef];

  // Check if the matching exists, if not return +infinity
  if (truth.isNull())
    return std::numeric_limits<double>::infinity();

  return std::abs(tauRef->pt() - truth->pt());
}

Member Data Documentation

Definition at line 25 of file RecoTauDistanceFromTruthPlugin.cc.

Referenced by beginEvent().

Definition at line 23 of file RecoTauDistanceFromTruthPlugin.cc.

Referenced by beginEvent(), and RecoTauDistanceFromTruthPlugin().