Detector Simulation =================== This part introduces the detector simulation in herdos. introduction ------------ Detector simulation is the major part of the offline software. In HERDOS we use Geant4 to simulate the interaction of incident particles with the detector material and get the energy deposition in detector cells. In order to do the simulation, the detector geoemtry and a list of physics processes have to be configured through interface with Geant4. The geometry are obtained from the Geometry Service in HERDOS as mentioned before. The setup of physics list is explained in the following section. The next step of simulation is to save the output. To Maximize the efficiency, the saved data are carefully selected. For CALO, only the total energy deposition in each crystal are saved, together with other statistical information, e.g. first hit time, CoG of energy deposition. For outer detectors, the steps in simulation are saved in order to get finer space resolution for further steps. However, they are separated into 2 collections, e.g. `psdhits` and `psdhits2`, to reduce the size. The information of primary and secondary particles generated in the detector with energy larger than threshold (5MeV by default) are also saved, with exception inside CALO: only nuclei and pions are saved inside CALO. In addition, 2 geantino particles with the same position and direction(or opposite) of the primary particle are shot and recorded, to greatly ease the tracking of primary particles. Then the energy deposition are converted to digital values comparable to real detector output through the process called digitization. The geometry in herdos is introduced in [](geometry/index). The simulation will obtain the geant4 geometry from GeometrySvc, and put into Geant4. Physics Process --------------- By default the physics model used in MC simulation was the FTFP physics list in Geant4. QGSP can also be used. The CRMC physics for high energy hadrons are also prepared. .. toctree:: :maxdepth: 2 physicsProc.md Digitization ---------------- Digitization is the process to convert energy deposition from genat4 simulation to digital readout, e.g. ADC or grayscale values. .. toctree:: :maxdepth: 2 fitdigi.md psddigi.md scddigi.md