![]() |
OMSim
Geant4 for IceCube optical module studies
|
The complex shapes of PMTs and other intricate objects may not render correctly with the default OpenGL (OGL) visualization engine. To ensure the visualizer remains functional, these objects are set to invisible by default.
For a more detailed visualization that can handle complex geometries, you can use the RayTracer engine. While slower and more complex to use, RayTracer can visualize all volumes, regardless of their complexity. Here's how to set it up:
common/data/vis/init_vis.mac
vis.mac
vis_raytracer.mac
Make Objects Visible:
Example for PMT glass visibility:
common/data/vis/vis_raytracer.mac
The tools namespace provide several methods that could help you. For example, Tools::loadtxt
, Tools::linspace
and Tools::logspace
operate similarly to their Python's numpy counterparts:
We follow these naming conventions:
Methods:
calculateDistance()
Classes:
OMSim
OMSimDetectorConstruction
Namespaces
ToolsNamespace
Member Variables:
m_
m_particleEnergy
Global Variables:
g_
g_worldVolume
Function Parameters:
p_
p_initialPosition
Local Variables
localParticle
By adhering to these conventions, we aim to:
Remember to apply these conventions consistently across all new code and when refactoring existing code.
In order to simulate the PMT efficiency correctly, each photon is given a weight that corresponds to the detection probability (click here for more details). These weights are calculated using data files to match measurements. These data files have to be generated for each new PMT that is to be added to the framework. The module efficiency_calibration
facilitates this procedure. In the following, the mDOM PMT is used as an example.
The optical properties (refractive index, thickness, and absorption length) of the glass tube and photocathode determine the number of photons absorbed in the photocathode. The optical properties of the photocathode (defined in file Surf_Generic_Photocathode_20nm.dat
) are from this paper https://arxiv.org/abs/physics/0408075 .
To calculate the quantum efficiency weight, we have to know how many photons are absorbed in the photocathode in the simulation. For this, go through the following steps:
Beam::configureErlangenQESetup
and Beam::runErlangenQEBeam
for the beam used in Erlangen). If you don't know the divergence / beam size of the setup, you may use the one from Erlangen first.OMSim_efficiency_calibration.cc
change the method runQEbeamSimulation()
to use the newly defined beam instead of runErlangenQEBeam
. Define there also the wavelength range to be simulated.OMSimPMTConstruction::selectPMT
, or hard code it in OMSimEffCaliDetector.cc
) runQEbeamSimulation()
).To obtain the fraction I just run this python code:
Here the results of the mDOM PMT including its mean QE as comparison:
Note: Ensure that the (interpolated) QE of the PMT you intend to use is always smaller than the obtained absorbed fraction. If this is not the case you will have to change the optical properties of the photocathode and/or the tube glass!
If everything looks good, save the file (in the example above mDOM_Hamamatsu_R15458_CT_intrinsic_QE.dat
) in common/data/PMTs/measurement_matching_data/QE/
and move to step 2.
Add the path to the created file in your PMT file under the key jAbsorbedFractionFileName
and also a default QE file under the key jDefaultQEFileName
(check pmt_Hamamatsu_R15458_CAT.dat
for guidance).
Now run the simulation again
and check that the weights are being calculated correctly
The next step is to create the collection efficiency weights to match the relative detection efficiency scans. For this the scan measurement is replicated in the simulation, scanning the PMT in a XY grid. The output file of the simulation of this step is a histogram with the position of absorbed photons for each beam position.
Beam::configureXYZScan_PicoQuantSetup
and Beam::runBeamPicoQuantSetup
for the beam used in Münster)runXYZfrontalScan()
of OMSim_efficiency_calibration.cc
change the scan range (grid
vector) and radius limit (rLim
) according to the diameter of your PMTOMSimEffiCaliAnalyisis::writeHitPositionHistogram
documentation/notebooks/detection_efficiency_matching/
.common/data/PMTs/measurement_matching_data/CE_weight/
jCEweightsFileName
.The scan data of transit time / gain must be corrected before use, as the coordinates of the beam do not necessarily correspond to the primary spot on the photocathode that is illuminated, since air-glass boundary refracts the beam.
runfrontalProfileScannNKT()
under simulations/efficiency_calibration/OMSim_efficiency_calibration.cc
documentation/notebooks/scans_matching/
and save the created files in common/data/PMTs/measurement_matching_data/scans/
. Note that OMSim expects a naming convention for these files (see OMSimPMTResponse::makeScansInterpolators
).jScannedWavelengths
and add the path with the newly created scan files under the key jScanDataPath
(check pmt_Hamamatsu_R15458_CAT.dat
for guidance).If you need to add more parameters (for example low gain probability, which is also photocathode position dependent and yet to be implemented), you will have to add a new interpolator map and OMSimPMTResponse::makeScansInterpolators
accordingly.