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)
7  return s << "barrel";
8  else
9  return s << "endcap";
10 }
11 
12 std::ostream& operator<<(std::ostream& s, SubDetector m) {
13  if (m == PixelBarrel)
14  return s << "PixelBarrel";
15  else if (m == PixelEndcap)
16  return s << "PixelEndcap";
17  else if (m == TIB)
18  return s << "TIB";
19  else if (m == TOB)
20  return s << "TOB";
21  else if (m == TID)
22  return s << "TID";
23  else if (m == TEC)
24  return s << "TEC";
25  else if (m == DT)
26  return s << "DT";
27  else if (m == CSC)
28  return s << "CSC";
29  else if (m == RPCBarrel)
30  return s << "RPCBarrel";
31  else if (m == RPCEndcap)
32  return s << "RPCEndcap";
33  else if (m == GEM)
34  return s << "GEM";
35  else if (m == ME0)
36  return s << "ME0";
37  else if (m == P2OTB)
38  return s << "Phase2OTBarrel";
39  else if (m == P2OTEC)
40  return s << "Phase2OTEndcap";
41  else if (m == P1PXB)
42  return s << "Phase1PixelBarrel";
43  else if (m == P2PXB)
44  return s << "Phase2PixelBarrel";
45  else if (m == P1PXEC)
46  return s << "Phase1PixelEndcap";
47  else if (m == P2PXEC)
48  return s << "Phase2PixelEndcap";
49  else if (m == TimingBarrel)
50  return s << "Phase2TimingBarrel";
51  else if (m == TimingEndcap)
52  return s << "Phase2TimingEndcap";
53  else
54  return s << "?";
55 }
56 
58  return (subdet == PixelBarrel || subdet == TIB || subdet == TOB || subdet == P1PXB || subdet == P2PXB ||
59  subdet == P2OTB || isDT(subdet) || subdet == RPCBarrel || subdet == TimingBarrel);
60 }
61 
63 
65  return (subdet == TIB || subdet == TOB || subdet == TID || subdet == TEC);
66 }
67 
69  return (subdet == PixelBarrel || subdet == PixelEndcap || subdet == P1PXB || subdet == P1PXEC || subdet == P2PXB ||
70  subdet == P2PXEC || subdet == P2OTB || subdet == P2OTEC);
71 }
72 
74  return (subdet == PixelBarrel || subdet == PixelEndcap || subdet == P1PXB || subdet == P1PXEC || subdet == P2PXB ||
75  subdet == P2PXEC);
76 }
77 
79  return (subdet == TIB || subdet == TOB || subdet == TID || subdet == TEC || subdet == P2OTB || subdet == P2OTEC);
80 }
81 
83  return (isTrackerStrip(subdet) || isTrackerPixel(subdet));
84 }
85 
86 bool GeomDetEnumerators::isDT(const GeomDetEnumerators::SubDetector subdet) { return (subdet == DT); }
87 
88 bool GeomDetEnumerators::isCSC(const GeomDetEnumerators::SubDetector subdet) { return (subdet == CSC); }
89 
91  return (subdet == RPCBarrel || subdet == RPCEndcap);
92 }
93 
94 bool GeomDetEnumerators::isGEM(const GeomDetEnumerators::SubDetector subdet) { return (subdet == GEM); }
95 
96 bool GeomDetEnumerators::isME0(const GeomDetEnumerators::SubDetector subdet) { return (subdet == ME0); }
97 
99  return (subdet == DT || subdet == CSC || isRPC(subdet) || subdet == GEM || subdet == ME0);
100 }
101 
103  return (subdet == TimingBarrel || subdet == TimingEndcap);
104 }
bool isOuterTracker(GeomDetEnumerators::SubDetector m)
bool isBarrel(GeomDetEnumerators::SubDetector m)
bool isME0(GeomDetEnumerators::SubDetector m)
bool isDT(GeomDetEnumerators::SubDetector m)
bool isTiming(GeomDetEnumerators::SubDetector m)
bool isGEM(GeomDetEnumerators::SubDetector m)
bool isEndcap(GeomDetEnumerators::SubDetector m)
bool isTrackerStrip(GeomDetEnumerators::SubDetector m)
bool isMuon(GeomDetEnumerators::SubDetector m)
bool isRPC(GeomDetEnumerators::SubDetector m)
bool isInnerTracker(GeomDetEnumerators::SubDetector m)
bool isCSC(GeomDetEnumerators::SubDetector m)
bool isTracker(GeomDetEnumerators::SubDetector m)
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
std::ostream & operator<<(std::ostream &s, Location l)