Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer Position Bug #1490

Open
SanjitMasanam opened this issue Oct 25, 2024 · 0 comments
Open

Layer Position Bug #1490

SanjitMasanam opened this issue Oct 25, 2024 · 0 comments

Comments

@SanjitMasanam
Copy link
Contributor

SanjitMasanam commented Oct 25, 2024

Describe the bug
Currently, the silicon layer positions in GDML and those saved to ECalSim/RecHits are not the same. This may also result in incorrect layer weights, but further testing needs to be done.

To Reproduce
Run the script below to see the mismatch

import numpy

# Constants
PCB_dz = 1.666
Glue_dz = 0.1
Si_dz = 0.3
GlueThick_dz = 0.2
CarbonBasePlate_dz = 0.79
MotherBoardAssembly_dz = 8.166
CarbonCoolingPlane_dz = 5.7
CarbonCoolingPlane_dy = 495.3
CarbonCoolingPlane_dx = 673.1
strongback_bar_dy = 25.4
strongback_bar_dx = 838.2 - 0.6815
PCB_Motherboard_Gap = 3.5
FrontTolerance = 0.5
BackTolerance = 0.5
preshower_extra_air = 0.5
bilayer_start = 240.5
sampling_section_offset = 2*preshower_extra_air
front_pre_tungsten_dz = 2.0
cooling_pre_tungsten_dz = 2.0

# Arrays
bilayer_absorber_cumulative = [0, 3]
front_tungsten_dz = [1, 2]
cooling_tungsten_dz = [1, 1.5]
layer_z = [7.932, 14.532, 32.146, 40.746, 58.110, 67.710]

# Calculated constants
Flower_dz = PCB_dz + Glue_dz + Si_dz + GlueThick_dz + CarbonBasePlate_dz
bilayer_noabsorber_thickness = FrontTolerance + PCB_dz + PCB_Motherboard_Gap + Flower_dz + CarbonCoolingPlane_dz + Flower_dz + PCB_Motherboard_Gap + PCB_dz + BackTolerance

# Position of silicon modules
first_sc_z_pos = bilayer_start + FrontTolerance + PCB_dz + PCB_Motherboard_Gap + PCB_dz + Glue_dz
second_sc_z_pos = bilayer_start + FrontTolerance + PCB_dz + PCB_Motherboard_Gap + Flower_dz + preshower_extra_air + CarbonCoolingPlane_dz + CarbonBasePlate_dz + GlueThick_dz
third_sc_z_pos = bilayer_start + sampling_section_offset + bilayer_noabsorber_thickness*1 + bilayer_absorber_cumulative[1-1] + BackTolerance + front_tungsten_dz[1-1] + FrontTolerance + PCB_dz + PCB_Motherboard_Gap
fourth_sc_z_pos = bilayer_start + sampling_section_offset + bilayer_noabsorber_thickness*1 + bilayer_absorber_cumulative[1-1] + BackTolerance + front_tungsten_dz[1-1] + FrontTolerance + PCB_dz + PCB_Motherboard_Gap + Flower_dz + cooling_tungsten_dz[0] + CarbonCoolingPlane_dz + cooling_tungsten_dz[0] + CarbonBasePlate_dz + GlueThick_dz
fifth_sc_z_pos = bilayer_start + sampling_section_offset + bilayer_noabsorber_thickness*2 + bilayer_absorber_cumulative[2-1] + BackTolerance + front_tungsten_dz[2-1] + FrontTolerance + PCB_dz + PCB_Motherboard_Gap
sixth_sc_z_pos = bilayer_start + sampling_section_offset + bilayer_noabsorber_thickness*2 + bilayer_absorber_cumulative[2-1] + BackTolerance + front_tungsten_dz[2-1] + FrontTolerance + PCB_dz + PCB_Motherboard_Gap + Flower_dz + cooling_tungsten_dz[1] + CarbonCoolingPlane_dz + cooling_tungsten_dz[1] + CarbonBasePlate_dz + GlueThick_dz
calculated_layer_z = [first_sc_z_pos, second_sc_z_pos, third_sc_z_pos, fourth_sc_z_pos, fifth_sc_z_pos, sixth_sc_z_pos]

print("Defined silicon z positions vs. GDML positions:")
for i in range(6):
    print(240 + layer_z[i], round(calculated_layer_z[i], 3), "Diff:", numpy.abs(round((240 + layer_z[i]) - round(calculated_layer_z[i], 3), 3)))

'''
ECalGeometry defined positions vs. GDML silicon z positions:
7.932 7.932
14.532 16.412
32.146 31.81
40.746 43.556
58.11 58.954
67.71 71.7
'''

Desired behavior
We want the GDML and defined positions to match and an easier way to check if this issue arises again with new versions of the geometry. #1482 addresses the check.

@SanjitMasanam SanjitMasanam self-assigned this Oct 25, 2024
@SanjitMasanam SanjitMasanam removed their assignment Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants