# Macro file for geant4 simulation
                                  
# Set the random seeds 
/seed/setSeeds 1209018290281 1209020009235
                                  
# Set the geometry visualisation 
# if setGeomVisu=true, /run/beamOn should not be used 
/THGCal/det/setGeomVisu false
                                  
# Set the flag to write the geometry 
/THGCal/det/setWriteGeom false
# Set the name of the geometry file 
/THGCal/det/setGeomFileName geom_d2.dat
                                  
# ECAL PART  
## General information 
/THGCal/det/setEcalNumberOfLayers 26
/THGCal/det/setEcalRingsNumberPerLayer 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
                                        
## The ecal cells dimensions are in mm
/THGCal/det/setEcalCellSizePerLayer 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
                                        
## The ecal absorber dimensions are in mm
/THGCal/det/setEcalAbsThicknessPerLayer 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05 6.05
/THGCal/det/setEcalAbsMaterialNamePerLayer G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb G4_Pb
               
# HADRONIC PART 
## General information 
/THGCal/det/setHadNumberOfLayers 24
/THGCal/det/setHadRingsNumberPerLayer 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
                                        
## The had cells dimensions are in mm
/THGCal/det/setHadCellSizePerLayer 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
                                        
## The hadronic absorber dimensions are in mm
/THGCal/det/setHadAbsThicknessPerLayer 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 45.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0 80.0
/THGCal/det/setHadAbsMaterialNamePerLayer G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL G4_STAINLESS-STEEL
                                        
# Detector position, distance between the world volume and the center of the forward plan of the first absorber
/THGCal/det/setDetPosition 0.0 0.0 1000.0 mm
/THGCal/det/setLayerSpacing 3.0 mm
               
# Set the number of threads
#/run/numberOfThreads 8
               
# Initialize kernel
/run/initialize
               
# General Particle Source (GPS)
# Flat distribution
/gps/verbose 0
/gps/particle e-
/gps/pos/type Point
/gps/pos/centre 0 0 0 cm
/gps/direction 0 0 1
/gps/ene/type Lin
/gps/ene/min 100 GeV
/gps/ene/max 1 TeV
/gps/ene/gradient 0
/gps/ene/intercept 1
                    
# Output
/THGCal/hitwriter/writerTxtDataFileName sensors_d2_elm_E100GeV_1TeV_theta0_80.dat
               
/THGCal/hitwriter/writerPrimPartInfosFileName primaryParticles_d2_elm_E100GeV_1TeV_theta0_80.dat
               
/run/beamOn 10000