CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
JetCorrectorImplMakerBase Class Reference

#include "JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h"

Inheritance diagram for JetCorrectorImplMakerBase:
L1FastjetCorrectorImplMaker L1JPTOffsetCorrectorImplMaker L1OffsetCorrectorImplMaker L6SLBCorrectorImplMaker LXXXCorrectorImplMaker

Public Member Functions

 JetCorrectorImplMakerBase (edm::ParameterSet const &)
 
virtual ~JetCorrectorImplMakerBase ()
 

Static Public Member Functions

static void addToDescription (edm::ParameterSetDescription &iDescription)
 

Protected Member Functions

std::shared_ptr< FactorizedJetCorrectorCalculator const > getCalculator (edm::EventSetup const &, std::function< void(std::string const &)> levelCheck)
 

Private Member Functions

 JetCorrectorImplMakerBase (const JetCorrectorImplMakerBase &)=delete
 
const JetCorrectorImplMakerBaseoperator= (const JetCorrectorImplMakerBase &)=delete
 

Private Attributes

std::string algo_
 
unsigned long long cacheId_
 
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
 
std::string level_
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 36 of file JetCorrectorImplMakerBase.h.

Constructor & Destructor Documentation

JetCorrectorImplMakerBase::JetCorrectorImplMakerBase ( edm::ParameterSet const &  iPSet)

Definition at line 39 of file JetCorrectorImplMakerBase.cc.

39  :
40  level_(iPSet.getParameter<std::string>("level")),
41  algo_(iPSet.getParameter<std::string>("algorithm")),
42  cacheId_(0)
43 {
44 }
JetCorrectorImplMakerBase::~JetCorrectorImplMakerBase ( )
virtual

Definition at line 51 of file JetCorrectorImplMakerBase.cc.

52 {
53 }
JetCorrectorImplMakerBase::JetCorrectorImplMakerBase ( const JetCorrectorImplMakerBase )
privatedelete

Member Function Documentation

void JetCorrectorImplMakerBase::addToDescription ( edm::ParameterSetDescription iDescription)
static
std::shared_ptr< FactorizedJetCorrectorCalculator const > JetCorrectorImplMakerBase::getCalculator ( edm::EventSetup const &  iSetup,
std::function< void(std::string const &)>  levelCheck 
)
protected

Definition at line 60 of file JetCorrectorImplMakerBase.cc.

References algo_, cacheId_, corrector_, edm::EventSetup::get(), and level_.

Referenced by LXXXCorrectorImplMaker::make(), L1FastjetCorrectorImplMaker::make(), L1OffsetCorrectorImplMaker::make(), L1JPTOffsetCorrectorImplMaker::make(), and L6SLBCorrectorImplMaker::make().

60  {
61  auto const& rec = iSetup.get<JetCorrectionsRecord>();
62  if( cacheId_ != rec.cacheIdentifier()) {
64  rec.get(algo_,JetCorParColl);
65  auto const& parameters = ((*JetCorParColl)[level_]);
66 
67  iLevelCheck(parameters.definitions().level());
68  std::vector<JetCorrectorParameters> vParam;
69  vParam.push_back(parameters);
70  corrector_ = std::make_shared<FactorizedJetCorrectorCalculator>(vParam);
71 
72  cacheId_ = rec.cacheIdentifier();
73  }
74  return corrector_;
75 }
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
const JetCorrectorImplMakerBase& JetCorrectorImplMakerBase::operator= ( const JetCorrectorImplMakerBase )
privatedelete

Member Data Documentation

std::string JetCorrectorImplMakerBase::algo_
private

Definition at line 61 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().

unsigned long long JetCorrectorImplMakerBase::cacheId_
private

Definition at line 63 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().

std::shared_ptr<FactorizedJetCorrectorCalculator const> JetCorrectorImplMakerBase::corrector_
private
std::string JetCorrectorImplMakerBase::level_
private

Definition at line 60 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().