Go to the documentation of this file.00001 #include "DataFormats/SiStripDetId/interface/TIDDetId.h"
00002
00003 TIDDetId::TIDDetId() : SiStripDetId() {
00004 }
00005 TIDDetId::TIDDetId(uint32_t rawid) : SiStripDetId(rawid) {
00006 }
00007 TIDDetId::TIDDetId(const DetId& id) : SiStripDetId(id.rawId()) {
00008 }
00009
00010 bool TIDDetId::isDoubleSide() const {
00011
00012 if( this->glued() == 0 && ( this->ring() == 1 || this->ring() == 2 ) ) {
00013 return true;
00014 } else {
00015 return false;
00016 }
00017 }
00018
00019 std::ostream& operator<<(std::ostream& os,const TIDDetId& id) {
00020 unsigned int theDisk = id.wheel();
00021 unsigned int theRing = id.ring();
00022 std::vector<unsigned int> theModule = id.module();
00023 std::string side;
00024 std::string part;
00025 side = (id.side() == 1 ) ? "-" : "+";
00026 part = (theModule[0] == 1 ) ? "back" : "front";
00027 std::string type;
00028 type = (id.stereo() == 0) ? "r-phi" : "stereo";
00029 type = (id.glued() == 0) ? type : type+" glued";
00030 type = (id.isDoubleSide()) ? "double side" : type;
00031 return os << "TID" << side
00032 << " Disk " << theDisk
00033 << " Ring " << theRing << " " << part
00034 << " Module " << theModule[1] << " " << type
00035 << " (" << id.rawId() << ")";
00036 }
00037