CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceEmScale(const L1EmEtScaleRcd& iRecord)
55 {
56  using namespace edm::es;
57 
58  std::auto_ptr<L1CaloEtScale> emScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_emEtScaleInputLsb, m_emEtThresholds) );
59 
60  return emScale ;
61 }
62 
63 std::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceJetScale(const L1JetEtScaleRcd& iRecord)
64 {
65  using namespace edm::es;
66 
67  std::auto_ptr<L1CaloEtScale> jetEtScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_jetEtScaleInputLsb, m_jetEtThresholds) );
68 
69  return jetEtScale ;
70 }
71 
72 
73 std::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceHtMissScale(const L1HtMissScaleRcd& iRecord)
74 {
75  using namespace edm::es;
76 
77  std::auto_ptr<L1CaloEtScale> htMissScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(0, 0x7f, m_jetEtScaleInputLsb, m_htMissThresholds) );
78 
79  return htMissScale ;
80 }
81 
82 
83 std::auto_ptr<L1CaloEtScale> L1ScalesTrivialProducer::produceHfRingScale(const L1HfRingEtScaleRcd& iRecord)
84 {
85  using namespace edm::es;
86 
87  std::auto_ptr<L1CaloEtScale> hfRingEtScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(0xff, 0x7, m_jetEtScaleInputLsb, m_hfRingThresholds) );
88 
89  return hfRingEtScale ;
90 }
91 
92 
T getParameter(std::string const &) const
std::vector< double > m_hfRingThresholds
std::vector< double > m_emEtThresholds
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::auto_ptr< L1CaloEtScale > produceJetScale(const L1JetEtScaleRcd &)
L1ScalesTrivialProducer(const edm::ParameterSet &)
std::vector< double > m_jetEtThresholds
std::auto_ptr< L1CaloEtScale > produceEmScale(const L1EmEtScaleRcd &)
std::auto_ptr< L1CaloEtScale > produceHtMissScale(const L1HtMissScaleRcd &)
std::vector< double > m_htMissThresholds
std::auto_ptr< L1CaloEtScale > produceHfRingScale(const L1HfRingEtScaleRcd &)