Geant4 9.6.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// $Id$
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
44#include "Randomize.hh"
45
47 fXmin(0), fXmax(1.), fYmin(1.), theA(1), theZ(1), fCoul(0.)
48{
49}
50
52{
53}
54
56 const G4StokesVector &,
57 const G4StokesVector &,
58 G4int )
59{
60}
61
63{
64 // neglects correlation effects!
65
70 return G4ThreeVector(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
71}
72
74{
75 // neglects correlation effects!
76
81 return G4ThreeVector(invXsecTotal*xsPol1,invXsecTotal*xsPol2,invXsecTotal*xsPol3);
82}
83// minimal energy fraction in TotalXSection
85{
86 return fXmin;
87}
88
89// maximal energy fraction in TotalXSection
91{
92 return fXmax;
93}
94
95
96/*
97void 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/*
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:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT 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)