14 template <
class FilteredView>
17 template <
class FilteredView>
19 bool order = (
a->translation().z() ==
b->translation().z()) ?
a->translation().rho() <
b->translation().rho()
20 :
a->translation().z() <
b->translation().z();
24 template <
class FilteredView>
28 return id1.mtdRR() <
id2.mtdRR();
31 template <
class FilteredView>
45 auto module_number = copyNumbers[copyNumbers.size() - 2];
47 constexpr
char positive[] =
"PositiveZ";
48 constexpr
char negative[] =
"NegativeZ";
51 size_t delim1 =
modname.find(
"BModule");
52 size_t delim2 =
modname.find(
"Layer");
56 edm::LogVerbatim(
"MTDNumbering") <<
"BTLModule = " <<
modname <<
" " << copyNumbers[copyNumbers.size() - 3] <<
" "
60 if (
modname.find(positive) != std::string::npos) {
61 det->setGeographicalID(
BTLDetId(1, copyNumbers[copyNumbers.size() - 3], module_number, 0, 1));
62 }
else if (
modname.find(negative) != std::string::npos) {
63 det->setGeographicalID(
BTLDetId(0, copyNumbers[copyNumbers.size() - 3], module_number, 0, 1));
66 <<
"BTL Module " << module_number <<
" is neither positive nor negative in Z!";
79 auto module_number = copyNumbers[1];
81 constexpr
char positive[] =
"PositiveZ";
82 constexpr
char negative[] =
"NegativeZ";
85 size_t delim1 =
modname.find(
"BModule");
86 size_t delim2 =
modname.find(
"Layer");
94 if (
modname.find(positive) != std::string::npos) {
95 det->setGeographicalID(
BTLDetId(1, copyNumbers[2], module_number, 0, 1));
96 }
else if (
modname.find(negative) != std::string::npos) {
97 det->setGeographicalID(
BTLDetId(0, copyNumbers[2], module_number, 0, 1));
100 <<
"BTL Module " << module_number <<
" is neither positive nor negative in Z!";
122 baseNumber_.setSize(gh.size());
124 for (
uint i = gh.size();
i-- > 0;) {
126 int copyN(gh[
i].copyno());
127 baseNumber_.addLevel(
name, copyN);
133 det->setGeographicalID(
ETLDetId(etlScheme_.getUnitID(baseNumber_)));
137 auto module_number = copyNumbers[copyNumbers.size() - 2];
139 size_t delim_ring = det->name().find(
"EModule");
140 size_t delim_disc = det->name().find(
"Disc");
144 const uint32_t side = det->translation().z() > 0 ? 1 : 0;
147 det->setGeographicalID(
ETLDetId(side, atoi(ringN.c_str()), module_number, 0));
160 baseNumber_.setSize(fv.
copyNos().size());
166 baseNumber_.addLevel(
name, copyN);
172 det->setGeographicalID(
ETLDetId(etlScheme_.getUnitID(baseNumber_)));
177 template <
class FilteredView>
180 auto thisDet = theCmsMTDStringToEnum.type(nodeName);
183 if (thisDet == GeometricTimingDet::BTL) {
185 }
else if (thisDet == GeometricTimingDet::ETL) {
186 const uint32_t side = subdet->
translation().z() > 0 ? 1 : 0;
189 throw cms::Exception(
"CmsMTDConstruction") <<
" ERROR - I was expecting a SubDet, I got a " << fv.name();
195 template <
class FilteredView>
198 auto thisDet = theCmsMTDStringToEnum.type(nodeName);
201 if (thisDet != GeometricTimingDet::BTLLayer && thisDet != GeometricTimingDet::ETLDisc) {
202 throw cms::Exception(
"CmsMTDConstruction") <<
" ERROR - I was expecting a SubDet, I got a " << fv.name();
206 if (thisDet == GeometricTimingDet::BTLLayer) {
211 layer->setGeographicalID(nLayer);
212 }
else if (thisDet == GeometricTimingDet::ETLDisc) {
216 nLayer = (fv.name().find(
"Disc1") != std::string::npos) ? 1 : 2;
217 layer->setGeographicalID(nLayer);
223 template <
class FilteredView>
225 return (fv.name() ==
"EModule_Timingactive");