#include <G4PVDivisionFactory.hh>
Inheritance diagram for G4PVDivisionFactory:
Public Member Functions | |
virtual | ~G4PVDivisionFactory () |
virtual G4VPhysicalVolume * | CreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset) |
virtual G4VPhysicalVolume * | CreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4int nReplicas, const G4double offset) |
virtual G4VPhysicalVolume * | CreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const EAxis pAxis, const G4double width, const G4double offset) |
virtual G4VPhysicalVolume * | CreatePVDivision (const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMotherLogical, const G4VPVParameterisation *param) |
virtual G4bool | IsPVDivision (const G4VPhysicalVolume *pv) const |
Static Public Member Functions | |
static G4PVDivisionFactory * | GetInstance () |
Protected Member Functions | |
G4PVDivisionFactory () |
Definition at line 47 of file G4PVDivisionFactory.hh.
G4PVDivisionFactory::~G4PVDivisionFactory | ( | ) | [virtual] |
G4PVDivisionFactory::G4PVDivisionFactory | ( | ) | [protected] |
Definition at line 40 of file G4PVDivisionFactory.cc.
00041 : G4VPVDivisionFactory() 00042 { 00043 // Protected singleton constructor. 00044 // --- 00045 }
G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision | ( | const G4String & | pName, | |
G4LogicalVolume * | pLogical, | |||
G4LogicalVolume * | pMotherLogical, | |||
const G4VPVParameterisation * | param | |||
) | [virtual] |
Implements G4VPVDivisionFactory.
Definition at line 120 of file G4PVDivisionFactory.cc.
References FatalException, G4Exception(), G4VDivisionParameterisation::GetAxis(), G4VDivisionParameterisation::GetNoDiv(), G4VDivisionParameterisation::GetOffset(), and G4VDivisionParameterisation::GetWidth().
00124 { 00125 // Create division - with parameterisation 00126 // --- 00127 00128 // Get parameterisation data 00129 // 00130 const G4VDivisionParameterisation* divParam 00131 = dynamic_cast<const G4VDivisionParameterisation*>(param); 00132 00133 if (!divParam) 00134 { 00135 G4Exception("G4PVDivisionFactory::CreatePVDivision()", 00136 "GeomDiv0001", FatalException, 00137 "Unexpected parameterisation type!"); 00138 return 0; 00139 } 00140 else 00141 { 00142 EAxis axis = divParam->GetAxis(); 00143 G4int nofDivisions = divParam->GetNoDiv(); 00144 G4double width = divParam->GetWidth(); 00145 G4double offset = divParam->GetOffset(); 00146 00147 return new G4PVDivision(pName, pLogical, pMotherLogical, 00148 axis, nofDivisions, width, offset); 00149 } 00150 }
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.
00109 { 00110 // Create division - with width 00111 // --- 00112 00113 return new G4PVDivision(pName, pLogical, pMotherLogical, 00114 pAxis, width, offset); 00115 }
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.
00092 { 00093 // Create division - with number of divisions 00094 // --- 00095 00096 return new G4PVDivision(pName, pLogical, pMotherLogical, 00097 pAxis, nReplicas, offset); 00098 }
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.
00075 { 00076 // Create division - with number of divisions and width 00077 // --- 00078 00079 return new G4PVDivision(pName, pLogical, pMotherLogical, 00080 pAxis, nReplicas, width, offset); 00081 }
G4PVDivisionFactory * G4PVDivisionFactory::GetInstance | ( | ) | [static] |
Definition at line 55 of file G4PVDivisionFactory.cc.
References G4VPVDivisionFactory::fgInstance.
Referenced by G4GDMLReadStructure::DivisionvolRead().
00056 { 00057 static G4PVDivisionFactory * theFactory = new G4PVDivisionFactory; 00058 if (!fgInstance) 00059 { 00060 fgInstance = theFactory; 00061 } 00062 return theFactory; 00063 }
G4bool G4PVDivisionFactory::IsPVDivision | ( | const G4VPhysicalVolume * | pv | ) | const [virtual] |
Implements G4VPVDivisionFactory.
Definition at line 154 of file G4PVDivisionFactory.cc.
00155 { 00156 // Returns true if pv is division 00157 // --- 00158 00159 if (dynamic_cast<const G4PVDivision*>(pv)) 00160 return true; 00161 else 00162 return false; 00163 }