75     theTargetPolarization(0.,0.,0.),
 
   76     theAsymmetryTable(nullptr),
 
   77     theTransverseAsymmetryTable(nullptr)
 
   95 void G4ePolarizedIonisation::CleanTables()
 
   97   if(theAsymmetryTable) {
 
   99     delete theAsymmetryTable;
 
  100     theAsymmetryTable = 
nullptr;
 
  102   if(theTransverseAsymmetryTable) {
 
  104     delete theTransverseAsymmetryTable;
 
  105     theTransverseAsymmetryTable = 
nullptr;
 
  116   if(isElectron) { x += cut; }
 
  146     isInitialised = 
true;
 
  163   if(theAsymmetryTable && theTransverseAsymmetryTable && mfp < 
DBL_MAX) {
 
  164     mfp *= ComputeSaturationFactor(track);
 
  167     G4cout << 
"G4ePolarizedIonisation::MeanFreePath:  "  
  190   if(theAsymmetryTable && theTransverseAsymmetryTable && x < 
DBL_MAX) {
 
  191     satFact = ComputeSaturationFactor(track);
 
  193     G4double prvLength = iLength*satFact;
 
  196         std::max(nLength - step/prvLength, 0.0);
 
  201     G4cout << 
"G4ePolarizedIonisation::PostStepGPIL: "  
  202            << std::setprecision(8) << x/
mm  << 
" mm;" << 
G4endl 
  203            << 
"                   unpolarized value: " 
  204            << std::setprecision(8) << x0/
mm << 
" mm." << 
G4endl;
 
  212 G4ePolarizedIonisation::ComputeSaturationFactor(
const G4Track& track)
 
  225   if (volumeIsPolarized && !volPolarization.
IsZero()) {
 
  234       G4cout << 
"G4ePolarizedIonisation::ComputeSaturationFactor: " << 
G4endl;      
 
  238       G4cout << 
" MaterialPol. " << volPolarization  << 
G4endl;
 
  247     if(midx < theAsymmetryTable->size()) { 
 
  248       aVector = (*theAsymmetryTable)(midx);
 
  250     if(midx < theTransverseAsymmetryTable->size()) { 
 
  251       bVector = (*theTransverseAsymmetryTable)(midx);
 
  253     if(aVector && bVector) {
 
  256       G4double polZZ = polarization.
z()*(volPolarization*direction0);
 
  262       factor /= (1. + polZZ*lAsymmetry + (polXX + polYY)*tAsymmetry);
 
  265     G4cout << 
" Asymmetry:     " << lAsymmetry << 
", " << tAsymmetry  << 
G4endl;
 
  266     G4cout << 
" PolProduct:    " << polXX << 
", " << polYY << 
", " << polZZ << 
G4endl;
 
  271       ed << 
"Problem with asymmetry tables: material index " << midx 
 
  272      << 
" is out of range or tables are not filled";
 
  273       G4Exception(
"G4ePolarizedIonisation::ComputeSaturationFactor",
"em0048",
 
  290   if(masterProcess && masterProcess != 
this) { master = 
false; }
 
  291   if(master) { BuildAsymmetryTables(part); }
 
  296 void G4ePolarizedIonisation::BuildAsymmetryTables(
 
  303   theTransverseAsymmetryTable = 
 
  310   for (
size_t j=0 ; j < numOfCouples; j++ ) {
 
  321     for (
size_t i = 0 ; i < bins ; i++ ) {
 
  324       G4double asym = ComputeAsymmetry(lowEdgeEnergy, couple, part, cut, tasm);
 
  328     theAsymmetryTable->
insertAt( j , ptrVectorA ) ;
 
  329     theTransverseAsymmetryTable->
insertAt( j , ptrVectorB ) ;
 
  336 G4ePolarizedIonisation::ComputeAsymmetry(
G4double energy,
 
  344   if (isElectron) { lAsymmetry = tAsymmetry = -1.0; }
 
  365     lAsymmetry=sigma2/sigma0 - 1.;
 
  366     tAsymmetry=sigma3/sigma0 - 1.;
 
  368   if (std::fabs(lAsymmetry)>1.) {
 
  369     G4cout<<
"G4ePolarizedIonisation::ComputeAsymmetry WARNING: E(MeV)= "  
  370       << energy << 
" lAsymmetry= "<<lAsymmetry
 
  371       <<
" ("<<std::fabs(lAsymmetry)-1.<<
")\n";
 
  373   if (std::fabs(tAsymmetry)>1.) {
 
  374     G4cout<<
" energy="<<energy<<
"\n";
 
  375     G4cout<<
"G4ePolarizedIonisation::ComputeAsymmetry WARNING: E(MeV)= "  
  376       << energy << 
" tAsymmetry= "<<tAsymmetry
 
  377       <<
" ("<<std::fabs(tAsymmetry)-1.<<
")\n";
 
const G4VProcess * GetMasterProcess() const 
 
const G4ThreeVector & GetPolarization() const 
 
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const 
 
G4double MaxKinEnergy() const 
 
static constexpr double mm
 
G4bool isElectron(G4int ityp)
 
G4ePolarizedIonisation(const G4String &name="pol-eIoni")
 
std::ostringstream G4ExceptionDescription
 
G4double GetKineticEnergy() const 
 
CLHEP::Hep3Vector G4ThreeVector
 
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
 
const G4DynamicParticle * GetDynamicParticle() const 
 
virtual ~G4ePolarizedIonisation()
 
virtual G4bool IsApplicable(const G4ParticleDefinition &p) override
 
static G4PolarizationManager * GetInstance()
 
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
G4double theNumberOfInteractionLengthLeft
 
size_t GetVectorLength() const 
 
void SetFluctModel(G4VEmFluctuationModel *)
 
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *, G4double cut)
 
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
 
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *, G4double cut) override
 
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *) override
 
void SetHighEnergyLimit(G4double)
 
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
 
G4VEmFluctuationModel * FluctModel()
 
G4GLOB_DLL std::ostream G4cout
 
size_t GetTableSize() const 
 
const G4String & GetName() const 
 
const G4ThreeVector & GetMomentumDirection() const 
 
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)
 
virtual void PrintInfo() override
 
void SetProcessSubType(G4int)
 
G4double MinKinEnergy() const 
 
G4double Energy(size_t index) const 
 
G4double Value(G4double theEnergy, size_t &lastidx) const 
 
void SetSecondaryParticle(const G4ParticleDefinition *p)
 
G4Material * GetMaterial() const 
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static G4ProductionCutsTable * GetProductionCutsTable()
 
static G4Positron * Positron()
 
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
 
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)
 
static G4EmParameters * Instance()
 
bool IsPolarized(G4LogicalVolume *lVol) const 
 
void SetTargetPolarization(const G4ThreeVector &pTarget)
 
void SetEmModel(G4VEmModel *, G4int index=1)
 
G4VPhysicalVolume * GetVolume() const 
 
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
 
void insertAt(size_t, G4PhysicsVector *)
 
static G4Electron * Electron()
 
static constexpr double MeV
 
const G4String & GetName() const 
 
void SetBeamPolarization(const G4ThreeVector &pBeam)
 
void SetLowEnergyLimit(G4double)
 
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
 
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
 
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const 
 
size_t CurrentMaterialCutsCoupleIndex() const