![]() |
Project
|
The charge of a hit in the gas comes from one of two models, selected with TRDSimParams.ionisationModel:
0: the Geant4 energy deposit in the gas divided by Wion. Geant4 then uses the PAI model in the TRD gas (Detectors/gconfig/g4config_trd_pai.in, applied by g4Config.C).1: the TRD collision model (src/IonisationModel.cxx). Geant4 runs without PAI in the gas. The tables are made with macros/makeIonisationTables.cxx from Geant4's PAI cross-section, for the 10 keV delta-ray cut of the gas. Slow tracks keep the energy deposit. G4.configMacroFile replaces g4config.in and the PAI file; it must contain the PAI lines itself if wanted.This will convert the tracklets and digits in the current directory to a series of files containing the raw data as it would appear coming out of the cru. There are multiple options :
default would then be the following :
There are two general cases: Case 1: The first signal triggers the readout at t=A. The signal is read out for 30 time bins (3 microseconds). A second signal can arrive at t=C. The second signal will contribute to the tail of the first signal with (B-C)*samplingRate bins from its head.
Case 2: A trigger happened in the past at t<A, but A is within the deadtime of the TRD so the detector can't trigger again and the signal isn't readout. Still, the signal can contribute to a future signal. When a new signal arrives at t=C that can trigger, the signal will be readout for 30 time bins and will have (B-C)*samplingRate bins from the tail of the previous signal onto it's head.
We keep a deque of signals that is flushed when the detector gets a new trigger. All signals are stored in the deque and are pop from the front only when they are too old. A signal can contribute to two events, one in the past and one in the future. See for example Case 3:
In this example, we consider a trigger at t=A. The second signal contributes with (B-C)*samplingRate bins from its head onto the tail of the first signal. A third signal arrives at t=E, with E>A+BUSY_TIME, which can trigger the detector and be readout. The third signal will have (D-E)*samplingRate from the tail of the second signal onto its head. So, the requirement for a signal to be too old, and be dropped, is:
TRDSimParams.readoutTimeNS.