@@ -72,8 +72,6 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const DDComp
72
72
DDFilteredView fv (cpv, filter);
73
73
74
74
CmsMTDStringToEnum theCmsMTDStringToEnum;
75
- // temporary workaround to distinguish BTL scenarios ordering without introducing a dependency on MTDTopologyMode
76
- auto isBTLV2 = false ;
77
75
// temporary workaround to distinguish ETL scenarios ordering without introducing a dependency on MTDTopologyMode
78
76
const bool prev8 (fv.name ().find (" EModule" ) != std::string::npos);
79
77
@@ -136,12 +134,7 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const DDComp
136
134
// the level chosen for old corresponds to wafers for D50 and previous scenarios
137
135
//
138
136
if ((thisNode == GeometricTimingDet::BTLModule) && limit == 0 ) {
139
- if (theCmsMTDConstruction.isBTLV2 (fv)) {
140
- limit = num;
141
- isBTLV2 = true ;
142
- } else {
143
- limit = num + 1 ;
144
- }
137
+ limit = num;
145
138
} else if ((thisNode == ETLEndComponent) && limit == 0 ) {
146
139
limit = num;
147
140
}
@@ -174,26 +167,15 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const DDComp
174
167
edm::LogVerbatim (" MTDNumbering" ) << " GeometricTimingDet order before sorting \n " << before.str ();
175
168
#endif
176
169
177
- if (!isBTLV2 ) {
178
- for ( size_t index = 0 ; index < layer. size (); index++) {
179
- GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[ index]-> components ();
170
+ for ( size_t index = 0 ; index < layer. size (); index++ ) {
171
+ GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[index]-> components ();
172
+ if ( index > 0 ) {
180
173
std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderZ);
181
174
std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderRR);
182
- if (index > 0 ) {
183
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
184
- }
185
- }
186
- } else {
187
- for (size_t index = 0 ; index < layer.size (); index++) {
188
- GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[index]->components ();
189
- if (index > 0 ) {
190
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderZ);
191
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderRR);
192
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
193
- } else {
194
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderPhi);
195
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderZ);
196
- }
175
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
176
+ } else {
177
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderPhi);
178
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderZ);
197
179
}
198
180
}
199
181
@@ -276,8 +258,6 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const cms::D
276
258
CmsMTDStringToEnum theCmsMTDStringToEnum;
277
259
278
260
CmsMTDConstruction<cms::DDFilteredView> theCmsMTDConstruction;
279
- // temporary workaround to distinguish BTL scenarios ordering without introducing a dependency on MTDTopologyMode
280
- auto isBTLV2 = false ;
281
261
// temporary workaround to distinguish ETL scenarios ordering without introducing a dependency on MTDTopologyMode
282
262
const bool prev8 (fv.name ().find (" EModule" ) != std::string::npos);
283
263
@@ -319,11 +299,6 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const cms::D
319
299
#ifdef EDM_ML_DEBUG
320
300
edm::LogVerbatim (" DD4hep_MTDNumbering" ) << " Registered in GeometricTimingDet as type " << thisNode;
321
301
#endif
322
- if (isBTLV2 == false ) {
323
- if (theCmsMTDConstruction.isBTLV2 (fv)) {
324
- isBTLV2 = true ;
325
- }
326
- }
327
302
theCmsMTDConstruction.buildBTLModule (fv, layer.back ());
328
303
} else if (thisNode == ETLEndComponent) {
329
304
#ifdef EDM_ML_DEBUG
@@ -346,26 +321,15 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const cms::D
346
321
edm::LogVerbatim (" DD4hep_MTDNumbering" ) << " GeometricTimingDet order before sorting \n " << before.str ();
347
322
#endif
348
323
349
- if (!isBTLV2 ) {
350
- for ( size_t index = 0 ; index < layer. size (); index++) {
351
- GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[ index]-> components ();
324
+ for ( size_t index = 0 ; index < layer. size (); index++ ) {
325
+ GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[index]-> components ();
326
+ if ( index > 0 ) {
352
327
std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderZ);
353
328
std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderRR);
354
- if (index > 0 ) {
355
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
356
- }
357
- }
358
- } else {
359
- for (size_t index = 0 ; index < layer.size (); index++) {
360
- GeometricTimingDet::ConstGeometricTimingDetContainer& icomp = layer[index]->components ();
361
- if (index > 0 ) {
362
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderZ);
363
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderRR);
364
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
365
- } else {
366
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderPhi);
367
- std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderZ);
368
- }
329
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::mtdOrderPhi);
330
+ } else {
331
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderPhi);
332
+ std::stable_sort (icomp.begin (), icomp.end (), CmsMTDConstruction<DDFilteredView>::btlOrderZ);
369
333
}
370
334
}
371
335
0 commit comments