Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NavigationLevelRep.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// G4NavigationLevelRep
27//
28// Class description:
29//
30// A data representation class, used to hold the data for a single level
31// of the Navigation history tree.
32//
33// This is the body of a handle/body pair of classes, that implement
34// reference counting for NavigationLevels.
35// The corresponding handle class is G4NavigationLevel
36
37// Author: John Apostolakis (CERN), 01.10.1997- Initial version
38// ----------------------------------------------------------------------
39#ifndef G4NAVIGATIONLEVELREP_HH
40#define G4NAVIGATIONLEVELREP_HH
41
42#include "G4Types.hh"
43
44#include "G4AffineTransform.hh"
45#include "G4VPhysicalVolume.hh"
46#include "G4Allocator.hh"
47
48#include "geomwdefs.hh"
49
50/**
51 * @brief G4NavigationLevelRep is a data representation class, used to hold
52 * the data for a single level of the nvigation history tree.
53 * This is the body of a handle/body pair of classes, that implement reference
54 * counting for navigation levels. The corresponding handle class is
55 * G4NavigationLevel.
56 */
57
59{
60 public:
61
62 /**
63 * Constructor for G4NavigationLevelRep.
64 * @param[in] newPtrPhysVol Pointer to the new physical volume.
65 * @param[in] newT The associated affine transformation.
66 * @param[in] newVolTp The volume type.
67 * @param[in] newRepNo The replica number.
68 */
70 const G4AffineTransform& newT,
71 EVolume newVolTp,
72 G4int newRepNo = -1 );
73
74 /**
75 * Alternative Constructor for G4NavigationLevelRep, as the previous
76 * constructor, but instead of giving the new transformation, give
77 * the affine transformation to the level above and the current level's
78 * transformation relative to that.
79 * @param[in] newPtrPhysVol Pointer to the new physical volume.
80 * @param[in] levelAbove The affine transformation to the level above.
81 * @param[in] relativeCurrent The affine transformation at current level.
82 * @param[in] newVolTp The volume type.
83 * @param[in] newRepNo The replica number.
84 */
86 const G4AffineTransform& levelAbove,
87 const G4AffineTransform& relativeCurrent,
88 EVolume newVolTp,
89 G4int newRepNo = -1 );
90
91 /**
92 * Default Constructor & Destructor.
93 */
96
97 /**
98 * Copy constructor and assignment operator.
99 */
102
103 /**
104 * Returns a pointer to the physical volume at the current level.
105 */
107
108 /**
109 * Methods to return the associated affine transformation.
110 */
111 inline const G4AffineTransform* GetTransformPtr() const ; // New
112 inline const G4AffineTransform& GetTransform() const ; // Old
113
114 /**
115 * Returns the volume type.
116 */
117 inline EVolume GetVolumeType() const ;
118
119 /**
120 * Returns the replica number.
121 */
122 inline G4int GetReplicaNo() const ;
123
124
125 /**
126 * Methods taking care of the reference counts.
127 */
128 inline void AddAReference();
130
131 /**
132 * New/delete operator overrides for use by "G4Allocator".
133 */
134 inline void* operator new(size_t);
135 inline void operator delete(void* aTrack);
136
137 private:
138
139 /** Compounded global->local transformation; takes a point in the
140 global reference system to the system of the volume at this level. */
141 G4AffineTransform sTransform;
142
143 /** Physical volume pointer, for this level's volume. */
144 G4VPhysicalVolume* sPhysicalVolumePtr = nullptr;
145
146 /** Replica number. */
147 G4int sReplicaNo = -1;
148
149 /** Volume type. */
150 EVolume sVolumeType;
151
152 /** Reference counter. */
153 G4int fCountRef = 1;
154};
155
156#include "G4NavigationLevelRep.icc"
157
158#endif
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
G4AffineTransform is a class for geometric affine transformations. It supports efficient arbitrary ro...
G4NavigationLevelRep & operator=(const G4NavigationLevelRep &)
G4NavigationLevelRep(G4NavigationLevelRep &)
EVolume GetVolumeType() const
G4NavigationLevelRep(G4VPhysicalVolume *newPtrPhysVol, const G4AffineTransform &levelAbove, const G4AffineTransform &relativeCurrent, EVolume newVolTp, G4int newRepNo=-1)
G4VPhysicalVolume * GetPhysicalVolume()
const G4AffineTransform & GetTransform() const
const G4AffineTransform * GetTransformPtr() const
G4NavigationLevelRep(G4VPhysicalVolume *newPtrPhysVol, const G4AffineTransform &newT, EVolume newVolTp, G4int newRepNo=-1)
G4int GetReplicaNo() const
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
EVolume
Definition geomdefs.hh:83