Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:15

0001 #include "L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h"
0002 
0003 #include "FWCore/Framework/interface/ESHandle.h"
0004 #include "FWCore/Framework/interface/EventSetup.h"
0005 
0006 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManager.h"
0007 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigManagerRcd.h"
0008 
0009 #include "DataFormats/MuonDetId/interface/DTBtiId.h"
0010 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0011 #include "DataFormats/MuonDetId/interface/DTSectCollId.h"
0012 #include "DataFormats/MuonDetId/interface/DTTracoId.h"
0013 
0014 using std::cout;
0015 using std::endl;
0016 
0017 DTConfigTester::DTConfigTester(const edm::ParameterSet &ps) {
0018   cout << "DTConfigTester::DTConfigTester()" << endl;
0019 
0020   my_wh = ps.getUntrackedParameter<int>("wheel");
0021   my_sec = ps.getUntrackedParameter<int>("sector");
0022   my_st = ps.getUntrackedParameter<int>("station");
0023   my_traco = ps.getUntrackedParameter<int>("traco");
0024   my_bti = ps.getUntrackedParameter<int>("bti");
0025   my_sl = ps.getUntrackedParameter<int>("sl");
0026   my_configToken = esConsumes();
0027 }
0028 
0029 void DTConfigTester::analyze(const edm::Event &e, const edm::EventSetup &es) {
0030   cout << "DTConfigTester::analyze()" << endl;
0031   cout << "\tRun number :" << e.id().run() << endl;
0032   cout << "\tEvent number :" << e.id().event() << endl;
0033 
0034   using namespace edm;
0035 
0036   ESHandle<DTConfigManager> dtConfig = es.getHandle(my_configToken);
0037 
0038   cout << "\tPrint configuration :" << endl;
0039 
0040   DTBtiId btiid(my_wh, my_st, my_sec, my_sl, my_bti);
0041   DTTracoId tracoid(my_wh, my_st, my_sec, my_traco);
0042   DTChamberId chid(my_wh, my_st, my_sec);
0043   DTSectCollId scid(my_wh, my_sec);
0044 
0045   dtConfig->getDTConfigBti(btiid)->print();
0046   dtConfig->getDTConfigTraco(tracoid)->print();
0047   dtConfig->getDTConfigTSTheta(chid)->print();
0048   dtConfig->getDTConfigTSPhi(chid)->print();
0049   dtConfig->getDTConfigTrigUnit(chid)->print();
0050 
0051   if (dtConfig->lutFromDB())
0052     dtConfig->getDTConfigLUTs(chid)->print();
0053   else {
0054     cout << "******************************************************************"
0055             "*************"
0056          << endl;
0057     cout << "*              DTTrigger configuration : LUT parameters from "
0058             "GEOMETRY         *"
0059          << endl;
0060     cout << "******************************************************************"
0061             "*************"
0062          << endl;
0063   }
0064 
0065   dtConfig->getDTConfigSectColl(scid)->print();
0066   dtConfig->getDTConfigPedestals()->print();
0067 
0068   /*
0069      // 100209 SV testing luts for each chamber type: keep in case lut from DB
0070      debug is necessary DTChamberId chid1(-2,3,1); cout << "\n CHAMBER -2 3 1"
0071      << endl; dtConfig->getDTConfigLUTs(chid1)->print();
0072 
0073      DTChamberId chid2(0,2,2);
0074      cout << "\n CHAMBER 0 2 2" << endl;
0075      dtConfig->getDTConfigLUTs(chid2)->print();
0076 
0077      DTChamberId chid3(-2,4,8);
0078      cout << "\n CHAMBER -2 4 8" << endl;
0079      dtConfig->getDTConfigLUTs(chid3)->print();
0080 
0081      DTChamberId chid4(1,4,12);
0082      cout << "\n CHAMBER 1 4 12" << endl;
0083      dtConfig->getDTConfigLUTs(chid4)->print();
0084 
0085      DTChamberId chid5(-2,4,5);
0086      cout << "\n CHAMBER -2 4 5 " << endl;
0087      dtConfig->getDTConfigLUTs(chid5)->print();
0088 
0089      DTChamberId chid6(0,4,2);
0090      cout << "\n CHAMBER 0 4 2" << endl;
0091      dtConfig->getDTConfigLUTs(chid6)->print();
0092 
0093      DTChamberId chid7(-2,4,9);
0094      cout << "\n CHAMBER -2 4 9" << endl;
0095      dtConfig->getDTConfigLUTs(chid7)->print();
0096 
0097      DTChamberId chid8(0,4,11);
0098      cout << "\n CHAMBER 0 4 11" << endl;
0099      dtConfig->getDTConfigLUTs(chid8)->print();
0100 
0101      DTChamberId chid9(-2,1,1);
0102      cout << "\n CHAMBER -2 1 1" << endl;
0103      dtConfig->getDTConfigLUTs(chid9)->print();
0104 
0105      DTChamberId chid10(-2,4,13);
0106      cout << "\n CHAMBER -2 4 13" << endl;
0107      dtConfig->getDTConfigLUTs(chid10)->print();
0108 
0109      DTChamberId chid11(1,4,4);
0110      cout << "\n CHAMBER 1 4 4 " << endl;
0111      dtConfig->getDTConfigLUTs(chid11)->print();
0112 
0113      DTChamberId chid12(-2,4,14);
0114      cout << "\n CHAMBER -2 4 14" << endl;
0115      dtConfig->getDTConfigLUTs(chid12)->print();
0116 
0117      DTChamberId chid13(0,4,10);
0118      cout << "\n CHAMBER 0 4 10" << endl;
0119      dtConfig->getDTConfigLUTs(chid13)->print();
0120 
0121      DTChamberId chid14(-2,4,11);
0122      cout << "\n CHAMBER -2 4 11" << endl;
0123      dtConfig->getDTConfigLUTs(chid14)->print();
0124 
0125      DTChamberId chid15(1,4,9);
0126      cout << "\n CHAMBER 1 4 9" << endl;
0127      dtConfig->getDTConfigLUTs(chid15)->print();
0128 
0129      DTChamberId chid16(0,1,2);
0130      cout << "\n CHAMBER 0 1 2 " << endl;
0131      dtConfig->getDTConfigLUTs(chid16)->print();
0132 
0133      DTChamberId chid17(-2,2,1);
0134      cout << "\n CHAMBER -2 2 1" << endl;
0135      dtConfig->getDTConfigLUTs(chid17)->print();
0136 
0137      DTChamberId chid18(0,3,2);
0138      cout << "\n CHAMBER 0 3 2 " << endl;
0139      dtConfig->getDTConfigLUTs(chid18)->print();
0140 
0141      DTChamberId chid19(-2,4,10);
0142      cout << "\n CHAMBER 0 2 2" << endl;
0143      dtConfig->getDTConfigLUTs(chid19)->print();
0144 
0145      DTChamberId chid20(0,4,14);
0146      cout << "\n CHAMBER 0 4 14" << endl;
0147      dtConfig->getDTConfigLUTs(chid20)->print();
0148 
0149      DTChamberId chid21(-2,4,12);
0150      cout << "\n CHAMBER -2 4 12" << endl;
0151      dtConfig->getDTConfigLUTs(chid21)->print();
0152 
0153      DTChamberId chid22(1,4,8);
0154      cout << "\n CHAMBER 1 4 8" << endl;
0155      dtConfig->getDTConfigLUTs(chid22)->print();
0156 
0157      DTChamberId chid23(-2,4,1);
0158      cout << "\n CHAMBER -2 4 1" << endl;
0159      dtConfig->getDTConfigLUTs(chid23)->print();
0160 
0161      DTChamberId chid24(0,4,6);
0162      cout << "\n CHAMBER 0 4 6" << endl;
0163      dtConfig->getDTConfigLUTs(chid24)->print();
0164 
0165      DTChamberId chid25(-2,4,4);
0166      cout << "\n CHAMBER -2 4 4" << endl;
0167      dtConfig->getDTConfigLUTs(chid25)->print();
0168 
0169      DTChamberId chid26(1,4,13);
0170      cout << "\n CHAMBER 1 4 13 " << endl;
0171      dtConfig->getDTConfigLUTs(chid26)->print();
0172 
0173   */
0174   return;
0175 }