Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4DETECTORS_PHG4SPHENIXMAGNETDETECTOR_H
0004 #define G4DETECTORS_PHG4SPHENIXMAGNETDETECTOR_H
0005 
0006 #include <g4main/PHG4Detector.h>
0007 
0008 #include <set>
0009 #include <string>
0010 
0011 class G4LogicalVolume;
0012 class G4VPhysicalVolume;
0013 class PHCompositeNode;
0014 class PHG4sPHENIXMagnetDisplayAction;
0015 class PHG4Subsystem;
0016 class PHG4GDMLConfig;
0017 class PHParameters;
0018 class G4Box;
0019 class G4Polycone;
0020 class G4Tubs;
0021 
0022 
0023 /**
0024  */
0025 
0026 class PHG4sPHENIXMagnetDetector : public PHG4Detector
0027 {
0028  public:
0029   //! constructor
0030   explicit PHG4sPHENIXMagnetDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam, const int detid);
0031 
0032   //! destructor
0033   ~PHG4sPHENIXMagnetDetector() override = default;
0034 
0035   //! construct
0036   void ConstructMe(G4LogicalVolume *world) override;
0037 
0038   //!@name volume accessors
0039   int IsInsPHENIXMagnet(G4VPhysicalVolume *) const;
0040 
0041   void SuperDetector(const std::string &name) { m_SuperDetector = name; }
0042   const std::string &SuperDetector() const { return m_SuperDetector; }
0043 
0044   int get_Layer() const { return m_Layer; }
0045 
0046   PHG4sPHENIXMagnetDisplayAction *GetDisplayAction() { return m_DisplayAction; }
0047 
0048  private:
0049   PHParameters *GetParams() const { return m_Params; }
0050 
0051   PHG4sPHENIXMagnetDisplayAction *m_DisplayAction = nullptr;
0052   PHParameters *m_Params = nullptr;
0053   //! registry for volumes that should not be exported, i.e. fibers
0054   PHG4GDMLConfig *m_GdmlConfig = nullptr;
0055 
0056   G4Box* Block(G4int iblock) const;
0057   G4Tubs* CryoTubes(G4int itube) const;
0058   G4Polycone* SolenoidPolycones(G4int ipolycone) const;
0059   G4Tubs* SolenoidTubes(G4int itube) const;
0060 
0061 
0062   int m_ActiveFlag;
0063   int m_Layer;
0064 
0065   std::string m_SuperDetector;
0066 
0067   std::set<G4LogicalVolume *> m_LogicalVolSet;
0068 
0069 };
0070 
0071 #endif