CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripDetId.cc
Go to the documentation of this file.
2 #include <iomanip>
3 
4 // -----------------------------------------------------------------------------
5 //
7 
8 // -----------------------------------------------------------------------------
9 //
10 SiStripDetId::SiStripDetId( const uint32_t& raw_id ) : DetId( raw_id ) {;}
11 
12 // -----------------------------------------------------------------------------
13 //
14 SiStripDetId::SiStripDetId( const DetId& det_id ) : DetId( det_id.rawId() ) {;}
15 
16 // -----------------------------------------------------------------------------
17 //
18 SiStripDetId::SiStripDetId( Detector det, int subdet ) : DetId( det, subdet ) {;}
19 
20 // -----------------------------------------------------------------------------
21 //
22 SiStripDetId::SiStripDetId( const uint32_t& raw_id,
23  const uint16_t& reserved )
24  : DetId( raw_id )
25 {
26  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
27  id_ |= ( ( reserved & reservedMask_ ) << reservedStartBit_ );
28 }
29 
30 // -----------------------------------------------------------------------------
31 //
33  const uint16_t& reserved )
34  : DetId( det_id.rawId() )
35 {
36  id_ &= ( ~static_cast<uint32_t>(reservedMask_<<reservedStartBit_) );
37  id_ |= ( ( reserved & reservedMask_ ) << reservedStartBit_ );
38 }
39 
40 // -----------------------------------------------------------------------------
41 //
42 std::ostream& operator<< ( std::ostream& os, const SiStripDetId& id ) {
43  return os << "[SiStripDetId::print]" << std::endl
44  << " rawId : 0x"
45  << std::hex << std::setfill('0') << std::setw(8)
46  << id.rawId()
47  << std::dec << std::endl
48  << " bits[0:24] : "
49  << std::hex << std::setfill('0') << std::setw(8)
50  << (0x01FFFFFF & id.rawId())
51  << std::dec << std::endl
52  << " Detector : " << id.det() << std::endl
53  << " SubDetector : " << id.subdetId() << std::endl
54  << " reserved : " << id.reserved();
55 }
56 
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
static const uint16_t reservedMask_
Definition: SiStripDetId.h:86
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
Definition: DetId.h:20
Detector
Definition: DetId.h:26
uint32_t id_
Definition: DetId.h:57
static const uint16_t reservedStartBit_
Definition: SiStripDetId.h:80