CMS 3D CMS Logo

L1ScalesTrivialProducer.cc
Go to the documentation of this file.
2 
3 //
4 // constants, enums and typedefs
5 //
6 
7 //
8 // static data member definitions
9 //
10 
11 //
12 // constructors and destructor
13 //
15  //the following line is needed to tell the framework what
16  // data is being produced
21 
22  //now do what ever other initialization is needed
23 
24  // get numbers from the config file - all units are GeV
25  m_emEtScaleInputLsb = ps.getParameter<double>("L1CaloEmEtScaleLSB");
26  m_emEtThresholds = ps.getParameter<std::vector<double> >("L1CaloEmThresholds");
27 
28  m_jetEtScaleInputLsb = ps.getParameter<double>("L1CaloRegionEtScaleLSB");
29  m_jetEtThresholds = ps.getParameter<std::vector<double> >("L1CaloJetThresholds");
30 
31  m_htMissThresholds = ps.getParameter<std::vector<double> >("L1HtMissThresholds");
32  m_hfRingThresholds = ps.getParameter<std::vector<double> >("L1HfRingThresholds");
33 }
34 
36  // do anything here that needs to be done at destruction time
37  // (e.g. close files, deallocate resources etc.)
38 }
39 
40 //
41 // member functions
42 //
43 
44 // ------------ method called to produce the data ------------
45 std::unique_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceEmScale(const L1EmEtScaleRcd& iRecord) {
46  return std::make_unique<L1CaloEtScale>(m_emEtScaleInputLsb, m_emEtThresholds);
47 }
48 
49 std::unique_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceJetScale(const L1JetEtScaleRcd& iRecord) {
50  return std::make_unique<L1CaloEtScale>(m_jetEtScaleInputLsb, m_jetEtThresholds);
51 }
52 
53 std::unique_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceHtMissScale(const L1HtMissScaleRcd& iRecord) {
54  return std::make_unique<L1CaloEtScale>(0, 0x7f, m_jetEtScaleInputLsb, m_htMissThresholds);
55 }
56 
57 std::unique_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceHfRingScale(const L1HfRingEtScaleRcd& iRecord) {
58  return std::make_unique<L1CaloEtScale>(0xff, 0x7, m_jetEtScaleInputLsb, m_hfRingThresholds);
59 }
L1ScalesTrivialProducer::m_emEtThresholds
std::vector< double > m_emEtThresholds
Definition: L1ScalesTrivialProducer.h:56
L1ScalesTrivialProducer.h
L1ScalesTrivialProducer::produceEmScale
std::unique_ptr< L1CaloEtScale > produceEmScale(const L1EmEtScaleRcd &)
Definition: L1ScalesTrivialProducer.cc:45
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
L1ScalesTrivialProducer::m_hfRingThresholds
std::vector< double > m_hfRingThresholds
Definition: L1ScalesTrivialProducer.h:62
L1ScalesTrivialProducer::~L1ScalesTrivialProducer
~L1ScalesTrivialProducer() override
Definition: L1ScalesTrivialProducer.cc:35
L1ScalesTrivialProducer::m_jetEtThresholds
std::vector< double > m_jetEtThresholds
Definition: L1ScalesTrivialProducer.h:59
L1HfRingEtScaleRcd
Definition: L1HfRingEtScaleRcd.h:30
L1ScalesTrivialProducer::L1ScalesTrivialProducer
L1ScalesTrivialProducer(const edm::ParameterSet &)
Definition: L1ScalesTrivialProducer.cc:14
L1ScalesTrivialProducer::m_jetEtScaleInputLsb
double m_jetEtScaleInputLsb
Definition: L1ScalesTrivialProducer.h:58
L1JetEtScaleRcd
Definition: L1JetEtScaleRcd.h:30
L1ScalesTrivialProducer::produceJetScale
std::unique_ptr< L1CaloEtScale > produceJetScale(const L1JetEtScaleRcd &)
Definition: L1ScalesTrivialProducer.cc:49
L1ScalesTrivialProducer::m_emEtScaleInputLsb
double m_emEtScaleInputLsb
Definition: L1ScalesTrivialProducer.h:55
edm::ParameterSet
Definition: ParameterSet.h:36
L1ScalesTrivialProducer::m_htMissThresholds
std::vector< double > m_htMissThresholds
Definition: L1ScalesTrivialProducer.h:61
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L1HtMissScaleRcd
Definition: L1HtMissScaleRcd.h:30
L1ScalesTrivialProducer::produceHtMissScale
std::unique_ptr< L1CaloEtScale > produceHtMissScale(const L1HtMissScaleRcd &)
Definition: L1ScalesTrivialProducer.cc:53
L1EmEtScaleRcd
Definition: L1EmEtScaleRcd.h:30
L1ScalesTrivialProducer::produceHfRingScale
std::unique_ptr< L1CaloEtScale > produceHfRingScale(const L1HfRingEtScaleRcd &)
Definition: L1ScalesTrivialProducer.cc:57