46 : fromDDD_(
p.getParameter<
bool>(
"fromDDD")), fromDD4hep_(
p.getParameter<
bool>(
"fromDD4hep")) {
60 descDB.
add<
bool>(
"fromDDD",
false);
61 descDB.
add<
bool>(
"fromDD4hep",
false);
62 descriptions.
add(
"trackerNumberingExtraGeometryDB", descDB);
65 desc.
add<
bool>(
"fromDDD",
true);
66 desc.
add<
bool>(
"fromDD4hep",
false);
67 descriptions.
add(
"trackerNumberingExtraGeometry", desc);
70 descDD4hep.
add<
bool>(
"fromDDD",
false);
71 descDD4hep.
add<
bool>(
"fromDD4hep",
true);
72 descriptions.
add(
"DD4hep_trackerNumberingExtraGeometry", descDD4hep);
77 auto gde = std::make_unique<std::vector<GeometricDetExtra> >();
88 std::vector<const GeometricDet*> tc =
tracker->components();
89 std::vector<const GeometricDet*>::const_iterator git = tc.begin();
90 std::vector<const GeometricDet*>::const_iterator egit = tc.end();
94 gde->reserve(
tracker->deepComponents().size());
95 for (; git != egit; ++git) {
96 ev.goTo((*git)->navType());
98 std::vector<const GeometricDet*> inone = (*git)->components();
102 std::vector<const GeometricDet*>::const_iterator git2 = inone.begin();
103 std::vector<const GeometricDet*>::const_iterator egit2 = inone.end();
105 for (; git2 != egit2; ++git2) {
106 ev.goTo((*git2)->navType());
108 std::vector<const GeometricDet*> intwo = (*git2)->components();
112 std::vector<const GeometricDet*>::const_iterator git3 = intwo.begin();
113 std::vector<const GeometricDet*>::const_iterator egit3 = intwo.end();
115 for (; git3 != egit3; ++git3) {
116 ev.goTo((*git3)->navType());
118 std::vector<const GeometricDet*> inthree = (*git3)->components();
122 std::vector<const GeometricDet*>::const_iterator git4 = inthree.begin();
123 std::vector<const GeometricDet*>::const_iterator egit4 = inthree.end();
125 for (; git4 != egit4; ++git4) {
126 ev.goTo((*git4)->navType());
128 std::vector<const GeometricDet*> infour = (*git4)->components();
132 std::vector<const GeometricDet*>::const_iterator git5 = infour.begin();
133 std::vector<const GeometricDet*>::const_iterator egit5 = infour.end();
135 for (; git5 != egit5; ++git5) {
136 ev.goTo((*git5)->navType());
138 std::vector<const GeometricDet*> infive = (*git5)->components();
142 std::vector<const GeometricDet*>::const_iterator git6 = infive.begin();
143 std::vector<const GeometricDet*>::const_iterator egit6 = infive.end();
145 for (; git6 != egit6; ++git6) {
146 ev.goTo((*git6)->navType());
148 std::vector<const GeometricDet*> insix = (*git6)->components();
153 edm::LogError(
"GeometricDetExtra") <<
"Hierarchy has exceeded hard-coded level 6 for Tracker ";
174 <<
" xi " <<
tracker->xi() <<
"\n"
175 <<
" PixelROCRows " <<
tracker->pixROCRows() <<
"\n"
176 <<
" PixROCCols " <<
tracker->pixROCCols() <<
"\n"
177 <<
" PixelROC_X " <<
tracker->pixROCx() <<
"\n"
178 <<
" PixelROC_Y " <<
tracker->pixROCy() <<
"\n"
179 <<
"TrackerStereoDetectors " << (
tracker->stereo() ?
"true" :
"false") <<
"\n"
180 <<
"SiliconAPVNumber " <<
tracker->siliconAPVNum() <<
"\n";
184 std::map<uint32_t, const GeometricDet*> helperMap;
186 helperMap[gd.geographicalID()] =
tracker;
187 std::vector<const GeometricDet*> tc =
tracker->components();
188 std::vector<const GeometricDet*>::const_iterator git = tc.begin();
189 std::vector<const GeometricDet*>::const_iterator egit = tc.end();
190 for (; git != egit; ++git) {
191 helperMap[(*git)->geographicalID()] = (*git);
192 std::vector<const GeometricDet*> inone = (*git)->components();
193 std::vector<const GeometricDet*>::const_iterator git2 = inone.begin();
194 std::vector<const GeometricDet*>::const_iterator egit2 = inone.end();
195 for (; git2 != egit2; ++git2) {
196 helperMap[(*git2)->geographicalID()] = (*git2);
197 std::vector<const GeometricDet*> intwo = (*git2)->components();
198 std::vector<const GeometricDet*>::const_iterator git3 = intwo.begin();
199 std::vector<const GeometricDet*>::const_iterator egit3 = intwo.end();
200 for (; git3 != egit3; ++git3) {
201 helperMap[(*git3)->geographicalID()] = (*git3);
202 std::vector<const GeometricDet*> inthree = (*git3)->components();
203 std::vector<const GeometricDet*>::const_iterator git4 = inthree.begin();
204 std::vector<const GeometricDet*>::const_iterator egit4 = inthree.end();
205 for (; git4 != egit4; ++git4) {
206 helperMap[(*git4)->geographicalID()] = (*git4);
207 std::vector<const GeometricDet*> infour = (*git4)->components();
208 std::vector<const GeometricDet*>::const_iterator git5 = infour.begin();
209 std::vector<const GeometricDet*>::const_iterator egit5 = infour.end();
210 for (; git5 != egit5; ++git5) {
211 helperMap[(*git5)->geographicalID()] = (*git5);
212 std::vector<const GeometricDet*> infive = (*git5)->components();
213 std::vector<const GeometricDet*>::const_iterator git6 = infive.begin();
214 std::vector<const GeometricDet*>::const_iterator egit6 = infive.end();
215 for (; git6 != egit6; ++git6) {
216 helperMap[(*git6)->geographicalID()] = (*git6);
217 if (!(*git6)->components().empty()) {
218 edm::LogError(
"GeometricDetExtra") <<
"Hierarchy has exceeded hard-coded level of 6 for Tracker ";
227 const std::vector<PGeometricDetExtra::Item>& pgdes = pgde.
pgdes_;
228 gde->reserve(pgdes.size());
229 std::vector<DDExpandedNode> evs;
231 for (
const auto& pgde : pgdes) {
234 pgde._geographicalId,
258 ((
ev.logicalPart()).solid()).volume(),
259 ((
ev.logicalPart()).material()).
density(),
260 ((
ev.logicalPart()).material()).
density() * (((
ev.logicalPart()).solid()).volume() / 1000.),