CMS 3D CMS Logo

Public Member Functions

L1ScalesTester Class Reference

#include <L1TriggerConfig/L1ScalesProducer/interface/L1ScalesTester.h>

Inheritance diagram for L1ScalesTester:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 L1ScalesTester (const edm::ParameterSet &)
 ~L1ScalesTester ()

Detailed Description

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

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

Definition at line 31 of file L1ScalesTester.h.


Constructor & Destructor Documentation

L1ScalesTester::L1ScalesTester ( const edm::ParameterSet ps) [explicit]

Definition at line 18 of file L1ScalesTester.cc.

References gather_cfg::cout.

                                                        {
  cout << "Constructing a L1ScalesTester" << endl;
}
L1ScalesTester::~L1ScalesTester ( )

Definition at line 22 of file L1ScalesTester.cc.

                                {

}

Member Function Documentation

void L1ScalesTester::analyze ( const edm::Event e,
const edm::EventSetup es 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 26 of file L1ScalesTester.cc.

References gather_cfg::cout, edm::EventSetup::get(), and i.

                                                                       {
   using namespace edm;

   ESHandle< L1CaloEtScale > emScale ;
   es.get< L1EmEtScaleRcd >().get( emScale ) ;

   cout << "L1EmEtScaleRcd :" << endl;
   emScale->print(cout);
   cout << endl;

   ESHandle< L1CaloEcalScale > ecalScale;
   es.get< L1CaloEcalScaleRcd >().get(ecalScale);

   ESHandle< L1CaloHcalScale > hcalScale;
   es.get< L1CaloHcalScaleRcd >().get(hcalScale);
   
   cout << " L1ColoEcalScale  :" << endl;
   ecalScale->print(cout);
   cout << endl;

 cout << " L1ColoHcalScale  :" << endl;
   hcalScale->print(cout);
   cout << endl;
   
   ESHandle< L1CaloEtScale > jetScale ;
   es.get< L1JetEtScaleRcd >().get( jetScale ) ;

   cout << "L1JetEtScaleRcd :" << endl;
   jetScale->print(cout);
   cout << endl;
   
   // test EM lin-rank conversion
   cout << "Testing EM linear-to-rank conversion" << endl;
   for (unsigned short i=0; i<32; i++) {
     unsigned rank = emScale->rank(i);
     cout << "EM linear : " << i << ", Et : " << i*emScale->linearLsb() << " GeV, rank : " << rank << endl;
   }
   cout << endl;
   
   // test jet lin-rank conversion
   cout << "Testing jet linear-to-rank conversion" << endl;
   for (unsigned short i=0; i<32; i++) {
     unsigned rank = jetScale->rank(i);
     cout << "jet linear : " << i << ", Et : " << i*jetScale->linearLsb() << " GeV, rank : " << rank << endl;
   }
   cout << endl;
   
   // test EM rank-et conversion
   cout << "Testing EM rank-to-Et conversion" << endl;
   for (unsigned i=0; i<32; i++) {
     double et = emScale->et(i);
     cout << "EM rank : " << i << " Et : " << et << " GeV" << endl;
   }
   cout << endl;
   
   // test jet rank-et conversion
   cout << "Testing jet rank-to-Et conversion" << endl;
   for (unsigned i=0; i<32; i++) {
     double et = jetScale->et(i);
     cout << "jet rank : " << i << " Et : " << et << " GeV" << endl;
   }
   cout << endl;


}