CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/Geometry/MuonNumbering/src/MuonSubDetector.cc

Go to the documentation of this file.
00001 #include "Geometry/MuonNumbering/interface/MuonSubDetector.h"
00002 #include <iostream>
00003 
00004 
00005 MuonSubDetector::MuonSubDetector(std::string name) 
00006   : detectorName(name) {
00007   if (name=="MuonDTHits") {
00008     detector=barrel;
00009   } else if (name=="MuonCSCHits") {
00010     detector=endcap;
00011   } else if (name=="MuonRPCHits") {
00012     detector=rpc;
00013   } else {
00014     std::cout << "MuonSubDetector::MuonSubDetector does not recognize ";
00015     std::cout << name <<std::endl;
00016     detector=nodef;
00017   } 
00018 }
00019 
00020 bool MuonSubDetector::isBarrel(){
00021   return (detector==barrel);
00022 }
00023 
00024 bool MuonSubDetector::isEndcap(){
00025   return (detector==endcap);
00026 }
00027 
00028 bool MuonSubDetector::isRpc(){
00029   return (detector==rpc);
00030 }
00031 
00032 std::string MuonSubDetector::name(){
00033   return detectorName;
00034 }
00035 
00036 std::string MuonSubDetector::suIdName(){
00037   if (detector==barrel) {
00038     return "MuonHitsBarrel";
00039   } else if (detector==endcap) {
00040     return "MuonHitsEndcap";
00041   } else if (detector==rpc) {
00042     return "MuonHitsRPC";
00043   } else {
00044     return "";
00045   }
00046 }