Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
-
date post
22-Dec-2015 -
Category
Documents
-
view
230 -
download
2
Transcript of Primary Particle Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
Primary ParticlePrimary Particle
Makoto Asai (SLAC)Makoto Asai (SLAC)
Geant4 Tutorial CourseGeant4 Tutorial Course
Geant4 v8.2p01
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 22
ContentsContents G4VUserPrimaryGeneratorActionG4VUserPrimaryGeneratorAction Primary vertex and primary particlePrimary vertex and primary particle Built-in primary particle generatorsBuilt-in primary particle generators
Particle gunParticle gun Interfaces to HEPEVT and HEPMCInterfaces to HEPEVT and HEPMC General particle sourceGeneral particle source
Exotic primary particleExotic primary particle
Primary particle generationPrimary particle generation
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 44
User classesUser classes Initialization classesInitialization classes
Use G4RunManager::SetUserInitialization() to define.Use G4RunManager::SetUserInitialization() to define. Invoked at the initializationInvoked at the initialization
G4VUserDetectorConstructionG4VUserDetectorConstruction G4VUserPhysicsListG4VUserPhysicsList
Action classesAction classes Use G4RunManager::SetUserAction() to define.Use G4RunManager::SetUserAction() to define. Invoked during an event loopInvoked during an event loop
G4VUserPrimaryGeneratorActionG4VUserPrimaryGeneratorAction G4UserRunActionG4UserRunAction G4UserEventActionG4UserEventAction G4UserStackingActionG4UserStackingAction G4UserTrackingActionG4UserTrackingAction G4UserSteppingActionG4UserSteppingAction
main()main() Geant4 does not provide Geant4 does not provide main().main().
Note : classes written in Note : classes written in yellowyellow are mandatory. are mandatory.
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 55
G4VUserPrimaryGeneratorActionG4VUserPrimaryGeneratorAction This class is one of mandatory user classes to This class is one of mandatory user classes to control the generationcontrol the generation
of primaries.of primaries.
This class itself This class itself should NOTshould NOT generate primaries but generate primaries but invokeinvoke
GeneratePrimaryVertex()GeneratePrimaryVertex() method of primary generator(s) to method of primary generator(s) to
make primaries.make primaries.
ConstructorConstructor
Instantiate primary generator(s)Instantiate primary generator(s)
Set default values to it(them)Set default values to it(them)
GeneratePrimariesGeneratePrimaries() method() method
Randomize particle-by-particle value(s)Randomize particle-by-particle value(s)
Set these values to primary generator(s)Set these values to primary generator(s)
Never use hard-coded UI commandsNever use hard-coded UI commands
Invoke Invoke GeneratePrimaryVertex()GeneratePrimaryVertex() method of primary generator(s) method of primary generator(s)
Primary vertex Primary vertex and primary particleand primary particle
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 77
Primary vertices and particlesPrimary vertices and particles Primary vertices and primary particles are stored in G4Event in Primary vertices and primary particles are stored in G4Event in
advance to processing an event.advance to processing an event.
G4PrimaryVertexG4PrimaryVertex and and G4PrimaryParticleG4PrimaryParticle classes classes
These classes don’t have any dependency to These classes don’t have any dependency to
G4ParticleDefinition nor G4Track.G4ParticleDefinition nor G4Track.
Capability of bookkeeping decay chainsCapability of bookkeeping decay chains
Primary particles Primary particles may notmay not necessarily be particles which can be necessarily be particles which can be
tracked by Geant4.tracked by Geant4.
Geant4 provides some concrete implementations of Geant4 provides some concrete implementations of
G4VPrimaryGeneratorG4VPrimaryGenerator..
G4ParticleGunG4ParticleGun
G4HEPEvtInterface, G4HEPMCInterfaceG4HEPEvtInterface, G4HEPMCInterface
G4GeneralParticleSourceG4GeneralParticleSource
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 88
Pre-assigned decay productsPre-assigned decay products Physics generator can assign a decay channel for Physics generator can assign a decay channel for each individual particle each individual particle
separatelyseparately, while in Geant4 you cannot specify a decay channel for each , while in Geant4 you cannot specify a decay channel for each
particle.particle.
Decay chain can be “pre-assigned”.Decay chain can be “pre-assigned”.
A parent particle in the form of G4Track object travels in the detector, bringing A parent particle in the form of G4Track object travels in the detector, bringing
“pre-assigned” decay daughters as objects of G4DynamicParticle.“pre-assigned” decay daughters as objects of G4DynamicParticle.
When the parent track comes to the decay point, pre-assigned daughters When the parent track comes to the decay point, pre-assigned daughters
become to secondary tracks, instead of randomly selecting a decay channel 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 defined to the particle type. Decay time of the parent can be pre-assigned as
well.well.
D0 -
K- +
B-
G4PrimaryParticle
B-
G4Track
D0 -
K- +
pre-assigned decay products
K- +
D0
-
B-
K-
+
D0
Built-in primary particle Built-in primary particle generatorsgenerators
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1010
G4ParticleGunG4ParticleGun Concrete implementations of G4VPrimaryGeneratorConcrete implementations of G4VPrimaryGenerator
A good example for experiment-specific primary generator A good example for experiment-specific primary generator implementationimplementation
It shoots one primary particle of a certain energy from a certain point It shoots one primary particle of a certain energy from a certain point at a certain time to a certain direction.at a certain time to a certain direction. Various set methods are availableVarious set methods are available Intercoms commands are also available for setting initial valuesIntercoms commands are also available for setting initial values
One of most frequently asked questions is :One of most frequently asked questions is :
I want “particle shotgun”, “particle machinegun”, etc. I want “particle shotgun”, “particle machinegun”, etc. Instead of implementing such a fancy weapon, in your implementation Instead of implementing such a fancy weapon, in your implementation
of UserPrimaryGeneratorAction, you canof UserPrimaryGeneratorAction, you can Shoot random numbers in arbitrary distributionShoot random numbers in arbitrary distribution Use set methods of G4ParticleGunUse set methods of G4ParticleGun Use G4ParticleGun as many times as you wantUse G4ParticleGun as many times as you want Use any other primary generators as many times as you want to Use any other primary generators as many times as you want to
make overlapping eventsmake overlapping events
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1111
G4VUserPrimaryGeneratorActionG4VUserPrimaryGeneratorActionvoid T01PrimaryGeneratorAction::void T01PrimaryGeneratorAction:: GeneratePrimaries(G4Event* anEvent)GeneratePrimaries(G4Event* anEvent){ G4ParticleDefinition* particle;{ 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->SetParticleMomentumDirectionparticleGun->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.You can repeat this for generating more than one primary particles.
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1212
Interfaces to HEPEvt and HepMCInterfaces to HEPEvt and HepMC Concrete implementations of G4VPrimaryGeneratorConcrete implementations of G4VPrimaryGenerator
A good example for experiment-specific primary generator A good example for experiment-specific primary generator
implementationimplementation
G4HEPEvtInterfaceG4HEPEvtInterface
Suitable to /HEPEVT/ common block, which many of (FORTRAN) Suitable to /HEPEVT/ common block, which many of (FORTRAN)
HEP physics generators are compliant to.HEP physics generators are compliant to.
ASCII file inputASCII file input
G4HepMCInterfaceG4HepMCInterface
An interface to HepMC class, which a few new (C++) HEP physics An interface to HepMC class, which a few new (C++) HEP physics
generators are compliant to.generators are compliant to.
ASCII file input or direct linking to a generator through HepMC.ASCII file input or direct linking to a generator through HepMC.
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1313
G4GeneralParticleSourceG4GeneralParticleSource A concrete implementation of G4VPrimaryGeneratorA concrete implementation of G4VPrimaryGenerator
Suitable especially to space applicationsSuitable especially to space applications
MyPrimaryGeneratorAction::MyPrimaryGeneratorAction::
MyPrimaryGeneratorAction()MyPrimaryGeneratorAction()
{ { generator = new G4GeneralParticleSource;generator = new G4GeneralParticleSource; } }
void MyPrimaryGeneratorAction::void MyPrimaryGeneratorAction::
GeneratePrimaries(G4Event* anEvent)GeneratePrimaries(G4Event* anEvent)
{ { generator->GeneratePrimaryVertex(anEvent); generator->GeneratePrimaryVertex(anEvent); }}
Detailed descriptionDetailed description
http://reat.space.qinetiq.com/gps/http://reat.space.qinetiq.com/gps/
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1414
G4GeneralParticleSourceG4GeneralParticleSource Primary vertex can be randomly chosen on the surface of a certain Primary vertex can be randomly chosen on the surface of a certain
volume.volume.
Momentum direction and kinetic energy of the primary particle can Momentum direction and kinetic energy of the primary particle can
also be randomized.also be randomized.
Distribution could be set by UI commands.Distribution could be set by UI commands.
Capability of event biasing (variance reduction).Capability of event biasing (variance reduction).
By enhancing particle type, distribution of vertex point, energy By enhancing particle type, distribution of vertex point, energy
and/or directionand/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 particleExotic primary particle
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1616
Importing “exotic” particlesImporting “exotic” particles ““Exotic” particle means a type of particle that Geant4 physics processes do Exotic” particle means a type of particle that Geant4 physics processes do
notnot know how to deal withknow how to deal with and would and would never generate as a secondarynever generate as a secondary.. It is thus not provided as a class in particle category of Geant4 distribution.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.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 Exotic” particle also includes a type of particle that should not be seen outside of a hadron.outside of a hadron. It is used inside Geant4 processes, but it It is used inside Geant4 processes, but it should not be treated as a trackshould not be treated as a track.. E.g. quark, gluon.E.g. quark, gluon.
Such exotic particle can be imported as a Such exotic particle can be imported as a G4PrimaryParticleG4PrimaryParticle object. object. It It shouldshould have pre-assigned decay products (if it decays), since Geant4 have pre-assigned decay products (if it decays), since Geant4
does not know how it decays.does not know how it decays. There are two kinds of exotic particles from the view point of Geant4. We have There are two kinds of exotic particles from the view point of Geant4. We have
to deal them separately.to deal them separately. Particles that immediately decay Particles that immediately decay without traveling finite distancewithout traveling finite distance.. Particles that Particles that travel a distancetravel a distance meaningful to Geant4 tracking. meaningful to Geant4 tracking.
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1717
Exotic particle that decays Exotic particle that decays immediatelyimmediately As a default, Geant4 ignores such exotic particle and takes its pre-assigned As a default, Geant4 ignores such exotic particle and takes its pre-assigned
decay products as primaries.decay products as primaries. Anyway, such a particle should not travel through your geometry.Anyway, such a particle should not travel through your geometry.
In case you want to see it as In case you want to see it as a primary tracka primary track (so that it has a unique (so that it has a unique track IDtrack ID and it is recorded as and it is recorded as a trajectorya trajectory), use ), use G4UnknownParticleG4UnknownParticle.. G4UnknownParticle must be defined in your physics list with G4UnknownParticle must be defined in your physics list with
G4UnknownDecayG4UnknownDecay process attached. process attached. G4UnknownDecay process immediately enforces such particle to decay in G4UnknownDecay process immediately enforces such particle to decay in
its first step naively using pre-assigned decay products.its first step naively using pre-assigned decay products. Once G4UnknownParticle is defined in your physics list, Once G4UnknownParticle is defined in your physics list, G4PrimaryTransformerG4PrimaryTransformer
converts whatever the exotic particle to a G4Track object of Unknown. 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 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 exotic particle types, create your own PrimaryTransformer to override a method. method.
G4ParticleDefinition* GetDefinition(G4PrimaryParticle*)G4ParticleDefinition* GetDefinition(G4PrimaryParticle*) If non-null pointer is returned, this primary particle is converted into If non-null pointer is returned, this primary particle is converted into
G4Track (or G4DynamicParticle for pre-assigned decay product).G4Track (or G4DynamicParticle for pre-assigned decay product). If null is returned, its pre-assigned decay daughters will be treated as If null is returned, its pre-assigned decay daughters will be treated as
primaries.primaries. Your PrimaryTransformer class must be assigned to G4RunManagerKernel.Your PrimaryTransformer class must be assigned to G4RunManagerKernel.
Primary Particle - M.Asai (SLAC)Primary Particle - M.Asai (SLAC) 1818
Exotic particle that travelsExotic particle that travels As a default, Geant4 cannot deal with such a particle. Geant4 does not 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 know what to do. You have to do the followings to import such exotic particle.particle.
Implement ParticleDefinition concrete class to represent (a family of) Implement ParticleDefinition concrete class to represent (a family of) exotic particle(s).exotic particle(s). Typically Typically one concrete class for each category and each charge stateone concrete class for each category and each charge state. .
MyRHadronZero, MyRHadronPlus, etc.MyRHadronZero, MyRHadronPlus, etc. BMesonStarPlus, BMesonStarMinus, etc.BMesonStarPlus, BMesonStarMinus, etc.
PDG code in ParticleDefinition object for such exotic particle PDG code in ParticleDefinition object for such exotic particle must be must be 00, and the mass could be arbitrary value. , and the mass could be arbitrary value. G4DynamicParticle::GetPDGcode()G4DynamicParticle::GetPDGcode() and and G4DynamicParticle::GetMass()G4DynamicParticle::GetMass() will return correct values for each individual track.will return correct values for each individual track.
Assign reasonable processes to it.Assign reasonable processes to it. G4Transportation, G4Decay (G4Transportation, G4Decay (don’t use G4UnknownDecaydon’t use G4UnknownDecay), EM ), EM
processes, hadronic processes(?)processes, hadronic processes(?) create your own PrimaryTransformer to override a method. create your own PrimaryTransformer to override a method.
G4ParticleDefinition* GetDefinition(G4PrimaryParticle*)G4ParticleDefinition* GetDefinition(G4PrimaryParticle*) By this method, return proper ParticleDefinition object.By this method, return proper ParticleDefinition object.