Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
G4PolarizedCompton Class Reference

#include <G4PolarizedCompton.hh>

Inheritance diagram for G4PolarizedCompton:
G4VEmProcess G4VDiscreteProcess G4VProcess

Public Member Functions

 G4PolarizedCompton (const G4String &processName="pol-compt", G4ProcessType type=fElectromagnetic)
 
virtual ~G4PolarizedCompton ()
 
G4bool IsApplicable (const G4ParticleDefinition &)
 
virtual void PrintInfo ()
 
void SetModel (const G4String &name)
 
- Public Member Functions inherited from G4VEmProcess
 G4VEmProcess (const G4String &name, G4ProcessType type=fElectromagnetic)
 
virtual ~G4VEmProcess ()
 
void PreparePhysicsTable (const G4ParticleDefinition &)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
void StartTracking (G4Track *)
 
G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
G4VParticleChangePostStepDoIt (const G4Track &, const G4Step &)
 
G4bool StorePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii=false)
 
G4bool RetrievePhysicsTable (const G4ParticleDefinition *, const G4String &directory, G4bool ascii)
 
G4double CrossSectionPerVolume (G4double kineticEnergy, const G4MaterialCutsCouple *couple)
 
G4double ComputeCrossSectionPerAtom (G4double kineticEnergy, G4double Z, G4double A=0., G4double cut=0.0)
 
G4double MeanFreePath (const G4Track &track)
 
G4double GetLambda (G4double &kinEnergy, const G4MaterialCutsCouple *couple)
 
void SetLambdaBinning (G4int nbins)
 
G4int LambdaBinning () const
 
void SetMinKinEnergy (G4double e)
 
G4double MinKinEnergy () const
 
void SetMaxKinEnergy (G4double e)
 
G4double MaxKinEnergy () const
 
void SetMinKinEnergyPrim (G4double e)
 
G4PhysicsTableLambdaTable () const
 
G4PhysicsTableLambdaTablePrim () const
 
const G4ParticleDefinitionParticle () const
 
const G4ParticleDefinitionSecondaryParticle () const
 
G4VEmModelSelectModelForMaterial (G4double kinEnergy, size_t &idxRegion) const
 
void AddEmModel (G4int, G4VEmModel *, const G4Region *region=0)
 
G4VEmModelEmModel (G4int index=1) const
 
void SetEmModel (G4VEmModel *, G4int index=1)
 
void UpdateEmModel (const G4String &, G4double, G4double)
 
G4VEmModelGetModelByIndex (G4int idx=0, G4bool ver=false) const
 
const G4ElementGetCurrentElement () const
 
void SetCrossSectionBiasingFactor (G4double f, G4bool flag=true)
 
G4double CrossSectionBiasingFactor () const
 
void ActivateForcedInteraction (G4double length=0.0, const G4String &r="", G4bool flag=true)
 
void ActivateSecondaryBiasing (const G4String &region, G4double factor, G4double energyLimit)
 
void SetPolarAngleLimit (G4double a)
 
G4double PolarAngleLimit () const
 
void SetLambdaFactor (G4double val)
 
void SetIntegral (G4bool val)
 
G4bool IsIntegral () const
 
void SetApplyCuts (G4bool val)
 
void SetBuildTableFlag (G4bool val)
 
- Public Member Functions inherited from G4VDiscreteProcess
 G4VDiscreteProcess (const G4String &, G4ProcessType aType=fNotDefined)
 
 G4VDiscreteProcess (G4VDiscreteProcess &)
 
virtual ~G4VDiscreteProcess ()
 
virtual G4double AlongStepGetPhysicalInteractionLength (const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
 
virtual G4double AtRestGetPhysicalInteractionLength (const G4Track &, G4ForceCondition *)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &, const G4Step &)
 
virtual G4VParticleChangeAlongStepDoIt (const G4Track &, const G4Step &)
 
- Public Member Functions inherited from G4VProcess
 G4VProcess (const G4String &aName="NoName", G4ProcessType aType=fNotDefined)
 
 G4VProcess (const G4VProcess &right)
 
virtual ~G4VProcess ()
 
G4int operator== (const G4VProcess &right) const
 
G4int operator!= (const G4VProcess &right) const
 
G4double GetCurrentInteractionLength () const
 
void SetPILfactor (G4double value)
 
G4double GetPILfactor () const
 
G4double AlongStepGPIL (const G4Track &track, G4double previousStepSize, G4double currentMinimumStep, G4double &proposedSafety, G4GPILSelection *selection)
 
G4double AtRestGPIL (const G4Track &track, G4ForceCondition *condition)
 
G4double PostStepGPIL (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
const G4StringGetPhysicsTableFileName (const G4ParticleDefinition *, const G4String &directory, const G4String &tableName, G4bool ascii=false)
 
const G4StringGetProcessName () const
 
G4ProcessType GetProcessType () const
 
void SetProcessType (G4ProcessType)
 
G4int GetProcessSubType () const
 
void SetProcessSubType (G4int)
 
virtual void EndTracking ()
 
virtual void SetProcessManager (const G4ProcessManager *)
 
virtual const G4ProcessManagerGetProcessManager ()
 
virtual void ResetNumberOfInteractionLengthLeft ()
 
G4double GetNumberOfInteractionLengthLeft () const
 
G4double GetTotalNumberOfInteractionLengthTraversed () const
 
G4bool isAtRestDoItIsEnabled () const
 
G4bool isAlongStepDoItIsEnabled () const
 
G4bool isPostStepDoItIsEnabled () const
 
virtual void DumpInfo () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
virtual void SetMasterProcess (G4VProcess *masterP)
 
const G4VProcessGetMasterProcess () const
 
virtual void BuildWorkerPhysicsTable (const G4ParticleDefinition &part)
 
virtual void PrepareWorkerPhysicsTable (const G4ParticleDefinition &)
 

Protected Member Functions

virtual void InitialiseProcess (const G4ParticleDefinition *)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
void BuildAsymmetryTable (const G4ParticleDefinition &part)
 
G4double ComputeAsymmetry (G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tAsymmetry)
 
virtual G4double GetMeanFreePath (const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
 
virtual G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
- Protected Member Functions inherited from G4VEmProcess
virtual G4double MinPrimaryEnergy (const G4ParticleDefinition *, const G4Material *)
 
G4VEmModelSelectModel (G4double &kinEnergy, size_t index)
 
G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
G4PhysicsVectorLambdaPhysicsVector (const G4MaterialCutsCouple *)
 
G4double RecalculateLambda (G4double kinEnergy, const G4MaterialCutsCouple *couple)
 
G4ParticleChangeForGammaGetParticleChange ()
 
void SetParticle (const G4ParticleDefinition *p)
 
void SetSecondaryParticle (const G4ParticleDefinition *p)
 
size_t CurrentMaterialCutsCoupleIndex () const
 
G4double GetGammaEnergyCut ()
 
G4double GetElectronEnergyCut ()
 
void SetStartFromNullFlag (G4bool val)
 
void SetSplineFlag (G4bool val)
 
- Protected Member Functions inherited from G4VProcess
void SubtractNumberOfInteractionLengthLeft (G4double previousStepSize)
 
void ClearNumberOfInteractionLengthLeft ()
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VProcess
static const G4StringGetProcessTypeName (G4ProcessType)
 
- Protected Attributes inherited from G4VEmProcess
G4ParticleChangeForGamma fParticleChange
 
- Protected Attributes inherited from G4VProcess
const G4ProcessManageraProcessManager
 
G4VParticleChangepParticleChange
 
G4ParticleChange aParticleChange
 
G4double theNumberOfInteractionLengthLeft
 
G4double currentInteractionLength
 
G4double theInitialNumberOfInteractionLength
 
G4String theProcessName
 
G4String thePhysicsTableFileName
 
G4ProcessType theProcessType
 
G4int theProcessSubType
 
G4double thePILfactor
 
G4bool enableAtRestDoIt
 
G4bool enableAlongStepDoIt
 
G4bool enablePostStepDoIt
 
G4int verboseLevel
 

Detailed Description

Definition at line 73 of file G4PolarizedCompton.hh.

Constructor & Destructor Documentation

G4PolarizedCompton::G4PolarizedCompton ( const G4String processName = "pol-compt",
G4ProcessType  type = fElectromagnetic 
)

Definition at line 70 of file G4PolarizedCompton.cc.

References fComptonScattering, python.hepunit::GeV, python.hepunit::keV, G4VEmProcess::SetLambdaBinning(), G4VEmProcess::SetMaxKinEnergy(), G4VEmProcess::SetMinKinEnergy(), and G4VProcess::SetProcessSubType().

71  :
72  G4VEmProcess (processName, type),
73  buildAsymmetryTable(true),
74  useAsymmetryTable(true),
75  isInitialised(false),
76  selectedModel(0),
77  mType(10),
78  theAsymmetryTable(NULL)
79 {
80  SetLambdaBinning(90);
81  SetMinKinEnergy(0.1*keV);
82  SetMaxKinEnergy(100.0*GeV);
84  emModel = 0;
85 }
G4VEmProcess(const G4String &name, G4ProcessType type=fElectromagnetic)
Definition: G4VEmProcess.cc:90
void SetLambdaBinning(G4int nbins)
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
void SetMaxKinEnergy(G4double e)
void SetMinKinEnergy(G4double e)
G4PolarizedCompton::~G4PolarizedCompton ( )
virtual

Definition at line 89 of file G4PolarizedCompton.cc.

90 {
91  if (theAsymmetryTable) {
92  delete theAsymmetryTable;
93  }
94 }

Member Function Documentation

void G4PolarizedCompton::BuildAsymmetryTable ( const G4ParticleDefinition part)
protected

Definition at line 302 of file G4PolarizedCompton.cc.

References ComputeAsymmetry(), G4PhysicsTable::GetFlag(), G4PhysicsVector::GetLowEdgeEnergy(), G4ProductionCutsTable::GetMaterialCutsCouple(), G4ProductionCutsTable::GetProductionCutsTable(), G4ProductionCutsTable::GetTableSize(), G4VEmProcess::LambdaBinning(), G4VEmProcess::LambdaPhysicsVector(), G4PhysicsVector::PutValue(), and G4PhysicsTableHelper::SetPhysicsVector().

Referenced by BuildPhysicsTable().

303 {
304  // Access to materials
305  const G4ProductionCutsTable* theCoupleTable=
307  size_t numOfCouples = theCoupleTable->GetTableSize();
308  for(size_t i=0; i<numOfCouples; ++i) {
309  if (!theAsymmetryTable) break;
310  if (theAsymmetryTable->GetFlag(i)) {
311 
312  // create physics vector and fill it
313  const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);
314  // use same parameters as for lambda
315  G4PhysicsVector* aVector = LambdaPhysicsVector(couple);
316  // modelManager->FillLambdaVector(aVector, couple, startFromNull);
317 
318  for (G4int j = 0 ; j < LambdaBinning() ; ++j ) {
319  G4double lowEdgeEnergy = aVector->GetLowEdgeEnergy(j);
320  G4double tasm=0.;
321  G4double asym = ComputeAsymmetry(lowEdgeEnergy, couple, part, 0., tasm);
322  aVector->PutValue(j,asym);
323  }
324 
325  G4PhysicsTableHelper::SetPhysicsVector(theAsymmetryTable, i, aVector);
326  }
327  }
328 
329 }
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
G4double GetLowEdgeEnergy(size_t binNumber) const
int G4int
Definition: G4Types.hh:78
G4int LambdaBinning() const
void PutValue(size_t index, G4double theValue)
static G4ProductionCutsTable * GetProductionCutsTable()
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
G4double ComputeAsymmetry(G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tAsymmetry)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4bool GetFlag(size_t i) const
double G4double
Definition: G4Types.hh:76
void G4PolarizedCompton::BuildPhysicsTable ( const G4ParticleDefinition part)
protectedvirtual

Reimplemented from G4VProcess.

Definition at line 291 of file G4PolarizedCompton.cc.

References BuildAsymmetryTable(), and G4VEmProcess::BuildPhysicsTable().

292 {
293  // *** build (unpolarized) cross section tables (Lambda)
295  if(buildAsymmetryTable)
296  BuildAsymmetryTable(part);
297 }
void BuildAsymmetryTable(const G4ParticleDefinition &part)
void BuildPhysicsTable(const G4ParticleDefinition &)
G4double G4PolarizedCompton::ComputeAsymmetry ( G4double  energy,
const G4MaterialCutsCouple couple,
const G4ParticleDefinition particle,
G4double  cut,
G4double tAsymmetry 
)
protected

Definition at line 334 of file G4PolarizedCompton.cc.

References G4VEmModel::CrossSection(), G4PolarizedComptonModel::SetBeamPolarization(), and G4PolarizedComptonModel::SetTargetPolarization().

Referenced by BuildAsymmetryTable().

339 {
340  G4double lAsymmetry = 0.0;
341  tAsymmetry=0;
342 
343  //
344  // calculate polarized cross section
345  //
346  G4ThreeVector thePolarization=G4ThreeVector(0.,0.,1.);
347  emModel->SetTargetPolarization(thePolarization);
348  emModel->SetBeamPolarization(thePolarization);
349  G4double sigma2=emModel->CrossSection(couple,&aParticle,energy,cut,energy);
350 
351  //
352  // calculate unpolarized cross section
353  //
354  thePolarization=G4ThreeVector();
355  emModel->SetTargetPolarization(thePolarization);
356  emModel->SetBeamPolarization(thePolarization);
357  G4double sigma0=emModel->CrossSection(couple,&aParticle,energy,cut,energy);
358 
359  // determine assymmetries
360  if (sigma0>0.) {
361  lAsymmetry=sigma2/sigma0-1.;
362  }
363  return lAsymmetry;
364 }
CLHEP::Hep3Vector G4ThreeVector
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:467
void SetBeamPolarization(const G4ThreeVector &pBeam)
double G4double
Definition: G4Types.hh:76
void SetTargetPolarization(const G4ThreeVector &pTarget)
G4double G4PolarizedCompton::GetMeanFreePath ( const G4Track aTrack,
G4double  previousStepSize,
G4ForceCondition condition 
)
protectedvirtual

Implements G4VDiscreteProcess.

Definition at line 139 of file G4PolarizedCompton.cc.

References G4VEmProcess::CurrentMaterialCutsCoupleIndex(), DBL_MAX, G4cout, G4endl, G4Track::GetDynamicParticle(), G4PolarizationManager::GetInstance(), G4DynamicParticle::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetMaterial(), G4VEmProcess::GetMeanFreePath(), G4DynamicParticle::GetMomentumDirection(), G4VPhysicalVolume::GetName(), G4LogicalVolume::GetName(), G4Track::GetPolarization(), G4PhysicsVector::GetValue(), G4Track::GetVolume(), G4PolarizationManager::GetVolumePolarization(), G4PolarizationManager::IsPolarized(), python.hepunit::mm, G4StokesVector::p3(), and G4VProcess::verboseLevel.

143 {
144  // *** get unploarised mean free path from lambda table ***
145  G4double mfp = G4VEmProcess::GetMeanFreePath(aTrack, previousStepSize, condition);
146 
147 
148  if (theAsymmetryTable && useAsymmetryTable) {
149  // *** get asymmetry, if target is polarized ***
150  const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
151  const G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
152  const G4StokesVector GammaPolarization = aTrack.GetPolarization();
153  const G4ParticleMomentum GammaDirection0 = aDynamicGamma->GetMomentumDirection();
154 
155  G4Material* aMaterial = aTrack.GetMaterial();
156  G4VPhysicalVolume* aPVolume = aTrack.GetVolume();
157  G4LogicalVolume* aLVolume = aPVolume->GetLogicalVolume();
158 
159  // G4Material* bMaterial = aLVolume->GetMaterial();
161 
162  const G4bool VolumeIsPolarized = polarizationManger->IsPolarized(aLVolume);
163  G4StokesVector ElectronPolarization = polarizationManger->GetVolumePolarization(aLVolume);
164 
165  if (!VolumeIsPolarized || mfp == DBL_MAX) return mfp;
166 
167  if (verboseLevel>=2) {
168 
169  G4cout << " Mom " << GammaDirection0 << G4endl;
170  G4cout << " Polarization " << GammaPolarization << G4endl;
171  G4cout << " MaterialPol. " << ElectronPolarization << G4endl;
172  G4cout << " Phys. Volume " << aPVolume->GetName() << G4endl;
173  G4cout << " Log. Volume " << aLVolume->GetName() << G4endl;
174  G4cout << " Material " << aMaterial << G4endl;
175  }
176 
178  G4PhysicsVector * aVector=(*theAsymmetryTable)(midx);
179 
180  G4double asymmetry=0;
181  if (aVector) {
182  G4bool isOutRange;
183  asymmetry = aVector->GetValue(GammaEnergy, isOutRange);
184  } else {
185  G4cout << " MaterialIndex " << midx << " is out of range \n";
186  asymmetry=0;
187  }
188 
189  // we have to determine angle between particle motion
190  // and target polarisation here
191  // circ pol * Vec(ElectronPol)*Vec(PhotonMomentum)
192  // both vectors in global reference frame
193 
194  G4double pol=ElectronPolarization*GammaDirection0;
195 
196  G4double polProduct = GammaPolarization.p3() * pol;
197  mfp *= 1. / ( 1. + polProduct * asymmetry );
198 
199  if (verboseLevel>=2) {
200  G4cout << " MeanFreePath: " << mfp / mm << " mm " << G4endl;
201  G4cout << " Asymmetry: " << asymmetry << G4endl;
202  G4cout << " PolProduct: " << polProduct << G4endl;
203  }
204  }
205 
206  return mfp;
207 }
G4double condition(const G4ErrorSymMatrix &m)
const G4ThreeVector & GetPolarization() const
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
G4int verboseLevel
Definition: G4VProcess.hh:368
G4String GetName() const
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
static G4PolarizationManager * GetInstance()
int G4int
Definition: G4Types.hh:78
G4double p3() const
size_t CurrentMaterialCutsCoupleIndex() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
const G4ThreeVector & GetMomentumDirection() const
G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
G4Material * GetMaterial() const
G4LogicalVolume * GetLogicalVolume() const
bool IsPolarized(G4LogicalVolume *lVol) const
G4VPhysicalVolume * GetVolume() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void G4PolarizedCompton::InitialiseProcess ( const G4ParticleDefinition )
protectedvirtual

Implements G4VEmProcess.

Definition at line 98 of file G4PolarizedCompton.cc.

References G4VEmProcess::AddEmModel(), G4Electron::Electron(), G4VEmProcess::MaxKinEnergy(), G4VEmProcess::MinKinEnergy(), G4VEmProcess::SetBuildTableFlag(), G4VEmModel::SetHighEnergyLimit(), G4VEmModel::SetLowEnergyLimit(), and G4VEmProcess::SetSecondaryParticle().

99 {
100  if(!isInitialised) {
101  isInitialised = true;
102  SetBuildTableFlag(true);
104  G4double emin = MinKinEnergy();
105  G4double emax = MaxKinEnergy();
106  emModel = new G4PolarizedComptonModel();
107  if(0 == mType) selectedModel = new G4KleinNishinaCompton();
108  else if(10 == mType) selectedModel = emModel;
109  selectedModel->SetLowEnergyLimit(emin);
110  selectedModel->SetHighEnergyLimit(emax);
111  AddEmModel(1, selectedModel);
112  }
113 }
void SetBuildTableFlag(G4bool val)
G4double MaxKinEnergy() const
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:683
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
void SetSecondaryParticle(const G4ParticleDefinition *p)
static G4Electron * Electron()
Definition: G4Electron.cc:94
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:690
G4double MinKinEnergy() const
G4bool G4PolarizedCompton::IsApplicable ( const G4ParticleDefinition p)
inlinevirtual

Implements G4VEmProcess.

Definition at line 138 of file G4PolarizedCompton.hh.

References G4Gamma::Gamma().

139 {
140  return (&p == G4Gamma::Gamma());
141 }
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
G4double G4PolarizedCompton::PostStepGetPhysicalInteractionLength ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
)
protectedvirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 209 of file G4PolarizedCompton.cc.

References G4VEmProcess::CurrentMaterialCutsCoupleIndex(), DBL_MAX, G4cout, G4endl, G4Track::GetDynamicParticle(), G4PolarizationManager::GetInstance(), G4DynamicParticle::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetMaterial(), G4DynamicParticle::GetMomentumDirection(), G4VPhysicalVolume::GetName(), G4LogicalVolume::GetName(), G4Track::GetPolarization(), G4PhysicsVector::GetValue(), G4Track::GetVolume(), G4PolarizationManager::GetVolumePolarization(), G4PolarizationManager::IsPolarized(), python.hepunit::mm, G4StokesVector::p3(), G4VEmProcess::PostStepGetPhysicalInteractionLength(), and G4VProcess::verboseLevel.

213 {
214  // *** get unploarised mean free path from lambda table ***
216 
217 
218  if (theAsymmetryTable && useAsymmetryTable) {
219  // *** get asymmetry, if target is polarized ***
220  const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
221  const G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
222  const G4StokesVector GammaPolarization = aTrack.GetPolarization();
223  const G4ParticleMomentum GammaDirection0 = aDynamicGamma->GetMomentumDirection();
224 
225  G4Material* aMaterial = aTrack.GetMaterial();
226  G4VPhysicalVolume* aPVolume = aTrack.GetVolume();
227  G4LogicalVolume* aLVolume = aPVolume->GetLogicalVolume();
228 
229  // G4Material* bMaterial = aLVolume->GetMaterial();
231 
232  const G4bool VolumeIsPolarized = polarizationManger->IsPolarized(aLVolume);
233  G4StokesVector ElectronPolarization = polarizationManger->GetVolumePolarization(aLVolume);
234 
235  if (!VolumeIsPolarized || mfp == DBL_MAX) return mfp;
236 
237  if (verboseLevel>=2) {
238 
239  G4cout << " Mom " << GammaDirection0 << G4endl;
240  G4cout << " Polarization " << GammaPolarization << G4endl;
241  G4cout << " MaterialPol. " << ElectronPolarization << G4endl;
242  G4cout << " Phys. Volume " << aPVolume->GetName() << G4endl;
243  G4cout << " Log. Volume " << aLVolume->GetName() << G4endl;
244  G4cout << " Material " << aMaterial << G4endl;
245  }
246 
248  G4PhysicsVector * aVector=(*theAsymmetryTable)(midx);
249 
250  G4double asymmetry=0;
251  if (aVector) {
252  G4bool isOutRange;
253  asymmetry = aVector->GetValue(GammaEnergy, isOutRange);
254  } else {
255  G4cout << " MaterialIndex " << midx << " is out of range \n";
256  asymmetry=0;
257  }
258 
259  // we have to determine angle between particle motion
260  // and target polarisation here
261  // circ pol * Vec(ElectronPol)*Vec(PhotonMomentum)
262  // both vectors in global reference frame
263 
264  G4double pol=ElectronPolarization*GammaDirection0;
265 
266  G4double polProduct = GammaPolarization.p3() * pol;
267  mfp *= 1. / ( 1. + polProduct * asymmetry );
268 
269  if (verboseLevel>=2) {
270  G4cout << " MeanFreePath: " << mfp / mm << " mm " << G4endl;
271  G4cout << " Asymmetry: " << asymmetry << G4endl;
272  G4cout << " PolProduct: " << polProduct << G4endl;
273  }
274  }
275 
276  return mfp;
277 }
G4double condition(const G4ErrorSymMatrix &m)
G4double GetValue(G4double theEnergy, G4bool &isOutRange) const
G4int verboseLevel
Definition: G4VProcess.hh:368
G4String GetName() const
G4double GetKineticEnergy() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:578
static G4PolarizationManager * GetInstance()
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
int G4int
Definition: G4Types.hh:78
G4double p3() const
size_t CurrentMaterialCutsCoupleIndex() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
const G4ThreeVector & GetMomentumDirection() const
G4LogicalVolume * GetLogicalVolume() const
bool IsPolarized(G4LogicalVolume *lVol) const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void G4PolarizedCompton::PreparePhysicsTable ( const G4ParticleDefinition part)
protectedvirtual

Reimplemented from G4VProcess.

Definition at line 281 of file G4PolarizedCompton.cc.

References G4PhysicsTableHelper::PreparePhysicsTable(), and G4VEmProcess::PreparePhysicsTable().

282 {
284  if(buildAsymmetryTable)
285  theAsymmetryTable = G4PhysicsTableHelper::PreparePhysicsTable(theAsymmetryTable);
286 }
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
void PreparePhysicsTable(const G4ParticleDefinition &)
void G4PolarizedCompton::PrintInfo ( )
virtual

Implements G4VEmProcess.

Definition at line 117 of file G4PolarizedCompton.cc.

References G4cout, G4endl, and G4VEmModel::GetName().

118 {
119  G4cout << " Total cross sections has a good parametrisation"
120  << " from 10 KeV to (100/Z) GeV"
121  << "\n Sampling according " << selectedModel->GetName() << " model"
122  << G4endl;
123 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
Definition: G4VEmModel.hh:753
void G4PolarizedCompton::SetModel ( const G4String name)

Definition at line 127 of file G4PolarizedCompton.cc.

128 {
129  if(ss == "Klein-Nishina") mType = 0;
130  if(ss == "Polarized-Compton") mType = 10;
131 }

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