CMS 3D CMS Logo

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 == P2PXB ) return s << "Phase2PixelBarrel";
27  else if ( m == P1PXEC ) return s << "Phase1PixelEndcap";
28  else if ( m == P2PXEC ) return s << "Phase2PixelEndcap";
29  else if ( m == TimingBarrel ) return s << "Phase2TimingBarrel";
30  else if ( m == TimingEndcap ) return s << "Phase2TimingEndcap";
31  else return s << "?";
32 }
33 
34 
36 {
37  return (subdet == PixelBarrel || subdet == TIB || subdet == TOB || subdet == P1PXB || subdet == P2PXB || subdet == P2OTB || isDT(subdet) || subdet == RPCBarrel || subdet == TimingBarrel );
38 }
39 
41 {
42  return (!isBarrel(subdet));
43 }
44 
45 
47 {
48  return (subdet == TIB || subdet == TOB ||
49  subdet == TID || subdet == TEC);
50 }
51 
53 {
54  return (subdet == PixelBarrel || subdet == PixelEndcap ||
55  subdet == P1PXB || subdet == P1PXEC || subdet == P2PXB || subdet == P2PXEC ||
56  subdet == P2OTB || subdet == P2OTEC);
57 }
58 
60 {
61  return ( isTrackerStrip(subdet) || isTrackerPixel(subdet) );
62 }
63 
64 
66 {
67  return (subdet == DT) ;
68 }
69 
71 {
72  return (subdet == CSC) ;
73 }
74 
75 
77 {
78  return (subdet == RPCBarrel || subdet == RPCEndcap) ;
79 }
80 
82 {
83  return (subdet == GEM ) ;
84 }
85 
87 {
88  return (subdet == ME0 ) ;
89 }
90 
91 
93 {
94  return (subdet == DT || subdet == CSC || isRPC(subdet) || subdet == GEM || subdet == ME0) ;
95 }
96 
98 {
99  return ( subdet == TimingBarrel || subdet == TimingEndcap ) ;
100 }
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)
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)
std::ostream & operator<<(std::ostream &s, Location l)