G4PVDivision Class Reference

#include <G4PVDivision.hh>

Inheritance diagram for G4PVDivision:

G4VPhysicalVolume

Public Member Functions

 G4PVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)
 G4PVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, const G4double offset)
 G4PVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4double width, const G4double offset)
 G4PVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)
virtual ~G4PVDivision ()
virtual G4bool IsMany () const
virtual G4int GetCopyNo () const
virtual void SetCopyNo (G4int CopyNo)
virtual G4bool IsReplicated () const
virtual G4VPVParameterisationGetParameterisation () const
virtual void GetReplicationData (EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const
EAxis GetDivisionAxis () const
G4bool IsParameterised () const
G4bool IsRegularStructure () const
G4int GetRegularStructureId () const

Protected Attributes

EAxis faxis
EAxis fdivAxis
G4int fnReplicas
G4double fwidth
G4double foffset
G4int fcopyNo
G4VDivisionParameterisationfparam

Detailed Description

Definition at line 79 of file G4PVDivision.hh.


Constructor & Destructor Documentation

G4PVDivision::G4PVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMother,
const EAxis  pAxis,
const G4int  nReplicas,
const G4double  width,
const G4double  offset 
)

Definition at line 47 of file G4PVDivision.cc.

References G4LogicalVolume::AddDaughter(), DivNDIVandWIDTH, FatalException, G4endl, G4Exception(), and G4VPhysicalVolume::SetMotherLogical().

00054   : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
00055     fcopyNo(-1)
00056 {
00057   if (!pMotherLogical)
00058   {
00059     std::ostringstream message;
00060     message << "Invalid setup." << G4endl
00061             << "NULL pointer specified as mother for volume: " << pName;
00062     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00063                 FatalException, message);
00064     return;
00065   }
00066   if (pLogical == pMotherLogical)
00067   {
00068     std::ostringstream message;
00069     message << "Invalid setup." << G4endl
00070             << "Cannot place a volume inside itself! Volume: " << pName;
00071     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00072                 FatalException, message);
00073   }
00074   pMotherLogical->AddDaughter(this);
00075   SetMotherLogical(pMotherLogical);
00076   SetParameterisation(pMotherLogical, pAxis, nDivs,
00077                       width, offset, DivNDIVandWIDTH);
00078   CheckAndSetParameters (pAxis, nDivs, width, offset,
00079                          DivNDIVandWIDTH, pMotherLogical);
00080 }

G4PVDivision::G4PVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const EAxis  pAxis,
const G4int  nReplicas,
const G4double  offset 
)

Definition at line 83 of file G4PVDivision.cc.

References G4LogicalVolume::AddDaughter(), DivNDIV, FatalException, G4endl, G4Exception(), and G4VPhysicalVolume::SetMotherLogical().

00089   : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
00090     fcopyNo(-1)
00091 {
00092   if (!pMotherLogical)
00093   {
00094     std::ostringstream message;
00095     message << "Invalid setup." << G4endl
00096             << "NULL pointer specified as mother! Volume: " << pName;
00097     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00098                 FatalException, message);
00099     return;
00100   }
00101   if (pLogical == pMotherLogical)
00102   {
00103     std::ostringstream message;
00104     message << "Invalid setup." << G4endl
00105             << "Cannot place a volume inside itself! Volume: " << pName;
00106     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00107                 FatalException, message);
00108   }
00109   pMotherLogical->AddDaughter(this);
00110   SetMotherLogical(pMotherLogical);
00111   SetParameterisation(pMotherLogical, pAxis, nDivs, 0., offset, DivNDIV);
00112   CheckAndSetParameters (pAxis, nDivs, 0., offset, DivNDIV, pMotherLogical);
00113 }

G4PVDivision::G4PVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const EAxis  pAxis,
const G4double  width,
const G4double  offset 
)

Definition at line 116 of file G4PVDivision.cc.

References G4LogicalVolume::AddDaughter(), DivWIDTH, FatalException, G4endl, G4Exception(), and G4VPhysicalVolume::SetMotherLogical().

00122   : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
00123     fcopyNo(-1)
00124 {
00125   if (!pMotherLogical)
00126   {
00127     std::ostringstream message;
00128     message << "Invalid setup." << G4endl
00129             << "NULL pointer specified as mother! Volume: " + pName;
00130     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00131                 FatalException, message);
00132     return;
00133   }
00134   if (pLogical == pMotherLogical)
00135   {
00136     std::ostringstream message;
00137     message << "Invalid setup." << G4endl
00138             << "Cannot place a volume inside itself! Volume: "+ pName;
00139     G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
00140                 FatalException, message);
00141   }
00142   pMotherLogical->AddDaughter(this);
00143   SetMotherLogical(pMotherLogical);
00144   SetParameterisation(pMotherLogical, pAxis, 0, width, offset, DivWIDTH);
00145   CheckAndSetParameters (pAxis, 0, width, offset, DivWIDTH, pMotherLogical);
00146 }

G4PVDivision::G4PVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4VPhysicalVolume pMother,
const EAxis  pAxis,
const G4int  nReplicas,
const G4double  width,
const G4double  offset 
)

G4PVDivision::~G4PVDivision (  )  [virtual]

Definition at line 241 of file G4PVDivision.cc.

References G4VPhysicalVolume::GetRotation().

00242 {
00243   delete GetRotation();
00244 }


Member Function Documentation

G4int G4PVDivision::GetCopyNo (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 265 of file G4PVDivision.cc.

References fcopyNo.

00266 {
00267   return fcopyNo;
00268 }

EAxis G4PVDivision::GetDivisionAxis (  )  const

Definition at line 247 of file G4PVDivision.cc.

References fdivAxis.

Referenced by G4GDMLWriteStructure::DivisionvolWrite().

00248 {
00249   return fdivAxis;
00250 }

G4VPVParameterisation * G4PVDivision::GetParameterisation (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 283 of file G4PVDivision.cc.

References fparam.

00284 {
00285   return fparam;
00286 }

G4int G4PVDivision::GetRegularStructureId (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 536 of file G4PVDivision.cc.

00537 {
00538   return 0;  
00539 }           

void G4PVDivision::GetReplicationData ( EAxis axis,
G4int nReplicas,
G4double width,
G4double offset,
G4bool consuming 
) const [virtual]

Implements G4VPhysicalVolume.

Definition at line 289 of file G4PVDivision.cc.

References faxis, fnReplicas, foffset, and fwidth.

Referenced by G4GDMLWriteStructure::DivisionvolWrite().

00294 {
00295   axis=faxis;
00296   nDivs=fnReplicas;
00297   width=fwidth;
00298   offset=foffset;
00299   consuming=false;
00300 }

G4bool G4PVDivision::IsMany (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 259 of file G4PVDivision.cc.

00260 {
00261   return false; 
00262 }

G4bool G4PVDivision::IsParameterised (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 253 of file G4PVDivision.cc.

00254 { 
00255   return true;
00256 }

G4bool G4PVDivision::IsRegularStructure (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 528 of file G4PVDivision.cc.

00529 {
00530   return false;
00531 }           

G4bool G4PVDivision::IsReplicated (  )  const [virtual]

Implements G4VPhysicalVolume.

Definition at line 277 of file G4PVDivision.cc.

00278 {
00279   return true;
00280 }

void G4PVDivision::SetCopyNo ( G4int  CopyNo  )  [virtual]

Implements G4VPhysicalVolume.

Definition at line 271 of file G4PVDivision.cc.

References fcopyNo.

00272 {
00273   fcopyNo= newCopyNo;
00274 }


Field Documentation

EAxis G4PVDivision::faxis [protected]

Definition at line 165 of file G4PVDivision.hh.

Referenced by GetReplicationData().

G4int G4PVDivision::fcopyNo [protected]

Definition at line 169 of file G4PVDivision.hh.

Referenced by GetCopyNo(), and SetCopyNo().

EAxis G4PVDivision::fdivAxis [protected]

Definition at line 166 of file G4PVDivision.hh.

Referenced by GetDivisionAxis().

G4int G4PVDivision::fnReplicas [protected]

Definition at line 167 of file G4PVDivision.hh.

Referenced by GetReplicationData().

G4double G4PVDivision::foffset [protected]

Definition at line 168 of file G4PVDivision.hh.

Referenced by GetReplicationData().

G4VDivisionParameterisation* G4PVDivision::fparam [protected]

Definition at line 170 of file G4PVDivision.hh.

Referenced by GetParameterisation().

G4double G4PVDivision::fwidth [protected]

Definition at line 168 of file G4PVDivision.hh.

Referenced by GetReplicationData().


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:04 2013 for Geant4 by  doxygen 1.4.7