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

Update Ecal geom Z values to match v14 geometry #1524

Merged
merged 10 commits into from
Jan 22, 2025
Merged

Update Ecal geom Z values to match v14 geometry #1524

merged 10 commits into from
Jan 22, 2025

Conversation

tvami
Copy link
Member

@tvami tvami commented Jan 20, 2025

I am updating ldmx-sw, here are the details.

What are the issues that this addresses?

Resolves #1490

Check List

  • I successfully compiled ldmx-sw with my developments
  • I ran my developments and the following shows that they are successful.

Sorry, something went wrong.

SanjitMasanam and others added 4 commits January 19, 2025 15:44

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@tvami tvami linked an issue Jan 20, 2025 that may be closed by this pull request
@tvami
Copy link
Member Author

tvami commented Jan 20, 2025

The Z DQM plot looks like this now
Screenshot 2025-01-19 at 17 14 17

c.f. to #1485 (comment)

I think we are good now!

Copy link
Member

@tomeichlersmith tomeichlersmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just formatting change, but I think this looks good. I'm a bit concerned that my geometry layer calculator is off which would then also affect the layer weights, but if it is just missing air gaps then the layer weights would not be noticeably affected.

@tvami
Copy link
Member Author

tvami commented Jan 20, 2025

concerned that my geometry layer calculator is off

How off is it? Or you mean the numbers in the software now the numbers from your script?

@tomeichlersmith
Copy link
Member

The z-layer positions were copied from the script into these files. Since there is a difference between those z positions and the actual simulated model, that implies there is a bug in the script. This corrects the z positions of the layers as understood by reconstruction, but it does not alter the layer weights which are calculated by the same script that calculated the original (buggy) z positions.

@tvami
Copy link
Member Author

tvami commented Jan 20, 2025

I update with the numbers that come from the script in the commit 2355879

The mean got better and now it's just a binning

Screenshot 2025-01-20 at 15 55 06

@tvami
Copy link
Member Author

tvami commented Jan 21, 2025

Final proposal with a new binning:
Screenshot 2025-01-20 at 16 21 08

@tvami tvami requested a review from tomeichlersmith January 21, 2025 00:42
…nd GDML layer position calculation script
@SanjitMasanam
Copy link
Contributor

When running this script, the print_weights function outputs:

Layer      dE     X0 Lambda   Zpos
    1   2.329  0.033  0.015  7.582
    2   4.339  0.189  0.026 16.062
    3   6.495  0.474  0.035 33.226
    4   7.490  0.615  0.040 43.206
    5   8.595  0.758  0.045 60.370
    6  10.253  0.972  0.052 71.350
    7  10.915  1.057  0.055 90.014
    8  10.915  1.057  0.055 101.594
    9  10.915  1.057  0.055 120.258
   10  10.915  1.057  0.055 131.838
   11  10.915  1.057  0.055 150.502
   12  10.915  1.057  0.055 162.082
   13  10.915  1.057  0.055 180.746
   14  10.915  1.057  0.055 192.326
   15  10.915  1.057  0.055 210.990
   16  10.915  1.057  0.055 222.570
   17  10.915  1.057  0.055 241.234
   18  10.915  1.057  0.055 252.814
   19  10.915  1.057  0.055 271.478
   20  10.915  1.057  0.055 283.058
   21  10.915  1.057  0.055 301.722
   22  10.915  1.057  0.055 313.302
   23  10.915  1.057  0.055 331.966
   24  14.783  1.557  0.073 343.546
   25  18.539  2.042  0.090 365.710
   26  18.539  2.042  0.090 380.690
   27  18.539  2.042  0.090 402.854
   28  18.539  2.042  0.090 417.834
   29  18.539  2.042  0.090 439.998
   30  18.539  2.042  0.090 454.978
   31  18.539  2.042  0.090 477.142
   32  18.539  2.042  0.090 492.122
   33  18.539  2.042  0.090 514.286
   34   9.938  1.030  0.049 529.266
  Sum 416.639 41.987  2.085 536.498
 Back   1.516  0.023  0.009 536.498

Which of these columns represents the layer weights @tomeichlersmith?

@tvami
Copy link
Member Author

tvami commented Jan 21, 2025

@tomeichlersmith
Copy link
Member

tomeichlersmith commented Jan 21, 2025

I can confirm that the dE is used as the layer weight (i.e. the average energy lost to the insensitive materials).

Thank you @SanjitMasanam for correcting the layer weight script. It appears, thankfully, to only affect the last digit of the lower value layer weights. (This makes sense since the layer weights only account for insensitive layers in between two sensitive layers while the z calculation accumulates all layers, meaning an error early on would affect all z positions but only the first few layer weights.)

ldmx-sw/Ecal/python/digi.py

Lines 209 to 214 in 45ee57d

self.layerWeights = [
2.312, 4.312, 6.522, 7.490, 8.595, 10.253, 10.915, 10.915, 10.915, 10.915, 10.915,
10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915, 10.915,
10.915, 10.915, 14.783, 18.539, 18.539, 18.539, 18.539, 18.539, 18.539, 18.539,
18.539, 18.539, 9.938
]

@SanjitMasanam
Copy link
Contributor

Should we change the layerWeights in ldmx-sw/Ecal/python/digi.py to match the newly calculated weights then?

@tomeichlersmith
Copy link
Member

Sure! I don't think they will have a large effect, but we might as well have them correct.

@tvami tvami merged commit 52380e5 into trunk Jan 22, 2025
3 checks passed
@tvami tvami deleted the iss1490 branch January 22, 2025 04:48
tvami added a commit that referenced this pull request Jan 24, 2025
* Update Ecal geom Z values to match v14 geometry
* Update reduced v1 with the new Z numbers too
* Added script to calculate z position of silicon modules based on GDML
* Updated z position calculation to match between layer weight script and GDML layer position calculation script

---------

Co-authored-by: Sanjit Masanam <[email protected]>
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.

ECal Layer Z-Position Bug
3 participants