Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PolarizedAnnihilationModel.cc 96114 2016-03-16 18:51:33Z gcosmo $
|
||||
// $Id: G4PolarizedAnnihilationModel.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -66,37 +66,32 @@ G4PolarizedAnnihilationModel::G4PolarizedAnnihilationModel(const G4ParticleDefin
|
||||
: G4eeToTwoGammaModel(p,nam),
|
||||
crossSectionCalculator(nullptr),
|
||||
verboseLevel(0),
|
||||
gParticleChange(nullptr),
|
||||
gIsInitialised(false)
|
||||
gParticleChange(nullptr)
|
||||
{
|
||||
crossSectionCalculator=new G4PolarizedAnnihilationCrossSection();
|
||||
crossSectionCalculator = new G4PolarizedAnnihilationCrossSection();
|
||||
}
|
||||
|
||||
G4PolarizedAnnihilationModel::~G4PolarizedAnnihilationModel()
|
||||
{
|
||||
if (crossSectionCalculator) delete crossSectionCalculator;
|
||||
delete crossSectionCalculator;
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4PolarizedAnnihilationModel::Initialise(const G4ParticleDefinition*,
|
||||
const G4DataVector&)
|
||||
void G4PolarizedAnnihilationModel::Initialise(const G4ParticleDefinition* part,
|
||||
const G4DataVector& dv)
|
||||
{
|
||||
// G4eeToTwoGammaModel::Initialise(part,dv);
|
||||
if(gIsInitialised) return;
|
||||
G4eeToTwoGammaModel::Initialise(part, dv);
|
||||
if(gParticleChange) { return; }
|
||||
gParticleChange = GetParticleChangeForGamma();
|
||||
gIsInitialised = true;
|
||||
}
|
||||
|
||||
G4double G4PolarizedAnnihilationModel::ComputeCrossSectionPerElectron(
|
||||
const G4ParticleDefinition* pd,
|
||||
G4double kinEnergy,
|
||||
G4double cut,
|
||||
G4double emax)
|
||||
G4double
|
||||
G4PolarizedAnnihilationModel::ComputeCrossSectionPerElectron(G4double kinEnergy)
|
||||
{
|
||||
G4double xs = G4eeToTwoGammaModel::ComputeCrossSectionPerElectron(pd,kinEnergy,
|
||||
cut,emax);
|
||||
// cross section from base model
|
||||
G4double xs = G4eeToTwoGammaModel::ComputeCrossSectionPerElectron(kinEnergy);
|
||||
|
||||
G4double polzz = theBeamPolarization.z()*theTargetPolarization.z();
|
||||
G4double poltt = theBeamPolarization.x()*theTargetPolarization.x()
|
||||
@@ -138,24 +133,20 @@ void G4PolarizedAnnihilationModel::ComputeAsymmetriesPerElectron(G4double ene,
|
||||
if ( (valueA < -1) || (1 < valueA)) {
|
||||
G4cout<< " ERROR PolarizedAnnihilationPS::ComputeAsymmetries \n";
|
||||
G4cout<< " something wrong in total cross section calculation (valueA)\n";
|
||||
G4cout<<"*********** LONG "<<valueX<<"\t"<<valueA<<"\t"<<valueT<<" energy = "<<gam<<G4endl;
|
||||
G4cout<< " LONG: "<<valueX<<"\t"<<valueA<<"\t"<<valueT<<" energy = "<<gam<<G4endl;
|
||||
}
|
||||
if ( (valueT < -1) || (1 < valueT)) {
|
||||
G4cout<< " ERROR PolarizedAnnihilationPS::ComputeAsymmetries \n";
|
||||
G4cout<< " something wrong in total cross section calculation (valueT)\n";
|
||||
G4cout<<"****** TRAN "<<valueX<<"\t"<<valueA<<"\t"<<valueT<<" energy = "<<gam<<G4endl;
|
||||
G4cout<< " TRAN: "<<valueX<<"\t"<<valueA<<"\t"<<valueT<<" energy = "<<gam<<G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void G4PolarizedAnnihilationModel::SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
const G4MaterialCutsCouple* /*couple*/,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle* dp,
|
||||
G4double /*tmin*/,
|
||||
G4double /*maxEnergy*/)
|
||||
G4double, G4double)
|
||||
{
|
||||
// G4ParticleChangeForGamma* gParticleChange
|
||||
// = dynamic_cast<G4ParticleChangeForGamma*>(pParticleChange);
|
||||
const G4Track * aTrack = gParticleChange->GetCurrentTrack();
|
||||
|
||||
// kill primary
|
||||
@@ -165,7 +156,7 @@ void G4PolarizedAnnihilationModel::SampleSecondaries(std::vector<G4DynamicPartic
|
||||
// V.Ivanchenko add protection against zero kin energy
|
||||
G4double PositKinEnergy = dp->GetKineticEnergy();
|
||||
|
||||
if(PositKinEnergy < DBL_MIN) {
|
||||
if(PositKinEnergy == 0.0) {
|
||||
|
||||
G4double cosTeta = 2.*G4UniformRand()-1.;
|
||||
G4double sinTeta = std::sqrt((1.0 - cosTeta)*(1.0 + cosTeta));
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PolarizedCompton.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
// $Id: G4PolarizedCompton.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
//
|
||||
//
|
||||
// File name: G4PolarizedCompton
|
||||
@@ -123,7 +123,7 @@ void G4PolarizedCompton::InitialiseProcess(const G4ParticleDefinition*)
|
||||
if(!EmModel(0)) { SetEmModel(new G4KleinNishinaCompton()); }
|
||||
} else {
|
||||
emModel = new G4PolarizedComptonModel();
|
||||
SetEmModel(emModel, 1);
|
||||
SetEmModel(emModel);
|
||||
}
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
EmModel(0)->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PolarizedGammaConversion.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
// $Id: G4PolarizedGammaConversion.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -68,6 +68,13 @@ G4PolarizedGammaConversion::~G4PolarizedGammaConversion()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4PolarizedGammaConversion::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (&p == G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4PolarizedGammaConversion::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
if(!isInitialised) {
|
||||
|
||||
+17
-9
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PolarizedPhotoElectricEffect.cc 85018 2014-10-23 09:51:37Z gcosmo $
|
||||
// $Id: G4PolarizedPhotoElectricEffect.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
//
|
||||
//
|
||||
//------------------ G4PolarizedPhotoElectricEffect physics process --
|
||||
@@ -31,20 +31,19 @@
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifndef NOIONIZATIONAS
|
||||
|
||||
#include "G4PolarizedPhotoElectricEffect.hh"
|
||||
#include "G4PolarizedPEEffectModel.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Gamma.hh"
|
||||
#include "G4EmParameters.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
using namespace std;
|
||||
|
||||
G4PolarizedPhotoElectricEffect::G4PolarizedPhotoElectricEffect(const G4String& processName,
|
||||
G4ProcessType type):G4VEmProcess (processName, type),
|
||||
isInitialised(false)
|
||||
G4PolarizedPhotoElectricEffect::G4PolarizedPhotoElectricEffect(
|
||||
const G4String& processName, G4ProcessType type)
|
||||
: G4VEmProcess (processName, type), isInitialised(false)
|
||||
{
|
||||
SetBuildTableFlag(false);
|
||||
SetSecondaryParticle(G4Electron::Electron());
|
||||
@@ -58,11 +57,20 @@ G4PolarizedPhotoElectricEffect::~G4PolarizedPhotoElectricEffect()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4PolarizedPhotoElectricEffect::InitialiseProcess(const G4ParticleDefinition*)
|
||||
G4bool
|
||||
G4PolarizedPhotoElectricEffect::IsApplicable(const G4ParticleDefinition& p)
|
||||
{
|
||||
return (&p == G4Gamma::Gamma());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void
|
||||
G4PolarizedPhotoElectricEffect::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
if(!isInitialised) {
|
||||
isInitialised = true;
|
||||
if(!EmModel()) SetEmModel(new G4PolarizedPEEffectModel);
|
||||
if(!EmModel()) { SetEmModel(new G4PolarizedPEEffectModel); }
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
EmModel()->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel()->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
@@ -76,4 +84,4 @@ void G4PolarizedPhotoElectricEffect::PrintInfo()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#endif // NOIONIZATIONAS
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4StokesVector.cc 108502 2018-02-15 15:41:45Z gcosmo $
|
||||
// $Id: G4StokesVector.cc 108422 2018-02-13 11:17:20Z gcosmo $
|
||||
//
|
||||
// GEANT4 Class file
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ePolarizedBremsstrahlung.cc 96114 2016-03-16 18:51:33Z gcosmo $
|
||||
// $Id: G4ePolarizedBremsstrahlung.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -62,6 +62,8 @@ G4ePolarizedBremsstrahlung::G4ePolarizedBremsstrahlung(const G4String& name):
|
||||
G4eBremsstrahlung(name)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4ePolarizedBremsstrahlung::InitialiseEnergyLossProcess(
|
||||
const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*)
|
||||
@@ -72,11 +74,13 @@ void G4ePolarizedBremsstrahlung::InitialiseEnergyLossProcess(
|
||||
SetIonisation(false);
|
||||
|
||||
G4VEmFluctuationModel* fm = nullptr;
|
||||
//G4VEmFluctuationModel* fm = new G4UniversalFluctuation();
|
||||
|
||||
G4VEmModel* em = new G4ePolarizedBremsstrahlungModel;
|
||||
em->SetLowEnergyLimit(0.1*keV);
|
||||
em->SetHighEnergyLimit(100.0*TeV);
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
em->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
em->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
AddEmModel(1, em, fm);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ePolarizedIonisation.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
// $Id: G4ePolarizedIonisation.cc 109176 2018-04-03 06:53:39Z gcosmo $
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
@@ -127,7 +127,7 @@ G4bool G4ePolarizedIonisation::IsApplicable(const G4ParticleDefinition& p)
|
||||
|
||||
void G4ePolarizedIonisation::InitialiseEnergyLossProcess(
|
||||
const G4ParticleDefinition* part,
|
||||
const G4ParticleDefinition* /*part2*/)
|
||||
const G4ParticleDefinition*)
|
||||
{
|
||||
if(!isInitialised) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user