//////////////////////////////////////////////////////////////////////// /// /// \class SNORopeLoop /// /// \brief Describes the geometry of the semicircular loop in the AV rope grooves /// /// \author Aksel Hallin aksel.hallin@ualberta.ca /// /// REVISION HISTORY:\n /// Jul 9, 2014 : Aksel Hallin \n /// /// \detail Implements the G4VSolid classes (via the SphericalSubregion interface) for the rope loop. //// //////////////////////////////////////////////////////////////////////// #ifndef __RAT_SNORopeLoop_hh_ #define __RAT_SNORopeLoop_hh_ #include #include namespace RAT{ class SNORopeLoop:public SphericalSubregion{ public: /// Constructor /// A SNORopeLoop is the portion of the loop inside the rope groove of the belly plates- that is, a semicircular torus. /// @param[in]aPhi Specifies the angle for the center of the loop. SNORopeLoop(DBLinkPtr geoDimensionsTable, G4double aPhi); /// Inside implements G4VSolid (Spherical Subregion) method EInside Inside(const G4ThreeVector &p)const; /// DistanceToIn implements G4VSolid (Spherical Subregion) method G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &n, const G4double dInner[2], const G4double dOuter[2])const; /// DistanceToIn implements G4VSolid (Spherical Subregion) method G4double DistanceToIn(const G4ThreeVector &p)const; /// DistanceToOut implements G4VSolid (Spherical Subregion) method G4double DistanceToOut(const G4ThreeVector &p)const; /// OverlapsRegion implements GSpherical Subregion method G4bool OverlapsRegion(const G4ThreeVector corners[4])const; /// SurfaceNormal implements G4VSolid (Spherical Subregion) method G4ThreeVector SurfaceNormal(const G4ThreeVector &p)const; //{ return p.unit(); } /// SurfaceNormal implements G4VSolid (Spherical Subregion) method G4ThreeVector SurfaceNormal(const G4ThreeVector &p, G4bool &isValid)const; private: G4double fRadius; ///< distance from center of AV to center of rope in the groove G4double fLoopRadius; ///< toroidal radius of the loop G4double fMinHalfThick; ///< Half thickness of rope radially from center of panel G4double fMaxHalfThick; ///< Half thickness of rope in direction of local y-axis G4ThreeVector fXaxis, fYaxis,fZaxis; ///< axes to define local coordinate system G4ThreeVector fOrigin; ///< center of the panel G4double fThreshold; ///< Geant4 tolerances G4double fGrooveInnerRadius; G4double fGrooveOuterRadius; G4double fOuterAVradius; }; } //::RAT #endif // __RAT_SNORopeLoop_hh_