Geant4 11.1.1
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 ()=default
 
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 ()=default
 

Additional Inherited Members

- Static Protected Attributes inherited from G4VPVDivisionFactory
static G4ThreadLocal G4VPVDivisionFactoryfgInstance = nullptr
 

Detailed Description

Definition at line 43 of file G4PVDivisionFactory.hh.

Constructor & Destructor Documentation

◆ ~G4PVDivisionFactory()

G4PVDivisionFactory::~G4PVDivisionFactory ( )
virtual

Definition at line 46 of file G4PVDivisionFactory.cc.

47{
48}

◆ G4PVDivisionFactory()

G4PVDivisionFactory::G4PVDivisionFactory ( )
protected

Definition at line 37 of file G4PVDivisionFactory.cc.

39{
40 // Protected singleton constructor.
41 // ---
42}
G4VPVDivisionFactory()=default

Referenced by GetInstance().

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 64 of file G4PVDivisionFactory.cc.

71{
72 // Create division - with number of divisions and width
73 // ---
74
75 return new G4PVDivision(pName, pLogical, pMotherLogical,
76 pAxis, nReplicas, width, offset);
77}

◆ 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 99 of file G4PVDivisionFactory.cc.

105{
106 // Create division - with width
107 // ---
108
109 return new G4PVDivision(pName, pLogical, pMotherLogical,
110 pAxis, width, offset);
111}

◆ 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 82 of file G4PVDivisionFactory.cc.

88{
89 // Create division - with number of divisions
90 // ---
91
92 return new G4PVDivision(pName, pLogical, pMotherLogical,
93 pAxis, nReplicas, offset);
94}

◆ CreatePVDivision() [4/4]

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

Implements G4VPVDivisionFactory.

Definition at line 116 of file G4PVDivisionFactory.cc.

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

◆ GetInstance()

G4PVDivisionFactory * G4PVDivisionFactory::GetInstance ( )
static

Definition at line 52 of file G4PVDivisionFactory.cc.

53{
54 if (fgInstance == nullptr)
55 {
57 }
58 return dynamic_cast<G4PVDivisionFactory*>(fgInstance);
59}
static G4ThreadLocal G4VPVDivisionFactory * fgInstance

Referenced by G4GDMLReadStructure::DivisionvolRead().

◆ IsPVDivision()

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

Implements G4VPVDivisionFactory.

Definition at line 150 of file G4PVDivisionFactory.cc.

151{
152 // Returns true if pv is division
153 // ---
154
155 return (dynamic_cast<const G4PVDivision*>(pv) != nullptr) ? true : false;
156}

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