CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CSCWireDigi Class Reference

#include <CSCWireDigi.h>

Public Member Functions

 CSCWireDigi (int wire, unsigned int tbinb)
 Constructors. More...
 
 CSCWireDigi ()
 wiregroup#, tbin bit word More...
 
int getBeamCrossingTag () const
 return tbin number, (obsolete, use getTimeBin() instead) More...
 
int getBXandWireGroup () const
 
int getTimeBin () const
 return first tbin ON number More...
 
std::vector< int > getTimeBinsOn () const
 return vector of time bins ON More...
 
unsigned int getTimeBinWord () const
 return the word with time bins bits More...
 
int getWireGroup () const
 default More...
 
int getWireGroupBX () const
 return BX assigned for the wire group (16 upper bits from the wire group number) More...
 
void print () const
 Print content of digi. More...
 
void setWireGroup (unsigned int wiregroup)
 set wiregroup number More...
 

Private Attributes

uint32_t tbinb_
 
int wire_
 
int wireBX_
 
int wireBXandWires_
 BX in the wire digis (16 upper bits from the wire group number) More...
 

Detailed Description

Digi for CSC anode wires.

Definition at line 14 of file CSCWireDigi.h.

Constructor & Destructor Documentation

CSCWireDigi::CSCWireDigi ( int  wire,
unsigned int  tbinb 
)

Constructors.

Wire group number in the digi (16 lower bits from the wire group number)

BX in the wire digis (16 upper bits from the wire group number)

BX wire group combination

Definition at line 14 of file CSCWireDigi.cc.

References tbinb_, wire_, wireBX_, and wireBXandWires_.

14  {
16  wire_ = wire & 0x0000FFFF;
17  tbinb_ = tbinb;
19  wireBX_= (wire >> 16) & 0x0000FFFF;
21  wireBXandWires_=wire;
22 }
int wireBXandWires_
BX in the wire digis (16 upper bits from the wire group number)
Definition: CSCWireDigi.h:51
uint32_t tbinb_
Definition: CSCWireDigi.h:49
CSCWireDigi::CSCWireDigi ( )

wiregroup#, tbin bit word

Default.

Definition at line 25 of file CSCWireDigi.cc.

References tbinb_, wire_, wireBX_, and wireBXandWires_.

25  {
26  wire_ = 0;
27  tbinb_ = 0;
28  wireBX_=0;
30 }
int wireBXandWires_
BX in the wire digis (16 upper bits from the wire group number)
Definition: CSCWireDigi.h:51
uint32_t tbinb_
Definition: CSCWireDigi.h:49

Member Function Documentation

int CSCWireDigi::getBeamCrossingTag ( ) const

return tbin number, (obsolete, use getTimeBin() instead)

return tbin number (obsolete, use getTimeBin() instead)

Definition at line 33 of file CSCWireDigi.cc.

References getTimeBin().

Referenced by CSCAnodeData2006::add().

33  {
34  return getTimeBin();
35 }
int getTimeBin() const
return first tbin ON number
Definition: CSCWireDigi.cc:37
int CSCWireDigi::getBXandWireGroup ( ) const
inline

return BX-wiregroup number combined (16 upper bits - BX + 16 lower bits - wire group number)

Definition at line 29 of file CSCWireDigi.h.

References wireBXandWires_.

Referenced by CSCHitFromWireOnly::findWireHitPosition(), and print().

29 {return wireBXandWires_;}
int wireBXandWires_
BX in the wire digis (16 upper bits from the wire group number)
Definition: CSCWireDigi.h:51
int CSCWireDigi::getTimeBin ( ) const

return first tbin ON number

Definition at line 37 of file CSCWireDigi.cc.

References i, and tbinb_.

Referenced by CSCHitFromWireOnly::addToCluster(), getBeamCrossingTag(), CSCHitFromWireOnly::makeWireCluster(), operator<<(), and print().

37  {
38  uint32_t tbit=1;
39  int tbin=-1;
40  for(int i=0;i<32;i++) {
41  if(tbit & tbinb_) tbin=i;
42  if(tbin>-1) break;
43  tbit=tbit<<1;
44  }
45  return tbin;
46 }
int i
Definition: DBlmapReader.cc:9
uint32_t tbinb_
Definition: CSCWireDigi.h:49
std::vector< int > CSCWireDigi::getTimeBinsOn ( ) const

return vector of time bins ON

Definition at line 48 of file CSCWireDigi.cc.

References i, and tbinb_.

Referenced by CSCAnodeData2007::add(), operator<<(), and print().

48  {
49  std::vector<int> tbins;
50  uint32_t tbit=tbinb_;
51  uint32_t one=1;
52  for(int i=0;i<32;i++) {
53  if(tbit & one) tbins.push_back(i);
54  tbit=tbit>>1;
55  if(tbit==0) break;
56  }
57  return tbins;
58 }
int i
Definition: DBlmapReader.cc:9
uint32_t tbinb_
Definition: CSCWireDigi.h:49
unsigned int CSCWireDigi::getTimeBinWord ( ) const
inline

return the word with time bins bits

Definition at line 31 of file CSCWireDigi.h.

References tbinb_.

31 {return tbinb_;}
uint32_t tbinb_
Definition: CSCWireDigi.h:49
int CSCWireDigi::getWireGroup ( ) const
inline
int CSCWireDigi::getWireGroupBX ( ) const
inline

return BX assigned for the wire group (16 upper bits from the wire group number)

Definition at line 26 of file CSCWireDigi.h.

References wireBX_.

Referenced by CSCEventData::add(), and print().

26 {return wireBX_;}
void CSCWireDigi::print ( void  ) const

Print content of digi.

Debug.

Definition at line 62 of file CSCWireDigi.cc.

References gather_cfg::cout, getBXandWireGroup(), getTimeBin(), getTimeBinsOn(), getWireGroup(), getWireGroupBX(), and i.

62  {
63  std::cout << " CSC Wire " << getWireGroup() << " | "
64  << " CSC Wire BX # " << getWireGroupBX() << " | "
65  << " CSC BX + Wire " << std::hex << getBXandWireGroup() << " | " << std::dec
66  << " CSC Wire First Time Bin On " << getTimeBin()
67  << std::endl;
68  std::cout << " CSC Time Bins On ";
69  std::vector<int> tbins=getTimeBinsOn();
70  for(unsigned int i=0; i<tbins.size();i++) std::cout<<tbins[i]<<" ";
71  std::cout<<std::endl;
72 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > getTimeBinsOn() const
return vector of time bins ON
Definition: CSCWireDigi.cc:48
int getWireGroup() const
default
Definition: CSCWireDigi.h:24
int getWireGroupBX() const
return BX assigned for the wire group (16 upper bits from the wire group number)
Definition: CSCWireDigi.h:26
int getTimeBin() const
return first tbin ON number
Definition: CSCWireDigi.cc:37
tuple cout
Definition: gather_cfg.py:121
int getBXandWireGroup() const
Definition: CSCWireDigi.h:29
void CSCWireDigi::setWireGroup ( unsigned int  wiregroup)
inline

set wiregroup number

Definition at line 43 of file CSCWireDigi.h.

References wire_.

43 {wire_= wiregroup;}

Member Data Documentation

uint32_t CSCWireDigi::tbinb_
private

Definition at line 49 of file CSCWireDigi.h.

Referenced by CSCWireDigi(), getTimeBin(), getTimeBinsOn(), and getTimeBinWord().

int CSCWireDigi::wire_
private

Definition at line 48 of file CSCWireDigi.h.

Referenced by CSCWireDigi(), getWireGroup(), and setWireGroup().

int CSCWireDigi::wireBX_
private

Definition at line 52 of file CSCWireDigi.h.

Referenced by CSCWireDigi(), and getWireGroupBX().

int CSCWireDigi::wireBXandWires_
private

BX in the wire digis (16 upper bits from the wire group number)

Definition at line 51 of file CSCWireDigi.h.

Referenced by CSCWireDigi(), and getBXandWireGroup().