|
||||
File indexing completed on 2025-01-18 09:57:56
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4AssemblyTriplet 0027 // 0028 // Class description: 0029 // 0030 // A class to help place logical or assembly volumes inside a generic 0031 // containers (like STL vector ) together with information about its rotation, 0032 // placement and eventually reflection. 0033 // How to interpret the rotation and translation depends on the class which 0034 // uses a container of these triplets. The first class using G4AssemblyTriplet 0035 // is G4AssemblyVolume class. 0036 // The pointer to the logical or assembly volume is copied so this class 0037 // does not take its ownership and does not delete the object behind. 0038 0039 // Radovan Chytracek: created - November 2000 0040 // Ivana Hrivnacova: extended to support assembly of assemblies 0041 // of volumes and reflections, March 2006 0042 // ---------------------------------------------------------------------- 0043 #ifndef G4_ASSEMBLYTRIPLET_HH 0044 #define G4_ASSEMBLYTRIPLET_HH 0045 0046 #include "G4ThreeVector.hh" 0047 #include "G4RotationMatrix.hh" 0048 0049 class G4LogicalVolume; 0050 class G4AssemblyVolume; 0051 0052 class G4AssemblyTriplet 0053 { 0054 public: 0055 0056 G4AssemblyTriplet(); 0057 // Default constructor 0058 0059 G4AssemblyTriplet( G4LogicalVolume* pVolume, 0060 G4ThreeVector& translation, 0061 G4RotationMatrix* pRotation, 0062 G4bool isReflection = false ); 0063 // An explicit constructor for a logical volume 0064 0065 G4AssemblyTriplet( G4AssemblyVolume* pAssembly, 0066 G4ThreeVector& translation, 0067 G4RotationMatrix* pRotation, 0068 G4bool isReflection = false ); 0069 // An explicit constructor for an assembly volume 0070 0071 G4AssemblyTriplet( const G4AssemblyTriplet& second ); 0072 // Copy constructor 0073 0074 ~G4AssemblyTriplet(); 0075 // Destructor 0076 0077 G4AssemblyTriplet& operator=( const G4AssemblyTriplet& second ); 0078 // Assignment operator 0079 0080 inline G4LogicalVolume* GetVolume() const; 0081 // Retrieve the logical volume reference 0082 0083 inline void SetVolume( G4LogicalVolume* pVolume ); 0084 // Update the logical volume reference 0085 0086 inline G4AssemblyVolume* GetAssembly() const; 0087 // Retrieve the assembly volume reference 0088 0089 inline void SetAssembly( G4AssemblyVolume* pAssembly ); 0090 // Update the assembly volume reference 0091 0092 inline G4ThreeVector GetTranslation() const; 0093 // Retrieve the logical volume translation 0094 0095 inline void SetTranslation( G4ThreeVector& pVolume ); 0096 // Update the logical volume translation 0097 0098 inline G4RotationMatrix* GetRotation() const; 0099 // Retrieve the logical volume rotation 0100 0101 inline void SetRotation( G4RotationMatrix* pVolume ); 0102 // Update the logical volume rotation 0103 0104 inline G4bool IsReflection() const; 0105 // Return true if the logical or assembly volume has reflection 0106 0107 private: 0108 0109 G4LogicalVolume* fVolume = nullptr; 0110 // A logical volume 0111 0112 G4ThreeVector fTranslation; 0113 // A logical volume translation 0114 0115 G4RotationMatrix* fRotation = nullptr; 0116 // A logical volume rotation 0117 0118 // Member data for handling assemblies of assemblies and reflections 0119 0120 G4AssemblyVolume* fAssembly = nullptr; 0121 // An assembly volume 0122 0123 G4bool fIsReflection = false; 0124 // True if the logical or assembly volume has reflection 0125 }; 0126 0127 #include "G4AssemblyTriplet.icc" 0128 0129 #endif // G4_ASSEMBLYTRIPLET_HH
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |