114 lines
2.8 KiB
Plaintext
114 lines
2.8 KiB
Plaintext
//
|
|
// ********************************************************************
|
|
// * 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: 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
|
|
//
|
|
// G4Trd.icc
|
|
//
|
|
// Implementation of inline methods of G4Trd
|
|
// --------------------------------------------------------------------
|
|
|
|
inline
|
|
G4double G4Trd::GetXHalfLength1() const
|
|
{
|
|
return fDx1;
|
|
}
|
|
|
|
inline
|
|
G4double G4Trd::GetXHalfLength2() const
|
|
{
|
|
return fDx2;
|
|
}
|
|
|
|
inline
|
|
G4double G4Trd::GetYHalfLength1() const
|
|
{
|
|
return fDy1;
|
|
}
|
|
|
|
inline
|
|
G4double G4Trd::GetYHalfLength2() const
|
|
{
|
|
return fDy2;
|
|
}
|
|
|
|
inline
|
|
G4double G4Trd::GetZHalfLength() const
|
|
{
|
|
return fDz;
|
|
}
|
|
|
|
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;
|
|
}
|