Import Geant4 2.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.2.8.1 1999/12/07 20:51:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.3 1999/12/15 14:52:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronInelasticProcess.cc,v 1.1.8.1.2.1 1999/12/07 20:51:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
// Hadronic Inelastic Process Class
|
||||
// J.L. Chuma, TRIUMF, 24-Mar-1997
|
||||
@@ -21,6 +19,7 @@
|
||||
//
|
||||
|
||||
#include "G4HadronInelasticProcess.hh"
|
||||
#include "G4GenericIon.hh"
|
||||
|
||||
G4double G4HadronInelasticProcess::GetMeanFreePath(
|
||||
const G4Track &aTrack,
|
||||
@@ -28,7 +27,8 @@
|
||||
G4ForceCondition *condition )
|
||||
{
|
||||
const G4DynamicParticle *aParticle = aTrack.GetDynamicParticle();
|
||||
if( aParticle->GetDefinition() != theParticle )
|
||||
if( aParticle->GetDefinition() != theParticle &&
|
||||
theParticle != G4GenericIon::GenericIon())
|
||||
G4Exception( this->GetProcessName()+
|
||||
" called for "+
|
||||
aParticle->GetDefinition()->GetParticleName() );
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicInteraction.cc,v 1.1.10.1.2.1 1999/12/08 17:34:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4HadronicInteraction.cc,v 1.2 1999/12/15 14:52:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// Hadronic Interaction base class
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HadronicProcess.cc,v 1.7.2.1.2.5 1999/12/14 09:16:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
// $Id: G4HadronicProcess.cc,v 1.8 1999/12/15 14:52:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
// HPW to implement the choosing of an element for scattering.
|
||||
#include "g4std/fstream"
|
||||
|
||||
@@ -81,24 +81,27 @@
|
||||
{
|
||||
if( np+nm+nz == 0 )return;
|
||||
G4int i;
|
||||
G4ReactionProduct *p = new G4ReactionProduct [np+nm+nz];
|
||||
G4ReactionProduct *p;
|
||||
for( i=0; i<np; ++i )
|
||||
{
|
||||
p[i].SetDefinition( G4PionPlus::PionPlus() );
|
||||
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
|
||||
vec.SetElement( vecLen++, &p[i] );
|
||||
p = new G4ReactionProduct;
|
||||
p->SetDefinition( G4PionPlus::PionPlus() );
|
||||
(G4UniformRand() < 0.5) ? p->SetSide( -1 ) : p->SetSide( 1 );
|
||||
vec.SetElement( vecLen++, p );
|
||||
}
|
||||
for( i=np; i<np+nm; ++i )
|
||||
{
|
||||
p[i].SetDefinition( G4PionMinus::PionMinus() );
|
||||
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
|
||||
vec.SetElement( vecLen++, &p[i] );
|
||||
p = new G4ReactionProduct;
|
||||
p->SetDefinition( G4PionMinus::PionMinus() );
|
||||
(G4UniformRand() < 0.5) ? p->SetSide( -1 ) : p->SetSide( 1 );
|
||||
vec.SetElement( vecLen++, p );
|
||||
}
|
||||
for( i=np+nm; i<np+nm+nz; ++i )
|
||||
{
|
||||
p[i].SetDefinition( G4PionZero::PionZero() );
|
||||
(G4UniformRand() < 0.5) ? p[i].SetSide( -1 ) : p[i].SetSide( 1 );
|
||||
vec.SetElement( vecLen++, &p[i] );
|
||||
p = new G4ReactionProduct;
|
||||
p->SetDefinition( G4PionZero::PionZero() );
|
||||
(G4UniformRand() < 0.5) ? p->SetSide( -1 ) : p->SetSide( 1 );
|
||||
vec.SetElement( vecLen++, p );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,6 +361,7 @@
|
||||
p->SetDefinition( vec[i]->GetDefinition() );
|
||||
p->SetMomentum( vec[i]->GetMomentum() );
|
||||
theParticleChange.AddSecondary( p );
|
||||
delete vec[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user