60{
61 const G4double eGamma = CLHEP::electron_mass_c2;
62
63
66 auto aGamma1 =
new G4DynamicParticle(
G4Gamma::Gamma(),dir1,eGamma);
67 auto aGamma2 =
new G4DynamicParticle(
G4Gamma::Gamma(),dir2,eGamma);
68
69
70
71
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
97 const G4double& meanKE = meanEnergyPerIonPair;
98
99 if (meanKE > 0.) {
100
101 const G4double mass = 2.*CLHEP::electron_mass_c2;
102
103
104
105 const G4double sigmav = std::sqrt(2.*meanKE/(3.*mass));
106
107 const G4double vx = G4RandGauss::shoot(0.,sigmav);
108 const G4double vy = G4RandGauss::shoot(0.,sigmav);
109 const G4double vz = G4RandGauss::shoot(0.,sigmav);
112 aGamma1->Set4Momentum(aGamma1->Get4Momentum().boost(beta));
113 aGamma2->Set4Momentum(aGamma2->Get4Momentum().boost(beta));
114
115
116 const G4ThreeVector& newDir1 = aGamma1->GetMomentumDirection();
117 const G4ThreeVector& newDir2 = aGamma2->GetMomentumDirection();
120 const G4double& angle1 = std::acos(dir1*newDir1);
121 const G4double& angle2 = std::acos(dir2*newDir2);
122 pol1.
rotate(axis1, angle1);
123 pol2.
rotate(axis2, angle2);
124 }
125
126
127 aGamma1->SetPolarization(pol1);
128 aGamma2->SetPolarization(pol2);
129
130 secParticles.push_back(aGamma1);
131 secParticles.push_back(aGamma2);
132}
G4ThreeVector G4RandomDirection()
CLHEP::Hep3Vector G4ThreeVector
Hep3Vector cross(const Hep3Vector &) const
Hep3Vector & rotate(double, const Hep3Vector &)
G4double GetMeanEnergyPerIonPair() const
G4IonisParamMat * GetIonisation() const