Skip to content

Pixel Detid mismatches#661

Draft
gabrielribcesario wants to merge 4 commits intotkLayout:mainfrom
gabrielribcesario:detid
Draft

Pixel Detid mismatches#661
gabrielribcesario wants to merge 4 commits intotkLayout:mainfrom
gabrielribcesario:detid

Conversation

@gabrielribcesario
Copy link
Contributor

Add headers

  • boost::ptr_vector requires a complete material::SupportStructure type rather than forward declarations.

Refactored DetIdBuilder

  • Replaced magic numbers with variables.
  • Added comments.
  • Logic cleanup, dead code, deleted unused members, etc.

tklayout -T -R -w geometries/CMS_Phase2/OT806_IT742.cfg --xml output matches upstream/main.

DetId mismatch for the L1 split-sensors

CMSSW modified its DetId schema to account for the reordering of the pixel + L1 split-sensors, causing tkLayout's pixel sensor DetId list to be 108 entries shorter than CMSSW's.

  • Reused the 3D sensors logic for the L1 split-sensors DetId assignment (I'll add some documentation regarding this before marking this PR as "ready for review").
  • Also fixed a memory leak in const Polygon3d<4>& Sensor::hitPoly() const.

Coordinate mismatch

tkLayout's pixel sensor lists had non-negligible differences in Z ($\delta$ > 0.2 cm) and $\boldsymbol{\varphi}$ ($\delta$ > 1°) placement relative to the CMSSW's pixel sensors list.

image

Z Difference [cm] R Difference [cm] $\varphi$ Difference [°]
section count min mean max min mean max min mean max
TBPX 108 -2.275 -0.0078 2.275 -0.000 0.0 -0.0000 0.0000 0.0000 0.0000
TEPX 704 -0.800 0.0000 0.800 0.000 0.0 0.0001 -18.0000 0.0001 18.0000
TFPX 864 -1.800 0.0000 1.800 -0.032 0.0 0.0320 -18.1114 0.0000 18.1114

Further analysis showed that for each CMSSW sensor, a corresponding tkLayout sensor existed in approximately the same position, indicating that the sensors were mislabeled rather than misplaced.

image

TBPX

L1 upper and lower sensors were inverted, causing a coordinate mismatch along the Z-axis.

  • The logic in Sensor.cc now correctly applies the offset to split-sensors.

TEPX and TFPX

phiRef_ logic in EndcapDetIdBuilder::visit(EndcapModule& m) would fail for unevenly spaced modules, inverting the location of the odd and even subdisks for some rings/layers.

  • Refactored Ring.cc: modules are assigned IDs with monotonically increasing $\varphi$.
  • EndcapDetIdBuilder::visit(EndcapModule&) now uses pre-computed information for the DetId assignment.

Spanning over the entire list after the fix:

Z Difference [cm] R Difference [cm] $\varphi$ Difference [°]
section count min mean max min mean max min mean max
TBPX 864 -0.07 0.0006 0.07 -0.0 0.0 0.0000 -0.0001 -0.0 0.0001
TEPX 1408 -0.00 0.0000 0.00 -0.0 0.0 0.0001 -0.0004 0.0 0.0004
TFPX 1728 -0.00 0.0000 0.00 -0.0 -0.0 0.0000 -0.0005 0.0 0.0005

boost::ptr_vector requires a complete type, and not forward declarations
TBPX:
- Fixed the Z mismatch caused by the wrong offset direction in Sensor.cc

TEPX and TFPX:
- Refactored Ring.cc: modules are assigned IDs with monotonically increasing phi
- Fixed endcap module assignment logic: Use pre-computed information for DetId assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant