CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::DeDxHit Class Reference

#include <DeDxHit.h>

List of all members.

Public Member Functions

float charge () const
 Return the angle and thick normalized, calibrated energy release.
 DeDxHit (float ch, float dist, float len, DetId detId)
 DeDxHit ()
float distance () const
 Return the distance of the hit from the interaction point.
int layer () const
 Return the layer/disk.
bool operator< (const DeDxHit &other) const
float pathLength () const
 Return the path length.
int subDet () const
 Return the subdet.
char subDetId () const
 Return the encoded layer + sub det id.
int subDetSide () const
 Return the plus/minus side for TEC/TID.

Private Attributes

float m_charge
float m_distance
float m_pathLength
char m_subDetId

Detailed Description

Class defining the dedx hits, i.e. track hits with only dedx need informations

Definition at line 10 of file DeDxHit.h.


Constructor & Destructor Documentation

reco::DeDxHit::DeDxHit ( ) [inline]

Definition at line 12 of file DeDxHit.h.

{}
DeDxHit::DeDxHit ( float  ch,
float  dist,
float  len,
DetId  detId 
)

Definition at line 12 of file DeDxHit.cc.

References PXFDetId::disk(), TIBDetId::layer(), TOBDetId::layer(), layer(), PXBDetId::layer(), m_subDetId, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TIDDetId::wheel(), and TECDetId::wheel().

                                                      : m_charge(ch),m_distance(dist),m_pathLength(len)
  {
        uint32_t subdet = id.subdetId();
        m_subDetId = (subdet&0x7)<<5;
        uint32_t layer = 0;

          if (subdet == PixelSubdetector::PixelBarrel)
              layer = PXBDetId(id).layer();
            else if (subdet == PixelSubdetector::PixelEndcap)
              layer = PXFDetId(id).disk();
            else if (subdet == StripSubdetector::TIB)
              layer = TIBDetId(id).layer();
            else if (subdet == StripSubdetector::TID)
              layer = (TIDDetId(id).wheel() & 0xF ) + ( (TIDDetId(id).side() -1 )<<4 );
            else if (subdet == StripSubdetector::TOB)
              layer = TOBDetId(id).layer();
            else if (subdet == StripSubdetector::TEC)
              layer = (TECDetId(id).wheel() & 0xF ) + ( (TECDetId(id).side() -1 )<<4 );
      m_subDetId += (layer & 0x1F) ; 
  }

Member Function Documentation

float reco::DeDxHit::charge ( ) const [inline]

Return the angle and thick normalized, calibrated energy release.

Definition at line 16 of file DeDxHit.h.

References m_charge.

{return m_charge;}
float reco::DeDxHit::distance ( ) const [inline]

Return the distance of the hit from the interaction point.

Definition at line 19 of file DeDxHit.h.

References m_distance.

{return m_distance;}
int reco::DeDxHit::layer ( ) const [inline]

Return the layer/disk.

Definition at line 31 of file DeDxHit.h.

References m_subDetId.

Referenced by DeDxHit().

{return m_subDetId & 0xF ; }
bool reco::DeDxHit::operator< ( const DeDxHit other) const [inline]

Definition at line 36 of file DeDxHit.h.

References m_charge.

{return m_charge < other.m_charge; }
float reco::DeDxHit::pathLength ( ) const [inline]

Return the path length.

Definition at line 22 of file DeDxHit.h.

References m_pathLength.

{return m_pathLength;}
int reco::DeDxHit::subDet ( ) const [inline]

Return the subdet.

Definition at line 25 of file DeDxHit.h.

References m_subDetId.

{return (m_subDetId>>5)&0x7; }
char reco::DeDxHit::subDetId ( ) const [inline]

Return the encoded layer + sub det id.

Definition at line 34 of file DeDxHit.h.

References m_subDetId.

{return m_subDetId; }
int reco::DeDxHit::subDetSide ( ) const [inline]

Return the plus/minus side for TEC/TID.

Definition at line 28 of file DeDxHit.h.

References m_subDetId.

{return ((m_subDetId>>4)&0x1 )+ 1; }

Member Data Documentation

float reco::DeDxHit::m_charge [private]

Definition at line 41 of file DeDxHit.h.

Referenced by charge(), and operator<().

float reco::DeDxHit::m_distance [private]

Definition at line 42 of file DeDxHit.h.

Referenced by distance().

float reco::DeDxHit::m_pathLength [private]

Definition at line 43 of file DeDxHit.h.

Referenced by pathLength().

char reco::DeDxHit::m_subDetId [private]

Definition at line 44 of file DeDxHit.h.

Referenced by DeDxHit(), layer(), subDet(), subDetId(), and subDetSide().