Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
exoticphysics
phonon
src
XPhysicalLattice.cc
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
//
28
//
29
// $Id$
30
//
31
#include "
XPhysicalLattice.hh
"
32
#include "
G4VPhysicalVolume.hh
"
33
#include "
G4PhysicalConstants.hh
"
34
#include "
G4SystemOfUnits.hh
"
35
36
XPhysicalLattice::XPhysicalLattice
(){
37
fLattice=NULL;
38
fVolume=NULL;
39
fTheta=0;
40
fPhi=0;
41
}
42
43
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
44
45
46
XPhysicalLattice::XPhysicalLattice
(
G4VPhysicalVolume
* Vol,
XLogicalLattice
* Lat){
47
fLattice=Lat;
48
fVolume=Vol;
49
fA=fLattice->
GetAnhDecConstant
();
50
fB=fLattice->
GetScatteringConstant
();
51
fDosL=fLattice->
GetLDOS
();
52
fDosST=fLattice->
GetSTDOS
();
53
fDosFT=fLattice->
GetFTDOS
();
54
fBeta=fLattice->
GetBeta
();
55
fGamma=fLattice->
GetGamma
();
56
fLambda=fLattice->
GetLambda
();
57
fMu=fLattice->
GetMu
();
58
59
G4RotationMatrix
*rot = fVolume->
GetObjectRotation
();
60
61
fGlobalToLocal
=
G4AffineTransform
(*rot);
62
fLocalToGlobal
=
fGlobalToLocal
.
Invert
();
63
}
64
65
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
66
67
68
XPhysicalLattice::~XPhysicalLattice
(){;}
69
70
void
XPhysicalLattice::SetDynamicalConstants
(
double
Beta,
double
Gamma,
double
Lambda,
double
Mu)
71
{
72
fBeta=Beta;
73
fGamma=Gamma;
74
fLambda=Lambda;
75
fMu=Mu;
76
}
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79
80
81
void
XPhysicalLattice::SetScatteringConstant
(
G4double
a
){
82
fA=
a
;
83
}
84
85
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
86
87
88
void
XPhysicalLattice::SetAnhDecConstant
(
G4double
b
){
89
fB=
b
;
90
}
91
92
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
93
94
95
void
XPhysicalLattice::SetLDOS
(
double
LDOS){
96
fDosL=LDOS;
97
}
98
99
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
100
101
void
XPhysicalLattice::SetSTDOS
(
double
STDOS)
102
{
103
fDosST = STDOS;
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
107
108
void
XPhysicalLattice::SetFTDOS
(
double
FTDOS){
109
fDosFT = FTDOS;
110
}
111
112
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
113
114
115
double
XPhysicalLattice::GetBeta
(){
116
return
fBeta;
117
}
118
119
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
120
121
122
double
XPhysicalLattice::GetGamma
(){
123
return
fGamma;
124
}
125
126
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
127
128
double
XPhysicalLattice::GetLambda
(){
129
return
fLambda;
130
}
131
132
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
133
134
135
double
XPhysicalLattice::GetMu
()
136
{
137
return
fMu;
138
}
139
140
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
141
142
143
G4double
XPhysicalLattice::GetScatteringConstant
()
144
{
145
return
fB;
146
}
147
148
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
149
150
151
G4double
XPhysicalLattice::GetAnhDecConstant
()
152
{
153
return
fA;
154
}
155
156
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
157
158
159
double
XPhysicalLattice::GetLDOS
(){
160
return
fDosL;
161
}
162
163
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
164
165
166
double
XPhysicalLattice::GetSTDOS
(){
167
return
fDosST;
168
}
169
170
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
171
172
173
double
XPhysicalLattice::GetFTDOS
()
174
{
175
return
fDosFT;
176
}
177
178
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
179
180
181
183
//Loads the group velocity in m/s
185
double
XPhysicalLattice::MapKtoV
(
int
polarizationState,
G4ThreeVector
k){
186
double
groupVelocity;
187
188
k.
rotate
(
G4ThreeVector
(0,1,0), fTheta).
rotate
(
G4ThreeVector
(0,0,1), fPhi);
189
groupVelocity = fLattice->
MapKtoV
(polarizationState, k);
190
k.
rotate
(
G4ThreeVector
(0,0,1), -fPhi).
rotate
(
G4ThreeVector
(0,1,0), -fTheta);
191
192
return
groupVelocity;
193
}
194
195
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
196
197
198
200
//Loads the normalized direction vector along VG
202
G4ThreeVector
XPhysicalLattice::MapKtoVDir
(
int
polarizationState,
G4ThreeVector
k){
203
204
G4ThreeVector
GroupVelocity;
205
206
k=k.
rotate
(
G4ThreeVector
(0,1,0), fTheta).
rotate
(
G4ThreeVector
(0,0,1), fPhi);
207
GroupVelocity = fLattice->
MapKtoVDir
(polarizationState, k);
208
209
return
GroupVelocity.
rotate
(
G4ThreeVector
(0,0,1), -fPhi).
rotate
(
G4ThreeVector
(0,1,0), -fTheta).
unit
();
210
}
211
212
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
213
214
215
G4VPhysicalVolume
*
XPhysicalLattice::GetVolume
(){
216
return
fVolume;
217
}
218
219
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
220
221
222
void
XPhysicalLattice::SetPhysicalVolume
(
G4VPhysicalVolume
* Vol){
223
fVolume=Vol;
224
}
225
226
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
227
228
229
void
XPhysicalLattice::SetLatticeOrientation
(
G4double
t_rot,
G4double
p_rot){
230
fTheta=t_rot;
231
fPhi= p_rot;
232
}
233
234
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
235
236
237
void
XPhysicalLattice::SetMillerOrientation
(
int
l,
int
k,
int
n
){
238
fTheta=
pi
/2-std::atan2(n+0.000001,l+0.000001)*
rad
;
239
fPhi=
pi
/2-std::atan2(l+0.000001,k+0.000001)*
rad
;
240
}
241
242
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
243
244
245
void
XPhysicalLattice::SetXLogicalLattice
(
XLogicalLattice
* Lat){
246
fLattice=Lat;
247
}
248
249
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
250
Generated on Sat May 25 2013 14:32:24 for Geant4 by
1.8.4