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< GenJetAssociation > | genTauMatch_ |
edm::InputTag | matchingSrc_ |
Definition at line 16 of file RecoTauDistanceFromTruthPlugin.cc.
typedef edm::Association<reco::GenJetCollection> tautools::RecoTauDistanceFromTruthPlugin::GenJetAssociation [private] |
Definition at line 24 of file RecoTauDistanceFromTruthPlugin.cc.
tautools::RecoTauDistanceFromTruthPlugin::RecoTauDistanceFromTruthPlugin | ( | const edm::ParameterSet & | pset | ) |
Definition at line 28 of file RecoTauDistanceFromTruthPlugin.cc.
References edm::ParameterSet::getParameter(), and matchingSrc_.
: reco::tau::RecoTauCleanerPlugin(pset) { matchingSrc_ = pset.getParameter<edm::InputTag>("matching"); }
virtual tautools::RecoTauDistanceFromTruthPlugin::~RecoTauDistanceFromTruthPlugin | ( | ) | [inline, virtual] |
Definition at line 19 of file RecoTauDistanceFromTruthPlugin.cc.
{}
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_.
{ // Load the matching information evt()->getByLabel(matchingSrc_, genTauMatch_); }
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()); }
Definition at line 25 of file RecoTauDistanceFromTruthPlugin.cc.
Referenced by beginEvent().
Definition at line 23 of file RecoTauDistanceFromTruthPlugin.cc.
Referenced by beginEvent(), and RecoTauDistanceFromTruthPlugin().