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)
 
template<>
bool accept (const CSCDetId &cscId, const CSCCLCTPreTriggerCollection &lcts, int bxMin, int bxMax)
 
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 
)

Definition at line 40 of file CSCDigiToRaw.cc.

References chamberID(), and query::result.

Referenced by CSCDigiToRaw::add().

42  {
43  if(bxMin == -999) return true;
44  int nominalBX = 6;
45  CSCDetId chamberId = chamberID(cscId);
46  typename LCTCollection::Range lctRange = lcts.get(chamberId);
47  bool result = false;
48  for(typename LCTCollection::const_iterator lctItr = lctRange.first;
49  lctItr != lctRange.second; ++lctItr)
50  {
51  int bx = lctItr->getBX() - nominalBX;
52  if(bx >= bxMin && bx <= bxMax)
53  {
54  result = true;
55  break;
56  }
57  }
58  return result;
59  }
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:30
PixelRecoRange< float > Range
template<>
bool cscd2r::accept ( const CSCDetId cscId,
const CSCCLCTPreTriggerCollection lcts,
int  bxMin,
int  bxMax 
)

Definition at line 63 of file CSCDigiToRaw.cc.

References chamberID(), and query::result.

65  {
66  if(bxMin == -999) return true;
67  int nominalBX = 6;
68  CSCDetId chamberId = chamberID(cscId);
69  CSCCLCTPreTriggerCollection::Range lctRange = lcts.get(chamberId);
70  bool result = false;
71  for(CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first;
72  lctItr != lctRange.second; ++lctItr)
73  {
74  int bx = *lctItr - nominalBX;
75  if(bx >= bxMin && bx <= bxMax)
76  {
77  result = true;
78  break;
79  }
80  }
81  return result;
82  }
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:30
std::vector< CSCCLCTPreTrigger >::const_iterator const_iterator
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 30 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().

30  {
31  CSCDetId chamberId = cscDetId.chamberId();
32  if(chamberId.ring() ==4)
33  {
34  chamberId = CSCDetId(chamberId.endcap(), chamberId.station(), 1, chamberId.chamber(), 0);
35  }
36  return chamberId;
37  }
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