22 if (trackerTopology.
pxfSide(detId) == 1) {
24 }
else if (trackerTopology.
pxfSide(detId) == 2) {
28 <<
"Tracker hit for seeding in FPix seems neither on positive nor on negative disk side: " 29 << trackerTopology.
print(detId).c_str();
42 if (trackerTopology.
tidSide(detId) == 1) {
44 }
else if (trackerTopology.
tidSide(detId) == 2) {
48 <<
"Tracker hit for seeding in TID seems neither on positive nor on negative disk side: " 49 << trackerTopology.
print(detId).c_str();
62 if (trackerTopology.
tecSide(detId) == 1) {
64 }
else if (trackerTopology.
tecSide(detId) == 2) {
68 <<
"Tracker hit for seeding in TEC seems neither on positive nor on negative disk side: " 69 << trackerTopology.
print(detId).c_str();
74 <<
"Cannot determine seeding layer from DetId:" << trackerTopology.
print(detId).c_str() << std::endl;
76 edm::LogVerbatim(
"TrackingLayer") <<
"LayerSpec::createFromDetId: " << trackerTopology.
print(detId).c_str()
83 if (layerSpecification.substr(0, 4) ==
"BPix") {
86 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
87 }
else if (layerSpecification.substr(0, 4) ==
"FPix") {
89 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
90 if (layerSpecification.substr(layerSpecification.size() - 3) ==
"pos") {
92 }
else if (layerSpecification.substr(layerSpecification.size() - 3) ==
"neg") {
96 <<
"FPix seeding layer configuration '" << layerSpecification.c_str()
97 <<
"' does not specify the side correctly!";
100 }
else if (layerSpecification.substr(0, 3) ==
"TIB") {
103 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(3, 1).c_str());
104 }
else if (layerSpecification.substr(0, 4) ==
"MTIB") {
107 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
110 else if (layerSpecification.substr(0, 3) ==
"TID") {
112 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(3, 1).c_str());
113 if (layerSpecification.substr(layerSpecification.size() - 3) ==
"pos") {
115 }
else if (layerSpecification.substr(layerSpecification.size() - 3) ==
"neg") {
119 <<
"TID seeding layer configuration '" << layerSpecification.c_str()
120 <<
"' does not specify the side correctly!";
122 }
else if (layerSpecification.substr(0, 4) ==
"MTID") {
124 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
125 if (layerSpecification.substr(layerSpecification.size() - 3) ==
"pos") {
127 }
else if (layerSpecification.substr(layerSpecification.size() - 3) ==
"neg") {
131 <<
"MTID seeding layer configuration '" << layerSpecification.c_str()
132 <<
"' does not specify the side correctly!";
134 }
else if (layerSpecification.substr(0, 3) ==
"TOB") {
137 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(3, 1).c_str());
138 }
else if (layerSpecification.substr(0, 4) ==
"MTOB") {
141 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
142 }
else if (layerSpecification.substr(0, 3) ==
"TEC") {
144 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(3, 1).c_str());
145 if (layerSpecification.substr(layerSpecification.size() - 3) ==
"pos") {
147 }
else if (layerSpecification.substr(layerSpecification.size() - 3) ==
"neg") {
151 <<
"TEC seeding layer configuration '" << layerSpecification.c_str()
152 <<
"' does not specify the side correctly!";
155 }
else if (layerSpecification.substr(0, 4) ==
"MTEC") {
157 trackingLayer.
_layerNumber = std::atoi(layerSpecification.substr(4, 1).c_str());
158 if (layerSpecification.substr(layerSpecification.size() - 3) ==
"pos") {
160 }
else if (layerSpecification.substr(layerSpecification.size() - 3) ==
"neg") {
164 <<
"MTEC seeding layer configuration '" << layerSpecification.c_str()
165 <<
"' does not specify the side correctly!";
169 <<
"Bad data naming in seeding layer configuration." 170 <<
"no case sensitive name of ['BPix','FPix','TIB','MTIB','TID','MTID','TOB','TEC','MTEC'] matches '" 171 << layerSpecification.c_str() <<
"'";
173 edm::LogVerbatim(
"TrackingLayer") <<
"LayerSpec::createFromString: " << layerSpecification.c_str()
176 return trackingLayer;
180 std::stringstream
ss;
220 std::stringstream
ss;
unsigned int getLayerNumber() const
Log< level::Info, true > LogVerbatim
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tidSide(const DetId &id) const
std::string print(DetId detid) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
static TrackingLayer createFromDetId(const DetId &detId, const TrackerTopology &trackerTopology)
std::string toString() const
std::string toIdString() const
static const eqfct _eqfct
unsigned int tecSide(const DetId &id) const
unsigned int getSubDetNumber() const
unsigned int pxfDisk(const DetId &id) const
static TrackingLayer createFromString(std::string layerSpecification)
unsigned int _layerNumber
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
unsigned int pxfSide(const DetId &id) const
static constexpr auto TIB
unsigned int tibLayer(const DetId &id) const
static constexpr auto TID
unsigned int getSideNumber() const