Skip to content

Conversation

@SanjitMasanam
Copy link
Contributor

@SanjitMasanam SanjitMasanam commented Nov 18, 2025

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

What are the issues that this addresses?

This resolves #1877

Check List

  • I successfully compiled ldmx-sw with my developments.
  • I read, understood and follow the coding rules.
  • I ran my developments and the following shows that they are successful.

Important ECal changes for reduced-v3 vs. reduced-v2:

  1. Only keeping central silicon module for each layer, rather than the entire flower
  2. Removing all absorbers

To test these changes, I ran two simulations (and a check):

  1. A straight 8 GeV muon gun sim. with vertex [0, 0, 239] mm (right in front of ECal) and smear of [1000, 1000] mm. The expectation for this simulations is that hits will register for the entire flower in v2 but only in the central module in v3. This would indicate only the central module is present in v3.
  2. An straight 8 GeV electron gun sim. with vertex [0, 0, 239] mm and smear of [200, 200] mm. The expectation for this simulation is the # of hits will increase wrt the z-axis for v2 and hold constant for v3. This would indicate there are no absorbers in v3 because if there were, the electrons would brem and produce showers (i.e. # of hits would increase wrt to z).
  3. The digi - rec hit z position histogram should primarily be a 0 for v3 which would indicate the layer positions in EcalGeometry.py are correct.

v2 results:

Image Image Image

v3 results:

image image image

Conclusion:
The results of both simulations (and the check) match expectation.

@tvami
Copy link
Member

tvami commented Nov 24, 2025

@SanjitMasanam FYI at this point it's certain that we wont have 3 double layers... The 2 double layers are likely, but then reading all of them out is still in the air, but I guess we can deal with that part upstream of the GDML

@SanjitMasanam
Copy link
Contributor Author

@SanjitMasanam FYI at this point it's certain that we wont have 3 double layers... The 2 double layers are likely, but then reading all of them out is still in the air, but I guess we can deal with that part upstream of the GDML

Ok I'll edit the code to be only 2 double layers

@SanjitMasanam SanjitMasanam marked this pull request as ready for review December 1, 2025 22:07
@SanjitMasanam
Copy link
Contributor Author

@tomeichlersmith @tvami, this PR is (approx.) ready. I was not able to go from 3 double layers to 2 because the GDML loops (see most relevant loop for this instance) don't like just having one iteration. The 3 double layers mean this loop iterates twice. If either of you know a workaround (other than making the loop stand-alone code which I considered but that would require rewriting many other loops as standalone which is more work than it's worth I think), it'd be great to have that workaround implemented. Otherwise, the current reduced_v3 has the first 2 double layers obviously so this subset would be accurate to the test run geometry.

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.

I think this is a good first approximation at least from an Ecal-perspective.

@tvami
Copy link
Member

tvami commented Dec 2, 2025

Is it really hard to just move it out of the loop?

@SanjitMasanam
Copy link
Contributor Author

Is it really hard to just move it out of the loop?

A bit yeah but doable so it has been done.

@tvami
Copy link
Member

tvami commented Dec 2, 2025

Thanks @SanjitMasanam ! Please edit the CI to use this, and also I think we can delete v2

eg = EcalGeometry(detectors_valid = ["ldmx-reduced-v3"],
gap = 1.5,
layerZPositions = [
7.582, 16.062, 32.226, 40.206, 55.37, 63.35
Copy link
Member

Choose a reason for hiding this comment

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

I talked to Lincoln about the CAD model, there we have

86.00, 92.23, 136.8, 143.03 mm

I think we should edit that in the GDML too @SanjitMasanam

Copy link
Contributor Author

@SanjitMasanam SanjitMasanam Dec 3, 2025

Choose a reason for hiding this comment

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

Sure, those distances are from the target? Also for editing that in the GDML, do you want me to add empty air of suitable thickness between each layer to achieve those distances?

Copy link
Member

Choose a reason for hiding this comment

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

no this is from the front of the ECAL box. We are about 26 inch away from the "target" (there is no target), but that is to be measured tomorrow (fingers crossed).

Sounds good about the air, yeah! Thanks

Copy link
Contributor Author

@SanjitMasanam SanjitMasanam Dec 9, 2025

Choose a reason for hiding this comment

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

So 92.23-86=6.23 which is less than 16.062-7.582=8.48. How did that end up happening? I can add air for the other layers but I'll need some guidance on what to remove for the 2nd layer I think.

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.

Create reduced_v3 Ecal geometry to match mini-LDMX geometry

4 participants