G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Use Monte Carlo to simulate geometries and detectors What is Monte Carlo? What is Geant4? Geant4 exercises G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Where you can find these slides Pablo Cirrone and Enrico Mazzaglia (Geant4 Developers) cirrone@lns.infn.it (http://pablocirrone.wikispaces.com/ ) santi.mazzaglia@gmail.com Official Geant4 web pages: www.cern.ch/geant4 Hadrontherapy example: http://g4advancedexamples.lngs.infn.it/Examples/hadrontherapy You will find these slides here: http://workgroup.lngs.infn.it/geant4lns G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
The Monte Carlo method I Is a mathematical approach that use a sequence of random number to solve a problem If we are interested in a parameter of, i.e., an equation: we must construct a big number of this equations, using different random numbers, and estimate the parameter and its variance A. F. Bielajew, 2001 G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
The Monte Carlo method II In particle transport, if the models of particle interaction with matter are known, you can use the MC to calculate the parameters of motion equations in a given configuration Particles are tracked one-by-one and, after a reasonable number, the correct information is extracted MC is very time consuming but ….. G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
The Monte Carlo method III Mathematical proofs exist demonstrating that MC is the most efficient way of estimate quantity in 3D when compared to first-order deterministic method Alex F Bielajew, 2001 G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy With MANIAC: the first electronic digital computer G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Monte Carlo codes MCNP Penelope PETRA PHIT FLUKA Geant4 Geometry And Traking GEANT4-a simulation toolkit Nucl. Inst. And Methods Phys. Res. A, 506:250:303 Geant4 developments and applications Transaction on Nuclear Science 53, 270 - 278 G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Geant4: www.cern.ch/geant4 C++ language Object Oriented Open source It is a toolkit i.e. a collection of tools that the User can use for his/her simulations Consequences: There are no such concepts as “Geant4 defaults” You must provide the necessary information to configure your simulation You must deliberately choose which Geant4 tools to use Guidance: many examples are provided Novice Examples: overview of Geant4 tools Advanced Examples: Geant4 tools in real-life applications G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Geant4 basic concepts What you MUST do: Describe your experimental set-up Provide the primary particles input to your simulation Decide which particles and physics models you want to use out of those available in Geant4 and the precision of your simulation (cuts to produce and track secondary particles) You may also want To interact with Geant4 kernel to control your simulation To visualise your simulation configuration or results To produce histograms, tuples etc. to be further analysed G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
User Classes - I Mandatory classes in ANY Geant4 User Application G4VUserDetectorConstruction describe the experimental set-up G4VUserPhysicsList select the physics you want to activate G4VUserPrimaryGeneratorAction generate primary events Mandatory classes in ANY Geant4 User Application A lot of PHYSICS MODELS in a very big range: from 10 eV to 20 TeV Electromagnetic Decay processes Hadronic elastic Hadronic inelastic G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy User Classes - II Action classes Invoked during the execution loop G4VUserPrimaryGeneratorAction G4UserRunAction G4UserEventAction G4UserTrackingAction G4UserStackingAction G4UserSteppingAction G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy The main() program Geant4 does not provide the main() Geant4 is a toolkit! The main() is part of the user application In his/her main(), the user must construct G4RunManager (or his/her own derived class) notify the G4RunManager mandatory user classes derived from G4VUserDetectorConstruction G4VUserPhysicsList G4VUserPrimaryGeneratorAction G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Geant4 applications I ATLAS LHCb G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Geant4 applications II Gamma camera with collimators Linear accelerator LSO/LuYAP ClearPET prototype design 3-head SPECT G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Geant4 installation Download the source file from the official Geant4 web pages Download the external libraries Download and compile the CLHEP Configure the environment variables of your system Compile Geant4 Start compiling and running an example G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy Our excercises Will be based on the Hadrontherapy example G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
The geometry of Hadrontherapy (HadrontherapyDetectorConstruction.cc) (ProtonPassiveBeamLine.cc) G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy