#include <DataFormats/CSCDigi/interface/CSCWireDigi.h>
Public Member Functions | |
CSCWireDigi () | |
wiregroup#, tbin bit word | |
CSCWireDigi (int wire, unsigned int tbinb) | |
Constructors. | |
int | getBeamCrossingTag () const |
return tbin number, (obsolete, use getTimeBin() instead) | |
int | getTimeBin () const |
return first tbin ON number | |
std::vector< int > | getTimeBinsOn () const |
return vector of time bins ON | |
unsigned int | getTimeBinWord () const |
return the word with time bins bits | |
int | getWireGroup () const |
default | |
void | print () const |
Print content of digi. | |
void | setWireGroup (unsigned int wiregroup) |
set wiregroup number | |
Private Attributes | |
uint32_t | tbinb_ |
uint16_t | wire_ |
Definition at line 12 of file CSCWireDigi.h.
CSCWireDigi::CSCWireDigi | ( | ) |
int CSCWireDigi::getBeamCrossingTag | ( | ) | const |
return tbin number, (obsolete, use getTimeBin() instead)
return tbin number (obsolete, use getTimeBin() instead)
Definition at line 27 of file CSCWireDigi.cc.
References getTimeBin().
Referenced by CSCAnodeData2006::add().
00027 { 00028 return getTimeBin(); 00029 }
int CSCWireDigi::getTimeBin | ( | ) | const |
return first tbin ON number
Definition at line 31 of file CSCWireDigi.cc.
Referenced by CSCHitFromWireOnly::addToCluster(), getBeamCrossingTag(), CSCHitFromWireOnly::makeWireCluster(), operator<<(), and print().
00031 { 00032 uint32_t tbit=1; 00033 int tbin=-1; 00034 for(int i=0;i<32;i++) { 00035 if(tbit & tbinb_) tbin=i; 00036 if(tbin>-1) break; 00037 tbit=tbit<<1; 00038 } 00039 return tbin; 00040 }
std::vector< int > CSCWireDigi::getTimeBinsOn | ( | ) | const |
return vector of time bins ON
Definition at line 42 of file CSCWireDigi.cc.
Referenced by operator<<(), and print().
00042 { 00043 std::vector<int> tbins; 00044 uint32_t tbit=tbinb_; 00045 uint32_t one=1; 00046 for(int i=0;i<32;i++) { 00047 if(tbit & one) tbins.push_back(i); 00048 tbit=tbit>>1; 00049 if(tbit==0) break; 00050 } 00051 return tbins; 00052 }
unsigned int CSCWireDigi::getTimeBinWord | ( | ) | const [inline] |
return the word with time bins bits
Definition at line 24 of file CSCWireDigi.h.
References tbinb_.
00024 {return tbinb_;}
int CSCWireDigi::getWireGroup | ( | ) | const [inline] |
default
return wiregroup number
Definition at line 22 of file CSCWireDigi.h.
References wire_.
Referenced by CSCEventData::add(), CSCAnodeData2006::add(), CSCHitFromWireOnly::addToCluster(), MuonTruth::analyze(), CSCHitFromWireOnly::findWireHitPosition(), CSCHitFromWireOnly::makeWireCluster(), operator<<(), CSCWireDigiValidation::plotResolution(), and print().
00022 {return wire_;}
Print content of digi.
Debug.
Definition at line 56 of file CSCWireDigi.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), getTimeBin(), getTimeBinsOn(), getWireGroup(), and i.
00056 { 00057 std::cout << " CSC Wire " << getWireGroup() 00058 << " CSC Wire First Time Bin On" << getTimeBin() 00059 << std::endl; 00060 std::cout << " CSC Time Bins On "; 00061 std::vector<int> tbins=getTimeBinsOn(); 00062 for(unsigned int i=0; i<tbins.size();i++) std::cout<<tbins[i]<<" "; 00063 std::cout<<std::endl; 00064 }
set wiregroup number
Definition at line 36 of file CSCWireDigi.h.
References wire_.
00036 {wire_= wiregroup;}
uint32_t CSCWireDigi::tbinb_ [private] |
Definition at line 42 of file CSCWireDigi.h.
Referenced by CSCWireDigi(), getTimeBin(), getTimeBinsOn(), and getTimeBinWord().
uint16_t CSCWireDigi::wire_ [private] |
Definition at line 41 of file CSCWireDigi.h.
Referenced by CSCWireDigi(), getWireGroup(), and setWireGroup().