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"
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
G4double ComputeSaturationFactor(const G4Track &aTrack)
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
const char * name(G4int ptype)
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
G4double ComputeAsymmetry(G4double energy, const G4MaterialCutsCouple *couple, const G4ParticleDefinition &particle, G4double cut, G4double &tasm)
void SetEmModel(G4VEmModel *, G4int index=1)
G4ThreeVector theTargetPolarization
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
G4PhysicsTable * theAsymmetryTable
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
G4PolarizedAnnihilationModel * emModel
bool IsPolarized(G4LogicalVolume *lVol) const
G4VPhysicalVolume * GetVolume() const
static G4ThreeVector GetParticleFrameY(const G4ThreeVector &)
G4PhysicsTable * theTransverseAsymmetryTable
G4bool GetFlag(size_t i) const
const G4String & GetName() const
void BuildAsymmetryTables(const G4ParticleDefinition &part)
G4ThreeVector G4ParticleMomentum
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