File indexing completed on 2024-04-06 12:20:29
0001 #include "L1Trigger/L1TGEM/interface/ME0Motherboard.h"
0002 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0003 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0004 #include "Geometry/GEMGeometry/interface/ME0Geometry.h"
0005
0006 ME0Motherboard::ME0Motherboard(unsigned endcap, unsigned chamber, const edm::ParameterSet& conf)
0007 : theEndcap(endcap), theChamber(chamber) {
0008 edm::ParameterSet tmbParams = conf.getParameter<edm::ParameterSet>("tmbParam");
0009 infoV = tmbParams.getParameter<int>("verbosity");
0010 }
0011
0012 ME0Motherboard::ME0Motherboard() : theEndcap(1), theChamber(1) { infoV = 2; }
0013
0014 ME0Motherboard::~ME0Motherboard() {}
0015
0016 void ME0Motherboard::clear() {
0017 for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
0018 for (int i = 0; i < MAX_TRIGGERS; i++) {
0019 Triggers[bx][i].clear();
0020 }
0021 }
0022 }
0023
0024 void ME0Motherboard::run(const ME0PadDigiCollection*) { clear(); }
0025
0026
0027
0028
0029 std::vector<ME0TriggerDigi> ME0Motherboard::readoutTriggers() {
0030 std::vector<ME0TriggerDigi> tmpV;
0031
0032 std::vector<ME0TriggerDigi> all_trigs = getTriggers();
0033 tmpV.reserve(all_trigs.size());
0034 for (const auto& ptrig : all_trigs) {
0035
0036 tmpV.push_back(ptrig);
0037 }
0038 return tmpV;
0039 }
0040
0041
0042 std::vector<ME0TriggerDigi> ME0Motherboard::getTriggers() {
0043 std::vector<ME0TriggerDigi> tmpV;
0044
0045 for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
0046 for (int i = 0; i < MAX_TRIGGERS; i++) {
0047 tmpV.push_back(Triggers[bx][i]);
0048 }
0049 }
0050 return tmpV;
0051 }
0052
0053
0054 bool ME0Motherboard::sortByQuality(const ME0TriggerDigi& trig1, const ME0TriggerDigi& trig2) {
0055 return trig1.getQuality() > trig2.getQuality();
0056 }
0057
0058
0059 bool ME0Motherboard::sortByME0Dphi(const ME0TriggerDigi& trig1, const ME0TriggerDigi& trig2) {
0060
0061
0062
0063 return true;
0064 }