Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -8,9 +8,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt 103639 2017-04-20 09:03:42Z gcosmo $
|
||||
#
|
||||
# 20130225 M. Kelsey -- Remove cascade/evaporation, cascade/utils
|
||||
# $Id: CMakeLists.txt 106468 2017-10-11 08:11:47Z gcosmo $
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Add allocation export symbol for the EM category
|
||||
@@ -78,6 +76,7 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS)
|
||||
hadronic/models/inclxx/utils/sources.cmake
|
||||
hadronic/models/inclxx/incl_physics/sources.cmake
|
||||
hadronic/models/inclxx/interface/sources.cmake
|
||||
hadronic/models/gamma_nuclear/sources.cmake
|
||||
hadronic/models/lend/sources.cmake
|
||||
hadronic/models/lepto_nuclear/sources.cmake
|
||||
hadronic/models/management/sources.cmake
|
||||
@@ -88,8 +87,8 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS)
|
||||
hadronic/models/parton_string/qgsm/sources.cmake
|
||||
hadronic/models/pre_equilibrium/exciton_model/sources.cmake
|
||||
hadronic/models/qmd/sources.cmake
|
||||
hadronic/models/radioactive_decay/sources.cmake
|
||||
hadronic/models/quasi_elastic/sources.cmake
|
||||
hadronic/models/radioactive_decay/sources.cmake
|
||||
hadronic/models/rpg/sources.cmake
|
||||
hadronic/models/theo_high_energy/sources.cmake
|
||||
hadronic/models/util/sources.cmake
|
||||
@@ -98,7 +97,7 @@ if(NOT GEANT4_BUILD_GRANULAR_LIBS)
|
||||
hadronic/util/sources.cmake
|
||||
management/sources.cmake
|
||||
optical/sources.cmake
|
||||
solidstate/phonon/sources.cmake
|
||||
solidstate/phonon/sources.cmake
|
||||
solidstate/channeling/sources.cmake
|
||||
parameterisation/sources.cmake
|
||||
scoring/sources.cmake
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile 103669 2017-04-20 15:46:39Z gcosmo $
|
||||
# $Id: GNUmakefile 106468 2017-10-11 08:11:47Z gcosmo $
|
||||
# ----------------------------------------------------------------------
|
||||
# GNUmakefile for processes library, Gabriele Cosmo 27-Jun-1998
|
||||
# ----------------------------------------------------------------------
|
||||
@@ -13,7 +13,12 @@ GLOBLIBS = libG4digits_hits.lib
|
||||
GLOBLIBS += libG4track.lib libG4particles.lib libG4geometry.lib
|
||||
GLOBLIBS += libG4materials.lib libG4graphics_reps.lib libG4analysis.lib
|
||||
GLOBLIBS += libG4intercoms.lib libG4global.lib
|
||||
GLOBLIBS += libG4expat.lib libG4zlib.lib
|
||||
ifdef G4LIB_BUILD_EXPAT
|
||||
GLOBLIBS += libG4expat.lib
|
||||
endif
|
||||
ifdef G4LIB_BUILD_ZLIB
|
||||
GLOBLIBS += libG4zlib.lib
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
@@ -92,6 +97,7 @@ SUBDIRS += hadronic/models/de_excitation/photon_evaporation
|
||||
SUBDIRS += hadronic/models/de_excitation/util
|
||||
SUBDIRS += hadronic/models/em_dissociation
|
||||
SUBDIRS += hadronic/models/fission
|
||||
SUBDIRS += hadronic/models/gamma_nuclear
|
||||
SUBDIRS += hadronic/models/im_r_matrix
|
||||
SUBDIRS += hadronic/models/inclxx/utils
|
||||
SUBDIRS += hadronic/models/inclxx/incl_physics
|
||||
@@ -106,9 +112,9 @@ SUBDIRS += hadronic/models/parton_string/qgsm
|
||||
SUBDIRS += hadronic/models/lepto_nuclear
|
||||
SUBDIRS += hadronic/models/pre_equilibrium/exciton_model
|
||||
SUBDIRS += hadronic/models/qmd
|
||||
SUBDIRS += hadronic/models/quasi_elastic
|
||||
SUBDIRS += hadronic/models/radioactive_decay
|
||||
SUBDIRS += hadronic/models/rpg
|
||||
SUBDIRS += hadronic/models/quasi_elastic
|
||||
SUBDIRS += hadronic/models/theo_high_energy
|
||||
SUBDIRS += hadronic/models/util
|
||||
SUBDIRS += hadronic/processes
|
||||
@@ -127,8 +133,9 @@ SUBLIBS += G4hadronic_coherent_elastic
|
||||
SUBLIBS += G4had_im_r_matrix
|
||||
SUBLIBS += G4hadronic_RPG
|
||||
SUBLIBS += G4hadronic_qmd
|
||||
SUBLIBS += G4had_lend
|
||||
SUBLIBS += G4had_fission
|
||||
SUBLIBS += G4had_gamm_nuclear
|
||||
SUBLIBS += G4had_lend
|
||||
SUBLIBS += G4had_mod_man
|
||||
SUBLIBS += G4had_part_hp
|
||||
SUBLIBS += G4hadronic_radioactivedecay
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 103005 2017-03-08 08:08:35Z gcosmo $
|
||||
$Id: History 105924 2017-08-29 12:28:09Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,13 +17,16 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
August 29th, 2017 Gabriele Cosmo (procbiasing-V10-03-03)
|
||||
- Removed duplicate class definition G4TrackTerminator.hh, which is part
|
||||
of the processes/transportation module.
|
||||
|
||||
July 14th, 2017 Gabriele Cosmo (procbiasing-V10-03-02)
|
||||
- G4ImportanceConfigurator: removed debug printout in destructor.
|
||||
|
||||
March 7th, 2017 Alexander Howard (procbiasing-V10-03-01)
|
||||
- G4GeometrySampler: removed unnecessary ClearSampling from the destructor
|
||||
|
||||
Mar 7th, 2015 Alexander Howard (procbiasing-V10-03-00)
|
||||
- G4ImportanceConfigurator: adjusted the ProcessPlacer in the destructor
|
||||
of the G4ImportanceConfigurator so that it didn't cause an error in MT-mode
|
||||
|
||||
Mar 10th, 2015 Gabriele Cosmo (procbiasing-V10-01-00)
|
||||
- G4ImportanceProcess, G4WeightCutOffProcess, G4WeightWindowProcess: made
|
||||
static thread-local variables into class data members.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 101363 2016-11-15 15:27:42Z gcosmo $
|
||||
$Id: History 107595 2017-11-24 16:17:37Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,14 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 24th, 2017 M. Verderi
|
||||
- Fix G4BiasingProcessInterface for wrong setting of first/last
|
||||
GPIL/DoIt flags in case charged particles. As the msc became
|
||||
a pure along, this broke the initial logic based on the fact
|
||||
that, before, physics processes always had a PostStepDoIt method.
|
||||
- proc-biasgen-V10-03-00
|
||||
|
||||
|
||||
November 15th, 2016, M. Verderi
|
||||
- Fix one Coverity warning in G4ParallelGeometriesLimiterProcess.
|
||||
- proc-biasgen-V10-02-06
|
||||
|
||||
@@ -71,9 +71,9 @@ G4BiasingProcessInterface::G4BiasingProcessInterface(G4String name)
|
||||
{
|
||||
for (G4int i = 0 ; i < 8 ; i++) fFirstLastFlags[i] = false;
|
||||
fResetInteractionLaws.Put( true );
|
||||
fCommonStart.Put(true);
|
||||
fCommonEnd.Put(true);
|
||||
fDoCommonConfigure.Put(true);
|
||||
fCommonStart .Put( true );
|
||||
fCommonEnd .Put( true );
|
||||
fDoCommonConfigure .Put( true );
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ void G4BiasingProcessInterface::StartTracking(G4Track* track)
|
||||
if ( fCommonStart.Get() )
|
||||
{
|
||||
fCommonStart.Put( false );// = false;
|
||||
fCommonEnd.Put(true);// = true;
|
||||
fCommonEnd .Put( true );// = true;
|
||||
|
||||
fSharedData-> fCurrentBiasingOperator = 0;
|
||||
fSharedData->fPreviousBiasingOperator = 0;
|
||||
@@ -190,8 +190,8 @@ void G4BiasingProcessInterface::EndTracking()
|
||||
// -- Inform operators of end of tracking:
|
||||
if ( fCommonEnd.Get() )
|
||||
{
|
||||
fCommonEnd.Put( false );// = false;
|
||||
fCommonStart.Put( true );// = true;
|
||||
fCommonEnd .Put( false );// = false;
|
||||
fCommonStart.Put( true );// = true;
|
||||
|
||||
for ( size_t optr = 0 ; optr < ( G4VBiasingOperator::GetBiasingOperators() ).size() ; optr ++)
|
||||
( G4VBiasingOperator::GetBiasingOperators() )[optr]->EndTracking( );
|
||||
@@ -389,8 +389,6 @@ G4double G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength( const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
// -- A biasing operator exists. Proceed with
|
||||
// -- treating non-physics and physics biasing cases:
|
||||
@@ -449,7 +447,6 @@ G4double G4BiasingProcessInterface::PostStepGetPhysicalInteractionLength( const
|
||||
G4VParticleChange* G4BiasingProcessInterface::PostStepDoIt(const G4Track& track,
|
||||
const G4Step& step)
|
||||
{
|
||||
|
||||
// ---------------------------------------
|
||||
// -- case outside of volume with biasing:
|
||||
// ---------------------------------------
|
||||
@@ -922,16 +919,20 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepGPILInterface(G4bool physOnly)
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx > thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
if ( thisIdx > thatIdx )
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -945,16 +946,20 @@ G4bool G4BiasingProcessInterface::IsLastPostStepGPILInterface(G4bool physOnly) c
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeGPIL);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx < thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
if ( thisIdx < thatIdx )
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -968,16 +973,20 @@ G4bool G4BiasingProcessInterface::IsFirstPostStepDoItInterface(G4bool physOnly)
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx > thatIdx )
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
if ( thisIdx > thatIdx )
|
||||
{
|
||||
isFirst = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -991,16 +1000,20 @@ G4bool G4BiasingProcessInterface::IsLastPostStepDoItInterface(G4bool physOnly) c
|
||||
const G4ProcessVector* pv = fProcessManager->GetPostStepProcessVector(typeDoIt);
|
||||
G4int thisIdx(-1);
|
||||
for (G4int i = 0; i < pv->size(); i++ ) if ( (*pv)(i) == this ) { thisIdx = i; break; }
|
||||
if ( thisIdx < 0 ) return false; // -- to ignore pure along processes
|
||||
for ( size_t i = 0; i < (fSharedData->fBiasingProcessInterfaces).size(); i++ )
|
||||
{
|
||||
if ( (fSharedData->fBiasingProcessInterfaces)[i]->fIsPhysicsBasedBiasing || !physOnly )
|
||||
{
|
||||
G4int thatIdx(-1);
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thisIdx < thatIdx )
|
||||
for (G4int j = 0; j < pv->size(); j++ ) if ( (*pv)(j) == (fSharedData->fBiasingProcessInterfaces)[i] ) { thatIdx = j; break; }
|
||||
if ( thatIdx >= 0 ) // -- to ignore pure along processes
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
if ( thisIdx < thatIdx )
|
||||
{
|
||||
isLast = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 77477 2013-11-25 09:42:24Z gcosmo $
|
||||
# $Id: sources.cmake 105924 2017-08-29 12:28:09Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -50,7 +50,6 @@ GEANT4_DEFINE_MODULE(NAME G4biasing_imp
|
||||
G4ImportanceProcess.hh
|
||||
G4PlaceOfAction.hh
|
||||
G4SamplingPostStepAction.hh
|
||||
G4TrackTerminator.hh
|
||||
G4VSampler.hh
|
||||
G4VSamplerConfigurator.hh
|
||||
G4WeightCutOffConfigurator.hh
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ImportanceConfigurator.cc 103005 2017-03-08 08:08:35Z gcosmo $
|
||||
// $Id: G4ImportanceConfigurator.cc 105159 2017-07-14 09:17:32Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ImportanceConfigurator
|
||||
@@ -76,7 +76,6 @@ G4ImportanceConfigurator(G4String worldvolumeName,
|
||||
|
||||
G4ImportanceConfigurator::~G4ImportanceConfigurator()
|
||||
{
|
||||
G4cout << "G4ImportanceConfigurator:: destructor " << G4endl;
|
||||
if (fImportanceProcess)
|
||||
{
|
||||
fPlacer.RemoveProcess(fImportanceProcess);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 100340 2016-10-18 07:50:12Z gcosmo $
|
||||
$Id: History 106151 2017-09-14 06:43:04Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,21 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
- 12 September 2017 Krzysztof Genser (decay-V10-03-04)
|
||||
- Moved Muonic Atom files to processes/hadronic/stopping
|
||||
- Replaced DECAY_MuonicAtomDecay process type with DECAY_MuAtom
|
||||
|
||||
- Aug. 15, 2017 Hisaya Kurashige (decay-V10-03-03)
|
||||
- clean up NULL and 0 pointer and use nullptr
|
||||
- remove tests/test01
|
||||
- add tests/tst_dcy_01
|
||||
|
||||
- Aug. 14, 2017 Hisaya Kurashige (decay-V10-03-02)
|
||||
- Modified to suppress Compiler Warning (clang80)
|
||||
|
||||
- Aug. 14, 2017 Hisaya Kurashige (decay-V10-03-00)
|
||||
- Add ProcessDescription
|
||||
|
||||
- October 18, 2016 Gabriele Cosmo (decay-V10-02-03)
|
||||
- Corrected CMake and GNUMake scripts to include new dependency on
|
||||
particles/hadrons/ions submodule...
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Decay.hh 78547 2014-01-07 09:40:38Z gcosmo $
|
||||
// $Id: G4Decay.hh 105727 2017-08-16 12:47:05Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -88,21 +88,21 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
virtual G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
|
||||
// In G4Decay, thePhysicsTable stores values of
|
||||
// beta * std::sqrt( 1 - beta*beta)
|
||||
// as a function of normalized kinetic enregy (=Ekin/mass),
|
||||
// becasuse this table is universal for all particle types,
|
||||
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
// returns "true" if the decay process can be applied to
|
||||
// the particle type.
|
||||
|
||||
@@ -123,13 +123,13 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
virtual G4double AtRestGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
) override;
|
||||
|
||||
protected: // With Description
|
||||
// GetMeanFreePath returns ctau*beta*gamma for decay in flight
|
||||
@@ -137,15 +137,15 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual G4double GetMeanLifeTime(const G4Track& aTrack,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
) override;
|
||||
|
||||
public: //With Description
|
||||
virtual void StartTracking(G4Track*);
|
||||
virtual void EndTracking();
|
||||
virtual void StartTracking(G4Track*) override;
|
||||
virtual void EndTracking() override;
|
||||
// inform Start/End of tracking for each track to the physics process
|
||||
|
||||
public: //With Description
|
||||
@@ -156,9 +156,8 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
G4double GetRemainderLifeTime() const;
|
||||
//Get Remainder of life time at rest decay
|
||||
|
||||
public:
|
||||
void SetVerboseLevel(G4int value);
|
||||
G4int GetVerboseLevel() const;
|
||||
virtual void ProcessDescription(std::ostream& outFile) const override;
|
||||
//
|
||||
|
||||
protected:
|
||||
G4int verboseLevel;
|
||||
@@ -181,12 +180,6 @@ class G4Decay : public G4VRestDiscreteProcess
|
||||
G4VExtDecayer* pExtDecayer;
|
||||
};
|
||||
|
||||
inline
|
||||
void G4Decay::SetVerboseLevel(G4int value){ verboseLevel = value; }
|
||||
|
||||
inline
|
||||
G4int G4Decay::GetVerboseLevel() const { return verboseLevel; }
|
||||
|
||||
inline
|
||||
G4VParticleChange* G4Decay::AtRestDoIt(
|
||||
const G4Track& aTrack,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DecayProcessType.hh 71045 2013-06-10 09:34:33Z gcosmo $
|
||||
// $Id: G4DecayProcessType.hh 106151 2017-09-14 06:43:04Z gcosmo $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
@@ -47,6 +47,7 @@ enum G4DecayProcessType
|
||||
DECAY_PionMakeSpin ,
|
||||
DECAY_Radioactive = 210,
|
||||
DECAY_Unknown = 211,
|
||||
DECAY_MuAtom = 221,
|
||||
DECAY_External = 231
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -48,20 +48,23 @@ class G4DecayWithSpin : public G4Decay
|
||||
|
||||
// Destructor
|
||||
virtual ~G4DecayWithSpin();
|
||||
|
||||
virtual void ProcessDescription(std::ostream& outFile) const override;
|
||||
//
|
||||
|
||||
protected: // With Description
|
||||
virtual G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual G4VParticleChange* AtRestDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) override;
|
||||
private:
|
||||
G4ThreeVector Spin_Precession(const G4Step& aStep,
|
||||
G4ThreeVector B, G4double deltatime );
|
||||
G4ThreeVector Spin_Precession(const G4Step& aStep,
|
||||
G4ThreeVector B, G4double deltatime );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ class G4PionDecayMakeSpin : public G4Decay
|
||||
// Destructor
|
||||
virtual ~G4PionDecayMakeSpin();
|
||||
|
||||
virtual void ProcessDescription(std::ostream& outFile) const override;
|
||||
//
|
||||
|
||||
private:
|
||||
|
||||
// copy constructor
|
||||
@@ -57,7 +60,7 @@ class G4PionDecayMakeSpin : public G4Decay
|
||||
protected:
|
||||
|
||||
virtual void DaughterPolarization(const G4Track& aTrack,
|
||||
G4DecayProducts* products);
|
||||
G4DecayProducts* products) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UnknownDecay.hh 71045 2013-06-10 09:34:33Z gcosmo $
|
||||
// $Id: G4UnknownDecay.hh 105727 2017-08-16 12:47:05Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -65,24 +65,27 @@ class G4UnknownDecay : public G4VDiscreteProcess
|
||||
virtual G4VParticleChange *PostStepDoIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) override;
|
||||
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
|
||||
virtual void BuildPhysicsTable(const G4ParticleDefinition&) override;
|
||||
// In G4UnknownDecay, thePhysicsTable stores values of
|
||||
// beta * std::sqrt( 1 - beta*beta)
|
||||
// as a function of normalized kinetic enregy (=Ekin/mass),
|
||||
// becasuse this table is universal for all particle types,
|
||||
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
// returns "true" if the decay process can be applied to
|
||||
// the particle type.
|
||||
|
||||
virtual void ProcessDescription(std::ostream& outFile) const override;
|
||||
//
|
||||
|
||||
protected: // With Description
|
||||
virtual G4VParticleChange* DecayIt(
|
||||
const G4Track& aTrack,
|
||||
const G4Step& aStep
|
||||
);
|
||||
) ;
|
||||
// The DecayIt() method returns by pointer a particle-change object,
|
||||
// which has information of daughter particles.
|
||||
|
||||
@@ -92,7 +95,7 @@ class G4UnknownDecay : public G4VDiscreteProcess
|
||||
const G4Track& track,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
) override;
|
||||
|
||||
|
||||
protected: // With Description
|
||||
@@ -100,11 +103,7 @@ class G4UnknownDecay : public G4VDiscreteProcess
|
||||
virtual G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition
|
||||
);
|
||||
|
||||
public:
|
||||
void SetVerboseLevel(G4int value);
|
||||
G4int GetVerboseLevel() const;
|
||||
) override;
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
@@ -147,12 +146,6 @@ inline
|
||||
|
||||
}
|
||||
|
||||
inline
|
||||
void G4UnknownDecay::SetVerboseLevel(G4int value){ verboseLevel = value; }
|
||||
|
||||
inline
|
||||
G4int G4UnknownDecay::GetVerboseLevel() const { return verboseLevel; }
|
||||
|
||||
inline
|
||||
G4VParticleChange* G4UnknownDecay::PostStepDoIt(
|
||||
const G4Track& aTrack,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VExtDecayer.hh 71045 2013-06-10 09:34:33Z gcosmo $
|
||||
// $Id: G4VExtDecayer.hh 105727 2017-08-16 12:47:05Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -70,7 +70,7 @@ class G4VExtDecayer
|
||||
) = 0;
|
||||
|
||||
const G4String& GetName() const;
|
||||
|
||||
|
||||
protected:
|
||||
G4String decayerName;
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 100340 2016-10-18 07:50:12Z gcosmo $
|
||||
# $Id: sources.cmake 106151 2017-09-14 06:43:04Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@@ -43,15 +43,13 @@ GEANT4_DEFINE_MODULE(NAME G4decay
|
||||
G4Decay.hh
|
||||
G4DecayProcessType.hh
|
||||
G4DecayWithSpin.hh
|
||||
G4MuonicAtomDecay.hh
|
||||
G4PionDecayMakeSpin.hh
|
||||
G4UnknownDecay.hh
|
||||
G4VExtDecayer.hh
|
||||
SOURCES
|
||||
G4Decay.cc
|
||||
G4DecayWithSpin.cc
|
||||
G4MuonicAtomDecay.cc
|
||||
G4PionDecayMakeSpin.cc
|
||||
G4PionDecayMakeSpin.cc
|
||||
G4UnknownDecay.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4csg
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Decay.cc 97800 2016-06-13 12:14:40Z gcosmo $
|
||||
// $Id: G4Decay.cc 105727 2017-08-16 12:47:05Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -65,7 +65,7 @@ G4Decay::G4Decay(const G4String& processName)
|
||||
verboseLevel(1),
|
||||
HighestValue(20.0),
|
||||
fRemainderLifeTime(-1.0),
|
||||
pExtDecayer(0)
|
||||
pExtDecayer(nullptr)
|
||||
{
|
||||
// set Process Sub Type
|
||||
SetProcessSubType(static_cast<int>(DECAY));
|
||||
@@ -81,7 +81,7 @@ G4Decay::G4Decay(const G4String& processName)
|
||||
|
||||
G4Decay::~G4Decay()
|
||||
{
|
||||
if (pExtDecayer) {
|
||||
if (pExtDecayer != nullptr) {
|
||||
delete pExtDecayer;
|
||||
}
|
||||
}
|
||||
@@ -198,17 +198,17 @@ G4VParticleChange* G4Decay::DecayIt(const G4Track& aTrack, const G4Step& )
|
||||
|
||||
//check if thePreAssignedDecayProducts exists
|
||||
const G4DecayProducts* o_products = (aParticle->GetPreAssignedDecayProducts());
|
||||
G4bool isPreAssigned = (o_products != 0);
|
||||
G4DecayProducts* products = 0;
|
||||
G4bool isPreAssigned = (o_products != nullptr);
|
||||
G4DecayProducts* products = nullptr;
|
||||
|
||||
// decay table
|
||||
G4DecayTable *decaytable = aParticleDef->GetDecayTable();
|
||||
|
||||
// check if external decayer exists
|
||||
G4bool isExtDecayer = (decaytable == 0) && (pExtDecayer !=0);
|
||||
G4bool isExtDecayer = (decaytable == nullptr) && (pExtDecayer != nullptr);
|
||||
|
||||
// Error due to NO Decay Table
|
||||
if ( (decaytable == 0) && !isExtDecayer &&!isPreAssigned ){
|
||||
if ( (decaytable == nullptr) && !isExtDecayer && !isPreAssigned ){
|
||||
if (GetVerboseLevel()>0) {
|
||||
G4cout << "G4Decay::DoIt : decay table not defined for ";
|
||||
G4cout << aParticle->GetDefinition()->GetParticleName()<< G4endl;
|
||||
@@ -246,35 +246,38 @@ G4VParticleChange* G4Decay::DecayIt(const G4Track& aTrack, const G4Step& )
|
||||
// wide resonance. However, if this is the case, and the channel is
|
||||
// accepted, then the masses of the resonance daughter particles will
|
||||
// be sampled by taking into account their widths.
|
||||
G4VDecayChannel* decaychannel = 0;
|
||||
G4VDecayChannel* decaychannel = nullptr;
|
||||
G4double massParent = aParticle->GetMass();
|
||||
decaychannel = decaytable->SelectADecayChannel(massParent);
|
||||
if ( decaychannel ==0) {
|
||||
if ( decaychannel == nullptr) {
|
||||
// decay channel not found
|
||||
G4ExceptionDescription ed;
|
||||
ed << "Can not determine decay channel for "
|
||||
<< aParticleDef->GetParticleName() << G4endl
|
||||
<< " mass of dynamic particle: " << massParent/GeV << " (GEV)" << G4endl
|
||||
<< " dacay table has " << decaytable->entries() << " entries" << G4endl;
|
||||
<< aParticleDef->GetParticleName() << G4endl
|
||||
<< " mass of dynamic particle: "
|
||||
<< massParent/GeV << " (GEV)" << G4endl
|
||||
<< " dacay table has " << decaytable->entries()
|
||||
<< " entries" << G4endl;
|
||||
G4double checkedmass=massParent;
|
||||
if (massParent < 0.) {
|
||||
checkedmass=aParticleDef->GetPDGMass();
|
||||
ed << "Using PDG mass ("<<checkedmass/GeV << "(GeV)) in IsOKWithParentMass" << G4endl;
|
||||
}
|
||||
for (G4int ic =0;ic <decaytable->entries();++ic) {
|
||||
G4VDecayChannel * dc= decaytable->GetDecayChannel(ic);
|
||||
ed << ic << ": BR " << dc->GetBR() << ", IsOK? "
|
||||
<< dc->IsOKWithParentMass(checkedmass)
|
||||
<< ", --> ";
|
||||
G4int ndaughters=dc->GetNumberOfDaughters();
|
||||
for (G4int id=0;id<ndaughters;++id) {
|
||||
if (id>0) ed << " + "; // seperator, except for first
|
||||
ed << dc->GetDaughterName(id);
|
||||
}
|
||||
ed << G4endl;
|
||||
}
|
||||
checkedmass=aParticleDef->GetPDGMass();
|
||||
ed << "Using PDG mass ("<<checkedmass/GeV
|
||||
<< "(GeV)) in IsOKWithParentMass" << G4endl;
|
||||
}
|
||||
for (G4int ic =0;ic <decaytable->entries();++ic) {
|
||||
G4VDecayChannel * dc= decaytable->GetDecayChannel(ic);
|
||||
ed << ic << ": BR " << dc->GetBR() << ", IsOK? "
|
||||
<< dc->IsOKWithParentMass(checkedmass)
|
||||
<< ", --> ";
|
||||
G4int ndaughters=dc->GetNumberOfDaughters();
|
||||
for (G4int id=0;id<ndaughters;++id) {
|
||||
if (id>0) ed << " + "; // seperator, except for first
|
||||
ed << dc->GetDaughterName(id);
|
||||
}
|
||||
ed << G4endl;
|
||||
}
|
||||
G4Exception("G4Decay::DoIt", "DECAY003", FatalException,ed);
|
||||
} else {
|
||||
} else {
|
||||
// execute DecayIt()
|
||||
#ifdef G4VERBOSE
|
||||
G4int temp = decaychannel->GetVerboseLevel();
|
||||
@@ -353,35 +356,35 @@ G4VParticleChange* G4Decay::DecayIt(const G4Track& aTrack, const G4Step& )
|
||||
G4int index;
|
||||
G4ThreeVector currentPosition;
|
||||
const G4TouchableHandle thand = aTrack.GetTouchableHandle();
|
||||
for (index=0; index < numberOfSecondaries; index++)
|
||||
{
|
||||
// get current position of the track
|
||||
currentPosition = aTrack.GetPosition();
|
||||
// create a new track object
|
||||
G4Track* secondary = new G4Track( products->PopProducts(),
|
||||
for (index=0; index < numberOfSecondaries; index++){
|
||||
// get current position of the track
|
||||
currentPosition = aTrack.GetPosition();
|
||||
// create a new track object
|
||||
G4Track* secondary = new G4Track( products->PopProducts(),
|
||||
finalGlobalTime ,
|
||||
currentPosition );
|
||||
// switch on good for tracking flag
|
||||
secondary->SetGoodForTrackingFlag();
|
||||
secondary->SetTouchableHandle(thand);
|
||||
// add the secondary track in the List
|
||||
fParticleChangeForDecay.AddSecondary(secondary);
|
||||
// switch on good for tracking flag
|
||||
secondary->SetGoodForTrackingFlag();
|
||||
secondary->SetTouchableHandle(thand);
|
||||
// add the secondary track in the List
|
||||
fParticleChangeForDecay.AddSecondary(secondary);
|
||||
}
|
||||
delete products;
|
||||
|
||||
|
||||
// Kill the parent particle
|
||||
fParticleChangeForDecay.ProposeTrackStatus( fStopAndKill ) ;
|
||||
fParticleChangeForDecay.ProposeLocalEnergyDeposit(energyDeposit);
|
||||
fParticleChangeForDecay.ProposeLocalTime( finalLocalTime );
|
||||
|
||||
|
||||
// Clear NumberOfInteractionLengthLeft
|
||||
ClearNumberOfInteractionLengthLeft();
|
||||
|
||||
|
||||
return &fParticleChangeForDecay ;
|
||||
}
|
||||
|
||||
void G4Decay::DaughterPolarization(const G4Track& , G4DecayProducts* )
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
|
||||
@@ -514,3 +517,9 @@ G4VParticleChange* G4Decay::PostStepDoIt(
|
||||
}
|
||||
}
|
||||
|
||||
void G4Decay::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << GetProcessName() << ": Decay of particles. \n"
|
||||
<< "kinematics of daughters are dertermined by DecayChannels "
|
||||
<< " or by PreAssignedDecayProducts\n";
|
||||
}
|
||||
|
||||
@@ -73,10 +73,8 @@ G4VParticleChange* G4DecayWithSpin::PostStepDoIt(const G4Track& aTrack, const G4
|
||||
// get parent_polarization
|
||||
G4ThreeVector parent_polarization = aParticle->GetPolarization();
|
||||
|
||||
if(parent_polarization == G4ThreeVector(0,0,0))
|
||||
{
|
||||
if(parent_polarization == G4ThreeVector(0,0,0)){
|
||||
// Generate random polarization direction
|
||||
|
||||
G4double cost = 1. - 2.*G4UniformRand();
|
||||
G4double sint = std::sqrt((1.-cost)*(1.+cost));
|
||||
|
||||
@@ -91,26 +89,20 @@ G4VParticleChange* G4DecayWithSpin::PostStepDoIt(const G4Track& aTrack, const G4
|
||||
parent_polarization.setX(px);
|
||||
parent_polarization.setY(py);
|
||||
parent_polarization.setZ(pz);
|
||||
|
||||
}
|
||||
|
||||
// decay table
|
||||
G4DecayTable *decaytable = aParticleDef->GetDecayTable();
|
||||
if (decaytable) {
|
||||
if (decaytable != nullptr) {
|
||||
for (G4int ip=0; ip<decaytable->entries(); ip++){
|
||||
decaytable->GetDecayChannel(ip)->SetPolarization(parent_polarization);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G4ParticleChangeForDecay* pParticleChangeForDecay;
|
||||
pParticleChangeForDecay = (G4ParticleChangeForDecay*)G4Decay::DecayIt(aTrack,aStep);
|
||||
|
||||
pParticleChangeForDecay->ProposePolarization(parent_polarization);
|
||||
|
||||
//G4cout << parent_polarization.x() << ", "
|
||||
// << parent_polarization.y() << ", "
|
||||
// << parent_polarization.z() << G4endl;
|
||||
|
||||
return pParticleChangeForDecay;
|
||||
}
|
||||
|
||||
@@ -124,10 +116,8 @@ G4VParticleChange* G4DecayWithSpin::AtRestDoIt(const G4Track& aTrack, const G4St
|
||||
// get parent_polarization
|
||||
G4ThreeVector parent_polarization = aParticle->GetPolarization();
|
||||
|
||||
if(parent_polarization == G4ThreeVector(0,0,0))
|
||||
{
|
||||
if(parent_polarization == G4ThreeVector(0,0,0)) {
|
||||
// Generate random polarization direction
|
||||
|
||||
G4double cost = 1. - 2.*G4UniformRand();
|
||||
G4double sint = std::sqrt((1.-cost)*(1.+cost));
|
||||
|
||||
@@ -147,8 +137,7 @@ G4VParticleChange* G4DecayWithSpin::AtRestDoIt(const G4Track& aTrack, const G4St
|
||||
|
||||
G4FieldManager* fieldMgr = aStep.GetTrack()->GetVolume()->
|
||||
GetLogicalVolume()->GetFieldManager();
|
||||
|
||||
if (!fieldMgr) {
|
||||
if (fieldMgr == nullptr) {
|
||||
G4TransportationManager *transportMgr =
|
||||
G4TransportationManager::GetTransportationManager();
|
||||
G4PropagatorInField* fFieldPropagator =
|
||||
@@ -157,20 +146,18 @@ G4VParticleChange* G4DecayWithSpin::AtRestDoIt(const G4Track& aTrack, const G4St
|
||||
fFieldPropagator->GetCurrentFieldManager();
|
||||
}
|
||||
|
||||
const G4Field* field = NULL;
|
||||
if(fieldMgr)field = fieldMgr->GetDetectorField();
|
||||
|
||||
if (field) {
|
||||
const G4Field* field = nullptr;
|
||||
if (fieldMgr != nullptr) field = fieldMgr->GetDetectorField();
|
||||
|
||||
if ( field != nullptr ) {
|
||||
G4double point[4];
|
||||
point[0] = (aStep.GetPostStepPoint()->GetPosition())[0];
|
||||
point[1] = (aStep.GetPostStepPoint()->GetPosition())[1];
|
||||
point[2] = (aStep.GetPostStepPoint()->GetPosition())[2];
|
||||
point[3] = aTrack.GetGlobalTime();
|
||||
|
||||
G4double fieldValue[6];
|
||||
G4double fieldValue[6] ={ 0., 0., 0., 0., 0., 0.};
|
||||
field -> GetFieldValue(point,fieldValue);
|
||||
|
||||
G4ThreeVector B(fieldValue[0],fieldValue[1],fieldValue[2]);
|
||||
|
||||
// Call the spin precession only for non-zero mag. field
|
||||
@@ -182,7 +169,7 @@ G4VParticleChange* G4DecayWithSpin::AtRestDoIt(const G4Track& aTrack, const G4St
|
||||
|
||||
// decay table
|
||||
G4DecayTable *decaytable = aParticleDef->GetDecayTable();
|
||||
if (decaytable) {
|
||||
if ( decaytable != nullptr) {
|
||||
for (G4int ip=0; ip<decaytable->entries(); ip++){
|
||||
decaytable->GetDecayChannel(ip)->SetPolarization(parent_polarization);
|
||||
}
|
||||
@@ -190,7 +177,6 @@ G4VParticleChange* G4DecayWithSpin::AtRestDoIt(const G4Track& aTrack, const G4St
|
||||
|
||||
G4ParticleChangeForDecay* pParticleChangeForDecay;
|
||||
pParticleChangeForDecay = (G4ParticleChangeForDecay*)G4Decay::DecayIt(aTrack,aStep);
|
||||
|
||||
pParticleChangeForDecay->ProposePolarization(parent_polarization);
|
||||
|
||||
return pParticleChangeForDecay;
|
||||
@@ -235,3 +221,10 @@ G4ThreeVector G4DecayWithSpin::Spin_Precession( const G4Step& aStep,
|
||||
return newSpin;
|
||||
|
||||
}
|
||||
|
||||
void G4DecayWithSpin::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << GetProcessName()
|
||||
<< ": Decay of particles considering parent polarization \n"
|
||||
<< "kinematics of daughters are dertermined by DecayChannels \n";
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ void G4PionDecayMakeSpin::DaughterPolarization(const G4Track& aTrack,
|
||||
return;
|
||||
}
|
||||
|
||||
G4DynamicParticle* aMuon = NULL;
|
||||
G4DynamicParticle* aMuon = nullptr;
|
||||
|
||||
G4double emu(0), eneutrino(0);
|
||||
G4ThreeVector p_muon, p_neutrino;
|
||||
@@ -92,30 +92,28 @@ void G4PionDecayMakeSpin::DaughterPolarization(const G4Track& aTrack,
|
||||
G4int numberOfSecondaries = products->entries();
|
||||
|
||||
if (numberOfSecondaries > 0) {
|
||||
for (G4int index=0; index < numberOfSecondaries; index++)
|
||||
{
|
||||
G4DynamicParticle* aSecondary = (*products)[index];
|
||||
const G4ParticleDefinition* aSecondaryDef = aSecondary->GetDefinition();
|
||||
|
||||
if (aSecondaryDef == aMuonPlus ||
|
||||
aSecondaryDef == aMuonMinus ) {
|
||||
// Muon+ or Muon-
|
||||
aMuon = aSecondary;
|
||||
emu = aSecondary->GetTotalEnergy();
|
||||
p_muon = aSecondary->GetMomentum();
|
||||
} else if (aSecondaryDef == aNeutrinoMu ||
|
||||
aSecondaryDef == aAntiNeutrinoMu ) {
|
||||
// Muon-Neutrino / Muon-Anti-Neutrino
|
||||
eneutrino = aSecondary->GetTotalEnergy();
|
||||
p_neutrino = aSecondary->GetMomentum();
|
||||
}
|
||||
for (G4int index=0; index < numberOfSecondaries; index++){
|
||||
G4DynamicParticle* aSecondary = (*products)[index];
|
||||
const G4ParticleDefinition* aSecondaryDef = aSecondary->GetDefinition();
|
||||
|
||||
if (aSecondaryDef == aMuonPlus ||
|
||||
aSecondaryDef == aMuonMinus ) {
|
||||
// Muon+ or Muon-
|
||||
aMuon = aSecondary;
|
||||
emu = aSecondary->GetTotalEnergy();
|
||||
p_muon = aSecondary->GetMomentum();
|
||||
} else if (aSecondaryDef == aNeutrinoMu ||
|
||||
aSecondaryDef == aAntiNeutrinoMu ) {
|
||||
// Muon-Neutrino / Muon-Anti-Neutrino
|
||||
eneutrino = aSecondary->GetTotalEnergy();
|
||||
p_neutrino = aSecondary->GetMomentum();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This routine deals only with decays with a
|
||||
// muon and mu-(anti)neutrinos in the final state
|
||||
|
||||
if (!aMuon) return;
|
||||
if (aMuon == nullptr) return;
|
||||
if (eneutrino==0||emu==0) return;
|
||||
|
||||
G4ThreeVector spin(0,0,0);
|
||||
@@ -126,7 +124,6 @@ void G4PionDecayMakeSpin::DaughterPolarization(const G4Track& aTrack,
|
||||
G4double emmu = aMuonPlus->GetPDGMass();
|
||||
|
||||
if (numberOfSecondaries == 2 ) {
|
||||
|
||||
G4double scale = - (eneutrino - ( p_muon * p_neutrino )/(emu+emmu));
|
||||
|
||||
p_muon = scale * p_muon;
|
||||
@@ -139,7 +136,6 @@ void G4PionDecayMakeSpin::DaughterPolarization(const G4Track& aTrack,
|
||||
if (aParticle->GetCharge() < 0.0) spin = -spin;
|
||||
|
||||
} else {
|
||||
|
||||
spin = G4RandomDirection();
|
||||
|
||||
}
|
||||
@@ -150,3 +146,13 @@ void G4PionDecayMakeSpin::DaughterPolarization(const G4Track& aTrack,
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void G4PionDecayMakeSpin::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << GetProcessName()
|
||||
<< ": Decay of mesons that can decay into a muon \n"
|
||||
<< " i.e. pi+, pi-, K+, K- and K0_long \n"
|
||||
<< " kinematics of daughters are dertermined by DecayChannels \n"
|
||||
<< " polarization of daughter particles are take into account. \n";
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4UnknownDecay.cc 71045 2013-06-10 09:34:33Z gcosmo $
|
||||
// $Id: G4UnknownDecay.cc 105727 2017-08-16 12:47:05Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
@@ -95,8 +95,8 @@ G4VParticleChange* G4UnknownDecay::DecayIt(const G4Track& aTrack, const G4Step&
|
||||
|
||||
//check if thePreAssignedDecayProducts exists
|
||||
const G4DecayProducts* o_products = (aParticle->GetPreAssignedDecayProducts());
|
||||
G4bool isPreAssigned = (o_products != 0);
|
||||
G4DecayProducts* products = 0;
|
||||
G4bool isPreAssigned = (o_products != nullptr);
|
||||
G4DecayProducts* products = nullptr;
|
||||
|
||||
if (!isPreAssigned ){
|
||||
fParticleChangeForDecay.SetNumberOfSecondaries(0);
|
||||
@@ -154,22 +154,21 @@ G4VParticleChange* G4UnknownDecay::DecayIt(const G4Track& aTrack, const G4Step&
|
||||
G4int index;
|
||||
G4ThreeVector currentPosition;
|
||||
const G4TouchableHandle thand = aTrack.GetTouchableHandle();
|
||||
for (index=0; index < numberOfSecondaries; index++)
|
||||
{
|
||||
// get current position of the track
|
||||
currentPosition = aTrack.GetPosition();
|
||||
// create a new track object
|
||||
G4Track* secondary = new G4Track( products->PopProducts(),
|
||||
for (index=0; index < numberOfSecondaries; index++){
|
||||
// get current position of the track
|
||||
currentPosition = aTrack.GetPosition();
|
||||
// create a new track object
|
||||
G4Track* secondary = new G4Track( products->PopProducts(),
|
||||
finalGlobalTime ,
|
||||
currentPosition );
|
||||
// switch on good for tracking flag
|
||||
secondary->SetGoodForTrackingFlag();
|
||||
secondary->SetTouchableHandle(thand);
|
||||
// add the secondary track in the List
|
||||
fParticleChangeForDecay.AddSecondary(secondary);
|
||||
// switch on good for tracking flag
|
||||
secondary->SetGoodForTrackingFlag();
|
||||
secondary->SetTouchableHandle(thand);
|
||||
// add the secondary track in the List
|
||||
fParticleChangeForDecay.AddSecondary(secondary);
|
||||
}
|
||||
delete products;
|
||||
|
||||
|
||||
// Kill the parent particle
|
||||
fParticleChangeForDecay.ProposeTrackStatus( fStopAndKill ) ;
|
||||
fParticleChangeForDecay.ProposeLocalEnergyDeposit(energyDeposit);
|
||||
@@ -180,6 +179,13 @@ G4VParticleChange* G4UnknownDecay::DecayIt(const G4Track& aTrack, const G4Step&
|
||||
return &fParticleChangeForDecay ;
|
||||
}
|
||||
|
||||
void G4UnknownDecay::ProcessDescription(std::ostream& outFile) const
|
||||
{
|
||||
outFile << GetProcessName()
|
||||
<< ": Decay of 'unknown' particles. \n"
|
||||
<< "kinematics of daughters are dertermined "
|
||||
<< "by PreAssignedDecayProducts. \n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 102433 2017-01-27 08:24:52Z gcosmo $
|
||||
$Id: History 107259 2017-11-07 09:59:08Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,12 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
---------------------------------------------------------
|
||||
|
||||
06 Nov 2017: V. Ivanchenko (emadjoint-V10-03-01)
|
||||
-Extended correction of occurence of FPE in G4AdjointForcedInteractionForGamma.
|
||||
-G4eAdjointMultipleScattering - change index of the default accourding to recent
|
||||
modifications in emutils
|
||||
|
||||
27 Jan 2017: L. Desorgher (emadjoint-V10-03-00)
|
||||
-Correction of occurence of FPE in G4AdjointForcedInteractionForGamma.
|
||||
|
||||
|
||||
@@ -183,15 +183,26 @@ G4VParticleChange* G4AdjointForcedInteractionForGamma::AlongStepDoIt(const G4Tra
|
||||
theNumberOfInteractionLengthLeft-=nb_adj_interaction_length_over_step;
|
||||
|
||||
//Following condition to remove very rare FPE issue
|
||||
if (total_acc_nb_adj_interaction_length <= 1.e-50 && theNumberOfInteractionLengthLeft<=1.e-50) { //condition added to avoid FPE issue
|
||||
mc_induced_survival_probability = 1.e50;
|
||||
}
|
||||
//if (total_acc_nb_adj_interaction_length <= 1.e-50 && theNumberOfInteractionLengthLeft<=1.e-50) { //condition added to avoid FPE issue
|
||||
// VI 06.11.2017 - new condition
|
||||
if (std::abs(total_acc_nb_adj_interaction_length - previous_acc_nb_adj_interaction_length) <= 1.e-15) {
|
||||
mc_induced_survival_probability = 1.e50;
|
||||
/*
|
||||
G4cout << "FPE protection: " << total_acc_nb_adj_interaction_length << " "
|
||||
<< previous_acc_nb_adj_interaction_length << " "
|
||||
<< acc_nb_fwd_interaction_length << " "
|
||||
<< acc_nb_adj_interaction_length << " "
|
||||
<< theNumberOfInteractionLengthLeft
|
||||
<< G4endl;
|
||||
*/
|
||||
}
|
||||
else {
|
||||
mc_induced_survival_probability= std::exp(-acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length);
|
||||
mc_induced_survival_probability=mc_induced_survival_probability/(std::exp(-previous_acc_nb_adj_interaction_length)-std::exp(-total_acc_nb_adj_interaction_length));
|
||||
}
|
||||
}
|
||||
G4double weight_correction = fwd_survival_probability/mc_induced_survival_probability;
|
||||
|
||||
//weight_correction = 1.;
|
||||
//Caution!!!
|
||||
// It is important to select the weight of the post_step_point
|
||||
|
||||
@@ -76,8 +76,8 @@ G4bool G4eAdjointMultipleScattering::IsApplicable (const G4ParticleDefinition& p
|
||||
void G4eAdjointMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
if(isInitialized) { return; }
|
||||
if(!EmModel(1)) { SetEmModel(new G4UrbanAdjointMscModel(), 1); }
|
||||
AddEmModel(1, EmModel(1));
|
||||
if(!EmModel(0)) { SetEmModel(new G4UrbanAdjointMscModel(), 0); }
|
||||
AddEmModel(1, EmModel(0));
|
||||
isInitialized = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,30 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------*
|
||||
|
||||
16-08-2017, SI tag emdna-V10-03-28
|
||||
- updated variable types in models
|
||||
|
||||
10-08-2017, SI tag emdna-V10-03-27
|
||||
- test
|
||||
|
||||
10-08-2017, SI tag emdna-V10-03-26
|
||||
- same as previous
|
||||
|
||||
09-08-2017, SI tag emdna-V10-03-25
|
||||
- same as previous
|
||||
|
||||
09-08-2017, SI tag emdna-V10-03-24
|
||||
- G4DNAEmfietzoglouIonisationModel: added protection for out of bound access
|
||||
|
||||
03-08-2017, VI tag emdna-V10-03-23
|
||||
- G4DNAExcitation, G4DNAIonisation - make coherent model initialisation
|
||||
|
||||
28-07-2017, SI, tag emdna-V10-03-22
|
||||
- added stationary mode flag to CPA100 ionisation.
|
||||
|
||||
04-07-2017, SI, tag emdna-V10-03-21
|
||||
- added tagging of atom. deexc. products in ionisation models.
|
||||
|
||||
31-05-2017, SM, tag emdna-V10-03-20
|
||||
- Correct windows issues with path of diff. CS data file.
|
||||
|
||||
|
||||
@@ -85,8 +85,8 @@ private:
|
||||
G4int verboseLevel;
|
||||
const G4ParticleDefinition* fParticleDefinition;
|
||||
|
||||
double fLowEnergy;
|
||||
double fHighEnergy;
|
||||
G4double fLowEnergy;
|
||||
G4double fHighEnergy;
|
||||
G4String fTableFile;
|
||||
G4DNACrossSectionDataSet* fTableData;
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ private:
|
||||
G4int verboseLevel;
|
||||
const G4ParticleDefinition* fParticleDefinition;
|
||||
|
||||
double fLowEnergy;
|
||||
double fHighEnergy;
|
||||
G4double fLowEnergy;
|
||||
G4double fHighEnergy;
|
||||
|
||||
G4PhysicsTable* fTableData;
|
||||
G4PhysicsVector* fTotalXS;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
const G4ParticleDefinition*,
|
||||
G4double /*kineticEnergy*/);
|
||||
|
||||
double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
|
||||
G4double TransferedEnergy(G4ParticleDefinition * aParticleDefinition,
|
||||
G4double incomingParticleEnergy, G4int shell, G4double random) ;
|
||||
@@ -142,7 +142,7 @@ private:
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData[6];
|
||||
TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
|
||||
@@ -150,10 +150,10 @@ private:
|
||||
TriDimensionMap pDiffCrossSectionData[6];
|
||||
TriDimensionMap pNrjTransfData[6]; // for cumulated dcs
|
||||
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<double> pTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
std::vector<G4double> pTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
|
||||
VecMap eVecm;
|
||||
VecMap pVecm;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
const G4ParticleDefinition*,
|
||||
G4double /*kineticEnergy*/);
|
||||
|
||||
double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition, G4double k, G4double energyTransfer, G4int shell);
|
||||
|
||||
G4double TransferedEnergy(G4ParticleDefinition * aParticleDefinition, G4double incomingParticleEnergy, G4int shell, G4double random) ;
|
||||
|
||||
@@ -135,14 +135,14 @@ private:
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap fDiffCrossSectionData[6];
|
||||
TriDimensionMap fNrjTransfData[6]; // for cumulated dcs
|
||||
|
||||
std::vector<double> fTdummyVec;
|
||||
std::vector<G4double> fTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
|
||||
VecMap fVecm;
|
||||
VecMap fProbaShellMap[6]; // for cumulated dcs
|
||||
|
||||
@@ -133,12 +133,12 @@ private:
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData;
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
VecMap eVecm;
|
||||
|
||||
G4double RandomizeCosTheta(G4double k);
|
||||
|
||||
@@ -150,14 +150,14 @@ private:
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData[6];
|
||||
TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
|
||||
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
|
||||
VecMap eVecm;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAChampionElasticModel.hh 97520 2016-06-03 14:23:17Z gcosmo $
|
||||
// $Id: G4DNAChampionElasticModel.hh 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef G4DNAChampionElasticModel_h
|
||||
@@ -80,11 +80,11 @@ public:
|
||||
|
||||
private:
|
||||
// Cross section
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
VecMap eVecm;
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
TriDimensionMap eDiffCrossSectionData;
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
// Water density table
|
||||
const std::vector<G4double>* fpMolWaterDensity;
|
||||
|
||||
+11
-16
@@ -39,17 +39,15 @@
|
||||
#include "G4VEmModel.hh"
|
||||
#include "G4ParticleChangeForGamma.hh"
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
|
||||
#include "G4DNAEmfietzoglouWaterIonisationStructure.hh"
|
||||
#include "G4VAtomDeexcitation.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Electron.hh"
|
||||
#include "G4Proton.hh"
|
||||
|
||||
#include "G4DNACrossSectionDataSet.hh"
|
||||
#include "G4DNAGenericIonsManager.hh"
|
||||
#include "G4LogLogInterpolation.hh"
|
||||
#include "G4DNAEmfietzoglouWaterIonisationStructure.hh"
|
||||
|
||||
class G4DNAEmfietzoglouIonisationModel : public G4VEmModel
|
||||
{
|
||||
@@ -77,7 +75,7 @@ public:
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition,
|
||||
G4double DifferentialCrossSection(G4ParticleDefinition * aParticleDefinition,
|
||||
G4double k,
|
||||
G4double energyTransfer,
|
||||
G4int shell);
|
||||
@@ -105,9 +103,6 @@ private:
|
||||
std::map<G4String, G4double, std::less<G4String> > lowEnergyLimit;
|
||||
std::map<G4String, G4double, std::less<G4String> > highEnergyLimit;
|
||||
|
||||
// TODO :
|
||||
// std::map<const G4ParticleDefinition*,std::pair<G4double,G4double> > fEnergyLimits;
|
||||
|
||||
G4bool isInitialised;
|
||||
G4int verboseLevel;
|
||||
|
||||
@@ -154,16 +149,16 @@ private:
|
||||
G4double t,
|
||||
G4double e);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
|
||||
TriDimensionMap eDiffCrossSectionData[6];
|
||||
TriDimensionMap eNrjTransfData[6]; // for cumulated dcs
|
||||
|
||||
TriDimensionMap pDiffCrossSectionData[6];
|
||||
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
|
||||
VecMap eVecm;
|
||||
|
||||
|
||||
@@ -124,12 +124,12 @@ private:
|
||||
LinLinInterpolate (G4double e1, G4double e2, G4double e, G4double xs1,
|
||||
G4double xs2);
|
||||
|
||||
typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
typedef std::map<G4double, std::map<G4double, G4double> > TriDimensionMap;
|
||||
TriDimensionMap fDiffCrossSectionData;
|
||||
|
||||
std::vector<double> eTdummyVec;
|
||||
std::vector<G4double> eTdummyVec;
|
||||
|
||||
typedef std::map<double, std::vector<double> > VecMap;
|
||||
typedef std::map<G4double, std::vector<G4double> > VecMap;
|
||||
VecMap eVecm;
|
||||
|
||||
G4double
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNASancheExcitationModel.hh 98733 2016-08-09 10:51:58Z gcosmo $
|
||||
// $Id: G4DNASancheExcitationModel.hh 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
inline void ExtendLowEnergyLimit(G4double /*threshold*/);
|
||||
|
||||
inline void SetVerboseLevel(int verbose)
|
||||
inline void SetVerboseLevel(G4int verbose)
|
||||
{
|
||||
verboseLevel = verbose;
|
||||
}
|
||||
@@ -108,9 +108,9 @@ private:
|
||||
//
|
||||
// typedef std::map<double, std::map<double, double> > TriDimensionMap;
|
||||
// TriDimensionMap map1;
|
||||
std::vector<double> tdummyVec;
|
||||
std::vector<std::vector<double>> fEnergyLevelXS;
|
||||
std::vector<double> fEnergyTotalXS;
|
||||
std::vector<G4double> tdummyVec;
|
||||
std::vector<std::vector<G4double>> fEnergyLevelXS;
|
||||
std::vector<G4double> fEnergyTotalXS;
|
||||
|
||||
//
|
||||
G4DNASancheExcitationModel & operator=(const G4DNASancheExcitationModel &right);
|
||||
|
||||
@@ -60,13 +60,13 @@ G4DNABornIonisationModel1::G4DNABornIonisationModel1(const G4ParticleDefinition*
|
||||
G4cout << "Born ionisation model is constructed " << G4endl;
|
||||
}
|
||||
|
||||
//Mark this model as "applicable" for atomic deexcitation
|
||||
// Mark this model as "applicable" for atomic deexcitation
|
||||
SetDeexcitationFlag(true);
|
||||
fAtomDeexcitation = 0;
|
||||
fParticleChangeForGamma = 0;
|
||||
fpMolWaterDensity = 0;
|
||||
|
||||
// define default angular generator
|
||||
// Define default angular generator
|
||||
SetAngularDistribution(new G4DNABornAngle());
|
||||
|
||||
// Selection of computation method
|
||||
@@ -161,8 +161,6 @@ void G4DNABornIonisationModel1::Initialise(const G4ParticleDefinition* particle,
|
||||
FatalException,"Missing data file:/dna/sigmadiff_ionisation_e_born.dat");
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
// Clear the arrays for re-initialization case (MT mode)
|
||||
// March 25th, 2014 - Vaclav Stepan, Sebastien Incerti
|
||||
|
||||
@@ -172,7 +170,7 @@ void G4DNABornIonisationModel1::Initialise(const G4ParticleDefinition* particle,
|
||||
eVecm.clear();
|
||||
pVecm.clear();
|
||||
|
||||
for (int j=0; j<5; j++)
|
||||
for (G4int j=0; j<5; j++)
|
||||
{
|
||||
eProbaShellMap[j].clear();
|
||||
pProbaShellMap[j].clear();
|
||||
@@ -183,18 +181,19 @@ void G4DNABornIonisationModel1::Initialise(const G4ParticleDefinition* particle,
|
||||
eNrjTransfData[j].clear();
|
||||
pNrjTransfData[j].clear();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
eTdummyVec.push_back(0.);
|
||||
while(!eDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
eDiffCrossSection>>tDummy>>eDummy;
|
||||
if (tDummy != eTdummyVec.back()) eTdummyVec.push_back(tDummy);
|
||||
|
||||
double tmp;
|
||||
for (int j=0; j<5; j++)
|
||||
G4double tmp;
|
||||
for (G4int j=0; j<5; j++)
|
||||
{
|
||||
eDiffCrossSection>> tmp;
|
||||
|
||||
@@ -252,11 +251,11 @@ void G4DNABornIonisationModel1::Initialise(const G4ParticleDefinition* particle,
|
||||
pTdummyVec.push_back(0.);
|
||||
while(!pDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
pDiffCrossSection>>tDummy>>eDummy;
|
||||
if (tDummy != pTdummyVec.back()) pTdummyVec.push_back(tDummy);
|
||||
for (int j=0; j<5; j++)
|
||||
for (G4int j=0; j<5; j++)
|
||||
{
|
||||
pDiffCrossSection>>pDiffCrossSectionData[j][tDummy][eDummy];
|
||||
|
||||
@@ -298,12 +297,16 @@ void G4DNABornIonisationModel1::Initialise(const G4ParticleDefinition* particle,
|
||||
}
|
||||
|
||||
// Initialize water density pointer
|
||||
|
||||
fpMolWaterDensity = G4DNAMolecularMaterial::Instance()->
|
||||
GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
|
||||
|
||||
//
|
||||
// AD
|
||||
|
||||
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
|
||||
|
||||
//
|
||||
|
||||
if (isInitialised)
|
||||
{ return;}
|
||||
fParticleChangeForGamma = GetParticleChangeForGamma();
|
||||
@@ -322,7 +325,6 @@ G4double G4DNABornIonisationModel1::CrossSectionPerVolume(const G4Material* mate
|
||||
{
|
||||
G4cout << "Calling CrossSectionPerVolume() of G4DNABornIonisationModel1"
|
||||
<< G4endl;
|
||||
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -467,6 +469,58 @@ void G4DNABornIonisationModel1::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
ionizationShell = RandomSelect(k,particleName);
|
||||
}while (k<19*eV && ionizationShell==2 && particle->GetDefinition()==G4Electron::ElectronDefinition());
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
// SI: additional protection if tcs interpolation method is modified
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
|
||||
if (fasterCode == false)
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
else
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
//
|
||||
|
||||
G4int Z = 8;
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
|
||||
if (particle->GetDefinition() == G4Electron::ElectronDefinition())
|
||||
{
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
}
|
||||
|
||||
else fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
// AM: sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same as Oxygen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
@@ -474,14 +528,6 @@ void G4DNABornIonisationModel1::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
G4int secNumberInit = 0;// need to know at a certain point the energy of secondaries
|
||||
G4int secNumberFinal = 0;// So I'll make the diference and then sum the energies
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
//SI: additional protection if tcs interpolation method is modified
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4int Z = 8;
|
||||
if(fAtomDeexcitation)
|
||||
{
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
@@ -510,45 +556,8 @@ void G4DNABornIonisationModel1::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
// Note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
|
||||
if (fasterCode == false)
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
// SI - 01/04/2014
|
||||
else
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
//
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
if (particle->GetDefinition() == G4Electron::ElectronDefinition())
|
||||
{
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
}
|
||||
|
||||
else fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
// note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++)
|
||||
@@ -566,15 +575,14 @@ void G4DNABornIonisationModel1::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
fParticleChangeForGamma->SetProposedKineticEnergy(k);
|
||||
fParticleChangeForGamma->ProposeLocalEnergyDeposit(k-scatteredEnergy);
|
||||
}
|
||||
|
||||
// SI - 01/04/2014
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
//
|
||||
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
ionizationShell,
|
||||
@@ -722,14 +730,14 @@ G4double G4DNABornIonisationModel1::RandomizeEjectedElectronEnergy(G4ParticleDef
|
||||
*/
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
double G4DNABornIonisationModel1::DifferentialCrossSection(G4ParticleDefinition * particleDefinition,
|
||||
G4double G4DNABornIonisationModel1::DifferentialCrossSection(G4ParticleDefinition * particleDefinition,
|
||||
G4double k,
|
||||
G4double energyTransfer,
|
||||
G4int ionizationLevelIndex)
|
||||
{
|
||||
G4double sigma = 0.;
|
||||
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex))
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex)/eV)
|
||||
{
|
||||
G4double valueT1 = 0;
|
||||
G4double valueT2 = 0;
|
||||
@@ -747,27 +755,27 @@ double G4DNABornIonisationModel1::DifferentialCrossSection(G4ParticleDefinition
|
||||
{
|
||||
// k should be in eV and energy transfer eV also
|
||||
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(),
|
||||
k);
|
||||
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
// SI : the following condition avoids situations where energyTransfer >last vector element
|
||||
if (energyTransfer <= eVecm[(*t1)].back()
|
||||
&& energyTransfer <= eVecm[(*t2)].back())
|
||||
{
|
||||
std::vector<double>::iterator e12 =
|
||||
std::vector<G4double>::iterator e12 =
|
||||
std::upper_bound(eVecm[(*t1)].begin(),
|
||||
eVecm[(*t1)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 =
|
||||
std::vector<G4double>::iterator e22 =
|
||||
std::upper_bound(eVecm[(*t2)].begin(),
|
||||
eVecm[(*t2)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
@@ -788,20 +796,20 @@ double G4DNABornIonisationModel1::DifferentialCrossSection(G4ParticleDefinition
|
||||
if (particleDefinition == G4Proton::ProtonDefinition())
|
||||
{
|
||||
// k should be in eV and energy transfer eV also
|
||||
std::vector<double>::iterator t2 = std::upper_bound(pTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(pTdummyVec.begin(),
|
||||
pTdummyVec.end(),
|
||||
k);
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
std::vector<double>::iterator e12 = std::upper_bound(pVecm[(*t1)].begin(),
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(pVecm[(*t1)].begin(),
|
||||
pVecm[(*t1)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(pVecm[(*t2)].begin(),
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(pVecm[(*t2)].begin(),
|
||||
pVecm[(*t2)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
@@ -868,7 +876,7 @@ G4double G4DNABornIonisationModel1::Interpolate(G4double e1,
|
||||
G4double d2 = xs2;
|
||||
value = (d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// Switch to log-lin interpolation for faster code
|
||||
if ((e2 - e1) != 0 && xs1 != 0 && xs2 != 0 && fasterCode)
|
||||
@@ -1023,7 +1031,6 @@ G4double G4DNABornIonisationModel1::RandomizeEjectedElectronEnergyFromCumulatedD
|
||||
- waterStructure.IonisationEnergy(shell);
|
||||
|
||||
//G4cout << RandomTransferedEnergy(particleDefinition, k/eV, shell) << G4endl;
|
||||
// SI - 01/04/2014
|
||||
if (secondaryElectronKineticEnergy < 0.)
|
||||
return 0.;
|
||||
//
|
||||
@@ -1055,10 +1062,10 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
if (particleDefinition == G4Electron::ElectronDefinition())
|
||||
{
|
||||
// k should be in eV
|
||||
std::vector<double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(),
|
||||
k);
|
||||
std::vector<double>::iterator k1 = k2 - 1;
|
||||
std::vector<G4double>::iterator k1 = k2 - 1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -1075,19 +1082,19 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
if (random <= eProbaShellMap[ionizationLevelIndex][(*k1)].back()
|
||||
&& random <= eProbaShellMap[ionizationLevelIndex][(*k2)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob12 =
|
||||
std::vector<G4double>::iterator prob12 =
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k1)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob11 = prob12 - 1;
|
||||
std::vector<G4double>::iterator prob11 = prob12 - 1;
|
||||
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
@@ -1118,12 +1125,12 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
// Avoids cases where cum xs is zero for k1 and is not for k2 (with always k1<k2)
|
||||
if (random > eProbaShellMap[ionizationLevelIndex][(*k1)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
@@ -1163,11 +1170,11 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
{
|
||||
// k should be in eV
|
||||
|
||||
std::vector<double>::iterator k2 = std::upper_bound(pTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(pTdummyVec.begin(),
|
||||
pTdummyVec.end(),
|
||||
k);
|
||||
|
||||
std::vector<double>::iterator k1 = k2 - 1;
|
||||
std::vector<G4double>::iterator k1 = k2 - 1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -1185,19 +1192,19 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
if (random <= pProbaShellMap[ionizationLevelIndex][(*k1)].back()
|
||||
&& random <= pProbaShellMap[ionizationLevelIndex][(*k2)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob12 =
|
||||
std::vector<G4double>::iterator prob12 =
|
||||
std::upper_bound(pProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
pProbaShellMap[ionizationLevelIndex][(*k1)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob11 = prob12 - 1;
|
||||
std::vector<G4double>::iterator prob11 = prob12 - 1;
|
||||
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(pProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
pProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
@@ -1229,12 +1236,12 @@ G4double G4DNABornIonisationModel1::TransferedEnergy(G4ParticleDefinition* parti
|
||||
|
||||
if (random > pProbaShellMap[ionizationLevelIndex][(*k1)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(pProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
pProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
|
||||
@@ -60,7 +60,8 @@ G4DNABornIonisationModel2::G4DNABornIonisationModel2(const G4ParticleDefinition*
|
||||
G4cout << "Born ionisation model is constructed " << G4endl;
|
||||
}
|
||||
|
||||
//Mark this model as "applicable" for atomic deexcitation
|
||||
// Mark this model as "applicable" for atomic deexcitation
|
||||
|
||||
SetDeexcitationFlag(true);
|
||||
fAtomDeexcitation = 0;
|
||||
fParticleChangeForGamma = 0;
|
||||
@@ -70,7 +71,8 @@ G4DNABornIonisationModel2::G4DNABornIonisationModel2(const G4ParticleDefinition*
|
||||
fHighEnergyLimit = 0;
|
||||
fParticleDef = 0;
|
||||
|
||||
// define default angular generator
|
||||
// Define default angular generator
|
||||
|
||||
SetAngularDistribution(new G4DNABornAngle());
|
||||
|
||||
// Selection of computation method
|
||||
@@ -167,6 +169,7 @@ void G4DNABornIonisationModel2::Initialise(const G4ParticleDefinition* particle,
|
||||
}
|
||||
|
||||
// Cross section
|
||||
|
||||
G4double scaleFactor = (1.e-22 / 3.343) * m*m;
|
||||
fTableData = new G4DNACrossSectionDataSet(new G4LogLogInterpolation, eV,scaleFactor );
|
||||
fTableData->LoadData(fTableFile);
|
||||
@@ -183,8 +186,6 @@ void G4DNABornIonisationModel2::Initialise(const G4ParticleDefinition* particle,
|
||||
FatalException,description);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
// Clear the arrays for re-initialization case (MT mode)
|
||||
// March 25th, 2014 - Vaclav Stepan, Sebastien Incerti
|
||||
|
||||
@@ -197,17 +198,18 @@ void G4DNABornIonisationModel2::Initialise(const G4ParticleDefinition* particle,
|
||||
fDiffCrossSectionData[j].clear();
|
||||
fNrjTransfData[j].clear();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
fTdummyVec.push_back(0.);
|
||||
while(!diffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
diffCrossSection>>tDummy>>eDummy;
|
||||
if (tDummy != fTdummyVec.back()) fTdummyVec.push_back(tDummy);
|
||||
|
||||
double tmp;
|
||||
G4double tmp;
|
||||
for (int j=0; j<5; j++)
|
||||
{
|
||||
diffCrossSection>> tmp;
|
||||
@@ -243,10 +245,12 @@ void G4DNABornIonisationModel2::Initialise(const G4ParticleDefinition* particle,
|
||||
}
|
||||
|
||||
// Initialize water density pointer
|
||||
|
||||
fpMolWaterDensity = G4DNAMolecularMaterial::Instance()->
|
||||
GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
|
||||
|
||||
//
|
||||
// AD
|
||||
|
||||
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
|
||||
|
||||
if (isInitialised)
|
||||
@@ -349,6 +353,50 @@ void G4DNABornIonisationModel2::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
ionizationShell = RandomSelect(k);
|
||||
}while (k<19*eV && ionizationShell==2 && particle->GetDefinition()==G4Electron::ElectronDefinition());
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
|
||||
if (fasterCode == false)
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
else
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
|
||||
G4int Z = 8;
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
|
||||
if (particle->GetDefinition() == G4Electron::ElectronDefinition())
|
||||
{
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
}
|
||||
|
||||
else fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
// AM: sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same as Oxygen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
@@ -359,11 +407,10 @@ void G4DNABornIonisationModel2::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
//SI: additional protection if tcs interpolation method is modified
|
||||
// SI: additional protection if tcs interpolation method is modified
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4int Z = 8;
|
||||
if(fAtomDeexcitation)
|
||||
{
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
@@ -392,45 +439,8 @@ void G4DNABornIonisationModel2::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
// Note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
|
||||
if (fasterCode == false)
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
// SI - 01/04/2014
|
||||
else
|
||||
{
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
}
|
||||
//
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
if (particle->GetDefinition() == G4Electron::ElectronDefinition())
|
||||
{
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
}
|
||||
|
||||
else fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
// note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++)
|
||||
@@ -448,14 +458,13 @@ void G4DNABornIonisationModel2::SampleSecondaries(std::vector<G4DynamicParticle*
|
||||
fParticleChangeForGamma->SetProposedKineticEnergy(k);
|
||||
fParticleChangeForGamma->ProposeLocalEnergyDeposit(k-scatteredEnergy);
|
||||
}
|
||||
|
||||
// SI - 01/04/2014
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
//
|
||||
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
@@ -488,7 +497,7 @@ G4double G4DNABornIonisationModel2::RandomizeEjectedElectronEnergy(G4ParticleDef
|
||||
G4double differentialCrossSection = DifferentialCrossSection(particleDefinition, k/eV, value/eV, shell);
|
||||
if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum = differentialCrossSection;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// SI : alternative method
|
||||
G4double crossSectionMaximum = 0.;
|
||||
@@ -604,14 +613,14 @@ G4double G4DNABornIonisationModel2::RandomizeEjectedElectronEnergy(G4ParticleDef
|
||||
*/
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
double G4DNABornIonisationModel2::DifferentialCrossSection(G4ParticleDefinition * /*particleDefinition*/,
|
||||
G4double G4DNABornIonisationModel2::DifferentialCrossSection(G4ParticleDefinition * /*particleDefinition*/,
|
||||
G4double k,
|
||||
G4double energyTransfer,
|
||||
G4int ionizationLevelIndex)
|
||||
{
|
||||
G4double sigma = 0.;
|
||||
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex))
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex)/eV)
|
||||
{
|
||||
G4double valueT1 = 0;
|
||||
G4double valueT2 = 0;
|
||||
@@ -627,25 +636,26 @@ double G4DNABornIonisationModel2::DifferentialCrossSection(G4ParticleDefinition
|
||||
|
||||
// k should be in eV and energy transfer eV also
|
||||
|
||||
std::vector<double>::iterator t2 = std::upper_bound(fTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(fTdummyVec.begin(),
|
||||
fTdummyVec.end(),
|
||||
k);
|
||||
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
// SI : the following condition avoids situations where energyTransfer >last vector element
|
||||
|
||||
if (energyTransfer <= fVecm[(*t1)].back()
|
||||
&& energyTransfer <= fVecm[(*t2)].back())
|
||||
{
|
||||
std::vector<double>::iterator e12 = std::upper_bound(fVecm[(*t1)].begin(),
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(fVecm[(*t1)].begin(),
|
||||
fVecm[(*t1)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(fVecm[(*t2)].begin(),
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(fVecm[(*t2)].begin(),
|
||||
fVecm[(*t2)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
@@ -712,7 +722,7 @@ G4double G4DNABornIonisationModel2::Interpolate(G4double e1,
|
||||
G4double d2 = xs2;
|
||||
value = (d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// Switch to log-lin interpolation for faster code
|
||||
if ((e2 - e1) != 0 && xs1 != 0 && xs2 != 0 && fasterCode)
|
||||
@@ -741,7 +751,7 @@ G4double G4DNABornIonisationModel2::Interpolate(G4double e1,
|
||||
<< xs2 << " "
|
||||
<< value
|
||||
<< G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -828,7 +838,7 @@ G4double G4DNABornIonisationModel2::RandomizeEjectedElectronEnergyFromCumulatedD
|
||||
G4double k,
|
||||
G4int shell)
|
||||
{
|
||||
//G4cout << "*** FAST computation for " << " " << particleDefinition->GetParticleName() << G4endl;
|
||||
// G4cout << "*** FAST computation for " << " " << particleDefinition->GetParticleName() << G4endl;
|
||||
|
||||
G4double secondaryElectronKineticEnergy = 0.;
|
||||
|
||||
@@ -840,8 +850,7 @@ G4double G4DNABornIonisationModel2::RandomizeEjectedElectronEnergyFromCumulatedD
|
||||
random) * eV
|
||||
- waterStructure.IonisationEnergy(shell);
|
||||
|
||||
//G4cout << TransferedEnergy(particleDefinition, k/eV, shell, random) << G4endl;
|
||||
// SI - 01/04/2014
|
||||
// G4cout << TransferedEnergy(particleDefinition, k/eV, shell, random) << G4endl;
|
||||
if (secondaryElectronKineticEnergy < 0.)
|
||||
return 0.;
|
||||
//
|
||||
@@ -872,10 +881,10 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
G4double nrjTransf22 = 0;
|
||||
|
||||
// k should be in eV
|
||||
std::vector<double>::iterator k2 = std::upper_bound(fTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(fTdummyVec.begin(),
|
||||
fTdummyVec.end(),
|
||||
k);
|
||||
std::vector<double>::iterator k1 = k2 - 1;
|
||||
std::vector<G4double>::iterator k1 = k2 - 1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -886,25 +895,25 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
<< " " << eProbaShellMap[ionizationLevelIndex][(*k1)].back()
|
||||
<< " " << eProbaShellMap[ionizationLevelIndex][(*k2)].back()
|
||||
<< G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
// SI : the following condition avoids situations where random >last vector element
|
||||
if (random <= fProbaShellMap[ionizationLevelIndex][(*k1)].back()
|
||||
&& random <= fProbaShellMap[ionizationLevelIndex][(*k2)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob12 =
|
||||
std::vector<G4double>::iterator prob12 =
|
||||
std::upper_bound(fProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
fProbaShellMap[ionizationLevelIndex][(*k1)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob11 = prob12 - 1;
|
||||
std::vector<G4double>::iterator prob11 = prob12 - 1;
|
||||
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(fProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
fProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
@@ -916,7 +925,7 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
/*
|
||||
G4cout << " " << random << " " << valuePROB11 << " "
|
||||
<< valuePROB12 << " " << valuePROB21 << " " << valuePROB22 << G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
nrjTransf11 = fNrjTransfData[ionizationLevelIndex][valueK1][valuePROB11];
|
||||
nrjTransf12 = fNrjTransfData[ionizationLevelIndex][valueK1][valuePROB12];
|
||||
@@ -929,25 +938,25 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
|
||||
G4cout << " " << random << " " << nrjTransf11 << " "
|
||||
<< nrjTransf12 << " " << nrjTransf21 << " " <<nrjTransf22 << G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
}
|
||||
// Avoids cases where cum xs is zero for k1 and is not for k2 (with always k1<k2)
|
||||
if (random > fProbaShellMap[ionizationLevelIndex][(*k1)].back())
|
||||
{
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(fProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
fProbaShellMap[ionizationLevelIndex][(*k2)].end(),
|
||||
random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22 - 1;
|
||||
std::vector<G4double>::iterator prob21 = prob22 - 1;
|
||||
|
||||
valueK1 = *k1;
|
||||
valueK2 = *k2;
|
||||
valuePROB21 = *prob21;
|
||||
valuePROB22 = *prob22;
|
||||
|
||||
//G4cout << " " << random << " " << valuePROB21 << " " << valuePROB22 << G4endl;
|
||||
// G4cout << " " << random << " " << valuePROB21 << " " << valuePROB22 << G4endl;
|
||||
|
||||
nrjTransf21 = fNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
|
||||
nrjTransf22 = fNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
|
||||
@@ -970,7 +979,7 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
<< nrjTransf12 << " " << nrjTransf21 << " " <<nrjTransf22 << G4endl;
|
||||
|
||||
G4cout << "ici" << " " << value << G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -996,7 +1005,7 @@ G4double G4DNABornIonisationModel2::TransferedEnergy(G4ParticleDefinition* /*par
|
||||
k,
|
||||
random);
|
||||
}
|
||||
//G4cout << nrj << endl;
|
||||
// G4cout << nrj << endl;
|
||||
|
||||
return nrj;
|
||||
}
|
||||
|
||||
@@ -211,8 +211,8 @@ void G4DNACPA100ElasticModel::Initialise(const G4ParticleDefinition*
|
||||
|
||||
while(!eDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
eDiffCrossSection>>tDummy>>eDummy;
|
||||
|
||||
// SI : mandatory eVecm initialization
|
||||
@@ -482,16 +482,16 @@ G4double G4DNACPA100ElasticModel::Theta
|
||||
|
||||
if (particleDefinition == G4Electron::ElectronDefinition())
|
||||
{
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
std::vector<double>::iterator t1 = t2-1;
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
std::vector<G4double>::iterator t1 = t2-1;
|
||||
|
||||
std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(),
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e11 = e12-1;
|
||||
std::vector<G4double>::iterator e11 = e12-1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(),
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e21 = e22-1;
|
||||
std::vector<G4double>::iterator e21 = e22-1;
|
||||
|
||||
valueT1 =*t1;
|
||||
valueT2 =*t2;
|
||||
|
||||
@@ -88,6 +88,9 @@ G4DNACPA100IonisationModel::G4DNACPA100IonisationModel(const G4ParticleDefinitio
|
||||
|
||||
fasterCode = true;
|
||||
|
||||
// Selection of stationary mode
|
||||
|
||||
statCode = false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -195,11 +198,11 @@ void G4DNACPA100IonisationModel::Initialise(const G4ParticleDefinition* particle
|
||||
eTdummyVec.push_back(0.);
|
||||
while(!eDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
eDiffCrossSection>>tDummy>>eDummy;
|
||||
if (tDummy != eTdummyVec.back()) eTdummyVec.push_back(tDummy);
|
||||
for (int j=0; j<5; j++)
|
||||
for (G4int j=0; j<5; j++)
|
||||
{
|
||||
eDiffCrossSection>>eDiffCrossSectionData[j][tDummy][eDummy];
|
||||
|
||||
@@ -244,7 +247,7 @@ void G4DNACPA100IonisationModel::Initialise(const G4ParticleDefinition* particle
|
||||
// Initialize water density pointer
|
||||
fpMolWaterDensity = G4DNAMolecularMaterial::Instance()->GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
|
||||
|
||||
//
|
||||
// AD
|
||||
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
|
||||
|
||||
if (isInitialised) { return; }
|
||||
@@ -377,45 +380,9 @@ void G4DNACPA100IonisationModel::SampleSecondaries(std::vector<G4DynamicParticle
|
||||
//SI: PROTECTION FOR G4LOGLOGINTERPOLATION ON UPPER VALUE
|
||||
if (k<waterStructure.IonisationEnergy(ionizationShell)) { return; }
|
||||
|
||||
// AM: sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same of Oxigen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
|
||||
G4int secNumberInit = 0; // need to know at a certain point the enrgy of secondaries
|
||||
G4int secNumberFinal = 0; // So I'll make the diference and then sum the energies
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
if(fAtomDeexcitation) {
|
||||
|
||||
G4int Z = 8;
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
|
||||
if (ionizationShell <5 && ionizationShell >1)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(4-ionizationShell);
|
||||
}
|
||||
else if (ionizationShell <2)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(3);
|
||||
}
|
||||
|
||||
// FOR DEBUG ONLY
|
||||
// if (ionizationShell == 4) {
|
||||
//
|
||||
// G4cout << "Z: " << Z << " as: " << as
|
||||
// << " ionizationShell: " << ionizationShell << " bindingEnergy: "<< bindingEnergy/eV << G4endl;
|
||||
// G4cout << "Press <Enter> key to continue..." << G4endl;
|
||||
// G4cin.ignore();
|
||||
// }
|
||||
|
||||
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
|
||||
secNumberInit = fvect->size();
|
||||
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
|
||||
if (useDcs && !fasterCode)
|
||||
@@ -446,6 +413,14 @@ void G4DNACPA100IonisationModel::SampleSecondaries(std::vector<G4DynamicParticle
|
||||
G4ThreeVector deltaDirection(dirX,dirY,dirZ);
|
||||
deltaDirection.rotateUz(primaryDirection);
|
||||
|
||||
// SI - For atom. deexc. tagging - 23/05/2017
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
//
|
||||
|
||||
if (particle->GetDefinition() == G4Electron::ElectronDefinition())
|
||||
{
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
@@ -466,13 +441,49 @@ void G4DNACPA100IonisationModel::SampleSecondaries(std::vector<G4DynamicParticle
|
||||
|
||||
else fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection) ;
|
||||
|
||||
// note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
// SI - For atom. deexc. tagging - 23/05/2017
|
||||
|
||||
// AM: sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same of Oxigen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
|
||||
G4int secNumberInit = 0; // need to know at a certain point the enrgy of secondaries
|
||||
G4int secNumberFinal = 0; // So I'll make the diference and then sum the energies
|
||||
|
||||
if(fAtomDeexcitation) {
|
||||
|
||||
G4int Z = 8;
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
|
||||
if (ionizationShell <5 && ionizationShell >1)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(4-ionizationShell);
|
||||
}
|
||||
else if (ionizationShell <2)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(3);
|
||||
}
|
||||
|
||||
// FOR DEBUG ONLY
|
||||
// if (ionizationShell == 4) {
|
||||
//
|
||||
// G4cout << "Z: " << Z << " as: " << as
|
||||
// << " ionizationShell: " << ionizationShell << " bindingEnergy: "<< bindingEnergy/eV << G4endl;
|
||||
// G4cout << "Press <Enter> key to continue..." << G4endl;
|
||||
// G4cin.ignore();
|
||||
// }
|
||||
|
||||
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
|
||||
secNumberInit = fvect->size();
|
||||
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
// note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++) {
|
||||
|
||||
deexSecEnergy = deexSecEnergy + (*fvect)[j]->GetKineticEnergy();
|
||||
|
||||
}
|
||||
|
||||
if (!statCode)
|
||||
@@ -486,13 +497,12 @@ void G4DNACPA100IonisationModel::SampleSecondaries(std::vector<G4DynamicParticle
|
||||
fParticleChangeForGamma->ProposeLocalEnergyDeposit(k-scatteredEnergy);
|
||||
}
|
||||
|
||||
// SI - 29/03/2014
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
//
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
@@ -610,7 +620,7 @@ G4double G4DNACPA100IonisationModel::DifferentialCrossSection(G4ParticleDefiniti
|
||||
{
|
||||
G4double sigma = 0.;
|
||||
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex))
|
||||
if (energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex)/eV)
|
||||
{
|
||||
G4double valueT1 = 0;
|
||||
G4double valueT2 = 0;
|
||||
@@ -628,19 +638,19 @@ G4double G4DNACPA100IonisationModel::DifferentialCrossSection(G4ParticleDefiniti
|
||||
{
|
||||
// k should be in eV and energy transfer eV also
|
||||
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
|
||||
std::vector<double>::iterator t1 = t2-1;
|
||||
std::vector<G4double>::iterator t1 = t2-1;
|
||||
|
||||
// SI : the following condition avoids situations where energyTransfer >last vector element
|
||||
|
||||
if (energyTransfer <= eVecm[(*t1)].back() && energyTransfer <= eVecm[(*t2)].back() )
|
||||
{
|
||||
std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), energyTransfer);
|
||||
std::vector<double>::iterator e11 = e12-1;
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(), energyTransfer);
|
||||
std::vector<G4double>::iterator e11 = e12-1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), energyTransfer);
|
||||
std::vector<double>::iterator e21 = e22-1;
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(), energyTransfer);
|
||||
std::vector<G4double>::iterator e21 = e22-1;
|
||||
|
||||
valueT1 =*t1;
|
||||
valueT2 =*t2;
|
||||
@@ -886,7 +896,6 @@ G4double G4DNACPA100IonisationModel::RandomizeEjectedElectronEnergyFromCumulated
|
||||
RandomTransferedEnergy(particleDefinition, k/eV, shell)*eV-waterStructure.IonisationEnergy(shell);
|
||||
|
||||
//G4cout << RandomTransferedEnergy(particleDefinition, k/eV, shell) << G4endl;
|
||||
// SI - 29/03/2014
|
||||
if (secondaryElectronKineticEnergy<0.) return 0.;
|
||||
//
|
||||
|
||||
@@ -920,9 +929,9 @@ G4double G4DNACPA100IonisationModel::RandomTransferedEnergy
|
||||
|
||||
// k should be in eV
|
||||
|
||||
std::vector<double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
|
||||
std::vector<double>::iterator k1 = k2-1;
|
||||
std::vector<G4double>::iterator k1 = k2-1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -942,18 +951,18 @@ G4double G4DNACPA100IonisationModel::RandomTransferedEnergy
|
||||
|
||||
{
|
||||
|
||||
std::vector<double>::iterator prob12 =
|
||||
std::vector<G4double>::iterator prob12 =
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k1)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob11 = prob12-1;
|
||||
std::vector<G4double>::iterator prob11 = prob12-1;
|
||||
|
||||
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22-1;
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
@@ -990,12 +999,12 @@ G4double G4DNACPA100IonisationModel::RandomTransferedEnergy
|
||||
|
||||
{
|
||||
|
||||
std::vector<double>::iterator prob22 =
|
||||
std::vector<G4double>::iterator prob22 =
|
||||
|
||||
std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22-1;
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
@@ -1198,7 +1207,7 @@ G4double G4DNACPA100IonisationModel::RandomizeEjectedElectronEnergyFromCompositi
|
||||
return wx3*bb;
|
||||
*/
|
||||
|
||||
// ***** METHOD 2 by M. C. Bordage ***** (optimized)
|
||||
// ***** METHOD by M. C. Bordage ***** (optimized)
|
||||
|
||||
G4double un=1.;
|
||||
G4double deux=2.;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAChampionElasticModel.cc 97520 2016-06-03 14:23:17Z gcosmo $
|
||||
// $Id: G4DNAChampionElasticModel.cc 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
//
|
||||
|
||||
#include "G4DNAChampionElasticModel.hh"
|
||||
@@ -178,8 +178,8 @@ void G4DNAChampionElasticModel::Initialise(const G4ParticleDefinition* particle,
|
||||
|
||||
while(!eDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
eDiffCrossSection >> tDummy >> eDummy;
|
||||
|
||||
// SI : mandatory eVecm initialization
|
||||
@@ -337,19 +337,19 @@ G4double G4DNAChampionElasticModel::Theta(//G4ParticleDefinition * particleDefin
|
||||
|
||||
// if (particleDefinition == G4Electron::ElectronDefinition()) // necessaire ?
|
||||
{
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(), k);
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),
|
||||
eVecm[(*t1)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),
|
||||
eVecm[(*t2)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
|
||||
+81
-73
@@ -66,13 +66,13 @@ G4DNAEmfietzoglouIonisationModel::G4DNAEmfietzoglouIonisationModel(const G4Parti
|
||||
G4cout << "Emfietzoglou ionisation model is constructed " << G4endl;
|
||||
}
|
||||
|
||||
//Mark this model as "applicable" for atomic deexcitation
|
||||
// Mark this model as "applicable" for atomic deexcitation
|
||||
SetDeexcitationFlag(true);
|
||||
fAtomDeexcitation = 0;
|
||||
fParticleChangeForGamma = 0;
|
||||
fpMolWaterDensity = 0;
|
||||
|
||||
// define default angular generator
|
||||
// Define default angular generator
|
||||
SetAngularDistribution(new G4DNABornAngle());
|
||||
|
||||
SetLowEnergyLimit(10. * eV);
|
||||
@@ -183,11 +183,11 @@ void G4DNAEmfietzoglouIonisationModel::Initialise(const G4ParticleDefinition* pa
|
||||
eTdummyVec.push_back(0.);
|
||||
while(!eDiffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
eDiffCrossSection>>tDummy>>eDummy;
|
||||
if (tDummy != eTdummyVec.back()) eTdummyVec.push_back(tDummy);
|
||||
for (int j=0; j<5; j++)
|
||||
for (G4int j=0; j<5; j++)
|
||||
{
|
||||
eDiffCrossSection>>eDiffCrossSectionData[j][tDummy][eDummy];
|
||||
|
||||
@@ -227,11 +227,13 @@ void G4DNAEmfietzoglouIonisationModel::Initialise(const G4ParticleDefinition* pa
|
||||
}
|
||||
|
||||
// Initialize water density pointer
|
||||
|
||||
fpMolWaterDensity =
|
||||
G4DNAMolecularMaterial::Instance()->
|
||||
GetNumMolPerVolTableFor(G4Material::GetMaterial("G4_WATER"));
|
||||
|
||||
//
|
||||
// AD
|
||||
|
||||
fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
|
||||
|
||||
if (isInitialised)
|
||||
@@ -370,6 +372,50 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
|
||||
ionizationShell = RandomSelect(k,particleName);
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
// SI : additional protection if tcs interpolation method is modified
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
|
||||
if (!fasterCode) secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
|
||||
if (fasterCode)
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
|
||||
// SI - For atom. deexc. tagging - 23/05/2017
|
||||
|
||||
G4int Z = 8;
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
|
||||
// AM: sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same as Oxygen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
@@ -377,14 +423,6 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
G4int secNumberInit = 0;// need to know at a certain point the energy of secondaries
|
||||
G4int secNumberFinal = 0;// So I'll make the diference and then sum the energies
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
//SI: additional protection if tcs interpolation method is modified
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4int Z = 8;
|
||||
if(fAtomDeexcitation)
|
||||
{
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
@@ -413,36 +451,8 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic=-1000*eV;
|
||||
// Note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
|
||||
if (!fasterCode) secondaryKinetic = RandomizeEjectedElectronEnergy(particle->GetDefinition(),k,ionizationShell);
|
||||
|
||||
// SI - 01/04/2014
|
||||
if (fasterCode)
|
||||
secondaryKinetic = RandomizeEjectedElectronEnergyFromCumulatedDcs(particle->GetDefinition(),k,ionizationShell);
|
||||
//
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit());
|
||||
|
||||
// note that secondaryKinetic is the energy of the delta ray, not of all secondaries.
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++)
|
||||
@@ -461,13 +471,12 @@ SampleSecondaries(std::vector<G4DynamicParticle*>* fvect,
|
||||
fParticleChangeForGamma->ProposeLocalEnergyDeposit(k-scatteredEnergy);
|
||||
}
|
||||
|
||||
// SI - 01/04/2014
|
||||
if (secondaryKinetic>0)
|
||||
{
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
}
|
||||
//
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
@@ -504,7 +513,7 @@ RandomizeEjectedElectronEnergy(G4ParticleDefinition* particleDefinition,
|
||||
G4double differentialCrossSection = DifferentialCrossSection(particleDefinition, k/eV, value/eV, shell);
|
||||
if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum = differentialCrossSection;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// SI : alternative method
|
||||
G4double crossSectionMaximum = 0.;
|
||||
@@ -591,14 +600,14 @@ RandomizeEjectedElectronEnergy(G4ParticleDefinition* particleDefinition,
|
||||
*/
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
double G4DNAEmfietzoglouIonisationModel::DifferentialCrossSection(G4ParticleDefinition * particleDefinition,
|
||||
G4double G4DNAEmfietzoglouIonisationModel::DifferentialCrossSection(G4ParticleDefinition * particleDefinition,
|
||||
G4double k,
|
||||
G4double energyTransfer,
|
||||
G4int ionizationLevelIndex)
|
||||
{
|
||||
G4double sigma = 0.;
|
||||
|
||||
if(energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex))
|
||||
if(energyTransfer >= waterStructure.IonisationEnergy(ionizationLevelIndex)/eV)
|
||||
{
|
||||
G4double valueT1 = 0;
|
||||
G4double valueT2 = 0;
|
||||
@@ -616,27 +625,28 @@ double G4DNAEmfietzoglouIonisationModel::DifferentialCrossSection(G4ParticleDefi
|
||||
{
|
||||
// k should be in eV and energy transfer eV also
|
||||
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(),
|
||||
k);
|
||||
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
// SI : the following condition avoids situations where energyTransfer >last vector element
|
||||
if(energyTransfer <= eVecm[(*t1)].back() && energyTransfer
|
||||
<= eVecm[(*t2)].back())
|
||||
// added strict limitations (09/08/2017)
|
||||
if(energyTransfer < eVecm[(*t1)].back() &&
|
||||
energyTransfer < eVecm[(*t2)].back())
|
||||
{
|
||||
std::vector<double>::iterator e12 =
|
||||
std::vector<G4double>::iterator e12 =
|
||||
std::upper_bound(eVecm[(*t1)].begin(),
|
||||
eVecm[(*t1)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 =
|
||||
std::vector<G4double>::iterator e22 =
|
||||
std::upper_bound(eVecm[(*t2)].begin(),
|
||||
eVecm[(*t2)].end(),
|
||||
energyTransfer);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
@@ -717,7 +727,7 @@ G4double G4DNAEmfietzoglouIonisationModel::Interpolate(G4double e1,
|
||||
G4double d2 = xs2;
|
||||
value = (d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
// Switch to log-lin interpolation for faster code
|
||||
if((e2 - e1) != 0 && xs1 != 0 && xs2 != 0 && fasterCode)
|
||||
@@ -746,7 +756,7 @@ G4double G4DNAEmfietzoglouIonisationModel::Interpolate(G4double e1,
|
||||
<< xs2 << " "
|
||||
<< value
|
||||
<< G4endl;
|
||||
*/
|
||||
*/
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -853,9 +863,7 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomizeEjectedElectronEnergyFromCum
|
||||
- waterStructure.IonisationEnergy(shell);
|
||||
|
||||
//G4cout << RandomTransferedEnergy(particleDefinition, k/eV, shell) << G4endl;
|
||||
// SI - 01/04/2014
|
||||
if(secondaryElectronKineticEnergy < 0.) return 0.;
|
||||
//
|
||||
|
||||
return secondaryElectronKineticEnergy;
|
||||
}
|
||||
@@ -886,9 +894,9 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
if (particleDefinition == G4Electron::ElectronDefinition())
|
||||
{
|
||||
// k should be in eV
|
||||
std::vector<double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
std::vector<G4double>::iterator k2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(), k);
|
||||
|
||||
std::vector<double>::iterator k1 = k2-1;
|
||||
std::vector<G4double>::iterator k1 = k2-1;
|
||||
|
||||
/*
|
||||
G4cout << "----> k=" << k
|
||||
@@ -906,15 +914,15 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
&& random <= eProbaShellMap[ionizationLevelIndex][(*k2)].back() )
|
||||
|
||||
{
|
||||
std::vector<double>::iterator prob12 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
std::vector<G4double>::iterator prob12 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k1)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob11 = prob12-1;
|
||||
std::vector<G4double>::iterator prob11 = prob12-1;
|
||||
|
||||
std::vector<double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
std::vector<G4double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22-1;
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
@@ -948,10 +956,10 @@ G4double G4DNAEmfietzoglouIonisationModel::RandomTransferedEnergy(G4ParticleDefi
|
||||
if ( random > eProbaShellMap[ionizationLevelIndex][(*k1)].back() )
|
||||
|
||||
{
|
||||
std::vector<double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
std::vector<G4double>::iterator prob22 = std::upper_bound(eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
|
||||
eProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
|
||||
|
||||
std::vector<double>::iterator prob21 = prob22-1;
|
||||
std::vector<G4double>::iterator prob21 = prob22-1;
|
||||
|
||||
valueK1 =*k1;
|
||||
valueK2 =*k2;
|
||||
|
||||
@@ -199,8 +199,8 @@ G4DNAIonElasticModel::Initialise (
|
||||
|
||||
while(!diffCrossSection.eof())
|
||||
{
|
||||
double tDummy;
|
||||
double eDummy;
|
||||
G4double tDummy;
|
||||
G4double eDummy;
|
||||
diffCrossSection>>tDummy>>eDummy;
|
||||
|
||||
// SI : mandatory eVecm initialization
|
||||
@@ -387,19 +387,19 @@ G4DNAIonElasticModel::Theta (G4ParticleDefinition * /*particleDefinition*/,
|
||||
G4double xs21 = 0;
|
||||
G4double xs22 = 0;
|
||||
|
||||
std::vector<double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(eTdummyVec.begin(),
|
||||
eTdummyVec.end(), k);
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
std::vector<double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),
|
||||
std::vector<G4double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),
|
||||
eVecm[(*t1)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e11 = e12 - 1;
|
||||
std::vector<G4double>::iterator e11 = e12 - 1;
|
||||
|
||||
std::vector<double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),
|
||||
std::vector<G4double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),
|
||||
eVecm[(*t2)].end(),
|
||||
integrDiff);
|
||||
std::vector<double>::iterator e21 = e22 - 1;
|
||||
std::vector<G4double>::iterator e21 = e22 - 1;
|
||||
|
||||
valueT1 = *t1;
|
||||
valueT2 = *t2;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAMillerGreenExcitationModel.cc 95948 2016-03-03 10:40:33Z gcosmo $
|
||||
// $Id: G4DNAMillerGreenExcitationModel.cc 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
|
||||
@@ -497,7 +497,7 @@ G4int G4DNAMillerGreenExcitationModel::RandomSelect(G4double k,const G4ParticleD
|
||||
{
|
||||
G4int i = nLevels;
|
||||
G4double value = 0.;
|
||||
std::deque<double> values;
|
||||
std::deque<G4double> values;
|
||||
|
||||
G4DNAGenericIonsManager *instance;
|
||||
instance = G4DNAGenericIonsManager::Instance();
|
||||
|
||||
+61
-55
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNARuddIonisationExtendedModel.cc 104430 2017-05-31 07:43:44Z gcosmo $
|
||||
// $Id: G4DNARuddIonisationExtendedModel.cc 105034 2017-07-06 08:34:37Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
// Modified by Z. Francis, S. Incerti to handle HZE
|
||||
@@ -37,12 +37,10 @@
|
||||
#include "G4DNAChemistryManager.hh"
|
||||
#include "G4DNAMolecularMaterial.hh"
|
||||
|
||||
//SEB
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4DNARuddAngle.hh"
|
||||
#include "G4DeltaAngle.hh"
|
||||
#include "G4Exp.hh"
|
||||
//
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -151,7 +149,6 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+");
|
||||
G4ParticleDefinition* heliumDef = instance->GetIon("helium");
|
||||
|
||||
//SEB
|
||||
//G4ParticleDefinition* carbonDef = instance->GetIon("carbon");
|
||||
//G4ParticleDefinition* nitrogenDef = instance->GetIon("nitrogen");
|
||||
//G4ParticleDefinition* oxygenDef = instance->GetIon("oxygen");
|
||||
@@ -271,7 +268,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
lithium = lithiumDef->GetParticleName();
|
||||
tableFile[lithium] = fileLithium;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[carbon] = lowEnergyLimitForA[5] * particle->GetAtomicMass();
|
||||
//highEnergyLimit[carbon] = 1e6* particle->GetAtomicMass() * MeV;
|
||||
lowEnergyLimit[lithium] = 0.5*7*MeV;
|
||||
@@ -291,7 +288,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
beryllium = berylliumDef->GetParticleName();
|
||||
tableFile[beryllium] = fileBeryllium;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[carbon] = lowEnergyLimitForA[5] * particle->GetAtomicMass();
|
||||
//highEnergyLimit[carbon] = 1e6* particle->GetAtomicMass() * MeV;
|
||||
lowEnergyLimit[beryllium] = 0.5*9*MeV;
|
||||
@@ -311,7 +308,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
boron = boronDef->GetParticleName();
|
||||
tableFile[boron] = fileBoron;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[carbon] = lowEnergyLimitForA[5] * particle->GetAtomicMass();
|
||||
//highEnergyLimit[carbon] = 1e6* particle->GetAtomicMass() * MeV;
|
||||
lowEnergyLimit[boron] = 0.5*11*MeV;
|
||||
@@ -331,7 +328,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
carbon = carbonDef->GetParticleName();
|
||||
tableFile[carbon] = fileCarbon;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[carbon] = lowEnergyLimitForA[5] * particle->GetAtomicMass();
|
||||
//highEnergyLimit[carbon] = 1e6* particle->GetAtomicMass() * MeV;
|
||||
lowEnergyLimit[carbon] = 0.5*12*MeV;
|
||||
@@ -351,7 +348,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
oxygen = oxygenDef->GetParticleName();
|
||||
tableFile[oxygen] = fileOxygen;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[oxygen] = lowEnergyLimitForA[5]* particle->GetAtomicMass();
|
||||
//highEnergyLimit[oxygen] = 1e6* particle->GetAtomicMass()* MeV;
|
||||
lowEnergyLimit[oxygen] = 0.5*16*MeV;
|
||||
@@ -371,7 +368,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
nitrogen = nitrogenDef->GetParticleName();
|
||||
tableFile[nitrogen] = fileNitrogen;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[nitrogen] = lowEnergyLimitForA[5]* particle->GetAtomicMass();
|
||||
//highEnergyLimit[nitrogen] = 1e6* particle->GetAtomicMass()* MeV;
|
||||
lowEnergyLimit[nitrogen] = 0.5*14*MeV;
|
||||
@@ -410,7 +407,7 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
iron = ironDef->GetParticleName();
|
||||
tableFile[iron] = fileIron;
|
||||
|
||||
//SEB
|
||||
//SI
|
||||
//lowEnergyLimit[iron] = lowEnergyLimitForA[5]* particle->GetAtomicMass();
|
||||
//highEnergyLimit[iron] = 1e6* particle->GetAtomicMass()* MeV;
|
||||
lowEnergyLimit[iron] = 0.5*56*MeV;
|
||||
@@ -427,10 +424,10 @@ void G4DNARuddIonisationExtendedModel::Initialise(const G4ParticleDefinition* pa
|
||||
|
||||
// **********************************************************************************************
|
||||
|
||||
//SEB: not anymore
|
||||
// SI: not anymore
|
||||
// ZF Following lines can be replaced by:
|
||||
//SetLowEnergyLimit(lowEnergyLimit[particle->GetParticleName()]);
|
||||
//SetHighEnergyLimit(highEnergyLimit[particle->GetParticleName()]);
|
||||
// SetLowEnergyLimit(lowEnergyLimit[particle->GetParticleName()]);
|
||||
// SetHighEnergyLimit(highEnergyLimit[particle->GetParticleName()]);
|
||||
// at least for HZE
|
||||
|
||||
if (particle==protonDef)
|
||||
@@ -543,7 +540,7 @@ G4double G4DNARuddIonisationExtendedModel::CrossSectionPerVolume(const G4Materia
|
||||
G4double,
|
||||
G4double)
|
||||
{
|
||||
//SEB: particleDefinition->GetParticleName() is for eg. Fe56
|
||||
//SI: particleDefinition->GetParticleName() is for eg. Fe56
|
||||
// particleDefinition->GetPDGMass() is correct
|
||||
// particleDefinition->GetAtomicNumber() is correct
|
||||
|
||||
@@ -566,7 +563,7 @@ G4double G4DNARuddIonisationExtendedModel::CrossSectionPerVolume(const G4Materia
|
||||
&&
|
||||
particleDefinition != instance->GetIon("helium")
|
||||
&&
|
||||
//SEB
|
||||
// SI
|
||||
//particleDefinition != instance->GetIon("carbon")
|
||||
//&&
|
||||
//particleDefinition != instance->GetIon("nitrogen")
|
||||
@@ -685,7 +682,7 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
G4double,
|
||||
G4double)
|
||||
{
|
||||
//SEB: particle->GetDefinition()->GetParticleName() is for eg. Fe56
|
||||
//SI: particle->GetDefinition()->GetParticleName() is for eg. Fe56
|
||||
// particle->GetDefinition()->GetPDGMass() is correct
|
||||
// particle->GetDefinition()->GetAtomicNumber() is correct
|
||||
// particle->GetDefinition()->GetAtomicMass() is correct
|
||||
@@ -743,6 +740,7 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
if (pos2 != highEnergyLimit.end())highLim = pos2->second;
|
||||
|
||||
if (k >= lowLim && k <= highLim)
|
||||
|
||||
// SI: no strict limits, like in the non extended version of the model
|
||||
{
|
||||
G4ParticleDefinition* definition = particle->GetDefinition();
|
||||
@@ -760,8 +758,6 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
// here we assume that H_{2}O electronic levels are the same as Oxygen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
|
||||
G4int secNumberInit = 0; // need to know at a certain point the energy of secondaries
|
||||
G4int secNumberFinal = 0; // So I'll make the diference and then sum the energies
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
@@ -769,43 +765,22 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
G4int Z = 8;
|
||||
|
||||
if(fAtomDeexcitation) {
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
|
||||
if (ionizationShell <5 && ionizationShell >1)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(4-ionizationShell);
|
||||
}
|
||||
else if (ionizationShell <2)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(3);
|
||||
}
|
||||
|
||||
// DEBUG
|
||||
// if (ionizationShell == 4) {
|
||||
//
|
||||
// G4cout << "Z: " << Z << " as: " << as
|
||||
// << " ionizationShell: " << ionizationShell << " bindingEnergy: "<< bindingEnergy/eV << G4endl;
|
||||
// G4cout << "Press <Enter> key to continue..." << G4endl;
|
||||
// G4cin.ignore();
|
||||
// }
|
||||
|
||||
|
||||
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
|
||||
secNumberInit = fvect->size();
|
||||
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic = RandomizeEjectedElectronEnergy(definition,k,ionizationShell);
|
||||
|
||||
G4int Z = 8;
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
|
||||
fvect->push_back(dp);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
|
||||
// SI: the following lines are not needed anymore
|
||||
/*
|
||||
G4double cosTheta = 0.;
|
||||
@@ -837,14 +812,41 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit()) ;
|
||||
*/
|
||||
|
||||
G4int secNumberInit = 0; // need to know at a certain point the energy of secondaries
|
||||
G4int secNumberFinal = 0; // So I'll make the diference and then sum the energies
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
if(fAtomDeexcitation) {
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
|
||||
if (ionizationShell <5 && ionizationShell >1)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(4-ionizationShell);
|
||||
}
|
||||
else if (ionizationShell <2)
|
||||
{
|
||||
as = G4AtomicShellEnumerator(3);
|
||||
}
|
||||
|
||||
// DEBUG
|
||||
// if (ionizationShell == 4) {
|
||||
//
|
||||
// G4cout << "Z: " << Z << " as: " << as
|
||||
// << " ionizationShell: " << ionizationShell << " bindingEnergy: "<< bindingEnergy/eV << G4endl;
|
||||
// G4cout << "Press <Enter> key to continue..." << G4endl;
|
||||
// G4cin.ignore();
|
||||
// }
|
||||
|
||||
|
||||
const G4AtomicShell* shell = fAtomDeexcitation->GetAtomicShell(Z, as);
|
||||
secNumberInit = fvect->size();
|
||||
fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++) {
|
||||
|
||||
deexSecEnergy = deexSecEnergy + (*fvect)[j]->GetKineticEnergy();
|
||||
|
||||
}
|
||||
|
||||
if (!statCode)
|
||||
@@ -858,8 +860,12 @@ void G4DNARuddIonisationExtendedModel::SampleSecondaries(std::vector<G4DynamicPa
|
||||
fParticleChangeForGamma->ProposeLocalEnergyDeposit(k-scatteredEnergy);
|
||||
}
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic) ;
|
||||
fvect->push_back(dp);
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNARuddIonisationModel.cc 104430 2017-05-31 07:43:44Z gcosmo $
|
||||
// $Id: G4DNARuddIonisationModel.cc 105034 2017-07-06 08:34:37Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
|
||||
@@ -77,10 +77,10 @@ G4DNARuddIonisationModel::G4DNARuddIonisationModel(const G4ParticleDefinition*,
|
||||
G4cout << "Rudd ionisation model is constructed " << G4endl;
|
||||
}
|
||||
|
||||
// define default angular generator
|
||||
// Define default angular generator
|
||||
SetAngularDistribution(new G4DNARuddAngle());
|
||||
|
||||
//Mark this model as "applicable" for atomic deexcitation
|
||||
// Mark this model as "applicable" for atomic deexcitation
|
||||
SetDeexcitationFlag(true);
|
||||
fAtomDeexcitation = 0;
|
||||
fParticleChangeForGamma = 0;
|
||||
@@ -105,7 +105,7 @@ G4DNARuddIonisationModel::~G4DNARuddIonisationModel()
|
||||
|
||||
// The following removal is forbidden since G4VEnergyLossmodel takes care of deletion
|
||||
// Coverity however will signal this as an error
|
||||
//if (fAtomDeexcitation) {delete fAtomDeexcitation;}
|
||||
// if (fAtomDeexcitation) {delete fAtomDeexcitation;}
|
||||
|
||||
}
|
||||
|
||||
@@ -482,13 +482,6 @@ void G4DNARuddIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>
|
||||
|
||||
G4int ionizationShell = RandomSelect(k,particleName);
|
||||
|
||||
// sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same of Oxigen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
|
||||
G4int secNumberInit = 0;// need to know at a certain point the enrgy of secondaries
|
||||
G4int secNumberFinal = 0;// So I'll make the diference and then sum the energies
|
||||
|
||||
G4double bindingEnergy = 0;
|
||||
bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
|
||||
|
||||
@@ -496,7 +489,47 @@ void G4DNARuddIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>
|
||||
if (k<bindingEnergy) return;
|
||||
//
|
||||
|
||||
// SI - For atom. deexc. tagging - 23/05/2017
|
||||
G4int Z = 8;
|
||||
//
|
||||
|
||||
G4double secondaryKinetic = RandomizeEjectedElectronEnergy(definition,k,ionizationShell);
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
|
||||
// Ignored for ions on electrons
|
||||
/*
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit()) ;
|
||||
*/
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
// sample deexcitation
|
||||
// here we assume that H_{2}O electronic levels are the same of Oxigen.
|
||||
// this can be considered true with a rough 10% error in energy on K-shell,
|
||||
|
||||
G4int secNumberInit = 0;// need to know at a certain point the enrgy of secondaries
|
||||
G4int secNumberFinal = 0;// So I'll make the diference and then sum the energies
|
||||
|
||||
if(fAtomDeexcitation)
|
||||
{
|
||||
G4AtomicShellEnumerator as = fKShell;
|
||||
@@ -525,39 +558,11 @@ void G4DNARuddIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>
|
||||
secNumberFinal = fvect->size();
|
||||
}
|
||||
|
||||
G4double secondaryKinetic = RandomizeEjectedElectronEnergy(definition,k,ionizationShell);
|
||||
|
||||
G4ThreeVector deltaDirection =
|
||||
GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
|
||||
Z, ionizationShell,
|
||||
couple->GetMaterial());
|
||||
|
||||
// Ignored for ions on electrons
|
||||
/*
|
||||
G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
|
||||
|
||||
G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
|
||||
G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
|
||||
G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
|
||||
G4double finalMomentum = std::sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz);
|
||||
finalPx /= finalMomentum;
|
||||
finalPy /= finalMomentum;
|
||||
finalPz /= finalMomentum;
|
||||
|
||||
G4ThreeVector direction;
|
||||
direction.set(finalPx,finalPy,finalPz);
|
||||
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(direction.unit()) ;
|
||||
*/
|
||||
fParticleChangeForGamma->ProposeMomentumDirection(primaryDirection);
|
||||
|
||||
G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
|
||||
G4double deexSecEnergy = 0;
|
||||
for (G4int j=secNumberInit; j < secNumberFinal; j++)
|
||||
{
|
||||
|
||||
deexSecEnergy = deexSecEnergy + (*fvect)[j]->GetKineticEnergy();
|
||||
|
||||
}
|
||||
|
||||
if (!statCode)
|
||||
@@ -577,8 +582,12 @@ void G4DNARuddIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>
|
||||
// = bindingEnergy-deexSecEnergy
|
||||
// SO deexSecEnergy=0 => LocalEnergyDeposit = bindingEnergy
|
||||
|
||||
G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
|
||||
fvect->push_back(dp);
|
||||
// TEST //////////////////////////
|
||||
// if (secondaryKinetic<0) abort();
|
||||
// if (scatteredEnergy<0) abort();
|
||||
// if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
|
||||
// if (k-scatteredEnergy<0) abort();
|
||||
/////////////////////////////////
|
||||
|
||||
const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
|
||||
G4DNAChemistryManager::Instance()->CreateWaterMolecule(eIonizedMolecule,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNASancheExcitationModel.cc 98733 2016-08-09 10:51:58Z gcosmo $
|
||||
// $Id: G4DNASancheExcitationModel.cc 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
//
|
||||
|
||||
// Created by Z. Francis
|
||||
@@ -153,17 +153,17 @@ Initialise(const G4ParticleDefinition* /*particle*/,
|
||||
tdummyVec.clear();
|
||||
//
|
||||
|
||||
double t;
|
||||
double xs;
|
||||
G4double t;
|
||||
G4double xs;
|
||||
|
||||
while(!input.eof())
|
||||
{
|
||||
input>>t;
|
||||
tdummyVec.push_back(t);
|
||||
|
||||
fEnergyLevelXS.push_back(std::vector<double>());
|
||||
fEnergyLevelXS.push_back(std::vector<G4double>());
|
||||
fEnergyTotalXS.push_back(0);
|
||||
std::vector<double>& levelXS = fEnergyLevelXS.back();
|
||||
std::vector<G4double>& levelXS = fEnergyLevelXS.back();
|
||||
levelXS.reserve(9);
|
||||
|
||||
// G4cout<<t;
|
||||
@@ -300,19 +300,19 @@ void G4DNASancheExcitationModel::SampleSecondaries(std::vector<
|
||||
G4double G4DNASancheExcitationModel::PartialCrossSection(G4double t,
|
||||
G4int level)
|
||||
{
|
||||
std::vector<double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
|
||||
tdummyVec.end(), t / eV);
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
size_t i1 = t1 - tdummyVec.begin();
|
||||
size_t i2 = t2 - tdummyVec.begin();
|
||||
|
||||
double sigma = LinInterpolate((*t1), (*t2),
|
||||
G4double sigma = LinInterpolate((*t1), (*t2),
|
||||
t / eV,
|
||||
fEnergyLevelXS[i1][level],
|
||||
fEnergyLevelXS[i2][level]);
|
||||
|
||||
static const double conv_factor = 1e-16 * cm * cm;
|
||||
static const G4double conv_factor = 1e-16 * cm * cm;
|
||||
|
||||
sigma *= conv_factor;
|
||||
if (sigma == 0.) sigma = 1e-30;
|
||||
@@ -323,19 +323,19 @@ G4double G4DNASancheExcitationModel::PartialCrossSection(G4double t,
|
||||
|
||||
G4double G4DNASancheExcitationModel::TotalCrossSection(G4double t)
|
||||
{
|
||||
std::vector<double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
|
||||
std::vector<G4double>::iterator t2 = std::upper_bound(tdummyVec.begin(),
|
||||
tdummyVec.end(), t / eV);
|
||||
std::vector<double>::iterator t1 = t2 - 1;
|
||||
std::vector<G4double>::iterator t1 = t2 - 1;
|
||||
|
||||
size_t i1 = t1 - tdummyVec.begin();
|
||||
size_t i2 = t2 - tdummyVec.begin();
|
||||
|
||||
double sigma = LinInterpolate((*t1), (*t2),
|
||||
G4double sigma = LinInterpolate((*t1), (*t2),
|
||||
t / eV,
|
||||
fEnergyTotalXS[i1],
|
||||
fEnergyTotalXS[i2]);
|
||||
|
||||
static const double conv_factor = 1e-16 * cm * cm;
|
||||
static const G4double conv_factor = 1e-16 * cm * cm;
|
||||
|
||||
sigma *= conv_factor;
|
||||
if (sigma == 0.) sigma = 1e-30;
|
||||
@@ -360,7 +360,7 @@ G4int G4DNASancheExcitationModel::RandomSelect(G4double k)
|
||||
|
||||
G4int i = nLevels;
|
||||
G4double value = 0.;
|
||||
std::deque<double> values;
|
||||
std::deque<G4double> values;
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAExcitation.cc 91992 2015-08-13 07:20:24Z gcosmo $
|
||||
// $Id: G4DNAExcitation.cc 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
|
||||
#include "G4DNAExcitation.hh"
|
||||
#include "G4LEPTSExcitationModel.hh"
|
||||
@@ -108,22 +108,22 @@ void G4DNAExcitation::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
|
||||
else if(name == "proton")
|
||||
{
|
||||
if(!EmModel(1)) // MK: Is this a correct test ?
|
||||
if(!EmModel(0)) // MK: Is this a correct test ?
|
||||
{
|
||||
G4DNAMillerGreenExcitationModel* miller =
|
||||
new G4DNAMillerGreenExcitationModel();
|
||||
SetEmModel(miller, 1);
|
||||
SetEmModel(miller);
|
||||
miller->SetLowEnergyLimit(10 * eV);
|
||||
miller->SetHighEnergyLimit(500 * keV);
|
||||
|
||||
G4DNABornExcitationModel* born = new G4DNABornExcitationModel();
|
||||
SetEmModel(born, 2);
|
||||
SetEmModel(born);
|
||||
born->SetLowEnergyLimit(500 * keV);
|
||||
born->SetHighEnergyLimit(100 * MeV);
|
||||
}
|
||||
|
||||
AddEmModel(1, EmModel(1));
|
||||
if(EmModel(2)) AddEmModel(2, EmModel(2));
|
||||
AddEmModel(1, EmModel());
|
||||
if(EmModel(1)) AddEmModel(2, EmModel(1));
|
||||
}
|
||||
|
||||
else if(name == "hydrogen")
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4DNAIonisation.cc 91992 2015-08-13 07:20:24Z gcosmo $
|
||||
// $Id: G4DNAIonisation.cc 105719 2017-08-16 12:36:37Z gcosmo $
|
||||
|
||||
#include "G4DNAIonisation.hh"
|
||||
#include "G4LEPTSIonisationModel.hh"
|
||||
@@ -108,23 +108,23 @@ void G4DNAIonisation::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
|
||||
if(name == "proton")
|
||||
{
|
||||
if(!EmModel(1)) // MK : Is this a reliable test ?
|
||||
if(!EmModel(0)) // MK : Is this a reliable test ? VI: it is useful
|
||||
{
|
||||
G4DNARuddIonisationModel* rudd =
|
||||
new G4DNARuddIonisationModel();
|
||||
rudd->SetLowEnergyLimit(0 * eV);
|
||||
rudd->SetHighEnergyLimit(500 * keV);
|
||||
SetEmModel(rudd, 1);
|
||||
SetEmModel(rudd);
|
||||
|
||||
G4DNABornIonisationModel* born =
|
||||
new G4DNABornIonisationModel();
|
||||
born->SetLowEnergyLimit(500 * keV);
|
||||
born->SetHighEnergyLimit(100 * MeV);
|
||||
SetEmModel(born, 2);
|
||||
SetEmModel(born);
|
||||
}
|
||||
|
||||
AddEmModel(1, EmModel(1));
|
||||
if(EmModel(2)) AddEmModel(2, EmModel(2));
|
||||
AddEmModel(1, EmModel());
|
||||
if(EmModel(1)) AddEmModel(2, EmModel(1));
|
||||
}
|
||||
|
||||
if(name == "hydrogen")
|
||||
@@ -172,7 +172,6 @@ void G4DNAIonisation::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
}
|
||||
AddEmModel(1, EmModel());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,10 +179,10 @@ void G4DNAIonisation::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
|
||||
void G4DNAIonisation::PrintInfo()
|
||||
{
|
||||
if(EmModel(2))
|
||||
if(EmModel(1))
|
||||
{
|
||||
G4cout << " Total cross sections computed from " << EmModel(1)->GetName()
|
||||
<< " and " << EmModel(2)->GetName() << " models" << G4endl;
|
||||
G4cout << " Total cross sections computed from " << EmModel(0)->GetName()
|
||||
<< " and " << EmModel(1)->GetName() << " models" << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
///
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
@@ -22,6 +22,7 @@
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// Authors: S. Meylan and C. Villagrasa (IRSN, France)
|
||||
// Models come from
|
||||
// M. Bug et al, Rad. Phys and Chem. 130, 459-479 (2017)
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/*
|
||||
* G4PhysChemIO.hh
|
||||
*
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/*
|
||||
* G4VPhysChemIO.hh
|
||||
*
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/*
|
||||
* G4PhysChemIO.cc
|
||||
*
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/*
|
||||
* G4VPhysChemIO.cc
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
$Id: History 107367 2017-11-09 10:56:09Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -16,6 +16,29 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
08 Nov 2017: D.Sawkey (emhighenergy-V10-03-05)
|
||||
- G4hBremsstrahlung, G4hPairProduction - update ProcessDescription text
|
||||
|
||||
27 Oct 2017: V.Ivant (emhighenergy-V10-03-04)
|
||||
- G4GammaConversionToMuons - changed parameterisation of nuclear
|
||||
elastic formfactor (A.Sokolov); use integer Z; speed-up
|
||||
sampling algorithm
|
||||
|
||||
19 Oct 2017: D.Sawkey (emhighenergy-V10-03-03)
|
||||
- add dummy ProcessDescription for html doc
|
||||
|
||||
12 Oct 2017: V.Ivant (emhighenergy-V10-03-02)
|
||||
- G4eeToHadrons - switched from ProcessDescription to StreamProcessInfo
|
||||
|
||||
11 Oct 2017: V.Ivant (emhighenergy-V10-03-01)
|
||||
- G4eeToHadrons, G4eeToHadronsMultiModel - implemented new method
|
||||
Description(..) instead of PrintInfo()
|
||||
|
||||
03 Aug 2017: V.Ivant (emhighenergy-V10-03-00)
|
||||
- G4eeToHadrons, G4hhIonisation, G4mplIonisation - make coherent
|
||||
model initialisation
|
||||
|
||||
1 Jun 2016: D.Sawkey (emhighenergy-V10-02-00)
|
||||
- Most files: use C++11 features explicit, override, delete, nullptr
|
||||
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaConversionToMuons.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4GammaConversionToMuons.hh 106961 2017-10-31 08:36:29Z gcosmo $
|
||||
//
|
||||
// ------------ G4GammaConversionToMuons physics process ------
|
||||
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// 05-08-04: suppression of .icc file (mma)
|
||||
// 13-08-04, public ComputeCrossSectionPerAtom() and ComputeMeanFreePath() (mma)
|
||||
// 13-08-04, public ComputeCrossSectionPerAtom() and ComputeMeanFreePath() (mma)
|
||||
//
|
||||
// class description
|
||||
//
|
||||
@@ -61,83 +61,76 @@
|
||||
class G4GammaConversionToMuons : public G4VDiscreteProcess
|
||||
|
||||
{
|
||||
public: // with description
|
||||
public: // with description
|
||||
|
||||
explicit G4GammaConversionToMuons(
|
||||
explicit G4GammaConversionToMuons(
|
||||
const G4String& processName ="GammaToMuPair",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
|
||||
~G4GammaConversionToMuons();
|
||||
~G4GammaConversionToMuons() override;
|
||||
|
||||
G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
G4bool IsApplicable(const G4ParticleDefinition&) override;
|
||||
// true for Gamma only.
|
||||
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) override;
|
||||
void BuildPhysicsTable(const G4ParticleDefinition&) override;
|
||||
// here dummy, the total cross section parametrization is used rather
|
||||
// than tables, just calling PrintInfoDefinition
|
||||
|
||||
void PrintInfoDefinition();
|
||||
void PrintInfoDefinition();
|
||||
// Print few lines of informations about the process: validity range,
|
||||
// origine ..etc..
|
||||
// Invoked by BuildThePhysicsTable().
|
||||
|
||||
void SetCrossSecFactor(G4double fac);
|
||||
void SetCrossSecFactor(G4double fac);
|
||||
// Set the factor to artificially increase the crossSection (default 1)
|
||||
|
||||
G4double GetCrossSecFactor() { return CrossSecFactor;}
|
||||
inline G4double GetCrossSecFactor() const { return CrossSecFactor;}
|
||||
// Get the factor to artificially increase the cross section
|
||||
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition) override;
|
||||
G4double GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* condition) override;
|
||||
// It returns the MeanFreePath of the process for the current track :
|
||||
// (energy, material)
|
||||
// The previousStepSize and G4ForceCondition* are not used.
|
||||
// This function overloads a virtual function of the base class.
|
||||
// It is invoked by the ProcessManager of the Particle.
|
||||
|
||||
G4double GetCrossSectionPerAtom(const G4DynamicParticle* aDynamicGamma,
|
||||
G4Element* anElement);
|
||||
G4double GetCrossSectionPerAtom(const G4DynamicParticle* aDynamicGamma,
|
||||
const G4Element* anElement);
|
||||
// It returns the total CrossSectionPerAtom of the process,
|
||||
// for the current DynamicGamma (energy), in anElement.
|
||||
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
|
||||
const G4Step& aStep) override;
|
||||
// It computes the final state of the process (at end of step),
|
||||
// returned as a ParticleChange object.
|
||||
// This function overloads a virtual function of the base class.
|
||||
// It is invoked by the ProcessManager of the Particle.
|
||||
|
||||
virtual
|
||||
G4double ComputeCrossSectionPerAtom(G4double GammaEnergy,
|
||||
G4double AtomicZ,G4double AtomicA);
|
||||
G4double ComputeCrossSectionPerAtom(G4double GammaEnergy, G4int Z);
|
||||
|
||||
G4double ComputeMeanFreePath (G4double GammaEnergy,
|
||||
G4Material* aMaterial);
|
||||
G4double ComputeMeanFreePath (G4double GammaEnergy,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicGamma,
|
||||
G4Material* aMaterial);
|
||||
const G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicGamma,
|
||||
const G4Material* aMaterial);
|
||||
|
||||
private:
|
||||
// hide assignment operator as private
|
||||
G4GammaConversionToMuons&
|
||||
operator=(const G4GammaConversionToMuons &right) = delete;
|
||||
G4GammaConversionToMuons(const G4GammaConversionToMuons& ) = delete;
|
||||
|
||||
// hide assignment operator as private
|
||||
G4GammaConversionToMuons&
|
||||
operator=(const G4GammaConversionToMuons &right) = delete;
|
||||
G4GammaConversionToMuons(const G4GammaConversionToMuons& ) = delete;
|
||||
G4double Mmuon;
|
||||
G4double Rc;
|
||||
G4double LowestEnergyLimit ; // low energy limit of the tables
|
||||
G4double HighestEnergyLimit ; // high energy limit of the tables
|
||||
|
||||
private:
|
||||
|
||||
G4double Mmuon;
|
||||
G4double Rc;
|
||||
G4double LowestEnergyLimit ; // low energy limit of the tables
|
||||
G4double HighestEnergyLimit ; // high energy limit of the tables
|
||||
|
||||
G4double MeanFreePath; // actual MeanFreePath (current medium)
|
||||
G4double CrossSecFactor; // factor to artificially increase
|
||||
// the cross section
|
||||
|
||||
G4double MeanFreePath; // actual MeanFreePath (current medium)
|
||||
G4double CrossSecFactor; // factor to artificially increase
|
||||
// the cross section
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eeToHadrons.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4eeToHadrons.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -67,16 +67,20 @@ public:
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// Set the factor to artificially increase the crossSection (default 1)
|
||||
void SetCrossSecFactor(G4double fac);
|
||||
|
||||
protected:
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine=G4String("\n")) const override;
|
||||
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
private:
|
||||
|
||||
std::vector<G4DynamicParticle*>* GenerateSecondaries(const G4DynamicParticle*);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eeToHadronsMultiModel.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4eeToHadronsMultiModel.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -93,7 +93,10 @@ public:
|
||||
G4double tmin = 0.0,
|
||||
G4double maxEnergy = DBL_MAX) override;
|
||||
|
||||
virtual void PrintInfo();
|
||||
virtual void ModelDescription(std::ostream& outFile) const override;
|
||||
|
||||
virtual void ModelDescription(std::ostream& outFile,
|
||||
G4String endOfLine) const override;
|
||||
|
||||
// Set the factor to artificially increase the crossSection (default 1)
|
||||
void SetCrossSecFactor(G4double fac);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hBremsstrahlung.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hBremsstrahlung.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -69,6 +69,9 @@ public:
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hPairProduction.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hPairProduction.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -66,6 +66,9 @@ public:
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hhIonisation.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hhIonisation.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -75,6 +75,9 @@ public:
|
||||
// Print out of the class parameters
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4mplIonisation.hh 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4mplIonisation.hh 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -76,6 +76,9 @@ public:
|
||||
// Print out of the class parameters
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaConversionToMuons.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4GammaConversionToMuons.cc 106961 2017-10-31 08:36:29Z gcosmo $
|
||||
//
|
||||
// ------------ G4GammaConversionToMuons physics process ------
|
||||
// by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
|
||||
@@ -67,8 +67,6 @@ G4GammaConversionToMuons::G4GammaConversionToMuons(const G4String& processName,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
// destructor
|
||||
|
||||
G4GammaConversionToMuons::~G4GammaConversionToMuons()
|
||||
{}
|
||||
|
||||
@@ -91,7 +89,7 @@ void G4GammaConversionToMuons::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4GammaConversionToMuons::GetMeanFreePath(const G4Track& aTrack,
|
||||
G4double, G4ForceCondition*)
|
||||
G4double, G4ForceCondition*)
|
||||
|
||||
// returns the photon mean free path in GEANT4 internal units
|
||||
// (MeanFreePath is a private member of the class)
|
||||
@@ -99,66 +97,59 @@ G4double G4GammaConversionToMuons::GetMeanFreePath(const G4Track& aTrack,
|
||||
{
|
||||
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
const G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
if (GammaEnergy <= LowestEnergyLimit)
|
||||
MeanFreePath = DBL_MAX;
|
||||
else
|
||||
MeanFreePath = ComputeMeanFreePath(GammaEnergy,aMaterial);
|
||||
MeanFreePath = (GammaEnergy <= LowestEnergyLimit)
|
||||
? DBL_MAX : ComputeMeanFreePath(GammaEnergy,aMaterial);
|
||||
|
||||
return MeanFreePath;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4GammaConversionToMuons::ComputeMeanFreePath(G4double GammaEnergy,
|
||||
G4Material* aMaterial)
|
||||
G4double
|
||||
G4GammaConversionToMuons::ComputeMeanFreePath(G4double GammaEnergy,
|
||||
const G4Material* aMaterial)
|
||||
|
||||
// computes and returns the photon mean free path in GEANT4 internal units
|
||||
{
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
|
||||
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
|
||||
|
||||
G4double SIGMA = 0 ;
|
||||
G4double SIGMA = 0.0;
|
||||
|
||||
for ( size_t i=0 ; i < aMaterial->GetNumberOfElements(); ++i)
|
||||
{
|
||||
G4double AtomicZ = (*theElementVector)[i]->GetZ();
|
||||
G4double AtomicA = (*theElementVector)[i]->GetA()/(g/mole);
|
||||
SIGMA += NbOfAtomsPerVolume[i] *
|
||||
ComputeCrossSectionPerAtom(GammaEnergy,AtomicZ,AtomicA);
|
||||
ComputeCrossSectionPerAtom(GammaEnergy,
|
||||
(*theElementVector)[i]->GetZasInt());
|
||||
}
|
||||
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
|
||||
return (SIGMA > 0.0) ? 1./SIGMA : DBL_MAX;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4double G4GammaConversionToMuons::GetCrossSectionPerAtom(
|
||||
const G4DynamicParticle* aDynamicGamma,
|
||||
G4Element* anElement)
|
||||
const G4Element* anElement)
|
||||
|
||||
// gives the total cross section per atom in GEANT4 internal units
|
||||
{
|
||||
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
||||
G4double AtomicZ = anElement->GetZ();
|
||||
G4double AtomicA = anElement->GetN();
|
||||
G4double crossSection =
|
||||
ComputeCrossSectionPerAtom(GammaEnergy,AtomicZ,AtomicA);
|
||||
return crossSection;
|
||||
return ComputeCrossSectionPerAtom(aDynamicGamma->GetKineticEnergy(),
|
||||
anElement->GetZasInt());
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
G4double G4GammaConversionToMuons::ComputeCrossSectionPerAtom(
|
||||
G4double Egam, G4double ZZ, G4double)
|
||||
G4double Egam, G4int Z)
|
||||
|
||||
// Calculates the microscopic cross section in GEANT4 internal units.
|
||||
// Total cross section parametrisation from H.Burkhardt
|
||||
// It gives a good description at any energy (from 0 to 10**21 eV)
|
||||
{
|
||||
if(Egam <= LowestEnergyLimit) return 0.0 ; // below threshold return 0
|
||||
if(Egam <= LowestEnergyLimit) return 0.0; // below threshold return 0
|
||||
|
||||
G4int Z = G4lrint(ZZ);
|
||||
G4double CrossSection = 0.0;
|
||||
G4NistManager* nist = G4NistManager::Instance();
|
||||
|
||||
@@ -211,7 +202,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
//
|
||||
{
|
||||
aParticleChange.Initialize(aTrack);
|
||||
G4Material* aMaterial = aTrack.GetMaterial();
|
||||
const G4Material* aMaterial = aTrack.GetMaterial();
|
||||
|
||||
// current Gamma energy and direction, return if energy too low
|
||||
const G4DynamicParticle *aDynamicGamma = aTrack.GetDynamicParticle();
|
||||
@@ -223,7 +214,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
|
||||
// select randomly one element constituting the material
|
||||
const G4Element* anElement = SelectRandomAtom(aDynamicGamma, aMaterial);
|
||||
G4int Z = G4lrint(anElement->GetZ());
|
||||
G4int Z = anElement->GetZasInt();
|
||||
G4NistManager* nist = G4NistManager::Instance();
|
||||
|
||||
G4double B,Dn;
|
||||
@@ -239,7 +230,8 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
}
|
||||
G4double Zthird=1./nist->GetZ13(Z); // Z**(-1/3)
|
||||
G4double Winfty=B*Zthird*Mmuon/(Dn*electron_mass_c2);
|
||||
G4double C1Num=0.35*A027;
|
||||
|
||||
G4double C1Num=0.138*A027;
|
||||
G4double C1Num2=C1Num*C1Num;
|
||||
G4double C2Term2=electron_mass_c2/(183.*Zthird*Mmuon);
|
||||
|
||||
@@ -280,39 +272,52 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
G4double psi;
|
||||
G4double rho;
|
||||
|
||||
G4double a3 = (GammaMuonInv/(2.*xPM));
|
||||
G4double a33 = a3*a3;
|
||||
G4double f1;
|
||||
G4double b1 = 1./(4.*C1Num2);
|
||||
G4double b3 = b1*b1*b1;
|
||||
G4double a21 = a33 + b1;
|
||||
|
||||
G4double f1_max=-(1.-xPM)*(2.*b1+(a21+a33)*G4Log(a33/a21))/(2*b3);
|
||||
|
||||
G4double thetaPlus,thetaMinus,phiHalf; // final angular variables
|
||||
nn = 0;
|
||||
do // t, psi, rho generation start (while angle < pi)
|
||||
{
|
||||
// t, psi, rho generation start (while angle < pi)
|
||||
do {
|
||||
//generate t by the rejection method
|
||||
G4double C1=C1Num2* GammaMuonInv/xPM;
|
||||
G4double f1_max=(1.-xPM) / (1.+C1);
|
||||
G4double f1; // the probability density
|
||||
do
|
||||
{
|
||||
do {
|
||||
++nn;
|
||||
t=G4UniformRand();
|
||||
f1=(1.-2.*xPM+4.*xPM*t*(1.-t)) / (1.+C1/(t*t));
|
||||
if(f1<0 || f1> f1_max) // should never happend
|
||||
G4double a34=a33/(t*t);
|
||||
G4double a22 = a34 + b1;
|
||||
if(std::abs(b1)<0.0001*a34)
|
||||
// special case of a34=a22 because of logarithm accuracy
|
||||
{
|
||||
f1=(1.-2.*xPM+4.*xPM*t*(1.-t))/(12.*a34*a34*a34*a34);
|
||||
}
|
||||
else
|
||||
{
|
||||
f1=-(1.-2.*xPM+4.*xPM*t*(1.-t))*(2.*b1+(a22+a34)*G4Log(a34/a22))/(2*b3);
|
||||
}
|
||||
if(f1<0.0 || f1> f1_max) // should never happend
|
||||
{
|
||||
G4cout << "G4GammaConversionToMuons::PostStepDoIt WARNING:"
|
||||
<< "outside allowed range f1=" << f1 << " is set to zero"
|
||||
<< "outside allowed range f1=" << f1
|
||||
<< " is set to zero, a34 = "<< a34 << " a22 = "<<a22<<"."
|
||||
<< G4endl;
|
||||
f1 = 0.0;
|
||||
f1 = 0.0;
|
||||
}
|
||||
if(nn > nmax) { break; }
|
||||
}
|
||||
// Loop checking, 07-Aug-2015, Vladimir Ivanchenko
|
||||
while ( G4UniformRand()*f1_max > f1);
|
||||
// Loop checking, 07-Aug-2015, Vladimir Ivanchenko
|
||||
} while ( G4UniformRand()*f1_max > f1);
|
||||
// generate psi by the rejection method
|
||||
G4double f2_max=1.-2.*xPM*(1.-4.*t*(1.-t));
|
||||
|
||||
// long version
|
||||
G4double f2;
|
||||
do
|
||||
{
|
||||
do {
|
||||
++nn;
|
||||
psi=2.*pi*G4UniformRand();
|
||||
psi=twopi*G4UniformRand();
|
||||
f2=1.-2.*xPM+4.*xPM*t*(1.-t)*(1.+cos(2.*psi));
|
||||
if(f2<0 || f2> f2_max) // should never happend
|
||||
{
|
||||
@@ -322,14 +327,14 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
f2 = 0.0;
|
||||
}
|
||||
if(nn >= nmax) { break; }
|
||||
}
|
||||
// Loop checking, 07-Aug-2015, Vladimir Ivanchenko
|
||||
while ( G4UniformRand()*f2_max > f2);
|
||||
// Loop checking, 07-Aug-2015, Vladimir Ivanchenko
|
||||
} while ( G4UniformRand()*f2_max > f2);
|
||||
|
||||
// generate rho by direct transformation
|
||||
G4double C2Term1=GammaMuonInv/(2.*xPM*t);
|
||||
G4double C2=4./sqrt(xPM)*pow(C2Term1*C2Term1+C2Term2*C2Term2,2.);
|
||||
G4double rhomax=1.9/A027*(1./t-1.);
|
||||
G4double C22 = C2Term1*C2Term1+C2Term2*C2Term2;
|
||||
G4double C2=4.*C22*C22/sqrt(xPM);
|
||||
G4double rhomax=(1./t-1.)*1.9/A027;
|
||||
G4double beta=G4Log( (C2+rhomax*rhomax*rhomax*rhomax)/C2 );
|
||||
rho=G4Exp(G4Log(C2 *( G4Exp(beta*G4UniformRand())-1. ))*0.25);
|
||||
|
||||
@@ -352,7 +357,7 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
|
||||
// now construct the vectors
|
||||
// azimuthal symmetry, take phi0 at random between 0 and 2 pi
|
||||
G4double phi0=2.*pi*G4UniformRand();
|
||||
G4double phi0=twopi*G4UniformRand();
|
||||
G4double EPlus=xPlus*Egam;
|
||||
G4double EMinus=xMinus*Egam;
|
||||
|
||||
@@ -385,30 +390,31 @@ G4VParticleChange* G4GammaConversionToMuons::PostStepDoIt(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
G4Element* G4GammaConversionToMuons::SelectRandomAtom(
|
||||
const G4Element* G4GammaConversionToMuons::SelectRandomAtom(
|
||||
const G4DynamicParticle* aDynamicGamma,
|
||||
G4Material* aMaterial)
|
||||
const G4Material* aMaterial)
|
||||
{
|
||||
// select randomly 1 element within the material, invoked by PostStepDoIt
|
||||
|
||||
const G4int NumberOfElements = aMaterial->GetNumberOfElements();
|
||||
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
|
||||
if (NumberOfElements == 1) return (*theElementVector)[0];
|
||||
const G4Element* elm = (*theElementVector)[0];
|
||||
|
||||
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
|
||||
if (NumberOfElements > 1) {
|
||||
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
|
||||
|
||||
G4double PartialSumSigma = 0. ;
|
||||
G4double rval = G4UniformRand()/MeanFreePath;
|
||||
G4double PartialSumSigma = 0.;
|
||||
G4double rval = G4UniformRand()/MeanFreePath;
|
||||
|
||||
|
||||
for ( G4int i=0 ; i < NumberOfElements ; ++i)
|
||||
{ PartialSumSigma += NbOfAtomsPerVolume[i] *
|
||||
GetCrossSectionPerAtom(aDynamicGamma, (*theElementVector)[i]);
|
||||
if (rval <= PartialSumSigma) return ((*theElementVector)[i]);
|
||||
}
|
||||
G4cout << " WARNING !!! - The Material '"<< aMaterial->GetName()
|
||||
<< "' has no elements, NULL pointer returned." << G4endl;
|
||||
return NULL;
|
||||
for (G4int i=0; i<NumberOfElements; ++i)
|
||||
{
|
||||
elm = (*theElementVector)[i];
|
||||
PartialSumSigma += NbOfAtomsPerVolume[i]
|
||||
*GetCrossSectionPerAtom(aDynamicGamma, elm);
|
||||
if (rval <= PartialSumSigma) { break; }
|
||||
}
|
||||
}
|
||||
return elm;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eeToHadrons.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4eeToHadrons.cc 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -93,15 +93,17 @@ void G4eeToHadrons::InitialiseProcess(const G4ParticleDefinition*)
|
||||
|
||||
multimodel = new G4eeToHadronsMultiModel(verboseLevel);
|
||||
if(csFactor > 1.0) multimodel->SetCrossSecFactor(csFactor);
|
||||
SetEmModel(multimodel);
|
||||
AddEmModel(1, multimodel);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4eeToHadrons::PrintInfo()
|
||||
void G4eeToHadrons::StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine) const
|
||||
{
|
||||
multimodel->PrintInfo();
|
||||
multimodel->ModelDescription(outFile, endOfLine);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
@@ -113,3 +115,12 @@ void G4eeToHadrons::SetCrossSecFactor(G4double fac)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4eeToHadrons::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "No description available.";
|
||||
out << "<br>\n";
|
||||
G4VEmProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eeToHadronsMultiModel.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4eeToHadronsMultiModel.cc 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -196,16 +196,24 @@ void G4eeToHadronsMultiModel::SampleSecondaries(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4eeToHadronsMultiModel::PrintInfo()
|
||||
void G4eeToHadronsMultiModel::ModelDescription(std::ostream& outFile) const
|
||||
{
|
||||
ModelDescription(outFile, G4String("\n"));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4eeToHadronsMultiModel::ModelDescription(std::ostream& outFile,
|
||||
G4String endOfLine) const
|
||||
{
|
||||
if(verbose > 0) {
|
||||
G4double e1 = 0.5*thKineticEnergy*thKineticEnergy/electron_mass_c2
|
||||
- 2.0*electron_mass_c2;
|
||||
G4double e2 = 0.5*maxKineticEnergy*maxKineticEnergy/electron_mass_c2
|
||||
- 2.0*electron_mass_c2;
|
||||
G4cout << " e+ annihilation into hadrons active from "
|
||||
<< e1/GeV << " GeV to " << e2/GeV << " GeV"
|
||||
<< G4endl;
|
||||
outFile << " e+ annihilation into hadrons active from "
|
||||
<< e1/GeV << " GeV to " << e2/GeV << " GeV"
|
||||
<< endOfLine;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hBremsstrahlung.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hBremsstrahlung.cc 107367 2017-11-09 10:56:09Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -90,3 +90,10 @@ void G4hBremsstrahlung::InitialiseEnergyLossProcess(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hBremsstrahlung::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Hadron bremsstrahlung</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hPairProduction.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hPairProduction.cc 107367 2017-11-09 10:56:09Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -94,6 +94,10 @@ void G4hPairProduction::InitialiseEnergyLossProcess(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hPairProduction::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Hadron pair production</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4hhIonisation.cc 97391 2016-06-02 10:08:45Z gcosmo $
|
||||
// $Id: G4hhIonisation.cc 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -140,6 +140,7 @@ void G4hhIonisation::InitialiseEnergyLossProcess(
|
||||
em = new G4BetheBlochNoDeltaModel();
|
||||
em->SetLowEnergyLimit(eth);
|
||||
em->SetHighEnergyLimit(emax);
|
||||
SetEmModel(em);
|
||||
AddEmModel(1, em, flucModel);
|
||||
|
||||
if(verboseLevel>1) {
|
||||
@@ -157,3 +158,12 @@ void G4hhIonisation::PrintInfo()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4hhIonisation::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "No description available.";
|
||||
out << "<br>\n";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4mplIonisation.cc 85013 2014-10-23 09:45:07Z gcosmo $
|
||||
// $Id: G4mplIonisation.cc 106715 2017-10-20 09:39:06Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -107,6 +107,7 @@ void G4mplIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* p,
|
||||
SetMaxKinEnergy(emax);
|
||||
SetDEDXBinning(bin);
|
||||
|
||||
SetEmModel(ion);
|
||||
AddEmModel(1,ion,ion);
|
||||
|
||||
isInitialised = true;
|
||||
@@ -118,3 +119,13 @@ void G4mplIonisation::PrintInfo()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4mplIonisation::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "No description available.";
|
||||
out << "<br>\n";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 104801 2017-06-19 07:10:39Z gcosmo $
|
||||
$Id: History 107157 2017-11-03 11:27:29Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,37 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
03.11.1017 V.Ivanchenko, emlowen-V10-03-19
|
||||
- G4RayleighScattering - added C++11 keywords to fix compilation warning at clang
|
||||
|
||||
02.11.2017 V.Ivanchenko, emlowen-V10-03-18
|
||||
- G4LivermorePhotoElectricModel - fixed messages in the case of G4Exception
|
||||
|
||||
01.11.1017 D.Sawkey, emlowen-V10-03-17
|
||||
- G4RayleighScattering - add ProcessDescription
|
||||
|
||||
20.10.2017 V.Ivanchenko, emlowen-V10-03-16
|
||||
- G4LivermorePhotoElectricModel - (M. Bandieramonte) changed dataset
|
||||
to G4EMLOW7.2, where parameterisation is in the livermore/phot_epics2014
|
||||
|
||||
10.10.2017 L.Pandola, emlowen-V10-03-15
|
||||
- added protection against (rare) infinite loops in
|
||||
G4PenelopeOscillatorManager, happening for materials made by >20 elements
|
||||
|
||||
14.09.2017 V.Ivanchenko, emlowen-V10-03-14
|
||||
- G4hICRU49He - fixed Coverity warning
|
||||
|
||||
01.09.2017 V.Ivanchenko, emlowen-V10-03-13
|
||||
- G4LivermorePhotoElectricModel - (M. Bandieramonte) new method of
|
||||
parameterisations based on epics2014 data (required G4EMLOW7.1)
|
||||
|
||||
03.08.2017 V.Ivanchenko, emlowen-V10-03-12
|
||||
- G4MicroElecElastic, G4MicroElecInelastic - make coherent
|
||||
initialsation of models
|
||||
|
||||
02.08.2017 V.Ivanchenko, emlowen-V10-03-11
|
||||
- G4LowECapture - added scaling of energy threshold for ions
|
||||
|
||||
17.06.2017 S.Incerti, emlowen-V10-03-10
|
||||
- bugzilla 1980 and C++ nullptr in G4LivermorePhotoElectricModel
|
||||
|
||||
@@ -44,8 +75,8 @@ committal in the CVS repository !
|
||||
10.05.2017 V.Ivanchenko, emlowen-V10-03-03
|
||||
- G4CrossSectionDataSet, G4MuElecCrossSectionDataSet - fixed gcc 7.1 warnings
|
||||
|
||||
30.01.2016 JMC Brow, S. Incerti, emlowen-V10-03-02
|
||||
- fix of G4LowEPPolarizedComptonModel
|
||||
30.01.2017 JMC Brow, S. Incerti, emlowen-V10-03-02
|
||||
- G4LowEPPolarizedComptonModel - fixed FPE in comptation of std::acos
|
||||
|
||||
19.12.2016 S. Incerti, emlowen-V10-03-01
|
||||
- extended coverage of shell ionisation models by M. Reis and A. Taborda
|
||||
|
||||
+69
-66
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4LivermorePhotoElectricModel.hh 104410 2017-05-30 07:17:09Z gcosmo $
|
||||
// $Id: G4LivermorePhotoElectricModel.hh 106173 2017-09-15 13:05:16Z gcosmo $
|
||||
//
|
||||
// Author: Sebastien Incerti
|
||||
// 30 October 2008
|
||||
@@ -33,7 +33,7 @@
|
||||
// Main cuts from G4ProductionCutsTable are always used
|
||||
// 30 May 2011 A Mantero & V Ivanchenko Migration to model design for deexcitation
|
||||
// 22 Oct 2012 A & V Ivanchenko Migration data structure to G4PhysicsVector
|
||||
//
|
||||
// 1 June 2017 M Bandieramonte
|
||||
|
||||
|
||||
#ifndef G4LivermorePhotoElectricModel_h
|
||||
@@ -49,79 +49,82 @@ class G4LPhysicsFreeVector;
|
||||
|
||||
class G4LivermorePhotoElectricModel : public G4VEmModel
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
|
||||
G4LivermorePhotoElectricModel(const G4String& nam = "LivermorePhElectric");
|
||||
|
||||
virtual ~G4LivermorePhotoElectricModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double energy,
|
||||
G4double cutEnergy = 0.0,
|
||||
G4double maxEnergy = DBL_MAX);
|
||||
|
||||
virtual G4double ComputeCrossSectionPerAtom(
|
||||
const G4ParticleDefinition*,
|
||||
G4double energy,
|
||||
G4double Z,
|
||||
G4double A=0.,
|
||||
G4double cut=0.,
|
||||
G4double emax=DBL_MAX);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
|
||||
virtual void InitialiseForElement(const G4ParticleDefinition*, G4int Z);
|
||||
|
||||
inline void SetLimitNumberOfShells(G4int);
|
||||
|
||||
G4LivermorePhotoElectricModel(const G4String& nam = "LivermorePhElectric");
|
||||
|
||||
virtual ~G4LivermorePhotoElectricModel();
|
||||
|
||||
virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
|
||||
|
||||
virtual G4double CrossSectionPerVolume(const G4Material*,
|
||||
const G4ParticleDefinition*,
|
||||
G4double energy,
|
||||
G4double cutEnergy = 0.0,
|
||||
G4double maxEnergy = DBL_MAX);
|
||||
|
||||
virtual G4double ComputeCrossSectionPerAtom(
|
||||
const G4ParticleDefinition*,
|
||||
G4double energy,
|
||||
G4double Z,
|
||||
G4double A=0,
|
||||
G4double cut=0,
|
||||
G4double emax=DBL_MAX);
|
||||
|
||||
virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
|
||||
const G4MaterialCutsCouple*,
|
||||
const G4DynamicParticle*,
|
||||
G4double tmin,
|
||||
G4double maxEnergy);
|
||||
|
||||
|
||||
virtual void InitialiseForElement(const G4ParticleDefinition*, G4int Z);
|
||||
|
||||
inline void SetLimitNumberOfShells(G4int);
|
||||
G4double GetBindingEnergy (G4double ZZ, G4int shell);
|
||||
|
||||
G4LivermorePhotoElectricModel & operator=
|
||||
(const G4LivermorePhotoElectricModel &right) = delete;
|
||||
G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChange;
|
||||
|
||||
|
||||
G4ParticleChangeForGamma* fParticleChange;
|
||||
|
||||
private:
|
||||
|
||||
void ReadData(G4int Z, const char* path = nullptr);
|
||||
|
||||
G4LivermorePhotoElectricModel & operator=(const G4LivermorePhotoElectricModel &right);
|
||||
G4LivermorePhotoElectricModel(const G4LivermorePhotoElectricModel&);
|
||||
|
||||
G4ParticleDefinition* theGamma;
|
||||
G4ParticleDefinition* theElectron;
|
||||
|
||||
G4int verboseLevel;
|
||||
G4int maxZ;
|
||||
G4int nShellLimit;
|
||||
G4bool fDeexcitationActive;
|
||||
G4bool isInitialised;
|
||||
|
||||
static G4LPhysicsFreeVector* fCrossSection[99];
|
||||
static G4LPhysicsFreeVector* fCrossSectionLE[99];
|
||||
static std::vector<G4double>* fParam[99];
|
||||
static G4int fNShells[99];
|
||||
static G4int fNShellsUsed[99];
|
||||
static G4ElementData* fShellCrossSection;
|
||||
static G4Material* fWater;
|
||||
static G4double fWaterEnergyLimit;
|
||||
|
||||
G4VAtomDeexcitation* fAtomDeexcitation;
|
||||
|
||||
G4double fCurrSection;
|
||||
std::vector<G4double> fSandiaCof;
|
||||
|
||||
void ReadData(G4int Z, const char* path = nullptr);
|
||||
|
||||
G4ParticleDefinition* theGamma;
|
||||
G4ParticleDefinition* theElectron;
|
||||
|
||||
G4int verboseLevel;
|
||||
G4int maxZ;
|
||||
G4int nShellLimit;
|
||||
G4bool fDeexcitationActive;
|
||||
G4bool isInitialised;
|
||||
|
||||
static G4LPhysicsFreeVector* fCrossSection[99];
|
||||
static G4LPhysicsFreeVector* fCrossSectionLE[99];
|
||||
static std::vector<G4double>* fParamHigh[99];
|
||||
static std::vector<G4double>* fParamLow[99];
|
||||
static G4int fNShells[99];
|
||||
static G4int fNShellsUsed[99];
|
||||
static G4ElementData* fShellCrossSection;
|
||||
static G4Material* fWater;
|
||||
static G4double fWaterEnergyLimit;
|
||||
|
||||
G4VAtomDeexcitation* fAtomDeexcitation;
|
||||
|
||||
G4double fCurrSection;
|
||||
std::vector<G4double> fSandiaCof;
|
||||
};
|
||||
|
||||
inline
|
||||
void G4LivermorePhotoElectricModel::SetLimitNumberOfShells(G4int n)
|
||||
{
|
||||
nShellLimit = n;
|
||||
nShellLimit = n;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -94,6 +94,7 @@ private:
|
||||
G4LowECapture& operator = (const G4LowECapture &right);
|
||||
|
||||
G4double kinEnergyThreshold;
|
||||
G4bool isIon;
|
||||
G4int nRegions;
|
||||
std::vector<G4String> regionName;
|
||||
std::vector<const G4Region*> region;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4RayleighScattering.hh 66241 2012-12-13 18:34:42Z gunter $
|
||||
// $Id: G4RayleighScattering.hh 107157 2017-11-03 11:27:29Z gcosmo $
|
||||
//
|
||||
//------------------ G4RayleighScattering physics process -----------------------
|
||||
//
|
||||
@@ -53,24 +53,30 @@ class G4RayleighScattering : public G4VEmProcess
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4RayleighScattering(const G4String& processName ="Rayl",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
explicit G4RayleighScattering(const G4String& processName ="Rayl",
|
||||
G4ProcessType type = fElectromagnetic);
|
||||
|
||||
virtual ~G4RayleighScattering();
|
||||
|
||||
// true for Gamma only.
|
||||
G4bool IsApplicable(const G4ParticleDefinition&);
|
||||
G4bool IsApplicable(const G4ParticleDefinition&) final;
|
||||
|
||||
// Print few lines of informations about the process: validity range,
|
||||
virtual void PrintInfo();
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*);
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
private:
|
||||
|
||||
// hide assignment operator
|
||||
G4RayleighScattering & operator=(const G4RayleighScattering &right) = delete;
|
||||
G4RayleighScattering(const G4RayleighScattering&) = delete;
|
||||
|
||||
G4bool isInitialised;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@
|
||||
|
||||
G4LowECapture::G4LowECapture(G4double ekinlim)
|
||||
: G4VDiscreteProcess("Capture", fElectromagnetic),
|
||||
kinEnergyThreshold(ekinlim),
|
||||
kinEnergyThreshold(ekinlim), isIon(false),
|
||||
nRegions(0)
|
||||
{}
|
||||
|
||||
@@ -87,7 +87,7 @@ void G4LowECapture::AddRegion(const G4String& nam)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4LowECapture::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
void G4LowECapture::BuildPhysicsTable(const G4ParticleDefinition& part)
|
||||
{
|
||||
G4RegionStore* store = G4RegionStore::GetInstance();
|
||||
for(G4int i=0; i<nRegions; ++i) {
|
||||
@@ -100,6 +100,15 @@ void G4LowECapture::BuildPhysicsTable(const G4ParticleDefinition&)
|
||||
if(r) { region.push_back(r); }
|
||||
}
|
||||
nRegions = region.size();
|
||||
|
||||
// ions reusing G4GenericIon parameters
|
||||
if(part.GetParticleType() == "nucleus") {
|
||||
G4String pname = part.GetParticleName();
|
||||
if(pname != "deuteron" && pname != "triton" &&
|
||||
pname != "alpha" && pname != "He3" &&
|
||||
pname != "alpha+" && pname != "helium" &&
|
||||
pname != "hydrogen") { isIon = true; }
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -114,7 +123,11 @@ G4double G4LowECapture::PostStepGetPhysicalInteractionLength(
|
||||
{
|
||||
*condition = NotForced;
|
||||
G4double limit = DBL_MAX;
|
||||
if(aTrack.GetKineticEnergy() < kinEnergyThreshold) {
|
||||
G4double eLimit = kinEnergyThreshold;
|
||||
if(isIon) {
|
||||
eLimit *= aTrack.GetDefinition()->GetPDGMass()/CLHEP::proton_mass_c2;
|
||||
}
|
||||
if(aTrack.GetKineticEnergy() < eLimit) {
|
||||
for(G4int i=0; i<nRegions; ++i) {
|
||||
if(aTrack.GetVolume()->GetLogicalVolume()->GetRegion() == region[i]) {
|
||||
limit = 0.0;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
|
||||
@@ -69,8 +69,8 @@ void G4MicroElecElastic::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
isInitialised = true;
|
||||
SetBuildTableFlag(false);
|
||||
if(!EmModel(1)) SetEmModel(new G4DummyModel(), 1);
|
||||
AddEmModel(2, EmModel(1));
|
||||
if(!EmModel()) SetEmModel(new G4DummyModel());
|
||||
AddEmModel(2, EmModel());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ void G4MicroElecInelastic::InitialiseProcess(const G4ParticleDefinition* p)
|
||||
SetBuildTableFlag(false);
|
||||
G4String name = p->GetParticleName();
|
||||
|
||||
if(!EmModel(1)) SetEmModel(new G4DummyModel(), 1);
|
||||
AddEmModel(2, EmModel(1));
|
||||
if(!EmModel()) SetEmModel(new G4DummyModel());
|
||||
AddEmModel(2, EmModel());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -802,7 +802,6 @@ void G4PenelopeOscillatorManager::BuildOscillatorTable(const G4Material* materia
|
||||
|
||||
if (verbosityLevel > 1)
|
||||
G4cout << "Cutoff energy: " << cutEnergy/eV << " eV" << G4endl;
|
||||
|
||||
//
|
||||
//Copy helper in the oscillatorTable for Ionisation
|
||||
//
|
||||
@@ -826,12 +825,14 @@ void G4PenelopeOscillatorManager::BuildOscillatorTable(const G4Material* materia
|
||||
|
||||
size_t firstIndex = (isAConductor) ? 1 : 0; //for conductors, skip conduction oscillator
|
||||
G4bool loopAgain = false;
|
||||
G4int nLoops = 0;
|
||||
G4int removedLevels = 0;
|
||||
do
|
||||
{
|
||||
loopAgain = false;
|
||||
nLoops++;
|
||||
if (Nost>firstIndex+1)
|
||||
{
|
||||
{
|
||||
removedLevels = 0;
|
||||
for (size_t i=firstIndex;i<theTable->size()-1;i++)
|
||||
{
|
||||
@@ -899,6 +900,9 @@ void G4PenelopeOscillatorManager::BuildOscillatorTable(const G4Material* materia
|
||||
Rgroup = Rgroup*Rgroup;
|
||||
loopAgain = true;
|
||||
}
|
||||
//Add protection against infinite loops here
|
||||
if (nLoops > 100 && !removedLevels)
|
||||
loopAgain = false;
|
||||
}while(loopAgain);
|
||||
|
||||
if (verbosityLevel > 1)
|
||||
@@ -952,6 +956,7 @@ void G4PenelopeOscillatorManager::BuildOscillatorTable(const G4Material* materia
|
||||
removedLevels = 0;
|
||||
do
|
||||
{
|
||||
nLoops++;
|
||||
loopAgain = false;
|
||||
if (Nost>firstIndex+1)
|
||||
{
|
||||
@@ -1009,6 +1014,9 @@ void G4PenelopeOscillatorManager::BuildOscillatorTable(const G4Material* materia
|
||||
Rgroup = Rgroup*Rgroup;
|
||||
loopAgain = true;
|
||||
}
|
||||
//Add protection against infinite loops here
|
||||
if (nLoops > 100 && !removedLevels)
|
||||
loopAgain = false;
|
||||
}while(loopAgain);
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4RayleighScattering.cc 66241 2012-12-13 18:34:42Z gunter $
|
||||
// $Id: G4RayleighScattering.cc 107118 2017-11-02 15:10:19Z gcosmo $
|
||||
//
|
||||
//
|
||||
// 19-12-2008, first implementation, Luciano Pandola
|
||||
@@ -78,3 +78,11 @@ void G4RayleighScattering::PrintInfo()
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4RayleighScattering::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Rayleigh scattering</strong>";
|
||||
G4VEmProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -176,7 +176,7 @@ G4double G4hICRU49He::StoppingPower(const G4Material* material,
|
||||
G4Exp(-c[iMolecula][4]*std::pow(T0,-c[iMolecula][6])) +
|
||||
c[iMolecula][3]/(T0*T0) ;
|
||||
|
||||
ionloss *= std::sqrt(T/T0) ;
|
||||
ionloss = a1*a2*std::sqrt(T/T0) ;
|
||||
|
||||
// Main parametrisation
|
||||
} else {
|
||||
@@ -184,13 +184,14 @@ G4double G4hICRU49He::StoppingPower(const G4Material* material,
|
||||
a2 = (c[iMolecula][0]*std::log(T)/T + c[iMolecula][2]/T) *
|
||||
G4Exp(-c[iMolecula][4]*std::pow(T,-c[iMolecula][6])) +
|
||||
c[iMolecula][3]/(T*T) ;
|
||||
ionloss = a1*a2;
|
||||
}
|
||||
|
||||
// He effective charge
|
||||
G4double z = (material->GetTotNbOfElectPerVolume()) /
|
||||
(material->GetTotNbOfAtomsPerVolume()) ;
|
||||
|
||||
ionloss = a1*a2 / HeEffChargeSquare(z, kineticEnergy*rateMass) ;
|
||||
ionloss /= HeEffChargeSquare(z, kineticEnergy*rateMass) ;
|
||||
|
||||
if ( ionloss < 0.0) ionloss = 0.0 ;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 103220 2017-03-22 11:35:04Z gcosmo $
|
||||
$Id: History 107366 2017-11-09 10:55:20Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,26 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
08 November 17: D.Sawkey (emmuons-V10-03-06)
|
||||
- G4MuMultipleScattering - modify ProcessDescription text
|
||||
|
||||
31 October 17: D.Sawkey (emmuons-V10-03-05)
|
||||
- G4MuMultipleScattering, G4MuBremsstrahlung, G4MuIonisation,
|
||||
G4MuPairProduction, G4ePairProduction
|
||||
- modify Process Description
|
||||
|
||||
19 October 17: D.Sawkey (emmuons-V10-03-04)
|
||||
- G4ePairProduction, G4MuBremsstrahlung, G4MuIonisation, G4MuPairProduction
|
||||
- add dummy ProcessDescription for html output
|
||||
|
||||
12 October 17: V.Ivant (emmuons-V10-03-03)
|
||||
- G4MuMultipleScattering, G4MuPairProduction,
|
||||
G4ePairProduction - switched from ProcessDescription to StreamProcessInfo
|
||||
|
||||
03 August 17: V.Ivant (emmuons-V10-03-01)
|
||||
- G4MuIonisation, G4MuMultipleScattering, G4MuPairProduction,
|
||||
G4ePairProduction - make coherent model initialisation
|
||||
|
||||
22 March 17: V.Ivant (emmuons-V10-03-00)
|
||||
- G4MuBremmstrahlungModel, G4MuPairProductionModel - make all data
|
||||
members protected allowing to reuse these classes as based
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.hh 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuBremsstrahlung.hh 106716 2017-10-20 09:40:09Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -94,6 +94,9 @@ public:
|
||||
|
||||
inline void SetLowestKineticEnergy(G4double e);
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuIonisation.hh 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuIonisation.hh 106716 2017-10-20 09:40:09Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -99,6 +99,9 @@ public:
|
||||
// Print out of the class parameters
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuMultipleScattering.hh 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuMultipleScattering.hh 107056 2017-11-01 14:52:32Z gcosmo $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -69,11 +69,15 @@ public: // with description
|
||||
// returns true for charged particles, false otherwise
|
||||
G4bool IsApplicable (const G4ParticleDefinition& p) override;
|
||||
|
||||
// Print few lines of informations about the process: validity range,
|
||||
void PrintInfo() override;
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine=G4String("\n")) const override;
|
||||
|
||||
// This function initialise models
|
||||
void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuPairProduction.hh 96156 2016-03-21 08:10:21Z gcosmo $
|
||||
// $Id: G4MuPairProduction.hh 106716 2017-10-20 09:40:09Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -84,12 +84,17 @@ public:
|
||||
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
|
||||
const G4Material*, G4double cut) override;
|
||||
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
inline void SetLowestKineticEnergy(G4double e);
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine=G4String("\n")) const override;
|
||||
|
||||
virtual void
|
||||
InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*) override;
|
||||
|
||||
@@ -68,12 +68,17 @@ public:
|
||||
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition* p,
|
||||
const G4Material*, G4double cut) override;
|
||||
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
inline void SetLowestKineticEnergy(G4double e);
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine=G4String("\n")) const override;
|
||||
|
||||
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition*,
|
||||
const G4ParticleDefinition*) override;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuBremsstrahlung.cc 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuBremsstrahlung.cc 107056 2017-11-01 14:52:32Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -131,3 +131,10 @@ void G4MuBremsstrahlung::PrintInfo()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuBremsstrahlung::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Muon bremsstrahlung</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuIonisation.cc 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuIonisation.cc 107056 2017-11-01 14:52:32Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -149,29 +149,29 @@ void G4MuIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* par
|
||||
G4double ehigh = std::min(1*GeV, emax);
|
||||
|
||||
// Bragg peak model
|
||||
if (!EmModel(1)) {
|
||||
if(q > 0.0) { SetEmModel(new G4BraggModel(),1); }
|
||||
else { SetEmModel(new G4ICRU73QOModel(),1); }
|
||||
if (!EmModel(0)) {
|
||||
if(q > 0.0) { SetEmModel(new G4BraggModel()); }
|
||||
else { SetEmModel(new G4ICRU73QOModel()); }
|
||||
}
|
||||
EmModel(1)->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel(1)->SetHighEnergyLimit(elow);
|
||||
AddEmModel(1, EmModel(1), new G4IonFluctuations());
|
||||
EmModel(0)->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel(0)->SetHighEnergyLimit(elow);
|
||||
AddEmModel(1, EmModel(0), new G4IonFluctuations());
|
||||
|
||||
// high energy fluctuation model
|
||||
if (!FluctModel()) { SetFluctModel(new G4UniversalFluctuation()); }
|
||||
|
||||
// moderate energy model
|
||||
if (!EmModel(2)) { SetEmModel(new G4BetheBlochModel(),2); }
|
||||
EmModel(2)->SetLowEnergyLimit(elow);
|
||||
EmModel(2)->SetHighEnergyLimit(ehigh);
|
||||
AddEmModel(2, EmModel(2), FluctModel());
|
||||
if (!EmModel(1)) { SetEmModel(new G4BetheBlochModel()); }
|
||||
EmModel(1)->SetLowEnergyLimit(elow);
|
||||
EmModel(1)->SetHighEnergyLimit(ehigh);
|
||||
AddEmModel(2, EmModel(1), FluctModel());
|
||||
|
||||
// high energy model
|
||||
if(ehigh < emax) {
|
||||
if (!EmModel(3)) { SetEmModel(new G4MuBetheBlochModel(),3); }
|
||||
EmModel(3)->SetLowEnergyLimit(ehigh);
|
||||
EmModel(3)->SetHighEnergyLimit(emax);
|
||||
AddEmModel(3, EmModel(3), FluctModel());
|
||||
if (!EmModel(2)) { SetEmModel(new G4MuBetheBlochModel()); }
|
||||
EmModel(2)->SetLowEnergyLimit(ehigh);
|
||||
EmModel(2)->SetHighEnergyLimit(emax);
|
||||
AddEmModel(3, EmModel(2), FluctModel());
|
||||
}
|
||||
ratio = electron_mass_c2/mass;
|
||||
isInitialised = true;
|
||||
@@ -185,6 +185,10 @@ void G4MuIonisation::PrintInfo()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuIonisation::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Muon ionisation</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuMultipleScattering.cc 97740 2016-06-08 09:23:36Z gcosmo $
|
||||
// $Id: G4MuMultipleScattering.cc 107366 2017-11-09 10:55:20Z gcosmo $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
@@ -78,21 +78,32 @@ void G4MuMultipleScattering::InitialiseProcess(const G4ParticleDefinition*)
|
||||
{
|
||||
// Modification of parameters between runs
|
||||
if(isInitialized) { return; }
|
||||
if(!EmModel(1)) { SetEmModel(new G4UrbanMscModel(), 1); }
|
||||
AddEmModel(1, EmModel(1));
|
||||
if(!EmModel(0)) { SetEmModel(new G4UrbanMscModel()); }
|
||||
AddEmModel(1, EmModel(0));
|
||||
isInitialized = true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4MuMultipleScattering::PrintInfo()
|
||||
void G4MuMultipleScattering::StreamProcessInfo(std::ostream& out,
|
||||
G4String endOfLine) const
|
||||
{
|
||||
G4cout << " RangeFactor= " << RangeFactor()
|
||||
<< ", step limit type: " << StepLimitType()
|
||||
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
|
||||
<< ", polarAngleLimit(deg)= " << PolarAngleLimit()/degree
|
||||
<< G4endl;
|
||||
out << " RangeFactor= " << RangeFactor()
|
||||
<< ", step limit type: " << StepLimitType()
|
||||
<< ", lateralDisplacement: " << LateralDisplasmentFlag()
|
||||
<< ", polarAngleLimit(deg)= " << PolarAngleLimit()/degree
|
||||
<< endOfLine;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void G4MuMultipleScattering::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>"
|
||||
"Muon multiple scattering</strong>. Simulates combined effects of <br>"
|
||||
"elastic scattering at the end of the step, to save computing time. May<br>"
|
||||
"be combined with Coulomb scattering in a 'mixed' scattering algorithm.";
|
||||
G4VMultipleScattering::ProcessDescription(out);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4MuPairProduction.cc 97392 2016-06-02 10:10:32Z gcosmo $
|
||||
// $Id: G4MuPairProduction.cc 107056 2017-11-01 14:52:32Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -125,7 +125,7 @@ void G4MuPairProduction::InitialiseEnergyLossProcess(
|
||||
theParticle = part;
|
||||
|
||||
G4MuPairProductionModel* mod = new G4MuPairProductionModel(part);
|
||||
SetEmModel(mod, 1);
|
||||
SetEmModel(mod);
|
||||
|
||||
lowestKinEnergy = std::max(lowestKinEnergy, part->GetPDGMass()*8.0);
|
||||
mod->SetLowestKineticEnergy(lowestKinEnergy);
|
||||
@@ -140,18 +140,19 @@ void G4MuPairProduction::InitialiseEnergyLossProcess(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuPairProduction::PrintInfo()
|
||||
void G4MuPairProduction::StreamProcessInfo(std::ostream& out,
|
||||
G4String endOfLine) const
|
||||
{
|
||||
G4ElementData* ed = EmModel()->GetElementData();
|
||||
if(ed) {
|
||||
for(G4int Z=1; Z<93; ++Z) {
|
||||
G4Physics2DVector* pv = ed->GetElement2DData(Z);
|
||||
if(pv) {
|
||||
G4cout << " Sampling table " << pv->GetLengthY()
|
||||
<< "x" << pv->GetLengthX() << "; from "
|
||||
<< exp(pv->GetY(0))/GeV << " GeV to "
|
||||
<< exp(pv->GetY(pv->GetLengthY()-1))/TeV
|
||||
<< " TeV " << G4endl;
|
||||
out << " Sampling table " << pv->GetLengthY()
|
||||
<< "x" << pv->GetLengthX() << "; from "
|
||||
<< exp(pv->GetY(0))/GeV << " GeV to "
|
||||
<< exp(pv->GetY(pv->GetLengthY()-1))/TeV
|
||||
<< " TeV " << endOfLine;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -160,6 +161,10 @@ void G4MuPairProduction::PrintInfo()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4MuPairProduction::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Pair production</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -101,7 +101,7 @@ void G4ePairProduction::InitialiseEnergyLossProcess(
|
||||
theParticle = part;
|
||||
|
||||
G4MuPairProductionModel* mod = new G4MuPairProductionModel(part);
|
||||
SetEmModel(mod, 1);
|
||||
SetEmModel(mod);
|
||||
|
||||
lowestKinEnergy = std::max(lowestKinEnergy, part->GetPDGMass()*8.0);
|
||||
mod->SetLowestKineticEnergy(lowestKinEnergy);
|
||||
@@ -116,18 +116,19 @@ void G4ePairProduction::InitialiseEnergyLossProcess(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4ePairProduction::PrintInfo()
|
||||
void G4ePairProduction::StreamProcessInfo(std::ostream& out,
|
||||
G4String endOfLine) const
|
||||
{
|
||||
G4ElementData* ed = EmModel(1)->GetElementData();
|
||||
G4ElementData* ed = EmModel(0)->GetElementData();
|
||||
if(ed) {
|
||||
for(G4int Z=1; Z<93; ++Z) {
|
||||
G4Physics2DVector* pv = ed->GetElement2DData(Z);
|
||||
if(pv) {
|
||||
G4cout << " Sampling table " << pv->GetLengthY()
|
||||
<< "x" << pv->GetLengthX() << "; from "
|
||||
<< G4Exp(pv->GetY(0))/GeV << " GeV to "
|
||||
<< G4Exp(pv->GetY(pv->GetLengthY()-1))/TeV
|
||||
<< " TeV " << G4endl;
|
||||
out << " Sampling table " << pv->GetLengthY()
|
||||
<< "x" << pv->GetLengthX() << "; from "
|
||||
<< G4Exp(pv->GetY(0))/GeV << " GeV to "
|
||||
<< G4Exp(pv->GetY(pv->GetLengthY()-1))/TeV
|
||||
<< " TeV " << endOfLine;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -136,6 +137,10 @@ void G4ePairProduction::PrintInfo()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
void G4ePairProduction::ProcessDescription(std::ostream& out) const
|
||||
{
|
||||
out << "<strong>Pair production</strong>";
|
||||
G4VEnergyLossProcess::ProcessDescription(out);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 97384 2016-06-02 09:59:17Z gcosmo $
|
||||
$Id: History 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,11 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
05 August 17: V.Ivanchenko (empolar-V10-03-01)
|
||||
03 August 17: V.Ivanchenko (empolar-V10-03-00)
|
||||
- G4PolarizedCompton, G4PolarizedGammaConversion, G4ePolarizedIonisation
|
||||
make coherent model initialisation
|
||||
|
||||
1 Jun 16: D.Sawkey (empolar-V10-02-04)
|
||||
- G4PolarizationManager: C++11 range-based for loop;
|
||||
- G4PolarizationManager, G4ePolarizedBremsstrahlungModel: nullptr
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4PolarizedCompton.cc 97175 2016-05-27 12:42:05Z gcosmo $
|
||||
// $Id: G4PolarizedCompton.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
//
|
||||
//
|
||||
// File name: G4PolarizedCompton
|
||||
@@ -120,15 +120,15 @@ void G4PolarizedCompton::InitialiseProcess(const G4ParticleDefinition*)
|
||||
if(!isInitialised) {
|
||||
isInitialised = true;
|
||||
if(0 == mType) {
|
||||
if(!EmModel(1)) { SetEmModel(new G4KleinNishinaCompton(), 1); }
|
||||
if(!EmModel(0)) { SetEmModel(new G4KleinNishinaCompton()); }
|
||||
} else {
|
||||
emModel = new G4PolarizedComptonModel();
|
||||
SetEmModel(emModel, 1);
|
||||
}
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
EmModel(1)->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel(1)->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
AddEmModel(1, EmModel(1));
|
||||
EmModel(0)->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
EmModel(0)->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
AddEmModel(1, EmModel(0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ void G4PolarizedCompton::PrintInfo()
|
||||
{
|
||||
G4cout << " Total cross sections has a good parametrisation"
|
||||
<< " from 10 KeV to (100/Z) GeV"
|
||||
<< "\n Sampling according " << EmModel(1)->GetName() << " model"
|
||||
<< "\n Sampling according " << EmModel(0)->GetName() << " model"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4PolarizedGammaConversion.cc 85018 2014-10-23 09:51:37Z gcosmo $
|
||||
// $Id: G4PolarizedGammaConversion.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -75,10 +75,10 @@ void G4PolarizedGammaConversion::InitialiseProcess(const G4ParticleDefinition*)
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
G4double emin = std::max(param->MinKinEnergy(), 2*electron_mass_c2);
|
||||
G4double emax = param->MaxKinEnergy();
|
||||
if(!EmModel(1)) { SetEmModel(new G4PolarizedGammaConversionModel(), 1); }
|
||||
EmModel(1)->SetLowEnergyLimit(emin);
|
||||
EmModel(1)->SetHighEnergyLimit(emax);
|
||||
AddEmModel(1, EmModel(1));
|
||||
if(!EmModel(0)) { SetEmModel(new G4PolarizedGammaConversionModel()); }
|
||||
EmModel(0)->SetLowEnergyLimit(emin);
|
||||
EmModel(0)->SetHighEnergyLimit(emax);
|
||||
AddEmModel(1, EmModel(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ePolarizedIonisation.cc 97175 2016-05-27 12:42:05Z gcosmo $
|
||||
// $Id: G4ePolarizedIonisation.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class file
|
||||
@@ -137,7 +137,7 @@ void G4ePolarizedIonisation::InitialiseEnergyLossProcess(
|
||||
flucModel = FluctModel();
|
||||
|
||||
emModel = new G4PolarizedMollerBhabhaModel();
|
||||
SetEmModel(emModel, 1);
|
||||
SetEmModel(emModel);
|
||||
G4EmParameters* param = G4EmParameters::Instance();
|
||||
emModel->SetLowEnergyLimit(param->MinKinEnergy());
|
||||
emModel->SetHighEnergyLimit(param->MaxKinEnergy());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4eplusPolarizedAnnihilation.cc 97175 2016-05-27 12:42:05Z gcosmo $
|
||||
// $Id: G4eplusPolarizedAnnihilation.cc 105740 2017-08-16 13:05:44Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -77,7 +77,7 @@ G4eplusPolarizedAnnihilation::G4eplusPolarizedAnnihilation(const G4String& name)
|
||||
theTransverseAsymmetryTable(nullptr)
|
||||
{
|
||||
emModel = new G4PolarizedAnnihilationModel();
|
||||
SetEmModel(emModel, 1);
|
||||
SetEmModel(emModel);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile 66810 2013-01-12 16:01:59Z gcosmo $
|
||||
# $Id: GNUmakefile 105921 2017-08-28 12:12:53Z gcosmo $
|
||||
# --------------------------------------------------------------------
|
||||
# GNUmakefile for electromagnetic sub-library. John Allison, 25/6/98.
|
||||
# --------------------------------------------------------------------
|
||||
@@ -31,5 +31,9 @@ CPPFLAGS += -I$(G4BASE)/global/management/include \
|
||||
-I$(G4BASE)/intercoms/include \
|
||||
-I$(G4BASE)/materials/include
|
||||
|
||||
ifdef G4LIB_BUILD_ZLIB
|
||||
CPPFLAGS += -I$(G4BASE)/externals/zlib/include
|
||||
endif
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 104802 2017-06-19 07:11:40Z gcosmo $
|
||||
$Id: History 107365 2017-11-09 10:54:29Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +18,128 @@ committal in the CVS repository !
|
||||
|
||||
----------------------------------------------------------
|
||||
|
||||
08 November 17: D.Sawkey (emstand-V10-03-51)
|
||||
- G4CoulombScattering, G4eMultipleScattering, G4hMultipleScattering
|
||||
modify ProcessDescription text
|
||||
|
||||
06 November 17: M.Novak (emstand-V10-03-50)
|
||||
- G4GoudsmitSaundersonTable - fix scattering power correction table
|
||||
|
||||
03 November 17: V.Ivanchenko (emstand-V10-03-49)
|
||||
- G4UrbanMscModel - renamed displacementFlag to dispAlg96, if its
|
||||
value "true" then the old lateral displacment algorithm is used,
|
||||
else a new one is applied. This change was needed to avoid
|
||||
missunderstanding of the flag effect
|
||||
|
||||
02 November 17: V.Ivanchenko (emstand-V10-03-48)
|
||||
- G4CoulombScattering - improved printout
|
||||
|
||||
31 October 17: D.Sawkey (emstand-V10-03-47)
|
||||
- all process files: G4ComptonScattering, G4CoulombScattering,
|
||||
G4GammaConversion, G4NuclearStopping, G4PhotoElectricEffect,
|
||||
G4alphaIonisation, G4eBremsstrahlung, G4eIonisation,
|
||||
G4eMultipleScattering, G4eplusAnnihilation, G4hIonisation,
|
||||
G4hMultipleScattering, G4ionIonisation: modify ProcessDescription
|
||||
|
||||
30 October 17: M.Novak (emstand-V10-03-46)
|
||||
- G4GSPWACorrections - fix data read problem
|
||||
|
||||
30 October 17: M.Novak (emstand-V10-03-45)
|
||||
- G4GoudsmitSaundersonMscModel, G4GoudsmitSaundersonTable,
|
||||
G4GSMottCorrection, G4GSPWACorrections, G4PWATotalXsecTable
|
||||
- new form of PWA corrections in the GS MSC model that is
|
||||
active now both for e- and e+ (the G4PWATotalXsecTable
|
||||
class is replaced with G4GSPWACorrections)
|
||||
- improved scattering power correction computation in case
|
||||
Mott-correction
|
||||
- changed MSC step limit flag conventions in the GS model
|
||||
|
||||
25 October 17: V.Ivanchenko (emstand-V10-03-44)
|
||||
- G4NuclearStopping - use activation limit for energy per nucleon
|
||||
|
||||
19 October 17: D.Sawkey (emstand-V10-03-43)
|
||||
- G4alphaIonisation, G4ComptonScattering, G4CoulombScattering,
|
||||
G4eBremsstrahlung, G4eIonisation, G4eMultipleScattering,
|
||||
G4ePlusAnnihilation, G4GammaConversion, G4hIonisation,
|
||||
G4hMultipleScattering, G4ionIonisation, G4NuclearStopping,
|
||||
G4PhotoElectricEffect: add dummy ProcessDescription
|
||||
|
||||
16 October 17: V.Ivanchenko (emstand-V10-03-42)
|
||||
- G4BetheHeitlerModel, G4PairProductionRelModel - use G4Pow in both
|
||||
classes instead of G4NistManager for fast math computations
|
||||
|
||||
12 October 17: V.Ivanchenko (emstand-V10-03-41)
|
||||
- G4CoulombScattering, G4eBremsstrahlung, G4eMultipleScattering,
|
||||
G4hMultipleScattering, G4eplusAnnihilation, G4ionIonisation
|
||||
switched from ProcessDescription to StreamProcessInfo
|
||||
|
||||
11 October 17: V.Ivanchenko (emstand-V10-03-40)
|
||||
- G4NuclearStopping - fixed initialisation
|
||||
- G4CoulombScattering - improved initialisation printout
|
||||
|
||||
10 October 17: V.Ivanchenko (emstand-V10-03-39)
|
||||
- G4UrbanMscModel - use flag of lateral displacement algorithm,
|
||||
cleanup inline methods
|
||||
|
||||
09 October 17: V.Ivanchenko (emstand-V10-03-38)
|
||||
- G4ICRU49NuclearStoppingModel, G4PAIxSection, G4PEEffectFluoModel,
|
||||
G4alphaIonisation, G4UrbanMscModel - fabs substituted by std::abs
|
||||
G4UrbanMscModel - minor cleanup of the code
|
||||
|
||||
27 September 17: L.Urban (emstand-V10-03-36)
|
||||
- G4UniversalFluctuation - added correction for small cuts
|
||||
|
||||
22 September 17: M.Novak (emstand-V10-03-35)
|
||||
- G4GoudsmitSaundersonMscModel, G4GoudsmitSaundersonTable,
|
||||
G4GSMottCorrection - further improvments to GS Mott-correction.
|
||||
|
||||
20 September 17: V.Ivanchenko (emstand-V10-03-34)
|
||||
- G4UniversalFluctuation2017 - removed temporary class
|
||||
- G4PAIModel. G4PAIPhotModel - MinEnergyCut() is set to 12.5 eV, because
|
||||
of results of D. Pfeiffer study of gaseous detector simulations
|
||||
|
||||
18 September 17: V.Ivanchenko (emstand-V10-03-33)
|
||||
- G4UniversalFluctuation - improved sampling for thin layers
|
||||
|
||||
16 September 17: V.Ivanchenko (emstand-V10-03-30)
|
||||
- G4UniversalFluctuation - L.Urban added an extra parameter in the model
|
||||
|
||||
28 August 17: G,Cosmo (emstand-V10-03-29)
|
||||
- Correction to GNUmakefile to add optional include path to internal zlib
|
||||
module.
|
||||
|
||||
27 August 17: M.Novak (emstand-V10-03-28)
|
||||
- G4GSMottCorrection - remove forgotten debug printout.
|
||||
|
||||
27 August 17: M.Novak (emstand-V10-03-27)
|
||||
- G4GSMottCorrection - fix element symbol problem in file names.
|
||||
|
||||
25 August 17: M.Novak (emstand-V10-03-26)
|
||||
- G4GoudsmitSaundersonMscModel, G4GoudsmitSaundersonTable - added
|
||||
option to apply Mott-correction to the default GS model. The
|
||||
new class G4GSMottCorrection handles the Mott-correction to the
|
||||
angular distributions as well as correction factors to elastic,
|
||||
mfp, first and second moments.
|
||||
|
||||
24 August 17: V.Ivanchenko (emstand-V10-03-25)
|
||||
- G4PAIModel. G4PAIPhotModel - added implementation of virtual
|
||||
method MinEnergyCut(..), always return 25 eV, because PAI models
|
||||
does not applicable for smaller energy transfers
|
||||
|
||||
10 August 17: V.Ivanchenko (emstand-V10-03-24)
|
||||
- G4hIonisation - fixed energy intervals per EM model for superheavy
|
||||
particles
|
||||
|
||||
03 August 17: V.Ivanchenko (emstand-V10-03-23)
|
||||
- G4MottCoefficients, G4ScreeningMottCrossSection,
|
||||
G4eSingleCoulombScatteringModel - Mauro Tacconi updated the model
|
||||
making as fast as the default single scattering
|
||||
- G4ComptonScattering, G4CoulombScattering, G4GammaConversion,
|
||||
G4PhotoElectricEffect, G4WentzelOKandVIxSection, G4WentzelVIModel,
|
||||
G4alphaIonisation, G4eIonisation, G4hIonisation, G4ionIonisation,
|
||||
G4eBremsstrahlung, G4eMultipleScattering, G4hMultipleScattering
|
||||
make coherent model initialisation
|
||||
|
||||
16 June 17: V.Ivanchenko (emstand-V10-03-22)
|
||||
- G4eCoulombScatteringModel, G4WentzelVIModel,
|
||||
G4hCoulombScatteringModel - fixed problem of computation
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4BetheHeitlerModel.hh 104477 2017-06-01 07:39:33Z gcosmo $
|
||||
// $Id: G4BetheHeitlerModel.hh 106628 2017-10-17 06:25:38Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -97,6 +97,8 @@ private:
|
||||
G4BetheHeitlerModel & operator=(const G4BetheHeitlerModel &right) = delete;
|
||||
G4BetheHeitlerModel(const G4BetheHeitlerModel&) = delete;
|
||||
|
||||
protected:
|
||||
|
||||
G4Pow* g4calc;
|
||||
G4ParticleDefinition* theGamma;
|
||||
G4ParticleDefinition* theElectron;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ComptonScattering.hh 96934 2016-05-18 09:10:41Z gcosmo $
|
||||
// $Id: G4ComptonScattering.hh 106717 2017-10-20 09:41:27Z gcosmo $
|
||||
//
|
||||
//------------------ G4ComptonScattering physics process -----------------------
|
||||
// by Michel Maire, April 1996
|
||||
@@ -83,6 +83,9 @@ public: // with description
|
||||
|
||||
// Print few lines of informations about the process: validity range,
|
||||
virtual void PrintInfo() override;
|
||||
|
||||
// print description in html
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CoulombScattering.hh 96934 2016-05-18 09:10:41Z gcosmo $
|
||||
// $Id: G4CoulombScattering.hh 106717 2017-10-20 09:41:27Z gcosmo $
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
@@ -63,11 +63,15 @@ public:
|
||||
|
||||
virtual G4bool IsApplicable(const G4ParticleDefinition& p) final;
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void PrintInfo() override;
|
||||
// print documentation in html format
|
||||
virtual void ProcessDescription(std::ostream&) const override;
|
||||
|
||||
protected:
|
||||
|
||||
// Print out of the class parameters
|
||||
virtual void StreamProcessInfo(std::ostream& outFile,
|
||||
G4String endOfLine=G4String("\n")) const override;
|
||||
|
||||
virtual void InitialiseProcess(const G4ParticleDefinition*) override;
|
||||
|
||||
virtual G4double MinPrimaryEnergy(const G4ParticleDefinition*,
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: $
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// GEANT4 Class header file
|
||||
//
|
||||
// File name: G4GSMottCorrection
|
||||
//
|
||||
// Author: Mihaly Novak
|
||||
//
|
||||
// Creation date: 23.08.2017
|
||||
//
|
||||
// Modifications:
|
||||
//
|
||||
// Class description:
|
||||
// An object of this calss is used in the G4GoudsmitSaundersonTable when Mott-correction
|
||||
// was required by the user in the G4GoudsmitSaundersonMscModel.
|
||||
// The class is responsible to handle pre-computed Mott correction (rejection) functions
|
||||
// obtained as a ratio of GS angular distributions computed based on the Screened-Rutherford
|
||||
// DCS to GS angular distributions computed based on a more accurate corrected DCS_{cor}.
|
||||
// The DCS used to compute the accurate Goudsmit-Saunderson angular distributions is [1]:
|
||||
// DCS_{cor} = DCS_{SR}x[ DCS_{R}/DCS_{Mott}] where :
|
||||
// # DCS_{SR} is the relativistic Screened-Rutherford DCS (first Born approximate
|
||||
// solution of the Klein-Gordon i.e. relativistic Schrodinger equation =>
|
||||
// scattering of spinless e- on exponentially screened Coulomb potential)
|
||||
// note: the default (without using Mott-correction) GS angular distributions
|
||||
// are based on this DCS_{SR} with Moliere's screening parameter!
|
||||
// # DCS_{R} is the Rutherford DCS which is the same as above but without
|
||||
// screening
|
||||
// # DCS_{Mott} is the Mott DCS i.e. solution of the Dirac equation with a bare
|
||||
// Coulomb potential i.e. scattering of particles with spin (e- or e+) on a
|
||||
// point-like unscreened Coulomb potential [2]
|
||||
// # moreover, the screening parameter of the DCS_{cor} was determined such that
|
||||
// the DCS_{cor} with this corrected screening parameter reproduce the first
|
||||
// transport cross sections obtained from the corresponding most accurate DCS [3].
|
||||
// Unlike the default GS, the Mott-corrected angular distributions are particle type
|
||||
// (different for e- and e+ <= the DCS_{Mott} and the screening correction) and target
|
||||
// (Z and material) dependent.
|
||||
//
|
||||
// References:
|
||||
// [2] I.Kawrakow, E.Mainegra-Hing, D.W.O.Rogers, F.Tessier,B.R.B.Walters, NRCC
|
||||
// Report PIRS-701 (2013)
|
||||
// [2] N.F. Mott, Proc. Roy. Soc. (London) A 124 (1929) 425.
|
||||
// [3] F.Salvat, A.Jablonski, C.J. Powell, CPC 165(2005) 157-190
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifndef G4GSMottCorrection_h
|
||||
#define G4GSMottCorrection_h 1
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
class G4Material;
|
||||
class G4Element;
|
||||
|
||||
|
||||
class G4GSMottCorrection {
|
||||
public:
|
||||
G4GSMottCorrection(G4bool iselectron=true);
|
||||
|
||||
~G4GSMottCorrection();
|
||||
|
||||
void Initialise();
|
||||
|
||||
void GetMottCorrectionFactors(G4double logekin, G4double beta2, G4int matindx,
|
||||
G4double &mcToScr, G4double &mcToQ1, G4double &mcToG2PerG1);
|
||||
|
||||
G4double GetMottRejectionValue(G4double logekin, G4double G4beta2, G4double q1, G4double cost,
|
||||
G4int matindx, G4int &ekindx, G4int &deltindx);
|
||||
|
||||
static G4int GetMaxZet() { return gMaxZet; }
|
||||
|
||||
private:
|
||||
void InitMCDataPerElement();
|
||||
|
||||
void InitMCDataPerMaterials();
|
||||
|
||||
void LoadMCDataElement(const G4Element*);
|
||||
|
||||
void ReadCompressedFile(std::string fname, std::istringstream &iss);
|
||||
|
||||
void InitMCDataMaterial(const G4Material*);
|
||||
//
|
||||
// dat structures
|
||||
struct DataPerDelta {
|
||||
G4double fSA; // a,b,c,d spline interpolation parameters for the last \sin(0.5\theta) bin
|
||||
G4double fSB;
|
||||
G4double fSC;
|
||||
G4double fSD;
|
||||
G4double *fRejFuntion; // rejection func. for a given E_{kin}, \delta, e^-/e^+ over the \sin(0.5\theta) grid
|
||||
};
|
||||
|
||||
struct DataPerEkin {
|
||||
G4double fMCScreening; // correction factor to Moliere screening parameter
|
||||
G4double fMCFirstMoment; // correction factor to first moment
|
||||
G4double fMCSecondMoment; // correction factor to second
|
||||
DataPerDelta **fDataPerDelta; // per delta value data structure for each delta values
|
||||
};
|
||||
|
||||
// either per material or per Z
|
||||
struct DataPerMaterial {
|
||||
DataPerEkin **fDataPerEkin; // per kinetic energy data structure for each kinetic energy value
|
||||
};
|
||||
//
|
||||
void AllocateDataPerMaterial(DataPerMaterial*);
|
||||
void DeAllocateDataPerMaterial(DataPerMaterial*);
|
||||
void ClearMCDataPerElement();
|
||||
void ClearMCDataPerMaterial();
|
||||
//
|
||||
// data members:
|
||||
// - Mott correction data are computed over a :
|
||||
// I. Kinetic energy grid [both rejection functions and correction factors]:
|
||||
// 1. kinetic energy grid from 1[keV] - 100[keV] with log-spacing 16 points:
|
||||
// # linear interpolation on \ln[E_{kin}] will be used
|
||||
// 2. \beta^2 grid from E_{kin} = 100[keV](~0.300546) - \beta^2=0.9999(~50.5889MeV]) with linear spacing 16 points:
|
||||
// # linear interpolation on \beta^2 will be used
|
||||
// 3. the overall kinetic energy grid is from E_{kin}=1[keV] - E_{kin}<=\beta^2=0.9999(~50.5889MeV]) with 31 points
|
||||
// II. Delta value grid [rejection functions at a given kinetic energy(also depends on \theta;Z,e-/e+)]:
|
||||
// 1. \delta=2 Q_{1SR} (\eta_{MCcor})/ [1-2 Q_{1SR} (\eta_{MCcor})] where Q_{1SR} is the first moment i.e.
|
||||
// Q_{1SR}(\eta_{MCcor}) =s/\lambda_{el}G_{1SR}(\eta_{MCcor}) where s/\lambda_{el} is the mean number of elastic
|
||||
// scattering along the path s and G_{1SR}(\eta_{MCcor}) is the first, Screened-Rutherford transport coefficient
|
||||
// but computed by using the Mott-corrected Moliere screening parameter
|
||||
// 2. the delta value grid is from [0(1e-3) - 0.9] with linear spacing of 28 points:
|
||||
// # linear interpolation will be used on \delta
|
||||
// III. \sin(0.5\theta) grid[rejection function at a given kinetic energy - delta value pair (also depends on Z,e-/e+)]:
|
||||
// 1. 32 \sin(0.5\theta) pints between [0,1] with linear spacing: # linear interpolation on \sin(0.5\theta) will
|
||||
// be used exept the last bin where spline is used (the corresponding 4 spline parameters are also stored)
|
||||
private:
|
||||
G4bool fIsElectron;
|
||||
static constexpr G4int gNumEkin = 31; // number of kinetic energy grid points for Mott correction
|
||||
static constexpr G4int gNumBeta2 = 16; // \beta^2 values between [fMinBeta2-fMaxBeta2]
|
||||
static constexpr G4int gNumDelta = 28; // \delta values between [0(1.e-3)-0.9]
|
||||
static constexpr G4int gNumAngle = 32; //
|
||||
static constexpr G4int gMaxZet = 98; // max. Z for which Mott-correction data were computed (98)
|
||||
static constexpr G4double gMinEkin = 1.*CLHEP::keV; // minimum kinetic energy value
|
||||
static constexpr G4double gMidEkin = 100.*CLHEP::keV; // kinetic energy at the border of the E_{kin}-\beta^2 grids
|
||||
static constexpr G4double gMaxBeta2 = 0.9999; // maximum \beta^2 value
|
||||
static constexpr G4double gMaxDelta = 0.9; // maximum \delta value (the minimum is 0(1.e-3))
|
||||
//
|
||||
G4double fMaxEkin; // from max fMaxBeta2 = 0.9999 (~50.5889 [MeV])
|
||||
G4double fLogMinEkin; // \ln[fMinEkin]
|
||||
G4double fInvLogDelEkin; // 1/[\ln(fMidEkin/fMinEkin)/(fNumEkin-fNumBeta2)]
|
||||
G4double fMinBeta2; // <= E_{kin}=100 [keV] (~0.300546)
|
||||
G4double fInvDelBeta2; // 1/[(fMaxBeta2-fMinBeta2)/(fNumBeta2-1)]
|
||||
G4double fInvDelDelta; // 1/[0.9/(fNumDelta-1)]
|
||||
G4double fInvDelAngle; // 1/[(1-0)/fNumAngle-1]
|
||||
//
|
||||
static const std::string gElemSymbols[];
|
||||
//
|
||||
std::vector<DataPerMaterial*> fMCDataPerElement; // size will be gMaxZet+1; won't be null only at used Z indices
|
||||
std::vector<DataPerMaterial*> fMCDataPerMaterial; // size will #materials; won't be null only at used mat. indices
|
||||
};
|
||||
|
||||
#endif // G4GSMottCorrection_h
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user