#############################
# Collimator VPC-45K ########
# Low Energy Hihg Resolution#
#############################
# radius hole r: 0.075 cm ###################################
# hole length  : 3.5 cm #####################################
# septal thickness s: 0.02cm ################################
# repeating the hole ########################################
# cubic array: repeat vector y = 2*r+s ######################
#	       repeat vector z = 2*sin(60°)*(2*r+s) #########
# linear:      repeat vector y = (2*r+s)/2 ##################
#	       repeat vector z = (2*sin(60°)*(2*r+s))/2 #####
# Repeat Number Y: YLength (19cm)/cubicarray repeat vector y#
# Repeat Number Z: ZLength (28cm)/cubicarray repeat vector z#	
#############################################################
	
##
/gate/SPECThead/daughters/name collimator
/gate/SPECThead/daughters/insert box
/gate/collimator/geometry/setXLength 3.5 cm
/gate/collimator/geometry/setYLength 19. cm
/gate/collimator/geometry/setZLength 28. cm
/gate/collimator/placement/setTranslation   -2.545 0. 0. cm 
/gate/collimator/setMaterial Lead
/gate/collimator/vis/setColor red
/gate/collimator/vis/forceWireframe
#
# Insert the first hole of air in the collimator
##
/gate/collimator/daughters/name hole
/gate/collimator/daughters/insert hexagone
/gate/hole/geometry/setHeight 3.5 cm
/gate/hole/geometry/setRadius 0.075 cm
/gate/hole/placement/setRotationAxis 0 1 0
/gate/hole/placement/setRotationAngle 90 deg
/gate/hole/setMaterial Air
#
# Repeat the hole in an array
##
/gate/hole/repeaters/insert cubicArray
/gate/hole/cubicArray/setRepeatNumberX 1
/gate/hole/cubicArray/setRepeatNumberY 111
/gate/hole/cubicArray/setRepeatNumberZ 95
/gate/hole/cubicArray/setRepeatVector 0. 0.17  0.294 cm
#
# Repeat these holes in a linear
##
/gate/hole/repeaters/insert linear
/gate/hole/linear/setRepeatNumber 2
/gate/hole/linear/setRepeatVector 0. 0.085 0.147 cm
