CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected 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 &, edm::ConsumesCollector iC)
 
 JetCorrectorImplMakerBase (const JetCorrectorImplMakerBase &)=delete
 
const JetCorrectorImplMakerBaseoperator= (const JetCorrectorImplMakerBase &)=delete
 
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 Attributes

edm::ESGetToken< JetCorrectorParametersCollection, JetCorrectionsRecordalgoToken_
 
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 35 of file JetCorrectorImplMakerBase.h.

Constructor & Destructor Documentation

◆ JetCorrectorImplMakerBase() [1/2]

JetCorrectorImplMakerBase::JetCorrectorImplMakerBase ( edm::ParameterSet const &  iPSet,
edm::ConsumesCollector  iC 
)

Definition at line 37 of file JetCorrectorImplMakerBase.cc.

38  : level_(iPSet.getParameter<std::string>("level")),
39  algoToken_(iC.esConsumes(edm::ESInputTag("", iPSet.getParameter<std::string>("algorithm")))),
40  cacheId_(0) {}
edm::ESGetToken< JetCorrectorParametersCollection, JetCorrectionsRecord > algoToken_

◆ JetCorrectorImplMakerBase() [2/2]

JetCorrectorImplMakerBase::JetCorrectorImplMakerBase ( const JetCorrectorImplMakerBase )
delete

◆ ~JetCorrectorImplMakerBase()

JetCorrectorImplMakerBase::~JetCorrectorImplMakerBase ( )
virtual

Definition at line 47 of file JetCorrectorImplMakerBase.cc.

47 {}

Member Function Documentation

◆ addToDescription()

void JetCorrectorImplMakerBase::addToDescription ( edm::ParameterSetDescription iDescription)
static

◆ getCalculator()

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

Definition at line 53 of file JetCorrectorImplMakerBase.cc.

References algoToken_, cacheId_, corrector_, edm::eventsetup::EventSetupRecordImplementation< T >::get(), edm::EventSetup::get(), and level_.

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

54  {
55  auto const& rec = iSetup.get<JetCorrectionsRecord>();
56  if (cacheId_ != rec.cacheIdentifier()) {
57  auto const& JetCorParColl = rec.get(algoToken_);
58  auto const& parameters = JetCorParColl[level_];
59 
60  iLevelCheck(parameters.definitions().level());
61  std::vector<JetCorrectorParameters> vParam;
62  vParam.push_back(parameters);
63  corrector_ = std::make_shared<FactorizedJetCorrectorCalculator>(vParam);
64 
65  cacheId_ = rec.cacheIdentifier();
66  }
67  return corrector_;
68 }
std::shared_ptr< FactorizedJetCorrectorCalculator const > corrector_
edm::ESGetToken< JetCorrectorParametersCollection, JetCorrectionsRecord > algoToken_
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const

◆ operator=()

const JetCorrectorImplMakerBase& JetCorrectorImplMakerBase::operator= ( const JetCorrectorImplMakerBase )
delete

Member Data Documentation

◆ algoToken_

edm::ESGetToken<JetCorrectorParametersCollection, JetCorrectionsRecord> JetCorrectorImplMakerBase::algoToken_
private

Definition at line 56 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().

◆ cacheId_

unsigned long long JetCorrectorImplMakerBase::cacheId_
private

Definition at line 58 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().

◆ corrector_

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

Definition at line 57 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().

◆ level_

std::string JetCorrectorImplMakerBase::level_
private

Definition at line 55 of file JetCorrectorImplMakerBase.h.

Referenced by getCalculator().