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 57 of file PATMuonProducer.cc.

Constructor & Destructor Documentation

◆ PATMuonHeavyObjectCache()

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

Definition at line 324 of file PATMuonProducer.cc.

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

324  {
325  if (iConfig.getParameter<bool>("computeMiniIso")) {
326  float mvaDrMax = iConfig.getParameter<double>("mvaDrMax");
327  calculatePtRatioRel_ = std::make_unique<CalculatePtRatioRel>(mvaDrMax * mvaDrMax);
328  }
329 
330  if (iConfig.getParameter<bool>("computeMuonIDMVA")) {
331  edm::FileInPath mvaIDTrainingFile = iConfig.getParameter<edm::FileInPath>("mvaIDTrainingFile");
332  muonMvaIDEstimator_ = std::make_unique<MuonMvaIDEstimator>(mvaIDTrainingFile);
333  }
334 
335  if (iConfig.getParameter<bool>("computeSoftMuonMVA")) {
336  edm::FileInPath softMvaTrainingFile = iConfig.getParameter<edm::FileInPath>("softMvaTrainingFile");
337  softMuonMvaEstimator_ = std::make_unique<SoftMuonMvaEstimator>(softMvaTrainingFile);
338  }
339 }
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 61 of file PATMuonProducer.cc.

References calculatePtRatioRel_.

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

◆ muonMvaIDEstimator()

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

Definition at line 62 of file PATMuonProducer.cc.

References muonMvaIDEstimator_.

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

◆ softMuonMvaEstimator()

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

Definition at line 63 of file PATMuonProducer.cc.

References softMuonMvaEstimator_.

63 { 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 66 of file PATMuonProducer.cc.

Referenced by calculatePtRatioRel().

◆ muonMvaIDEstimator_

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

Definition at line 67 of file PATMuonProducer.cc.

Referenced by muonMvaIDEstimator().

◆ softMuonMvaEstimator_

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

Definition at line 68 of file PATMuonProducer.cc.

Referenced by softMuonMvaEstimator().