CMS 3D CMS Logo

EMTFSubsystemCollector.cc
Go to the documentation of this file.
2 
5 
6 
7 // Specialized for CSC
8 template<>
10  CSCTag tag, // Defined in interface/EMTFSubsystemTag.h, maps to CSCCorrelatedLCTDigi
11  const edm::Event& iEvent,
12  const edm::EDGetToken& token,
14 ) {
16  iEvent.getByToken(token, cscDigis);
17 
18  auto chamber = cscDigis->begin();
19  auto chend = cscDigis->end();
20  for( ; chamber != chend; ++chamber ) {
21  auto digi = (*chamber).second.first;
22  auto dend = (*chamber).second.second;
23  for( ; digi != dend; ++digi ) {
24  // emplace_back does the same thing as push_back: appends to the end of the vector
25  out.emplace_back((*chamber).first,*digi);
26  }
27  }
28  return;
29 }
30 
31 // Specialized for RPC
32 template<>
34  RPCTag tag, // Defined in interface/EMTFSubsystemTag.h, maps to RPCDigi
35  const edm::Event& iEvent,
36  const edm::EDGetToken& token,
38 ) {
40  iEvent.getByToken(token, rpcDigis);
41 
42  auto chamber = rpcDigis->begin();
43  auto chend = rpcDigis->end();
44  for( ; chamber != chend; ++chamber ) {
45  auto digi = (*chamber).second.first;
46  auto dend = (*chamber).second.second;
47  for( ; digi != dend; ++digi ) {
48  if ((*chamber).first.region() != 0) { // 0 is barrel
49  if (!((*chamber).first.station() <= 2 && (*chamber).first.ring() == 3)) { // do not include RE1/3, RE2/3
50  out.emplace_back((*chamber).first,digi->strip(),(*chamber).first.layer(),digi->bx());
51  }
52  }
53  }
54  }
55  return;
56 }
57 
58 // Specialized for GEM
59 template<>
61  GEMTag tag, // Defined in interface/EMTFSubsystemTag.h, maps to GEMPadDigi
62  const edm::Event& iEvent,
63  const edm::EDGetToken& token,
65 ) {
67  iEvent.getByToken(token, gemDigis);
68 
69  auto chamber = gemDigis->begin();
70  auto chend = gemDigis->end();
71  for( ; chamber != chend; ++chamber ) {
72  auto digi = (*chamber).second.first;
73  auto dend = (*chamber).second.second;
74  for( ; digi != dend; ++digi ) {
75  out.emplace_back((*chamber).first,*digi);
76  }
77  }
78  return;
79 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
int iEvent
Definition: GenABIO.cc:230
void extractPrimitives(T tag, const edm::Event &iEvent, const edm::EDGetToken &token, TriggerPrimitiveCollection &out)
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Definition: Common.h:29