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
reco::DeDxHit Class Reference

#include <DeDxHit.h>

Public Member Functions

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

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.

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

Definition at line 12 of file DeDxHit.cc.

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

12  : m_charge(ch),m_distance(dist),m_pathLength(len)
13  {
14  uint32_t subdet = id.subdetId();
15  m_subDetId = (subdet&0x7)<<5;
16  uint32_t layer = 0;
17 
18  if (subdet == PixelSubdetector::PixelBarrel)
19  layer = PXBDetId(id).layer();
20  else if (subdet == PixelSubdetector::PixelEndcap)
21  layer = PXFDetId(id).disk();
22  else if (subdet == StripSubdetector::TIB)
23  layer = TIBDetId(id).layer();
24  else if (subdet == StripSubdetector::TID)
25  layer = (TIDDetId(id).wheel() & 0xF ) + ( (TIDDetId(id).side() -1 )<<4 );
26  else if (subdet == StripSubdetector::TOB)
27  layer = TOBDetId(id).layer();
28  else if (subdet == StripSubdetector::TEC)
29  layer = (TECDetId(id).wheel() & 0xF ) + ( (TECDetId(id).side() -1 )<<4 );
30  m_subDetId += (layer & 0x1F) ;
31  }
char m_subDetId
Definition: DeDxHit.h:44
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
float m_pathLength
Definition: DeDxHit.h:43
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
float m_distance
Definition: DeDxHit.h:42
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
int layer() const
Return the layer/disk.
Definition: DeDxHit.h:31
float m_charge
Definition: DeDxHit.h:41
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50

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.

16 {return m_charge;}
float m_charge
Definition: DeDxHit.h:41
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.

19 {return m_distance;}
float m_distance
Definition: DeDxHit.h:42
int reco::DeDxHit::layer ( ) const
inline

Return the layer/disk.

Definition at line 31 of file DeDxHit.h.

References m_subDetId.

Referenced by DeDxHit(), geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

31 {return m_subDetId & 0xF ; }
char m_subDetId
Definition: DeDxHit.h:44
bool reco::DeDxHit::operator< ( const DeDxHit other) const
inline

Definition at line 36 of file DeDxHit.h.

References m_charge.

36 {return m_charge < other.m_charge; }
float m_charge
Definition: DeDxHit.h:41
float reco::DeDxHit::pathLength ( ) const
inline

Return the path length.

Definition at line 22 of file DeDxHit.h.

References m_pathLength.

22 {return m_pathLength;}
float m_pathLength
Definition: DeDxHit.h:43
int reco::DeDxHit::subDet ( ) const
inline

Return the subdet.

Definition at line 25 of file DeDxHit.h.

References m_subDetId.

25 {return (m_subDetId>>5)&0x7; }
char m_subDetId
Definition: DeDxHit.h:44
char reco::DeDxHit::subDetId ( ) const
inline

Return the encoded layer + sub det id.

Definition at line 34 of file DeDxHit.h.

References m_subDetId.

34 {return m_subDetId; }
char m_subDetId
Definition: DeDxHit.h:44
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.

28 {return ((m_subDetId>>4)&0x1 )+ 1; }
char m_subDetId
Definition: DeDxHit.h:44

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