Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:17:48

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 // $Id: $
0004 
0005 /*!
0006  * \file PHG4GDMLDetector.h
0007  * \brief
0008  * \author Jin Huang <jhuang@bnl.gov>
0009  * \version $Revision:   $
0010  * \date $Date: $
0011  */
0012 
0013 #ifndef G4DETECTORS_PHG4GDMLDETECTOR_H
0014 #define G4DETECTORS_PHG4GDMLDETECTOR_H
0015 
0016 #include <g4main/PHG4Detector.h>
0017 
0018 #include <Geant4/G4Types.hh>
0019 
0020 #include <string>
0021 
0022 class G4AssemblyVolume;
0023 class G4LogicalVolume;
0024 class G4UserSteppingAction;
0025 class PHCompositeNode;
0026 class PHG4Subsystem;
0027 class PHParameters;
0028 class PHG4GDMLConfig;
0029 
0030 /*!
0031  * \brief PHG4GDMLDetector is a generic detector built from a GDML import
0032  */
0033 class PHG4GDMLDetector : public PHG4Detector
0034 {
0035  public:
0036   PHG4GDMLDetector(PHG4Subsystem* subsys, PHCompositeNode* Node, const std::string& dnam, PHParameters* parameters);
0037 
0038   ~PHG4GDMLDetector() override;
0039 
0040   //! construct
0041   void ConstructMe(G4LogicalVolume* world) override;
0042 
0043   G4UserSteppingAction* GetSteppingAction() override
0044   {
0045     return nullptr;
0046   }
0047 
0048   void Print(const std::string& what = "ALL") const override;
0049 
0050  private:
0051   void SetDisplayProperty(G4AssemblyVolume* av);
0052   void SetDisplayProperty(G4LogicalVolume* lv);
0053 
0054   std::string m_GDMPath;
0055   std::string m_TopVolName;
0056 
0057   G4double m_placeX;
0058   G4double m_placeY;
0059   G4double m_placeZ;
0060 
0061   G4double m_rotationX;
0062   G4double m_rotationY;
0063   G4double m_rotationZ;
0064 
0065   int m_skipDSTGeometryExport;
0066 
0067   //! registry for volumes that should not be exported, i.e. fibers
0068   PHG4GDMLConfig* gdml_config = nullptr;
0069 };
0070 
0071 #endif /* PHG4GDMLDetector_H_ */