Manipulate[Column[{(*manyParticlesChart[positions[width],σ,o,1],*)cloudOverwievChart[width,σ,o,1,showAll],transmittancesChart[positions[width],σ,o,1,1-tr,range],
Column[{Style[Grid[{
{"Cloud width (classic)","",width,"(length unit)"},
{"Number of particles","N",width/2+1,"(length unit)"},
{"Standard deviation","σ",DecimalForm[σ,{3,2}],"(length unit)"},
{"Detector radius","r",1, "(length unit)"},
{"Detector position","o",o,"(length unit)"},
{"G coefficient","1-(Subscript[TR, cl])",DecimalForm[1-tr,{3,2}],""},
{"Classic transmittance","(Subscript[TR, cl])",DecimalForm[tr*100,{3,1}], "(%)"},
{"TRANSMITTANCE","TR",Style[DecimalForm[100*transmittance1D[positions[width],σ,o,1,1-tr],{3,1}],FontWeight->Bold],"(%)"}
},Frame->All,Alignment->{{Right,Center,Center, Left}}],
FontFamily->"Courier"],
Style["This is a tool for plotting the sample 1D smeared gas transmittance. \nSee \!\(\*TemplateBox[{
RowBox[{
RowBox[{"J", ".", "M", ".", " ", "Ratajczak"}], ",", 
RowBox[{"Smeared", " ", "Gas", " ", "Transmittance", " ", "Revisited"}], ",", " ", 
RowBox[{"arxiv", ":", "2105.05057"}]}], {
URL["https://arxiv.org/pdf/2105.05057.pdf"], None}, "https://arxiv.org/pdf/2105.05057.pdf", "HyperlinkActionNew", {"HyperlinkActive"}, BaseStyle -> {"Hyperlink"}, HyperlinkAction -> "New"},"HyperlinkTemplate"]\) or \!\(\*TemplateBox[{
RowBox[{"www", ".", "smearedgas", ".", "org"}], {
URL["https://www.smearedgas.org"], None}, "https://www.smearedgas.org", "HyperlinkActionNew", {"HyperlinkActive"}, BaseStyle -> {"Hyperlink"}, HyperlinkAction -> "New"},"HyperlinkTemplate"]\) for details.",FontFamily->"Arial"]
}]
}],
{{width,40,"Cloud width (classic)"},4,100,4},
{{σ,0.08, "Std.dev. (σ)"},0.08,range},
{{o,0,"Detector position (o)"},-width-20,width+20,2},
{{tr,0.1,"Classic transmittance"},0,1},
{{range,30, "Plot x-range"},5,400},
{{showAll,0,"Show all particles\n         (slower)"},{0,1}},
ControlPlacement->Right,
Initialization:>{
ClearAll["Global`*"];
imgSize=1000;
normalDistribution1D[x_,pos_,stdev_]:=((((Sqrt[2π])stdev))^(-1))Exp[-.5((((x-pos)/stdev))^2)];
detectionAbsorptionRate1D[pos_,stdev_,o_,r_,g_]:= g(1/2)( Erf[(( (o-pos+r))/((Sqrt[2])stdev))]-Erf[(((o-pos-r))/((Sqrt[2])stdev))]); 
detectionAbsorptionRate2D[pos_,stdev_,o_,r_,g_]:= g(1/4)( Erf[(( (o-pos[[1]]+r))/((Sqrt[2])stdev))]-Erf[(((o-pos[[1]]-r))/((Sqrt[2])stdev))])( Erf[(( (o-pos[[2]]+r))/((Sqrt[2])stdev))]-Erf[(((o-pos[[2]]-r))/((Sqrt[2])stdev))]); 
positions1D=Compile[{width},Table[pos,{pos,-(width/2),(width/2),2}]]; (*cloud width*)
positions2D=Compile[{width},Tuples[{positions1D[width],positions1D[width]}]] ; (*cloud width*)
positions:=positions1D;
transmittance1D[positions_,stdev_,o_,r_,g_]:=Product[(1-detectionAbsorptionRate1D[pos,stdev,o,r,g]), {pos,positions}];
transmittance2D[positions_,stdev_,o_,r_,g_]:=Product[(1-detectionAbsorptionRate2D[pos,stdev,o,r,g]), {pos,positions}];
transmittance[positions_,stdev_,o_,r_,g_]:=transmittance1D[positions,stdev,o,r,g];
manyParticlesChart[particles_,stdev_,o_,r_]:=Plot[Table[normalDistribution1D[x,pos,stdev],{pos,particles}],{x,Min[particles]-3stdev,Max[particles]+3stdev},PlotRange->Full,
Axes->False,Frame->{{True,False},{True,True}}, FrameLabel->{{"Particles prob. distribution",None},{"Position x",None}},
FrameTicks->{{Automatic,None},{Automatic,None}},
PlotLabel->Row[{"N=",Length[particles],", σ=",stdev,", detector r=",r," at o=",o}],Filling->Axis,
Epilog->{{,Thick,Line[{{o-r,0.},{o+r,0.}}]}, (*Plot detector*)
{Dashed ,,Line[{{o-r,40},{o-r,0}}],Line[{{o+r,40},{o+r,0}}]}},
ImageSize->imgSize, AspectRatio->.1];
cloudOverwievChart[width_,stdev_,o_,r_,showAll_]:=Plot[{Table[normalDistribution1D[x,pos,stdev],{pos,If[showAll==1,positions[width],{-(width)/2,-2,0,2,4,(width)/2}]}]},{x,-width/1.5,width/1.5},PlotRange->{Full, {0.001,1/((stdev^(.7)))}},
Axes->False,Frame->{{True,False},{True,True}}, FrameLabel->{{"Particles prob. distribution",None},{"Position x",None}},
FrameTicks->{{Automatic,None},{Automatic,None}},PlotStyle->{},Filling->Axis,
PlotLabel->Row[{"Cloud width=",width,", N=",width/2+1,", σ=",DecimalForm[stdev,{3,1}],", detector r=",r," at o=",o}],
ImagePadding->{{45,Automatic},{Automatic,15}},
Epilog->{{,Dashed ,Thick,Line[{{-width/2-1,40},{-width/2-1,0}}],Line[{{width/2+1,40},{width/2+1,0}}],
Text["Classic cloud border",{-width/2-1,.0},{Left,Bottom}, {0,1}]},
{,Thick,Line[{{o-r,0.},{o+r,0.}}]}, (*Plot detector*)
{Dashed ,,Line[{{o-r,40},{o-r,0}}],Line[{{o+r,40},{o+r,0}}],
Text["Detector",{o-r,0},{Left,Bottom}, {0,1}]}},
ImageSize->imgSize, AspectRatio->.12];
transmittancesChart[particles_,σ_,o_,r_,g_,range_]:=Plot[{transmittance[particles,stdev,o,r,g],If[o≠0,transmittance[particles,stdev,0,r,g]]},{stdev,0,range}, 
PlotStyle->{,{,Dashed}},PlotRange->{{-.5,range},{1-g-.1, 1.01}},
Axes->False,Frame->{{True,False},{True,True}},
PlotLabel->Row[{"r = ",r,", G = ",g,", N = ",Length[particles], " (1D particles placed every 2r)"}], 
PlotLegends->If[o≠0,Placed[{"off-axis", "in-axis"},{Right,Bottom}],{}],
FrameLabel->{{"Transmittance",None},{"Particle standard deviation (units of detector radius r)",None}},
(*PlotLegends->Placed[{"detection in the cloud axis","detection off the cloud axis"},{Right,Center}],*)
Epilog->{{,Line[{{σ,-1},{σ,transmittance[particles,σ,o,r,g]}, {-1,transmittance[particles,σ,o,r,g]}}],
,Dashed,Line[{{-1,1-g},{4,1-g}}],Text[Row[{"Classic transmittance (Subscript[TR, cl]) = (e^(-nlσ))= (1-G) = ",DecimalForm[N[(1-g)*100],{3,1}],"%"}],{1,1-g},{Left,Bottom}],
Line[{{-1,Exp[-g]},{25,Exp[-g]}}],Text[Row[{"Closed system transmittance growth limit (Subscript[TR, limit ])= (e^(-G)) = (e^(((Subscript[TR, cl]) - 1))) = ",DecimalForm[N[Exp[-g]*100],{3,1}],"%"}],{19,Exp[-g]},{Left,Bottom}],
Line[{{0.3,0},{.3,1}}],Text["Classic system",{.3,.71},{Right,Bottom}, {0,1}]
}},
ImageSize->imgSize, AspectRatio->.3];
}
]