Simulation of HELIOS
Author
Tsz Leung Tang
Title
Simulation of HELIOS
Description
This is a reaction simulation for HELIOS spectrometer
Category
Working Material
Keywords
HELIOS, Kinematic Simulation
URL
http://www.notebookarchive.org/2020-12-2sa0rq9/
DOI
https://notebookarchive.org/2020-12-2sa0rq9
Date Added
2020-12-06
Date Last Modified
2020-12-06
File Size
1.52 megabytes
Supplements
Rights
Redistribution rights reserved



FULL HELIOS Simulation
FULL HELIOS Simulation
Functions
Functions
Configuration
Configuration
beam={6,14};(*Z,A*)target={1,2};(*Z,A*)lightRecoil={1,1};(*Z,A*)KEA=10;(*MeV/uforbeam*)BField=-2.0;(*T*)arrayLength=50;arrayPos=Table[55i,{i,0,5}];(*arrayPos=Table[55i,{i,0,5}];*)dist=-125;length=50;width=10;perpDist=11.5;(*mm*)arrayNSide=4;recoilPos=900;recoilRadiusOutter=50;recoilRadiusInner=10;θcmRange={10°,40°};plotRange=2;(*1Automatics,2=det*)
Calculation reaction constant
Calculation reaction constant
Plots
Plots
table1plot1
Mass beam 14 | 13040.9 |
Mass target 2 | 1875.61 |
Mass recoil-1 1 | 938.272 |
Mass recoil-2 15 | 13979.2 |
CM total E : | 14934.1 |
CM β : | 0.127254 |
slope [MeV/mm] | 0.0121434 |
α : | 0.0954269 |
αB : | 0.572561 |
min( θ cm | 1.15223 |
Sn( 15 | 1.21807 |
Sp( 15 | 21.0795 |
list of 15 | {0,0.7400} |
Monte Carlo Simulation with detector Geometry
Monte Carlo Simulation with detector Geometry
exList={0};(*overrideexList*)
exList
{0,1.8313}
xsec={1,1};nEvent=5000;θCMList=RandomReal[{θmin+1°,θcmRange〚2〛},nEvent];ϕList=RandomReal[{0,2π},nEvent];EngList=RandomChoice[xsec->exList,nEvent];(*EngList=RandomVariate[NormalDistribution[0,0.1],nEvent];*)loop=1;inOut=1;
(*viusalizationofadata*)ii=1;recoilScale=10;P=HitCal[θCMList〚ii〛,ϕList〚ii〛,arrayNSide,lightRecoil,EngList〚ii〛,perpDist,loop,inOut,sign,1]Show[{DrawArray[absPos],DrawHit[θCMList〚ii〛,ϕList〚ii〛,EngList〚ii〛,lightRecoil,P,{P〚3〛,0}],DrawRecoil[θCMList〚ii〛,ϕList〚ii〛,EngList〚ii〛,heavyRecoil,recoilScale,{0,recoilPos}],DrawMagnet[500,1700,-500,BField],DrawRecoil[recoilScalerecoilRadiusOutter,recoilPos]},ViewVertical{0,1,0}(*,ViewPoint0.4{5Cos[30°],0.5,-5Sin[30°]},ViewVertical{0,1,0}*)(*,ViewAngle35°*)]
{{13.4032,290.3},0.7400}
z0 = -440.57
ρ = 64.776
-360. | 650.3 | -0.1689 | 74.4122 | 11.5 | 64.5451 | -0.649506 |
-270. | 560.3 | -0.0292972 | 12.9075 | -3.08703 | 11.5 | -0.985548 |
-180. | 470.3 | -0.0563878+0.0757523 | 24.8427-33.3742 | -11.5-5.87987× -15 10 | 22.4727-32.0085 | 3.41501× -16 10 |
-90. | 380.3 | 0.355745 | -156.731 | 115.905 | -11.5 | -0.851433 |
0. | 290.3 | 0.8311 | -366.158 | 11.5 | 64.5451 | -0.649506 |
90. | 200.3 | 0.970703 | -427.662 | -3.08703 | 11.5 | -0.985548 |
180. | 110.3 | 0.943612+0.0757523 | -415.727-33.3742 | -11.5+4.31388× -14 10 | 22.4727-32.0085 | -6.49197× -16 10 |
270. | 20.2996 | 1.35575 | -597.3 | 115.905 | -11.5 | -0.851433 |
360. | -69.7004 | 1.8311 | -806.727 | 11.5 | 64.5451 | -0.649506 |
Real z list: {74.4122,12.9075,-156.731,-366.158,-427.662,-597.3,-806.727}
z in Range{-156.731,-366.158,-427.662}
zHit = {-427.662}
{-3.08703,11.5,-427.662}
(*CalculateHitposition*)Monitor[PList=Table[HitCal[θCMList〚ii〛,ϕList〚ii〛,arrayNSide,lightRecoil,EngList〚ii〛,perpDist,loop,inOut,sign,0],{ii,1,nEvent}];eList=Table[Pb[θCMList〚ii〛,ϕList〚ii〛,EngList〚ii〛]〚1〛-mb,{ii,1,nEvent}];(*Recoil*)recoilList=Table[{xHitB[θCMList〚ii〛,EngList〚ii〛,heavyRecoil,recoilPos,ϕList〚ii〛,sign],yHitB[θCMList〚ii〛,EngList〚ii〛,heavyRecoil,recoilPos,ϕList〚ii〛,sign]},{ii,1,nEvent}];,{ii}]
(*Plots*)GraphicsGrid[{{ListPlot[Table[{PList〚i,1〛,PList〚i,2〛},{i,1,nEvent}],AspectRatio1,ImageSizeMedium,PlotLabelStyle["Array X-Y plot",14]],Show[DensityHistogram[Table[{PList〚ii〛〚3〛,eList〚ii〛},{ii,1,nEvent}],200,AspectRatio0.6,ImageSize600,FrameLabel{Style["z [mm]",14],Style[" [MeV]",14]},GridLinesAutomatic],ParametricPlot[Evaluate[Table[{zHit[θ,ex,lightRecoil,1,If[sign1,0,-2π]+dϕMax[θ,ex,lightRecoil,perpDist,sign],perpDist,sign],Pb[θ,0,ex]〚1〛-mb},{ex,exList}]],{θ,θmin,θcmRange〚2〛},PlotStyleRed]]}}]
E
p
Detector Acceptance
Detector Acceptance
IsInSide[z_]:=Total[Table[If[absPos〚i,1〛<z<absPos〚i,2〛,1,0],{i,1,Length[absPos]}]]DetAcceptance[P_]:=Module{hit,sDist},sDist=-;If[sDist>width/2,hit=-1,If[(P〚3〛<absPos〚1,1〛&&dist<0)||(P〚3〛>absPos〚-1,2〛&&dist>0),hit=-2,If[IsInSide[P〚3〛]0,hit=2,If[(P〚3〛>absPos〚-1,2〛&&dist<0)||(P〚3〛<absPos〚1,1〛&&dist>0),hit=3,hit=1]]]]Gating[hitList_,list_]:=DeleteCases[Table[If[hitList〚ii〛1,list〚ii〛,Null],{ii,1,Length[list]}],Null];
2
Norm[P〚1;;2〛]
2
perpDist
hitID=Table[DetAcceptance[PList〚ii〛],{ii,1,nEvent}];gPList=Gating[hitID,PList];gRecoil=Gating[hitID,recoilList];gθCMList=Gating[hitID,θCMList];gϕList=Gating[hitID,ϕList];gEngList=Gating[hitID,EngList];geList=Gating[hitID,eList];Histogram[hitID]
GraphicsGrid[{{ListPlot[gPList〚1;;-1,{1,2}〛,AspectRatio1,PlotLabelStyle["Array X-Y plot",14],FrameTrue,ImageSizeMedium],Show[{ListPlot[gRecoil,AspectRatio1,AspectRatio1,PlotLabelStyle["Recoil X-Y plot",14],FrameTrue],Graphics[{Circle[{0,0},recoilRadiusOutter],Circle[{0,0},recoilRadiusInner]}]}]}}]DensityHistogram[Table[{gPList〚ii〛〚3〛,geList〚ii〛},{ii,1,Length[gPList]}],200,AspectRatio0.6,ImageSize800,FrameLabel{Style["z [mm]",14],Style[" [MeV]",14]},GridLinesAutomatic]
E
p
nDisplay=10;viewAngle=50°;recoilScale=5;Show[{DrawArray[absPos],Table[DrawHit[gθCMList〚ii〛,gϕList〚ii〛,gEngList〚ii〛,lightRecoil,gPList〚ii〛,{gPList〚ii,3〛,0}],{ii,1,nDisplay}],Table[DrawRecoil[gθCMList〚ii〛,gϕList〚ii〛,gEngList〚ii〛,heavyRecoil,recoilScale,{0,recoilPos}],{ii,1,nDisplay}],DrawMagnet[500,1700,-500,BField],DrawRecoil[recoilScalerecoilRadiusOutter,recoilPos]},ViewPoint0.4{5Cos[viewAngle],0.5,-5Sin[viewAngle]},ViewVertical{0,1,0},ViewAngle40°,ViewCenterAutomatic]
GIF output
GIF output
Directory[]gif=Table[Show[{DrawArray[absPos],Table[DrawHit[gθCMList〚ii〛,gϕList〚ii〛,gEngList〚ii〛,lightRecoil,gPList〚ii〛,{gPList〚ii,3〛,0}],{ii,1,50}],Table[DrawRecoil[gθCMList〚ii〛,gϕList〚ii〛,gEngList〚ii〛,heavyRecoil,recoilScale,{0,1000}],{ii,1,50}],DrawMagnet[500,1700,-500,BField],DrawRecoil[recoilScalerecoilRadiusOutter,recoilPos]},ViewPoint0.4{5Cos[θ],0.5,-5Sin[θ]},ViewVertical{0,1,0},ViewAngle40°,ViewCenterAutomatic],{θ,0°,360°,10°}];Export["hahaha.gif",gif,"AnimationRepetitions"∞]
C:\Users\user\Documents
hahaha.gif
Trajectory Visualization
Trajectory Visualization
PolyPrism[r_,θ_,p1_,p2_,n_]:=Module{x},x=JoinTableCos[i+θ],Sin[i+θ],p1,i,0,2π-0.1,2,TableCos[i+θ],Sin[i+θ],p2,i,0,2π-0.1,2;GraphicsComplex[x,Polygon[Join[{Table[i,{i,1,n}],n+Table[i,{i,1,n}]},Table[{i,Mod[i,n]+1,Mod[i,n]+n+1,Mod[i-1,n]+n+1},{i,1,n}]]]]DrawArray[absPos_]:=Graphics3DArrow[{{0,0,0},{200,0,0}}],Arrow[{{0,0,0},{0,400,0}}],Arrow[{{0,0,-400},{0,0,400}}],Green,Opacity[.3],TablePolyPrismperpDist,,absPosi,1,absPosi,2,arrayNSide,{i,Length[absPos]},ImageSizeLarge,BoxedFalseDrawHit[θ_,ϕ_,Ex_,iso_,P_,zRange_]:=Show[Graphics3D[{If[sign>0,Blue,Orange],PointSize[Large],Point[P]},BoxedFalse],ParametricPlot3D[{{xHit[θ,Ex,iso,z,ϕ,sign],yHit[θ,Ex,iso,z,ϕ,sign],z}(*,{xHitB[θccc,0,heavyRecoil,z,ϕccc+π,sign],yHitB[θccc,0,heavyRecoil,z,ϕccc+π,sign],z}*)},{z,zRange〚1〛,zRange〚2〛},PlotStyleIf[sign>0,Blue,Orange],BoxedFalse]]DrawRecoil[θ_,ϕ_,Ex_,iso_,scale_,zRange_]:=Show[Graphics3D[{If[sign>0,Purple,Red],PointSize[Large],Point[{scalexHitB[θ,Ex,iso,zRange〚2〛,ϕ+π,sign],scaleyHitB[θ,Ex,iso,zRange〚2〛,ϕ+π,sign],zRange〚2〛}]},BoxedFalse],ParametricPlot3D[{{scalexHitB[θ,Ex,iso,z,ϕ+π,sign],scaleyHitB[θ,Ex,iso,z,ϕ+π,sign],z}},{z,zRange〚1〛,zRange〚2〛},PlotStyleIf[sign>0,Purple,Red],BoxedFalse]]DrawMagnet[radius_,length_,pos_,BField_]:=Graphics3D[{Magenta,If[BField>0,Arrow[{{0,400,100},{0,400,700}}],Arrow[{{0,400,700},{0,400,100}}]],Gray,EdgeForm[],Opacity[0.1],Cylinder[{{0,0,pos},{0,0,pos+length}},radius]},BoxedFalse]DrawRecoil[radiusOut_,pos_]:=Graphics3D[{Brown,EdgeForm[],Opacity[0.2],Cylinder[{{0,0,pos},{0,0,pos+10}},radiusOut]},BoxedFalse]
r
Cos[θ]
r
Cos[θ]
π
n
r
Cos[θ]
r
Cos[θ]
π
n
π
arrayNSide
θccc=5°;ϕccc=120°;Ex=0;arrayNSide=4;sign=1;loop=1;inOut=1;(*1forhitfromoutside,0,forhitfrominside*)(*i=8;θccc=θCMList〚ii〛;ϕccc=ϕList〚ii〛;*)P=HitCal[θccc,ϕccc,arrayNSide,lightRecoil,Ex,perpDist,loop,inOut,sign,1];Print["{x, y, z} = ",P]Show[{DrawArray[absPos],DrawHit[θccc,ϕccc,Ex,lightRecoil,P,{P〚3〛,0}]},ViewVertical{0,1,0}]
{{5.,120.},0}
z0 = -417.702
ρ = 19.9374
0. | 120. | 1.88003 | -785.293 | 11.5 | -9.11662 | -0.957263 |
90. | 30. | 1.5711 | -656.251 | 37.1448 | 11.5 | -0.997046 |
180. | -60. | 1.08333+0.14474 | -452.511-60.4584 | -11.5-3.80922× -15 10 | 9.96869+20.7364 | 4.4174× -16 10 |
270. | -150. | 0.833333+0.0619856 | -348.085-25.8915 | 17.2663-7.96276 | -11.5+2.56102× -15 10 | 3.29677× -16 10 |
360. | -240. | 0.880031 | -367.591 | 11.5 | -9.11662 | -0.957263 |
450. | -330. | 0.571097 | -238.549 | 37.1448 | 11.5 | -0.997046 |
540. | -420. | 0.0833333+0.14474 | -34.8085-60.4584 | -11.5-7.93909× -15 10 | 9.96869+20.7364 | 4.4174× -16 10 |
630. | -510. | -0.166667+0.0619856 | 69.6171-25.8915 | 17.2663-7.96276 | -11.5-6.09719× -15 10 | 1.28607× -15 10 |
720. | -600. | -0.119969 | 50.1112 | 11.5 | -9.11662 | -0.957263 |
Real z list: {-785.293,-656.251,-367.591,-238.549,50.1112}
z in Range{-367.591,-238.549}
zHit = {-367.591}
{x, y, z} = {11.5,-9.11662,-367.591}


Cite this as: Tsz Leung Tang, "Simulation of HELIOS" from the Notebook Archive (2020), https://notebookarchive.org/2020-12-2sa0rq9

Download

