|
||||
File indexing completed on 2025-01-18 09:55:24
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DDG4_GEANT4TOUCHABLEHANDLER_H 0014 #define DDG4_GEANT4TOUCHABLEHANDLER_H 0015 0016 #include <G4VTouchable.hh> 0017 0018 // C/C++ include files 0019 #include <vector> 0020 #include <string> 0021 0022 // Forward declarations 0023 class G4VPhysicalVolume; 0024 class G4Step; 0025 0026 /// Namespace for the AIDA detector description toolkit 0027 namespace dd4hep { 0028 0029 /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit 0030 namespace sim { 0031 0032 // Forward declarations; 0033 class Geant4TouchableHandler; 0034 0035 /// Helper class to ease the extraction of information from a G4Touchable object. 0036 /** 0037 * Tiny helper/utility class to easily access Geant4 touchable information. 0038 * Born by lazyness: Avoid typing millions of statements! 0039 * 0040 * \author M.Frank 0041 * \version 1.0 0042 * \ingroup DD4HEP_SIMULATION 0043 */ 0044 class Geant4TouchableHandler { 0045 public: 0046 0047 typedef std::vector<const G4VPhysicalVolume*> Geant4PlacementPath; 0048 /// Data member of the helper objects 0049 const G4VTouchable* touchable; 0050 0051 /// Default constructor. 0052 Geant4TouchableHandler(const G4VTouchable* t) : touchable(t) {} 0053 /// Default constructor. Takes the step's pre-touchable 0054 Geant4TouchableHandler(const G4Step* step); 0055 /// Default constructor. Takes the step's pre-touchable 0056 Geant4TouchableHandler(const G4Step* step, bool use_post_step_point); 0057 0058 /// Helper: Generate placement path from touchable object 0059 Geant4PlacementPath placementPath(bool exception=false) const; 0060 0061 /// Helper: Access the placement path of a Geant4 touchable object as a string 0062 std::string path() const; 0063 /// Touchable history depth 0064 int depth() const; 0065 }; 0066 0067 } // End namespace sim 0068 } // End namespace dd4hep 0069 0070 #endif // DDG4_GEANT4TOUCHABLEHANDLER_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |