![]() |
![]() |
#include <L1TriggerConfig/RCTConfigProducers/src/L1CaloInputScalesProducer.cc>
Public Member Functions | |
L1CaloInputScalesProducer (const edm::ParameterSet &) | |
boost::shared_ptr < L1CaloEcalScale > | produceEcalScale (const L1CaloEcalScaleRcd &) |
boost::shared_ptr < L1CaloHcalScale > | produceHcalScale (const L1CaloHcalScaleRcd &) |
~L1CaloInputScalesProducer () | |
Private Attributes | |
std::vector< double > | m_ecalEtThresholdsNegEta |
std::vector< double > | m_ecalEtThresholdsPosEta |
std::vector< double > | m_hcalEtThresholds |
Usage: <usage>
Implementation: <Notes on="" implementation>="">
Definition at line 38 of file L1CaloInputScalesProducer.h.
L1CaloInputScalesProducer::L1CaloInputScalesProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 41 of file L1CaloInputScalesProducer.cc.
References edm::ParameterSet::getParameter(), m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, m_hcalEtThresholds, produceEcalScale(), produceHcalScale(), and edm::ESProducer::setWhatProduced().
00042 { 00043 //the following line is needed to tell the framework what 00044 // data is being produced 00045 setWhatProduced(this, &L1CaloInputScalesProducer::produceEcalScale); 00046 setWhatProduced(this, &L1CaloInputScalesProducer::produceHcalScale); 00047 00048 //now do what ever other initialization is needed 00049 00050 // { Et for each rank, eta bin 0 }, { Et for each rank, eta bin 1 }, ... 00051 m_ecalEtThresholdsPosEta = 00052 iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsPositiveEta"); 00053 m_ecalEtThresholdsNegEta = 00054 iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsNegativeEta"); 00055 m_hcalEtThresholds = 00056 iConfig.getParameter< std::vector<double> >("L1HcalEtThresholds"); 00057 }
L1CaloInputScalesProducer::~L1CaloInputScalesProducer | ( | ) |
Definition at line 60 of file L1CaloInputScalesProducer.cc.
00061 { 00062 00063 // do anything here that needs to be done at desctruction time 00064 // (e.g. close files, deallocate resources etc.) 00065 00066 }
boost::shared_ptr< L1CaloEcalScale > L1CaloInputScalesProducer::produceEcalScale | ( | const L1CaloEcalScaleRcd & | iRecord | ) |
Definition at line 75 of file L1CaloInputScalesProducer.cc.
References m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, L1CaloEcalScale::nBinEta, and L1CaloEcalScale::nBinRank.
Referenced by L1CaloInputScalesProducer().
00076 { 00077 using namespace edm::es; 00078 boost::shared_ptr<L1CaloEcalScale> pL1CaloEcalScale = 00079 boost::shared_ptr<L1CaloEcalScale>( new L1CaloEcalScale ) ; 00080 00081 std::vector< double >::const_iterator posItr = 00082 m_ecalEtThresholdsPosEta.begin() ; 00083 std::vector< double >::const_iterator negItr = 00084 m_ecalEtThresholdsNegEta.begin() ; 00085 00086 for( unsigned short ieta = 1 ; 00087 ieta <= L1CaloEcalScale::nBinEta ; 00088 ++ieta ) 00089 { 00090 for( unsigned short irank = 0 ; 00091 irank < L1CaloEcalScale::nBinRank; 00092 ++irank ) 00093 { 00094 pL1CaloEcalScale->setBin( irank, ieta, 1, *posItr ) ; 00095 pL1CaloEcalScale->setBin( irank, ieta, -1, *negItr ) ; 00096 00097 ++posItr ; 00098 ++negItr ; 00099 } 00100 } 00101 00102 return pL1CaloEcalScale ; 00103 }
boost::shared_ptr< L1CaloHcalScale > L1CaloInputScalesProducer::produceHcalScale | ( | const L1CaloHcalScaleRcd & | iRecord | ) |
Definition at line 107 of file L1CaloInputScalesProducer.cc.
References m_hcalEtThresholds, L1CaloHcalScale::nBinEta, and L1CaloHcalScale::nBinRank.
Referenced by L1CaloInputScalesProducer().
00108 { 00109 using namespace edm::es; 00110 boost::shared_ptr<L1CaloHcalScale> pL1CaloHcalScale = 00111 boost::shared_ptr<L1CaloHcalScale>( new L1CaloHcalScale ) ; 00112 00113 std::vector< double >::const_iterator itr = 00114 m_hcalEtThresholds.begin() ; 00115 00116 for( unsigned short ieta = 1 ; 00117 ieta <= L1CaloHcalScale::nBinEta ; 00118 ++ieta ) 00119 { 00120 for( unsigned short irank = 0 ; 00121 irank < L1CaloHcalScale::nBinRank; 00122 ++irank ) 00123 { 00124 pL1CaloHcalScale->setBin( irank, ieta, 1, *itr ) ; 00125 pL1CaloHcalScale->setBin( irank, ieta, -1, *itr ) ; 00126 00127 ++itr ; 00128 } 00129 } 00130 00131 return pL1CaloHcalScale ; 00132 }
std::vector<double> L1CaloInputScalesProducer::m_ecalEtThresholdsNegEta [private] |
Definition at line 52 of file L1CaloInputScalesProducer.h.
Referenced by L1CaloInputScalesProducer(), and produceEcalScale().
std::vector<double> L1CaloInputScalesProducer::m_ecalEtThresholdsPosEta [private] |
Definition at line 51 of file L1CaloInputScalesProducer.h.
Referenced by L1CaloInputScalesProducer(), and produceEcalScale().
std::vector<double> L1CaloInputScalesProducer::m_hcalEtThresholds [private] |
Definition at line 53 of file L1CaloInputScalesProducer.h.
Referenced by L1CaloInputScalesProducer(), and produceHcalScale().