test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DeDxHit.cc
Go to the documentation of this file.
10 using namespace reco;
11 
12 DeDxHit::DeDxHit(float ch,float dist,float len,DetId id): 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  }
32 
33 
char m_subDetId
Definition: DeDxHit.h:44
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
Definition: DetId.h:18
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
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50