CMS 3D CMS Logo

CSCWireDigi Class Reference

Digi for CSC anode wires. More...

#include <DataFormats/CSCDigi/interface/CSCWireDigi.h>

List of all members.

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< intgetTimeBinsOn () 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_


Detailed Description

Digi for CSC anode wires.

Date
2007/07/23 12:08:20
Revision
1.8

Definition at line 12 of file CSCWireDigi.h.


Constructor & Destructor Documentation

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

Constructors.

Definition at line 15 of file CSCWireDigi.cc.

References tbinb_, and wire_.

00015                                                      {
00016   wire_  = wire;
00017   tbinb_ = tbinb;
00018 }

CSCWireDigi::CSCWireDigi (  ) 

wiregroup#, tbin bit word

Default.

Definition at line 21 of file CSCWireDigi.cc.

References tbinb_, and wire_.

00021                          {
00022   wire_ = 0;
00023   tbinb_ = 0;
00024 }


Member Function Documentation

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.

References i, and tbinb_.

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.

References i, and tbinb_.

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_;}

void CSCWireDigi::print ( void   )  const

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 }

void CSCWireDigi::setWireGroup ( unsigned int  wiregroup  )  [inline]

set wiregroup number

Definition at line 36 of file CSCWireDigi.h.

References wire_.

00036 {wire_= wiregroup;}


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:32 2009 for CMSSW by  doxygen 1.5.4