Difference between revisions of "TF SPIM Intro"

From New IAC Wiki
Jump to navigation Jump to search
Line 208: Line 208:
 
then try the following
 
then try the following
  
#root
+
root
your shell promt will change to look like thei : root [0]
+
 
 +
your shell prompt will change to look like thei : root [0]
  
 
type
 
type
  
#.x asci2root.C
+
.x asci2root.C
  
 
then exit the root program with  
 
then exit the root program with  
  
#.q
+
.q
  
 
and restart it with  
 
and restart it with  
  
#root -l sim.root
+
root -l sim.root
  
 
and try the command  
 
and try the command  
  
Simm->Draw("evt.x");
+
Simm->Draw("evt.x");
  
 
== Cross Sections ==
 
== Cross Sections ==

Revision as of 17:47, 17 January 2025

Introduction

Experimentalists use simulations to predict the sources of background which will interfere with the signal they plan on measuring. An important aspect of this process is to understand how signals are produced in your measurement device. Devices share the common problem of isolating a signal produced in the device from the noise that is present in the device.

Below is a description of how signals are produced in bulk materials.

Particle Detection

A device detects a particle only after the particle transfers energy to the device.

Energy intrinsic to a device depends on the material used in a device

Consider a device made of some material with an average atomic number (Z) at some temperature (T). The material's atoms are in constant thermal motion (unless you can manage to have T = zero degrees Klevin).

Statistical Thermodynamics tells us that the canonical energy distribution of the atoms is given by the Maxwell-Boltzmann statistics such that

P(E)=1kTeEkT

P(E) represents the probability of any atom in the system having an energy E where

k=1.38×1023JmoleK

Note: You may be more familiar with the Maxwell-Boltzmann distribution in the form

N(ν)=4πN(m2πkT)3/2v2emv2/2kT

where N(v)Δv would represent the molecules in the gas sample with speeds between v and v+Δv

Example 1: P(E=5 eV)

What is the probability that an atom in a 12.011 gram block of carbon would have an energy of 5 eV?

First lets check that the probability distribution is Normalized; ie: does 0P(E)dE=1?


0P(E)dE=01kTeEkTdE=1kT11kTeEkT0=[ee0]=1

Physically, P(E=5eV) is calculated by integrating P(E) over some energy interval ( ie:N(v)dv). I will arbitrarily choose 4.9 eV to 5.1 eV as a starting point.


5.1eV4.9eVP(E)dE=[e5.1eV/kTe4.9eV/kT]

k=(1.38×1023JmoleK)=(1.38×1023JmoleK)(6.42×1018eVJ)=8.614×105eVmoleK

assuming a room temperature of T=300K

thenkT=0.0258eVmole

and

5.1eV4.9eVP(E)dE=[e5.1/0.0258e4.9/0.0258]=4.48×10831.9×10864.48×1083

or in other words the probability may be approximated by just using the distribution function alone

P(E=5eV)=e5/0.02581085

This approximation breaks down as E0.0258eV

Since we have 12.011 grams of carbon and 1 mole of carbon = 12.011 g = 6×1023carbon atoms, we would not expect to see a 5 eV carbon atom in a sample size of 6×1023 carbon atoms when the probability of observing such an atom is 1085. Note: The mass of the earth is about 1027 g 1050 atoms, so a carbon atom with an energy of 5 eV would be difficult to observe in a detector the size of the earth .

The average energy we expect to see would be calculated by

<E>=0EP(E)dE

If you used this block of carbon as a detector you would easily notice an event in which a carbon atom absorbed 5 eV of energy as compared to the energy of a typical atom in the carbon block.


Silicon detectors and Ionization chambers are two commonly used devices for detecting radiation.

approximately 1 eV of energy is all that you need to create an electron-ion pair in Silicon

P(E=1eV)=e1/0.02581017

approximately 10 eV of energy is needed to ionize an atom in a gas chamber

P(E=10eV)=e10/0.025810169


The low probability of having an atom with 10 eV of energy means that an ionization chamber would have a better Signal to Noise ratio (SNR) for detecting 10 eV radiation than a silicon detector

But if you cool the silicon detector to 200 degrees Kelvin (200 K) then

P(E=1eV)=e1/0.01721026<<1017

So cooling your detector will slow the atoms down making it more noticable when one of the atoms absorbs energy.

also, if the radiation flux is large, more electron-hole pairs are created and you get a more noticeable signal.

Unfortunately, with some detectore, like silicon, you can cause radiation damage that diminishes it's quantum efficiency for absorbing energy.

What does this have to do with Simulations?
You just did a SImulation. Consider the following description of the Monte Carlo Method

The Monte Carlo method

Stochastic
from the greek word "stachos"
a means of, relating to, or characterized by conjecture and randomness.


A stochastic process is one whose behavior is non-deterministic in that the next state of the process is partially determined.

The above particle detector was an example of describing a stochastic process using a probability distribution to determine the likely hood of finding an atom with a certain energy.

Physics at the Quantum Mechanics scale contains some of the clearest examples of such a non-deterministic systems. The canonical systems in Thermodynamics is another example.

Basically the monte-carlo method uses a random number generator (RNG) to generate a distribution (gaussian, uniform, Poission,...) which is used to solve a stochastic process based on an astochastic description.


Example 2 Calculation of π

Astochastic description
π may be measured as the ratio of the area of a circle of radius r divided by the area of a square of length 2r

File:PI from AreaRatio.jpgAcircleAsquare=πr24r2=π4

You can measure the value of π if you physically measure the above ratios.

Stochastic description
Construct a dart board representing the above geometry, throw several darts at it, and look at a ratio of the number of darts in the circle to the total number of darts thrown (assuming you always hit the dart board).
Monte-Carlo Method
Here is an outline of a program to calulate π using the Monte-Carlo method with the above Stochastic description

File:MC PI fromAreaRatio.jpg

begin loop
 x=rnd
 y=rnd
 dist=sqrt(x*x+y*y)
 if dist <= 1.0 then numbCircHits+=1.0
 numbSquareHist += 1.0
end loop
 print PI = 4*numbCircHits/numbSquareHits

A Unix Primer

To get our feet wet using the UNIX operating system, we will try to solve example 2 above using a RNG under UNIX

List of important Commands

  1. ls
  2. pwd
  3. cd
  4. df
  5. ssh
  6. scp
  7. mkdir
  8. printenv
  9. emacs, vi, vim
  10. make, gcc
  11. man
  12. less
  13. rm

Most of the commands executed within a shell under UNIX have command line arguments (switches) which tell the command to print information about using the command to the screen. The common forms of these switches are "-h", "--h", or "--help"

ls --help
ssh -h

the switch deponds on your flavor of UNIX

if using the switch doesn't help you can try the "man" (sort for manual) pages (if they were installed). Try

man -k pwd

the above command will search the manual for the key word "pwd"

Example 3: using UNIX to compile a RNG

Step

  1. login to thorshammer (ssh username@thorshammer.rdc.isu.edu)
  2. mkdir src
  3. cd src
  4. mkdir PI
  5. cd PI
  6. copy past program PI.cc from Moodle into editor on thorshammer
  7. ls
  8. g++ -o PI PI.cc
  9. ./PI

A Root Primer

If typing the command "root" in your unix shell does not work then you need to setup your shell environment so it cn find the application

If you are on thorshamer

In bash shell do

export ROOTSYS=~foretony/src/ROOT/root

if chsh do

setenv ROOTSYS ~foretony/src/ROOT/root

To start the root program type

$ROOTSYS/bin/root

another method

source ~foretony/src/ROOT/root/bin/thisroot.sh


Example 1: Create Ntuple and Draw Histogram

Look for the program "ascii2root.C" in Moodle

copy and paste it into you editor on the machine you would like to run root on.

then try the following

root

your shell prompt will change to look like thei : root [0]

type

.x asci2root.C

then exit the root program with

.q

and restart it with

root -l sim.root

and try the command

Simm->Draw("evt.x");

Cross Sections

Definitions

Total cross section
σ# particles scattered# incident particlesArea
Differential cross section
σ(θ) = dσdΩ# particles scatteredsolid angle#incident particlesArea
Solid Angle
SolidAngleDefinition.jpg
Ω= surface area of a sphere covered by the detector
ie;the detectors area projected onto the surface of a sphere
A= surface area of detector
r=distance from interaction point to detector
Ω=Ar2sr
sr steradians
Asphere=4πr2 if your detector was a hollow ball
Ωmax=4πr2r2=4πsteradians
Units
Cross-sections have the units of Area
1 barn = 1028m2
[units of σ(θ)] =[particles][steradian][particles][m2]=m2
Luminosity
L=Number of ScatterersAreatimeibeamρtargetltarget

FixedTargetScatteringCrossSection.jpg

Fixed target scattering
Nin= # of particles in = IAin
Ain is the area of the ring of incident particles
dNin=IdA=I(2πb)db= # particles in a ring of radius b and thickness db

You can measure σ(θ) if you measure the # of particles detected dN in a known detector solid angle dΩ from a known incident particle Flux (I) as

σ(θ)=dNdΩI

Alternatively if you have a theory which tells you σ(θ) which you want to test experimentally with a beam of flux I then you would measure counts (particles)

dN=Iσ(θ)dΩ=Iσ(θ)dAr2=Iσ(θ)r2sin(θ)dθdϕr2

Units
[dN]=[particlesm2][m2][steradian] = # of particles
or for a count rate divide both sides by time and you get beam current on the RHS
integrate and you have the total number of counts
Classical Scattering
In classical scattering you get the same number of particles out that you put in (no capture, conversion,..)
dNin=dN
dNin=IdA=I(2πb)db
dN=Iσ(θ)dΩ=Iσ(θ)sin(θ)dθdϕ=Iσ(θ)sin(θ)dθ(2π)
I(2πb)db=Iσ(θ)sin(θ)dθ(2π)
bdb=σ(θ)sin(θ)dθ
σ(θ)=bsin(θ)dbdθ
dbdθ tells you how the impact parameter b changes with scattering angle θ

Example 4: Elastic Scattering

This example is an example of classical scattering.

Our goal is to find σ(θ) for an elastic collision of 2 impenetrable spheres of diameter a. We need to look for a relationship between the impact parameter b and the scattering angle θ. To find this relationship, let's solve this elastic scattering problem by describing the collision using the Center of Mass (C.M.) coordinate system in terms of the reduced mass. As we shall see, the 2-body collision becomes a 1-body problem when a C.M. coordinate system is used. Then we will describe the motion of the reduced mass in the C.M. Frame.

SPIM ElasCollis Lab CM Frame.jpg Media:SPIM_ElasCollis_Lab_CM_Frame.xfig.txt

Variable definitions
b= impact parameter ; distance of closest approach
m1= mass of incoming ball
m2= mass of target ball
u1= iniital velocity of incoming ball in Lab Frame
v1= final velocity of m1 in Lab Frame
ψ= scattering angle of m1 in Lab frame after collision
u1= iniital velocity of m1 in C.M. Frame
v1= final velocity of m1 in C.M. Frame
u2= iniital velocity of m2 in C.M. Frame
v2= final velocity of m2 in C.M. Frame
θ= scattering angle of m1 in C.M. frame after collision


Determining the reduced mass


SPIM 2Body-1BodyCoordSystem.jpg

vector definitions
r1 = a position vector pointing to the location of m1
r2 = a position vector pointing to the location of m2
R = a position vector pointing to the center of mass of the two ball system
rr1r2 = the magnitude of this vector is the distance between the two masses

In the C.M. reference frame the above vectors have the following relationships

  1. R=0=m1r1+m2r2m1+m2m1r1=m2r2
  2. r1r2=r

solving the above equations for r1 and r2 and defining the reduced mass μ as

μ=m1m2m1+m2 reduced mass

leads to

r1=μm1r
r2=μm2r

We can use the above reduced mass relationships to construct the Lagrangian in terms of r instead of r1 and r2 thereby reducing the problem from a 2-body problem to a 1-body problem.

Construct the Lagrangian

The Lagrangian is defined as:


L=TU

where

T kinetic energy of the system

U Potential energy of the system which describes the interaction


L=12|˙r1|2+12|˙r2|2U

= 12m1(m2m1+m2)2|˙r|2+12m2(m1m1+m2)2|˙r|2U(r)
= 12(m2+m1)(m1m2(m1+m2)2)|˙r|2U(r)

after substituting derivative of the expressions for r1 and r2

= 12μ|˙r|2U(r)

The 2-body problem is now described by a 1-body Lagrangian we need to determine which coordinate system (cartesian, spherical,..) to use to write an expression for (|˙r|2). Polar seems best unless there is a dependence in the azimuthal angle.

Lagranges equations of motion are given by

Lq=ddtL˙q

where q represents one of the coordinate (cannonical variables).

To get the classical scattering cross section we are interested in finding an expression for the dependence of the impact parameter on the scattering angle,dbdθ.

Now lets redraw the collision in terms of a reference frame fixed on m2 (before collision its the Lab Frame but not after collision).

SPIM ElasCollis CMFrame.jpg Media:SPIM_ElasColls_CMFrame_xfig.txt

The C.M. Frame rides along the center of mass, the above coordinate system though has its origin on m2. The above drawing identifies θ and ϕ for the system at the point of the collision in which the CM frame is a distance a (the size of the ball) from the origin of the coordinate system fixed to m2. If b>a then there is no collision (θ=0), otherwise a collision happens when r=a (the distance between the balls is equal to their diameter). A head on collision is defined as b=0 (θ=π).

Observation
as θ gets smaller, b gets bigger
dbdθ<0

Using plane polar coordinates (r,ϕ) we can describe the problem in the lab frame as:

v=˙rˆer+r˙ϕˆeϕ

T=12μ(˙r2+r2˙ϕ2)


U(r)={0r>ara

L=TU=12μ(˙r2+r2˙ϕ2)U(r)

Lagranges Equation of Motion:

Lϕ=ddtL˙ϕ 0=ddt[μr2˙ϕ] there is a constant of motion ( Constant angular momentum)

μr2˙ϕ=r×p=r×μv=r2μ˙ϕ

substitute into L

L=12(μ˙r2+μr2)U(r)

The two equations above are in terms of r and ϕ whereas our goal is to find an expression for dbdθ. Since r is related to b and ϕ is related toθ (θ=π2ϕ; see figure above) we should try and find expressions for dϕ in terms of r(b)

Trick
˙ϕ=dϕdt=dϕdrdrdt
=μr2dϕdr˙r
or
dϕ=μr2˙rdr


We now need an expression for ˙r in order to integrate the above equation to determine the functional dependence of ϕ and henceθ.

The potential in the Lagrangian though is infinite for ra . Let's use the property of conservation of energy to accommodate this mathematical construct.

Since Energy is conserved (Elastic Scattering), we may define the Hamiltonian as

H=T+U=12(μ˙r2+μr2)+U(r)=constantE

solving for ˙r

˙r=±2(EU(r))μ2μ2r2

substituting the above into the equation for dϕ and integrating:

ϕ=dϕ=rmaxrminμr2˙Rdr

rmin=armax=U(r)=0:ar

ϕ=ar22μE2r2dr

For ar : E=12μv2cmvcm=2Eμ

=r×p||=|r||p|sin(ϕ)=rμvcmsin(ϕ)=rμ(2Eμ)sin(ϕ)=2μErsin(ϕ)=2μEb

substituting this expression for into the last expression for ϕ above :

ϕ=abdrr(r2b2)

Integral Table
dxx(αx2+βx+γ)=1γsin1(βx+2γ|x|β24αγ)

let x=rα=1β=0γ=b2

then

ϕ=b1(b2)sin1(2b2r04(1)(b2))|a=sin1(0)sin1(ba)

or

sin(ϕ)=ba=sin(π2θ2)=cos(θ2)

b=acos(θ2)


Now substitute the above into the expression for σ(θ)

σ(θ)=bsin(θ)dbdθ=acos(θ/2)sin(θ)a[sin(θ/2)]12=a22cos(θ/2)sin(θ/2)sin(θ)

drop the negative sign, sqrt in denominator allows this, and use the trig identity

sin(θ2+θ2)=cos(θ2)sin(θ2)+cos(θ2)sin(θ2)
sin(θ)=2cos(θ2)sin(θ2)

σ(θ)=a2212=a24

σ=σ(θ)dΩ=a22124π=πa2


compare with result from definition
σ = scattering cross-section #particlesscattered#incidentparticlesArea
number of particles scattered = number of incident particles
Area = πa2 = The area profile in which a collision occurs( the ball diameter is a) ClassicalEffectiveScatteringArea.jpg

σ=NNπa2=πa2

Lab Frame Cross Sections

The C.M. frame is often chosen to theoretically calculate cross-sections even though experiments are conducted in the Lab frame. In such cases you will need to transform cross-sections between two frames.

The total cross-section should be frame independent

σC.M.=σLab

or

σ(θ)dΩ=σ(ψ)dΩ

where

θ is in the CM frame and ψ is in the Lab frame.


A non-relativistic transformation
σ(θ)dΩ=σ(ψ)dΩ
σ(θ)2πsin(θ)dθ=σ(ψ)2πsin(ψ)dψ
σ(ψ)=sin(θ)sin(ψ)dθdψσ(θ)

The transformation is governed by the dependence of θ on ψ (dθdψ)

Lets return back to our picture of the scattering Process

SPIM ElasCollis Lab CM Frame.jpg

if we superimpose the vectors v1 and v1 we have

SPIM ElasCollis Lab CM Frame Velocities.jpg

Trig identities (non-relativistic Gallilean transformation) tell us

v1sin(ψ)=v1sin(θ)


v1cos(ψ)=vcm+v1cos(θ)

solving for ψ

tan(ψ)=sin(ψ)cos(ψ)=v1sin(θ)/v1vCMv1+v1cos(θ)v1=sin(θ)cos(θ)+vCMv1

For an elastic collision only the directions change in the CM Frame: u1=v1 & u1=v2

From the definition of the C.M.
vCM=m1u1+m2u2m1+m2=m1m1+m2u1
conservation of momentum in CM Frame
m1u1=m2u2
v1=u1=m2m1u2
Gallilean Coordinate transformation
u1=u1+vCM=u1+m1m1+m2u1
u1=[1m1m1+m2]u1=m2m1+m2u1
v1=u1=m2m1+m2u1
another expression for ψ

using the above gallilean transformation we can do the following

vCMv1=m1m1+m2u1m2m1+m2u1=m1m2

or

tan(ψ)=sin(θ)cos(θ)+m1m2

after a little trig substitution

m1m2=sin(θψ)sin(ψ)= constant

now use the chain rule to find dθdψ

fsin(θψ)sin(ψ)= constant
df=0=fψdψ+fθdθ
dθdψ=fψfθ
fψ=cos(θψ)sin(ψ)+sin(θψ)sin(ψ)
fθ=1+sin(θψ)cos(ψ)cos(θψ)sin(ψ)

after substitution:

σ(ψ)=sin(θ)sin(ψ)dθdψσ(θ)
=sin(θ)sin(ψ)[1+sin(θψ)cos(ψ)cos(θψ)sin(ψ)]σ(θ)

For the above equation to be more useful one would prefer to recast it in terms of only ψ and masses.

σ(ψ)=[m1m2cos(ψ)+1(m1sin(ψ)m2)2]1(m1sin(ψ)m2)2σ(θ)


Simulations_of_Particle_Interactions_with_Matter