source: trunk/source/geometry/volumes/include/G4AssemblyTriplet.hh@ 1026

Last change on this file since 1026 was 850, checked in by garnier, 17 years ago

geant4.8.2 beta

File size: 5.0 KB
Line 
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//
27// $Id: G4AssemblyTriplet.hh,v 1.3 2007/11/16 16:20:25 gcosmo Exp $
28// GEANT4 tag $Name: HEAD $
29//
30//
31// Class G4AssemblyTriplet
32//
33// Class description:
34//
35// A class to help place logical or assembly volumes inside a generic
36// containers (like STL vector ) together with information about its rotation,
37// placement and eventually reflection.
38// How to interpret the rotation and translation depends on the class which
39// uses a container of these triplets. The first class using G4AssemblyTriplet
40// is G4AssemblyVolume class.
41// The pointer to the logical or assembly volume is copied so this class
42// does not take its ownership and does not delete the object behind.
43
44// Author: Radovan Chytracek
45// Version: 1.0
46// Date: November 2000
47//
48// History:
49// March 2006, I.Hrivnacova - Extended to support assembly of assemblies
50// of volumes and reflections
51// ----------------------------------------------------------------------
52#ifndef G4_ASSEMBLYTRIPLET_H
53#define G4_ASSEMBLYTRIPLET_H
54
55#include "G4ThreeVector.hh"
56#include "G4RotationMatrix.hh"
57
58class G4LogicalVolume;
59class G4AssemblyVolume;
60
61class G4AssemblyTriplet
62{
63 public: // with description
64
65 G4AssemblyTriplet();
66 // Default constructor
67
68 G4AssemblyTriplet( G4LogicalVolume* pVolume,
69 G4ThreeVector& translation,
70 G4RotationMatrix* pRotation,
71 G4bool isReflection = false);
72 // An explicit constructor for a logical volume
73
74 G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
75 G4ThreeVector& translation,
76 G4RotationMatrix* pRotation,
77 G4bool isReflection = false);
78 // An explicit constructor for an assembly volume
79
80 G4AssemblyTriplet( const G4AssemblyTriplet& second );
81 // Copy constructor
82
83 ~G4AssemblyTriplet();
84 // Destructor
85
86 G4AssemblyTriplet& operator=( const G4AssemblyTriplet& second );
87 // Assignment operator
88
89 inline G4LogicalVolume* GetVolume() const;
90 // Retrieve the logical volume reference
91
92 inline void SetVolume( G4LogicalVolume* pVolume );
93 // Update the logical volume reference
94
95 inline G4AssemblyVolume* GetAssembly() const;
96 // Retrieve the assembly volume reference
97
98 inline void SetAssembly( G4AssemblyVolume* pAssembly );
99 // Update the assembly volume reference
100
101 inline G4ThreeVector GetTranslation() const;
102 // Retrieve the logical volume translation
103
104 inline void SetTranslation( G4ThreeVector& pVolume );
105 // Update the logical volume translation
106
107 inline G4RotationMatrix* GetRotation() const;
108 // Retrieve the logical volume rotation
109
110 inline void SetRotation( G4RotationMatrix* pVolume );
111 // Update the logical volume rotation
112
113 inline G4bool IsReflection() const;
114 // Return true if the logical or assembly volume has reflection
115
116 private:
117
118 G4LogicalVolume* fVolume;
119 // A logical volume
120
121 G4ThreeVector fTranslation;
122 // A logical volume translation
123
124 G4RotationMatrix* fRotation;
125 // A logical volume rotation
126
127 private:
128
129 // Member data for handling assemblies of assemblies and reflections
130
131 G4AssemblyVolume* fAssembly;
132 // An assembly volume
133
134 G4bool fIsReflection;
135 // True if the logical or assembly volume has reflection
136};
137
138#include "G4AssemblyTriplet.icc"
139
140#endif // G4_ASSEMBLYTRIPLET_H
Note: See TracBrowser for help on using the repository browser.