CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
pat::PATMuonHeavyObjectCache Class Reference

Public Member Functions

pat::CalculatePtRatioRel const & calculatePtRatioRel () const
 
pat::MuonMvaIDEstimator const & muonMvaIDEstimator () const
 
 PATMuonHeavyObjectCache (const edm::ParameterSet &)
 
pat::SoftMuonMvaEstimator const & softMuonMvaEstimator () const
 

Private Attributes

std::unique_ptr< const pat::CalculatePtRatioRelcalculatePtRatioRel_
 
std::unique_ptr< const pat::MuonMvaIDEstimatormuonMvaIDEstimator_
 
std::unique_ptr< const pat::SoftMuonMvaEstimatorsoftMuonMvaEstimator_
 

Detailed Description

Definition at line 59 of file PATMuonProducer.cc.

Constructor & Destructor Documentation

◆ PATMuonHeavyObjectCache()

PATMuonHeavyObjectCache::PATMuonHeavyObjectCache ( const edm::ParameterSet iConfig)

Definition at line 327 of file PATMuonProducer.cc.

References edm::ParameterSet::getParameter(), displacedMuonProducer_cff::mvaDrMax, muonProducer_cfi::mvaIDTrainingFile, and displacedMuonProducer_cff::softMvaTrainingFile.

327  {
328  if (iConfig.getParameter<bool>("computeMiniIso")) {
329  float mvaDrMax = iConfig.getParameter<double>("mvaDrMax");
330  calculatePtRatioRel_ = std::make_unique<CalculatePtRatioRel>(mvaDrMax * mvaDrMax);
331  }
332 
333  if (iConfig.getParameter<bool>("computeMuonIDMVA")) {
334  edm::FileInPath mvaIDTrainingFile = iConfig.getParameter<edm::FileInPath>("mvaIDTrainingFile");
335  muonMvaIDEstimator_ = std::make_unique<MuonMvaIDEstimator>(mvaIDTrainingFile);
336  }
337 
338  if (iConfig.getParameter<bool>("computeSoftMuonMVA")) {
339  edm::FileInPath softMvaTrainingFile = iConfig.getParameter<edm::FileInPath>("softMvaTrainingFile");
340  softMuonMvaEstimator_ = std::make_unique<SoftMuonMvaEstimator>(softMvaTrainingFile);
341  }
342 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< const pat::MuonMvaIDEstimator > muonMvaIDEstimator_
std::unique_ptr< const pat::SoftMuonMvaEstimator > softMuonMvaEstimator_
std::unique_ptr< const pat::CalculatePtRatioRel > calculatePtRatioRel_

Member Function Documentation

◆ calculatePtRatioRel()

pat::CalculatePtRatioRel const& pat::PATMuonHeavyObjectCache::calculatePtRatioRel ( ) const
inline

Definition at line 63 of file PATMuonProducer.cc.

References calculatePtRatioRel_.

63 { return *calculatePtRatioRel_; }
std::unique_ptr< const pat::CalculatePtRatioRel > calculatePtRatioRel_

◆ muonMvaIDEstimator()

pat::MuonMvaIDEstimator const& pat::PATMuonHeavyObjectCache::muonMvaIDEstimator ( ) const
inline

Definition at line 64 of file PATMuonProducer.cc.

References muonMvaIDEstimator_.

64 { return *muonMvaIDEstimator_; }
std::unique_ptr< const pat::MuonMvaIDEstimator > muonMvaIDEstimator_

◆ softMuonMvaEstimator()

pat::SoftMuonMvaEstimator const& pat::PATMuonHeavyObjectCache::softMuonMvaEstimator ( ) const
inline

Definition at line 65 of file PATMuonProducer.cc.

References softMuonMvaEstimator_.

65 { return *softMuonMvaEstimator_; }
std::unique_ptr< const pat::SoftMuonMvaEstimator > softMuonMvaEstimator_

Member Data Documentation

◆ calculatePtRatioRel_

std::unique_ptr<const pat::CalculatePtRatioRel> pat::PATMuonHeavyObjectCache::calculatePtRatioRel_
private

Definition at line 68 of file PATMuonProducer.cc.

Referenced by calculatePtRatioRel().

◆ muonMvaIDEstimator_

std::unique_ptr<const pat::MuonMvaIDEstimator> pat::PATMuonHeavyObjectCache::muonMvaIDEstimator_
private

Definition at line 69 of file PATMuonProducer.cc.

Referenced by muonMvaIDEstimator().

◆ softMuonMvaEstimator_

std::unique_ptr<const pat::SoftMuonMvaEstimator> pat::PATMuonHeavyObjectCache::softMuonMvaEstimator_
private

Definition at line 70 of file PATMuonProducer.cc.

Referenced by softMuonMvaEstimator().