2 // ********************************************************************
3 // * License and Disclaimer *
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. *
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. *
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 // ********************************************************************
27 // $Id: G4AssemblyTriplet.icc 66356 2012-12-18 09:02:32Z gcosmo $
30 // Class G4AssemblyTriplet - inline implementation
32 // ----------------------------------------------------------------------
35 G4AssemblyTriplet::G4AssemblyTriplet()
36 : fVolume( 0 ), fRotation( 0 ), fAssembly(0), fIsReflection(false)
38 G4ThreeVector v(0.,0.,0.);
43 G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
44 G4ThreeVector& translation,
45 G4RotationMatrix* pRotation,
47 : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
48 fAssembly( 0 ), fIsReflection(isReflection)
53 G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
54 G4ThreeVector& translation,
55 G4RotationMatrix* pRotation,
57 : fVolume( 0 ), fTranslation( translation ), fRotation( pRotation ),
58 fAssembly( pAssembly ), fIsReflection(isReflection)
63 G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
65 fVolume = scopy.GetVolume();
66 fRotation = scopy.GetRotation();
67 fTranslation = scopy.GetTranslation();
68 fAssembly = scopy.GetAssembly();
69 fIsReflection = scopy.IsReflection();
73 G4AssemblyTriplet::~G4AssemblyTriplet()
78 G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
84 void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
88 G4Exception("G4AssemblyTriplet::SetVolume()",
89 "GeomVol1001", JustWarning,
90 "There is an assembly already set, it will be ignored.");
97 G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
103 void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
107 G4Exception("G4AssemblyTriplet::SetAssembly()",
108 "GeomVol1001", JustWarning,
109 "There is a volume already set, it will be ignored.");
111 fAssembly = pAssembly;
116 G4ThreeVector G4AssemblyTriplet::GetTranslation() const
122 void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
124 fTranslation = translation;
128 G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
134 void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
136 fRotation = pRotation;
140 G4bool G4AssemblyTriplet::IsReflection() const
142 return fIsReflection;
147 G4AssemblyTriplet::operator=( const G4AssemblyTriplet& scopy )
151 fVolume = scopy.GetVolume();
152 fRotation = scopy.GetRotation();
153 fTranslation = scopy.GetTranslation();
154 fAssembly = scopy.GetAssembly();
155 fIsReflection = scopy.IsReflection();