Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PVDivision Class Reference

#include <G4PVDivision.hh>

+ Inheritance diagram for G4PVDivision:

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
 
- Public Member Functions inherited from G4VPhysicalVolume
 G4VPhysicalVolume (G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
 
virtual ~G4VPhysicalVolume ()
 
G4bool operator== (const G4VPhysicalVolume &p) const
 
G4RotationMatrixGetObjectRotation () const
 
G4RotationMatrix GetObjectRotationValue () const
 
G4ThreeVector GetObjectTranslation () const
 
const G4RotationMatrixGetFrameRotation () const
 
G4ThreeVector GetFrameTranslation () const
 
const G4ThreeVectorGetTranslation () const
 
const G4RotationMatrixGetRotation () const
 
void SetTranslation (const G4ThreeVector &v)
 
G4RotationMatrixGetRotation ()
 
void SetRotation (G4RotationMatrix *)
 
G4LogicalVolumeGetLogicalVolume () const
 
void SetLogicalVolume (G4LogicalVolume *pLogical)
 
G4LogicalVolumeGetMotherLogical () const
 
void SetMotherLogical (G4LogicalVolume *pMother)
 
const G4StringGetName () const
 
void SetName (const G4String &pName)
 
virtual G4int GetMultiplicity () const
 
virtual G4bool IsMany () const =0
 
virtual G4int GetCopyNo () const =0
 
virtual void SetCopyNo (G4int CopyNo)=0
 
virtual G4bool IsReplicated () const =0
 
virtual G4bool IsParameterised () const =0
 
virtual G4VPVParameterisationGetParameterisation () const =0
 
virtual void GetReplicationData (EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
 
virtual G4bool IsRegularStructure () const =0
 
virtual G4int GetRegularStructureId () const =0
 
virtual G4bool CheckOverlaps (G4int res=1000, G4double tol=0., G4bool verbose=true)
 
 G4VPhysicalVolume (__void__ &)
 

Protected Attributes

EAxis faxis
 
EAxis fdivAxis
 
G4int fnReplicas
 
G4double fwidth
 
G4double foffset
 
G4int fcopyNo
 
G4VDivisionParameterisationfparam
 
- Protected Attributes inherited from G4VPhysicalVolume
G4RotationMatrixfrot
 
G4ThreeVector ftrans
 

Detailed Description

Definition at line 79 of file G4PVDivision.hh.

Constructor & Destructor Documentation

◆ G4PVDivision() [1/4]

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.

54 : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
55 fcopyNo(-1)
56{
57 if (!pMotherLogical)
58 {
59 std::ostringstream message;
60 message << "Invalid setup." << G4endl
61 << "NULL pointer specified as mother for volume: " << pName;
62 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
63 FatalException, message);
64 return;
65 }
66 if (pLogical == pMotherLogical)
67 {
68 std::ostringstream message;
69 message << "Invalid setup." << G4endl
70 << "Cannot place a volume inside itself! Volume: " << pName;
71 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
72 FatalException, message);
73 }
74 pMotherLogical->AddDaughter(this);
75 SetMotherLogical(pMotherLogical);
76 SetParameterisation(pMotherLogical, pAxis, nDivs,
77 width, offset, DivNDIVandWIDTH);
78 CheckAndSetParameters (pAxis, nDivs, width, offset,
79 DivNDIVandWIDTH, pMotherLogical);
80}
@ FatalException
CLHEP::Hep3Vector G4ThreeVector
#define G4endl
Definition: G4ios.hh:52
void SetMotherLogical(G4LogicalVolume *pMother)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ G4PVDivision() [2/4]

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.

89 : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
90 fcopyNo(-1)
91{
92 if (!pMotherLogical)
93 {
94 std::ostringstream message;
95 message << "Invalid setup." << G4endl
96 << "NULL pointer specified as mother! Volume: " << pName;
97 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
98 FatalException, message);
99 return;
100 }
101 if (pLogical == pMotherLogical)
102 {
103 std::ostringstream message;
104 message << "Invalid setup." << G4endl
105 << "Cannot place a volume inside itself! Volume: " << pName;
106 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
107 FatalException, message);
108 }
109 pMotherLogical->AddDaughter(this);
110 SetMotherLogical(pMotherLogical);
111 SetParameterisation(pMotherLogical, pAxis, nDivs, 0., offset, DivNDIV);
112 CheckAndSetParameters (pAxis, nDivs, 0., offset, DivNDIV, pMotherLogical);
113}
void AddDaughter(G4VPhysicalVolume *p)

◆ G4PVDivision() [3/4]

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.

122 : G4VPhysicalVolume(0,G4ThreeVector(),pName,pLogical,0),
123 fcopyNo(-1)
124{
125 if (!pMotherLogical)
126 {
127 std::ostringstream message;
128 message << "Invalid setup." << G4endl
129 << "NULL pointer specified as mother! Volume: " + pName;
130 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
131 FatalException, message);
132 return;
133 }
134 if (pLogical == pMotherLogical)
135 {
136 std::ostringstream message;
137 message << "Invalid setup." << G4endl
138 << "Cannot place a volume inside itself! Volume: "+ pName;
139 G4Exception("G4PVDivision::G4PVDivision()", "GeomDiv0002",
140 FatalException, message);
141 }
142 pMotherLogical->AddDaughter(this);
143 SetMotherLogical(pMotherLogical);
144 SetParameterisation(pMotherLogical, pAxis, 0, width, offset, DivWIDTH);
145 CheckAndSetParameters (pAxis, 0, width, offset, DivWIDTH, pMotherLogical);
146}

◆ G4PVDivision() [4/4]

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

◆ ~G4PVDivision()

G4PVDivision::~G4PVDivision ( )
virtual

Definition at line 241 of file G4PVDivision.cc.

242{
243 delete GetRotation();
244}
const G4RotationMatrix * GetRotation() const

Member Function Documentation

◆ GetCopyNo()

G4int G4PVDivision::GetCopyNo ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 265 of file G4PVDivision.cc.

266{
267 return fcopyNo;
268}

◆ GetDivisionAxis()

EAxis G4PVDivision::GetDivisionAxis ( ) const

Definition at line 247 of file G4PVDivision.cc.

248{
249 return fdivAxis;
250}

Referenced by G4GDMLWriteStructure::DivisionvolWrite().

◆ GetParameterisation()

G4VPVParameterisation * G4PVDivision::GetParameterisation ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 283 of file G4PVDivision.cc.

284{
285 return fparam;
286}
G4VDivisionParameterisation * fparam

◆ GetRegularStructureId()

G4int G4PVDivision::GetRegularStructureId ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 536 of file G4PVDivision.cc.

537{
538 return 0;
539}

◆ GetReplicationData()

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.

294{
295 axis=faxis;
296 nDivs=fnReplicas;
297 width=fwidth;
298 offset=foffset;
299 consuming=false;
300}
G4double foffset
G4double fwidth

Referenced by G4GDMLWriteStructure::DivisionvolWrite().

◆ IsMany()

G4bool G4PVDivision::IsMany ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 259 of file G4PVDivision.cc.

260{
261 return false;
262}

◆ IsParameterised()

G4bool G4PVDivision::IsParameterised ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 253 of file G4PVDivision.cc.

254{
255 return true;
256}

◆ IsRegularStructure()

G4bool G4PVDivision::IsRegularStructure ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 528 of file G4PVDivision.cc.

529{
530 return false;
531}

◆ IsReplicated()

G4bool G4PVDivision::IsReplicated ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 277 of file G4PVDivision.cc.

278{
279 return true;
280}

◆ SetCopyNo()

void G4PVDivision::SetCopyNo ( G4int  CopyNo)
virtual

Implements G4VPhysicalVolume.

Definition at line 271 of file G4PVDivision.cc.

272{
273 fcopyNo= newCopyNo;
274}

Member Data Documentation

◆ faxis

EAxis G4PVDivision::faxis
protected

Definition at line 165 of file G4PVDivision.hh.

Referenced by GetReplicationData().

◆ fcopyNo

G4int G4PVDivision::fcopyNo
protected

Definition at line 169 of file G4PVDivision.hh.

Referenced by GetCopyNo(), and SetCopyNo().

◆ fdivAxis

EAxis G4PVDivision::fdivAxis
protected

Definition at line 166 of file G4PVDivision.hh.

Referenced by GetDivisionAxis().

◆ fnReplicas

G4int G4PVDivision::fnReplicas
protected

Definition at line 167 of file G4PVDivision.hh.

Referenced by GetReplicationData().

◆ foffset

G4double G4PVDivision::foffset
protected

Definition at line 168 of file G4PVDivision.hh.

Referenced by GetReplicationData().

◆ fparam

G4VDivisionParameterisation* G4PVDivision::fparam
protected

Definition at line 170 of file G4PVDivision.hh.

Referenced by GetParameterisation().

◆ fwidth

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: