CMS 3D CMS Logo

ME0TriggerBuilder.cc
Go to the documentation of this file.
2 
4  config_ = conf;
5 
6  for (int endc = 0; endc < MAX_ENDCAPS; endc++) {
7  for (int cham = 0; cham < MAX_CHAMBERS; cham++) {
8  tmb_[endc][cham].reset(new ME0Motherboard(endc, cham, config_));
9  }
10  }
11 }
12 
14 
16  for (int endc = 0; endc < 2; endc++) {
18  ME0Motherboard* tmb = tmb_[endc][cham].get();
19  tmb->setME0Geometry(me0_g);
20 
21  // 0th layer means whole chamber.
22  const int region(endc == 0 ? -1 : 1);
23  ME0DetId detid(region, 0, cham + 1, 0);
24 
25  // Run processors only if chamber exists in geometry.
26  if (tmb == nullptr || me0_g->chamber(detid) == nullptr)
27  continue;
28 
29  tmb->run(me0Pads);
30 
31  const std::vector<ME0TriggerDigi>& trigV = tmb->readoutTriggers();
32 
33  if (!trigV.empty()) {
34  LogTrace("L1ME0Trigger") << "ME0TriggerBuilder got results in " << detid << std::endl
35  << "Put " << trigV.size() << " Trigger digi" << ((trigV.size() > 1) ? "s " : " ")
36  << "in collection\n";
37  oc_trig.put(std::make_pair(trigV.begin(), trigV.end()), detid);
38  }
39  }
40  }
41 }
ME0Motherboard::readoutTriggers
std::vector< ME0TriggerDigi > readoutTriggers()
Definition: ME0Motherboard.cc:29
ME0PadDigiCollection
relativeConstraints.cham
cham
Definition: relativeConstraints.py:69
ME0TriggerBuilder::~ME0TriggerBuilder
~ME0TriggerBuilder()
Definition: ME0TriggerBuilder.cc:13
ME0DetId::maxChamberId
static const int maxChamberId
Definition: ME0DetId.h:67
ME0Geometry::chamber
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:43
ME0TriggerBuilder::config_
edm::ParameterSet config_
Definition: ME0TriggerBuilder.h:49
ME0DetId::minChamberId
static const int minChamberId
Definition: ME0DetId.h:66
ME0TriggerBuilder::ME0TriggerBuilder
ME0TriggerBuilder(const edm::ParameterSet &)
Definition: ME0TriggerBuilder.cc:3
ME0TriggerBuilder.h
ME0Motherboard::run
void run(const ME0PadDigiCollection *)
Definition: ME0Motherboard.cc:24
edm::ParameterSet
Definition: ParameterSet.h:36
ME0TriggerBuilder::MAX_CHAMBERS
Definition: ME0TriggerBuilder.h:39
ME0DetId
Definition: ME0DetId.h:16
ME0Motherboard::setME0Geometry
void setME0Geometry(const ME0Geometry *g)
Definition: ME0Motherboard.h:30
ME0TriggerDigiCollection
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
ME0TriggerBuilder::MAX_ENDCAPS
Definition: ME0TriggerBuilder.h:39
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
ME0TriggerBuilder::build
void build(const ME0PadDigiCollection *me0Pads, ME0TriggerDigiCollection &oc_trig)
Definition: ME0TriggerBuilder.cc:15
ME0TriggerBuilder::me0_g
const ME0Geometry * me0_g
Definition: ME0TriggerBuilder.h:47
ME0TriggerBuilder::tmb_
std::unique_ptr< ME0Motherboard > tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
Definition: ME0TriggerBuilder.h:52
ME0Motherboard
Definition: ME0Motherboard.h:18