test
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 return s << "?";
29 }
30 
31 
33 {
34  return (subdet == PixelBarrel || subdet == TIB || subdet == TOB || subdet == P1PXB || subdet == P2OTB || isDT(subdet) || subdet == RPCBarrel);
35 }
36 
38 {
39  return (!isBarrel(subdet));
40 }
41 
42 
44 {
45  return (subdet == TIB || subdet == TOB ||
46  subdet == TID || subdet == TEC);
47 }
48 
50 {
51  return (subdet == PixelBarrel || subdet == PixelEndcap ||
52  subdet == P1PXB || subdet == P1PXEC || subdet == P2PXEC ||
53  subdet == P2OTB || subdet == P2OTEC);
54 }
55 
57 {
58  return ( isTrackerStrip(subdet) || isTrackerPixel(subdet) );
59 }
60 
61 
63 {
64  return (subdet == DT) ;
65 }
66 
68 {
69  return (subdet == CSC) ;
70 }
71 
72 
74 {
75  return (subdet == RPCBarrel || subdet == RPCEndcap) ;
76 }
77 
79 {
80  return (subdet == GEM ) ;
81 }
82 
84 {
85  return (subdet == ME0 ) ;
86 }
87 
88 
90 {
91  return (subdet == DT || subdet == CSC || isRPC(subdet) || subdet == GEM || subdet == ME0) ;
92 }
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:187
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)