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 42 of file CSCDigiToRaw.cc.

References chamberID(), and query::result.

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  return result;
61  }
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:32
PixelRecoRange< float > Range
template<>
bool cscd2r::accept ( const CSCDetId cscId,
const CSCCLCTPreTriggerCollection lcts,
int  bxMin,
int  bxMax 
)

Definition at line 65 of file CSCDigiToRaw.cc.

References chamberID(), and query::result.

67  {
68  if(bxMin == -999) return true;
69  int nominalBX = 6;
70  CSCDetId chamberId = chamberID(cscId);
71  CSCCLCTPreTriggerCollection::Range lctRange = lcts.get(chamberId);
72  bool result = false;
73  for(CSCCLCTPreTriggerCollection::const_iterator lctItr = lctRange.first;
74  lctItr != lctRange.second; ++lctItr)
75  {
76  int bx = *lctItr - nominalBX;
77  if(bx >= bxMin && bx <= bxMax)
78  {
79  result = true;
80  break;
81  }
82  }
83  return result;
84  }
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:32
std::vector< DigiType >::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 32 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:70
int endcap() const
Definition: CSCDetId.h:95
CSCDetId chamberId() const
Definition: CSCDetId.h:55
int ring() const
Definition: CSCDetId.h:77
int station() const
Definition: CSCDetId.h:88