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 }
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
GeomDetEnumerators::RPCEndcap
Definition: GeomDetEnumerators.h:20
GeomDetEnumerators::TID
Definition: GeomDetEnumerators.h:15
GeomDetEnumerators::isRPC
bool isRPC(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:90
GeomDetEnumerators::TIB
Definition: GeomDetEnumerators.h:13
GeomDetEnumerators::isMuon
bool isMuon(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:98
GeomDetEnumerators::P2OTB
Definition: GeomDetEnumerators.h:23
GeomDetEnumerators::TOB
Definition: GeomDetEnumerators.h:14
GeomDetEnumerators::isTracker
bool isTracker(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:82
GeomDetEnumerators::barrel
Definition: GeomDetEnumerators.h:9
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
alignCSCRings.s
s
Definition: alignCSCRings.py:92
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
GeomDetEnumerators::TimingBarrel
Definition: GeomDetEnumerators.h:29
GeomDetEnumerators::P2OTEC
Definition: GeomDetEnumerators.h:24
GeomDetEnumerators::isInnerTracker
bool isInnerTracker(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:73
GeomDetEnumerators::isCSC
bool isCSC(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:88
GeomDetEnumerators::CSC
Definition: GeomDetEnumerators.h:17
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
GeomDetEnumerators::DT
Definition: GeomDetEnumerators.h:18
GeomDetEnumerators::TEC
Definition: GeomDetEnumerators.h:16
GeomDetEnumerators::isOuterTracker
bool isOuterTracker(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:78
GeomDetEnumerators::isTrackerPixel
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:68
GeomDetEnumerators::isBarrel
bool isBarrel(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:57
GeomDetEnumerators::TimingEndcap
Definition: GeomDetEnumerators.h:30
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
GeomDetEnumerators
Definition: GeomDetEnumerators.h:8
GeomDetEnumerators::Location
Location
Definition: GeomDetEnumerators.h:9
GeomDetEnumerators.h
GeomDetEnumerators::isME0
bool isME0(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:96
GeomDetEnumerators::GEM
Definition: GeomDetEnumerators.h:21
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
GeomDetEnumerators::RPCBarrel
Definition: GeomDetEnumerators.h:19
GeomDetEnumerators::P2PXB
Definition: GeomDetEnumerators.h:27
GeomDetEnumerators::isGEM
bool isGEM(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:94
GeomDetEnumerators::ME0
Definition: GeomDetEnumerators.h:22
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
operator<<
std::ostream & operator<<(std::ostream &s, Location l)
Definition: GeomDetEnumerators.cc:5
GeomDetEnumerators::isDT
bool isDT(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:86
GeomDetEnumerators::isTrackerStrip
bool isTrackerStrip(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:64
GeomDetEnumerators::P2PXEC
Definition: GeomDetEnumerators.h:28
GeomDetEnumerators::isTiming
bool isTiming(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:102