Geant4 11.3.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ChannelingFastSimCrystalData.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
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. *
10// * *
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. *
17// * *
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// ********************************************************************
25//
26// Author: Alexei Sytov
27// Co-author: Gianfranco PaternĂ² (modifications & testing)
28
29#ifndef G4ChannelingFastSimCrystalData_h
30#define G4ChannelingFastSimCrystalData_h 1
31
32#include "G4ios.hh"
33#include "globals.hh"
35#include "G4ThreeVector.hh"
36#include "Randomize.hh"
37#include "G4Material.hh"
38#include <unordered_map>
39
42
43/** \file G4ChannelingFastSimCrystalData.hh
44* \brief Definition of the G4ChannelingFastSimCrystalData class
45* The class inherits G4VChannelingFastSimCrystalData containing the data and properties
46* related to the crystal lattice.
47* The functions related to the crystal geometry (transformation of coordinates and angles
48* from the reference system of the bounding box of the local volume to
49* the crystal lattice co-rotating reference system and vice versa) and
50* initialization function SetMaterialProperties are compiled in this class.
51*/
52
54{
55public:
56
59
60public:
61
62 ///find and upload crystal lattice input files, calculate all the basic values
63 ///(to do only once)
64 void SetMaterialProperties(const G4Material* crystal,
65 const G4String &lattice,
66 const G4String &filePath);
67
68 ///calculate the coordinates in the co-rotating reference system
69 ///within a channel (periodic cell)
70 ///(connected with crystal planes/axes either bent or straight)
72
73 ///calculate the coordinates in the Box reference system
74 ///(connected with the bounding box of the volume)
76
77 ///change the channel if necessary, recalculate x o y
79
80 ///calculate the horizontal angle in the co-rotating reference system
81 ///within a channel (periodic cell)
82 ///(connected with crystal planes/axes either bent or straight)
85
86 ///calculate the horizontal angle in the Box reference system
87 ///(connected with the bounding box of the volume)
90
91 ///auxialiary function to transform the horizontal angle
93
94 ///get channel width in x and y
97
98private:
99
100 ///variables
101 G4int fNsteps=353;//number of steps per channeling oscillation
102 G4double fR0=1.1*CLHEP::fermi;//*A^(1/3) - radius of nucleus
103
104 ///Values related to coordinate transformation
105 long long int fNChannelx=0;//horizontal number of channel
106 //(either straight of bent) inside the box
107 long long int fNChannely=0;//vertical number of channel (either straight of bent)
108 //inside the box; =0 in the case of planes
109
110 ///values related to the crystal lattice
111 G4int fNpointsx=0,fNpointsy=0;// number of horizontal and vertical nodes of
112 // interpolation
113 G4double fDx=0, fDy=0;// channel (periodic cell)
114 //horizontal and vertical dimensions
115
116 ///fundamental constants of material
117 std::vector <G4double> fN0; // nuclear concentration
118 std::vector <G4double> fU1; // amplitude of thermal oscillations
119 std::vector <G4double> fZ1;//atomic number of each element
120 std::vector <G4double> fAN; //atomic mass of each element
121};
122
123#endif
Definition of the G4ChannelingFastSimInterpolation class The class includes spline interpolation coef...
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
Definition of the G4VChannelingFastSimCrystalData class The class contains the data and properties re...
G4ThreeVector CoordinatesFromBoxToLattice(const G4ThreeVector &pos0)
G4double AngleXShift(G4double z)
auxialiary function to transform the horizontal angle
virtual ~G4ChannelingFastSimCrystalData()=default
G4double AngleXFromBoxToLattice(G4double tx, G4double z)
void SetMaterialProperties(const G4Material *crystal, const G4String &lattice, const G4String &filePath)
G4ThreeVector ChannelChange(G4double &x, G4double &y, G4double &z)
change the channel if necessary, recalculate x o y
G4ThreeVector CoordinatesFromLatticeToBox(const G4ThreeVector &pos)
G4double AngleXFromLatticeToBox(G4double tx, G4double z)
G4double GetChannelWidthX()
get channel width in x and y
G4double GetCUtetax(G4double z)
get crystalline undulator wave 1st derivative function