////////////////////////////////////////////////////////////////////////////////////////// /// \class RAT::SNORopeNet /// /// \brief Geometry Class for the SNO ropenet- which is the part of the hold down rope system with spherical geometry. /// /// \author Aksel Hallin aksel.hallin@ualberta.ca /// /// Revision History: \n /// 2014-05-02 Aksel Hallin /// ///\detail This class implements the rope net. Each segment of the rope net follows a great circle, bounded by two spherical surfaces /// and two planar surfaces, 30 mm apart. /// ///////////////////////////////////////////////////////////////////////////////////////// #ifndef RAT__SNORopeNet__ #define RAT__SNORopeNet__ #include #include namespace RAT{ class SNORopeNet:public SphericalSubregion{ public: /// Constructor /// @param[in] phi Angle of the anchor of the first rope in a pair. The second rope is 162 degrees away from the first. The cross product /// between first and second ropes in a pair should have a positive projection onto the z-axis. SNORopeNet(DBLinkPtr geoDimensionsTable,G4double phi); //phi is the angle of the first rope from the x-axis; the second leg is at phi+.9 pi /// Implements G4VSolid method G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &n, const G4double dInner[2], const G4double dOuter[2])const; /// Implements G4VSolid method G4double DistanceToIn(const G4ThreeVector &p)const; /// Implements G4VSolid method G4double DistanceToOut(const G4ThreeVector &p)const; /// Implements G4VSolid method EInside Inside(const G4ThreeVector &p)const; /// Routine that returns true if any part of the ropenet passes between the spherical "rectangle" delineated by the four corners. G4bool OverlapsRegion(const G4ThreeVector corners[4])const; /// Implements G4VSolid method G4ThreeVector SurfaceNormal(const G4ThreeVector &p, G4bool &isValid)const; /// Returns the inner radius of the ropenet G4double GetRmin()const{return fRmin;} /// Returns the outer radius of the ropenet G4double GetRmax()const{return fRmax;} private: G4ThreeVector f1Vertical; ///< unit vector along axis of cylinder for the vertical section of phi1 rope G4ThreeVector f2Vertical; ///< unit vector along axis of cylinder for the vertical section of phi2 rope G4ThreeVector fXaxis; ///< Great circle coordinate system. x-axis runs from center of sphere to first spreader know G4ThreeVector fYaxis; ///< In the plane of the great circle. G4ThreeVector fZaxis; ///< Normal to the great circle plane. Guaranteed to have a positive projection on the z-axis. G4ThreeVector f1Cut; ///< defines plane where vertical rope transitions to tilted rope on phi1 side G4ThreeVector f2Cut; ///< defines plane where vertical rope transitions to tilted rope on phi2 side G4double fRmin; ///< spherical radius of outer av surface= inner rope surface =6056.1 mm G4double fRmax; ///< spherical radius of outer rope surface= 6079.7 mm G4double fZ1; ///< bottom of rope in cylindrical coordinates =-15 mm G4double fZ2; ///< top of rope in cylindrical coordinate=15 mm G4double fZSpreader; ///< top of spreader rope G4double fOverlapDistance; ///< Distance from the rope center a point on the inner sphere needs to be before it is impossible for a line from the point to intersect the rope. G4double fThreshold; ///