This program allows the user to run calorimetric NRF Cherenkov Detector cargo screening simulations. This simulation provides visualization tools in addition to root data. Visualization tools can be utilized in both batch and interactive modes. The final output provided can be manipulated by the user through the "mantis.in" input.
Seven(7) histograms are available upon user request:
- Weighted Interrogation Object Incident Energy Spectrum -> /output/myoutput IntObjData must be uncommented!
- Weighted NRF Photons Incident Interrogation Object Energy Spectrum -> /output/myouput NRFData must be uncommented!
- Weighted Interrogation Object Emission Energy Spectrum -> /output/myoutput IntObjData must be uncommented!
- Weighted Emitted NRF Photons from Interrogation Object Energy Spectrum -> /output/myoutput IntObjData must be uncommented!
- Weighted Incident Water Tank Energy Spectrum -> /output/myoutput WaterIncData must be uncommented!
- Weighted NRF Photons Incident Water Tank Data -> /output/myouput NRFData must be uncommented!
- Weighted Detected Energy Data
- Weighted energy spectrum of photons "detected" on photocathode includes Quantum efficiency!
Additionally, five(5) ntuples(TTrees) are available upon user request:
- Incident Chopper Data -> /output/myoutput ChopIncData must be uncommented!
- Unweighted Incident Chopper Energies
- Weights
- Event IDs
- Emission Chopper Data -> /output/myoutput ChopOutData must be uncommented!
- Unweighted Incident Chopper Energies
- Weights
- Event IDs
- isNRF
- NRF Data -> /output/myoutput/ NRFData must be uncommented!
- Event IDs
- Track IDs
- Energy
- Weight
- Creation Material
- Z position
- Cherenkov Data -> /output/myouput/ CherenkovData must be uncommented!
- Energy
- Weight
- Event IDs
- Track IDs
- Number of Secondaries in Step (Cherenkov and Scintillation)
- X Position
- Y Position
- Z Position
- Time
- Incident Photocathode Data -> /output/myoutput DetData must be uncommented!
- Event IDs
- Track IDs
- Energy
- Weight
- Creator Process
- Detection Process
- Time
The User can manipulate the simulation in various ways through the mantis.in macro input file. For example the following line of code:
> ./mantis -m mantis.in -o test.root -s 1 -a 2.0
would run mantis with the inputs found in mantis.in located in the mantis executable directory. The ouput would be found in test.root and would have a seed of 1 and a Photon Energy of 2.0 MeV.
The command line input options and flags include:
-m macro file
-n addNRF
-> IF set to false NRF Physics will be removed from physicsList! The default is set to true.
-o output filename
-p print standalone.dat file
-> Calls G4NRF to print a file of NRF Energies (takes up to 15 min) not recommended for non-developers
-s seed
-t testBrem
-> For creating a bremsstrahlung beam to run Sampling.cc on for importance sampling input distribution
-v NRF Verbose
-e Event Check
-> Automatically Checks for Events where NRF Lead to Optical Photons that lead to detection see EventCheck.cc for details
-w Weight Histograms
-> Creates weighted histograms for TTree Outputs
-r Test Resonance
-> Tests Resonance energies for development of Sampling.cc
-a Input Energy
-> Monoenergetic Photon created at given energy in MeV. brems_distributions.root file not required.
Mandatory Inputs for mantis.in
mantis.in has the following MANDATORY inputs that the user must not comment:
- Chopper State (On/Off)
- Chopper Material (Uranium/Plutonium)
- Chopper Material Isotopic Composition
- Interrogation Object Material
- Interrogation Object Material Isotopic Composition if Interrogation Object is Uranium/Plutonium
The user also has several optional commands available in mantis.in:
- Chopper Thickness
- Chopper Distance from Source
- Interrogation Object Location
- Interrogation Object Size (radius)
- Detector Location
- Attenuating Layers (state, material, thickness)
- Photocathode (Size, number, material)
- Output Desired
- Number of MC Particles to Simulate
Author: Jacob E Bickus
Creation time: 8/2020
Last Update: 8/28/2023
Dependencies
- Installed Geant4 Libraries
- When installing Geant4 include the following flags
> -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_OPENGL_X11=ON
- CERN ROOT Installed
- Cmake
Version: Mantis and been built against and tested with Geant4 10.5 and 10.7, and ROOT 6.22. ROOT Version must be greater than 6.18.
For Easy Set up run the following lines of code:
> git clone git@github.com:yacubus-bishcus/mantis.git && mkdir mantis-build && cd mantis-build
> cmake ../mantis -DCMAKE_INSTALL_PREFIX=~/GEANT4/mantis-install -DWITH_DATA=ON && make -jN && make install
Export the path to the untarred NRF Database for example in the user's bash:
export G4NRFGAMMADATA=/path/to/Database/Database1.1
Lastly some path issues may occur without the following lines in the user's bash:
source /path/to/root_build_directory/bin/thisroot.sh
source /path/to/geant4-install/bin/geant4.sh
source /path/to/geant4-install/share/Geant4-10.5.1/geant4make/geant4make.sh
"vis_save.mac" will make a .wrl visualization file based on the commands provided in "vis_save.mac".
"mantis.in" will not create a visualization.
> ./mantis -m macro(mantis.in or vis_save.mac) -o <root output filename> -s <seed>
The following will use OPENGL in interactive mode
> ./mantis
Mantis Requires one input:
- brems_distributions.root - This is the input spectrum file that is read if the user does not use the Set Energy Flag (-a). The bremstrahlung input and sampling distribution can be easily manipulated with Sampling.cc
Sampling.cc can be run with the following terminal command:
> root -b -q 'Sampling.cc("brem.root",maxEnergyOfBremBeam)'
Where the "brem.root" file is the bremsstrahulung spectrum expected to impact the chopper wheel. The "brem.root" file can be obtained with the instructions under the section "Creating a Bremsstrahlung Input Beam" below. The "maxEnergyOfBremBeam" is the same maximum energy of the input bremsstrahulung beam from the "brem.root" file.
Sampling.cc creates two output files.
- brems_distributions.root
- brems_distributions.png
The root file consists of two histograms: hBrems and hSample. These histograms are used to determine the importance sampling in the mantis program. The .png file is a depiction of the hBrems and hSampled overlayed on the same canvas.
The bremsstrahlung beam can be determined via other Geant4 simulations or through mantis. To create the input bremsstrahlung beam expected to inpinge upon the chopper wheel run mantis the following way:
> ./mantis -m mantis.in -o brem.root -s <seed> -t true
Adding the -t flag tells mantis that it should only output the Chopper Data TTree. Be sure to edit the following line in "mantis.in":
/input/energy maxEnergyOfBremBeam
The Code will generate a .log and _error.log file in addition to a root file. All G4cout is sent to .log and all G4cerr is sent to _error.log. The user must select output in "mantis.in" for the histograms/TTree to be filled during the simulation.
Several helper scripts are included:
- runBatch.sh
- The main call for running in batch mode on PSFC engaging cluster through slurm
- Takes input where the number of jobs submitted = -
- submit_geant4.slurm
- This is the file for the slurm scheduler. Adjusting the time limit on each run can be important for scheduling
- stitch.sh
- This merges the output files.
- Takes inputs <"Output_FileName_Root*.root"> <merged_FileName.root>
- PrintResults.cc
- This prints the Chopper On/Off Comparison results and Z-Scores
- can be run in CERN ROOT with the command:
> root -b -q 'PrintResults.cc("filenameOnBase", "filenameOffBase", checkWeighted_Histograms_File, check_Cherenkov, check_EventCheck)'