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

#include <G4PVDivisionFactory.hh>

+ Inheritance diagram for G4PVDivisionFactory:

Public Member Functions

virtual ~G4PVDivisionFactory ()
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, const G4double offset)
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4double width, const G4double offset)
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const G4VPVParameterisation *param)
 
virtual G4bool IsPVDivision (const G4VPhysicalVolume *pv) const
 
- Public Member Functions inherited from G4VPVDivisionFactory
virtual ~G4VPVDivisionFactory ()
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)=0
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, const G4double offset)=0
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4double width, const G4double offset)=0
 
virtual G4VPhysicalVolumeCreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const G4VPVParameterisation *param)=0
 
virtual G4bool IsPVDivision (const G4VPhysicalVolume *pv) const =0
 

Static Public Member Functions

static G4PVDivisionFactoryGetInstance ()
 
- Static Public Member Functions inherited from G4VPVDivisionFactory
static G4VPVDivisionFactoryInstance ()
 

Protected Member Functions

 G4PVDivisionFactory ()
 
- Protected Member Functions inherited from G4VPVDivisionFactory
 G4VPVDivisionFactory ()
 

Additional Inherited Members

- Static Protected Attributes inherited from G4VPVDivisionFactory
static G4VPVDivisionFactoryfgInstance = 0
 

Detailed Description

Definition at line 47 of file G4PVDivisionFactory.hh.

Constructor & Destructor Documentation

◆ ~G4PVDivisionFactory()

G4PVDivisionFactory::~G4PVDivisionFactory ( )
virtual

Definition at line 49 of file G4PVDivisionFactory.cc.

50{
51}

◆ G4PVDivisionFactory()

G4PVDivisionFactory::G4PVDivisionFactory ( )
protected

Definition at line 40 of file G4PVDivisionFactory.cc.

42{
43 // Protected singleton constructor.
44 // ---
45}

Member Function Documentation

◆ CreatePVDivision() [1/4]

G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMother,
const EAxis  pAxis,
const G4int  nReplicas,
const G4double  width,
const G4double  offset 
)
virtual

Implements G4VPVDivisionFactory.

Definition at line 68 of file G4PVDivisionFactory.cc.

75{
76 // Create division - with number of divisions and width
77 // ---
78
79 return new G4PVDivision(pName, pLogical, pMotherLogical,
80 pAxis, nReplicas, width, offset);
81}

◆ CreatePVDivision() [2/4]

G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const EAxis  pAxis,
const G4double  width,
const G4double  offset 
)
virtual

Implements G4VPVDivisionFactory.

Definition at line 103 of file G4PVDivisionFactory.cc.

109{
110 // Create division - with width
111 // ---
112
113 return new G4PVDivision(pName, pLogical, pMotherLogical,
114 pAxis, width, offset);
115}

◆ CreatePVDivision() [3/4]

G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const EAxis  pAxis,
const G4int  nReplicas,
const G4double  offset 
)
virtual

Implements G4VPVDivisionFactory.

Definition at line 86 of file G4PVDivisionFactory.cc.

92{
93 // Create division - with number of divisions
94 // ---
95
96 return new G4PVDivision(pName, pLogical, pMotherLogical,
97 pAxis, nReplicas, offset);
98}

◆ CreatePVDivision() [4/4]

G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const G4VPVParameterisation param 
)
virtual

Implements G4VPVDivisionFactory.

Definition at line 120 of file G4PVDivisionFactory.cc.

124{
125 // Create division - with parameterisation
126 // ---
127
128 // Get parameterisation data
129 //
130 const G4VDivisionParameterisation* divParam
131 = dynamic_cast<const G4VDivisionParameterisation*>(param);
132
133 if (!divParam)
134 {
135 G4Exception("G4PVDivisionFactory::CreatePVDivision()",
136 "GeomDiv0001", FatalException,
137 "Unexpected parameterisation type!");
138 return 0;
139 }
140 else
141 {
142 EAxis axis = divParam->GetAxis();
143 G4int nofDivisions = divParam->GetNoDiv();
144 G4double width = divParam->GetWidth();
145 G4double offset = divParam->GetOffset();
146
147 return new G4PVDivision(pName, pLogical, pMotherLogical,
148 axis, nofDivisions, width, offset);
149 }
150}
@ FatalException
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4double GetOffset() const
G4double GetWidth() const
EAxis
Definition: geomdefs.hh:54
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetInstance()

G4PVDivisionFactory * G4PVDivisionFactory::GetInstance ( )
static

Definition at line 55 of file G4PVDivisionFactory.cc.

56{
57 static G4PVDivisionFactory theFactory;
58 if (!fgInstance)
59 {
60 fgInstance = &theFactory;
61 }
62 return &theFactory;
63}
static G4VPVDivisionFactory * fgInstance

Referenced by G4GDMLReadStructure::DivisionvolRead().

◆ IsPVDivision()

G4bool G4PVDivisionFactory::IsPVDivision ( const G4VPhysicalVolume pv) const
virtual

Implements G4VPVDivisionFactory.

Definition at line 154 of file G4PVDivisionFactory.cc.

155{
156 // Returns true if pv is division
157 // ---
158
159 if (dynamic_cast<const G4PVDivision*>(pv))
160 return true;
161 else
162 return false;
163}

The documentation for this class was generated from the following files: