#ifndef SNOSVBellyPlate_h #define SNOSVBellyPlate_h 1 #include namespace RAT{ class SNOSVBellyPlate :public SphericalSubregion{ public: /// Constructor /// @param[in] rmin Radius of inner surface of bellyplate- the surface that protrudes into the scintillator volume /// @param[in] rmax Maximum radius of inner surface of bellyplate- the surface that aligns with the normal acrylic volume /// @param[in] xAxis Horizontal unit axis in "plane"of bellyplate /// @param[in] yAxis Perpendicular axis to bellyplate, that passes through the centre of the AV /// @param[in] zAxis Vertical unit axis in "plane"of bellyplate /// @param[in] zInner z-Coordinate of start of bevel- where the radius of the av starts to increase /// @param[in] zOuter z-coordinate of end of bevel- where the radius of the bellyplate equals that of the AV. SNOSVBellyPlate(const G4double rmin, const G4double rmax, const G4ThreeVector&xAxis, const G4ThreeVector&yAxis, const G4ThreeVector &zAxis, const G4double zInner, const G4double zOuter); /// Implements G4VSolid Method G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &n, const G4double dInner[2], const G4double dOuter[2])const; /// Implements G4VSolid Method G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &n, const G4double dInner[2], const G4double dOuter[2])const; /// Implements G4VSolid Method G4double DistanceToIn(const G4ThreeVector &)const{ return 0; }; /// Implements G4VSolid Method G4double DistanceToOut(const G4ThreeVector &)const{ return 0; }; /// Implements G4VSolid Method EInside Inside(const G4ThreeVector &p)const; /// Function to determine if a region overlaps the belly plate. The region is defined by four vectors at the spherical "corners". G4bool OverlapsRegion(const G4ThreeVector corners[4])const; /// Returns the cylindrical radius at a given z-coordinate, taking into account the spherical and conical surfaces of the bellyplate G4double Rho(G4double z)const; /// Returns the spherical radius at a given z-coordinate, taking into account the spherical and conical surfaces of the bellyplate G4double Radius(G4double z)const; /// Implements G4VSolid Method G4ThreeVector SurfaceNormal(const G4ThreeVector &p, G4bool &isValid)const; private: const G4ThreeVector fXaxis; ///< Local horizontal axis const G4ThreeVector fYaxis; ///< Radial axis- from the center of the AV to the center of the bellyplate const G4ThreeVector fZaxis; ///< Local vertical axis G4double fRmin; ///< Distance from center of AV to nearest bellyplate acrylic, protruding into the scintillator volume G4double fRmax; ///< Distance from center of AV to the outer edge of the bellyplate, lined up with the AV radius G4double fZInner; ///< z coordinate of start of bevel (closest to the center of the bellyplate G4double fZOuter; ///< z coordinate of end of bevel( aligned with the av inner radius) G4double fZOffset; ///< value of z for which the cone-radius is zero (for the positive-z cone) G4double fRhoSlope; ///< Slope of the line that defines the cone- that is rho= fRhoSlope*(z-fZoffset) G4double fRhomin; ///< maximum conical radius of bellyplate G4double fRhomax; ///< minimum conical radius of bellyplate G4double fThreshold; ///< Geant4 tolerance G4double fYmin; // Minimum y position in BP coordinates to ensure calculations are local }; } //::RAT #endif