DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4TouchableHandler.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DDG4_GEANT4TOUCHABLEHANDLER_H
14 #define DDG4_GEANT4TOUCHABLEHANDLER_H
15 
16 #include <G4VTouchable.hh>
17 
18 // C/C++ include files
19 #include <vector>
20 #include <string>
21 
22 // Forward declarations
23 class G4VPhysicalVolume;
24 class G4Step;
25 
27 namespace dd4hep {
28 
30  namespace sim {
31 
32  // Forward declarations;
33  class Geant4TouchableHandler;
34 
36 
45  public:
46 
47  typedef std::vector<const G4VPhysicalVolume*> Geant4PlacementPath;
49  const G4VTouchable* touchable;
50 
52  Geant4TouchableHandler(const G4VTouchable* t) : touchable(t) {}
54  Geant4TouchableHandler(const G4Step* step);
56  Geant4TouchableHandler(const G4Step* step, bool use_post_step_point);
57 
60 
62  std::string path() const;
64  int depth() const;
65  };
66 
67  } // End namespace sim
68 } // End namespace dd4hep
69 
70 #endif // DDG4_GEANT4TOUCHABLEHANDLER_H
dd4hep::sim::Geant4TouchableHandler
Helper class to ease the extraction of information from a G4Touchable object.
Definition: Geant4TouchableHandler.h:44
dd4hep::sim::Geant4TouchableHandler::placementPath
Geant4PlacementPath placementPath(bool exception=false) const
Helper: Generate placement path from touchable object.
Definition: Geant4TouchableHandler.cpp:40
dd4hep::exception
void exception(const std::string &src, const std::string &msg)
Definition: RootDictionary.h:69
dd4hep::sim::Geant4TouchableHandler::Geant4PlacementPath
std::vector< const G4VPhysicalVolume * > Geant4PlacementPath
Definition: Geant4TouchableHandler.h:47
dd4hep::sim::Geant4TouchableHandler::depth
int depth() const
Touchable history depth.
Definition: Geant4TouchableHandler.cpp:35
dd4hep::sim::Geant4TouchableHandler::touchable
const G4VTouchable * touchable
Data member of the helper objects.
Definition: Geant4TouchableHandler.h:49
dd4hep::sim::Geant4TouchableHandler::Geant4TouchableHandler
Geant4TouchableHandler(const G4VTouchable *t)
Default constructor.
Definition: Geant4TouchableHandler.h:52
dd4hep::sim::Geant4TouchableHandler::path
std::string path() const
Helper: Access the placement path of a Geant4 touchable object as a string.
Definition: Geant4TouchableHandler.cpp:58
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28