76     theAsymmetryTable(nullptr),
 
   77     theTransverseAsymmetryTable(nullptr)
 
   92 void G4eplusPolarizedAnnihilation::CleanTables()
 
   94   if(theAsymmetryTable) {
 
   96     delete theAsymmetryTable;
 
   97     theAsymmetryTable = 
nullptr;
 
   99   if(theTransverseAsymmetryTable) {
 
  101     delete theTransverseAsymmetryTable;
 
  102     theTransverseAsymmetryTable = 
nullptr;
 
  114   if(theAsymmetryTable && theTransverseAsymmetryTable && mfp < 
DBL_MAX) {
 
  115     mfp *= ComputeSaturationFactor(track);
 
  118     G4cout << 
"G4eplusPolarizedAnnihilation::MeanFreePath:  "  
  144   if(theAsymmetryTable && theTransverseAsymmetryTable && x < 
DBL_MAX) {
 
  145     satFact = ComputeSaturationFactor(track);
 
  147     G4double prvLength = iLength*satFact;
 
  150     std::max(nLength - previousStepSize/prvLength, 0.0);
 
  155     G4cout << 
"G4eplusPolarizedAnnihilation::PostStepGPIL: " 
  156            << std::setprecision(8) << x/
mm  << 
" mm;" << 
G4endl 
  157            << 
"                         unpolarized value: " 
  158            << std::setprecision(8) << x0/
mm << 
" mm." << 
G4endl;
 
  166 G4eplusPolarizedAnnihilation::ComputeSaturationFactor(
const G4Track& track)
 
  179   if (volumeIsPolarized) {
 
  188       G4cout << 
"G4eplusPolarizedAnnihilation::ComputeSaturationFactor: " << 
G4endl;      
 
  190       G4cout << 
" Polarization " << positronPolarization  << 
G4endl;
 
  191       G4cout << 
" MaterialPol. " << electronPolarization  << 
G4endl;
 
  200     if(midx < theAsymmetryTable->size()) { 
 
  201       aVector = (*theAsymmetryTable)(midx);
 
  203     if(midx < theTransverseAsymmetryTable->size()) { 
 
  204       bVector = (*theTransverseAsymmetryTable)(midx);
 
  206     if(aVector && bVector) {
 
  209       G4double polZZ = positronPolarization.
z()*
 
  210     (electronPolarization*positronDirection0);
 
  211       G4double polXX = positronPolarization.
x()*
 
  213       G4double polYY = positronPolarization.
y()*
 
  216       factor /= (1. + polZZ*lAsymmetry + (polXX + polYY)*tAsymmetry);
 
  219     G4cout << 
" Asymmetry:     " << lAsymmetry << 
", " << tAsymmetry  << 
G4endl;
 
  220     G4cout << 
" PolProduct:    " << polXX << 
", " << polYY << 
", " << polZZ << 
G4endl;
 
  225       ed << 
"Problem with asymmetry tables: material index " << midx 
 
  226      << 
" is out of range or tables are not filled";
 
  227       G4Exception(
"G4eplusPolarizedAnnihilation::ComputeSaturationFactor",
"em0048",
 
  243   if(masterProcess && masterProcess != 
this) { isMaster = 
false; }
 
  244   if(isMaster) { BuildAsymmetryTables(part); }
 
  249 void G4eplusPolarizedAnnihilation::BuildAsymmetryTables(
 
  256   theTransverseAsymmetryTable = 
 
  264   for(
size_t i=0; i<numOfCouples; ++i) {
 
  266     if (!theAsymmetryTable) 
break;
 
  268     if (theAsymmetryTable->
GetFlag(i)) {
 
  281     G4double asym = ComputeAsymmetry(lowEdgeEnergy, couple, part, 0., tasm);
 
  322     lAsymmetry=sigma2/sigma0-1.;
 
  323     tAsymmetry=sigma3/sigma0-1.;
 
  332   G4cout << 
"      Polarized model for annihilation into 2 photons" 
G4double condition(const G4ErrorSymMatrix &m)
 
const G4VProcess * GetMasterProcess() const 
 
void SetBeamPolarization(const G4ThreeVector &pBeam)
 
const G4ThreeVector & GetPolarization() const 
 
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
 
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
 
static constexpr double mm
 
std::ostringstream G4ExceptionDescription
 
G4double GetKineticEnergy() const 
 
CLHEP::Hep3Vector G4ThreeVector
 
const G4DynamicParticle * GetDynamicParticle() const 
 
virtual void PrintInfo() override
 
static G4PolarizationManager * GetInstance()
 
G4double theNumberOfInteractionLengthLeft
 
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4double GetLowEdgeEnergy(size_t binNumber) const 
 
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
 
G4int LambdaBinning() const 
 
void SetEmModel(G4VEmModel *, G4int index=1)
 
size_t CurrentMaterialCutsCoupleIndex() const 
 
G4GLOB_DLL std::ostream G4cout
 
size_t GetTableSize() const 
 
const G4String & GetName() const 
 
void SetTargetPolarization(const G4ThreeVector &pTarget)
 
const G4ThreeVector & GetMomentumDirection() const 
 
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
 
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double currentInteractionLength
 
void PutValue(size_t index, G4double theValue)
 
G4double Value(G4double theEnergy, size_t &lastidx) const 
 
G4Material * GetMaterial() const 
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static G4ProductionCutsTable * GetProductionCutsTable()
 
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
 
G4LogicalVolume * GetLogicalVolume() const 
 
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const 
 
T max(const T t1, const T t2)
brief Return the largest of the two arguments 
 
G4double energy(const ThreeVector &p, const G4double m)
 
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
bool IsPolarized(G4LogicalVolume *lVol) const 
 
G4VPhysicalVolume * GetVolume() const 
 
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
 
G4bool GetFlag(size_t i) const 
 
const G4String & GetName() const 
 
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
 
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const 
 
G4eplusPolarizedAnnihilation(const G4String &name="pol-annihil")
 
virtual ~G4eplusPolarizedAnnihilation()
 
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override