Skip to content

updated geant4 simulation code of shms. This is an upgrade from shms_sim.

Notifications You must be signed in to change notification settings

buddhiniw/shms_geant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
A geant4 simulation package for SHMS
Author - B.Waidyawansa
Date - 11-10-2013
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This is a simple Geant4 simulation tool designed for diagnostic
putposes in the SHMS. 


Overview
------------------------------------------------------
Physics List - 
Geant4 Physics List simulation engine: QGSP_BERT_HP 3.0
The default cuts used in the physics list have a cut off value of 0.7*CLHEP::mm.
Geometry - 
Geometry information is read in via GDML.
The geometry uses a coordinate system centered at the bender parallel to the optics coordinate system.
Currently we are only using this tool for radiation heat studies on the horizontal bender coils. Therefore the only geometry included in the source directory (shms_geom.gdml) is the horizontal bender magnet (coils, bore, cryostat and the york), the beamline, beam dump vacuum window, beam dump helium vessel and the dump face. All of these have rough geometric shapes based on the real dimensions of the components. But the program is setup such that it is flexible to be used with any geometric setup written in GDML.

Primary Generator - 
The primary generator is defined in the SHMSPrimaryGeneratorAction class.
The default kinematics is a 11 GeV electrons randomly distributed in a 2mm x2 mm square in the (X,Y) plane.

Magnetic Field - 
Magnetic field values are read in from a table generated by TOSCA (Michael Moor's work). Currently we are only considering the field generated by the horizontal bender.
The field can be turned On or OFF via a Boolean flag used in the SHMSDetectorConstruction class.
The field tables are not included in the source directory due to their large size. Please contact me or Michael to get a copy of the tables.

Outputs - 
ntuples and histograms of selected quantities for sensitive detectors are stored in rootfiles.
	* ntuples (step by step information) - 
		*local and global position of the hits (cm), 
		*initial kinetic energy(MeV), 
		*final kinetic energy(MeV), 
		*energy deposition (MeV), 
		*particle ID and parent ID 
 	* histograms (event by event information) energy deposited in the volume (MeV)


Textfile- A text file containing the total energy deposited on each sensitive volume is also written to the same directory where the rootfiles are stored. This contains the energy (Mev) and the error (MeV).


Usage
--------------------------------------------------
Change the G4WORKDOR path to point to the location of the directory containing tthe source files.
Then source SETUP.csh to set the geant4 enviorenment. 
To compile -
 - mkdir ../shms_geant_build
 - cd shms_geant_build
 - cmake -DGeant4_DIR=$G4INSTALL $G4WORKDIR
 - make


Program heirachy
--------------------------------------------------
shms_geant.cc - main program code
/srs - source code of the different classes
/include - include files of the classes
/gdml - GDML geometry files
	these are coppied into the build directory during compilation time
 	- shms_geom.gdml : default. includes bender magnet,beamline, dump vacuum window, dump He vessesl and dump face.

/macros - ROOT scripts to plot results
	  get_energy.cc - get total energy deposition in a volume

About

updated geant4 simulation code of shms. This is an upgrade from shms_sim.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published