CMS 3D CMS Logo

ME0Motherboard.cc
Go to the documentation of this file.
5 
7  : theEndcap(endcap), theChamber(chamber) {
8  edm::ParameterSet tmbParams = conf.getParameter<edm::ParameterSet>("tmbParam");
9  infoV = tmbParams.getParameter<int>("verbosity");
10 }
11 
13 
15 
17  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
18  for (int i = 0; i < MAX_TRIGGERS; i++) {
19  Triggers[bx][i].clear();
20  }
21  }
22 }
23 
25 
26 // Returns vector of read-out correlated Triggers, if any. Starts with
27 // the vector of all found Triggers and selects the ones in the read-out
28 // time window.
29 std::vector<ME0TriggerDigi> ME0Motherboard::readoutTriggers() {
30  std::vector<ME0TriggerDigi> tmpV;
31 
32  std::vector<ME0TriggerDigi> all_trigs = getTriggers();
33  for (const auto& ptrig : all_trigs) {
34  // in the future, add a selection on the BX
35  tmpV.push_back(ptrig);
36  }
37  return tmpV;
38 }
39 
40 // Returns vector of all found correlated Triggers, if any.
41 std::vector<ME0TriggerDigi> ME0Motherboard::getTriggers() {
42  std::vector<ME0TriggerDigi> tmpV;
43 
44  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
45  for (int i = 0; i < MAX_TRIGGERS; i++) {
46  tmpV.push_back(Triggers[bx][i]);
47  }
48  }
49  return tmpV;
50 }
51 
52 // compare Triggers by quality
54  return trig1.getQuality() > trig2.getQuality();
55 }
56 
57 // compare Triggers by GEM bending angle
59  // todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
60  // That function will derive the bending angle from the pattern.
61  // The ME0TriggerDigi pattterns are at this point not defined yet.
62  return true;
63 }
T getParameter(std::string const &) const
static bool sortByME0Dphi(const ME0TriggerDigi &, const ME0TriggerDigi &)
static bool sortByQuality(const ME0TriggerDigi &, const ME0TriggerDigi &)
int getQuality() const
return the Quality
std::vector< ME0TriggerDigi > getTriggers()
const unsigned theEndcap
std::vector< ME0TriggerDigi > readoutTriggers()
void clear()
clear this Trigger
const unsigned theChamber
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
void run(const ME0PadDigiCollection *)