Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.hh,v 1.10 2003/11/03 18:17:30 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4Box.hh,v 1.11 2004/09/08 15:13:50 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -58,6 +58,7 @@ class G4Box : public G4CSGSolid
|
||||
|
||||
virtual ~G4Box();
|
||||
|
||||
|
||||
void ComputeDimensions(G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep);
|
||||
@@ -81,6 +82,8 @@ class G4Box : public G4CSGSolid
|
||||
|
||||
void SetZHalfLength(G4double dz) ;
|
||||
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Methods for solid
|
||||
|
||||
EInside Inside(const G4ThreeVector& p) const;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Box.icc,v 1.2 2004/09/08 15:13:51 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -49,3 +49,13 @@ G4double G4Box::GetZHalfLength() const
|
||||
{
|
||||
return fDz;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Box::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = 8*fDx*fDy*fDz;
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CSGSolid.hh,v 1.7 2003/06/16 16:53:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4CSGSolid.hh,v 1.9 2004/10/10 10:44:14 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -52,6 +52,13 @@ class G4CSGSolid : public G4VSolid
|
||||
virtual ~G4CSGSolid();
|
||||
|
||||
virtual std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
virtual G4Polyhedron* GetPolyhedron () const;
|
||||
|
||||
protected:
|
||||
|
||||
G4double fCubicVolume;
|
||||
mutable G4Polyhedron* fpPolyhedron;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.hh,v 1.8 2003/06/16 16:53:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Cons.hh,v 1.11 2004/12/10 16:22:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -36,7 +36,7 @@
|
||||
// half-length fDz, inner and outer radii specified at -fDz and +fDz.
|
||||
// The Phi segment is described by a starting fSPhi angle, and the
|
||||
// +fDPhi delta angle for the shape.
|
||||
// If the delta angle is >=2*M_PI, the shape is treated as continuous
|
||||
// If the delta angle is >=2*pi, the shape is treated as continuous
|
||||
// in Phi
|
||||
//
|
||||
// Member Data:
|
||||
@@ -88,6 +88,7 @@ class G4Cons : public G4CSGSolid
|
||||
|
||||
inline G4double GetStartPhiAngle () const;
|
||||
inline G4double GetDeltaPhiAngle () const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Modifiers
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Cons.icc,v 1.4 2004/10/10 10:44:15 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -78,41 +78,55 @@ inline
|
||||
void G4Cons::SetInnerRadiusMinusZ( G4double Rmin1 )
|
||||
{
|
||||
fRmin1= Rmin1 ;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Cons::SetOuterRadiusMinusZ( G4double Rmax1 )
|
||||
{
|
||||
fRmax1= Rmax1 ;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Cons::SetInnerRadiusPlusZ ( G4double Rmin2 )
|
||||
{
|
||||
fRmin2= Rmin2 ;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Cons::SetOuterRadiusPlusZ ( G4double Rmax2 )
|
||||
{
|
||||
fRmax2= Rmax2 ;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Cons::SetZHalfLength ( G4double newDz )
|
||||
{
|
||||
fDz= newDz ;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Cons::SetStartPhiAngle ( G4double newSPhi )
|
||||
{
|
||||
fSPhi= newSPhi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
void G4Cons::SetDeltaPhiAngle ( G4double newDPhi )
|
||||
{
|
||||
fDPhi= newDPhi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
// Old access methods ...
|
||||
@@ -158,3 +172,24 @@ G4double G4Cons::GetDPhi() const
|
||||
{
|
||||
return GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Cons::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else
|
||||
{
|
||||
G4double Rmean, rMean, deltaR, deltar;
|
||||
|
||||
Rmean = 0.5*(fRmax1+fRmax2);
|
||||
deltaR = fRmax1-fRmax2;
|
||||
|
||||
rMean = 0.5*(fRmin1+fRmin2);
|
||||
deltar = fRmin1-fRmin2;
|
||||
fCubicVolume = fDPhi*fDz*(Rmean*Rmean-rMean*rMean
|
||||
+(deltaR*deltaR-deltar*deltar)/12);
|
||||
}
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Orb.hh,v 1.4 2003/11/05 10:56:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4Orb.hh,v 1.6 2004/09/22 08:25:02 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -54,11 +54,12 @@ class G4Orb : public G4CSGSolid
|
||||
|
||||
// Accessors
|
||||
|
||||
inline G4double GetRadius() const { return fRmax;};
|
||||
inline G4double GetRadius() const;
|
||||
|
||||
// Modifiers
|
||||
|
||||
inline void SetRadius (G4double newRmax) {fRmax=newRmax;};
|
||||
inline void SetRadius(G4double newRmax);
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Methods for solid
|
||||
|
||||
@@ -115,4 +116,6 @@ class G4Orb : public G4CSGSolid
|
||||
G4double fRmaxTolerance;
|
||||
};
|
||||
|
||||
#include "G4Orb.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Orb.icc,v 1.2 2004/10/10 10:44:16 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
//
|
||||
// G4Orb.icc
|
||||
//
|
||||
// Implementation of inline methods of G4Orb
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
inline
|
||||
G4double G4Orb::GetRadius() const
|
||||
{
|
||||
return fRmax;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Orb::SetRadius(G4double newRmax)
|
||||
{
|
||||
fRmax=newRmax;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Orb::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = 4*pi*fRmax*fRmax*fRmax/3.;
|
||||
return fCubicVolume;
|
||||
}
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.hh,v 1.9 2003/06/16 16:53:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Para.hh,v 1.10 2004/09/13 16:26:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -91,6 +91,7 @@ class G4Para : public G4CSGSolid
|
||||
inline G4double GetYHalfLength() const;
|
||||
inline G4double GetXHalfLength() const;
|
||||
inline G4double GetTanAlpha() const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Modifiers
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Para.icc,v 1.5 2004/12/02 09:31:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -41,7 +41,7 @@ G4double G4Para::GetZHalfLength() const
|
||||
inline
|
||||
G4ThreeVector G4Para::GetSymAxis() const
|
||||
{
|
||||
G4double cosTheta = 1.0/sqrt(1+fTthetaCphi*fTthetaCphi +
|
||||
G4double cosTheta = 1.0/std::sqrt(1+fTthetaCphi*fTthetaCphi +
|
||||
fTthetaSphi*fTthetaSphi) ;
|
||||
|
||||
return G4ThreeVector(fTthetaCphi*cosTheta,
|
||||
@@ -71,35 +71,59 @@ inline
|
||||
void G4Para::SetXHalfLength(G4double val)
|
||||
{
|
||||
fDx= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Para::SetYHalfLength(G4double val)
|
||||
{
|
||||
fDy= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Para::SetZHalfLength(G4double val)
|
||||
{
|
||||
fDz= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Para::SetAlpha(G4double alpha)
|
||||
{
|
||||
fTalpha= tan(alpha);
|
||||
fTalpha= std::tan(alpha);
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Para::SetTanAlpha(G4double val)
|
||||
{
|
||||
fTalpha= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Para::SetThetaAndPhi(double pTheta, double pPhi)
|
||||
{
|
||||
fTthetaCphi=tan(pTheta)*cos(pPhi);
|
||||
fTthetaSphi=tan(pTheta)*sin(pPhi);
|
||||
fTthetaCphi=std::tan(pTheta)*std::cos(pPhi);
|
||||
fTthetaSphi=std::tan(pTheta)*std::sin(pPhi);
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
//
|
||||
// It is like G4Box, since para transformations keep the volume to be const
|
||||
|
||||
inline
|
||||
G4double G4Para::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = 8*fDx*fDy*fDz;
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.hh,v 1.10 2004/01/26 09:03:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00-patch-01 $
|
||||
// $Id: G4Sphere.hh,v 1.12 2004/12/10 16:22:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-05 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -37,10 +37,10 @@
|
||||
//
|
||||
// The phi and theta segments are described by a starting angle,
|
||||
// and the +ve delta angle for the shape.
|
||||
// If the delta angle is >=2*M_PI, or >=M_PI the shape is treated as
|
||||
// If the delta angle is >=2*pi, or >=pi the shape is treated as
|
||||
// continuous in phi or theta respectively.
|
||||
//
|
||||
// Theta must lie between 0-PI (incl).
|
||||
// Theta must lie between 0-pi (incl).
|
||||
//
|
||||
// Member Data:
|
||||
//
|
||||
@@ -90,6 +90,7 @@ class G4Sphere : public G4CSGSolid
|
||||
inline G4double GetDeltaPhiAngle () const;
|
||||
inline G4double GetStartThetaAngle() const;
|
||||
inline G4double GetDeltaThetaAngle() const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Modifiers
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Sphere.icc,v 1.5 2004/12/02 09:31:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -71,36 +71,48 @@ inline
|
||||
void G4Sphere::SetInsideRadius(G4double newRmin)
|
||||
{
|
||||
fRmin= newRmin;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Sphere::SetOuterRadius(G4double newRmax)
|
||||
{
|
||||
fRmax= newRmax;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Sphere::SetStartPhiAngle(G4double newSphi)
|
||||
{
|
||||
fSPhi= newSphi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Sphere::SetDeltaPhiAngle(G4double newDphi)
|
||||
{
|
||||
fDPhi= newDphi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Sphere::SetStartThetaAngle(G4double newSTheta)
|
||||
{
|
||||
fSTheta=newSTheta;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Sphere::SetDeltaThetaAngle(G4double newDTheta)
|
||||
{
|
||||
fDTheta=newDTheta;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
// Old access functions
|
||||
@@ -140,3 +152,13 @@ G4double G4Sphere::GetDTheta() const
|
||||
{
|
||||
return GetDeltaThetaAngle();
|
||||
}
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Sphere::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = fDPhi*(std::cos(fSTheta)-std::cos(fSTheta+fDTheta))*
|
||||
(fRmax*fRmax*fRmax-fRmin*fRmin*fRmin)/3.;
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.hh,v 1.15 2003/06/16 16:53:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Torus.hh,v 1.16 2004/09/08 15:13:51 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -116,6 +116,7 @@ class G4Torus : public G4CSGSolid
|
||||
inline G4double GetRtor() const;
|
||||
inline G4double GetSPhi() const;
|
||||
inline G4double GetDPhi() const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Methods of solid
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Torus.icc,v 1.2 2004/09/08 15:13:51 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -232,3 +232,13 @@ G4double G4TorusEquation::Derivative(G4double value)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Torus::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = fDPhi*pi*fRtor*(fRmax*fRmax-fRmin*fRmin);
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.hh,v 1.8 2003/06/16 16:53:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Trap.hh,v 1.10 2004/12/02 09:31:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -62,8 +62,8 @@
|
||||
// Member Data:
|
||||
//
|
||||
// fDz Half-length along the z axis
|
||||
// fTthetaCphi = tan(pTheta)*cos(pPhi) These combinations are suitable for
|
||||
// fTthetaSphi = tan(pTheta)*sin(pPhi) creation of the trapezoid corners
|
||||
// fTthetaCphi = std::tan(pTheta)*std::cos(pPhi) These combinations are suitable for
|
||||
// fTthetaSphi = std::tan(pTheta)*std::sin(pPhi) creation of the trapezoid corners
|
||||
//
|
||||
// fDy1 Half-length along y of the face at -fDz
|
||||
// fDx1 Half-length along x of the side at y=-fDy1 of the face at -fDz
|
||||
@@ -163,8 +163,10 @@ class G4Trap : public G4CSGSolid
|
||||
inline G4double GetXHalfLength4() const;
|
||||
inline G4double GetTanAlpha2() const;
|
||||
inline TrapSidePlane GetSidePlane( G4int n ) const;
|
||||
|
||||
inline G4ThreeVector GetSymAxis() const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
|
||||
//
|
||||
// Returns coordinates of unit vector along straight
|
||||
// line joining centers of -/+fDz planes
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Trap.icc,v 1.4 2004/12/02 09:31:28 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-03 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -41,7 +41,7 @@ G4double G4Trap::GetZHalfLength() const
|
||||
inline
|
||||
G4ThreeVector G4Trap::GetSymAxis() const
|
||||
{
|
||||
G4double cosTheta = 1.0/sqrt(1+fTthetaCphi*fTthetaCphi +
|
||||
G4double cosTheta = 1.0/std::sqrt(1+fTthetaCphi*fTthetaCphi +
|
||||
fTthetaSphi*fTthetaSphi) ;
|
||||
|
||||
return G4ThreeVector(fTthetaCphi*cosTheta,
|
||||
@@ -102,3 +102,17 @@ TrapSidePlane G4Trap::GetSidePlane( G4int n ) const
|
||||
{
|
||||
return fPlanes[n] ;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
//
|
||||
// Return the volume as a bit modified Trd
|
||||
|
||||
inline
|
||||
G4double G4Trap::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = fDz*( (fDx1+fDx2+fDx3+fDx4)*(fDy1+fDy2)
|
||||
+ (fDx4+fDx3-fDx2-fDx1)*(fDy2-fDy1)/3 );
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.hh,v 1.9 2003/06/16 16:53:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Trd.hh,v 1.10 2004/09/13 16:26:53 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -79,6 +79,7 @@ class G4Trd : public G4CSGSolid
|
||||
inline G4double GetYHalfLength1() const;
|
||||
inline G4double GetYHalfLength2() const;
|
||||
inline G4double GetZHalfLength() const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
// Modifiers
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Trd.icc,v 1.4 2004/10/10 10:44:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -66,28 +66,48 @@ inline
|
||||
void G4Trd::SetXHalfLength1(G4double val)
|
||||
{
|
||||
fDx1= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Trd::SetXHalfLength2(G4double val)
|
||||
{
|
||||
fDx2= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Trd::SetYHalfLength1(G4double val)
|
||||
{
|
||||
fDy1= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Trd::SetYHalfLength2(G4double val)
|
||||
{
|
||||
fDy2= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Trd::SetZHalfLength(G4double val)
|
||||
{
|
||||
fDz= val;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Trd::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = 2*fDz*( (fDx1+fDx2)*(fDy1+fDy2) + (fDx2-fDx1)*(fDy2-fDy1)/3 );
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.hh,v 1.8 2003/06/16 16:53:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Tubs.hh,v 1.9 2004/09/08 15:13:52 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -91,6 +91,8 @@ class G4Tubs : public G4CSGSolid
|
||||
inline G4double GetZHalfLength () const;
|
||||
inline G4double GetStartPhiAngle () const;
|
||||
inline G4double GetDeltaPhiAngle () const;
|
||||
inline G4double GetCubicVolume();
|
||||
|
||||
|
||||
// Modifiers
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-02-patch-01 $
|
||||
// $Id: G4Tubs.icc,v 1.4 2004/10/10 10:44:19 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-07-00-cand-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -66,30 +66,40 @@ inline
|
||||
void G4Tubs::SetInnerRadius (G4double newRMin)
|
||||
{
|
||||
fRMin= newRMin;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Tubs::SetOuterRadius (G4double newRMax)
|
||||
{
|
||||
fRMax= newRMax;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Tubs::SetZHalfLength (G4double newDz)
|
||||
{
|
||||
fDz= newDz;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Tubs::SetStartPhiAngle (G4double newSPhi)
|
||||
{
|
||||
fSPhi= newSPhi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4Tubs::SetDeltaPhiAngle (G4double newDPhi)
|
||||
{
|
||||
fDPhi= newDPhi;
|
||||
fCubicVolume= 0.;
|
||||
fpPolyhedron = 0;
|
||||
}
|
||||
|
||||
// Older names for access functions
|
||||
@@ -123,3 +133,13 @@ G4double G4Tubs::GetDPhi () const
|
||||
{
|
||||
return GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
G4double G4Tubs::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) ;
|
||||
else fCubicVolume = fDPhi*fDz*(fRMax*fRMax-fRMin*fRMin);
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user