Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:23

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_GEANT4HIERARCHYDUMP_H
0014 #define DDG4_GEANT4HIERARCHYDUMP_H
0015 
0016 // Geant 4 include files
0017 #include <G4VPhysicalVolume.hh>
0018 
0019 /// Namespace for the AIDA detector description toolkit
0020 namespace dd4hep {
0021 
0022   // Forward declarations
0023   class Detector;
0024 
0025   /// Namespace for the Geant4 based simulation part of the AIDA detector description toolkit
0026   namespace sim {
0027 
0028     /// Helper to dump Geant4 volume hierarchy
0029     /**
0030      *  \author  M.Frank
0031      *  \version 1.0
0032      *  \ingroup DD4HEP_SIMULATION
0033      */
0034     class Geant4HierarchyDump {
0035     public:
0036       enum {
0037     G4DUMP_ALL     = 0xFFFFFFFF,
0038     G4DUMP_LOGVOL  = 1 << 0,
0039     G4DUMP_SOLID   = 1 << 1,
0040     G4DUMP_SENSDET = 1 << 2,
0041     G4DUMP_LIMITS  = 1 << 3,
0042     G4DUMP_REGION  = 1 << 4,
0043     G4DUMP_MATRIX  = 1 << 5,
0044     G4DUMP_LAST
0045       };
0046 
0047       Detector&     m_detDesc;
0048       unsigned long m_flags = G4DUMP_ALL;
0049 
0050     public:
0051       /// Initializing Constructor
0052       Geant4HierarchyDump(Detector& description, unsigned long flags = G4DUMP_ALL);
0053       /// Standard destructor
0054       virtual ~Geant4HierarchyDump();
0055       /// Dump the volume hierarchy as it is known to geant 4
0056       virtual void dump(const std::string& indent, const G4VPhysicalVolume* vol) const;
0057     };
0058   }
0059 }
0060 
0061 #endif // DDG4_GEANT4HIERARCHYDUMP_H