CMS 3D CMS Logo

Public Member Functions

HDQMInspectorConfigSiStrip Class Reference

#include <HDQMInspectorConfigSiStrip.h>

Inheritance diagram for HDQMInspectorConfigSiStrip:
HDQMInspectorConfigBase

List of all members.

Public Member Functions

 HDQMInspectorConfigSiStrip ()
std::string translateDetId (const uint32_t) const
 pure virtual method that convert a DetId to a string
virtual ~HDQMInspectorConfigSiStrip ()

Detailed Description

Definition at line 10 of file HDQMInspectorConfigSiStrip.h.


Constructor & Destructor Documentation

HDQMInspectorConfigSiStrip::HDQMInspectorConfigSiStrip ( )

Definition at line 13 of file HDQMInspectorConfigSiStrip.cc.

{
}
HDQMInspectorConfigSiStrip::~HDQMInspectorConfigSiStrip ( ) [virtual]

Definition at line 18 of file HDQMInspectorConfigSiStrip.cc.

{
}

Member Function Documentation

std::string HDQMInspectorConfigSiStrip::translateDetId ( const uint32_t  ) const [virtual]

pure virtual method that convert a DetId to a string

Implements HDQMInspectorConfigBase.

Definition at line 23 of file HDQMInspectorConfigSiStrip.cc.

References TIDDetId::side(), TECDetId::side(), SiStripDetId::subDetector(), sistripsummary::TEC, sistripsummary::TIB, sistripsummary::TID, and sistripsummary::TOB.

{
  std::stringstream Name;

  uint32_t rawdetid = id;
  SiStripDetId stripdet = SiStripDetId(rawdetid);

  if(stripdet.subDetector() == SiStripDetId::TIB) {
    TIBDetId tib1 = TIBDetId(rawdetid);
    Name << "TIB";
  } else if(stripdet.subDetector() == SiStripDetId::TID) {
    TIDDetId tid1 = TIDDetId(rawdetid);
    if( tid1.side() == 1 ) {
      Name << "TID-";
    }
    else if( tid1.side() == 2 ) {
      Name << "TID+";
    }
    else {
      Name << "???";
    }
  } else if(stripdet.subDetector() == SiStripDetId::TOB) {
    TOBDetId tob1 = TOBDetId(rawdetid);
    Name << "TOB";
  } else if( stripdet.subDetector() == SiStripDetId::TEC) {
    TECDetId tec1 = TECDetId(rawdetid);
    if( tec1.side() == 1 ) {
      Name << "TEC-";
    }
    else if( tec1.side() == 2 ) {
      Name << "TEC+";
    }
    else {
      Name << "???";
    }
  } else{
    Name << "???";
  }

  return Name.str();

}