A TPC hit is a container of measurements on a final segment of the track trajectory. The set of measurments is defined by the HITS operator in the tpcegeo.g description:
HITS TPAD Z:.0005:S Y:.0005: X:.0005: cx:10: cy:10: cz:10:, LPtot:18:(-3,2) Sleng:.1:(0,500), ToF:16:(0,1.e-6) LGAM:16:(-2,2), Step:11:(0,5) USER:21:(-.01,.01)
This description means that GSTAR saves in hits local (within
the padrow) coordinates of the segment middle point with 5 um accuracy,
local direction cosines with 10**-3 accuracy, logarith of the total momentum,
particle trajectory length from the production vertex and Time-of-flight,
logarithm of the particle Lorentz-factor, the length if the segment. The
last element is the value of the energy loss taken with a sign. This sign
is a flag which uniquely describes how the track middle point has been
calculated (see below).
GEANT traces particle trajectories in steps. The size of a step is limitted by an accurance of a point-like events (decays, bremsstraglung, delta-ray emission etc) or by commulative action of continious processes which resulats in a too big change of the particle direction and/or energy.
The step size is also limited by the geometrical dimensions of the current volume. The program has to split trajectory exactly on volume boundaries. Due to a final computer accuracy this often leads to an apperance of a very short last step when exiting from a volume.
In order to minimise the amount of the recorded information GSTAR, when possible, does not write a new "HIT" on each GEANT step, but tries to write a single HIT per padrow. Even if it takes several GEANT steps to cross the padrow, as long as the total segment length is less than 5 cm, GSTAR writes a single hit.
In the following discussion the starting point of a GSTAR hit
is the starting point of the first GEANT step included in the hit.
The ending point is the end of the last GEANT step, includes in
the hit segment.
The sign of the energy loss value provides a unique way to distinguish between two different ways of calculation of the segment middle point.
In order to maximum preserve the accuracy of a segment description GSTAR, when possible, approximates this trajectory with a parabola and uses this parabola to calculate the segment middle point. Conditions for such an approximation to be valid are expressed below in the padrow local coordinate system:
To control this condition the middle point of the parabola is required to stay between the corresponding cooridnates of the entrance and exit points. In other words,
yi <= yc <= yo or yo <= yc <= yi
zi <= zc <= zo or yo <= zc <= zi
are required (simular x condition is trivial, taken into account the first requirement and the definition of the center point as xc=0)
For such a hit the energy deposition in a signal simulation code (tfs/tss/trs/...) should be distributes along the parabola which passes throu the hit middle point with the curvature corresponding to the local track momentum and the current value of the magnetic field.
In case when a particle trajectory crosses a padrow in a non-regular way - enter or exit from a side, or turns back, or the trajectory length exceeds 5 cm limit before exiting the padrow, or a valid parabolic fit can't be found, a more traditional approach is taken.
The middle point saved in the hit is calculated in this case as the middle between entrace and exit points and the saved momentum is an average of the starting and ending ones.
The simplest way for a signal simulator to distribute ionization losses in this case is to put it along a straight line with
xyz(t) = (HITxyz)+t*Cxyz*STEP
-0.5 <= t <= 0.5
If a signal simulator (TFS,TSS,TRS,TBS...) wants in this case to better reconstruct particle trajectory on the step, it still can build its parabola or even helix (depending on the track momentum an the field value) starting from the step endpoints. Although other parametrizations are possible, provided the generated track segment passes through the same entrance and the exit points.
This may be useful in particular for loopers or other low momentum tracks.