1 / 12

Sunanda Banerjee ( Saha Inst. Nucl . Phys., Kolkata, India)

IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit. Sunanda Banerjee ( Saha Inst. Nucl . Phys., Kolkata, India) Min Cheol Han ( Hanyang Univ., Seoul, Korea) Steffen Hauf (XFEL, Hamburg, Germany)

orsen
Télécharger la présentation

Sunanda Banerjee ( Saha Inst. Nucl . Phys., Kolkata, India)

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. IEEE Nuclear Science Symposium and Medical Imaging ConferenceShort CourseThe Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata, India) Min Cheol Han (Hanyang Univ., Seoul, Korea) Steffen Hauf(XFEL, Hamburg, Germany) Maria Grazia Pia (INFN Genova, Italy) MariaGrazia.Pia@ge.infn.it Seoul, 27 October 2013 http://www.ge.infn.it/geant4/events/nss2013/geant4course.html This course encompasses training material developed by several Geant4 members: thanks to all of them!

  2. Geant4 User Interface (UI) • Geant4 UI • Geant4 supports various built-in UI commands. • UI command consists ofcommand directory, command, and parameter. Ex) /run/beamOn10 • Geant4 has a two types of UI processing (batch mode, interactive mode) • We can check the list of built-in commands in this web site.http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/AllResources/Control/UIcommands/_.html

  3. Geant4 User Interface (UI) • ‘Hard-coded’ batch mode • Geant4 UI Command can be run in Geant4 source code.(called ‘Hard-coded’ batch mode) • Example: int main(intargc, char**argv) { … G4UImanager*UImanager= G4UImanager::GetUIpointer(); UImanager->ApplyCommand("/run/verbose 1"); UImanager->ApplyCommand("/event/verbose 1"); UImanager->ApplyCommand("/tracking/verbose 1"); … }

  4. Geant4 User Interface (UI) • Batch mode with macro file • Geant4 simulation will run in batch mode with macro file. • Example: int main(intargc, char**argv) { … G4UImanager*UImanager = G4UImanager::GetUIpointer(); if(argc==1) { // Define UI session for interactive mode } else { // Define batch mode using UImanager class G4String command = "/control/execute " + argv[1]; UImanager->ApplyCommand(command); } … }

  5. Geant4 User Interface (UI) • Batch mode with macro file • The example will be executed with below command:> example run.mac • Example - run.mac file: # Macro file: run.mac # set verbose level for this run /run/verbose 2 /event/verbose 0 /tracking/verbose 1 /gun/particle e- /gun/energy 1 GeV /run/beamOn100 ※ First ‘#’ is used for comment line in macro file.

  6. Geant4 User Interface (UI) • Interactive mode - Character UI (CUI) • Geant4 provide character user interface (CUI) by using G4UIterminal class (or G4UIWin32 in windows OS) as interactive mode. • Example: int main(intargc, char**argv) { … if(argc==1) { // Define UI session for interactive mode G4UIsession* session = new G4UIterminal(new G4UItcsh); session->SessionStart(); deletesession; } … }

  7. Geant4 User Interface (UI) • Interactive mode - Character UI (CUI)

  8. Geant4 User Interface (UI) • Interactive mode - Graphical UI (GUI) • Geant4 supports various graphical user interface (GUI) by using G4UIExecutive class. • Example: int main(intargc, char**argv) { … if(argc==1) { // Define UI session for interactive mode G4UIExecutive*ui = new G4UIExecutive(argc, argv, “XX”); session->SessionStart(); deletesession; } … }

  9. Geant4 User Interface (UI) • Interactive mode - Graphical UI (GUI) • User can choose a specific interface initial parameter of G4UIExecutive class. • ex) G4UIExecutive*ui = new G4UIExecutive(argc, argv, “xx”) (where xx = qt, xm, win32, gag, tcsh, …) Run with Xm GUI

  10. Geant4 User Interface (UI) • Interactive mode - QtUI • The one of Geant4 GUI Application • Qt (UI) with OpenGL (Graphic viewer) • If GEANT4_USE_QT=1 when geant4 was installed, Qt is default UI in Geant4. • Homepage - http://qt.digia.com/

  11. Geant4 User Interface (UI) • Interactive mode - Qt UI • Enable/Disable specific geometry using “Scene tree” • Command (or Command parameter) check • Geometry viewer • Run specific macro, command alias, etc…

  12. Geant4 User Interface (UI) • Interactive mode - Qt Demo

More Related