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
source
processes
electromagnetic
polarisation
src
G4VPolarizedCrossSection.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
//
26
// $Id: G4VPolarizedCrossSection.cc 69847 2013-05-16 09:36:18Z gcosmo $
27
// File name: G4VPolarizedCrossSection
28
//
29
// Author: Andreas Schaelicke
30
//
31
// Creation date: 15.05.2005
32
//
33
// Modifications:
34
//
35
// Class Description:
36
// (pure virtual) interface class
37
//
38
// provides readable but efficient routines to determine
39
// polarization for the final state of a given process
40
// empoying the differential cross section
41
//
42
43
#include "
G4VPolarizedCrossSection.hh
"
44
#include "
Randomize.hh
"
45
46
G4VPolarizedCrossSection::G4VPolarizedCrossSection
() :
47
fXmin(0), fXmax(1.), fYmin(1.), theA(1), theZ(1), fCoul(0.)
48
{
49
}
50
51
G4VPolarizedCrossSection::~G4VPolarizedCrossSection
()
52
{
53
}
54
55
void
G4VPolarizedCrossSection::Initialize
(
G4double
,
G4double
,
G4double
,
56
const
G4StokesVector
&,
57
const
G4StokesVector
&,
58
G4int
)
59
{
60
}
61
62
G4StokesVector
G4VPolarizedCrossSection::GetPol2
()
63
{
64
// neglects correlation effects!
65
66
G4double
invXsecTotal=1./
XSection
(
G4StokesVector::ZERO
,
G4StokesVector::ZERO
);
67
G4double
xsPol1=
XSection
(
G4StokesVector::P1
,
G4StokesVector::ZERO
);
68
G4double
xsPol2=
XSection
(
G4StokesVector::P2
,
G4StokesVector::ZERO
);
69
G4double
xsPol3=
XSection
(
G4StokesVector::P3
,
G4StokesVector::ZERO
);
70
return
G4ThreeVector
(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
71
}
72
73
G4StokesVector
G4VPolarizedCrossSection::GetPol3
()
74
{
75
// neglects correlation effects!
76
77
G4double
invXsecTotal=1./
XSection
(
G4StokesVector::ZERO
,
G4StokesVector::ZERO
);
78
G4double
xsPol1=
XSection
(
G4StokesVector::ZERO
,
G4StokesVector::P1
);
79
G4double
xsPol2=
XSection
(
G4StokesVector::ZERO
,
G4StokesVector::P2
);
80
G4double
xsPol3=
XSection
(
G4StokesVector::ZERO
,
G4StokesVector::P3
);
81
return
G4ThreeVector
(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
82
}
83
// minimal energy fraction in TotalXSection
84
G4double
G4VPolarizedCrossSection::GetXmin
(
G4double
/*y*/
)
85
{
86
return
fXmin
;
87
}
88
89
// maximal energy fraction in TotalXSection
90
G4double
G4VPolarizedCrossSection::GetXmax
(
G4double
/*y*/
)
91
{
92
return
fXmax
;
93
}
94
95
96
/*
97
void G4VPolarizedCrossSection::DicePolarization()
98
{
99
// can respect correlation effects, but is limited to
100
// one quantization axis!
101
G4double sigma[4];
102
sigma[0]=XSection(G4StokesVector::P3,G4StokesVector::P3);
103
sigma[1]=XSection(G4StokesVector::P3,G4StokesVector::M3);
104
sigma[2]=XSection(G4StokesVector::M3,G4StokesVector::P3);
105
sigma[3]=XSection(G4StokesVector::M3,G4StokesVector::M3);
106
107
G4double sigma_max = 4. * XSection(G4StokesVector::ZERO,G4StokesVector::ZERO);
108
109
for (G4int i=0;i<4;++i) {
110
G4cout<<"sigma="<<sigma[i]<<" vs."<<(.25*sigma_max)<<G4endl;
111
if (sigma[i]<0 || sigma[i]>sigma_max) {
112
G4cout<<"ERROR G4VPolarizedCrossSection::DicePolarization(["<<i<<"]): "
113
<<sigma[i]<<" vs."<<sigma_max<<G4endl;
114
}
115
if (i>0) sigma[i]+=sigma[i-1];
116
}
117
118
G4int k = 0;
119
G4double disc = sigma[3]*G4UniformRand();
120
while (sigma[k]<disc && k<4) {
121
++k;
122
}
123
124
if ((k&2)==0) pol2=G4StokesVector::P3;
125
else pol2=G4StokesVector::M3;
126
if ((k&1)==0) pol3=G4StokesVector::P3;
127
else pol3=G4StokesVector::M3;
128
129
}
130
*/
131
132
/*
133
G4StokesVector G4VPolarizedCrossSection::DicedPol2()
134
{
135
return pol2;
136
}
137
138
G4StokesVector G4VPolarizedCrossSection::DicedPol3()
139
{
140
return pol3;
141
}
142
*/
143
144
G4double
G4VPolarizedCrossSection::TotalXSection
(
G4double
,
G4double
,
G4double
,
145
const
G4StokesVector
&,
const
G4StokesVector
&)
146
{
147
G4cout
<<
"WARNING virtual function G4VPolarizedCrossSection::TotalXSection() called"
<<
G4endl
;
148
return
0.;
149
}
Generated on Sat May 25 2013 14:33:36 for Geant4 by
1.8.4