advanced features advanced features
play

Advanced features Advanced features Makoto Asai (SLAC Computing - PowerPoint PPT Presentation

Advanced features Advanced features Makoto Asai (SLAC Computing Services) Makoto Asai (SLAC Computing Services) Geant4 Tutorial Course @ Fermi Lab Geant4 Tutorial Course @ Fermi Lab th , 2003 October 29 th October 29 , 2003 Contents


  1. Advanced features Advanced features Makoto Asai (SLAC Computing Services) Makoto Asai (SLAC Computing Services) Geant4 Tutorial Course @ Fermi Lab Geant4 Tutorial Course @ Fermi Lab th , 2003 October 29 th October 29 , 2003

  2. Contents Contents � More on user action classes More on user action classes � more difficult User- -defined trajectory defined trajectory User � � most difficult Suspend, postpone or kill a track Suspend, postpone or kill a track � � Stack management expert only Stack management � � Cuts per region Cuts per region � � Event biasing Event biasing � � Defining a new shape Defining a new shape � � Parameterization (fast simulation) and ghost volume Parameterization (fast simulation) and ghost volume � � Making a new physics process Making a new physics process � � � Some remarks on external functionalities Some remarks on external functionalities � � Persistency Persistency � � Parallelization and integration in a distributed computing Parallelization and integration in a distributed computing � environment environment Advanced features - - M.Asai (SLAC) M.Asai (SLAC) - - Oct. 29, 2003 @ Fermi Lab Oct. 29, 2003 @ Fermi Lab 2 Advanced features 2

  3. More on user action classes - - 1 1 More on user action classes User- -defined trajectory defined trajectory User and and Attaching user information to Attaching user information to some kernel classes some kernel classes

  4. Attaching user information Attaching user information � Abstract classes Abstract classes � � User can use his/her own class derived from the provided base cl User can use his/her own class derived from the provided base class ass � � G4Run, G4VHit, G4VDigit, G4VTrajectory, G4VTrajectoryPoint G4Run, G4VHit, G4VDigit, G4VTrajectory, G4VTrajectoryPoint � � Concrete classes Concrete classes � � User can attach a user information class object User can attach a user information class object � � G4Event G4Event - - G4VUserEventInformation G4VUserEventInformation � � G4Track G4Track - - G4VUserTrackInformation G4VUserTrackInformation � � G4PrimaryVertex G4PrimaryVertex - - G4VUserPrimaryVertexInformation G4VUserPrimaryVertexInformation � � G4PrimaryParticle G4PrimaryParticle - - G4VUserPrimaryParticleInformation G4VUserPrimaryParticleInformation � � G4Region G4Region - - G4VUserRegionInformation G4VUserRegionInformation � � Classes in Classes in green green are coming with Geant4 version 6.0. are coming with Geant4 version 6.0. � � User information class object is deleted when associated Geant4 User information class object is deleted when associated Geant4 � class object is deleted. class object is deleted. Advanced features - - M.Asai (SLAC) M.Asai (SLAC) - - Oct. 29, 2003 @ Fermi Lab Oct. 29, 2003 @ Fermi Lab 4 Advanced features 4

  5. Trajectory and trajectory point Trajectory and trajectory point � Trajectory and trajectory point class objects persist until the Trajectory and trajectory point class objects persist until the end of an end of an � event. event. � And most likely stored to disk as "simulation truth" And most likely stored to disk as "simulation truth" � � G4VTrajectory G4VTrajectory is the abstract base class to represent a trajectory, and is the abstract base class to represent a trajectory, and � G4VTrajectoryPoint is the abstract base class to represent a point which G4VTrajectoryPoint is the abstract base class to represent a point which makes up the trajectory. makes up the trajectory. � In general, trajectory class is expected to have a vector of tra In general, trajectory class is expected to have a vector of trajectory jectory � points. points. � Geant4 provides Geant4 provides G4Trajectoy G4Trajectoy and and G4TrajectoryPoint G4TrajectoryPoint concrete classes concrete classes � as defaults. as defaults. � If the user wants to keep some additional information and/or wan If the user wants to keep some additional information and/or wants to ts to � change the drawing style of a trajectory, he/she is encouraged to o change the drawing style of a trajectory, he/she is encouraged t implement his/her own concrete classes. implement his/her own concrete classes. � Such user Such user- -defined trajectory object should be instantiated in defined trajectory object should be instantiated in � () in user tracking action and set to in user tracking action and set to PreUserTrackingAction() PreUserTrackingAction G4TrackingManager G4TrackingManager Advanced features - - M.Asai (SLAC) M.Asai (SLAC) - - Oct. 29, 2003 @ Fermi Lab Oct. 29, 2003 @ Fermi Lab 5 Advanced features 5

  6. More on user action classes - - 2 2 More on user action classes Suspend, postpone or kill a track Suspend, postpone or kill a track

  7. G4TrackStatus G4TrackStatus � enum enum G4TrackStatus G4TrackStatus � � fAlive fAlive � � Continue tracking Continue tracking � � fStopButAlive fStopButAlive � � Invoke active rest physics processes and kill the current track Invoke active rest physics processes and kill the current track � afterward afterward � fStopAndKill fStopAndKill � � Kill the current track Kill the current track � � Secondaries Secondaries are still alive are still alive � � fKillTrackAndSecondaries fKillTrackAndSecondaries � � Kill the current track and also associated Kill the current track and also associated secondaries secondaries. . � � fSuspend fSuspend � � Suspend the current track and send it back to the stack. Suspend the current track and send it back to the stack. � � Associated Associated secondaries secondaries are also sent to the stack. Given a stack are also sent to the stack. Given a stack � is "last- is "last -in in- -first first- -out", out", secondaries secondaries are tracked preceded to the are tracked preceded to the suspended track. suspended track. � fPostponeToNextEvent fPostponeToNextEvent � � Postpone the tracking of the current track to the next event. Postpone the tracking of the current track to the next event. � � Associated Associated secondaries secondaries are sent to the stack are sent to the stack � Advanced features - - M.Asai (SLAC) M.Asai (SLAC) - - Oct. 29, 2003 @ Fermi Lab Oct. 29, 2003 @ Fermi Lab 7 Advanced features 7

  8. Set the track status Set the track status � In In UserSteppingAction UserSteppingAction, user can change the status of a track. , user can change the status of a track. � void MySteppingAction::UserSteppingAction MySteppingAction::UserSteppingAction void (const G4Step * theStep theStep) ) (const G4Step * { { G4Track* theTrack theTrack = = theStep theStep- -> >GetTrack GetTrack(); (); G4Track* if(…) theTrack theTrack- -> >SetTrackStatus SetTrackStatus(fSuspend (fSuspend); ); if(…) } } � If a track is killed, physics quantities of the track (energy, c If a track is killed, physics quantities of the track (energy, charge, etc.) harge, etc.) � are not conserved but completely lost. are not conserved but completely lost. Advanced features - - M.Asai (SLAC) M.Asai (SLAC) - - Oct. 29, 2003 @ Fermi Lab Oct. 29, 2003 @ Fermi Lab 8 Advanced features 8

  9. More on user action classes - - 3 3 More on user action classes Stack management Stack management

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend