Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PolarizedComptonModel Class Reference

#include <G4PolarizedComptonModel.hh>

+ Inheritance diagram for G4PolarizedComptonModel:

Public Member Functions

 G4PolarizedComptonModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="Polarized-Compton")
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
 
G4double ComputeAsymmetryPerAtom (G4double gammaEnergy, G4double Z)
 
virtual ~G4PolarizedComptonModel ()
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
void SetTargetPolarization (const G4ThreeVector &pTarget)
 
void SetBeamPolarization (const G4ThreeVector &pBeam)
 
const G4ThreeVectorGetTargetPolarization () const
 
const G4ThreeVectorGetBeamPolarization () const
 
const G4ThreeVectorGetFinalGammaPolarization () const
 
const G4ThreeVectorGetFinalElectronPolarization () const
 
- Public Member Functions inherited from G4KleinNishinaCompton
 G4KleinNishinaCompton (const G4ParticleDefinition *p=nullptr, const G4String &nam="Klein-Nishina")
 
virtual ~G4KleinNishinaCompton ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &) override
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel) override
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)=0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double &eloss, G4double &niel, G4double length)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
virtual G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
G4int SelectIsotopeNumber (const G4Element *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
G4VEmModelGetTripletModel ()
 
void SetTripletModel (G4VEmModel *)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool LPMFlag () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy) const
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetFluctuationFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
void SetUseBaseMaterials (G4bool val)
 
G4bool UseBaseMaterials () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Protected Attributes inherited from G4KleinNishinaCompton
G4ParticleDefinitiontheGamma
 
G4ParticleDefinitiontheElectron
 
G4ParticleChangeForGammafParticleChange
 
G4double lowestSecondaryEnergy
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChangepParticleChange
 
G4PhysicsTablexSectionTable
 
const G4MaterialpBaseMaterial
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 
G4bool lossFlucFlag
 
G4double inveplus
 
G4double pFactor
 

Detailed Description

Definition at line 60 of file G4PolarizedComptonModel.hh.

Constructor & Destructor Documentation

◆ G4PolarizedComptonModel()

G4PolarizedComptonModel::G4PolarizedComptonModel ( const G4ParticleDefinition p = nullptr,
const G4String nam = "Polarized-Compton" 
)
explicit

Definition at line 71 of file G4PolarizedComptonModel.cc.

73 : G4KleinNishinaCompton(nullptr,nam),
74 verboseLevel(0)
75{
76 crossSectionCalculator = new G4PolarizedComptonCrossSection();
77}

◆ ~G4PolarizedComptonModel()

G4PolarizedComptonModel::~G4PolarizedComptonModel ( )
virtual

Definition at line 81 of file G4PolarizedComptonModel.cc.

82{
83 delete crossSectionCalculator;
84}

Member Function Documentation

◆ ComputeAsymmetryPerAtom()

G4double G4PolarizedComptonModel::ComputeAsymmetryPerAtom ( G4double  gammaEnergy,
G4double  Z 
)

Definition at line 86 of file G4PolarizedComptonModel.cc.

89{
90 G4double asymmetry = 0.0 ;
91
92 G4double k0 = gammaEnergy / electron_mass_c2 ;
93 G4double k1 = 1. + 2.*k0 ;
94
95 asymmetry = -k0;
96 asymmetry *= (k0 + 1.)*sqr(k1)*G4Log(k1) - 2.*k0*(5.*sqr(k0) + 4.*k0 + 1.);
97 asymmetry /= ((k0 - 2.)*k0 -2.)*sqr(k1)*G4Log(k1) + 2.*k0*(k0*(k0 + 1.)*(k0 + 8.) + 2.);
98
99 // G4cout<<"energy = "<<GammaEnergy<<" asymmetry = "<<asymmetry<<"\t\t GAM = "<<k0<<G4endl;
100 if (asymmetry>1.) G4cout<<"ERROR in G4PolarizedComptonModel::ComputeAsymmetryPerAtom"<<G4endl;
101
102 return asymmetry;
103}
G4double G4Log(G4double x)
Definition: G4Log.hh:226
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
T sqr(const T &x)
Definition: templates.hh:128

Referenced by ComputeCrossSectionPerAtom().

◆ ComputeCrossSectionPerAtom()

G4double G4PolarizedComptonModel::ComputeCrossSectionPerAtom ( const G4ParticleDefinition pd,
G4double  kinEnergy,
G4double  Z,
G4double  A,
G4double  cut,
G4double  emax 
)
overridevirtual

Reimplemented from G4KleinNishinaCompton.

Definition at line 106 of file G4PolarizedComptonModel.cc.

113{
114 double xs =
116 Z,A,cut,emax);
117 G4double polzz = theBeamPolarization.p3()*theTargetPolarization.z();
118 if (polzz > 0.0) {
119 G4double asym = ComputeAsymmetryPerAtom(kinEnergy, Z);
120 xs *= (1.+polzz*asym);
121 }
122 return xs;
123}
double z() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A, G4double cut, G4double emax) override
G4double ComputeAsymmetryPerAtom(G4double gammaEnergy, G4double Z)
G4double p3() const

◆ GetBeamPolarization()

const G4ThreeVector & G4PolarizedComptonModel::GetBeamPolarization ( ) const
inline

Definition at line 125 of file G4PolarizedComptonModel.hh.

126{
127 return theBeamPolarization;
128}

◆ GetFinalElectronPolarization()

const G4ThreeVector & G4PolarizedComptonModel::GetFinalElectronPolarization ( ) const
inline

Definition at line 133 of file G4PolarizedComptonModel.hh.

134{
135 return finalElectronPolarization;
136}

◆ GetFinalGammaPolarization()

const G4ThreeVector & G4PolarizedComptonModel::GetFinalGammaPolarization ( ) const
inline

Definition at line 129 of file G4PolarizedComptonModel.hh.

130{
131 return finalGammaPolarization;
132}

◆ GetTargetPolarization()

const G4ThreeVector & G4PolarizedComptonModel::GetTargetPolarization ( ) const
inline

Definition at line 121 of file G4PolarizedComptonModel.hh.

122{
123 return theTargetPolarization;
124}

◆ SampleSecondaries()

void G4PolarizedComptonModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  fvect,
const G4MaterialCutsCouple ,
const G4DynamicParticle aDynamicGamma,
G4double  tmin,
G4double  maxEnergy 
)
overridevirtual

Reimplemented from G4KleinNishinaCompton.

Definition at line 127 of file G4PolarizedComptonModel.cc.

132{
133 // do nothing below the threshold
134 if(aDynamicGamma->GetKineticEnergy() <= LowEnergyLimit()) { return; }
135
136 const G4Track * aTrack = fParticleChange->GetCurrentTrack();
137 G4VPhysicalVolume* aPVolume = aTrack->GetVolume();
138 G4LogicalVolume* aLVolume = aPVolume->GetLogicalVolume();
139
140 if (verboseLevel >= 1) {
141 G4cout<<"G4PolarizedComptonModel::SampleSecondaries in "
142 << aLVolume->GetName() <<G4endl;
143 }
144 G4PolarizationManager * polarizationManager =
146
147 // obtain polarization of the beam
148 theBeamPolarization = aDynamicGamma->GetPolarization();
149 theBeamPolarization.SetPhoton();
150
151 // obtain polarization of the media
152 G4bool targetIsPolarized = polarizationManager->IsPolarized(aLVolume);
153 theTargetPolarization =
154 polarizationManager->GetVolumePolarization(aLVolume);
155
156 // if beam is linear polarized or target is transversely polarized
157 // determine the angle to x-axis
158 // (assumes same PRF as in the polarization definition)
159
160 G4ThreeVector gamDirection0 = aDynamicGamma->GetMomentumDirection();
161
162 // transfere theTargetPolarization
163 // into the gamma frame (problem electron is at rest)
164 if (targetIsPolarized) {
165 theTargetPolarization.rotateUz(gamDirection0);
166 }
167 // The scattered gamma energy is sampled according to
168 // Klein - Nishina formula.
169 // The random number techniques of Butcher & Messel are used
170 // (Nuc Phys 20(1960),15).
171 // Note : Effects due to binding of atomic electrons are negliged.
172
173 G4double gamEnergy0 = aDynamicGamma->GetKineticEnergy();
174 G4double E0_m = gamEnergy0 / electron_mass_c2 ;
175
176 //
177 // sample the energy rate of the scattered gamma
178 //
179
180 G4double epsilon, sint2;
181 G4double onecost = 0.0;
182 G4double Phi = 0.0;
183 G4double greject = 1.0;
184 G4double cosTeta = 1.0;
185 G4double sinTeta = 0.0;
186
187 G4double eps0 = 1./(1. + 2.*E0_m);
188 G4double epsilon0sq = eps0*eps0;
189 G4double alpha1 = - G4Log(eps0);
190 G4double alpha2 = alpha1 + 0.5*(1.- epsilon0sq);
191
192 G4double polarization =
193 theBeamPolarization.p3()*theTargetPolarization.p3();
194
195 CLHEP::HepRandomEngine* rndmEngineMod = G4Random::getTheEngine();
196 G4int nloop = 0;
197 G4bool end = false;
198
199 G4double rndm[3];
200
201 do {
202 do {
203 ++nloop;
204 // false interaction if too many iterations
205 if(nloop > nlooplim) {
206 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
207 "too many iterations");
208 return;
209 }
210
211 // 3 random numbers to sample scattering
212 rndmEngineMod->flatArray(3, rndm);
213
214 if ( alpha1 > alpha2*rndm[0]) {
215 epsilon = G4Exp(-alpha1*rndm[1]); // epsilon0**r
216 } else {
217 epsilon = std::sqrt(epsilon0sq + (1.- epsilon0sq)*rndm[1]);
218 }
219
220 onecost = (1.- epsilon)/(epsilon*E0_m);
221 sint2 = onecost*(2.-onecost);
222
223 G4double gdiced = 2.*(1./epsilon+epsilon);
224 G4double gdist = 1./epsilon + epsilon - sint2
225 - polarization*(1./epsilon-epsilon)*(1.-onecost);
226
227 greject = gdist/gdiced;
228
229 if (greject > 1.0) {
230 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
231 "theta majoranta wrong");
232 }
233 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
234 } while (greject < rndm[2]);
235
236 // assuming phi loop sucessful
237 end = true;
238
239 //
240 // scattered gamma angles. ( Z - axis along the parent gamma)
241 //
242 cosTeta = 1. - onecost;
243 sinTeta = std::sqrt(sint2);
244 do {
245 ++nloop;
246
247 // 2 random numbers to sample scattering
248 rndmEngineMod->flatArray(2, rndm);
249
250 // false interaction if too many iterations
251 Phi = twopi * rndm[0];
252 if(nloop > nlooplim) {
253 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
254 "too many iterations");
255 return;
256 }
257
258 G4double gdiced = 1./epsilon + epsilon - sint2
259 + std::abs(theBeamPolarization.p3())*
260 ( std::abs((1./epsilon-epsilon)*cosTeta*theTargetPolarization.p3())
261 +(1.-epsilon)*sinTeta*(std::sqrt(sqr(theTargetPolarization.p1())
262 + sqr(theTargetPolarization.p2()))))
263 +sint2*(std::sqrt(sqr(theBeamPolarization.p1()) +
264 sqr(theBeamPolarization.p2())));
265
266 G4double gdist = 1./epsilon + epsilon - sint2
267 + theBeamPolarization.p3()*
268 ((1./epsilon-epsilon)*cosTeta*theTargetPolarization.p3()
269 +(1.-epsilon)*sinTeta*(std::cos(Phi)*theTargetPolarization.p1()+
270 std::sin(Phi)*theTargetPolarization.p2()))
271 -sint2*(std::cos(2.*Phi)*theBeamPolarization.p1()
272 +std::sin(2.*Phi)*theBeamPolarization.p2());
273 greject = gdist/gdiced;
274
275 if (greject > 1.0) {
276 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
277 "phi majoranta wrong");
278 }
279
280 if(greject < 1.e-3) {
281 PrintWarning(aDynamicGamma, nloop, greject, onecost, Phi,
282 "phi loop ineffective");
283 // restart theta loop
284 end = false;
285 break;
286 }
287
288 // Loop checking, 03-Aug-2015, Vladimir Ivanchenko
289 } while (greject < rndm[1]);
290 } while(!end);
291 G4double dirx = sinTeta*std::cos(Phi), diry = sinTeta*std::sin(Phi),
292 dirz = cosTeta;
293
294 //
295 // update G4VParticleChange for the scattered gamma
296 //
297
298 G4ThreeVector gamDirection1 ( dirx,diry,dirz );
299 gamDirection1.rotateUz(gamDirection0);
300 G4double gamEnergy1 = epsilon*gamEnergy0;
301
302 G4double edep = 0.0;
303 if(gamEnergy1 > lowestSecondaryEnergy) {
306 } else {
309 edep = gamEnergy1;
310 }
311
312 //
313 // calculate Stokesvector of final state photon and electron
314 //
315 G4ThreeVector nInteractionFrame =
316 G4PolarizationHelper::GetFrame(gamDirection1,gamDirection0);
317
318 // transfere theBeamPolarization and theTargetPolarization
319 // into the interaction frame (note electron is in gamma frame)
320 if (verboseLevel>=1) {
321 G4cout << "========================================\n";
322 G4cout << " nInteractionFrame = " <<nInteractionFrame<<"\n";
323 G4cout << " GammaDirection0 = " <<gamDirection0<<"\n";
324 G4cout << " gammaPolarization = " <<theBeamPolarization<<"\n";
325 G4cout << " electronPolarization = " <<theTargetPolarization<<"\n";
326 }
327
328 theBeamPolarization.InvRotateAz(nInteractionFrame,gamDirection0);
329 theTargetPolarization.InvRotateAz(nInteractionFrame,gamDirection0);
330
331 if (verboseLevel>=1) {
332 G4cout << "----------------------------------------\n";
333 G4cout << " gammaPolarization = " <<theBeamPolarization<<"\n";
334 G4cout << " electronPolarization = " <<theTargetPolarization<<"\n";
335 G4cout << "----------------------------------------\n";
336 }
337
338 // initialize the polarization transfer matrix
339 crossSectionCalculator->Initialize(epsilon,E0_m,0.,
340 theBeamPolarization,
341 theTargetPolarization,2);
342
343 if(gamEnergy1 > lowestSecondaryEnergy) {
344
345 // in interaction frame
346 // calculate polarization transfer to the photon (in interaction plane)
347 finalGammaPolarization = crossSectionCalculator->GetPol2();
348 if (verboseLevel>=1) {
349 G4cout << " gammaPolarization1 = " <<finalGammaPolarization<<"\n";
350 }
351 finalGammaPolarization.SetPhoton();
352
353 // translate polarization into particle reference frame
354 finalGammaPolarization.RotateAz(nInteractionFrame,gamDirection1);
355 if (finalGammaPolarization.mag() > 1.+1.e-8){
356 G4cout<<"ERROR in Polarizaed Compton Scattering !"<<G4endl;
357 G4cout<<"Polarization of final photon more than 100%"<<G4endl;
358 G4cout<<finalGammaPolarization<<" mag = "
359 <<finalGammaPolarization.mag()<<G4endl;
360 }
361 //store polarization vector
362 fParticleChange->ProposePolarization(finalGammaPolarization);
363 if (verboseLevel>=1) {
364 G4cout << " gammaPolarization1 = " <<finalGammaPolarization<<"\n";
365 G4cout << " GammaDirection1 = " <<gamDirection1<<"\n";
366 }
367 }
368
369 //
370 // kinematic of the scattered electron
371 //
372 G4double eKinEnergy = gamEnergy0 - gamEnergy1;
373
374 if (eKinEnergy > lowestSecondaryEnergy) {
375
376 G4ThreeVector eDirection =
377 gamEnergy0*gamDirection0 - gamEnergy1*gamDirection1;
378 eDirection = eDirection.unit();
379
380 finalElectronPolarization = crossSectionCalculator->GetPol3();
381 if (verboseLevel>=1) {
382 G4cout << " electronPolarization1 = "
383 <<finalElectronPolarization<<"\n";
384 }
385 // transfer into particle reference frame
386 finalElectronPolarization.RotateAz(nInteractionFrame,eDirection);
387 if (verboseLevel>=1) {
388 G4cout << " electronPolarization1 = "
389 <<finalElectronPolarization<<"\n";
390 G4cout << " ElecDirection = " <<eDirection<<"\n";
391 }
392
393 // create G4DynamicParticle object for the electron.
394 G4DynamicParticle* aElectron =
395 new G4DynamicParticle(theElectron,eDirection,eKinEnergy);
396 //store polarization vector
397 if (finalElectronPolarization.mag() > 1.+1.e-8){
398 G4cout<<"ERROR in Polarizaed Compton Scattering !"<<G4endl;
399 G4cout<<"Polarization of final electron more than 100%"<<G4endl;
400 G4cout<<finalElectronPolarization<<" mag = "
401 <<finalElectronPolarization.mag()<<G4endl;
402 }
403 aElectron->SetPolarization(finalElectronPolarization.p1(),
404 finalElectronPolarization.p2(),
405 finalElectronPolarization.p3());
406 fvect->push_back(aElectron);
407 } else {
408 edep += eKinEnergy;
409 }
410 // energy balance
411 if(edep > 0.0) {
413 }
414}
double epsilon(double density, double temperature)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
@ fStopAndKill
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
Hep3Vector unit() const
double mag() const
Hep3Vector & rotateUz(const Hep3Vector &)
Definition: ThreeVector.cc:33
virtual void flatArray(const int size, double *vect)=0
void SetPolarization(const G4ThreeVector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
const G4ThreeVector & GetPolarization() const
G4ParticleChangeForGamma * fParticleChange
G4ParticleDefinition * theElectron
const G4String & GetName() const
const G4Track * GetCurrentTrack() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposePolarization(const G4ThreeVector &dir)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
static G4ThreeVector GetFrame(const G4ThreeVector &, const G4ThreeVector &)
bool IsPolarized(G4LogicalVolume *lVol) const
static G4PolarizationManager * GetInstance()
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
virtual void Initialize(G4double eps, G4double X, G4double phi, const G4StokesVector &p0, const G4StokesVector &p1, G4int flag=0) override
G4double p1() const
void InvRotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4double p2() const
void RotateAz(G4ThreeVector nInteractionFrame, G4ThreeVector particleDirection)
G4VPhysicalVolume * GetVolume() const
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:652
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4LogicalVolume * GetLogicalVolume() const

◆ SetBeamPolarization()

void G4PolarizedComptonModel::SetBeamPolarization ( const G4ThreeVector pBeam)
inline

Definition at line 117 of file G4PolarizedComptonModel.hh.

118{
119 theBeamPolarization = pBeam;
120}

◆ SetTargetPolarization()

void G4PolarizedComptonModel::SetTargetPolarization ( const G4ThreeVector pTarget)
inline

Definition at line 113 of file G4PolarizedComptonModel.hh.

114{
115 theTargetPolarization = pTarget;
116}

The documentation for this class was generated from the following files: