![]() |
![]() |
00001 #include "Geometry/CommonDetUnit/interface/GeomDetType.h" 00002 00003 using namespace GeomDetEnumerators; 00004 00005 GeomDetType::GeomDetType( const std::string& n, SubDetector subdet) : 00006 theName(n), theSubDet(subdet) {} 00007 00008 00009 GeomDetType::~GeomDetType() 00010 {} 00011 00012 00013 bool GeomDetType::isBarrel() const 00014 { 00015 return (theSubDet == PixelBarrel || theSubDet == TIB || theSubDet == TOB || isDT() || theSubDet == RPCBarrel); 00016 } 00017 00018 bool GeomDetType::isEndcap() const 00019 { 00020 return (!isBarrel()); 00021 } 00022 00023 00024 bool GeomDetType::isTrackerStrip() const 00025 { 00026 return (theSubDet == TIB || theSubDet == TOB || 00027 theSubDet == TID || theSubDet == TEC); 00028 } 00029 00030 bool GeomDetType::isTrackerPixel() const 00031 { 00032 return (theSubDet == PixelBarrel || theSubDet == PixelEndcap); 00033 } 00034 00035 bool GeomDetType::isTracker() const 00036 { 00037 return ( isTrackerStrip() || isTrackerPixel() ); 00038 } 00039 00040 00041 bool GeomDetType::isDT() const 00042 { 00043 return (theSubDet == DT) ; 00044 } 00045 00046 bool GeomDetType::isCSC() const 00047 { 00048 return (theSubDet == CSC) ; 00049 } 00050 00051 00052 bool GeomDetType::isRPC() const 00053 { 00054 return (theSubDet == RPCBarrel || theSubDet == RPCEndcap) ; 00055 } 00056 00057 bool GeomDetType::isMuon() const 00058 { 00059 return (theSubDet == DT || theSubDet == CSC || isRPC()) ; 00060 }