CMS 3D CMS Logo

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