CMS 3D CMS Logo

CSCDigiToRawAccept.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCDigiToRawAccept_h
2 #define EventFilter_CSCRawToDigi_CSCDigiToRawAccept_h
3 
15 
16 namespace CSCDigiToRawAccept {
17 
18  // takes layer ID, converts to chamber ID, switching ME1A to ME11
19  CSCDetId chamberID(const CSCDetId& cscDetId);
20 
21  /* Was there a trigger primitive in the BX range between bxMin and bxMax?
22  The nominalBX argument is 3 for ALCTs and 7 for CLCTs. This is subtracted
23  from the object BX before we check if it is in the BX range.
24 
25  Triggers in ME1/1 should always be assigned with ring number equal to 1.
26  Distinguishing CLCTs in ME1/a and ME1/b is done with the CLCT half-strip,
27  or CLCT CFEB.
28  */
29  template <typename LCTCollection>
30  bool accept(const CSCDetId& cscId, const LCTCollection& lcts, int bxMin, int bxMax, int nominalBX) {
31  if (bxMin == -999)
32  return true;
33  CSCDetId chamberId = chamberID(cscId);
34  typename LCTCollection::Range lctRange = lcts.get(chamberId);
35  bool result = false;
36  for (typename LCTCollection::const_iterator lctItr = lctRange.first; lctItr != lctRange.second; ++lctItr) {
37  int bx = lctItr->getBX() - nominalBX;
38  if (bx >= bxMin && bx <= bxMax) {
39  result = true;
40  break;
41  }
42  }
43  return result;
44  }
45 
46  // older implementation for CLCT pretrigger objects that only have BX information
47  bool accept(const CSCDetId& cscId, const CSCCLCTPreTriggerCollection& lcts, int bxMin, int bxMax, int nominalBX);
48 
49  // newer implementation for CLCT pretrigger objects that have BX and CFEB information
50  bool accept(const CSCDetId& cscId,
52  int bxMin,
53  int bxMax,
54  int nominalBX,
55  std::vector<bool>& preTriggerInCFEB);
56 }; // namespace CSCDigiToRawAccept
57 
58 #endif
bool accept(const CSCDetId &cscId, const LCTCollection &lcts, int bxMin, int bxMax, int nominalBX)
PixelRecoRange< float > Range
CSCDetId chamberID(const CSCDetId &cscDetId)
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...