CMS 3D CMS Logo

Functions
cscd2r Namespace Reference

Functions

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

Function Documentation

◆ accept() [1/2]

template<>
bool cscd2r::accept ( const CSCDetId cscId,
const CSCCLCTPreTriggerCollection lcts,
int  bxMin,
int  bxMax,
bool  me1abCheck 
)

Definition at line 73 of file CSCDigiToRaw.cc.

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  }

References l1GtPatternGenerator_cfi::bx, l1tstage1emulator_dqm_sourceclient-live_cfg::bxMax, l1tstage1emulator_dqm_sourceclient-live_cfg::bxMin, chamberID(), mps_fire::result, CSCDetId::ring(), and CSCDetId::station().

◆ accept() [2/2]

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.

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  }

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

Referenced by CSCDigiToRaw::add().

◆ chamberID()

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.

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  }

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().

Range
PixelRecoRange< float > Range
Definition: PixelTripletHLTGenerator.cc:31
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
l1tstage1emulator_dqm_sourceclient-live_cfg.bxMin
bxMin
Definition: l1tstage1emulator_dqm_sourceclient-live_cfg.py:84
l1tstage1emulator_dqm_sourceclient-live_cfg.bxMax
bxMax
Definition: l1tstage1emulator_dqm_sourceclient-live_cfg.py:85
CSCDetId
Definition: CSCDetId.h:26
CSCDetId::chamberId
CSCDetId chamberId() const
Definition: CSCDetId.h:47
CSCDetId::chamber
int chamber() const
Definition: CSCDetId.h:62
hlt_dqm_clientPB-live_cfg.me1
me1
Definition: hlt_dqm_clientPB-live_cfg.py:68
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
mps_fire.result
result
Definition: mps_fire.py:303
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
cscd2r::chamberID
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:29