CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TOBDetId.cc
Go to the documentation of this file.
2 
4 }
5 TOBDetId::TOBDetId(uint32_t rawid) : SiStripDetId(rawid) {
6 }
7 TOBDetId::TOBDetId(const DetId& id) : SiStripDetId(id.rawId()) {
8 }
9 
10 bool TOBDetId::isDoubleSide() const {
11  // Double Side: only layers 1 and 2
12  if( this->glued() == 0 && ( this->layer() == 1 || this->layer() == 2 ) ) {
13  return true;
14  } else {
15  return false;
16  }
17 }
18 
19 std::ostream& operator<<(std::ostream& os,const TOBDetId& id) {
20  unsigned int theLayer = id.layer();
21  std::vector<unsigned int> theRod = id.rod();
22  unsigned int theModule = id.module();
23  std::string side;
24  std::string part;
25  side = (theRod[0] == 1 ) ? "-" : "+";
26  std::string type;
27  type = (id.stereo() == 0) ? "r-phi" : "stereo";
28  type = (id.glued() == 0) ? type : type+" glued";
29  type = (id.isDoubleSide()) ? "double side" : type;
30  return os << "TOB" << side
31  << " Layer " << theLayer
32  << " Rod " << theRod[1]
33  << " Module " << theModule << " " << type
34  << " (" << id.rawId() << ")";
35 }
36 
type
Definition: HCALResponse.h:22
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
TOBDetId()
Definition: TOBDetId.cc:3
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
Definition: DetId.h:20
uint32_t glued() const
Definition: SiStripDetId.h:154
part
Definition: HCALResponse.h:21
bool isDoubleSide() const
Definition: TOBDetId.cc:10