76 buildAsymmetryTable(true),
77 useAsymmetryTable(true),
80 targetPolarization(0.0,0.0,0.0)
100 void G4PolarizedCompton::CleanTable()
102 if( theAsymmetryTable) {
104 delete theAsymmetryTable;
105 theAsymmetryTable =
nullptr;
121 isInitialised =
true;
139 G4cout <<
" Total cross sections has a good parametrisation"
140 <<
" from 10 KeV to (100/Z) GeV"
149 if(ss ==
"Klein-Nishina") { mType = 0; }
150 if(ss ==
"Polarized-Compton") { mType = 10; }
162 if (theAsymmetryTable && useAsymmetryTable && mfp <
DBL_MAX) {
163 mfp *= ComputeSaturationFactor(aTrack);
166 G4cout <<
"G4PolarizedCompton::MeanFreePath: " << mfp /
mm <<
" mm " <<
G4endl;
191 if (theAsymmetryTable && useAsymmetryTable && x <
DBL_MAX) {
192 satFact = ComputeSaturationFactor(aTrack);
194 G4double prvLength = iLength*satFact;
197 std::max(nLength - previousStepSize/prvLength, 0.0);
202 G4cout <<
"G4PolarizedCompton::PostStepGPIL: "
203 << std::setprecision(8) << x/
mm <<
" mm;" <<
G4endl
204 <<
" unpolarized value: "
205 << std::setprecision(8) << x0/
mm <<
" mm." <<
G4endl;
212 G4double G4PolarizedCompton::ComputeSaturationFactor(
const G4Track& aTrack)
232 if (VolumeIsPolarized) {
235 G4cout <<
"G4PolarizedCompton::ComputeSaturationFactor: " <<
G4endl;
237 G4cout <<
" Polarization " << GammaPolarization <<
G4endl;
238 G4cout <<
" MaterialPol. " << ElectronPolarization <<
G4endl;
246 if(midx < theAsymmetryTable->size()) {
247 aVector = (*theAsymmetryTable)(midx);
257 G4double pol = ElectronPolarization*GammaDirection0;
258 G4double polProduct = GammaPolarization.
p3() * pol;
259 factor /= (1. + polProduct * asymmetry);
267 ed <<
"Problem with asymmetry table: material index " << midx
268 <<
" is out of range or the table is not filled";
269 G4Exception(
"G4PolarizedComptonModel::ComputeSaturationFactor",
"em0048",
282 if(buildAsymmetryTable && emModel) {
286 if(masterProcess && masterProcess !=
this) { isMaster =
false; }
287 if(isMaster) { BuildAsymmetryTable(part); }
304 if(!theAsymmetryTable) {
return; }
311 for(
size_t i=0; i<numOfCouples; ++i) {
312 if (theAsymmetryTable->
GetFlag(i)) {
325 for (
G4int j = 0; j <= nbins; ++j ) {
328 G4double asym = ComputeAsymmetry(energy, couple, part, 0., tasm);
365 lAsymmetry = sigma2/sigma0-1.;
G4double condition(const G4ErrorSymMatrix &m)
const G4VProcess * GetMasterProcess() const
const G4ThreeVector & GetPolarization() const
static void SetPhysicsVector(G4PhysicsTable *physTable, size_t idx, G4PhysicsVector *vec)
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4double MaxKinEnergy() const
static constexpr double mm
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
const G4DynamicParticle * GetDynamicParticle() const
void SetBuildTableFlag(G4bool val)
G4VEmModel * EmModel(G4int index=1) const
static G4PolarizationManager * GetInstance()
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) override
void SetSplineFlag(G4bool val)
G4double MaxKinEnergy() const
G4double theNumberOfInteractionLengthLeft
virtual void PrintInfo() override
void SetStartFromNullFlag(G4bool val)
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
virtual void InitialiseProcess(const G4ParticleDefinition *) override
G4int LambdaBinning() const
void SetHighEnergyLimit(G4double)
void SetMinKinEnergyPrim(G4double e)
void SetEmModel(G4VEmModel *, G4int index=1)
size_t CurrentMaterialCutsCoupleIndex() const
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)
void SetProcessSubType(G4int)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4double MinKinEnergy() const
G4double Energy(size_t index) const
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 const G4double emax
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
static G4ProductionCutsTable * GetProductionCutsTable()
G4PolarizedCompton(const G4String &processName="pol-compt", G4ProcessType type=fElectromagnetic)
G4LogicalVolume * GetLogicalVolume() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
void SetBeamPolarization(const G4ThreeVector &pBeam)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
void SetSecondaryParticle(const G4ParticleDefinition *p)
static G4EmParameters * Instance()
bool IsPolarized(G4LogicalVolume *lVol) const
G4VPhysicalVolume * GetVolume() const
static G4Electron * Electron()
static constexpr double MeV
virtual ~G4PolarizedCompton()
const G4String & GetName() const
G4bool GetFlag(size_t i) const
const G4String & GetName() const
void SetLowEnergyLimit(G4double)
G4double MinKinEnergy() const
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void SetTargetPolarization(const G4ThreeVector &pTarget)
void SetModel(const G4String &name)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override