# Created by jixie zhang, 12/26/2010
# This ini file is used to config the geometry and materials 
# Use "#" to comment line and each line should be ended  by ";"
# Don't put any empty line at this file,in linux this will cause false
# The Max length of each line is 1024
# Unit: mm, mg/cm^3, kalvin, atmosphere
###################################################################
#
#Scatering chamber, Rin=17.875' Rout=18.875'
ScatChamberRin=454.025;
ScatChamberRout=479.425;
#The height of the scatering chamber body is 27.25", or 692.15 mm, 
#the top is 3.5(0.25+1.0+2.25) top plange + 17 LN2 containner body then 1.25 top plate
#the bottom is 3.25 (1.0+2.25) bottom flange, then 1.25 bottom plate
#in total the height is 53.5", Here I just put the body height
ScatChamberL=692.15;
#Exit window cover will be 20 mil thick, 15 inch high, surrounding the scattering chamber windows
ScatChamberExitWindowThick=0.508;
#the shielding radii and height
#LN2 Shield cylinder with Din=32.5", Dout=33", the window cover is 0.0015'=0.0381mm 
ShieldLN2Rin=412.75;
ShieldLN2Rout=419.10;
ShieldLN2WindowThick=0.0381;
ShieldLN2L=700.0;
ShieldLHeRin=38.1;
ShieldLHeRout=38.1381;
ShieldLHeL=700.0;
###################################################################
#this part is used to set up the target weight ratio for g2p|gep
#A default volumn ratio of 55% NH3 to 45% He4 is built in HRSMaterial. One can
#change the ratio here if you prefer a different ratio. 
#solid NH3 target, 817 kg/m^3 at -80 degree, see http://en.wikipedia.org/wiki/Ammonia
#Update: The target is SolidNH3 mixed with LiquidHe with a packing factor of 55% NH3
# (0.817 g/cm^3) and 45% LHe (0.145 g/cm^3). This has been confirmed to be volume ratio, not weight ratio
#If NH3VolumnRatio=0.55, the weight ratio os 0.8732, average density is 0.515 g/cm^3
SolidNH3D=817.0;
#LHe, which is used to cool the target, 0.145 g/cm^3 at melting point(-272.2 degree),
#see http://en.wikipedia.org/wiki/Helium
LiquidHeD=145.0;
NH3WeightRatio=0.8732;
###################################################################
#Beam dump is a box, need to know width (X) heigth(Y) and length(Z)
#and also its center position in lab frame
BeamDumpWidth=235;
BeamDumpHeight=380;
BeamDumpThick=150;
#distance of the target center to the front face of the beam dump, from survey A1453
Pivot2BeamDumpFace=639.2;
#
#########################Third Arm##############################
#
#RotZAngle is the rotation angle about the arm centra ray, 
#RotXAngle is the tilted angle, need to
#rotate about z then x axises
ThirdArmAngle=70.0;
ThirdArmRotZAngle=0.0;
Pivot2ThirdArmFace=2100.0;
#SetupThirdArmVD=0 will not set up the VD for the 3rd arm, 
#=1 will place it in front of SC1, =2 will place it behind SC2
#=3 will place it in between SC1 and SC2
SetupThirdArmVD=2;
#
#########################Target Block############################
#The following will be frequently changed
#SetupG2PTarget is used to determine whether to setup target wall and also determine the
#the radius of the target cell and the target position w.r.t the target nose. 
#It can be 0, 1, 2, 3, 6, 10, 20, 30, 60 or 99
#0 means do not set up the target, 
#1 means it is the 1st target cell(R_out=1.142"/2 and R_in=TargetR=1.072"/2, centered at zero), 
#  for NH3He target, with end cap. Can have target wall. The 4th and 5th target cell are identical to the 1st cell. 
#2 is the middle size hole(D=0.397", centered at -10.95mm) for C12. No target wall 
#3 is the smallest hole(D=0.312", centered at -10.95mm) for CH2. No target wall 
#6 is the 6th target cell(R_out=1.142"/2 and R_in=TargetR=0.960"/2, with the front face aligned to
#  the upstream end, z_face=-1.113"/2=-14.135mm) for C12. With target wall, No end caps. 
#10, 20, 30, and 60 are the the same as 1,2,3 and 6,respectively, but NO LHe inside the target nose.
#99 means use a pvc pipe and a 10-mil C12 target foil located at z=-896.0 mm, which is the situation 
#   of commissioning. In this setup, no target wall, no target cell, TargetType, TargetR, TargetL above 
#   will be ignored 
SetupG2PTarget=1;
#
#TargetType is used to tell what the target is. Here is the candidates: 0(vacuum), 1(NH3He above) 
#2(CH2), 3(Carbon), 4(Tantalum), 5(LH2), 6(LD2), 7(LHe3), 8(LHe), 9(Aluminum), 10(Copper)
#11(Lead), 12(Tungsten), 13(stainlesssteel), 14(Kapton), 15 (300k Air), 16(300K HeliumGas)
#17(calcium), 18(55% solid NH3 and 45% LHe mixtrue)
TargetType=1;
#	
# In G2P, we have 28.27mm NH3, 40 mil C12 or 125 mil C12
TargetL=28.27;  #1.016; #mm
###################################################################
#if SetupG2PScatChamber==1, will build the body tubes only, if SetupG2PScatChamber>1, 
#will also build the head flange and bottom flange 
SetupG2PScatChamber=1;
#If SetupCoil==1 will build SANE magnet coils, will build HallB magnet coils if SetupCoil is set to 2;
#The geometry will not be built if scattering chamber is not built 
SetupCoil=2;
#setup the platform, can take 0,1,2 and 3. 2 means 2nd floor only, 3 means 3rd floor only,
#1 means the whole platform  
SetupPlatform=2;
#if SetupBeamDump==1, will setup local dump only, SetupBeamDump>=2 will also build the stand;
SetupBeamDump=2;
#
SetupThirdArm=0;
#
SetupChicane=0;
#setup the virtual detector for chicane, 0 means none, 1 for FZB1, 2 for FZB2, 3 for both
SetupChicaneVD=0;
#
###################################################################
#distance of the target center to the front face of the sieve slit
Pivot2LSieveFace=800;
Pivot2RSieveFace=800;
#
#size distance of the target center to the front face of the HRS virtual boundary
#these 5 values will be used only if septum field is used and argument UseSeptumPlusStdHRS=0
HRSVBWidth=104.0;
HRSVBHeight=244.0;
HRSVBThick=0.0508;
Pivot2LHRSVBFace=806;
Pivot2RHRSVBFace=806;
#
###################################################################
###################################################################
#The following is a copy of G2P|GEP Detector.ini
#I put them here to overwrite those in Detector.ini
###################################################################
#You are overwriting the "SetupLHRS" "SetupRHRS" that defined in Detector.ini
#Please note that if it is defined as 0 there, you should not change it to none 0
#here, otherwise the program will not run
#
#setup HRS have the following candidates: 0: do nothing; 1: will build septum, sieve and VB; 
# 2: add Q1; 3: add Q2 ; 4: add Dipole and Q3  
#Since ContructG2PHRS() will be called only if SetupLHRS or SetupRHRS none zero. HRSContainner
#will be set up only if SetupLHRS>=2 or SetupRHRS>=2. In order to speep up, please do not set up
#HRSContainer. for example, SetupLHRS=1 and SetupRHRS=1 will allows to set up sieve, septum and 
#HRSVB without setting up HRSContainer, which allows to shrink the hall size and results in fast speed.
SetupLHRS=1;
SetupRHRS=1;
#
#Note that sieve slit will be placed only if HRS is placed
SetupLSieveSlit=0;
SetupRSieveSlit=0;
#please note that the septum angle should always be given, even if the septum is not used,
#for example, in 12.5 deg HRS seting, we should let Septum angle be 12.5
#Beware that the right arm is negative or =360.0-fabs(angle)
LHRSAngle=12.5;
RHRSAngle=347.5;
LSeptumAngle=5.65;
RSeptumAngle=354.35;
###################################################################
#The x,y,z coordinate of the NEW PIVOT in the Hall coordinate system. 
#For 6 degree SeptumAngle, it is (0,0,-876.93) mm
PivotXOffset=0.0;
PivotYOffset=0.0;
PivotZOffset=-876.93;
#The x,y,z coordinate of the scatter chamber in Hall coordinate system. 
ScatChamberXOffset=0;
ScatChamberYOffset=0;
ScatChamberZOffset=-876.93;
#The  x,y,z coordinate of the target in Hall coordinate system.
# Note that it should stay inside the scater chamber
TargetXOffset=0.0;
TargetYOffset=0.0;
TargetZOffset=-876.93;
#
###################################################################