75 theTargetPolarization(0.,0.,0.),
76 theAsymmetryTable(nullptr),
77 theTransverseAsymmetryTable(nullptr)
167 G4cout <<
"G4ePolarizedIonisation::MeanFreePath: "
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;
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; }
310 for (
size_t j=0 ; j < numOfCouples; j++ ) {
321 for (
size_t i = 0 ; i < bins ; i++ ) {
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";
G4double Energy(size_t index) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double ComputeAsymmetry(G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tasm)
CLHEP::Hep3Vector G4ThreeVector
std::ostringstream G4ExceptionDescription
void SetEmModel(G4VEmModel *, G4int index=0)
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *) override
G4LogicalVolume * GetLogicalVolume() const
virtual G4bool IsApplicable(const G4ParticleDefinition &p) override
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
static constexpr double MeV
void SetHighEnergyLimit(G4double)
G4ThreeVector theTargetPolarization
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
static constexpr double mm
const G4ThreeVector & GetMomentumDirection() const
const G4VProcess * GetMasterProcess() const
G4double MaxKinEnergy() const
const G4ThreeVector & GetPolarization() const
void insertAt(size_t, G4PhysicsVector *)
G4double Value(G4double theEnergy, size_t &lastidx) const
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
void SetTargetPolarization(const G4ThreeVector &pTarget)
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4double currentInteractionLength
G4VEmFluctuationModel * flucModel
size_t CurrentMaterialCutsCoupleIndex() const
virtual void PrintInfo() override
void AddEmModel(G4int, G4VEmModel *, G4VEmFluctuationModel *fluc=0, const G4Region *region=nullptr)
G4PolarizedMollerBhabhaModel * emModel
G4PhysicsTable * theTransverseAsymmetryTable
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *, G4double cut)
static G4Positron * Positron()
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition *, const G4Material *, G4double cut) override
G4Material * GetMaterial() const
G4ePolarizedIonisation(const G4String &name="pol-eIoni")
virtual ~G4ePolarizedIonisation()
static G4Electron * Electron()
size_t GetTableSize() const
G4double MinKinEnergy() const
void SetBeamPolarization(const G4ThreeVector &pBeam)
void SetFluctModel(G4VEmFluctuationModel *)
G4PhysicsTable * theAsymmetryTable
void SetSecondaryParticle(const G4ParticleDefinition *p)
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double ComputeSaturationFactor(const G4Track &aTrack)
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
void SetLowEnergyLimit(G4double)
void SetProcessSubType(G4int)
G4double GetKineticEnergy() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4GLOB_DLL std::ostream G4cout
void BuildAsymmetryTables(const G4ParticleDefinition &part)
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
G4double theNumberOfInteractionLengthLeft
G4bool isElectron(G4int ityp)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
static G4PolarizationManager * GetInstance()
const G4DynamicParticle * GetDynamicParticle() const
static G4EmParameters * Instance()
void PutValue(size_t index, G4double theValue)
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4ParticleDefinition * theElectron
G4VEmFluctuationModel * FluctModel()
const G4String & GetName() const
size_t GetVectorLength() const
const G4String & GetName() const
G4VPhysicalVolume * GetVolume() const
bool IsPolarized(G4LogicalVolume *lVol) const