Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.

Slides:



Advertisements
Similar presentations
Primary Particle KOI, Tatsumi Geant4 V9.4 Geant4 Tutorial at Texas A&M 11-Jan
Advertisements

IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
山下智弘 JST CREST/ 神戸大学 Borrowing especially from presentations of M. Asai(SLAC) Geant4 Japan Oct, RCNS, based on Geant4 9.0.p01.
Geant4 v9.2p02 Particle Gun Makoto Asai (SLAC) Geant4 Tutorial Course.
Geant4 v9.2p02 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Primary particle generation Makoto Asai (SLAC) Geant4 Users CERN Nov. 12 th, 2002.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Event Generators Norman Graf (SLAC) May 20, 2003 May 20, 2003.
Primary particle generation Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 15 th, 2002 Customizing Run Management.
Geant4 v9.4 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11 th, 2002 Getting Started.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Highlights of latest developments ESA/ESTEC Makoto Asai (SLAC)
Geant4 v9.3p01 Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 20th, 2002 Stack management, Digitization and Pile-up.
Makoto Asai (SLAC) Geant4 Tutorial Course
Primary particle generation Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 13th, 2002 Stack management, Digitization and Pile-up.
Introduction to Geant4 Makoto Asai (SLAC) Geant4 Tutorial Course the 2nd Finnish Geant4 Workshop June , Helsinki Institute of Physics June 2005,
A stable interface to read and write IAEA phase-space files in Geant4 M. A. Cortés-Giraldo 1, R. Capote 2, J. M. Quesada 1 1 Dep. Física Atómica, Molecular.
Primary particle Geant4 tutorial Paris, 4-8 June 2007 Giovanni Santin ESA / ESTEC Rhea System SA With material from previous tutorials by Makoto Asai.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
1 Primary particles Geant4 User's Tutorial CERN, February 2010 Talk from previous tutorial by Giovanni Santin Ecole Geant4, Annecy 2008.
Geant4 Training 2003 Basic structure of the Geant4 Simulation Toolkit The full set of lecture notes of this Geant4 Course is available.
Introduction to Geant4 Makoto Asai (SLAC) Geant4 Tutorial CERN May 25-27, 2005 May 2005, Geant4 v7.0p01.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Basic Structure of the Geant4 Simulation Toolkit
Primary particle Giovanni Santin ESA / ESTEC and RheaTech Ltd On behalf of the Geant4 collaboration Ecole Geant4 Annecy, and Nov 2008 With.
Geant4 Event Biasing Marc Verderi, LLR (Heavily copied from Jane Tinslay, SLAC) June 2007.
Geant4 internal Classes and Objects Gunter Folger / CERN Geant4 course, Annecy 2008 User Action & Information Classes.
User Application Toolkit + User application toolkit Geant4 is a toolkit –i.e. you cannot “run” it out of the box –You must write.
User Application Luciano Pandola INFN-LNGS Partially based on a presentation by Maria Grazia Pia (INFN-Ge)
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Geant4 internal Classes and Objects Geant4 Users’ Tutorial February 2010 Gunter Folger / CERN User Action & Information Classes.
Generating Primary Particles Each Geant4 Event starts with generation of one or multiple primary particles It is up to the user to define primary particle.
G4GeneralParticleSource Class: Developed by ESA as the space radiation environment is often quite complex in energy and angular distribution, and requires.
Maria Grazia Pia INFN Genova Salamanca, July 2002
Basics of Primary Particle Generation and Tracking Makoto Asai (SLAC) Geant4 Tutorial CERN May 25-27, 2005 May 2005, Geant4 v7.0p01.
Run and Event G4Run and G4RunManager In Geant4, the Run is the largest unit of simulation and it consist of a series of events Within a Run, the detector.
STAR STAR MC Filter V. Perevoztchikov Brookhaven National Laboratory,USA.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Geant4 Training 2003 Primary Particle Generation The full set of lecture notes of this Geant4 Course is available at
Geant4 internal Classes and Objects Gunter Folger / CERN MC-PAD, DESY/Hamburg January 2010 User Action & Information Classes.
Introduction to Geant4 Makoto Asai (SLAC) Geant4 Tutorial Course the 2nd Finnish Geant4 Workshop June , Helsinki Institute of Physics June 2005,
Physics II : processes Paris Geant4 Tutorial 5 June 2007 Marc Verderi Ecole Polytechnique - LLR.
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
GPS General Particle Source
Maria Grazia Pia Retrieving information from kernel Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Interaction with the Geant4 kernel
Makoto Asai (SLAC) Geant4 Tutorial Course
Interaction with the Geant4 kernel
Basics of a user application
Geant4:User Actions and Analysis
Primary Particle Generation
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11th, 2002
G.A.P.Cirrone, S.E.Mazzaglia - INFN/LNS, Italy
Primary Particle Generation
Makoto Asai (SLAC) Geant4 Tutorial Course
The n-3He Simulation Using Geant4
G4GeneralParticleSource Class:
User Application
The full set of lecture notes of this Geant4 Course is available at
Customizing Run Management
The full set of lecture notes of this Geant4 Course is available at
Kernel Author: Makoto Asai.
Primary particle Makoto Asai (SLAC Computing Services)
The full set of lecture notes of this Geant4 Course is available at
Simulation in Experiments searching for rare events
Presentation transcript:

Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01

Primary Particle - M.Asai (SLAC)2 Contents  G4VUserPrimaryGeneratorAction  Primary vertex and primary particle  Built-in primary particle generators  Particle gun  Interfaces to HEPEVT and HEPMC  General particle source  Exotic primary particle

Primary particle generation

Primary Particle - M.Asai (SLAC)4 User classes  Initialization classes  Use G4RunManager::SetUserInitialization() to define.  Invoked at the initialization  G4VUserDetectorConstruction  G4VUserPhysicsList  Action classes  Use G4RunManager::SetUserAction() to define.  Invoked during an event loop  G4VUserPrimaryGeneratorAction  G4UserRunAction  G4UserEventAction  G4UserStackingAction  G4UserTrackingAction  G4UserSteppingAction  main()  Geant4 does not provide main(). Note : classes written in yellow are mandatory.

Primary Particle - M.Asai (SLAC)5G4VUserPrimaryGeneratorAction  This class is one of mandatory user classes to control the generation of primaries.  This class itself should NOT generate primaries but invoke GeneratePrimaryVertex() method of primary generator(s) to make primaries.  Constructor  Instantiate primary generator(s)  Set default values to it(them)  GeneratePrimaries() method  Randomize particle-by-particle value(s)  Set these values to primary generator(s)  Never use hard-coded UI commands  Invoke GeneratePrimaryVertex() method of primary generator(s)

Primary vertex and primary particle

Primary Particle - M.Asai (SLAC)7 Primary vertices and particles  Primary vertices and primary particles are stored in G4Event in advance to processing an event.  G4PrimaryVertex and G4PrimaryParticle classes  These classes don ’ t have any dependency to G4ParticleDefinition nor G4Track.  Capability of bookkeeping decay chains  Primary particles may not necessarily be particles which can be tracked by Geant4.  Geant4 provides some concrete implementations of G4VPrimaryGenerator.  G4ParticleGun  G4HEPEvtInterface, G4HEPMCInterface  G4GeneralParticleSource

Primary Particle - M.Asai (SLAC)8 Pre-assigned decay products  Physics generator can assign a decay channel for each individual particle separately, while in Geant4 you cannot specify a decay channel for each particle.  Decay chain can be “pre-assigned”.  A parent particle in the form of G4Track object travels in the detector, bringing “pre-assigned” decay daughters as objects of G4DynamicParticle.  When the parent track comes to the decay point, pre-assigned daughters become to secondary tracks, instead of randomly selecting a decay channel defined to the particle type. Decay time of the parent can be pre-assigned as well. D0D0 --  K-K- ++  B-B- G4PrimaryParticle B-B- G4Track D0D0 --  K-K- ++  pre-assigned decay products K-K- ++  D0D0 --  B-B- K-K- ++  D0D0

Built-in primary particle generators

Primary Particle - M.Asai (SLAC)10 G4ParticleGun  Concrete implementations of G4VPrimaryGenerator  A good example for experiment-specific primary generator implementation  It shoots one primary particle of a certain energy from a certain point at a certain time to a certain direction.  Various set methods are available  Intercoms commands are also available for setting initial values  One of most frequently asked questions is : I want “ particle shotgun ”, “ particle machinegun ”, etc.  Instead of implementing such a fancy weapon, in your implementation of UserPrimaryGeneratorAction, you can  Shoot random numbers in arbitrary distribution  Use set methods of G4ParticleGun  Use G4ParticleGun as many times as you want  Use any other primary generators as many times as you want to make overlapping events

Primary Particle - M.Asai (SLAC)11G4VUserPrimaryGeneratorAction void T01PrimaryGeneratorAction:: GeneratePrimaries(G4Event* anEvent) GeneratePrimaries(G4Event* anEvent) { G4ParticleDefinition* particle; G4int i = (int)(5.*G4UniformRand()); G4int i = (int)(5.*G4UniformRand()); switch(i) switch(i) { case 0: particle = positron; break;... } { case 0: particle = positron; break;... } particleGun->SetParticleDefinition(particle); particleGun->SetParticleDefinition(particle); G4double pp = G4double pp = momentum+(G4UniformRand()-0.5)*sigmaMomentum; momentum+(G4UniformRand()-0.5)*sigmaMomentum; G4double mass = particle->GetPDGMass(); G4double mass = particle->GetPDGMass(); G4double Ekin = sqrt(pp*pp+mass*mass)-mass; G4double Ekin = sqrt(pp*pp+mass*mass)-mass; particleGun->SetParticleEnergy(Ekin); particleGun->SetParticleEnergy(Ekin); G4double angle = (G4UniformRand()-0.5)*sigmaAngle; G4double angle = (G4UniformRand()-0.5)*sigmaAngle; particleGun->SetParticleMomentumDirection particleGun->SetParticleMomentumDirection (G4ThreeVector(sin(angle),0.,cos(angle))); (G4ThreeVector(sin(angle),0.,cos(angle))); particleGun->GeneratePrimaryVertex(anEvent); particleGun->GeneratePrimaryVertex(anEvent);}  You can repeat this for generating more than one primary particles.

Primary Particle - M.Asai (SLAC)12 Interfaces to HEPEvt and HepMC  Concrete implementations of G4VPrimaryGenerator  A good example for experiment-specific primary generator implementation  G4HEPEvtInterface  Suitable to /HEPEVT/ common block, which many of (FORTRAN) HEP physics generators are compliant to.  ASCII file input  G4HepMCInterface  An interface to HepMC class, which a few new (C++) HEP physics generators are compliant to.  ASCII file input or direct linking to a generator through HepMC.

Primary Particle - M.Asai (SLAC)13 G4GeneralParticleSource  A concrete implementation of G4VPrimaryGenerator  Suitable especially to space applications MyPrimaryGeneratorAction:: MyPrimaryGeneratorAction() MyPrimaryGeneratorAction() { generator = new G4GeneralParticleSource; } void MyPrimaryGeneratorAction:: GeneratePrimaries(G4Event* anEvent) GeneratePrimaries(G4Event* anEvent) { generator->GeneratePrimaryVertex(anEvent); }  Detailed description

Primary Particle - M.Asai (SLAC)14 G4GeneralParticleSource  Primary vertex can be randomly chosen on the surface of a certain volume.  Momentum direction and kinetic energy of the primary particle can also be randomized.  Distribution could be set by UI commands.  Capability of event biasing (variance reduction).  By enhancing particle type, distribution of vertex point, energy and/or direction Square plane, cosine-law direction, linear energy Spherical surface, isotropic radiation, black-body energy Cylindrical surface, cosine-law radiation, Cosmic diffuse energy Spherical volume with z biasing, isotropic radiation with theta and phi biasing, integral arbitrary point-wise energy distribution with linear interpolation.

Exotic primary particle

Primary Particle - M.Asai (SLAC)16 Importing “exotic” particles  “Exotic” particle means a type of particle that Geant4 physics processes do not know how to deal with and would never generate as a secondary.  It is thus not provided as a class in particle category of Geant4 distribution.  E.g. Higgs, W/Z boson, SUSY particle, r-hadron, monopole, black hole, etc.  “Exotic” particle also includes a type of particle that should not be seen outside of a hadron.  It is used inside Geant4 processes, but it should not be treated as a track.  E.g. quark, gluon.  Such exotic particle can be imported as a G4PrimaryParticle object.  It should have pre-assigned decay products (if it decays), since Geant4 does not know how it decays.  There are two kinds of exotic particles from the view point of Geant4. We have to deal them separately.  Particles that immediately decay without traveling finite distance.  Particles that travel a distance meaningful to Geant4 tracking.

Primary Particle - M.Asai (SLAC)17 Exotic particle that decays immediately  As a default, Geant4 ignores such exotic particle and takes its pre-assigned decay products as primaries.  Anyway, such a particle should not travel through your geometry.  In case you want to see it as a primary track (so that it has a unique track ID and it is recorded as a trajectory), use G4UnknownParticle.  G4UnknownParticle must be defined in your physics list with G4UnknownDecay process attached.  G4UnknownDecay process immediately enforces such particle to decay in its first step naively using pre-assigned decay products.  Once G4UnknownParticle is defined in your physics list, G4PrimaryTransformer converts whatever the exotic particle to a G4Track object of Unknown.  If you want to limit this conversion to be applied only to some kinds of exotic particle types, create your own PrimaryTransformer to override a method. G4ParticleDefinition* GetDefinition(G4PrimaryParticle*)  If non-null pointer is returned, this primary particle is converted into G4Track (or G4DynamicParticle for pre-assigned decay product).  If null is returned, its pre-assigned decay daughters will be treated as primaries.  Your PrimaryTransformer class must be assigned to G4RunManagerKernel.

Primary Particle - M.Asai (SLAC)18 Exotic particle that travels  As a default, Geant4 cannot deal with such a particle. Geant4 does not know what to do. You have to do the followings to import such exotic particle.  Implement ParticleDefinition concrete class to represent (a family of) exotic particle(s).  Typically one concrete class for each category and each charge state.  MyRHadronZero, MyRHadronPlus, etc.  BMesonStarPlus, BMesonStarMinus, etc.  PDG code in ParticleDefinition object for such exotic particle must be 0, and the mass could be arbitrary value. G4DynamicParticle::GetPDGcode() and G4DynamicParticle::GetMass() will return correct values for each individual track.  Assign reasonable processes to it.  G4Transportation, G4Decay (don’t use G4UnknownDecay), EM processes, hadronic processes(?)  create your own PrimaryTransformer to override a method. G4ParticleDefinition* GetDefinition(G4PrimaryParticle*)  By this method, return proper ParticleDefinition object.