Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4AssemblyTriplet.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// Class G4AssemblyTriplet
27//
28// Class description:
29//
30// A class to help place logical or assembly volumes inside a generic
31// containers (like STL vector ) together with information about its rotation,
32// placement and eventually reflection.
33// How to interpret the rotation and translation depends on the class which
34// uses a container of these triplets. The first class using G4AssemblyTriplet
35// is G4AssemblyVolume class.
36// The pointer to the logical or assembly volume is copied so this class
37// does not take its ownership and does not delete the object behind.
38
39// Radovan Chytracek: created - November 2000
40// Ivana Hrivnacova: extended to support assembly of assemblies
41// of volumes and reflections, March 2006
42// ----------------------------------------------------------------------
43#ifndef G4_ASSEMBLYTRIPLET_H
44#define G4_ASSEMBLYTRIPLET_H
45
46#include "G4ThreeVector.hh"
47#include "G4RotationMatrix.hh"
48
49class G4LogicalVolume;
51
53{
54 public: // with description
55
57 // Default constructor
58
60 G4ThreeVector& translation,
61 G4RotationMatrix* pRotation,
62 G4bool isReflection = false );
63 // An explicit constructor for a logical volume
64
66 G4ThreeVector& translation,
67 G4RotationMatrix* pRotation,
68 G4bool isReflection = false );
69 // An explicit constructor for an assembly volume
70
72 // Copy constructor
73
75 // Destructor
76
78 // Assignment operator
79
80 inline G4LogicalVolume* GetVolume() const;
81 // Retrieve the logical volume reference
82
83 inline void SetVolume( G4LogicalVolume* pVolume );
84 // Update the logical volume reference
85
87 // Retrieve the assembly volume reference
88
89 inline void SetAssembly( G4AssemblyVolume* pAssembly );
90 // Update the assembly volume reference
91
93 // Retrieve the logical volume translation
94
95 inline void SetTranslation( G4ThreeVector& pVolume );
96 // Update the logical volume translation
97
99 // Retrieve the logical volume rotation
100
101 inline void SetRotation( G4RotationMatrix* pVolume );
102 // Update the logical volume rotation
103
104 inline G4bool IsReflection() const;
105 // Return true if the logical or assembly volume has reflection
106
107 private:
108
109 G4LogicalVolume* fVolume = nullptr;
110 // A logical volume
111
112 G4ThreeVector fTranslation;
113 // A logical volume translation
114
115 G4RotationMatrix* fRotation = nullptr;
116 // A logical volume rotation
117
118 private:
119
120 // Member data for handling assemblies of assemblies and reflections
121
122 G4AssemblyVolume* fAssembly = nullptr;
123 // An assembly volume
124
125 G4bool fIsReflection = false;
126 // True if the logical or assembly volume has reflection
127};
128
129#include "G4AssemblyTriplet.icc"
130
131#endif // G4_ASSEMBLYTRIPLET_H
bool G4bool
Definition: G4Types.hh:86
void SetTranslation(G4ThreeVector &pVolume)
G4AssemblyTriplet(const G4AssemblyTriplet &second)
void SetVolume(G4LogicalVolume *pVolume)
G4AssemblyTriplet(G4AssemblyVolume *pAssembly, G4ThreeVector &translation, G4RotationMatrix *pRotation, G4bool isReflection=false)
G4LogicalVolume * GetVolume() const
G4AssemblyVolume * GetAssembly() const
void SetRotation(G4RotationMatrix *pVolume)
G4AssemblyTriplet & operator=(const G4AssemblyTriplet &second)
G4bool IsReflection() const
G4ThreeVector GetTranslation() const
G4AssemblyTriplet(G4LogicalVolume *pVolume, G4ThreeVector &translation, G4RotationMatrix *pRotation, G4bool isReflection=false)
G4RotationMatrix * GetRotation() const
void SetAssembly(G4AssemblyVolume *pAssembly)