CMS 3D CMS Logo

TrackerDetIdSelector.cc
Go to the documentation of this file.
2 
3 #define DETIDFCT(NAME) \
4  NAME ,[](const TrackerTopology& trackerTopology, const DetId& detId) -> int
5 
6 #define TOPOFCT(NAME) \
7  #NAME ,[](const TrackerTopology& trackerTopology, const DetId& detId) -> int {return trackerTopology.NAME(detId);}
8 
10 
11  {DETIDFCT("subdetId"){return (uint32_t)detId.subdetId();}},
12 
13  {DETIDFCT("BPX"){return PixelSubdetector::PixelBarrel;}},
14  {DETIDFCT("FPX"){return PixelSubdetector::PixelEndcap;}},
15  {DETIDFCT("TIB"){return StripSubdetector::TIB;}},
16  {DETIDFCT("TID"){return StripSubdetector::TID;}},
17  {DETIDFCT("TOB"){return StripSubdetector::TOB;}},
18  {DETIDFCT("TEC"){return StripSubdetector::TEC;}},
19 
20  {DETIDFCT("BARREL"){return 0;}},
21  {DETIDFCT("ZMINUS"){return 1;}},
22  {DETIDFCT("ZPLUS"){return 2;}},
23 
24  {TOPOFCT(layer)},
25  {TOPOFCT(module)},
26  {TOPOFCT(side)},
27 
28  {TOPOFCT(pxbLadder)},
29  {TOPOFCT(pxbLayer)},
30  {TOPOFCT(pxbModule)},
31 
32  {TOPOFCT(pxfBlade)},
33  {TOPOFCT(pxfDisk)},
34  {TOPOFCT(pxfModule)},
35  {TOPOFCT(pxfPanel)},
36  {TOPOFCT(pxfSide)},
37 
38  {TOPOFCT(tibGlued)},
39  {TOPOFCT(tibIsDoubleSide)},
40  {TOPOFCT(tibIsExternalString)},
41  {TOPOFCT(tibIsInternalString)},
42  {TOPOFCT(tibIsRPhi)},
43  {TOPOFCT(tibIsStereo)},
44  {TOPOFCT(tibIsZMinusSide)},
45  {TOPOFCT(tibIsZPlusSide)},
46  {TOPOFCT(tibLayer)},
47  {TOPOFCT(tibModule)},
48  {TOPOFCT(tibOrder)},
49  {TOPOFCT(tibSide)},
50  {TOPOFCT(tibStereo)},
51  {TOPOFCT(tibString)},
52 
53  {TOPOFCT(tidGlued)},
54  {TOPOFCT(tidIsBackRing)},
55  {TOPOFCT(tidIsDoubleSide)},
56  {TOPOFCT(tidIsFrontRing)},
57  {TOPOFCT(tidIsRPhi)},
58  {TOPOFCT(tidIsStereo)},
59  {TOPOFCT(tidIsZMinusSide)},
60  {TOPOFCT(tidIsZPlusSide)},
61  {TOPOFCT(tidModule)},
62  {TOPOFCT(tidOrder)},
63  {TOPOFCT(tidRing)},
64  {TOPOFCT(tidSide)},
65  {TOPOFCT(tidStereo)},
66  {TOPOFCT(tidWheel)},
67 
68  {TOPOFCT(tobGlued)},
69  {TOPOFCT(tobIsDoubleSide)},
70  {TOPOFCT(tobIsRPhi)},
71  {TOPOFCT(tobIsStereo)},
72  {TOPOFCT(tobIsZMinusSide)},
73  {TOPOFCT(tobIsZPlusSide)},
74  {TOPOFCT(tobLayer)},
75  {TOPOFCT(tobModule)},
76  {TOPOFCT(tobRod)},
77  {TOPOFCT(tobSide)},
78  {TOPOFCT(tobStereo)},
79 
80  {TOPOFCT(tecGlued)},
81  {TOPOFCT(tecIsBackPetal)},
82  {TOPOFCT(tecIsDoubleSide)},
83  {TOPOFCT(tecIsFrontPetal)},
84  {TOPOFCT(tecIsRPhi)},
85  {TOPOFCT(tecIsStereo)},
86  {TOPOFCT(tecIsZMinusSide)},
87  {TOPOFCT(tecIsZPlusSide)},
88  {TOPOFCT(tecModule)},
89  {TOPOFCT(tecOrder)},
90  {TOPOFCT(tecPetalNumber)},
91  {TOPOFCT(tecRing)},
92  {TOPOFCT(tecSide)},
93  {TOPOFCT(tecStereo)},
94  {TOPOFCT(tecWheel)}
95 
96 };
97 
98 
100 {
102  return ast;
103 }
104 
106 {
108  return ast;
109 }
110 
112 {
113  ExpressionAST ast = BinaryOP(BinaryOP::OP::EQUAL, lhs, rhs);
114  return ast;
115 }
116 
118 {
120  return ast;
121 }
122 
124 {
125  ExpressionAST ast = BinaryOP(::BinaryOP::OP::LESS, lhs, rhs);
126  return ast;
127 }
128 
130 {
132  return ast;
133 }
134 
136 {
137  ExpressionAST ast = BinaryOP(BinaryOP::OP::AND, lhs, rhs);
138  return ast;
139 }
140 
142 {
143  ExpressionAST ast = BinaryOP(BinaryOP::OP::OR, lhs, rhs);
144  return ast;
145 }
146 
147 
149 {
151  return *this;
152 }
ExpressionAST operator&&(ExpressionAST const &lhs, ExpressionAST const &rhs)
#define DETIDFCT(NAME)
ExpressionAST & operator!()
static const StringFunctionMap functionTable
#define TOPOFCT(NAME)
std::unordered_map< std::string, DetIdFunction > StringFunctionMap
ExpressionAST operator>(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator<(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator||(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator!=(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator<=(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator==(ExpressionAST const &lhs, ExpressionAST const &rhs)
ExpressionAST operator>=(ExpressionAST const &lhs, ExpressionAST const &rhs)
Definition: vlib.h:208