key4hep / k4geo

DD4hep based geometry models for lepton collider detectors (Formerly known as lcgeo)
GNU General Public License v3.0
8 stars 60 forks source link

why not use tan(angle) ? #389

Open danieljeans opened 2 months ago

danieljeans commented 2 months ago

Hi,

https://github.com/key4hep/k4geo/blob/9e9c87f54addd5149616c5ad1e6974dac2b2ca60/FCCee/CLD/compact/CLD_o2_v07/InnerTracker_o2_v08.xml#L41

wouldn't it be more geometrically-correct to use

rmin="tan ( ITEnvelopeClearanceConeHalfAngle ) * ConeBeamPipe_zmax"

rather than

rmin="ITEnvelopeClearanceConeHalfAngle * ConeBeamPipe_zmax" ? (the difference is <3 mm in this case, but for ease of understanding the code...)

Similar construction in few other places, too.

andresailer commented 2 months ago

Hi @danieljeans ,

You are correct, and as long as there are no overlaps I don't care about the precise dimensions of the envelope there. But you know https://github.com/key4hep/k4geo/pull/369#issuecomment-2315076316 ...

So it depends how those inner tracker endcap inner radii were calculated and a few mm difference there could be painful...

Zehvogel commented 2 months ago

This also confused me before (but I was also not aware of tan() being possible in the xml...). We should probably improve this at some point.