CMS 3D CMS Logo

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