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::RecoTauDecayModeTruthMatchPlugin Class Reference
Inheritance diagram for tautools::RecoTauDecayModeTruthMatchPlugin:
reco::tau::RecoTauCleanerPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

void beginEvent ()
 
double operator() (const reco::PFTauRef &) const
 
 RecoTauDecayModeTruthMatchPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauDecayModeTruthMatchPlugin ()
 
- 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 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.

46  : RecoTauCleanerPlugin(pset),
47  matchingSrc_(pset.getParameter<edm::InputTag>("matching")) {}
T getParameter(std::string const &) const
RecoTauCleanerPlugin(const edm::ParameterSet &pset)
virtual tautools::RecoTauDecayModeTruthMatchPlugin::~RecoTauDecayModeTruthMatchPlugin ( )
inlinevirtual

Definition at line 34 of file RecoTauDecayModeTruthMatchPlugin.cc.

34 {}

Member Function Documentation

void tautools::RecoTauDecayModeTruthMatchPlugin::beginEvent ( )
virtual

Reimplemented from reco::tau::RecoTauCleanerPlugin.

Definition at line 50 of file RecoTauDecayModeTruthMatchPlugin.cc.

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

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

58  {
59  GenJetAssociation::reference_type truth = (*genTauMatch_)[tau];
60  // Check if the matching exists, if not return +infinity
61  if (truth.isNull())
63  // Get the difference in decay mode. The closer to zero, the more the decay
64  // mode is matched.
65  return std::abs(
66  reco::tau::getDecayMode(truth.get()) - tau->decayMode());
67 }
#define abs(x)
Definition: mlp_lapack.h:159
Ref< typename refprod_type::product_type > reference_type
Definition: Association.h:25
PFTau::hadronicDecayMode getDecayMode(const reco::GenJet *genJet)
const double infinity

Member Data Documentation

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

Definition at line 41 of file RecoTauDecayModeTruthMatchPlugin.cc.

Referenced by beginEvent().

edm::InputTag tautools::RecoTauDecayModeTruthMatchPlugin::matchingSrc_
private

Definition at line 39 of file RecoTauDecayModeTruthMatchPlugin.cc.

Referenced by beginEvent().