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 () override
 
double operator() (const reco::PFTauRef &) const override
 
 RecoTauDistanceFromTruthPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauDistanceFromTruthPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauCleanerPlugin
 RecoTauCleanerPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
virtual ~RecoTauCleanerPlugin ()
 
- Public Member Functions inherited from reco::tau::RecoTauEventHolderPlugin
const edm::Eventevt () const
 
edm::Eventevt ()
 
const edm::EventSetupevtSetup () const
 
 RecoTauEventHolderPlugin (const edm::ParameterSet &pset)
 
void setup (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,
edm::ConsumesCollector &&  iC 
)
virtual tautools::RecoTauDistanceFromTruthPlugin::~RecoTauDistanceFromTruthPlugin ( )
inlinevirtual

Definition at line 19 of file RecoTauDistanceFromTruthPlugin.cc.

19 {}

Member Function Documentation

void tautools::RecoTauDistanceFromTruthPlugin::beginEvent ( )
overridevirtual

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:418
double tautools::RecoTauDistanceFromTruthPlugin::operator() ( const reco::PFTauRef tauRef) const
overridevirtual

Implements reco::tau::RecoTauCleanerPlugin.

Definition at line 38 of file RecoTauDistanceFromTruthPlugin.cc.

References funct::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 }
Ref< typename refprod_type::product_type > reference_type
Definition: Association.h:24
const double infinity
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

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