229 auto mtd = std::make_unique<GeometricTimingDet>(&fv, GeometricTimingDet::MTD);
234 mypar.filter(ref, attribute,
"BarrelTimingLayer");
235 mypar.filter(ref, attribute,
"EndcapTimingLayer");
236 fv.mergedSpecifics(ref);
239 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Active filters using " << attribute <<
":";
242 log <<
"Filtered DD SpecPar Registry size: " << ref.size() <<
"\n";
243 for (
const auto&
t : ref) {
244 log <<
"\nSpecPar " <<
t.first <<
":\nRegExps { ";
245 for (
const auto& ki :
t.second->paths)
248 for (
const auto& kl :
t.second->spars) {
249 log << kl.first <<
" = ";
250 for (
const auto& kil : kl.second) {
259 bool doSubdet = fv.firstChild();
266 auto isBTLV2 =
false;
268 const bool prev8(fv.name().find(
"EModule") != std::string::npos);
273 ETLEndComponent = GeometricTimingDet::ETLSensor;
275 ETLEndComponent = GeometricTimingDet::ETLSensor;
278 std::vector<GeometricTimingDet*> subdet;
279 std::vector<GeometricTimingDet*>
layer;
290 <<
"Module = " << fv.name() <<
" fullNode = " << fullNode <<
" thisNode = " << thisNode;
293 if (fullNode == GeometricTimingDet::BTL || fullNode == GeometricTimingDet::ETL) {
296 subdet.emplace_back(theCmsMTDConstruction.
buildSubdet(fv));
298 if (fullNode == GeometricTimingDet::BTLLayer || fullNode == GeometricTimingDet::ETLDisc) {
304 if (thisNode == GeometricTimingDet::BTLModule) {
306 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
308 if (isBTLV2 ==
false) {
309 if (theCmsMTDConstruction.
isBTLV2(fv)) {
314 }
else if (thisNode == ETLEndComponent) {
316 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"Registered in GeometricTimingDet as type " << thisNode;
321 doSubdet = fv.firstChild();
327 auto comp =
mtd->deepComponents();
329 for (
const auto&
it :
comp) {
330 before <<
"ORDER1 " <<
it->geographicalId().rawId() <<
" " <<
it->type() <<
" " <<
it->translation().z() <<
"\n";
332 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"GeometricTimingDet order before sorting \n" << before.str();
361 subdet[0]->addComponent(
layer[0]);
366 subdet[1]->addComponent(
layer[1]);
367 subdet[2]->addComponent(
layer[2]);
369 subdet[1]->addComponent(
layer[1]);
370 subdet[1]->addComponent(
layer[2]);
371 subdet[2]->addComponent(
layer[3]);
372 subdet[2]->addComponent(
layer[4]);
379 mtd.get()->addComponents(subdet);
385 for (
const auto&
it :
comp) {
386 after <<
"ORDER2 " <<
it->geographicalId().rawId() <<
" " <<
static_cast<MTDDetId>(
it->geographicalId()).mtdRR()
387 <<
" " <<
it->type() <<
" " <<
it->translation().z() <<
" " 390 edm::LogVerbatim(
"DD4hep_MTDNumbering") <<
"GeometricTimingDet order after sorting \n" << after.str();
Log< level::Info, true > LogVerbatim
bool isBTLV2(FilteredView &)
void buildBTLModule(FilteredView &, GeometricTimingDet *)
GeometricTimingDet * buildSubdet(FilteredView &)
GeometricTimingDet::GeometricTimingEnumType type(std::string const &) const
dd4hep::SpecParRefs DDSpecParRefs
constexpr NumType convertRadToDeg(NumType radians)
const cms::DDDetector * detector() const
DDSpecParRegistry const & specpars() const
static constexpr size_t kNLayerTDR
static constexpr size_t kModStrLen
static constexpr size_t kNLayerPreTDR
Detector identifier base class for the MIP Timing 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.
constexpr valType make0To2pi(valType angle)
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