Geant4 11.3.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

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

Static Public Member Functions

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

Protected Member Functions

 G4PVDivisionFactory ()=default
 
- 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 ( )
overridedefault

◆ G4PVDivisionFactory()

G4PVDivisionFactory::G4PVDivisionFactory ( )
protecteddefault

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 )
overridevirtual

Implements G4VPVDivisionFactory.

Definition at line 49 of file G4PVDivisionFactory.cc.

56{
57 // Create division - with number of divisions and width
58 // ---
59
60 return new G4PVDivision(pName, pLogical, pMotherLogical,
61 pAxis, nReplicas, width, offset);
62}
G4ThreadLocal T * G4GeomSplitter< T >::offset

◆ CreatePVDivision() [2/4]

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

Implements G4VPVDivisionFactory.

Definition at line 84 of file G4PVDivisionFactory.cc.

90{
91 // Create division - with width
92 // ---
93
94 return new G4PVDivision(pName, pLogical, pMotherLogical,
95 pAxis, width, offset);
96}

◆ CreatePVDivision() [3/4]

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

Implements G4VPVDivisionFactory.

Definition at line 67 of file G4PVDivisionFactory.cc.

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

◆ CreatePVDivision() [4/4]

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

Implements G4VPVDivisionFactory.

Definition at line 101 of file G4PVDivisionFactory.cc.

105{
106 // Create division - with parameterisation
107 // ---
108
109 // Get parameterisation data
110 //
111 const auto divParam = dynamic_cast<const G4VDivisionParameterisation*>(param);
112
113 if (divParam == nullptr)
114 {
115 G4Exception("G4PVDivisionFactory::CreatePVDivision()",
116 "GeomDiv0001", FatalException,
117 "Unexpected parameterisation type!");
118 return nullptr;
119 }
120 else
121 {
122 EAxis axis = divParam->GetAxis();
123 G4int nofDivisions = divParam->GetNoDiv();
124 G4double width = divParam->GetWidth();
125 G4double offset = divParam->GetOffset();
126
127 return new G4PVDivision(pName, pLogical, pMotherLogical,
128 axis, nofDivisions, width, offset);
129 }
130}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
EAxis
Definition geomdefs.hh:54

◆ GetInstance()

G4PVDivisionFactory * G4PVDivisionFactory::GetInstance ( )
static

Definition at line 37 of file G4PVDivisionFactory.cc.

38{
39 if (fgInstance == nullptr)
40 {
42 }
43 return dynamic_cast<G4PVDivisionFactory*>(fgInstance);
44}
G4PVDivisionFactory()=default
static G4ThreadLocal G4VPVDivisionFactory * fgInstance

Referenced by G4GDMLReadStructure::DivisionvolRead().

◆ IsPVDivision()

G4bool G4PVDivisionFactory::IsPVDivision ( const G4VPhysicalVolume * pv) const
overridevirtual

Implements G4VPVDivisionFactory.

Definition at line 134 of file G4PVDivisionFactory.cc.

135{
136 // Returns true if pv is division
137 // ---
138
139 return dynamic_cast<const G4PVDivision*>(pv) != nullptr;
140}

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