File indexing completed on 2025-08-05 08:18:16
0001
0002
0003 #ifndef G4TPC_PHG4TPCDETECTOR_H
0004 #define G4TPC_PHG4TPCDETECTOR_H
0005
0006 #include <g4main/PHG4Detector.h>
0007
0008 #include <limits>
0009 #include <set>
0010 #include <string>
0011 #include <vector>
0012
0013 class G4LogicalVolume;
0014 class G4UserLimits;
0015 class G4VPhysicalVolume;
0016 class PHCompositeNode;
0017 class PHG4TpcDisplayAction;
0018 class PHG4Subsystem;
0019 class PHParameters;
0020 class CDBTTree;
0021 class CDBInterface;
0022
0023 class PHG4TpcDetector : public PHG4Detector
0024 {
0025 public:
0026
0027 PHG4TpcDetector(PHG4Subsystem *subsys, PHCompositeNode *Node, PHParameters *parameters, const std::string &dnam);
0028
0029
0030 ~PHG4TpcDetector(void) override;
0031
0032
0033 void ConstructMe(G4LogicalVolume *world) override;
0034
0035 int IsInTpc(G4VPhysicalVolume *) const;
0036 void SuperDetector(const std::string &name) { m_SuperDetectorName = name; }
0037 const std::string &SuperDetector() const { return m_SuperDetectorName; }
0038
0039 private:
0040 void CreateTpcGasMixture();
0041 int ConstructTpcGasVolume(G4LogicalVolume *tpc_envelope);
0042 int ConstructTpcCageVolume(G4LogicalVolume *tpc_envelope);
0043 int ConstructTpcExternalSupports(G4LogicalVolume *logicWorld);
0044
0045 void CreateCompositeMaterial(const std::string &compositeName, std::vector<std::string> materialName, const std::vector<double> &thickness);
0046
0047
0048
0049 void add_geometry_node();
0050 CDBTTree *m_cdbttree{nullptr};
0051 CDBInterface *m_cdb{nullptr};
0052 PHG4TpcDisplayAction *m_DisplayAction = nullptr;
0053 PHParameters *m_Params = nullptr;
0054 G4UserLimits *m_G4UserLimits = nullptr;
0055 int m_ActiveFlag = 0;
0056 int m_AbsorberActiveFlag = 0;
0057 double m_InnerCageRadius = std::numeric_limits<double>::signaling_NaN();
0058 double m_OuterCageRadius = std::numeric_limits<double>::signaling_NaN();
0059 std::set<G4VPhysicalVolume *> m_AbsorberVolumeSet;
0060 std::set<G4VPhysicalVolume *> m_ActiveVolumeSet;
0061
0062 std::string m_SuperDetectorName;
0063 };
0064
0065 #endif