57G4VLowEnergyDiscretePhotonProcess :: G4VLowEnergyDiscretePhotonProcess(
const G4String& processName,
58 const G4String& aCrossSectionFileName,
65 lowEnergyLimit(aLowEnergyLimit),
66 highEnergyLimit(aHighEnergyLimit),
67 crossSectionFileName(aCrossSectionFileName),
72 scatterFunctionData->
LoadData(aScatterFileName);
78 << lowEnergyLimit / keV <<
" keV - "
79 << highEnergyLimit / GeV <<
" GeV"
88 if (meanFreePathTable)
89 delete meanFreePathTable;
91 delete crossSectionHandler;
92 delete scatterFunctionData;
108 crossSectionHandler->
Clear();
109 crossSectionHandler->
LoadData(crossSectionFileName);
111 if (meanFreePathTable)
112 delete meanFreePathTable;
125 if (photonEnergy < lowEnergyLimit)
128 if (photonEnergy > highEnergyLimit)
129 photonEnergy=highEnergyLimit;
131 size_t materialIndex;
134 return meanFreePathTable->
FindValue(photonEnergy, materialIndex);
146 photonPolarization =
photon.GetPolarization();
147 photonMomentumDirection =
photon.GetMomentumDirection();
149 if ((!photonPolarization.
isOrthogonal(photonMomentumDirection, 1e-6)) || photonPolarization.
mag()==0.)
162 photonPolarization=e1+e2;
164 else if (photonPolarization.
howOrthogonal(photonMomentumDirection) != 0.)
169 photonPolarization=photonPolarization.
perpPart(photonMomentumDirection);
172 return photonPolarization.
unit();
G4DLLIMPORT std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
bool isOrthogonal(const Hep3Vector &v, double epsilon=tolerance) const
Hep3Vector perpPart() const
double howOrthogonal(const Hep3Vector &v) const
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
const G4MaterialCutsCouple * GetMaterialCutsCouple() const
G4VEMDataSet * BuildMeanFreePathForMaterials(const G4DataVector *energyCuts=0)
void LoadData(const G4String &dataFile)
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual G4bool LoadData(const G4String &fileName)=0
virtual ~G4VLowEnergyDiscretePhotonProcess(void)
virtual G4bool IsApplicable(const G4ParticleDefinition &particleDefinition)
G4ThreeVector GetPhotonPolarization(const G4DynamicParticle &photon)
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
virtual void BuildPhysicsTable(const G4ParticleDefinition &photon)
const G4String & GetProcessName() const