Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VPVDivisionFactory.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4VPVDivisionFactory
27//
28// Class description:
29//
30// Abstract factory that defines interfaces for creating volume divisions.
31
32// Author: Ivana Hrivnacova (IJCLab, Orsay), 04.05.2004
33// ------------------------------------------------------------------------
34#ifndef G4VPVDIVISIONFACTORY_HH
35#define G4VPVDIVISIONFACTORY_HH
36
37#include "geomdefs.hh"
38
39class G4LogicalVolume;
42
43/**
44 * @brief G4VPVDivisionFactory is an abstract factory that defines the
45 * interfaces for creating volume divisions.
46 */
47
49{
50 public:
51
52 /**
53 * Default Destructor.
54 */
55 virtual ~G4VPVDivisionFactory() = default;
56
57 /**
58 * Returns a pointer to the unique instance of the factory.
59 */
61
62 /**
63 * Creates a division, using number of divisions and width.
64 * @param[in] pName The volume name.
65 * @param[in] pLogical Pointer to the logical volume of the division.
66 * @param[in] pMother Pointer to the logical volume of the mother.
67 * @param[in] pAxis The axis along which do the division.
68 * @param[in] nReplicas The number of copies to replicate.
69 * @param[in] width The witdh of the divided slice along the axis.
70 * @param[in] offset The optional offset distance from mother's border.
71 * @returns The pointer to physical divided volume.
72 */
74 const G4String& pName,
75 G4LogicalVolume* pLogical,
76 G4LogicalVolume* pMother,
77 const EAxis pAxis,
78 const G4int nReplicas,
79 const G4double width,
80 const G4double offset ) = 0;
81
82 /**
83 * Creates a division, using the number of divisions.
84 * @param[in] pName The volume name.
85 * @param[in] pLogical Pointer to the logical volume of the division.
86 * @param[in] pMother Pointer to the logical volume of the mother.
87 * @param[in] pAxis The axis along which do the division.
88 * @param[in] nReplicas The number of copies to replicate.
89 * @param[in] offset The optional offset distance from mother's border.
90 * @returns The pointer to physical divided volume.
91 */
93 const G4String& pName,
94 G4LogicalVolume* pLogical,
95 G4LogicalVolume* pMother,
96 const EAxis pAxis,
97 const G4int nReplicas,
98 const G4double offset ) = 0;
99
100 /**
101 * Creates a division, using the width of the division slice.
102 * @param[in] pName The volume name.
103 * @param[in] pLogical Pointer to the logical volume of the division.
104 * @param[in] pMother Pointer to the logical volume of the mother.
105 * @param[in] pAxis The axis along which do the division.
106 * @param[in] width The witdh of the divided slice along the axis.
107 * @param[in] offset The optional offset distance from mother's border.
108 * @returns The pointer to physical divided volume.
109 */
111 const G4String& pName,
112 G4LogicalVolume* pLogical,
113 G4LogicalVolume* pMother,
114 const EAxis pAxis,
115 const G4double width,
116 const G4double offset ) = 0;
117
118 /**
119 * Creates a division, using a parameterisation algorithm.
120 * @param[in] pName The volume name.
121 * @param[in] pLogical Pointer to the logical volume of the division.
122 * @param[in] pMother Pointer to the logical volume of the mother.
123 * @param[in] param The pointer to the parameterisation algorithm.
124 * @returns The pointer to physical divided volume.
125 */
127 const G4String& pName,
128 G4LogicalVolume* pLogical,
129 G4LogicalVolume* pMother,
130 const G4VPVParameterisation* param) = 0;
131
132 /**
133 * Returns true if 'pv' is a pointer to a division.
134 */
135 virtual G4bool IsPVDivision(const G4VPhysicalVolume* pv) const = 0;
136
137 protected:
138
139 /**
140 * Protected default Constructor.
141 */
143
144 protected:
145
146 /** The static pointer of the singleton instance. */
148};
149
150#endif
G4ThreadLocal T * G4GeomSplitter< T >::offset
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4LogicalVolume represents a leaf node or unpositioned subtree in the geometry hierarchy....
static G4VPVDivisionFactory * Instance()
static G4ThreadLocal G4VPVDivisionFactory * fgInstance
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)=0
virtual G4bool IsPVDivision(const G4VPhysicalVolume *pv) const =0
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const G4VPVParameterisation *param)=0
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4double width, const G4double offset)=0
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double offset)=0
virtual ~G4VPVDivisionFactory()=default
G4VPVDivisionFactory()=default
G4VPVParameterisation ia an abstract base class for Parameterisation, able to compute the transformat...
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
EAxis
Definition geomdefs.hh:54
#define G4ThreadLocal
Definition tls.hh:77