26
March 2, 2011 TJR G4beamline Validation 1 G4beamline Validation http://g4beamline.muonsinc.com Tom Roberts Muons, Inc.

March 2, 2011 TJRG4beamline Validation1 G4beamline Validation Tom Roberts Muons, Inc

Embed Size (px)

Citation preview

Page 1: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

March 2, 2011 TJR G4beamline Validation 1

G4beamlineValidation

http://g4beamline.muonsinc.com

Tom Roberts

Muons, Inc.

Page 2: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Outline

A major concern of the MAP review committee was the apparent lack of validation of the simulation tools we are using.

This talk is based on the document written in response:http://www.muonsinc.com/g4beamline/G4beamlineValidation.pdf

•Basic Properties of G4beamline Simulations– Object placement, tracking, regression tests

•Physics Processes from Geant4– Multiple scattering, energy loss, hadronic interactions

•Physics Processes Implemented in G4beamline– Fixes to Geant4 processes, collective computations, space charge (in vacuum)

•Beamline Elements– solenoid, genericbend, genericquad, multipole

•Summary

March 2, 2011 TJR G4beamline Validation 2

Page 3: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Basic Properties

• Object Placement:– An object that kills all tracks with x<5 is accurate to 2 nanometers in tracking –

this is far more accurate than real surfaces can be placed.

March 2, 2011 TJR G4beamline Validation 3

Page 4: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Basic Properties

• Tracking:– A proton traveling 107 meters in vacuum with no fields, is in the correct place at

the correct time, to the accuracy of a float. That is 108 steps of 100 mm each.

– 25 MeV electrons traveling perpendicular to a uniform 0.01 T magnetic field (circumference = 52 meters) have the correct period and radius to 6 significant digits. The accuracy with which they return to their starting point depends on the step size:

March 2, 2011 TJR G4beamline Validation 4

15 nm

Typical

Page 5: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Basic Properties

• Regression Tests– Most of these numerically verify an instance of the command they test.

March 2, 2011 TJR G4beamline Validation 5

test01: simple geometry and tracking test (1 sec)test02: BLFieldMap test (1 sec)test03: tracking through quads and bend (1 sec)test04: tracking mu+ through Aluminum (5 sec)test05: multiple successive transforms (1 sec)test06: HistoScopetest07: tracking through a group of 2 solenoids (7 sec)test08: FOR009.DAT output (2 sec)test09: ntuple, particlefilter test (2 sec)test10: timentuple (1 sec)test11: trace test (1 sec)test12: multipole test (1 sec)test13: tracing through FieldMaps and bend (1 sec)test14: Eloss and multiple scattering in LH2 (15 sec)test15: fieldexpr test (8 sec)test16: particlefilter require argument (1 sec)test17: various kill arguments (7 sec)test18: various object arguments on the place commandtest19: geometrical args on place command (1 sec)test20: beamlossntuple (7 sec)test21: field of rotated solenoid and solenoid cache filetest22: argument expressions (1 sec)

test23: place OFFSET with 2 solenoids (7 sec)test24: virtualdetector NTuple name test (1 sec)test25: particlefilter nWait and referenceWait test (1 sec)test26: ntuple with for009.dat (2 sec)test27: randomseed command (4 sec)test28: printf (1 sec)test29: 3 nested tune-s (2 sec)test30: tune By of genericbend (2 sec)test31: tune maxGradient of 4 pillbox-es (2 sec)test32: tune reference momentum (2 sec)test33: profile command (15 sec)test34: element naming (1 sec)test35: tune By of idealsectorbend (2 sec)test36: the if and the define commands (1 sec)test37: zntuple (2 sec)test38: Root input and output (6 sec)test39: zntuple + beam rotation (2 sec)test40: MICEPhysicsList (1 sec)Test41 LISAPhysicsListtest42: rotated trace (1 sec)test43: various coordinates arguments (2 sec)test44: steppingVerbose (1 sec)

Page 6: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Basic Properties

• Regression Tests– Most of these numerically verify an instance of the command they test.

March 2, 2011 TJR G4beamline Validation 6

test45: psuedo random number generator seedstest46: do loops and complex (multi-line) if-s (1 sec)test47: tune By of six idealsectorbends (2 sec)test48: reference coordinates (2 sec)test49: multiple beam commands eventide-s (1 sec)test50: require arguments on NTuple commands (1 sec)test51: newparticlentuple (2 sec)test52: tune fieldexpr (2 sec)test53: tune fieldmap (2 sec)test54: Zcl (2 sec)test55: compile and run BLMinimize (1 sec)test56: extrusion (2 sec)test57: eventcuts file (1 sec)test58: NIST material database, output command (1 sec)test59: multiple beam-s and corner-s (3 sec)test60: tracker (4 sec)test61: linac (3 sec)test62: 120 GeV/c beam (10 sec)test63: zntuple tracked both directions (2 sec)test64: torus (2 sec)test65: pillbox B field (2 sec)test66: tracker (4 sec)

test67: various comma-separated list arguments (3 sec)test68: polycone (1 sec)test69: genericbend as a parent (3 sec)test70: tracked preservation (1 sec)test71: basic collective tracking (1 sec)test72: compiling user code with g4blmake (20 sec)test73: totalenergy (2 sec)test74: pillbox fixed timeOffset (2 sec)test75: pillbox kill=1 (2 sec)test76: ntuple command (1 sec)test77: unary minus in expressions (5 sec)test78: setdecay command (1 sec)test79: reference noEloss and no field (2 sec)test80: particlesource command (1 sec)test81: veto argument to ntuple command (2 sec)test82: fieldntuple (2 sec)test83: multiple reference particles, noEfield and noElosstest84: extended NTuple formats (2 sec)test85: synchrotron radiation (2 sec)test86: multiple NTuple-s to single ASCII file (1 sec)test87: spacecharge (12 sec)test88: helicalharmonic (2 sec)

Page 7: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Physics Processes from Geant4

• All Geant4 physics lists are available in G4beamline

• In almost every case they are unchanged, so the Geant4 validation applies (modified processes in next section).

• This talk will discuss:– Multiple scattering– Energy loss– Straggling– X-rays from μ− capture

March 2, 2011 TJR G4beamline Validation 7

Page 8: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Multiple Scattering

• Geant4 has several different implementations for electromagnetic processes.

• The current default for muons is G4WentzelVIModel.• There are also models for low energy particles (< ~1 MeV):

– Penelope

– Livermore

• Plots comparing to the MuScat experiment are below (172 MeV/c μ+).• While the simulation certainly reproduces the general distributions,

treated as a 0-parameter fit to the data the χ2 values are not very good:

March 2, 2011 TJR G4beamline Validation 8

Page 9: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Multiple Scattering

March 2, 2011 TJR G4beamline Validation 9

Page 10: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Multiple Scattering

March 2, 2011 TJR G4beamline Validation 10

Page 11: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Multiple Scattering

March 2, 2011 TJR G4beamline Validation 11

Page 12: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Energy Loss

March 2, 2011 TJR G4beamline Validation 12

http://pdg.lbl.gov/2010/reviews/rpp2010-rev-passage-particles-matter.pdf

The discrepancy for>100 GeV/c is saidto be due to μ pairproduction, whichwas not included inthe G4beamlinesimulations here.

This will be studied.

Page 13: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Energy Loss

• Energy deposition of protons in Xenon gaseous detector; data are from NIM 217 (1983) 277.

March 2, 2011 TJR G4beamline Validation 13

Page 14: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Straggling

• 49.10 MeV protons after a 2.675 g/cm2 Al absorber.The peak energy loss differs by about 1 MeV, out of 40 MeV in energy loss, a difference of 2.5%.

March 2, 2011 TJR G4beamline Validation 14

Page 15: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

X-rays from μ− capture on Ne

March 2, 2011 TJR G4beamline Validation 15

(Their detector losesefficiency below 2 keV.)

Page 16: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Physics Processes Implemented in G4beamline

• Modifications to Geant4 processes:– Rare charged-pion decays:

• π+ ➞ μ+ νμ (1.230E-4)

• π− ➞ μ− νμ (1.230E-4)

• (Modes < 1e-6 were not added.)

– Fix for tracks that turn around in E field.• Geant4 tracks in space, which is singular for zero velocity.• Approximation is stable and accurate to a fraction of a micron.• Applies only to charged tracks anti-parallel to qE within a few degrees.

– Fix for missing neutrons in μ− capture.

• Collective computations

• Space charge

March 2, 2011 TJR G4beamline Validation 16

Page 17: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Collective Computations

• Geant4 is inherently a single-particle toolkit• G4beamline implements a general infrastructure for performing

collective computations– Replaces the RunManager, EventManager, TrackManager, and

SteppingManager

– Tracks a vector of tracks from the beam command(s), in “parallel”

• Used for space charge computations• Extensible to other collective computations• Comparison to standard tracking, scattering in Fe:

March 2, 2011 TJR G4beamline Validation 17

Page 18: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Space Charge

• The computation solves Poisson’s equation in the beam frame– Boosts particles to the beam frame, puts them into a grid (up to ~ 128x128x128)

– Green’s Function convolution via FFTs

– Boosts Ebeamframe to Elab and Blab

– Tracking as usual via Geant4.

• Uses macro-particles to simulate larger bunches.

• Can handle up to about a million macro-particles.

• Requires a bunched beam, with a reference particle for each bunch.

• Comparison to known sources:– A 1 Coulomb charge at 1 meter has E=8.987551787E9 V/m.

A macro-particle with 1 Coulomb has E=8987.54 MV/m.– A current of 1,000 Amps, at 0.1 meter, has B=0.002 T.

101 macro-particles with charge +0.001 Coulomb, spaced 1 cm, moving at 10,000 meter/sec, has B=0.001971 T.

• There is also a Lienard-Wiechert computation– Computationally infeasible for more than ~500 macro-particles

– Beam need not be bunched; reference not needed

– Rigorously correct (without radiation term), and useful to verify the other computation.March 2, 2011 TJR G4beamline Validation 18

Page 19: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Space Charge

• Comparison to a computation in Reiser’s textbook for uniform charge density.

• The 3 lines are for different initial conditions.

March 2, 2011 TJR G4beamline Validation 19

Only 500macro-particles

100,000macro-particles

Scaled Z position (propagation axis)

Page 20: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Beamline Elementssolenoid

• At the center of a pair of Helmholtz coils,Bz = 32 π N I / (53/2 R 10)

The coil separation is of course equal to the radius R. For N=1, I=10,000 A, R=50 cm, this formula gives 179.84 gauss. G4beamline gives 0.017984 Tesla.

• Comparison to theanalytic formula for the on-axis field(radius=200 mm, length=2,000 mm, thickness=1 mm).

March 2, 2011 TJR G4beamline Validation 20

Page 21: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Solenoid Pair –Chaotic B Field

• The CERN Courier (Jan. 2010) showed a chaotic B field from two current loops at 90 degrees; this plot of a single field line is qualitatively similar.

March 2, 2011 TJR G4beamline Validation 21

Page 22: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Beamline Elementsgenericbend

• This plot of field lines shows the form of the fringe field – in particular, it is valid only inside the extended aperture.

March 2, 2011 TJR G4beamline Validation 22

(The field lines are drawn in 3-D, so their density in projections such as this is not an accurate representation of the field magnitude.)

Page 23: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Beamline Elementsgenericquad

• This plot of field lines shows the form of the fringe field – in particular, it is valid only inside the extended aperture.

March 2, 2011 TJR G4beamline Validation 23

(The field lines are drawn in 3-D, so their density in projections such as these is not an accurate representation of the field magnitude.)

Page 24: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Beamline Elementsgenericquad

• Comparison of genericquad to a Tosca field map of a quadrupole triplet in MICE.

March 2, 2011 TJR G4beamline Validation 24

Plot credit:Marco Apollonio

Page 25: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Beamline Elementsmultipole

March 2, 2011 TJR G4beamline Validation 25

(The field lines are drawn in 3-D, so their density in projections such as these is not an accurate representation of the field magnitude.)

Page 26: March 2, 2011 TJRG4beamline Validation1 G4beamline Validation  Tom Roberts Muons, Inc

Summary

• Many tests of G4beamline have been performed, which display its accuracy in many situations and processes.

• As it is based on Geant4, G4beamline shares the deficiencies of Geant4.– Primarily related to hadronic production in thick targets.

– Not so inaccurate that it is unusable.

– Benefits from the ongoing effort to improve Geant4.

• In many cases, the realism of a simulation will be determined by the difficulties involved in accurately describing the physical components, not by inaccuracies in the program.

• There are a few known deficiencies that require further study.

March 2, 2011 TJR G4beamline Validation 26