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
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
virtual void beginEvent ()
 
 RecoTauDiscriminantPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauDiscriminantPlugin ()
 
- 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 &)
 
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 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_
 

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_, edm::ParameterSet::getParameter(), reco::tau::helpers::nCharged(), AlCaHLTBitMon_QueryRunRegistry::string, transforms_, and reco::tau::translateDecayMode().

37  typedef std::vector<edm::ParameterSet> VPSet;
38  // Add each of the transformations
39  BOOST_FOREACH(const edm::ParameterSet& dm,
40  pset.getParameter<VPSet>("decayModes")) {
41  uint32_t nCharged = dm.getParameter<uint32_t>("nCharged");
42  uint32_t nPiZeros = dm.getParameter<uint32_t>("nPiZeros");
43  MeanAndWidthFuncs functions;
44  functions.first.reset(new TauFunc(dm.getParameter<std::string>("mean")));
45  functions.second.reset(new TauFunc(dm.getParameter<std::string>("rms")));
46  transforms_[translateDecayMode(nCharged, nPiZeros)] = functions;
47  }
48  defaultTransform_.first.reset(
49  new TauFunc(pset.getParameter<std::string>("defaultMean")));
50  defaultTransform_.second.reset(
51  new TauFunc(pset.getParameter<std::string>("defaultRMS")));
52 }
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_
unsigned int nCharged(const GenJet &jet)

Member Function Documentation

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

Implements reco::tau::RecoTauDiscriminantPlugin.

Definition at line 54 of file RecoTauDiscriminantInvariantWidth.cc.

References defaultTransform_, timingPdfMaker::mean, reco::tau::disc::OpeningDeltaR(), query::result, plotscripts::rms(), create_public_lumi_plots::transform, and transforms_.

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

Member Data Documentation

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