File indexing completed on 2025-01-18 09:57:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 inline
0031 G4AssemblyTriplet::G4AssemblyTriplet()
0032 {
0033 G4ThreeVector v(0.,0.,0.);
0034 fTranslation = v;
0035 }
0036
0037 inline
0038 G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
0039 G4ThreeVector& translation,
0040 G4RotationMatrix* pRotation,
0041 G4bool isReflection )
0042 : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
0043 fIsReflection(isReflection)
0044 {
0045 }
0046
0047 inline
0048 G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
0049 G4ThreeVector& translation,
0050 G4RotationMatrix* pRotation,
0051 G4bool isReflection )
0052 : fTranslation( translation ), fRotation( pRotation ),
0053 fAssembly( pAssembly ), fIsReflection(isReflection)
0054 {
0055 }
0056
0057 inline
0058 G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& scopy )
0059 {
0060 fVolume = scopy.GetVolume();
0061 fRotation = scopy.GetRotation();
0062 fTranslation = scopy.GetTranslation();
0063 fAssembly = scopy.GetAssembly();
0064 fIsReflection = scopy.IsReflection();
0065 }
0066
0067 inline
0068 G4AssemblyTriplet::~G4AssemblyTriplet() = default;
0069
0070 inline
0071 G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
0072 {
0073 return fVolume;
0074 }
0075
0076 inline
0077 void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
0078 {
0079 if ( fAssembly != nullptr )
0080 {
0081 G4Exception("G4AssemblyTriplet::SetVolume()",
0082 "GeomVol1001", JustWarning,
0083 "There is an assembly already set, it will be ignored.");
0084 }
0085 fVolume = pVolume;
0086 fAssembly = nullptr;
0087 }
0088
0089 inline
0090 G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
0091 {
0092 return fAssembly;
0093 }
0094
0095 inline
0096 void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
0097 {
0098 if ( fVolume != nullptr )
0099 {
0100 G4Exception("G4AssemblyTriplet::SetAssembly()",
0101 "GeomVol1001", JustWarning,
0102 "There is a volume already set, it will be ignored.");
0103 }
0104 fAssembly = pAssembly;
0105 fVolume = nullptr;
0106 }
0107
0108 inline
0109 G4ThreeVector G4AssemblyTriplet::GetTranslation() const
0110 {
0111 return fTranslation;
0112 }
0113
0114 inline
0115 void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
0116 {
0117 fTranslation = translation;
0118 }
0119
0120 inline
0121 G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
0122 {
0123 return fRotation;
0124 }
0125
0126 inline
0127 void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
0128 {
0129 fRotation = pRotation;
0130 }
0131
0132 inline
0133 G4bool G4AssemblyTriplet::IsReflection() const
0134 {
0135 return fIsReflection;
0136 }
0137
0138 inline
0139 G4AssemblyTriplet&
0140 G4AssemblyTriplet::operator=( const G4AssemblyTriplet& scopy )
0141 {
0142 if( this != &scopy )
0143 {
0144 fVolume = scopy.GetVolume();
0145 fRotation = scopy.GetRotation();
0146 fTranslation = scopy.GetTranslation();
0147 fAssembly = scopy.GetAssembly();
0148 fIsReflection = scopy.IsReflection();
0149 }
0150
0151 return *this;
0152 }