Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PVDivisionFactory Class Reference

#include <G4PVDivisionFactory.hh>

Inheritance diagram for G4PVDivisionFactory:
Collaboration 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 ()
 

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 G4ThreadLocal
G4VPVDivisionFactory
fgInstance = 0
 

Detailed Description

Definition at line 47 of file G4PVDivisionFactory.hh.

Constructor & Destructor Documentation

G4PVDivisionFactory::~G4PVDivisionFactory ( )
virtual

Definition at line 49 of file G4PVDivisionFactory.cc.

50 {
51 }
G4PVDivisionFactory::G4PVDivisionFactory ( )
protected

Definition at line 40 of file G4PVDivisionFactory.cc.

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

Here is the caller graph for this function:

Member Function Documentation

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

74 {
75  // Create division - with number of divisions and width
76  // ---
77 
78  return new G4PVDivision(pName, pLogical, pMotherLogical,
79  pAxis, nReplicas, width, offset);
80 }
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 85 of file G4PVDivisionFactory.cc.

91 {
92  // Create division - with number of divisions
93  // ---
94 
95  return new G4PVDivision(pName, pLogical, pMotherLogical,
96  pAxis, nReplicas, offset);
97 }
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 102 of file G4PVDivisionFactory.cc.

108 {
109  // Create division - with width
110  // ---
111 
112  return new G4PVDivision(pName, pLogical, pMotherLogical,
113  pAxis, width, offset);
114 }
G4VPhysicalVolume * G4PVDivisionFactory::CreatePVDivision ( const G4String pName,
G4LogicalVolume pLogical,
G4LogicalVolume pMotherLogical,
const G4VPVParameterisation param 
)
virtual

Implements G4VPVDivisionFactory.

Definition at line 119 of file G4PVDivisionFactory.cc.

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

Here is the call graph for this function:

G4PVDivisionFactory * G4PVDivisionFactory::GetInstance ( )
static

Definition at line 55 of file G4PVDivisionFactory.cc.

56 {
57  if (!fgInstance)
58  {
60  }
61  return dynamic_cast<G4PVDivisionFactory*>(fgInstance);
62 }
static G4ThreadLocal G4VPVDivisionFactory * fgInstance

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements G4VPVDivisionFactory.

Definition at line 153 of file G4PVDivisionFactory.cc.

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

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