Public Member Functions | |
std::vector< double > | operator() (const reco::PFTauRef &tau) const |
RecoTauDiscriminantInvariantWidth (const edm::ParameterSet &pset) | |
Private Types | |
typedef std::pair< TauFuncPtr, TauFuncPtr > | MeanAndWidthFuncs |
typedef StringObjectFunction < PFTau > | TauFunc |
typedef boost::shared_ptr < TauFunc > | TauFuncPtr |
Private Attributes | |
MeanAndWidthFuncs | defaultTransform_ |
std::map < reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs > | transforms_ |
Definition at line 21 of file RecoTauDiscriminantInvariantWidth.cc.
typedef std::pair<TauFuncPtr, TauFuncPtr> reco::tau::RecoTauDiscriminantInvariantWidth::MeanAndWidthFuncs [private] |
Definition at line 29 of file RecoTauDiscriminantInvariantWidth.cc.
typedef StringObjectFunction<PFTau> reco::tau::RecoTauDiscriminantInvariantWidth::TauFunc [private] |
Definition at line 27 of file RecoTauDiscriminantInvariantWidth.cc.
typedef boost::shared_ptr<TauFunc> reco::tau::RecoTauDiscriminantInvariantWidth::TauFuncPtr [private] |
Definition at line 28 of file RecoTauDiscriminantInvariantWidth.cc.
reco::tau::RecoTauDiscriminantInvariantWidth::RecoTauDiscriminantInvariantWidth | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 35 of file RecoTauDiscriminantInvariantWidth.cc.
References defaultTransform_, edm::ParameterSet::getParameter(), reco::tau::helpers::nCharged(), AlCaHLTBitMon_QueryRunRegistry::string, transforms_, and reco::tau::translateDecayMode().
:RecoTauDiscriminantPlugin(pset) { typedef std::vector<edm::ParameterSet> VPSet; // Add each of the transformations BOOST_FOREACH(const edm::ParameterSet& dm, pset.getParameter<VPSet>("decayModes")) { uint32_t nCharged = dm.getParameter<uint32_t>("nCharged"); uint32_t nPiZeros = dm.getParameter<uint32_t>("nPiZeros"); MeanAndWidthFuncs functions; functions.first.reset(new TauFunc(dm.getParameter<std::string>("mean"))); functions.second.reset(new TauFunc(dm.getParameter<std::string>("rms"))); transforms_[translateDecayMode(nCharged, nPiZeros)] = functions; } defaultTransform_.first.reset( new TauFunc(pset.getParameter<std::string>("defaultMean"))); defaultTransform_.second.reset( new TauFunc(pset.getParameter<std::string>("defaultRMS"))); }
std::vector< double > reco::tau::RecoTauDiscriminantInvariantWidth::operator() | ( | const reco::PFTauRef & | tau | ) | const [virtual] |
Implements reco::tau::RecoTauDiscriminantPlugin.
Definition at line 54 of file RecoTauDiscriminantInvariantWidth.cc.
References defaultTransform_, timingPdfMaker::mean, reco::tau::disc::OpeningDeltaR(), query::result, plotscripts::rms(), and transforms_.
{ double weightedDeltaR = disc::OpeningDeltaR(*tau); std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>::const_iterator transform = transforms_.find(tau->decayMode()); const TauFunc* meanFunc = defaultTransform_.first.get(); const TauFunc* rmsFunc = defaultTransform_.second.get(); if (transform != transforms_.end()) { meanFunc = transform->second.first.get(); rmsFunc = transform->second.second.get(); } double mean = (*meanFunc)(*tau); double rms = (*rmsFunc)(*tau); double result = (rms > 0) ? (weightedDeltaR - mean)/rms : -1.; return std::vector<double>(1, result); }
Definition at line 32 of file RecoTauDiscriminantInvariantWidth.cc.
Referenced by operator()(), and RecoTauDiscriminantInvariantWidth().
std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs> reco::tau::RecoTauDiscriminantInvariantWidth::transforms_ [private] |
Definition at line 31 of file RecoTauDiscriminantInvariantWidth.cc.
Referenced by operator()(), and RecoTauDiscriminantInvariantWidth().