CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/L1TriggerConfig/L1ScalesProducers/src/L1MuScalesTester.cc

Go to the documentation of this file.
00001 #include "L1TriggerConfig/L1ScalesProducers/interface/L1MuScalesTester.h"
00002 
00003 #include "FWCore/Framework/interface/EventSetup.h"
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 
00006 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
00007 #include "CondFormats/DataRecord/interface/L1MuTriggerScalesRcd.h"
00008 #include "CondFormats/L1TObjects/interface/L1MuTriggerPtScale.h"
00009 #include "CondFormats/DataRecord/interface/L1MuTriggerPtScaleRcd.h"
00010 #include "CondFormats/L1TObjects/interface/L1MuGMTScales.h"
00011 #include "CondFormats/DataRecord/interface/L1MuGMTScalesRcd.h"
00012 
00013 #include <iomanip>
00014 using std::cout;
00015 using std::endl;
00016 
00017 L1MuScalesTester::L1MuScalesTester(const edm::ParameterSet& ps) {
00018 }
00019 
00020 L1MuScalesTester::~L1MuScalesTester() {
00021 }
00022 
00023 void L1MuScalesTester::analyze(const edm::Event& e, const edm::EventSetup& es) {
00024   using namespace edm;
00025 
00026   const char* detnam[]={ "DT", "RPC barrel", "CSC", "RPC forward" };
00027 
00028   ESHandle< L1MuTriggerScales > l1muscales ;
00029   es.get< L1MuTriggerScalesRcd >().get( l1muscales ) ;
00030 
00031   ESHandle< L1MuTriggerPtScale > l1muptscale ;
00032   es.get< L1MuTriggerPtScaleRcd >().get( l1muptscale ) ;
00033 
00034   cout << "**** L1 Mu Pt Scale print *****************************************" << endl;
00035   printScale(l1muptscale->getPtScale());
00036 
00037   cout << "**** L1 Mu Phi Scale print *****************************************" << endl;
00038   printScale(l1muscales->getPhiScale());
00039 
00040   cout << "**** L1 Mu GMT eta Scale print *************************************" << endl;
00041   printScale(l1muscales->getGMTEtaScale());
00042 
00043   for(int i=0; i<4; i++) {
00044 
00045     cout << "**** L1 Mu " << detnam[i] << " eta Scale print **************************************" << endl;
00046     printScale(l1muscales->getRegionalEtaScale(i));
00047 
00048   }
00049 
00050   ESHandle< L1MuGMTScales > l1gmtscales ;
00051   es.get< L1MuGMTScalesRcd >().get( l1gmtscales ) ;
00052 
00053   for(int i=0; i<4; i++) {
00054 
00055     cout << "**** L1 GMT " << detnam[i] << " reduced eta Scale print **************************************" << endl;
00056     printScale(l1gmtscales->getReducedEtaScale(i));
00057 
00058   }
00059 
00060   cout << "**** L1 GMT delta eta Scale print *************************************" << endl;
00061   printScale(l1gmtscales->getDeltaEtaScale(0));
00062 
00063   cout << "**** L1 GMT delta phi Scale print *************************************" << endl;
00064   printScale(l1gmtscales->getDeltaPhiScale());
00065 
00066   for(int i=0; i<4; i++) {
00067 
00068     cout << "**** L1 GMT " << detnam[i] << " overlap eta Scale print **************************************" << endl;
00069     printScale(l1gmtscales->getOvlEtaScale(i));
00070 
00071   }
00072 
00073 //   cout << "**** L1 GMT calo eta Scale print *************************************" << endl;
00074 //   printScale(l1gmtscales->getCaloEtaScale());
00075 
00076 
00077 
00078 }
00079 
00080 void L1MuScalesTester::printScale(const L1MuScale* l1muscale) {
00081 
00082 
00083   cout << l1muscale->print();
00084 
00085 }