CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 42 of file CSCDigiToRaw.cc.

References CSCDetId::chamber(), chamberID(), CSCDetId, CSCDetId::endcap(), query::result, CSCDetId::ring(), and CSCDetId::station().

Referenced by CSCDigiToRaw::add().

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

Definition at line 84 of file CSCDigiToRaw.cc.

References chamberID(), query::result, CSCDetId::ring(), and CSCDetId::station().

86 {
87  if (bxMin == -999) return true;
88  int nominalBX = 6;
89  CSCDetId chamberId = chamberID(cscId);
90  CSCCLCTPreTriggerCollection::Range lctRange = lcts.get(chamberId);
91  bool result = false;
92  for (CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first;
93  lctItr != lctRange.second; ++lctItr)
94  {
95  int bx = *lctItr - nominalBX;
96  if (bx >= bxMin && bx <= bxMax)
97  {
98  result = true;
99  break;
100  }
101  }
102  bool me1a = cscId.station() == 1 && cscId.ring() == 4;
103  if (me1a && result == false && me1abCheck) {
104  //check pretriggers in me1a as well; relevant for TMB emulator writing to separate detIds
105  lctRange = lcts.get(cscId);
106  for (CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first;
107  lctItr != lctRange.second; ++lctItr)
108  {
109  int bx = *lctItr - nominalBX;
110  if (bx >= bxMin && bx <= bxMax)
111  {
112  result = true;
113  break;
114  }
115  }
116  }
117  return result;
118 }
tuple result
Definition: query.py:137
CSCDetId chamberID(const CSCDetId &cscDetId)
takes layer ID, converts to chamber ID, switching ME1A to ME11
Definition: CSCDigiToRaw.cc:31
int ring() const
Definition: CSCDetId.h:88
std::vector< CSCCLCTPreTrigger >::const_iterator const_iterator
int station() const
Definition: CSCDetId.h:99
std::pair< const_iterator, const_iterator > Range
CSCDetId cscd2r::chamberID ( const CSCDetId cscDetId)

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

Definition at line 31 of file CSCDigiToRaw.cc.

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

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

32 {
33  CSCDetId chamberId = cscDetId.chamberId();
34  if (chamberId.ring() ==4)
35  {
36  chamberId = CSCDetId(chamberId.endcap(), chamberId.station(), 1, chamberId.chamber(), 0);
37  }
38  return chamberId;
39 }
int chamber() const
Definition: CSCDetId.h:81
int endcap() const
Definition: CSCDetId.h:106
CSCDetId chamberId() const
Definition: CSCDetId.h:66
int ring() const
Definition: CSCDetId.h:88
int station() const
Definition: CSCDetId.h:99