CMS 3D CMS Logo

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

#include <PATMuonProducer.h>

Public Member Functions

std::unique_ptr< const pat::MuonMvaEstimator > const & muonMvaEstimator () const
 
 PATMuonHeavyObjectCache (const edm::ParameterSet &)
 
std::unique_ptr< const pat::SoftMuonMvaEstimator > const & softMuonMvaEstimator () const
 

Private Attributes

std::unique_ptr< const pat::MuonMvaEstimatormuonMvaEstimator_
 
std::unique_ptr< const pat::SoftMuonMvaEstimatorsoftMuonMvaEstimator_
 

Detailed Description

Definition at line 43 of file PATMuonProducer.h.

Constructor & Destructor Documentation

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

Definition at line 61 of file PATMuonProducer.cc.

References edm::ParameterSet::getParameter(), muonProducer_cfi::mvaDrMax, muonProducer_cfi::mvaTrainingFile, muonProducer_cfi::softMvaTrainingFile, and AlCaHLTBitMon_QueryRunRegistry::string.

61  {
62 
63  if (iConfig.getParameter<bool>("computeMuonMVA")) {
64  std::string mvaTrainingFile = iConfig.getParameter<std::string>("mvaTrainingFile");
65  // xml training file
66  edm::FileInPath fip(mvaTrainingFile);
67  float mvaDrMax = iConfig.getParameter<double>("mvaDrMax");
68  muonMvaEstimator_ = std::make_unique<MuonMvaEstimator>(fip.fullPath(), mvaDrMax);
69  }
70 
71  if (iConfig.getParameter<bool>("computeSoftMuonMVA")) {
72  std::string softMvaTrainingFile = iConfig.getParameter<std::string>("softMvaTrainingFile");
73  // xml soft mva training file
74  edm::FileInPath softfip(softMvaTrainingFile);
75  softMuonMvaEstimator_ = std::make_unique<SoftMuonMvaEstimator>(softfip.fullPath());
76  }
77 }
T getParameter(std::string const &) const
std::unique_ptr< const pat::MuonMvaEstimator > muonMvaEstimator_
std::unique_ptr< const pat::SoftMuonMvaEstimator > softMuonMvaEstimator_

Member Function Documentation

std::unique_ptr<const pat::MuonMvaEstimator> const& pat::PATMuonHeavyObjectCache::muonMvaEstimator ( ) const
inline

Definition at line 48 of file PATMuonProducer.h.

References muonMvaEstimator_.

48  {
49  return muonMvaEstimator_;
50  }
std::unique_ptr< const pat::MuonMvaEstimator > muonMvaEstimator_
std::unique_ptr<const pat::SoftMuonMvaEstimator> const& pat::PATMuonHeavyObjectCache::softMuonMvaEstimator ( ) const
inline

Definition at line 52 of file PATMuonProducer.h.

References softMuonMvaEstimator_.

52  {
53  return softMuonMvaEstimator_;
54  }
std::unique_ptr< const pat::SoftMuonMvaEstimator > softMuonMvaEstimator_

Member Data Documentation

std::unique_ptr<const pat::MuonMvaEstimator> pat::PATMuonHeavyObjectCache::muonMvaEstimator_
private

Definition at line 57 of file PATMuonProducer.h.

Referenced by muonMvaEstimator().

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

Definition at line 58 of file PATMuonProducer.h.

Referenced by softMuonMvaEstimator().