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();
Log< level::Info, true > LogVerbatim
void buildBTLModule(FilteredView &, GeometricTimingDet *)
GeometricTimingDet * buildSubdet(FilteredView &)
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
dd4hep::SpecParRefs DDSpecParRefs
const cms::DDDetector * detector() const
DDSpecParRegistry const & specpars() const
static constexpr size_t kNLayerTDR
static constexpr size_t kModStrLen
static constexpr size_t kNLayerPreTDR
constexpr std::array< uint8_t, layerIndexSize > layer
dd4hep::SpecParRegistry DDSpecParRegistry
GeometricTimingDet * buildLayer(FilteredView &)
bool next(int)
set current node to the next node in the filtered tree
void buildETLModule(FilteredView &, GeometricTimingDet *)
dd4hep::Volume worldVolume() const
Handle to the world volume containing everything.
enum GTDEnumType { unknown=100, MTD=0, BTL=1, BTLLayer=2, BTLTray=3, BTLModule=4, BTLSensor=5, BTLCrystal=6, ETL=7, ETLDisc=8, ETLRing=9, ETLModule=10, ETLSensor=11 } GeometricTimingEnumType
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer