29 for (
int i = 1;
i != 7;
i++) {
34 for (
int j = off;
j !=
end; ++
j) {
46 if (ptp.
vpars.size() != 6) {
48 <<
"Tracker parameters block from XMLs called vPars is expected to have 6 entries, but has " << ptp.
vpars.size()
52 const int BIG_PIX_PER_ROC_X = ptp.
vpars[2];
53 const int BIG_PIX_PER_ROC_Y = ptp.
vpars[3];
59 std::vector<const GeometricDet*>
comp;
67 std::vector<GeometricDet::GDEnumType> gdsubdetmap(
71 LogDebug(
"SubDetectorGeometricDetType") <<
"GeometriDet enumerator values of the subdetectors";
72 for (
unsigned int i = 0;
i < subdetgd.size(); ++
i) {
73 assert(subdetgd[
i]->geographicalId().subdetId() > 0 && subdetgd[
i]->geographicalId().subdetId() < 7);
74 gdsubdetmap[subdetgd[
i]->geographicalId().subdetId() - 1] = subdetgd[
i]->type();
75 LogTrace(
"SubDetectorGeometricDetType")
76 <<
"subdet " <<
i <<
" type " << subdetgd[
i]->type() <<
" detid " << subdetgd[
i]->geographicalId().rawId()
77 <<
" subdetid " << subdetgd[
i]->geographicalId().subdetId();
80 std::vector<const GeometricDet*> dets[6];
81 std::vector<const GeometricDet*>& pixB = dets[0];
82 pixB.reserve(
comp.size());
83 std::vector<const GeometricDet*>& pixF = dets[1];
84 pixF.reserve(
comp.size());
85 std::vector<const GeometricDet*>& tib = dets[2];
86 tib.reserve(
comp.size());
87 std::vector<const GeometricDet*>& tid = dets[3];
88 tid.reserve(
comp.size());
89 std::vector<const GeometricDet*>& tob = dets[4];
90 tob.reserve(
comp.size());
91 std::vector<const GeometricDet*>& tec = dets[5];
92 tec.reserve(
comp.size());
95 dets[
i->geographicalId().subdetId() - 1].emplace_back(
i);
101 for (
unsigned int i = 0;
i < 6; ++
i) {
125 for (
unsigned int i = 0;
i < 6; ++
i) {
136 for (
unsigned int i = 0;
i < 6; ++
i) {
140 <<
"Subdetector " <<
i + 1 <<
" is unknown but it is not empty: " << dets[
i].size();
153 std::vector<const GeometricDet*>
const& gdv,
156 bool upgradeGeometry,
157 int BIG_PIX_PER_ROC_X,
158 int BIG_PIX_PER_ROC_Y)
160 LogDebug(
"BuildingGeomDetUnits") <<
" Pixel type. Size of vector: " << gdv.size()
161 <<
" GeomDetType subdetector: " << det
163 <<
" big pix per ROC x: " << BIG_PIX_PER_ROC_X <<
" y: " << BIG_PIX_PER_ROC_Y
164 <<
" is upgrade: " << upgradeGeometry;
168 for (
auto const&
i : gdv) {
171 std::unique_ptr<const Bounds>
bounds(
i->bounds());
174 (
int)
i->pixROCRows(),
175 (
int)
i->pixROCCols(),
189 tracker->addDetUnitId(
i->geographicalId());
198 LogDebug(
"BuildingGeomDetUnits") <<
" Strip type. Size of vector: " << gdv.size()
199 <<
" GeomDetType subdetector: " << det
205 for (
auto const&
i : gdv) {
208 std::unique_ptr<const Bounds>
bounds(
i->bounds());
220 tracker->addDetUnitId(
i->geographicalId());
227 auto const& gdu =
tracker->detUnits();
228 auto const& gduId =
tracker->detUnitIds();
230 for (u_int32_t
i = 0;
i < gdu.size();
i++) {
233 string gduTypeName = gdu[
i]->type().name();
236 if ((gduTypeName.find(
"Ster") != std::string::npos || gduTypeName.find(
"Lower") != std::string::npos) &&
238 int partner_pos = -1;
239 for (u_int32_t
jj = 0;
jj < gduId.size();
jj++) {
245 if (partner_pos == -1) {
246 throw cms::Exception(
"Configuration") <<
"Module Type is Stereo or Lower but no partner detector found \n" 247 <<
"There is a problem on Tracker geometry configuration\n";
252 std::vector<const GeomDetUnit*> composed(2);
256 if (gduTypeName.find(
"Ster") != std::string::npos) {
261 tracker->addDetId(composedDetId);
263 }
else if (gduTypeName.find(
"Lower") != std::string::npos) {
269 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()
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 &)