Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 /* vim: set sw=2 ft=cpp: */
0004 
0005 #ifndef G4EPD_PHG4EPDDETECTOR_H
0006 #define G4EPD_PHG4EPDDETECTOR_H
0007 
0008 #include <g4main/PHG4Detector.h>
0009 
0010 #include <cstdint>
0011 #include <map>
0012 #include <set>
0013 #include <string>
0014 
0015 class G4ExtrudedSolid;
0016 class G4LogicalVolume;
0017 class G4VPhysicalVolume;
0018 class PHCompositeNode;
0019 class PHG4EPDDisplayAction;
0020 class PHG4Subsystem;
0021 class PHParameters;
0022 
0023 class PHG4EPDDetector : public PHG4Detector
0024 {
0025  public:
0026   PHG4EPDDetector(PHG4Subsystem* subsys,
0027                   PHCompositeNode* node,
0028                   PHParameters* parameters,
0029                   std::string const& name);
0030 
0031   void ConstructMe(G4LogicalVolume* world) override;
0032 
0033   int IsInDetector(G4VPhysicalVolume*) const;
0034 
0035   uint32_t module_id_for(uint32_t index, uint32_t slice, uint32_t side);
0036   uint32_t module_id_for(G4VPhysicalVolume* volume);
0037 
0038   void SuperDetector(std::string const& name) { superdetector = name; }
0039   const std::string &SuperDetector() const { return superdetector; }
0040 
0041   PHG4EPDDisplayAction* GetDisplayAction() { return m_DisplayAction; }
0042 
0043  private:
0044   G4ExtrudedSolid* construct_block(int32_t index);
0045 
0046   PHG4EPDDisplayAction* m_DisplayAction = nullptr;
0047   PHParameters* m_Params = nullptr;
0048 
0049   int m_ActiveFlag = 0;
0050   int m_SupportActiveFlag = 0;
0051 
0052   std::set<G4LogicalVolume*> m_SupportLogVolSet;
0053   std::set<G4LogicalVolume*> m_ActiveLogVolSet;
0054 
0055   std::map<G4VPhysicalVolume*, uint32_t> m_volumes;
0056 
0057   std::string superdetector;
0058 };
0059 
0060 #endif /* G4EPD_PHG4EPDETECTOR_H */