CMS 3D CMS Logo

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