1 / 19

S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop

Where to put analysis in Geant4 Applications. S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop. With the help of Geant 4 examples!. Useful links :. http://geant4.web.cern.ch/geant4/G4UsersDocuments/ UsersGuides/ ForApplicationDeveloper/html/index.html

jacquesg
Télécharger la présentation

S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Where to put analysis in Geant4 Applications S. Guatelli ( CERN, INFN Genova ) CERN, 13 November 2002 Users Workshop With the help of Geant 4 examples! Useful links: http://geant4.web.cern.ch/geant4/G4UsersDocuments/ UsersGuides/ForApplicationDeveloper/html/index.html http://www.ge.infn.it/geant4/

  2. Book histograms and ntuples I will show: 1. Which Geant4 User classes are suited for : Fill histograms and ntuples Store histograms and ntuple in a file 2. Examples and results of analysis in Geant 4 Applications

  3. Management of Physical Processes • Management of Primary Particles • Management of the Geometry Mandatory user classes The user must override their methods to build up a smulation!

  4. Optional User Action Run Action Event Action Stepping Action Track

  5. A run is a collection of events that share a common beam and a detector Run Action G4UserRunAction user action: class from which you can derive your own concrete class RunAction • the detector geometry • the set up of sensitive detectors • the physics processes Within a run, you should keep unchanged • set a run identification number • book histograms • set run specific conditions of the sensitive detectors Method What you can do beginOfRunAction() invoked at the beginning of the beamOn() Method What you can do • store/print histograms • manipulate run summaries endOfRunAction() invoked at the very end of the beamOn()

  6. Management of the events in terms of tracks of the particles Event action Method • hits collections • particle tracking • energy deposit Eg. information about EndOfEvent Action Visualisation of the tracks

  7. Stepping Action transient information of the step • G4Step Delta of position / time between Pre and PostStepPoint • Step length • Total energy deposited during the step for example: Tracking Action information of the final status of a particle after the completion of a step • Position • kinetic energy • trackID number for example: PERFORMANCE TIP ! Avoid stepping action if possible and use hits and tracking action.

  8. Brachytherapy example: analysis with AIDA

  9. Management of ntuple and histograms Create the file to store the data How to build the analysis in aGeant4 Application Book histos and ntples From brachytherapy example

  10. How to build the analysis in aGeant4 Application 4. Fill histograms and ntuples • 5. Method Finish() • Close histo and ntuple • Close the file From brachytherapy example

  11. 1.open the file 2.create the ntuple and the histograms Run Action: Management of the Analysis • Book 1.close the ntuples and histos 2.close the file • Finish From brachytherapy example At the beginning of the BeamOn() At the end of the BeamOn()

  12. Information about energy deposit Example 1 From brachytherapy example • Gets the information about the energy deposit from the Hits Collection In the Event Action

  13. Example 1 From brachytherapy example 3. Gets information of: • Energy deposit • Spatial coordinates 4. A histogram and a ntuple are filled with energy deposit Now everything is ok !

  14. Storage of the energy deposit in a ntuple you can select the energy deposit in planes and represent them in histograms Brachytherapy example Geometric set-up

  15. Example of a result Simulation of a radioactive source Geometric set-up From brachytherapy example The energy deposit fills a 2Dhistogram … … Elaboration of the data stored 0.16 mGy =100% Isodose curves

  16. Example 2 From brachytherapy example Histogram of the initial energy of primary particles Primary particle energy The information is stored in 1D histo In the Primary Action Result

  17. Example 3 range e- range test S. Guatelli, V. Ivantchenko 1. Particle position when the kinetic energy is zero 2. range In the Stepping Action 3. The information is stored in 1D histo

  18. Range Example 3 e- range test S. Guatelli, V. Ivantchenko Result

More Related