00001 //------------------------------------------------- 00002 // 00003 // Class: DTConfigSectColl 00004 // 00005 // Description: Configurable parameters and constants 00006 // for Level1 Mu DT Trigger - Sector Collector chip 00007 // 00008 // 00009 // Author List: 00010 // C. Battilana 00011 // 00012 //----------------------------------------------------------------------- 00013 00014 //----------------------- 00015 // This Class's Header -- 00016 //----------------------- 00017 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h" 00018 00019 //--------------- 00020 // C++ Headers -- 00021 //--------------- 00022 00023 //------------------------------- 00024 // Collaborating Class Headers -- 00025 //------------------------------- 00026 00027 //---------------- 00028 // Constructors -- 00029 //---------------- 00030 DTConfigSectColl::DTConfigSectColl(const edm::ParameterSet& ps) { 00031 00032 setDefaults(ps); 00033 if(debug()) print(); 00034 00035 } 00036 00037 //-------------- 00038 // Destructor -- 00039 //-------------- 00040 DTConfigSectColl::~DTConfigSectColl() {} 00041 00042 //-------------- 00043 // Operations -- 00044 //-------------- 00045 00046 void 00047 DTConfigSectColl::setDefaults(const edm::ParameterSet& ps) { 00048 00049 // Debug flag 00050 m_debug = ps.getUntrackedParameter<bool>("Debug"); 00051 00052 // Enabling Carry in Sector Collector for MB1 (1 means enabled, 0 disabled) 00053 m_scecf[0] = ps.getParameter<bool>("SCECF1"); 00054 00055 // Enabling Carry in Sector Collector for MB2 (1 means enabled, 0 disabled) 00056 m_scecf[1] = ps.getParameter<bool>("SCECF2"); 00057 00058 // Enabling Carry in Sector Collector for MB3 (1 means enabled, 0 disabled) 00059 m_scecf[2] = ps.getParameter<bool>("SCECF3"); 00060 00061 // Enabling Carry in Sector Collector for MB4 (1 means enabled, 0 disabled) 00062 m_scecf[3] = ps.getParameter<bool>("SCECF4"); 00063 00064 // Progammable Coars Sync parameter in Sector Collector for MB1 (possible values [0-7]) 00065 int mycsp = ps.getParameter<int>("SCCSP1"); 00066 if (mycsp<0 || mycsp>7){ 00067 std::cout << "DTConfigSectColl::setDefaults: wrong SCCSP1 value! Using Default" << std::endl; 00068 mycsp = default_csp; 00069 } 00070 m_sccsp[0] = mycsp; 00071 00072 // Progammable Coars Sync parameter in Sector Collector for MB2 (possible values [0-7]) 00073 mycsp = ps.getParameter<int>("SCCSP2"); 00074 if (mycsp<0 || mycsp>7){ 00075 std::cout << "DTConfigSectColl::setDefaults: wrong SCCSP2 value! Using Default" << std::endl; 00076 mycsp = default_csp; 00077 } 00078 m_sccsp[1] = mycsp; 00079 00080 // Progammable Coars Sync parameter in Sector Collector for MB3 (possible values [0-7]) 00081 mycsp = ps.getParameter<int>("SCCSP3"); 00082 if (mycsp<0 || mycsp>7){ 00083 std::cout << "DTConfigSectColl::setDefaults: wrong SCCSP3 value! Using Default" << std::endl; 00084 mycsp = default_csp; 00085 } 00086 m_sccsp[2] = mycsp; 00087 00088 // Progammable Coars Sync parameter in Sector Collector for firts MB4 station (possible values [0-7]) 00089 mycsp = ps.getParameter<int>("SCCSP4"); 00090 if (mycsp<0 || mycsp>7){ 00091 std::cout << "DTConfigSectColl::setDefaults: wrong SCCSP4 value! Using Default" << std::endl; 00092 mycsp = default_csp; 00093 } 00094 m_sccsp[3] = mycsp; 00095 00096 // Progammable Coars Sync parameter in Sector Collector for second MB4 station (sectors 4 & 10) (possible values [0-7]) 00097 mycsp = ps.getParameter<int>("SCCSP5"); 00098 if (mycsp<0 || mycsp>7){ 00099 std::cout << "DTConfigSectColl::setDefaults: wrong SCCSP5 value! Using Default" << std::endl; 00100 mycsp = default_csp; 00101 } 00102 m_sccsp[4] = mycsp; 00103 } 00104 00105 void 00106 DTConfigSectColl::print() const { 00107 00108 std::cout << "******************************************************************************" << std::endl; 00109 std::cout << "* DTTrigger configuration : SectorCollector chips *" << std::endl; 00110 std::cout << "******************************************************************************" << std::endl << std::endl; 00111 std::cout << "Debug flag : " << debug() << std::endl; 00112 std::cout << "SCECF1 :" << SCGetCarryFlag(1) << std::endl; 00113 std::cout << "SCECF2 :" << SCGetCarryFlag(2) << std::endl; 00114 std::cout << "SCECF3 :" << SCGetCarryFlag(3) << std::endl; 00115 std::cout << "SCECF4 :" << SCGetCarryFlag(4) << std::endl; 00116 std::cout << "SCCSP1 :" << CoarseSync(1) << std::endl; 00117 std::cout << "SCCSP2 :" << CoarseSync(2) << std::endl; 00118 std::cout << "SCCSP3 :" << CoarseSync(3) << std::endl; 00119 std::cout << "SCCSP4 :" << CoarseSync(4) << std::endl; 00120 std::cout << "SCCSP5 :" << CoarseSync(5) << std::endl; 00121 std::cout << "******************************************************************************" << std::endl; 00122 00123 } 00124