CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
reco::tau::RecoTauDiscriminantInvariantWidth Class Reference
Inheritance diagram for reco::tau::RecoTauDiscriminantInvariantWidth:
reco::tau::RecoTauDiscriminantPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

std::vector< double > operator() (const reco::PFTauRef &tau) const override
 
 RecoTauDiscriminantInvariantWidth (const edm::ParameterSet &pset)
 
- Public Member Functions inherited from reco::tau::RecoTauDiscriminantPlugin
void beginEvent () override
 
 RecoTauDiscriminantPlugin (const edm::ParameterSet &pset)
 
 ~RecoTauDiscriminantPlugin () override
 
- 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 &)
 
 ~RecoTauEventHolderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Private Types

typedef std::pair< TauFuncPtr, TauFuncPtrMeanAndWidthFuncs
 
typedef StringObjectFunction< PFTauTauFunc
 
typedef boost::shared_ptr< TauFuncTauFuncPtr
 

Private Attributes

MeanAndWidthFuncs defaultTransform_
 
std::map< reco::PFTau::hadronicDecayMode, MeanAndWidthFuncstransforms_
 

Detailed Description

Definition at line 21 of file RecoTauDiscriminantInvariantWidth.cc.

Member Typedef Documentation

Definition at line 29 of file RecoTauDiscriminantInvariantWidth.cc.

Definition at line 27 of file RecoTauDiscriminantInvariantWidth.cc.

Definition at line 28 of file RecoTauDiscriminantInvariantWidth.cc.

Constructor & Destructor Documentation

reco::tau::RecoTauDiscriminantInvariantWidth::RecoTauDiscriminantInvariantWidth ( const edm::ParameterSet pset)
explicit

Definition at line 35 of file RecoTauDiscriminantInvariantWidth.cc.

References defaultTransform_, symbols::dm, stringResolutionProvider_cfi::functions, edm::ParameterSet::getParameter(), hpstanc_transforms::nCharged, hpstanc_transforms::nPiZeros, AlCaHLTBitMon_QueryRunRegistry::string, transforms_, reco::tau::translateDecayMode(), and HistogramManager_cfi::VPSet().

37  typedef std::vector<edm::ParameterSet> VPSet;
38  // Add each of the transformations
39  for(auto const& dm : pset.getParameter<VPSet>("decayModes")) {
40  uint32_t nCharged = dm.getParameter<uint32_t>("nCharged");
41  uint32_t nPiZeros = dm.getParameter<uint32_t>("nPiZeros");
43  functions.first.reset(new TauFunc(dm.getParameter<std::string>("mean")));
44  functions.second.reset(new TauFunc(dm.getParameter<std::string>("rms")));
45  transforms_[translateDecayMode(nCharged, nPiZeros)] = functions;
46  }
47  defaultTransform_.first.reset(
48  new TauFunc(pset.getParameter<std::string>("defaultMean")));
49  defaultTransform_.second.reset(
50  new TauFunc(pset.getParameter<std::string>("defaultRMS")));
51 }
T getParameter(std::string const &) const
RecoTauDiscriminantPlugin(const edm::ParameterSet &pset)
PFTau::hadronicDecayMode translateDecayMode(unsigned int nCharged, unsigned int nPiZero)
std::map< reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs > transforms_

Member Function Documentation

std::vector< double > reco::tau::RecoTauDiscriminantInvariantWidth::operator() ( const reco::PFTauRef tau) const
overridevirtual

Implements reco::tau::RecoTauDiscriminantPlugin.

Definition at line 53 of file RecoTauDiscriminantInvariantWidth.cc.

References defaultTransform_, DEFINE_EDM_PLUGIN, SiStripPI::mean, reco::tau::disc::OpeningDeltaR(), mps_fire::result, SiStripPI::rms, create_public_lumi_plots::transform, and transforms_.

54  {
55  double weightedDeltaR = disc::OpeningDeltaR(*tau);
56 
57  std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs>::const_iterator
58  transform = transforms_.find(tau->decayMode());
59 
60  const TauFunc* meanFunc = defaultTransform_.first.get();
61  const TauFunc* rmsFunc = defaultTransform_.second.get();
62 
63  if (transform != transforms_.end()) {
64  meanFunc = transform->second.first.get();
65  rmsFunc = transform->second.second.get();
66  }
67 
68  double mean = (*meanFunc)(*tau);
69  double rms = (*rmsFunc)(*tau);
70 
71  double result = (rms > 0) ? (weightedDeltaR - mean)/rms : -1.;
72 
73  return std::vector<double>(1, result);
74 }
std::map< reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs > transforms_

Member Data Documentation

MeanAndWidthFuncs reco::tau::RecoTauDiscriminantInvariantWidth::defaultTransform_
private
std::map<reco::PFTau::hadronicDecayMode, MeanAndWidthFuncs> reco::tau::RecoTauDiscriminantInvariantWidth::transforms_
private