DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Geant4TouchableHandler.h
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 #ifndef DD4HEP_GEANT4TOUCHABLEHANDLER_H
15 #define DD4HEP_GEANT4TOUCHABLEHANDLER_H
16 
17 // C/C++ include files
18 #include <vector>
19 #include <string>
20 
21 // Forward declarations
22 class G4VPhysicalVolume;
23 class G4VTouchable;
24 class G4Step;
25 
27 namespace DD4hep {
28 
30  namespace Simulation {
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 
59  Geant4PlacementPath placementPath(bool exception=false) const;
60 
62  std::string path() const;
64  int depth() const;
65  };
66 
67  } // End namespace Simulation
68 } // End namespace DD4hep
69 
70 #endif // DD4HEP_GEANT4TOUCHABLEHANDLER_H
std::vector< const G4VPhysicalVolume * > Geant4PlacementPath
std::string path() const
Helper: Access the placement path of a Geant4 touchable object as a string.
Geant4TouchableHandler(const G4VTouchable *t)
Default constructor.
Helper class to ease the extraction of information from a G4Touchable object.
const G4VTouchable * touchable
Data member of the helper objects.
Geant4PlacementPath placementPath(bool exception=false) const
Helper: Generate placement path from touchable object.
int depth() const
Touchable history depth.