30 for (
int i = 1;
i != 7;
i++) {
35 for (
int j = off;
j !=
end; ++
j) {
48 if (ptp.
vpars.size() != 6) {
50 <<
"Tracker parameters block from XMLs called vPars is expected to have 6 entries, but has " << ptp.
vpars.size()
54 const int BIG_PIX_PER_ROC_X = ptp.
vpars[2];
55 const int BIG_PIX_PER_ROC_Y = ptp.
vpars[3];
61 std::vector<const GeometricDet*>
comp;
69 std::vector<GeometricDet::GDEnumType> gdsubdetmap(
73 LogDebug(
"SubDetectorGeometricDetType") <<
"GeometriDet enumerator values of the subdetectors";
74 for (
unsigned int i = 0;
i < subdetgd.size(); ++
i) {
75 assert(subdetgd[
i]->geographicalId().subdetId() > 0 && subdetgd[
i]->geographicalId().subdetId() < 7);
76 gdsubdetmap[subdetgd[
i]->geographicalId().subdetId() - 1] = subdetgd[
i]->type();
77 LogTrace(
"SubDetectorGeometricDetType")
78 <<
"subdet " <<
i <<
" type " << subdetgd[
i]->type() <<
" detid " << subdetgd[
i]->geographicalId().rawId()
79 <<
" subdetid " << subdetgd[
i]->geographicalId().subdetId();
82 std::vector<const GeometricDet*> dets[6];
83 std::vector<const GeometricDet*>& pixB = dets[0];
84 pixB.reserve(
comp.size());
85 std::vector<const GeometricDet*>& pixF = dets[1];
86 pixF.reserve(
comp.size());
87 std::vector<const GeometricDet*>& tib = dets[2];
88 tib.reserve(
comp.size());
89 std::vector<const GeometricDet*>& tid = dets[3];
90 tid.reserve(
comp.size());
91 std::vector<const GeometricDet*>& tob = dets[4];
92 tob.reserve(
comp.size());
93 std::vector<const GeometricDet*>& tec = dets[5];
94 tec.reserve(
comp.size());
97 dets[
i->geographicalId().subdetId() - 1].emplace_back(
i);
103 for (
unsigned int i = 0;
i < 6; ++
i) {
147 for (
unsigned int i = 0;
i < 6; ++
i) {
158 for (
unsigned int i = 0;
i < 6; ++
i) {
162 <<
"Subdetector " <<
i + 1 <<
" is unknown but it is not empty: " << dets[
i].size();
175 std::vector<const GeometricDet*>
const& gdv,
179 bool upgradeGeometry,
180 int BIG_PIX_PER_ROC_X,
181 int BIG_PIX_PER_ROC_Y)
183 LogDebug(
"BuildingGeomDetUnits") <<
" Pixel type. Size of vector: " << gdv.size()
184 <<
" GeomDetType subdetector: " << det
186 <<
" big pix per ROC x: " << BIG_PIX_PER_ROC_X <<
" y: " << BIG_PIX_PER_ROC_Y
187 <<
" is upgrade: " << upgradeGeometry;
191 std::map<DetId, bool> brickedness_map;
196 for (
unsigned int i = 0;
i < geographicalIdParams.size();
i++) {
197 brickedness_map[geographicalIdParams.at(
i)] = brickedParams.at(
i);
200 for (
auto const&
i : gdv) {
203 std::unique_ptr<const Bounds>
bounds(
i->bounds());
206 brickedness_map[
i->geographicalId()],
207 (
int)
i->pixROCRows(),
208 (
int)
i->pixROCCols(),
222 tracker->addDetUnitId(
i->geographicalId());
231 LogDebug(
"BuildingGeomDetUnits") <<
" Strip type. Size of vector: " << gdv.size()
232 <<
" GeomDetType subdetector: " << det
238 for (
auto const&
i : gdv) {
241 std::unique_ptr<const Bounds>
bounds(
i->bounds());
253 tracker->addDetUnitId(
i->geographicalId());
260 auto const& gdu =
tracker->detUnits();
261 auto const& gduId =
tracker->detUnitIds();
263 for (u_int32_t
i = 0;
i < gdu.size();
i++) {
266 string gduTypeName = gdu[
i]->type().name();
269 if ((gduTypeName.find(
"Ster") != std::string::npos || gduTypeName.find(
"Lower") != std::string::npos) &&
271 int partner_pos = -1;
272 for (u_int32_t
jj = 0;
jj < gduId.size();
jj++) {
278 if (partner_pos == -1) {
279 throw cms::Exception(
"Configuration") <<
"Module Type is Stereo or Lower but no partner detector found \n" 280 <<
"There is a problem on Tracker geometry configuration\n";
285 std::vector<const GeomDetUnit*> composed(2);
289 if (gduTypeName.find(
"Ster") != std::string::npos) {
294 tracker->addDetId(composedDetId);
296 }
else if (gduTypeName.find(
"Lower") != std::string::npos) {
302 tracker->addDetId(composedDetId);
PlaneBuilderFromGeometricDet::ResultType buildPlaneWithMaterial(const GeometricDet *gd, double scaleFactor=1.) const
constexpr SubDetector subDetGeom[21]
void buildGeomDet(TrackerGeometry *)
TrackerGeometry * build(const GeometricDet *gd, const PTrackerAdditionalParametersPerDet *ptitp, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
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
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
void buildPixel(std::vector< const GeometricDet *> const &, const PTrackerAdditionalParametersPerDet *const &, TrackerGeometry *, GeomDetType::SubDetector det, bool upgradeGeometry, int BIG_PIX_PER_ROC_X, int BIG_PIX_PER_ROC_Y)
ConstGeometricDetContainer & components()
std::vector< int > getAllGeographicalIds() const
ResultType plane(const std::vector< const GeomDetUnit *> &dets) const
PixelTopology * build(const Bounds *bounds, bool upgradeGeometry, bool isBricked, 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)
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.
std::vector< bool > getAllBricked() const
ConstGeometricDetContainer deepComponents() const
void buildSilicon(std::vector< const GeometricDet *> const &, TrackerGeometry *, GeomDetType::SubDetector det, const std::string &part)
const TrackerTopology * theTopo
constexpr SubDetector tkDetEnum[8]
StripTopology * build(const Bounds *, double, const std::string &)