27 if (
ev.logicalPart().name().fullname().find(
test) != std::string::npos)
31 if (
ev.logicalPart().name().fullname().find(
test) != std::string::npos)
55 filter.veto(
"SupportPlate");
57 filter.veto(
"ThermalScreen");
58 filter.veto(
"Aluminium_Disc");
59 filter.veto(
"MIC6_Aluminium_Disc");
64 filter.veto(
"SensorModule");
66 filter.veto(
"LGAD_Substrate");
73 if (check_root != GeometricTimingDet::MTD) {
76 if (check_child != GeometricTimingDet::MTD) {
77 throw cms::Exception(
"Configuration") <<
" The first child of the DDFilteredView is not what is expected \n"
87 auto mtd = std::make_unique<GeometricTimingDet>(&fv, GeometricTimingDet::MTD);
91 std::vector<GeometricTimingDet*> subdet;
92 std::vector<GeometricTimingDet*>
layer;
102 <<
" thisNode = " << thisNode;
105 if (fullNode == GeometricTimingDet::BTL || fullNode == GeometricTimingDet::ETL) {
110 subdet.emplace_back(theCmsMTDConstruction.
buildSubdet(fv));
112 if (fullNode == GeometricTimingDet::BTLLayer || fullNode == GeometricTimingDet::ETLDisc) {
121 if ((thisNode == GeometricTimingDet::BTLModule) &&
limit == 0) {
127 else if ((thisNode == GeometricTimingDet::ETLModule) &&
limit == 0) {
128 if (theCmsMTDConstruction.
isETLtdr(fv)) {
137 if (thisNode == GeometricTimingDet::BTLModule) {
139 edm::LogVerbatim(
"MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
143 }
else if (thisNode == GeometricTimingDet::ETLModule) {
145 edm::LogVerbatim(
"MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
155 auto comp =
mtd->deepComponents();
157 for (
const auto& it :
comp) {
158 before <<
"ORDER1 " << it->geographicalId().rawId() <<
" " << it->type() <<
" " << it->translation().z() <<
"\n";
160 edm::LogVerbatim(
"MTDNumbering") <<
"GeometricTimingDet order before sorting \n" << before.str();
175 subdet[0]->addComponent(
layer[0]);
180 subdet[1]->addComponent(
layer[1]);
181 subdet[2]->addComponent(
layer[2]);
183 subdet[1]->addComponent(
layer[1]);
184 subdet[1]->addComponent(
layer[2]);
185 subdet[2]->addComponent(
layer[3]);
186 subdet[2]->addComponent(
layer[4]);
193 mtd.get()->addComponents(subdet);
199 for (
const auto& it :
comp) {
200 after <<
"ORDER2 " << it->geographicalId().rawId() <<
" " << it->type() <<
" " << it->translation().z() <<
"\n";
202 edm::LogVerbatim(
"MTDNumbering") <<
"GeometricTimingDet order after sorting \n" << after.str();
213 auto mtd = std::make_unique<GeometricTimingDet>(&fv, GeometricTimingDet::MTD);
218 mypar.filter(ref, attribute,
"BarrelTimingLayer");
219 mypar.filter(ref, attribute,
"EndcapTimingLayer");
220 fv.mergedSpecifics(ref);
223 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Active filters using " << attribute <<
":";
226 log <<
"Filtered DD SpecPar Registry size: " << ref.size() <<
"\n";
227 for (
const auto&
t : ref) {
228 log <<
"\nSpecPar " <<
t.first <<
":\nRegExps { ";
229 for (
const auto& ki :
t.second->paths)
232 for (
const auto& kl :
t.second->spars) {
233 log << kl.first <<
" = ";
234 for (
const auto& kil : kl.second) {
243 bool doSubdet = fv.firstChild();
250 std::vector<GeometricTimingDet*> subdet;
251 std::vector<GeometricTimingDet*>
layer;
262 <<
"Module = " << fv.name() <<
" fullNode = " << fullNode <<
" thisNode = " << thisNode;
265 if (fullNode == GeometricTimingDet::BTL || fullNode == GeometricTimingDet::ETL) {
268 subdet.emplace_back(theCmsMTDConstruction.
buildSubdet(fv));
270 if (fullNode == GeometricTimingDet::BTLLayer || fullNode == GeometricTimingDet::ETLDisc) {
276 if (thisNode == GeometricTimingDet::BTLModule) {
278 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
281 }
else if (thisNode == GeometricTimingDet::ETLModule) {
283 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
288 doSubdet = fv.firstChild();
294 auto comp =
mtd->deepComponents();
296 for (
const auto& it :
comp) {
297 before <<
"ORDER1 " << it->geographicalId().rawId() <<
" " << it->type() <<
" " << it->translation().z() <<
"\n";
299 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"GeometricTimingDet order before sorting \n" << before.str();
314 subdet[0]->addComponent(
layer[0]);
319 subdet[1]->addComponent(
layer[1]);
320 subdet[2]->addComponent(
layer[2]);
322 subdet[1]->addComponent(
layer[1]);
323 subdet[1]->addComponent(
layer[2]);
324 subdet[2]->addComponent(
layer[3]);
325 subdet[2]->addComponent(
layer[4]);
332 mtd.get()->addComponents(subdet);
338 for (
const auto& it :
comp) {
339 after <<
"ORDER2 " << it->geographicalId().rawId() <<
" " << it->type() <<
" " << it->translation().z() <<
"\n";
341 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"GeometricTimingDet order after sorting \n" << after.str();