|
|
|||
File indexing completed on 2026-08-05 09:16:05
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 // Author: Alexei Sytov 0027 // Co-author: Gianfranco PaternĂ² (modifications & testing) 0028 0029 #ifndef G4ChannelingFastSimCrystalData_h 0030 #define G4ChannelingFastSimCrystalData_h 1 0031 0032 0033 #include "globals.hh" 0034 #include "G4ios.hh" 0035 #include "G4ThreeVector.hh" 0036 #include "G4Material.hh" 0037 #include "G4VChannelingFastSimCrystalData.hh" 0038 0039 0040 /** \file G4ChannelingFastSimCrystalData.hh 0041 * \brief Definition of the G4ChannelingFastSimCrystalData class 0042 * The class inherits G4VChannelingFastSimCrystalData containing the data and properties 0043 * related to the crystal lattice. 0044 * The functions related to the crystal geometry (transformation of coordinates and angles 0045 * from the reference system of the bounding box of the local volume to 0046 * the crystal lattice co-rotating reference system and vice versa) and 0047 * initialization function SetMaterialProperties are compiled in this class. 0048 */ 0049 0050 class G4ChannelingFastSimCrystalData : public G4VChannelingFastSimCrystalData 0051 { 0052 public: 0053 0054 G4ChannelingFastSimCrystalData() = default; 0055 ~G4ChannelingFastSimCrystalData() = default; 0056 0057 ///find and upload crystal lattice input files, calculate all the basic values 0058 ///(to do only once) 0059 void SetMaterialProperties(const G4Material* crystal, 0060 const G4String &lattice, 0061 const G4String &filePath); 0062 0063 ///calculate the coordinates in the co-rotating reference system 0064 ///within a channel (periodic cell) 0065 ///(connected with crystal planes/axes either bent or straight) 0066 G4ThreeVector CoordinatesFromBoxToLattice(const G4ThreeVector &pos0); 0067 0068 ///calculate the coordinates in the Box reference system 0069 ///(connected with the bounding box of the volume) 0070 G4ThreeVector CoordinatesFromLatticeToBox(const G4ThreeVector &pos); 0071 0072 ///change the channel if necessary, recalculate x o y 0073 G4ThreeVector ChannelChange(G4double &x, G4double &y, G4double &z); 0074 0075 ///calculate the horizontal angle in the co-rotating reference system 0076 ///within a channel (periodic cell) 0077 ///(connected with crystal planes/axes either bent or straight) 0078 G4double AngleXFromBoxToLattice(G4double tx, G4double z) 0079 {return tx-AngleXShift(z)-GetCUtetax(z);} 0080 0081 ///calculate the horizontal angle in the Box reference system 0082 ///(connected with the bounding box of the volume) 0083 G4double AngleXFromLatticeToBox(G4double tx, G4double z) 0084 {return tx+AngleXShift(z)+GetCUtetax(z);} 0085 0086 ///auxialiary function to transform the horizontal angle 0087 G4double AngleXShift(G4double z){return fMiscutAngle + z*fCurv;} 0088 0089 ///get channel width in x and y 0090 G4double GetChannelWidthX(){return fDx;} 0091 G4double GetChannelWidthY(){return fDy;} 0092 0093 private: 0094 0095 ///variables 0096 G4int fNsteps=353;//number of steps per channeling oscillation 0097 G4double fR0=1.1*CLHEP::fermi;//*A^(1/3) - radius of nucleus 0098 0099 ///Values related to coordinate transformation 0100 long long int fNChannelx=0;//horizontal number of channel 0101 //(either straight of bent) inside the box 0102 long long int fNChannely=0;//vertical number of channel (either straight of bent) 0103 //inside the box; =0 in the case of planes 0104 0105 ///values related to the crystal lattice 0106 G4int fNpointsx=0,fNpointsy=0;// number of horizontal and vertical nodes of 0107 // interpolation 0108 G4double fDx=0, fDy=0;// channel (periodic cell) 0109 //horizontal and vertical dimensions 0110 0111 ///fundamental constants of material 0112 std::vector <G4double> fN0; // nuclear concentration 0113 std::vector <G4double> fU1; // amplitude of thermal oscillations 0114 std::vector <G4double> fZ1;//atomic number of each element 0115 std::vector <G4double> fAN; //atomic mass of each element 0116 }; 0117 0118 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|