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 mom, float len, DetId detId)
 
int layer () const
 Return the layer/disk. More...
 
float momentum () const
 Return the momentum of the trajectory at the interaction point. 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_momentum
 
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 11 of file DeDxHit.h.

Constructor & Destructor Documentation

reco::DeDxHit::DeDxHit ( )
inline

Definition at line 15 of file DeDxHit.h.

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

Definition at line 12 of file DeDxHit.cc.

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

12  :
13  m_charge(ch),
14  m_momentum(mom),
15  m_pathLength(len)
16 
17 {
18  uint32_t subdet = id.subdetId();
19  m_subDetId = (subdet & 0x7) << 5;
20 
21  uint32_t layer = 0;
22  if (subdet == PixelSubdetector::PixelBarrel) {
23  layer = PXBDetId(id).layer();
24  } else if (subdet == PixelSubdetector::PixelEndcap) {
25  layer = PXFDetId(id).disk();
26  } else if (subdet == StripSubdetector::TIB) {
27  layer = TIBDetId(id).layer();
28  } else if (subdet == StripSubdetector::TID) {
29  layer = (TIDDetId(id).wheel() & 0xF) + ((TIDDetId(id).side() - 1) << 4);
30  } else if (subdet == StripSubdetector::TOB) {
31  layer = TOBDetId(id).layer();
32  } else if (subdet == StripSubdetector::TEC) {
33  layer = (TECDetId(id).wheel() & 0xF) + ((TECDetId(id).side() - 1) << 4);
34  }
35 
36  m_subDetId += (layer & 0x1F) ;
37 }
char m_subDetId
Definition: DeDxHit.h:64
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
float m_pathLength
Definition: DeDxHit.h:63
float m_momentum
Definition: DeDxHit.h:62
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
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:45
float m_charge
Definition: DeDxHit.h:61
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 20 of file DeDxHit.h.

References m_charge.

20  {
21  return m_charge;
22  }
float m_charge
Definition: DeDxHit.h:61
int reco::DeDxHit::layer ( ) const
inline

Return the layer/disk.

Definition at line 45 of file DeDxHit.h.

References m_subDetId.

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

45  {
46  return m_subDetId & 0xF;
47  }
char m_subDetId
Definition: DeDxHit.h:64
float reco::DeDxHit::momentum ( ) const
inline

Return the momentum of the trajectory at the interaction point.

Definition at line 25 of file DeDxHit.h.

References m_momentum.

25  {
26  return m_momentum;
27  }
float m_momentum
Definition: DeDxHit.h:62
bool reco::DeDxHit::operator< ( const DeDxHit other) const
inline

Definition at line 54 of file DeDxHit.h.

References m_charge.

54  {
55  return m_charge < other.m_charge;
56  }
float m_charge
Definition: DeDxHit.h:61
float reco::DeDxHit::pathLength ( ) const
inline

Return the path length.

Definition at line 30 of file DeDxHit.h.

References m_pathLength.

30  {
31  return m_pathLength;
32  }
float m_pathLength
Definition: DeDxHit.h:63
int reco::DeDxHit::subDet ( ) const
inline

Return the subdet.

Definition at line 35 of file DeDxHit.h.

References m_subDetId.

35  {
36  return (m_subDetId >> 5) & 0x7;
37  }
char m_subDetId
Definition: DeDxHit.h:64
char reco::DeDxHit::subDetId ( ) const
inline

Return the encoded layer + sub det id.

Definition at line 50 of file DeDxHit.h.

References m_subDetId.

50  {
51  return m_subDetId;
52  }
char m_subDetId
Definition: DeDxHit.h:64
int reco::DeDxHit::subDetSide ( ) const
inline

Return the plus/minus side for TEC/TID.

Definition at line 40 of file DeDxHit.h.

References m_subDetId.

40  {
41  return ((m_subDetId >> 4) & 0x1) + 1;
42  }
char m_subDetId
Definition: DeDxHit.h:64

Member Data Documentation

float reco::DeDxHit::m_charge
private

Definition at line 61 of file DeDxHit.h.

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

float reco::DeDxHit::m_momentum
private

Definition at line 62 of file DeDxHit.h.

Referenced by momentum().

float reco::DeDxHit::m_pathLength
private

Definition at line 63 of file DeDxHit.h.

Referenced by pathLength().

char reco::DeDxHit::m_subDetId
private

Definition at line 64 of file DeDxHit.h.

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