Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -14,7 +14,11 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
07-Dec-2019 V. Ivanchenko (hadr-string-diff-V10-05-11)
|
||||
08-Mar-2020 V. Ivanchenko (hadr-string-diff-V10-06-01)
|
||||
- G4FTFModel, G4FTFParticipants - clean-up: removed unused methods, delete
|
||||
operators, use C++11 keywords
|
||||
|
||||
07-Dec-2019 V. Ivanchenko (hadr-string-diff-V10-06-00)
|
||||
- G4FTFParameters:
|
||||
o Fixed division by zero (Coverity report) due to wrong protection
|
||||
in previous MR 05-09
|
||||
|
||||
@@ -61,22 +61,25 @@ class G4ExcitedString;
|
||||
class G4FTFModel : public G4VPartonStringModel {
|
||||
public:
|
||||
G4FTFModel( const G4String& modelName = "FTF" );
|
||||
~G4FTFModel();
|
||||
~G4FTFModel() override;
|
||||
|
||||
void Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProjectile );
|
||||
G4ExcitedStringVector* GetStrings();
|
||||
G4V3DNucleus* GetWoundedNucleus() const;
|
||||
G4V3DNucleus* GetTargetNucleus() const;
|
||||
G4V3DNucleus* GetProjectileNucleus() const;
|
||||
G4V3DNucleus* GetWoundedNucleus() const override;
|
||||
G4V3DNucleus* GetProjectileNucleus() const override;
|
||||
|
||||
virtual void ModelDescription( std::ostream& ) const;
|
||||
void ModelDescription( std::ostream& ) const override;
|
||||
|
||||
G4FTFModel( const G4FTFModel& right ) = delete;
|
||||
const G4FTFModel& operator=( const G4FTFModel& right ) = delete;
|
||||
G4bool operator==( const G4FTFModel& right ) const = delete;
|
||||
G4bool operator!=( const G4FTFModel& right ) const = delete;
|
||||
|
||||
protected:
|
||||
void Init( const G4Nucleus& aNucleus,
|
||||
const G4DynamicParticle& aProjectile ) override;
|
||||
G4ExcitedStringVector* GetStrings() override;
|
||||
|
||||
private:
|
||||
G4FTFModel( const G4FTFModel& right );
|
||||
const G4FTFModel& operator=( const G4FTFModel& right );
|
||||
G4bool operator==( const G4FTFModel& right ) const;
|
||||
G4bool operator!=( const G4FTFModel& right ) const;
|
||||
|
||||
void StoreInvolvedNucleon();
|
||||
void ReggeonCascade();
|
||||
G4bool PutOnMassShell();
|
||||
@@ -187,17 +190,14 @@ class G4FTFModel : public G4VPartonStringModel {
|
||||
G4double TargetResidualExcitationEnergy;
|
||||
};
|
||||
|
||||
|
||||
inline G4V3DNucleus* G4FTFModel::GetWoundedNucleus() const {
|
||||
return theParticipants.GetWoundedNucleus();
|
||||
}
|
||||
|
||||
|
||||
inline G4V3DNucleus* G4FTFModel::GetTargetNucleus() const {
|
||||
return theParticipants.GetWoundedNucleus();
|
||||
}
|
||||
|
||||
|
||||
inline G4V3DNucleus* G4FTFModel::GetProjectileNucleus() const {
|
||||
return theParticipants.GetProjectileNucleus();
|
||||
}
|
||||
|
||||
+6
-8
@@ -50,10 +50,12 @@
|
||||
class G4FTFParticipants : public G4VParticipants {
|
||||
public:
|
||||
G4FTFParticipants();
|
||||
const G4FTFParticipants& operator=( const G4FTFParticipants& right );
|
||||
~G4FTFParticipants();
|
||||
G4bool operator==( const G4FTFParticipants& right ) const;
|
||||
G4bool operator!=( const G4FTFParticipants& right ) const;
|
||||
|
||||
const G4FTFParticipants& operator=( const G4FTFParticipants& right ) = delete;
|
||||
G4bool operator==( const G4FTFParticipants& right ) const = delete;
|
||||
G4bool operator!=( const G4FTFParticipants& right ) const = delete;
|
||||
G4FTFParticipants( const G4FTFParticipants& right ) = delete;
|
||||
|
||||
void GetList( const G4ReactionProduct& thePrimary, G4FTFParameters* theParameters );
|
||||
void StartLoop();
|
||||
@@ -62,24 +64,20 @@ class G4FTFParticipants : public G4VParticipants {
|
||||
void ShiftInteractionTime();
|
||||
G4InteractionContent& GetInteraction();
|
||||
void Clean();
|
||||
std::vector< G4InteractionContent* > theInteractions;
|
||||
|
||||
private:
|
||||
G4FTFParticipants( const G4FTFParticipants& right );
|
||||
std::vector< G4InteractionContent* > theInteractions;
|
||||
G4int currentInteraction;
|
||||
};
|
||||
|
||||
|
||||
inline void G4FTFParticipants::StartLoop() {
|
||||
currentInteraction = -1;
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4FTFParticipants::Next() {
|
||||
return ++currentInteraction < static_cast< G4int >( theInteractions.size() );
|
||||
}
|
||||
|
||||
|
||||
inline G4InteractionContent& G4FTFParticipants::GetInteraction() {
|
||||
return *theInteractions[ currentInteraction ];
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ G4FTFModel::G4FTFModel( const G4String& modelName ) :
|
||||
theElastic( new G4ElasticHNScattering() ),
|
||||
theAnnihilation( new G4FTFAnnihilation() )
|
||||
{
|
||||
G4VPartonStringModel::SetThisPointer( this );
|
||||
// ---> JVY theParameters = 0;
|
||||
theParameters = new G4FTFParameters();
|
||||
//
|
||||
@@ -219,9 +218,9 @@ void G4FTFModel::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProj
|
||||
theParticipants.InitProjectileNucleus(
|
||||
std::abs( theProjectile.GetDefinition()->GetBaryonNumber() ),
|
||||
std::abs( G4int( theProjectile.GetDefinition()->GetPDGCharge() ) ) );
|
||||
theParticipants.theProjectileNucleus->StartLoop();
|
||||
theParticipants.GetProjectileNucleus()->StartLoop();
|
||||
G4Nucleon* aNucleon;
|
||||
while ( ( aNucleon = theParticipants.theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
|
||||
while ( ( aNucleon = theParticipants.GetProjectileNucleus()->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
|
||||
if ( aNucleon->GetDefinition() == G4Proton::Proton() ) {
|
||||
aNucleon->SetParticleType( G4AntiProton::AntiProton() );
|
||||
} else if ( aNucleon->GetDefinition() == G4Neutron::Neutron() ) {
|
||||
@@ -240,8 +239,8 @@ void G4FTFModel::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProj
|
||||
}
|
||||
|
||||
G4ThreeVector BoostVector = theProjectile.GetMomentum() / theProjectile.GetTotalEnergy();
|
||||
theParticipants.theProjectileNucleus->DoLorentzBoost( BoostVector );
|
||||
theParticipants.theProjectileNucleus->DoLorentzContraction( BoostVector );
|
||||
theParticipants.GetProjectileNucleus()->DoLorentzBoost( BoostVector );
|
||||
theParticipants.GetProjectileNucleus()->DoLorentzContraction( BoostVector );
|
||||
ProjectileResidualExcitationEnergy = 0.0;
|
||||
//G4double ProjectileResidualMass = theProjectile.GetMass();
|
||||
ProjectileResidual4Momentum.setVect( theProjectile.GetMomentum() );
|
||||
|
||||
+1
-13
@@ -60,22 +60,10 @@
|
||||
|
||||
G4FTFParticipants::G4FTFParticipants() : currentInteraction( -1 ) {}
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
G4FTFParticipants::G4FTFParticipants( const G4FTFParticipants& ) :
|
||||
G4VParticipants(), currentInteraction( -1 )
|
||||
{
|
||||
G4Exception( "G4FTFParticipants::G4FTFParticipants()", "HAD_FTF_001",
|
||||
FatalException, " Must not use copy ctor()" );
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
G4FTFParticipants::~G4FTFParticipants() {}
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
void G4FTFParticipants::GetList( const G4ReactionProduct& thePrimary,
|
||||
@@ -96,7 +84,7 @@ void G4FTFParticipants::GetList( const G4ReactionProduct& thePrimary,
|
||||
|
||||
G4double deltaxy = 2.0 * fermi; // Extra nuclear radius
|
||||
|
||||
if ( theProjectileNucleus == 0 ) { // Hadron-nucleus or anti-baryon-nucleus interactions
|
||||
if ( theProjectileNucleus == nullptr ) { // Hadron-nucleus or anti-baryon-nucleus interactions
|
||||
|
||||
G4double impactX( 0.0 ), impactY( 0.0 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user