Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
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
 
- 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)
 
EVolume VolumeType () const
 
virtual G4int GetMultiplicity () const
 
virtual G4bool CheckOverlaps (G4int res=1000, G4double tol=0., G4bool verbose=true, G4int errMax=1)
 
 G4VPhysicalVolume (__void__ &)
 
G4int GetInstanceID () const
 

Protected Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicalVolume
static const G4PVManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicalVolume
void InitialiseWorker (G4VPhysicalVolume *pMasterObject, G4RotationMatrix *pRot, const G4ThreeVector &tlate)
 
void TerminateWorker (G4VPhysicalVolume *pMasterObject)
 
- Static Protected Attributes inherited from G4VPhysicalVolume
static G4GEOM_DLL G4PVManager subInstanceManager
 

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().

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 }
G4VPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
CLHEP::Hep3Vector G4ThreeVector
#define width
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
void SetMotherLogical(G4LogicalVolume *pMother)
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().

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 }
G4VPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
CLHEP::Hep3Vector G4ThreeVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
void SetMotherLogical(G4LogicalVolume *pMother)
void AddDaughter(G4VPhysicalVolume *p)
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().

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 }
G4VPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pMother)
CLHEP::Hep3Vector G4ThreeVector
#define width
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
void SetMotherLogical(G4LogicalVolume *pMother)
void AddDaughter(G4VPhysicalVolume *p)
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().

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

Member Function Documentation

G4int G4PVDivision::GetCopyNo ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 265 of file G4PVDivision.cc.

References fcopyNo.

266 {
267  return fcopyNo;
268 }
EAxis G4PVDivision::GetDivisionAxis ( ) const

Definition at line 247 of file G4PVDivision.cc.

References fdivAxis.

Referenced by G4GDMLWriteStructure::DivisionvolWrite().

248 {
249  return fdivAxis;
250 }
G4VPVParameterisation * G4PVDivision::GetParameterisation ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 283 of file G4PVDivision.cc.

References fparam.

284 {
285  return fparam;
286 }
G4VDivisionParameterisation * fparam
G4int G4PVDivision::GetRegularStructureId ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 536 of file G4PVDivision.cc.

537 {
538  return 0;
539 }
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().

294 {
295  axis=faxis;
296  nDivs=fnReplicas;
297  width=fwidth;
298  offset=foffset;
299  consuming=false;
300 }
#define width
G4double fwidth
G4double foffset
G4bool G4PVDivision::IsMany ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 259 of file G4PVDivision.cc.

260 {
261  return false;
262 }
G4bool G4PVDivision::IsParameterised ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 253 of file G4PVDivision.cc.

254 {
255  return true;
256 }
G4bool G4PVDivision::IsRegularStructure ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 528 of file G4PVDivision.cc.

529 {
530  return false;
531 }
G4bool G4PVDivision::IsReplicated ( ) const
virtual

Implements G4VPhysicalVolume.

Definition at line 277 of file G4PVDivision.cc.

278 {
279  return true;
280 }
void G4PVDivision::SetCopyNo ( G4int  CopyNo)
virtual

Implements G4VPhysicalVolume.

Definition at line 271 of file G4PVDivision.cc.

References fcopyNo.

272 {
273  fcopyNo= newCopyNo;
274 }

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: