75 buildAsymmetryTable(true),
76 useAsymmetryTable(true),
79 targetPolarization(0.0,0.0,0.0)
99void G4PolarizedCompton::CleanTable()
101 if( theAsymmetryTable) {
103 delete theAsymmetryTable;
104 theAsymmetryTable =
nullptr;
120 isInitialised =
true;
138 G4cout <<
" Total cross sections has a good parametrisation"
139 <<
" from 10 KeV to (100/Z) GeV"
148 if(ss ==
"Klein-Nishina") { mType = 0; }
149 if(ss ==
"Polarized-Compton") { mType = 10; }
161 if (theAsymmetryTable && useAsymmetryTable && mfp <
DBL_MAX) {
162 mfp *= ComputeSaturationFactor(aTrack);
165 G4cout <<
"G4PolarizedCompton::MeanFreePath: " << mfp / mm <<
" mm " <<
G4endl;
190 if (theAsymmetryTable && useAsymmetryTable && x <
DBL_MAX) {
191 satFact = ComputeSaturationFactor(aTrack);
193 G4double prvLength = iLength*satFact;
196 std::max(nLength - previousStepSize/prvLength, 0.0);
201 G4cout <<
"G4PolarizedCompton::PostStepGPIL: "
202 << std::setprecision(8) << x/mm <<
" mm;" <<
G4endl
203 <<
" unpolarized value: "
204 << std::setprecision(8) << x0/mm <<
" mm." <<
G4endl;
211G4double G4PolarizedCompton::ComputeSaturationFactor(
const G4Track& aTrack)
231 if (VolumeIsPolarized) {
234 G4cout <<
"G4PolarizedCompton::ComputeSaturationFactor: " <<
G4endl;
236 G4cout <<
" Polarization " << GammaPolarization <<
G4endl;
237 G4cout <<
" MaterialPol. " << ElectronPolarization <<
G4endl;
245 if(midx < theAsymmetryTable->size()) {
246 aVector = (*theAsymmetryTable)(midx);
256 G4double pol = ElectronPolarization*GammaDirection0;
257 G4double polProduct = GammaPolarization.
p3() * pol;
258 factor /= (1. + polProduct * asymmetry);
266 ed <<
"Problem with asymmetry table: material index " << midx
267 <<
" is out of range or the table is not filled";
268 G4Exception(
"G4PolarizedComptonModel::ComputeSaturationFactor",
"em0048",
281 if(buildAsymmetryTable && emModel) {
285 if(masterProcess && masterProcess !=
this) { isMaster =
false; }
286 if(isMaster) { BuildAsymmetryTable(part); }
303 if(!theAsymmetryTable) {
return; }
310 for(
size_t i=0; i<numOfCouples; ++i) {
311 if (theAsymmetryTable->
GetFlag(i)) {
324 for (
G4int j = 0; j <= nbins; ++j ) {
327 G4double asym = ComputeAsymmetry(energy, couple, part, 0., tasm);
364 lAsymmetry = sigma2/sigma0-1.;
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
static G4EmParameters * Instance()
G4double MinKinEnergy() const
G4double MaxKinEnergy() const
const G4String & GetName() const
static G4PhysicsTable * PreparePhysicsTable(G4PhysicsTable *physTable)
static void SetPhysicsVector(G4PhysicsTable *physTable, std::size_t idx, G4PhysicsVector *vec)
G4bool GetFlag(std::size_t i) const
G4double Energy(std::size_t index) const
G4double Value(G4double theEnergy, std::size_t &lastidx) const
void PutValue(std::size_t index, G4double theValue)
bool IsPolarized(G4LogicalVolume *lVol) const
static G4PolarizationManager * GetInstance()
const G4ThreeVector & GetVolumePolarization(G4LogicalVolume *lVol) const
void SetTargetPolarization(const G4ThreeVector &pTarget)
void SetBeamPolarization(const G4ThreeVector &pBeam)
virtual ~G4PolarizedCompton()
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
void SetModel(const G4String &name)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition) override
virtual G4bool IsApplicable(const G4ParticleDefinition &) override
G4PolarizedCompton(const G4String &processName="pol-compt", G4ProcessType type=fElectromagnetic)
virtual void PrintInfo() override
virtual void InitialiseProcess(const G4ParticleDefinition *) override
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
std::size_t GetTableSize() const
static G4ProductionCutsTable * GetProductionCutsTable()
G4VPhysicalVolume * GetVolume() const
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
const G4ThreeVector & GetPolarization() const
void SetHighEnergyLimit(G4double)
void SetLowEnergyLimit(G4double)
G4double CrossSection(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
const G4String & GetName() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &) override
G4VEmModel * EmModel(size_t index=0) const
void SetBuildTableFlag(G4bool val)
void AddEmModel(G4int, G4VEmModel *, const G4Region *region=nullptr)
void SetEmModel(G4VEmModel *, G4int index=0)
void SetSecondaryParticle(const G4ParticleDefinition *p)
void SetSplineFlag(G4bool val)
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4double MaxKinEnergy() const
G4double MinKinEnergy() const
void SetStartFromNullFlag(G4bool val)
G4int LambdaBinning() const
void SetMinKinEnergyPrim(G4double e)
size_t CurrentMaterialCutsCoupleIndex() const
virtual G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
G4double currentInteractionLength
const G4VProcess * GetMasterProcess() const
G4double theNumberOfInteractionLengthLeft
void SetProcessSubType(G4int)
G4double energy(const ThreeVector &p, const G4double m)