Public Member Functions | |
void | beginEvent () |
double | operator() (const reco::PFTauRef &) const |
RecoTauDecayModeTruthMatchPlugin (const edm::ParameterSet &pset) | |
virtual | ~RecoTauDecayModeTruthMatchPlugin () |
Private Types | |
typedef edm::Association < reco::GenJetCollection > | GenJetAssociation |
Private Attributes | |
edm::Handle< GenJetAssociation > | genTauMatch_ |
edm::InputTag | matchingSrc_ |
Definition at line 30 of file RecoTauDecayModeTruthMatchPlugin.cc.
typedef edm::Association<reco::GenJetCollection> tautools::RecoTauDecayModeTruthMatchPlugin::GenJetAssociation [private] |
Definition at line 40 of file RecoTauDecayModeTruthMatchPlugin.cc.
tautools::RecoTauDecayModeTruthMatchPlugin::RecoTauDecayModeTruthMatchPlugin | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 45 of file RecoTauDecayModeTruthMatchPlugin.cc.
: RecoTauCleanerPlugin(pset), matchingSrc_(pset.getParameter<edm::InputTag>("matching")) {}
virtual tautools::RecoTauDecayModeTruthMatchPlugin::~RecoTauDecayModeTruthMatchPlugin | ( | ) | [inline, virtual] |
Definition at line 34 of file RecoTauDecayModeTruthMatchPlugin.cc.
{}
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_.
{ // Load the matching information evt()->getByLabel(matchingSrc_, genTauMatch_); }
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.
{ GenJetAssociation::reference_type truth = (*genTauMatch_)[tau]; // Check if the matching exists, if not return +infinity if (truth.isNull()) return std::numeric_limits<double>::infinity(); // Get the difference in decay mode. The closer to zero, the more the decay // mode is matched. return std::abs( reco::tau::getDecayMode(truth.get()) - tau->decayMode()); }
Definition at line 41 of file RecoTauDecayModeTruthMatchPlugin.cc.
Referenced by beginEvent().
Definition at line 39 of file RecoTauDecayModeTruthMatchPlugin.cc.
Referenced by beginEvent().