Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// File name: G4VPolarizedCrossSection
27//
28// Author: Andreas Schaelicke
29//
30// Creation date: 15.05.2005
31//
32// Modifications:
33//
34// Class Description:
35// (pure virtual) interface class
36//
37// provides readable but efficient routines to determine
38// polarization for the final state of a given process
39// empoying the differential cross section
40//
41
43#include "Randomize.hh"
44
46 fXmin(0), fXmax(1.), fYmin(1.), theA(1), theZ(1), fCoul(0.)
47{
48}
49
51{
52}
53
55 const G4StokesVector &,
56 const G4StokesVector &,
57 G4int )
58{
59}
60
62{
63 // neglects correlation effects!
64
69 return G4ThreeVector(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
70}
71
73{
74 // neglects correlation effects!
75
80 return G4ThreeVector(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
81}
82// minimal energy fraction in TotalXSection
84{
85 return fXmin;
86}
87
88// maximal energy fraction in TotalXSection
90{
91 return fXmax;
92}
93
94
95/*
96void G4VPolarizedCrossSection::DicePolarization()
97{
98 // can respect correlation effects, but is limited to
99 // one quantization axis!
100 G4double sigma[4];
101 sigma[0]=XSection(G4StokesVector::P3,G4StokesVector::P3);
102 sigma[1]=XSection(G4StokesVector::P3,G4StokesVector::M3);
103 sigma[2]=XSection(G4StokesVector::M3,G4StokesVector::P3);
104 sigma[3]=XSection(G4StokesVector::M3,G4StokesVector::M3);
105
106 G4double sigma_max = 4. * XSection(G4StokesVector::ZERO,G4StokesVector::ZERO);
107
108 for (G4int i=0;i<4;++i) {
109 G4cout<<"sigma="<<sigma[i]<<" vs."<<(.25*sigma_max)<<G4endl;
110 if (sigma[i]<0 || sigma[i]>sigma_max) {
111 G4cout<<"ERROR G4VPolarizedCrossSection::DicePolarization(["<<i<<"]): "
112 <<sigma[i]<<" vs."<<sigma_max<<G4endl;
113 }
114 if (i>0) sigma[i]+=sigma[i-1];
115 }
116
117 G4int k = 0;
118 G4double disc = sigma[3]*G4UniformRand();
119 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
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/*
133G4StokesVector G4VPolarizedCrossSection::DicedPol2()
134{
135 return pol2;
136}
137
138G4StokesVector G4VPolarizedCrossSection::DicedPol3()
139{
140 return pol3;
141}
142*/
143
145 const G4StokesVector &,const G4StokesVector &)
146{
147 G4cout << "WARNING virtual function G4VPolarizedCrossSection::TotalXSection() called" << G4endl;
148 return 0.;
149}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static const G4StokesVector P3
static const G4StokesVector ZERO
static const G4StokesVector P2
static const G4StokesVector P1
virtual G4double XSection(const G4StokesVector &pol2, const G4StokesVector &pol3)=0
virtual G4double TotalXSection(G4double xmin, G4double xmax, G4double y, const G4StokesVector &pol0, const G4StokesVector &pol1)
virtual G4double GetXmin(G4double y)
virtual G4StokesVector GetPol3()
virtual G4double GetXmax(G4double y)
virtual G4StokesVector GetPol2()
virtual void Initialize(G4double, G4double, G4double, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0)