CMS 3D CMS Logo

Functions
cscd2r Namespace Reference

Functions

template<typename LCTCollection >
bool accept (const CSCDetId &cscId, const LCTCollection &lcts, int bxMin, int bxMax, bool me1abCheck=false)
 
template<>
bool accept (const CSCDetId &cscId, const CSCCLCTPreTriggerCollection &lcts, int bxMin, int bxMax, bool me1abCheck)
 
CSCDetId chamberID (const CSCDetId &cscDetId)
 takes layer ID, converts to chamber ID, switching ME1A to ME11 More...
 

Function Documentation

template<typename LCTCollection >
bool cscd2r::accept ( const CSCDetId cscId,
const LCTCollection &  lcts,
int  bxMin,
int  bxMax,
bool  me1abCheck = false 
)

Definition at line 38 of file CSCDigiToRaw.cc.

References l1GtPatternGenerator_cfi::bx, CSCDetId::chamber(), chamberID(), CSCDetId::endcap(), hlt_dqm_clientPB-live_cfg::me1, mps_fire::result, CSCDetId::ring(), and CSCDetId::station().

Referenced by CSCDigiToRaw::add().

38  {
39  if (bxMin == -999)
40  return true;
41  int nominalBX = 6;
42  CSCDetId chamberId = chamberID(cscId);
43  typename LCTCollection::Range lctRange = lcts.get(chamberId);
44  bool result = false;
45  for (typename LCTCollection::const_iterator lctItr = lctRange.first; lctItr != lctRange.second; ++lctItr) {
46  int bx = lctItr->getBX() - nominalBX;
47  if (bx >= bxMin && bx <= bxMax) {
48  result = true;
49  break;
50  }
51  }
52 
53  bool me1 = cscId.station() == 1 && cscId.ring() == 1;
54  //this is another "creative" recovery of smart ME1A-ME1B TMB logic cases:
55  //wire selective readout requires at least one (A)LCT in the full chamber
56  if (me1 && result == false && me1abCheck) {
57  CSCDetId me1aId = CSCDetId(chamberId.endcap(), chamberId.station(), 4, chamberId.chamber(), 0);
58  lctRange = lcts.get(me1aId);
59  for (typename LCTCollection::const_iterator lctItr = lctRange.first; lctItr != lctRange.second; ++lctItr) {
60  int bx = lctItr->getBX() - nominalBX;
61  if (bx >= bxMin && bx <= bxMax) {
62  result = true;
63  break;
64  }
65  }
66  }
67 
68  return result;
69  }
int chamber() const
Definition: CSCDetId.h:62
PixelRecoRange< float > Range
int endcap() const
Definition: CSCDetId.h:85
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:29
int ring() const
Definition: CSCDetId.h:68
int station() const
Definition: CSCDetId.h:79
template<>
bool cscd2r::accept ( const CSCDetId cscId,
const CSCCLCTPreTriggerCollection lcts,
int  bxMin,
int  bxMax,
bool  me1abCheck 
)

Definition at line 73 of file CSCDigiToRaw.cc.

References l1GtPatternGenerator_cfi::bx, chamberID(), mps_fire::result, CSCDetId::ring(), and CSCDetId::station().

73  {
74  if (bxMin == -999)
75  return true;
76  int nominalBX = 6;
77  CSCDetId chamberId = chamberID(cscId);
78  CSCCLCTPreTriggerCollection::Range lctRange = lcts.get(chamberId);
79  bool result = false;
80  for (CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first; lctItr != lctRange.second; ++lctItr) {
81  int bx = *lctItr - nominalBX;
82  if (bx >= bxMin && bx <= bxMax) {
83  result = true;
84  break;
85  }
86  }
87  bool me1a = cscId.station() == 1 && cscId.ring() == 4;
88  if (me1a && result == false && me1abCheck) {
89  //check pretriggers in me1a as well; relevant for TMB emulator writing to separate detIds
90  lctRange = lcts.get(cscId);
91  for (CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first; lctItr != lctRange.second; ++lctItr) {
92  int bx = *lctItr - nominalBX;
93  if (bx >= bxMin && bx <= bxMax) {
94  result = true;
95  break;
96  }
97  }
98  }
99  return result;
100  }
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:29
int ring() const
Definition: CSCDetId.h:68
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
int station() const
Definition: CSCDetId.h:79
CSCDetId cscd2r::chamberID ( const CSCDetId cscDetId)

takes layer ID, converts to chamber ID, switching ME1A to ME11

Definition at line 29 of file CSCDigiToRaw.cc.

References CSCDetId::chamber(), CSCDetId::chamberId(), CSCDetId::endcap(), CSCDetId::ring(), and CSCDetId::station().

Referenced by accept(), DTDigiToRaw::createFedBuffers(), CSCDigiToRaw::findEventData(), cscdqm::EventProcessor::processCSC(), cscdqm::EventProcessor::processExaminer(), and GEMDQMStatusDigi::SetInfoChambers().

29  {
30  CSCDetId chamberId = cscDetId.chamberId();
31  if (chamberId.ring() == 4) {
32  chamberId = CSCDetId(chamberId.endcap(), chamberId.station(), 1, chamberId.chamber(), 0);
33  }
34  return chamberId;
35  }
int chamber() const
Definition: CSCDetId.h:62
int endcap() const
Definition: CSCDetId.h:85
CSCDetId chamberId() const
Definition: CSCDetId.h:47
int ring() const
Definition: CSCDetId.h:68
int station() const
Definition: CSCDetId.h:79