Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source...
Transcript of Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source...
![Page 1: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/1.jpg)
Generation of a Primary event
Giada Petringa (LNS-INFN)
The 2nd Geant4 School in China Shandong University
Qingdao
1
![Page 2: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/2.jpg)
User Classes 2
At initialization At execution
G4VUserDetectorConstruction
G4VUserActionInitialization
G4UserSteppingAction
G4VUserPhysicsList G4UserRunAction
G4UserTrackingAction
G4UserStackingAction
G4UserEventAction
G4VUserPrimaryGeneratorAction
Global: only one instance exists in memory, shared by all threads.
Thread-local: an instance of each action class exists for each thread.
2
![Page 3: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/3.jpg)
The Primary is a mandatory action class 3
![Page 4: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/4.jpg)
G4VUserPrimaryGeneratorAction 4
![Page 5: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/5.jpg)
…its concrete implementation 5
![Page 6: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/6.jpg)
…its concrete implementation 6
![Page 7: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/7.jpg)
G4VPrimaryGenerator 7
![Page 8: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/8.jpg)
G4HEPEvInterface 8
![Page 9: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/9.jpg)
G4ParticleGun() 9
![Page 10: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/10.jpg)
G4ParticleGun() 10
![Page 11: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/11.jpg)
G4GeneralParticleSource() 11
![Page 12: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/12.jpg)
G4GeneralParticleSource() 12
![Page 13: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/13.jpg)
G4GeneralParticleSource() 13
![Page 14: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/14.jpg)
ParticleGun Vs GPS 14
![Page 15: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/15.jpg)
Examples 15
example/extended/…..
GPS /eventgenerator/exgps
HEPEvInterface/runAndEvent/RE02/srcRE01PrimaryGeneratorAction.cc
![Page 16: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/16.jpg)
Next task 16
Exercise 2b.1: Instantiate the GeneralParticleSource
Exercise 2b.2: Changing GPS parameter from macro commands
Exercise 2b.3: Creating a complicated GPS source with macro commands
![Page 17: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/17.jpg)
Next task 17
Exercise 2a.2: Change parameters of the particle gun
Exercise 2a.1: Instantiate and customize the Particle Gun
![Page 18: Generation - indico.ihep.ac.cnTask 2a Geant4 Particle Gun Task 2b Geant4 General Particle Source PrimaryGeneratorAction : : PrimaryGeneratorAction ( ) // Task 2b.1: fGPS = new .](https://reader034.fdocuments.in/reader034/viewer/2022052520/60904f3341ed86350d0c168f/html5/thumbnails/18.jpg)
18
…It’s all!