Shows working scintillation and optical propagation, compatible with at least Geant4v11.02
Scintillator is CeBr3. Properties are written in header files and then
assigned in src/Materials.cc
.
You can configure some settings in DetectorConstruction.cc
,
and enable or disable scintillation in main.cc
.
- Install Geant4 using the getting started guide from CERN.
- Open a terminal and run
mkdir build && cd build && cmake .. && make
- Run the output executable.
- Run a macro, for example
/control/execute macros/gps_beam_center.mac
and then/run/beamOn 1
. You should get a response like in the photo below.
files output into folder of format 'run#-date-time'
output files per run:
scint-phots-out.tab
-> number of scintillated photons per eventsi-out.tab
-> number of detected scintillated photons per eventcryst-out.tab
-> energy deposit for event (sum over each hit) or individual hit energies (configurable in Analysis.hh)spec-in.tab
-> input energy spectrum
the files are saved by class Analysis
.
- air gap between crystal, teflon, aluminum (it's really big at the moment)
- build teflon or not
- build aluminum or not the aluminum is red and the teflon is green just for clarity.
- save silicon detector hit positions (saveSiPositions)
- save positions of hits inside of crystal (saveCrystPos)
- save each hit energy, not just the sum for an event (saveEachHitEnergy)
if you set the RINDEX for aluminum and give it a G4OpticalSkinSurface you can get weird crashes like the one in failed-aluminum.txt
you can test just optical photons using macros/optical_diagnose.mac and then beamOn. you can test scintillation using the G4GeneralParticleSource like in macros/gps_beam_center.mac and then beamOn.