Python calculators. Two python classes were written. The first one, XCSITPhotonDetectorParameters, implements the abstract python class AbstractCalculatorParameters. Its purpose is to gather and check all the input parameters. If an parameter is set which is not specified in Constants an exception is raised. Nevertheless, instances of this class are essentially containers with property getter and setter functions. The properties are the same as the options in table 1. The second class is the calculator itself. It implements AbstractPhotonDetector which itself is de- rived from AbstractBaseCalculator. For this reason, the way the simulation is performed is already predetermined: 1. After instantiation python calls immediately the init function. This function possesses three formal parameters: a XCSITPhotonDetectorParameters instance, a variable to store the path for the input file and a variable to store the path for the output file. Since python variables do not have types, the init function has to check if the inserted actual parameters fit with the required instances. Furthermore, init deals with incomplete input. 2. The next method to call is readH5. Since the input to this calculator is different to the input of ParticleSim and ChargeSim, the data from the hdf5 input file has to be translated: The ma- trix of intensities is read and transformed into instances of PhotonEnty stored in an instance of PhotonData. The instances of PhotonEntry store for each photon the following attributes: energy, normalized vector of flight direction, current position. Those values where calculated from the input data by applying geometry. 3. For running the simulation the backengine method has to be called. It consists of two parts: a) The PhotonData instance is passed into ParticleSim which transfers the container into XCSIT::XGeant4ParticleSim where interactions of the photons with the detector material are simulated. The output container InteractionData is also passed to those classes. During the simulation it is filled with instances of type InteractionEntry that contain for each interaction the deposited energy in the material at a given site of the detector and the time when that happens after start. b) The instance of InteractionData is handed to the instance of ChargeSim which transfers it into XCSIT::XPlasmaPointChargeSim and the Geant4 classes respectively. Since the readout electronics cannot be at the surface of a detector an electrical field is applied to pull the created charges in the material to the readout elec- tronics. During this propagation charge clouds resulting from e.g. plasmas can broaden and effect neighbouring pixels. This is simulated in ChargeSim. The output is an instance of ChargeMatrix, where each element, ChargeEntry, represents a pixel of the detector and each element contains the number of charges recorded in that detector pixel. Please note, that the perspective to look at the matrix is parallel to the z-axis/ propagation di- rection of the light. 4. Last but not least, the data containers and their content are written to the hdf5 output file at the location specified by the output path. The structure of the input and output file can be found in the wiki of this project (▇▇▇▇▇://▇▇▇▇▇▇. com/eucall-software/py_detector_interface/wiki).
Appears in 1 contract
Sources: Grant Agreement
Python calculators. Two python classes were written. The first 1rst one, XCSITPhotonDetectorParameters, implements the abstract python class AbstractCalculatorParameters. Its purpose is to gather and check all the input parameters. If an parameter is set which is not specified speci1ed in Constants an exception is raised. Nevertheless, instances of this class are essentially containers with property getter and setter functions. The properties are the same as the options in table 1. The second class is the calculator itself. It implements AbstractPhotonDetector which itself is de- rived from AbstractBaseCalculator. For this reason, the way the simulation is performed is already predetermined:
1. After instantiation python calls immediately the init function. This function possesses three formal parameters: a XCSITPhotonDetectorParameters instance, a variable to store the path for the input file 1le and a variable to store the path for the output file1le. Since python variables do not have types, the init function has to check if the inserted actual parameters fit 1t with the required instances. Furthermore, init deals with incomplete input.
2. The next method to call is readH5. Since the input to this calculator is different to the input of ParticleSim and ChargeSim, the data from the hdf5 input file 1le has to be translated: The ma- trix of intensities is read and transformed into instances of PhotonEnty stored in an instance of PhotonData. The instances of PhotonEntry store for each photon the following attributes: energy, normalized vector of flight 2ight direction, current position. Those values where calculated from the input data by applying geometry.
3. For running the simulation the backengine method has to be called. It consists of two parts:
a) The PhotonData instance is passed into ParticleSim which transfers the container into XCSIT::XGeant4ParticleSim where interactions of the photons with the detector material are simulated. The output container InteractionData is also passed to those classes. During the simulation it is filled 1lled with instances of type InteractionEntry that contain for each interaction the deposited energy in the material at a given site of the detector and the time when that happens after start.
b) The instance of InteractionData is handed to the instance of ChargeSim which transfers it into XCSIT::XPlasmaPointChargeSim and the Geant4 classes respectively. Since the readout electronics cannot be at the surface of a detector an electrical field 1eld is applied to pull the created charges in the material to the readout elec- tronics. During this propagation charge clouds resulting from e.g. plasmas can broaden and effect neighbouring pixels. This is simulated in ChargeSim. The output is an instance of ChargeMatrix, where each element, ChargeEntry, represents a pixel of the detector and each element contains the number of charges recorded in that detector pixel. Please note, that the perspective to look at the matrix is parallel to the z-axis/ propagation di- rection of the light.
4. Last but not least, the data containers and their content are written to the hdf5 output file 1le at the location specified speci1ed by the output path. The structure of the input and output file 1le can be found in the wiki of this project (▇▇▇▇▇://▇▇▇▇▇▇. com/eucall-software/py_detector_interface/wiki).
Appears in 1 contract
Sources: Grant Agreement