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

#include <G4eplusPolarizedAnnihilation.hh>

Inheritance diagram for G4eplusPolarizedAnnihilation:
G4VEmProcess G4VDiscreteProcess G4VProcess

Public Member Functions

 G4eplusPolarizedAnnihilation (const G4String &name="pol-annihil")
 
virtual ~G4eplusPolarizedAnnihilation ()
 
virtual G4bool IsApplicable (const G4ParticleDefinition &p)
 
virtual G4VParticleChangeAtRestDoIt (const G4Track &track, const G4Step &stepData)
 
G4double AtRestGetPhysicalInteractionLength (const G4Track &track, G4ForceCondition *condition)
 
virtual void PrintInfo ()
 
G4double GetMeanFreePath (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
G4double PostStepGetPhysicalInteractionLength (const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
void BuildAsymmetryTable (const G4ParticleDefinition &part)
 
virtual void PreparePhysicsTable (const G4ParticleDefinition &)
 
G4double ComputeAsymmetry (G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tasm)
 
- 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 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 *)
 
- 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 63 of file G4eplusPolarizedAnnihilation.hh.

Constructor & Destructor Documentation

G4eplusPolarizedAnnihilation::G4eplusPolarizedAnnihilation ( const G4String name = "pol-annihil")

Definition at line 75 of file G4eplusPolarizedAnnihilation.cc.

References G4VProcess::enableAtRestDoIt, fAnnihilation, and G4VProcess::SetProcessSubType().

76  : G4VEmProcess(name), isInitialised(false),
77  theAsymmetryTable(NULL),
78  theTransverseAsymmetryTable(NULL)
79 {
80  enableAtRestDoIt = true;
82  emModel = 0;
83 }
G4VEmProcess(const G4String &name, G4ProcessType type=fElectromagnetic)
Definition: G4VEmProcess.cc:90
G4bool enableAtRestDoIt
Definition: G4VProcess.hh:350
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:432
G4eplusPolarizedAnnihilation::~G4eplusPolarizedAnnihilation ( )
virtual

Definition at line 87 of file G4eplusPolarizedAnnihilation.cc.

88 {
89  delete theAsymmetryTable;
90  delete theTransverseAsymmetryTable;
91 }

Member Function Documentation

G4VParticleChange * G4eplusPolarizedAnnihilation::AtRestDoIt ( const G4Track track,
const G4Step stepData 
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 353 of file G4eplusPolarizedAnnihilation.cc.

References G4ParticleChangeForGamma::AddSecondary(), python.hepunit::electron_mass_c2, G4VEmProcess::fParticleChange, fStopAndKill, G4UniformRand, G4Gamma::Gamma(), G4ParticleChangeForGamma::InitializeForPostStep(), G4VParticleChange::ProposeTrackStatus(), G4VParticleChange::SetNumberOfSecondaries(), and python.hepunit::twopi.

362 {
364 
366 
367  G4double cosTeta = 2.*G4UniformRand()-1. , sinTeta = std::sqrt(1.-cosTeta*cosTeta);
368  G4double phi = twopi * G4UniformRand();
369  G4ThreeVector direction (sinTeta*std::cos(phi), sinTeta*std::sin(phi), cosTeta);
371  direction, electron_mass_c2) );
373  -direction, electron_mass_c2) );
374  // Kill the incident positron
375  //
377  return &fParticleChange;
378 }
G4ParticleChangeForGamma fParticleChange
void AddSecondary(G4DynamicParticle *aParticle)
#define G4UniformRand()
Definition: Randomize.hh:87
float electron_mass_c2
Definition: hepunit.py:274
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetNumberOfSecondaries(G4int totSecondaries)
double G4double
Definition: G4Types.hh:76
void ProposeTrackStatus(G4TrackStatus status)
void InitializeForPostStep(const G4Track &)
G4double G4eplusPolarizedAnnihilation::AtRestGetPhysicalInteractionLength ( const G4Track track,
G4ForceCondition condition 
)
inlinevirtual

Reimplemented from G4VDiscreteProcess.

Definition at line 135 of file G4eplusPolarizedAnnihilation.hh.

References NotForced.

137 {
138  *condition = NotForced;
139  return 0.0;
140 }
G4double condition(const G4ErrorSymMatrix &m)
void G4eplusPolarizedAnnihilation::BuildAsymmetryTable ( const G4ParticleDefinition part)

Definition at line 266 of file G4eplusPolarizedAnnihilation.cc.

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

Referenced by BuildPhysicsTable().

267 {
268  // Access to materials
269  const G4ProductionCutsTable* theCoupleTable=
271  size_t numOfCouples = theCoupleTable->GetTableSize();
272  G4cout<<" annih-numOfCouples="<<numOfCouples<<"\n";
273  for(size_t i=0; i<numOfCouples; ++i) {
274  G4cout<<"annih- "<<i<<"/"<<numOfCouples<<"\n";
275  if (!theAsymmetryTable) break;
276  G4cout<<"annih- "<<theAsymmetryTable->GetFlag(i)<<"\n";
277  if (theAsymmetryTable->GetFlag(i)) {
278  G4cout<<" building pol-annih ... \n";
279 
280  // create physics vector and fill it
281  const G4MaterialCutsCouple* couple = theCoupleTable->GetMaterialCutsCouple(i);
282 
283  // use same parameters as for lambda
284  G4PhysicsVector* aVector = LambdaPhysicsVector(couple);
285  G4PhysicsVector* tVector = LambdaPhysicsVector(couple);
286 
287  for (G4int j = 0 ; j < LambdaBinning() ; ++j ) {
288  G4double lowEdgeEnergy = aVector->GetLowEdgeEnergy(j);
289  G4double tasm=0.;
290  G4double asym = ComputeAsymmetry(lowEdgeEnergy, couple, part, 0., tasm);
291  aVector->PutValue(j,asym);
292  tVector->PutValue(j,tasm);
293  }
294 
295  G4PhysicsTableHelper::SetPhysicsVector(theAsymmetryTable, i, aVector);
296  G4PhysicsTableHelper::SetPhysicsVector(theTransverseAsymmetryTable, i, tVector);
297  }
298  }
299 
300 }
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
G4double ComputeAsymmetry(G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tasm)
G4GLOB_DLL std::ostream G4cout
void PutValue(size_t index, G4double theValue)
static G4ProductionCutsTable * GetProductionCutsTable()
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4bool GetFlag(size_t i) const
double G4double
Definition: G4Types.hh:76
void G4eplusPolarizedAnnihilation::BuildPhysicsTable ( const G4ParticleDefinition pd)
virtual

Reimplemented from G4VProcess.

Definition at line 252 of file G4eplusPolarizedAnnihilation.cc.

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

253 {
255  BuildAsymmetryTable(pd);
256 }
void BuildPhysicsTable(const G4ParticleDefinition &)
void BuildAsymmetryTable(const G4ParticleDefinition &part)
G4double G4eplusPolarizedAnnihilation::ComputeAsymmetry ( G4double  energy,
const G4MaterialCutsCouple couple,
const G4ParticleDefinition particle,
G4double  cut,
G4double tasm 
)

Definition at line 305 of file G4eplusPolarizedAnnihilation.cc.

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

Referenced by BuildAsymmetryTable().

310 {
311  G4double lAsymmetry = 0.0;
312  tAsymmetry = 0.0;
313 
314  // calculate polarized cross section
315  theTargetPolarization=G4ThreeVector(0.,0.,1.);
316  emModel->SetTargetPolarization(theTargetPolarization);
317  emModel->SetBeamPolarization(theTargetPolarization);
318  G4double sigma2=emModel->CrossSection(couple,&aParticle,energy,cut,energy);
319 
320  // calculate transversely polarized cross section
321  theTargetPolarization=G4ThreeVector(1.,0.,0.);
322  emModel->SetTargetPolarization(theTargetPolarization);
323  emModel->SetBeamPolarization(theTargetPolarization);
324  G4double sigma3=emModel->CrossSection(couple,&aParticle,energy,cut,energy);
325 
326  // calculate unpolarized cross section
327  theTargetPolarization=G4ThreeVector();
328  emModel->SetTargetPolarization(theTargetPolarization);
329  emModel->SetBeamPolarization(theTargetPolarization);
330  G4double sigma0=emModel->CrossSection(couple,&aParticle,energy,cut,energy);
331 
332  // determine assymmetries
333  if (sigma0>0.) {
334  lAsymmetry=sigma2/sigma0-1.;
335  tAsymmetry=sigma3/sigma0-1.;
336  }
337  return lAsymmetry;
338 
339 }
void SetBeamPolarization(const G4ThreeVector &pBeam)
CLHEP::Hep3Vector G4ThreeVector
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
void SetTargetPolarization(const G4ThreeVector &pTarget)
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
Definition: G4VEmModel.hh:467
double G4double
Definition: G4Types.hh:76
G4double G4eplusPolarizedAnnihilation::GetMeanFreePath ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
)
virtual

Implements G4VDiscreteProcess.

Definition at line 120 of file G4eplusPolarizedAnnihilation.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(), G4PolarizationHelper::GetParticleFrameX(), G4PolarizationHelper::GetParticleFrameY(), G4Track::GetPolarization(), G4Track::GetVolume(), G4PolarizationManager::GetVolumePolarization(), G4PolarizationManager::IsPolarized(), python.hepunit::mm, G4VProcess::verboseLevel, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

123 {
124  G4double mfp = G4VEmProcess::GetMeanFreePath(track, previousStepSize, condition);
125 
126  if (theAsymmetryTable) {
127 
128  G4Material* aMaterial = track.GetMaterial();
129  G4VPhysicalVolume* aPVolume = track.GetVolume();
130  G4LogicalVolume* aLVolume = aPVolume->GetLogicalVolume();
131 
132  // G4Material* bMaterial = aLVolume->GetMaterial();
134 
135  const G4bool volumeIsPolarized = polarizationManger->IsPolarized(aLVolume);
136  G4StokesVector electronPolarization = polarizationManger->GetVolumePolarization(aLVolume);
137 
138  if (!volumeIsPolarized || mfp == DBL_MAX) return mfp;
139 
140  // *** get asymmetry, if target is polarized ***
141  const G4DynamicParticle* aDynamicPositron = track.GetDynamicParticle();
142  const G4double positronEnergy = aDynamicPositron->GetKineticEnergy();
143  const G4StokesVector positronPolarization = track.GetPolarization();
144  const G4ParticleMomentum positronDirection0 = aDynamicPositron->GetMomentumDirection();
145 
146  if (verboseLevel>=2) {
147 
148  G4cout << " Mom " << positronDirection0 << G4endl;
149  G4cout << " Polarization " << positronPolarization << G4endl;
150  G4cout << " MaterialPol. " << electronPolarization << G4endl;
151  G4cout << " Phys. Volume " << aPVolume->GetName() << G4endl;
152  G4cout << " Log. Volume " << aLVolume->GetName() << G4endl;
153  G4cout << " Material " << aMaterial << G4endl;
154  }
155 
156  G4bool isOutRange;
158  G4double lAsymmetry = (*theAsymmetryTable)(idx)->
159  GetValue(positronEnergy, isOutRange);
160  G4double tAsymmetry = (*theTransverseAsymmetryTable)(idx)->
161  GetValue(positronEnergy, isOutRange);
162 
163  G4double polZZ = positronPolarization.z()*
164  electronPolarization*positronDirection0;
165  G4double polXX = positronPolarization.x()*
166  electronPolarization*G4PolarizationHelper::GetParticleFrameX(positronDirection0);
167  G4double polYY = positronPolarization.y()*
168  electronPolarization*G4PolarizationHelper::GetParticleFrameY(positronDirection0);
169 
170  G4double impact = 1. + polZZ*lAsymmetry + (polXX + polYY)*tAsymmetry;
171 
172  mfp *= 1. / impact;
173 
174  if (verboseLevel>=2) {
175  G4cout << " MeanFreePath: " << mfp / mm << " mm " << G4endl;
176  G4cout << " Asymmetry: " << lAsymmetry << ", " << tAsymmetry << G4endl;
177  G4cout << " PolProduct: " << polXX << ", " << polYY << ", " << polZZ << G4endl;
178  }
179  }
180 
181  return mfp;
182 }
G4double condition(const G4ErrorSymMatrix &m)
const G4ThreeVector & GetPolarization() const
G4int verboseLevel
Definition: G4VProcess.hh:368
G4String GetName() const
G4double GetKineticEnergy() const
double x() const
const G4DynamicParticle * GetDynamicParticle() const
static G4PolarizationManager * GetInstance()
int G4int
Definition: G4Types.hh:78
double z() 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
double y() const
bool IsPolarized(G4LogicalVolume *lVol) const
G4VPhysicalVolume * GetVolume() const
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void G4eplusPolarizedAnnihilation::InitialiseProcess ( const G4ParticleDefinition )
protectedvirtual

Implements G4VEmProcess.

Definition at line 95 of file G4eplusPolarizedAnnihilation.cc.

References G4VEmProcess::AddEmModel(), G4Gamma::Gamma(), python.hepunit::keV, G4VEmProcess::SetBuildTableFlag(), G4VEmModel::SetHighEnergyLimit(), G4VEmProcess::SetLambdaBinning(), G4VEmModel::SetLowEnergyLimit(), G4VEmProcess::SetMaxKinEnergy(), G4VEmProcess::SetMinKinEnergy(), G4VEmProcess::SetSecondaryParticle(), G4VEmProcess::SetStartFromNullFlag(), and python.hepunit::TeV.

96 {
97  if(!isInitialised) {
98  isInitialised = true;
99  // SetVerboseLevel(3);
100  SetBuildTableFlag(true);
101  SetStartFromNullFlag(false);
103  G4double emin = 0.1*keV;
104  G4double emax = 100.*TeV;
105  SetLambdaBinning(120);
106  SetMinKinEnergy(emin);
107  SetMaxKinEnergy(emax);
108  emModel = new G4PolarizedAnnihilationModel();
109  emModel->SetLowEnergyLimit(emin);
110  emModel->SetHighEnergyLimit(emax);
111  AddEmModel(1, emModel);
112  }
113 }
void SetBuildTableFlag(G4bool val)
void SetStartFromNullFlag(G4bool val)
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:683
void SetLambdaBinning(G4int nbins)
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
void SetMaxKinEnergy(G4double e)
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=0)
void SetSecondaryParticle(const G4ParticleDefinition *p)
void SetMinKinEnergy(G4double e)
double G4double
Definition: G4Types.hh:76
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:690
G4bool G4eplusPolarizedAnnihilation::IsApplicable ( const G4ParticleDefinition p)
inlinevirtual

Implements G4VEmProcess.

Definition at line 128 of file G4eplusPolarizedAnnihilation.hh.

References G4Positron::Positron().

129 {
130  return (&p == G4Positron::Positron());
131 }
static G4Positron * Positron()
Definition: G4Positron.cc:94
G4double G4eplusPolarizedAnnihilation::PostStepGetPhysicalInteractionLength ( const G4Track track,
G4double  previousStepSize,
G4ForceCondition condition 
)
virtual

Reimplemented from G4VDiscreteProcess.

Definition at line 186 of file G4eplusPolarizedAnnihilation.cc.

References G4VEmProcess::CurrentMaterialCutsCoupleIndex(), DBL_MAX, G4cout, G4endl, G4Track::GetDynamicParticle(), G4PolarizationManager::GetInstance(), G4DynamicParticle::GetKineticEnergy(), G4VPhysicalVolume::GetLogicalVolume(), G4Track::GetMaterial(), G4DynamicParticle::GetMomentumDirection(), G4VPhysicalVolume::GetName(), G4LogicalVolume::GetName(), G4PolarizationHelper::GetParticleFrameX(), G4PolarizationHelper::GetParticleFrameY(), G4Track::GetPolarization(), G4Track::GetVolume(), G4PolarizationManager::GetVolumePolarization(), G4PolarizationManager::IsPolarized(), python.hepunit::mm, G4VEmProcess::PostStepGetPhysicalInteractionLength(), G4VProcess::verboseLevel, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

190 {
192 
193  if (theAsymmetryTable) {
194 
195  G4Material* aMaterial = track.GetMaterial();
196  G4VPhysicalVolume* aPVolume = track.GetVolume();
197  G4LogicalVolume* aLVolume = aPVolume->GetLogicalVolume();
198 
199  // G4Material* bMaterial = aLVolume->GetMaterial();
201 
202  const G4bool volumeIsPolarized = polarizationManger->IsPolarized(aLVolume);
203  G4StokesVector electronPolarization = polarizationManger->GetVolumePolarization(aLVolume);
204 
205  if (!volumeIsPolarized || mfp == DBL_MAX) return mfp;
206 
207  // *** get asymmetry, if target is polarized ***
208  const G4DynamicParticle* aDynamicPositron = track.GetDynamicParticle();
209  const G4double positronEnergy = aDynamicPositron->GetKineticEnergy();
210  const G4StokesVector positronPolarization = track.GetPolarization();
211  const G4ParticleMomentum positronDirection0 = aDynamicPositron->GetMomentumDirection();
212 
213  if (verboseLevel>=2) {
214 
215  G4cout << " Mom " << positronDirection0 << G4endl;
216  G4cout << " Polarization " << positronPolarization << G4endl;
217  G4cout << " MaterialPol. " << electronPolarization << G4endl;
218  G4cout << " Phys. Volume " << aPVolume->GetName() << G4endl;
219  G4cout << " Log. Volume " << aLVolume->GetName() << G4endl;
220  G4cout << " Material " << aMaterial << G4endl;
221  }
222 
223  G4bool isOutRange;
225  G4double lAsymmetry = (*theAsymmetryTable)(idx)->
226  GetValue(positronEnergy, isOutRange);
227  G4double tAsymmetry = (*theTransverseAsymmetryTable)(idx)->
228  GetValue(positronEnergy, isOutRange);
229 
230  G4double polZZ = positronPolarization.z()*
231  electronPolarization*positronDirection0;
232  G4double polXX = positronPolarization.x()*
233  electronPolarization*G4PolarizationHelper::GetParticleFrameX(positronDirection0);
234  G4double polYY = positronPolarization.y()*
235  electronPolarization*G4PolarizationHelper::GetParticleFrameY(positronDirection0);
236 
237  G4double impact = 1. + polZZ*lAsymmetry + (polXX + polYY)*tAsymmetry;
238 
239  mfp *= 1. / impact;
240 
241  if (verboseLevel>=2) {
242  G4cout << " MeanFreePath: " << mfp / mm << " mm " << G4endl;
243  G4cout << " Asymmetry: " << lAsymmetry << ", " << tAsymmetry << G4endl;
244  G4cout << " PolProduct: " << polXX << ", " << polYY << ", " << polZZ << G4endl;
245  }
246  }
247 
248  return mfp;
249 }
G4double condition(const G4ErrorSymMatrix &m)
const G4ThreeVector & GetPolarization() const
G4int verboseLevel
Definition: G4VProcess.hh:368
G4String GetName() const
G4double GetKineticEnergy() const
double x() const
const G4DynamicParticle * GetDynamicParticle() const
static G4PolarizationManager * GetInstance()
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
int G4int
Definition: G4Types.hh:78
double z() const
size_t CurrentMaterialCutsCoupleIndex() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
const G4ThreeVector & GetMomentumDirection() const
G4Material * GetMaterial() const
G4LogicalVolume * GetLogicalVolume() const
double y() const
bool IsPolarized(G4LogicalVolume *lVol) const
G4VPhysicalVolume * GetVolume() const
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void G4eplusPolarizedAnnihilation::PreparePhysicsTable ( const G4ParticleDefinition pd)
virtual

Reimplemented from G4VProcess.

Definition at line 259 of file G4eplusPolarizedAnnihilation.cc.

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

260 {
262  theAsymmetryTable = G4PhysicsTableHelper::PreparePhysicsTable(theAsymmetryTable);
263  theTransverseAsymmetryTable = G4PhysicsTableHelper::PreparePhysicsTable(theTransverseAsymmetryTable);
264 }
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
void PreparePhysicsTable(const G4ParticleDefinition &)
void G4eplusPolarizedAnnihilation::PrintInfo ( )
virtual

Implements G4VEmProcess.

Definition at line 345 of file G4eplusPolarizedAnnihilation.cc.

References G4cout, and G4endl.

346 {
347  G4cout << " Polarized model for annihilation into 2 photons"
348  << G4endl;
349 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

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