76 theAsymmetryTable(nullptr),
77 theTransverseAsymmetryTable(nullptr)
118 G4cout <<
"G4eplusPolarizedAnnihilation::MeanFreePath: "
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;
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; }
264 for(
size_t i=0; i<numOfCouples; ++i) {
322 lAsymmetry=sigma2/sigma0-1.;
323 tAsymmetry=sigma3/sigma0-1.;
332 G4cout <<
" Polarized model for annihilation into 2 photons"
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
CLHEP::Hep3Vector G4ThreeVector
std::ostringstream G4ExceptionDescription
G4LogicalVolume * GetLogicalVolume() const
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
G4double GetLowEdgeEnergy(size_t binNumber) const
G4double ComputeSaturationFactor(const G4Track &aTrack)
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
static G4ThreeVector GetParticleFrameX(const G4ThreeVector &)
static constexpr double mm
G4PhysicsTable * theTransverseAsymmetryTable
const G4ThreeVector & GetMomentumDirection() const
const G4VProcess * GetMasterProcess() const
const G4ThreeVector & GetPolarization() const
G4double Value(G4double theEnergy, size_t &lastidx) const
G4double condition(const G4ErrorSymMatrix &m)
G4PolarizedAnnihilationModel * emModel
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4double currentInteractionLength
size_t CurrentMaterialCutsCoupleIndex() const
virtual ~G4eplusPolarizedAnnihilation()
G4double ComputeAsymmetry(G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tasm)
void SetTargetPolarization(const G4ThreeVector &pTarget)
void SetEmModel(G4VEmModel *, G4int index=0)
G4int LambdaBinning() const
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
virtual void PrintInfo() override
void BuildAsymmetryTables(const G4ParticleDefinition &part)
G4Material * GetMaterial() const
size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
void SetBeamPolarization(const G4ThreeVector &pBeam)
G4PhysicsVector * LambdaPhysicsVector(const G4MaterialCutsCouple *)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4PhysicsTable * theAsymmetryTable
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4eplusPolarizedAnnihilation(const G4String &name="pol-annihil")
G4bool GetFlag(size_t i) const
G4double theNumberOfInteractionLengthLeft
static G4PolarizationManager * GetInstance()
const G4DynamicParticle * GetDynamicParticle() const
G4ThreeVector theTargetPolarization
void PutValue(size_t index, G4double theValue)
const G4String & GetName() const
const G4String & GetName() const
G4VPhysicalVolume * GetVolume() const
bool IsPolarized(G4LogicalVolume *lVol) const