|
||||
File indexing completed on 2025-01-18 09:58:38
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 // G4LogicalCrystalVolume 0027 // 0028 // Class description: 0029 // 0030 // Specialised logical volume for the description of crystals. 0031 // The object can be created only with an extended material 0032 // with a crystal extension. The class handles the orientation 0033 // of the crystal axes wrt the solid to which the crystal is attached. 0034 0035 // 21-04-16, created by E.Bagli 0036 // --------------------------------------------------------------------------- 0037 #ifndef G4LOGICALCRYSTALVOLUME_HH 0038 #define G4LOGICALCRYSTALVOLUME_HH 1 0039 0040 #include <vector> 0041 #include "G4LogicalVolume.hh" 0042 0043 class G4CrystalExtension; 0044 class G4ExtendedMaterial; 0045 0046 class G4LogicalCrystalVolume : public G4LogicalVolume 0047 { 0048 public: 0049 0050 G4LogicalCrystalVolume(G4VSolid* pSolid, 0051 G4ExtendedMaterial* pMaterial, 0052 const G4String& name, 0053 G4FieldManager* pFieldMgr = nullptr, 0054 G4VSensitiveDetector* pSDetector = nullptr, 0055 G4UserLimits* pULimits = nullptr, 0056 G4bool optimise = true, 0057 G4int h = 0, 0058 G4int k = 0, 0059 G4int l = 0, 0060 G4double rot = 0.0); 0061 0062 ~G4LogicalCrystalVolume() override; 0063 0064 G4bool IsExtended() const override { return true; } 0065 // Return true if it is not a base-class object. 0066 0067 void SetMillerOrientation(G4int h, G4int k, G4int l, G4double rot = 0.0); 0068 // Set physical lattice orientation, relative to G4VSolid coordinates 0069 // Miller orientation aligns lattice normal (hkl) with geometry +Z 0070 0071 const G4ThreeVector& RotateToLattice(G4ThreeVector& dir) const; 0072 const G4ThreeVector& RotateToSolid(G4ThreeVector& dir) const; 0073 // Rotate input vector between lattice and solid orientations 0074 // Returns new vector value for convenience 0075 0076 const G4CrystalExtension* GetCrystal() const; 0077 0078 const G4ThreeVector& GetBasis(G4int i) const; 0079 // Call through to get crystal basis vectors 0080 0081 void SetVerbose(G4int aInt) { verboseLevel = aInt; } 0082 0083 static G4bool IsLattice(G4LogicalVolume* aLV); 0084 0085 private: 0086 0087 G4RotationMatrix fOrient; // Rotate geometry into lattice frame 0088 G4RotationMatrix fInverse; 0089 G4int hMiller = 1, kMiller = 1, lMiller = 0; // Save Miller indices for dump 0090 G4double fRot = 0.0; 0091 0092 G4int verboseLevel = 0; 0093 0094 static std::vector<G4LogicalVolume*> fLCVvec; 0095 }; 0096 0097 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |