CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TECDetId.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 
6 }
7 
8 TECDetId::TECDetId(uint32_t rawid) : SiStripDetId(rawid) {
9 }
10 TECDetId::TECDetId(const DetId& id) : SiStripDetId(id.rawId()){
11 }
12 
13 
14 bool TECDetId::isDoubleSide() const {
15  // Double Side: only rings 1, 2 and 5
16  if( this->glued() == 0 && ( this->ring() == 1 || this->ring() == 2 || this->ring() == 5 ) ) {
17  return true;
18  } else {
19  return false;
20  }
21 }
22 
23 std::ostream& operator<<(std::ostream& os,const TECDetId& id) {
24  unsigned int theWheel = id.wheel();
25  unsigned int theModule = id.module();
26  std::vector<unsigned int> thePetal = id.petal();
27  unsigned int theRing = id.ring();
28  std::string side;
29  std::string petal;
30  side = (id.side() == 1 ) ? "-" : "+";
31  petal = (thePetal[0] == 1 ) ? "back" : "front";
32  std::string type;
33  type = (id.stereo() == 0) ? "r-phi" : "stereo";
34  type = (id.glued() == 0) ? type : type+" glued";
35  type = (id.isDoubleSide()) ? "double side" : type;
36  return os << "TEC" << side
37  << " Wheel " << theWheel
38  << " Petal " << thePetal[1] << " " << petal
39  << " Ring " << theRing
40  << " Module " << theModule << " " << type
41  << " (" << id.rawId() << ")";
42 }
type
Definition: HCALResponse.h:22
bool isDoubleSide() const
Definition: TECDetId.cc:14
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
Definition: DetId.h:20
uint32_t glued() const
Definition: SiStripDetId.h:154
TECDetId()
Definition: TECDetId.cc:5
unsigned int ring() const
ring id
Definition: TECDetId.h:71