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 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
std::vector< double > m_hfRingThresholds
std::vector< double > m_emEtThresholds
std::unique_ptr< L1CaloEtScale > produceEmScale(const L1EmEtScaleRcd &)
std::unique_ptr< L1CaloEtScale > produceJetScale(const L1JetEtScaleRcd &)
L1ScalesTrivialProducer(const edm::ParameterSet &)
std::vector< double > m_jetEtThresholds
std::unique_ptr< L1CaloEtScale > produceHtMissScale(const L1HtMissScaleRcd &)
std::vector< double > m_htMissThresholds
std::unique_ptr< L1CaloEtScale > produceHfRingScale(const L1HfRingEtScaleRcd &)