Distance to ZMaxPlane along a particular direction
This provides an extension of the standard ZMaxPlane
class for fast simulation studies.
ZMaxPlane
(or RhoMax
in cylindrical calorimeters) is a special optimization applied in Gaussino and Gauss that limits the number of MCParticle
s persisted to storage. In particular, all MCParticle
s with vertices behind the ZMaxPlane
will not be kept.
The concept of ZMaxPlane
is crucial in fast simulations, and in particular in the CaloChallenge setup !146 (merged) for planar calorimeters. In this setup, the so-called collector plane and the actual zmax plane might not necessarily be in the same place, and therefore the distance that a particle travels between must be known.
In order to get this distance x
from a point P
, I use the following formula:
x = \frac{|x_{zmax}|}{\hat{n} \cdot{} \hat{v}}
where:
-
x_{xmax}
is the shortest distance to the ZMax plane from the pointP
(already provided by the functionality of the ZMaxPlane class, -
\hat{n}
is the normal vector of the ZMax plane, -
\hat{v}
is a vector describing the direction in pointP
.
I added one unit test to test this feature on an example.