1 / 23

Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor

Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor. CHEP 2000 at Padova Hajime Yoshida Naruto University of Education. Tabular Editors. Geant4 provides the base abstract classes for the user mandatory classes : G4VUserDetectorConstruction G4VUserPhysicsList

michel
Télécharger la présentation

Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor

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. Tabular Editors for Geant4Geant4 Geometry Editor andGeant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education

  2. Tabular Editors • Geant4 provides the base abstract classes for the user mandatory classes : • G4VUserDetectorConstruction • G4VUserPhysicsList • GGE and GPE generate the concrete implementation classes automatically from the tables filled by a user • It is assumed that a user has enough knowledge on the problem domain; the concept of volumes, particle interactions etc. to fill the tables, but has little experience of C++ programming. • Tradeoffs in the design are inevitable; • general use patterns; materials, solids, logical volumes, particles • typical use patterns; physical volumes, processes

  3. Geant4 Geometry Editor • Material editor • Table of materials from scratch • Table of compound materials • Volume editors • Table of logical volumes • definition of solids • material • visualization attribute • Boolean operation not supported • Tables of Physical volumes • Single positioning • Repeated positioning with copy numbers • translation • axially symmetric • Replica or slicing • along an axis • axial

  4. GGE’s snapshot on Windows-98

  5. Material editor • Default values of Geant4 are filled in the cells • User’s selection with list-boxes for units, states, etc.. • Persistent Data Base file to load, save and append

  6. Material editor • Copy multiple elements to the material table

  7. Volume Editor • Listbox to choose solid types • Guidance to define the parameters of solids • Mark the materials used by the logical volumes

  8. Single Positioned Volumes • Only one physical world has its mother type NULL. • Body/frame rotation around an axis • Translation (X0, Y0, Z0) • From each row are generated a group of C++ statements

  9. Repeated positioning: Axially symmetric • Rotation types ; body or frame • Mother type ; logical or physical • Coordinates of the center of rotation • Axis of rotation and radius • Incremental angle and number of copies

  10. GGE: Generation of C++ codes • Includes all relevant header files • G4VPhysicalVolume* MyDetector::Construct() { • G4Element* elementN = new G4Element(…); • G4Material* Air = new G4Material(…); • Air->AddElement(..); • G4Material* Al = new G4Material(..); • G4VisAttributes* lightblue = new G4VisAttributes(…); • G4Box* solidbox = new G4Box(...); • G4LogicalVolume* logicalbox = new G4LogicalVolume(…); • logicalbox->SetVisAttributes(..); • G4VPhysicalVolume* physicalworld = new G4PVPlacement(…); • repeated translation • repeated rotation • set up the rotation matrix with G4RotationMatrix • for loop • G4VPhysicalVolume* physicalrottrap = new G4PVPlacement(G4Transform3D(rotationMatrix), G4THreeVector(…),…);

  11. C++ code generation - continued • Replica; translation G4PVReplica(..); • Replica; axially sliced • return physicalworld; • } • Naming convention: if X, Y are names in the tables, their instances have names like; • elementX • solidY • logicalY • physicalY • rotMatrixY • copyY • etc.

  12. Compile and visualize • Compile the generated C++ codes and link with the Geant4 libraries • Any visualization system provided by Geant4 can be used • Rapid cycling of edit, compile and view

  13. An example visualized

  14. GPE: Geant4 Physics Editor • Doublets of a particle and an associated process • Three methods; ConstructParticle(), ConstructProcess() and SetCuts() must be implemented. • Two separate physics tables • Electromagnetic physics table • Table of relevant particles • Table of electromagnetic processes • Hadronic physics table (under construction) • Table of relevant particles • Table of hadronic processes • Two processes; transportation and decay are included by default. • Two processes; parametrization and optical photons are not implemented.

  15. GPE • Particles and processes can be copied from the respective tables. • The default ordering parameters are copied.

  16. Table of particles for electromagnetic and “default” processes • Select a particle • select all particles of a category • select all “shortlived” particles

  17. Table of electromagnetic processes • Standard, muon, X rays, low energy electromagnetic processes are visually classified in the table. • “Null” is to reset to the default (transportation and decay) processes • The default ordering parameters (AtRest, AlongStep and PostStep) of a process are copied to the physics table.

  18. Generation of C++ codes; particle • ConstructParticle(){ • ConstructBosons(); • G4Gamma::GammaDefinition(); etc. • ConstructLeptons(); • G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); etc. • ConstructMesons(); • ConstructBaryons(); • ConstructIons(); • ConstructShortLiveds(); • } • Scan through the first column and call static member functions only once for respective particle

  19. Generation of C++ codes; processes • ConstructProcess(){ • AddTransportation(); // always included • ConstructEM(); // code generated as below • ConstructGeneral(); } // always included • Include all necessary class definition files by scanning the second column. • #include “G4eplusAnnihilation.hh” etc. • Start the particle iterator • if (particleName == “e-”){pmanager->AddProcess(new G4eIonisation(), ordInactive, 2, 2); for each row in the physics table • HadronIonisation and MultipleScattering are always added for relevant particles. • SetCuts(){ • SetCutsWithDefault();}

  20. Platforms for GGE and GPE • JDK1.2.2 on Windows/95/98/NT • JDK1.2.2 on Linux with glibc2.1.2, f.e., Redhat-6.1 • JDK1.2-preview2 on Linux with older glibc2.0 • Outputs: • *.cc and *.hh files • persistent files ; material, geometry, physics

  21. Conclusions • Tabular editors are not only pedagogic but also practical • Scope and limit of applicability were shown • Reuse; material and logical volume • MGA for STEP input file by Southampton group • Possible directions of development • libraries of common detectors like chambers etc. • how to incorporate hit and digitization for such libraries

  22. Particle table for hadronic processes

  23. Table of the hadronic Particles

More Related