CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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

Public Member Functions

void beginEvent ()
 
double operator() (const reco::PFTauRef &) const
 
 RecoTauDistanceFromTruthPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauDistanceFromTruthPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauCleanerPlugin
 RecoTauCleanerPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauCleanerPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauEventHolderPlugin
const edm::Eventevt () const
 
const edm::EventSetupevtSetup () const
 
 RecoTauEventHolderPlugin (const edm::ParameterSet &pset)
 
void setup (const edm::Event &, const edm::EventSetup &)
 
virtual ~RecoTauEventHolderPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

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 ( )
inlinevirtual

Definition at line 19 of file RecoTauDistanceFromTruthPlugin.cc.

19 {}

Member Function Documentation

void tautools::RecoTauDistanceFromTruthPlugin::beginEvent ( )
virtual

Reimplemented from reco::tau::RecoTauCleanerPlugin.

Definition at line 33 of file RecoTauDistanceFromTruthPlugin.cc.

References reco::tau::RecoTauEventHolderPlugin::evt(), genTauMatch_, edm::Event::getByLabel(), and matchingSrc_.

33  {
34  // Load the matching information
36 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
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().

38  {
39 
40  GenJetAssociation::reference_type truth = (*genTauMatch_)[tauRef];
41 
42  // Check if the matching exists, if not return +infinity
43  if (truth.isNull())
45 
46  return std::abs(tauRef->pt() - truth->pt());
47 }
#define abs(x)
Definition: mlp_lapack.h:159
Ref< typename refprod_type::product_type > reference_type
Definition: Association.h:25
const double infinity

Member Data Documentation

edm::Handle<GenJetAssociation> tautools::RecoTauDistanceFromTruthPlugin::genTauMatch_
private

Definition at line 25 of file RecoTauDistanceFromTruthPlugin.cc.

Referenced by beginEvent().

edm::InputTag tautools::RecoTauDistanceFromTruthPlugin::matchingSrc_
private

Definition at line 23 of file RecoTauDistanceFromTruthPlugin.cc.

Referenced by beginEvent(), and RecoTauDistanceFromTruthPlugin().