CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1CaloInputScalesProducer Class Reference

#include <L1TriggerConfig/RCTConfigProducers/src/L1CaloInputScalesProducer.cc>

Inheritance diagram for L1CaloInputScalesProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

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_hcalEtThresholdsNegEta
std::vector< double > m_hcalEtThresholdsPosEta

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 38 of file L1CaloInputScalesProducer.h.


Constructor & Destructor Documentation

L1CaloInputScalesProducer::L1CaloInputScalesProducer ( const edm::ParameterSet iConfig)

Definition at line 41 of file L1CaloInputScalesProducer.cc.

References edm::ParameterSet::getParameter(), m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, m_hcalEtThresholdsNegEta, m_hcalEtThresholdsPosEta, produceEcalScale(), produceHcalScale(), and edm::ESProducer::setWhatProduced().

{
   //the following line is needed to tell the framework what
   // data is being produced
   setWhatProduced(this, &L1CaloInputScalesProducer::produceEcalScale);
   setWhatProduced(this, &L1CaloInputScalesProducer::produceHcalScale);

   //now do what ever other initialization is needed

   // { Et for each rank, eta bin 0 }, { Et for each rank, eta bin 1 }, ...
   m_ecalEtThresholdsPosEta =
     iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsPositiveEta");
   m_ecalEtThresholdsNegEta =
     iConfig.getParameter< std::vector<double> >("L1EcalEtThresholdsNegativeEta");
   m_hcalEtThresholdsPosEta =
     iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsPositiveEta");
   m_hcalEtThresholdsNegEta =
     iConfig.getParameter< std::vector<double> >("L1HcalEtThresholdsNegativeEta");
}
L1CaloInputScalesProducer::~L1CaloInputScalesProducer ( )

Definition at line 62 of file L1CaloInputScalesProducer.cc.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)

}

Member Function Documentation

boost::shared_ptr< L1CaloEcalScale > L1CaloInputScalesProducer::produceEcalScale ( const L1CaloEcalScaleRcd iRecord)

Definition at line 77 of file L1CaloInputScalesProducer.cc.

References m_ecalEtThresholdsNegEta, m_ecalEtThresholdsPosEta, L1CaloEcalScale::nBinEta, and L1CaloEcalScale::nBinRank.

Referenced by L1CaloInputScalesProducer().

{
   using namespace edm::es;
   boost::shared_ptr<L1CaloEcalScale> pL1CaloEcalScale =
     boost::shared_ptr<L1CaloEcalScale>( new L1CaloEcalScale ) ;

   std::vector< double >::const_iterator posItr =
     m_ecalEtThresholdsPosEta.begin() ;
   std::vector< double >::const_iterator negItr =
     m_ecalEtThresholdsNegEta.begin() ;

   for( unsigned short ieta = 1 ;
        ieta <= L1CaloEcalScale::nBinEta ;
        ++ieta )
     {
       for( unsigned short irank = 0 ;
            irank < L1CaloEcalScale::nBinRank;
            ++irank )
         {
           pL1CaloEcalScale->setBin( irank, ieta, 1, *posItr ) ;
           pL1CaloEcalScale->setBin( irank, ieta, -1, *negItr ) ;

           ++posItr ;
           ++negItr ;
         }
     }

   return pL1CaloEcalScale ;
}
boost::shared_ptr< L1CaloHcalScale > L1CaloInputScalesProducer::produceHcalScale ( const L1CaloHcalScaleRcd iRecord)

Definition at line 109 of file L1CaloInputScalesProducer.cc.

References m_hcalEtThresholdsNegEta, m_hcalEtThresholdsPosEta, L1CaloHcalScale::nBinEta, and L1CaloHcalScale::nBinRank.

Referenced by L1CaloInputScalesProducer().

{
   using namespace edm::es;
   boost::shared_ptr<L1CaloHcalScale> pL1CaloHcalScale =
     boost::shared_ptr<L1CaloHcalScale>( new L1CaloHcalScale ) ;

   std::vector< double >::const_iterator posItr =
     m_hcalEtThresholdsPosEta.begin() ;

   std::vector< double >::const_iterator negItr =
     m_hcalEtThresholdsNegEta.begin() ;


   for( unsigned short ieta = 1 ;
        ieta <= L1CaloHcalScale::nBinEta ;
        ++ieta )
     {
       for( unsigned short irank = 0 ;
            irank < L1CaloHcalScale::nBinRank;
            ++irank )
         {
           pL1CaloHcalScale->setBin( irank, ieta, 1, *posItr ) ;
           pL1CaloHcalScale->setBin( irank, ieta, -1, *negItr ) ;

           ++posItr ;
           ++negItr ;
         }
     }

   return pL1CaloHcalScale ;
}

Member Data Documentation

Definition at line 52 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

Definition at line 51 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceEcalScale().

Definition at line 54 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().

Definition at line 53 of file L1CaloInputScalesProducer.h.

Referenced by L1CaloInputScalesProducer(), and produceHcalScale().