30 for (
int i = 1;
i != 7;
i++) {
35 for (
int j = off;
j !=
end; ++
j) {
47 if (ptp.
vpars.size() != 6) {
49 <<
"Tracker parameters block from XMLs called vPars is expected to have 6 entries, but has " << ptp.
vpars.size()
53 const int BIG_PIX_PER_ROC_X = ptp.
vpars[2];
54 const int BIG_PIX_PER_ROC_Y = ptp.
vpars[3];
60 std::vector<const GeometricDet*>
comp;
68 std::vector<GeometricDet::GDEnumType> gdsubdetmap(
72 LogDebug(
"SubDetectorGeometricDetType") <<
"GeometriDet enumerator values of the subdetectors";
73 for (
unsigned int i = 0;
i < subdetgd.size(); ++
i) {
74 assert(subdetgd[
i]->geographicalId().subdetId() > 0 && subdetgd[
i]->geographicalId().subdetId() < 7);
75 gdsubdetmap[subdetgd[
i]->geographicalId().subdetId() - 1] = subdetgd[
i]->type();
76 LogTrace(
"SubDetectorGeometricDetType")
77 <<
"subdet " <<
i <<
" type " << subdetgd[
i]->type() <<
" detid " << subdetgd[
i]->geographicalId().rawId()
78 <<
" subdetid " << subdetgd[
i]->geographicalId().subdetId();
81 std::vector<const GeometricDet*> dets[6];
82 std::vector<const GeometricDet*>& pixB = dets[0];
83 pixB.reserve(
comp.size());
84 std::vector<const GeometricDet*>& pixF = dets[1];
85 pixF.reserve(
comp.size());
86 std::vector<const GeometricDet*>& tib = dets[2];
87 tib.reserve(
comp.size());
88 std::vector<const GeometricDet*>& tid = dets[3];
89 tid.reserve(
comp.size());
90 std::vector<const GeometricDet*>& tob = dets[4];
91 tob.reserve(
comp.size());
92 std::vector<const GeometricDet*>& tec = dets[5];
93 tec.reserve(
comp.size());
96 dets[
i->geographicalId().subdetId() - 1].emplace_back(
i);
102 for (
unsigned int i = 0;
i < 6; ++
i) {
126 for (
unsigned int i = 0;
i < 6; ++
i) {
137 for (
unsigned int i = 0;
i < 6; ++
i) {
141 <<
"Subdetector " <<
i + 1 <<
" is unknown but it is not empty: " << dets[
i].size();
154 std::vector<const GeometricDet*>
const& gdv,
157 bool upgradeGeometry,
158 int BIG_PIX_PER_ROC_X,
159 int BIG_PIX_PER_ROC_Y)
161 LogDebug(
"BuildingGeomDetUnits") <<
" Pixel type. Size of vector: " << gdv.size()
162 <<
" GeomDetType subdetector: " << det
164 <<
" big pix per ROC x: " << BIG_PIX_PER_ROC_X <<
" y: " << BIG_PIX_PER_ROC_Y
165 <<
" is upgrade: " << upgradeGeometry;
169 for (
auto const&
i : gdv) {
172 std::unique_ptr<const Bounds>
bounds(
i->bounds());
175 (
int)
i->pixROCRows(),
176 (
int)
i->pixROCCols(),
190 tracker->addDetUnitId(
i->geographicalId());
199 LogDebug(
"BuildingGeomDetUnits") <<
" Strip type. Size of vector: " << gdv.size()
200 <<
" GeomDetType subdetector: " << det
206 for (
auto const&
i : gdv) {
209 std::unique_ptr<const Bounds>
bounds(
i->bounds());
221 tracker->addDetUnitId(
i->geographicalId());
228 auto const& gdu =
tracker->detUnits();
229 auto const& gduId =
tracker->detUnitIds();
231 for (u_int32_t
i = 0;
i < gdu.size();
i++) {
234 string gduTypeName = gdu[
i]->type().name();
237 if ((gduTypeName.find(
"Ster") != std::string::npos || gduTypeName.find(
"Lower") != std::string::npos ||
238 gduTypeName.find(
"One") != std::string::npos) &&
240 int partner_pos = -1;
241 for (u_int32_t
jj = 0;
jj < gduId.size();
jj++) {
247 if (partner_pos == -1) {
248 throw cms::Exception(
"Configuration") <<
"Module Type is Stereo or Lower but no partner detector found \n" 249 <<
"There is a problem on Tracker geometry configuration\n";
254 std::vector<const GeomDetUnit*> composed(2);
258 if (gduTypeName.find(
"Ster") != std::string::npos) {
263 tracker->addDetId(composedDetId);
265 }
else if (gduTypeName.find(
"Lower") != std::string::npos) {
271 tracker->addDetId(composedDetId);
272 }
else if (gduTypeName.find(
"One") != std::string::npos) {
278 tracker->addDetId(composedDetId);
PlaneBuilderFromGeometricDet::ResultType buildPlaneWithMaterial(const GeometricDet *gd, double scaleFactor=1.) const
PixelTopology * build(const Bounds *bounds, bool upgradeGeometry, int ROWS_PER_ROC, int COLS_PER_ROC, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y, int ROCS_X, int ROCS_Y)
constexpr SubDetector subDetGeom[21]
void buildGeomDet(TrackerGeometry *)
std::map< std::string, const PixelGeomDetType * > thePixelDetTypeMap
unsigned int offsetDU(SubDetector sid) const
std::map< std::string, const StripGeomDetType * > theStripDetTypeMap
ResultType plane(const GeometricDet *gd) const
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
ConstGeometricDetContainer & components()
uint32_t doubleSensor(const DetId &id) const
ResultType plane(const std::vector< const GeomDetUnit *> &dets) const
uint32_t stack(const DetId &id) const
unsigned int endsetDU(SubDetector sid) const
DetId partnerDetId(const DetId &id) const
std::vector< GeometricDet const * > ConstGeometricDetContainer
uint32_t glued(const DetId &id) const
const Plane & surface() const
The nominal surface of the GeomDet.
ConstGeometricDetContainer deepComponents() const
void buildSilicon(std::vector< const GeometricDet *> const &, TrackerGeometry *, GeomDetType::SubDetector det, const std::string &part)
void buildPixel(std::vector< const GeometricDet *> const &, TrackerGeometry *, GeomDetType::SubDetector det, bool upgradeGeometry, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y)
const TrackerTopology * theTopo
constexpr SubDetector tkDetEnum[8]
StripTopology * build(const Bounds *, double, const std::string &)