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
XPhononReflectionProcess.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
32
#include "
XPhononReflectionProcess.hh
"
33
34
#include "
G4Step.hh
"
35
#include "
G4StepPoint.hh
"
36
#include "
G4VParticleChange.hh
"
37
#include "
Randomize.hh
"
38
#include "
G4RandomDirection.hh
"
39
#include "
G4RandomTools.hh
"
40
41
#include "
XTPhononFast.hh
"
42
#include "
XTPhononSlow.hh
"
43
#include "
XLPhonon.hh
"
44
45
#include "
G4Material.hh
"
46
#include "
G4NistManager.hh
"
47
#include "
G4TransportationManager.hh
"
48
#include "
G4Navigator.hh
"
49
#include "
G4GeometryTolerance.hh
"
50
51
#include "
XPhononTrackInformation.hh
"
52
#include "
XLatticeManager3.hh
"
53
54
#include "
G4SystemOfUnits.hh
"
55
56
57
XPhononReflectionProcess::XPhononReflectionProcess
(
const
G4String
& aName)
58
:
G4VDiscreteProcess
(aName)
59
{
60
fAlminum = NULL;
61
kCarTolerance =
G4GeometryTolerance::GetInstance
()->
GetSurfaceTolerance
();
62
G4cout
<<
"\n XPhononReflectionProcess::Constructor: Geometry surface tolerance is: "
<< kCarTolerance /
mm
<<
" mm"
;
63
if
(
verboseLevel
>1) {
64
G4cout
<<
GetProcessName
() <<
" is created "
<<
G4endl
;
65
}
66
}
67
68
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
69
70
71
XPhononReflectionProcess::~XPhononReflectionProcess
()
72
{;}
73
74
XPhononReflectionProcess::XPhononReflectionProcess
(
XPhononReflectionProcess
&
right
)
75
:
G4VDiscreteProcess
(right)
76
{;}
77
78
G4double
79
XPhononReflectionProcess::GetMeanFreePath
(
80
const
G4Track
&,
G4double
/*previousStepSize*/
,
G4ForceCondition
*
condition
)
81
{
82
// Always return DBL_MAX and Forced
83
// This ensures that the process is called
84
// at the end of every step. In
85
// PostStepDoIt the process decides whether
86
// the step encountered a volume boundary
87
// and a reflection should be applied
88
89
*condition =
Forced
;
90
91
return
DBL_MAX
;
92
}
93
94
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
95
96
97
98
G4VParticleChange
*
99
XPhononReflectionProcess::PostStepDoIt
(
const
G4Track
& aTrack,
100
const
G4Step
& aStep )
101
{
102
103
//This process handles the interaction of phonons with
104
//boundaries. Implementation of this class is highly
105
//geometry dependent.Currently, phonons are killed when
106
//they reach a boundary. If the other side of the
107
//boundary was Al, a hit is registered.
108
109
aParticleChange
.
Initialize
(aTrack);
110
111
//Check if current step is limited by a volume boundary
112
G4StepPoint
* postStepPoint = aStep.
GetPostStepPoint
();
113
if
(postStepPoint->
GetStepStatus
()!=
fGeomBoundary
)
114
{
115
116
//make sure that correct phonon velocity is used after the step
117
118
XLatticeManager3
* LM =
XLatticeManager3::GetXLatticeManager
();
119
XPhysicalLattice
* Lattice = LM->
GetXPhysicalLattice
(aTrack.
GetVolume
());
120
121
int
pol = 0;
122
if
(aTrack.
GetDefinition
() ==
XLPhonon::PhononDefinition
()){
123
pol=0;
124
}
125
else
if
(aTrack.
GetDefinition
() ==
XTPhononSlow::Definition
()){
126
pol=1;
127
}
128
else
if
(aTrack.
GetDefinition
() ==
XTPhononFast::Definition
()){
129
pol=2;
130
}
131
132
//Since step was not a volume boundary, just set correct phonon velocity and return
133
aParticleChange
.
ProposeVelocity
(Lattice->
MapKtoV
(pol, aTrack.
GetMomentumDirection
())*
m
/
s
);
134
return
&
aParticleChange
;
135
}
136
137
138
//do nothing but return is the step is too short
139
//This is to allow actual reflection where after
140
//the first boundary crossing a second, infinitesimal
141
//step occurs crossing back into the original volume
142
if
(aTrack.
GetStepLength
()<=kCarTolerance/2)
143
{
144
145
return
&
aParticleChange
;
146
}
147
148
G4double
eKin = aTrack.
GetKineticEnergy
();
149
aParticleChange
.
ProposeNonIonizingEnergyDeposit
(eKin);
150
aParticleChange
.
ProposeTrackStatus
(
fStopAndKill
);
151
152
return
&
aParticleChange
;
153
}
154
155
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
156
157
158
G4bool
XPhononReflectionProcess::IsApplicable
(
const
G4ParticleDefinition
& aPD)
159
{
160
return
((&aPD==
XTPhononFast::PhononDefinition
())||(&aPD==
XLPhonon::PhononDefinition
())||(&aPD==
XTPhononSlow::PhononDefinition
()));
161
}
162
163
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
164
165
166
void
XPhononReflectionProcess::BuildPhysicsTable
(
const
G4ParticleDefinition
&)
167
{
168
if
(!fAlminum)
169
{ fAlminum =
G4NistManager::Instance
()->
FindOrBuildMaterial
(
"G4_Al"
); }
170
}
171
172
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
173
174
Generated on Sat May 25 2013 14:32:24 for Geant4 by
1.8.4