CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeomDetEnumerators.cc
Go to the documentation of this file.
2 #include<ostream>
3 using namespace GeomDetEnumerators;
4 
5 std::ostream& operator<<( std::ostream& s, Location l) {
6  if (l == barrel) return s << "barrel";
7  else return s << "endcap";
8 }
9 
10 std::ostream& operator<<( std::ostream& s, SubDetector m){
11  if ( m == PixelBarrel ) return s << "PixelBarrel";
12  else if ( m == PixelEndcap ) return s << "PixelEndcap";
13  else if ( m == TIB) return s << "TIB";
14  else if (m == TOB) return s << "TOB";
15  else if (m == TID) return s << "TID";
16  else if (m == TEC) return s << "TEC";
17  else if ( m == DT ) return s << "DT";
18  else if ( m == CSC ) return s << "CSC";
19  else if ( m == RPCBarrel ) return s << "RPCBarrel";
20  else if ( m == RPCEndcap ) return s << "RPCEndcap";
21  else if ( m == GEM) return s << "GEM";
22  else if ( m == ME0 ) return s << "ME0";
23  else if ( m == P2OTB ) return s << "Phase2OTBarrel";
24  else if ( m == P2OTEC ) return s << "Phase2OTEndcap";
25  else if ( m == P1PXB ) return s << "Phase1PixelBarrel";
26  else if ( m == P1PXEC ) return s << "Phase1PixelEndcap";
27  else if ( m == P2PXEC ) return s << "Phase2PixelEndcap";
28  else if ( m == TimingBarrel ) return s << "Phase2TimingBarrel";
29  else if ( m == TimingEndcap ) return s << "Phase2TimingEndcap";
30  else return s << "?";
31 }
32 
33 
35 {
36  return (subdet == PixelBarrel || subdet == TIB || subdet == TOB || subdet == P1PXB || subdet == P2OTB || isDT(subdet) || subdet == RPCBarrel || subdet == TimingBarrel );
37 }
38 
40 {
41  return (!isBarrel(subdet));
42 }
43 
44 
46 {
47  return (subdet == TIB || subdet == TOB ||
48  subdet == TID || subdet == TEC);
49 }
50 
52 {
53  return (subdet == PixelBarrel || subdet == PixelEndcap ||
54  subdet == P1PXB || subdet == P1PXEC || subdet == P2PXEC ||
55  subdet == P2OTB || subdet == P2OTEC);
56 }
57 
59 {
60  return ( isTrackerStrip(subdet) || isTrackerPixel(subdet) );
61 }
62 
63 
65 {
66  return (subdet == DT) ;
67 }
68 
70 {
71  return (subdet == CSC) ;
72 }
73 
74 
76 {
77  return (subdet == RPCBarrel || subdet == RPCEndcap) ;
78 }
79 
81 {
82  return (subdet == GEM ) ;
83 }
84 
86 {
87  return (subdet == ME0 ) ;
88 }
89 
90 
92 {
93  return (subdet == DT || subdet == CSC || isRPC(subdet) || subdet == GEM || subdet == ME0) ;
94 }
95 
97 {
98  return ( subdet == TimingBarrel || subdet == TimingEndcap ) ;
99 }
bool isTracker(const GeomDetEnumerators::SubDetector m)
bool isGEM(const GeomDetEnumerators::SubDetector m)
bool isBarrel(GeomDetEnumerators::SubDetector m)
bool isRPC(const GeomDetEnumerators::SubDetector m)
bool isDT(const GeomDetEnumerators::SubDetector m)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
bool isTrackerStrip(const GeomDetEnumerators::SubDetector m)
bool isEndcap(GeomDetEnumerators::SubDetector m)
bool isMuon(const GeomDetEnumerators::SubDetector m)
bool isME0(const GeomDetEnumerators::SubDetector m)
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
bool isCSC(const GeomDetEnumerators::SubDetector m)
bool isTiming(const GeomDetEnumerators::SubDetector m)