Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiLambdaInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiNeutronInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiProtonInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiXiMinusInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEAntiXiZeroInelastic.cc,v 1.3 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HEInelastic.cc,v 1.4 1999/12/15 14:52:55 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4HEInelastic.cc,v 1.5 2000/07/09 09:48:35 hpw Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -23,7 +23,7 @@
// Last modified: 29-July-1998
// HPW, fixed bug in getting pdgencoding for nuclei
// Hisaya, fixed HighEnergyCascading
// Fesefeldt, fixed bug in TuningOfHighEnergyCascading, 23 June 2000
#include "G4HEInelastic.hh"
#include "G4HEVector.hh"
#include "G4ParticleDefinition.hh"
@@ -1885,7 +1885,7 @@ G4HEInelastic::TuningOfHighEnergyCascading( G4HEVector pv[],
pvmx[4].Print(4);
}
G4int ledpar = 0;
G4int ledpar = -1;
G4double redpar = 0.;
G4double gespar = 0.;
G4int incidentS = incidentParticle.getQuarkContent( 3 )
@@ -1974,27 +1974,48 @@ G4HEInelastic::TuningOfHighEnergyCascading( G4HEVector pv[],
pvmx[8].Add3(pvmx[8], pv[i] );
}
if (ledpar > 0)
if (ledpar >= 0)
{
if(verboseLevel > 1)
{
if(verboseLevel > 1)
{
G4cout << " Leading Particle found : " << ledpar << G4endl;
pv[ledpar].Print(ledpar);
}
pvmx[4].Sub3(pvmx[8], pvmx[9] );
G4double ptled = pv[ledpar].Length() * sqrt(1. - sqr(pvmx[9].CosAng( pv[ledpar] )));
pv[ledpar].Sub3( pv[ledpar], pvmx[4] );
pvmx[5].Smul( pvmx[9], pv[ledpar].Length()*pvmx[9].CosAng(pv[ledpar])/pvmx[9].Length());
pvmx[6].Cross( pvmx[9], pv[ledpar]);
pvmx[6].Cross( pvmx[6], pvmx[9]);
pvmx[6].Smul( pvmx[6], ptled/pvmx[6].Length());
pv[ledpar].Add3( pvmx[5], pvmx[6] );
pv[ledpar].setMassAndUpdate( pv[ledpar].getMass());
pvmx[8].Print(-2);
incidentParticle.Print(-1);
}
pvmx[4].Sub3(incidentParticle,pvmx[8]);
pvmx[5].Smul(incidentParticle, incidentParticle.CosAng(pvmx[4])
*pvmx[4].Length()/incidentParticle.Length());
pv[ledpar].Add3(pv[ledpar],pvmx[5]);
pv[ledpar].SmulAndUpdate( pv[ledpar], 1.);
if(verboseLevel > 1)
{
{
pv[ledpar].Print(ledpar);
}
}
}
if(conserveEnergy)
{
G4double ekinhf = 0.;
for(i=0; i<vecLen; i++)
{
ekinhf += pv[i].getKineticEnergy();
if(pv[i].getMass() < 0.7) ekinhf += pv[i].getMass();
}
if(incidentParticle.getMass() < 0.7) ekinhf -= incidentParticle.getMass();
if(ledpar < 0)
{
ekinhf = incidentParticle.getKineticEnergy()/ekinhf;
for(i=0; i<vecLen; i++) pv[i].setKineticEnergyAndUpdate(ekinhf*pv[i].getKineticEnergy());
}
else
{
ekinhf = incidentParticle.getKineticEnergy() - ekinhf;
ekinhf += pv[ledpar].getKineticEnergy();
if(ekinhf < 0.) ekinhf = 0.;
pv[ledpar].setKineticEnergyAndUpdate(ekinhf);
}
}
delete [] reddec;
delete [] pvmx;
return;
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEKaonMinusInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEKaonPlusInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEKaonZeroInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEKaonZeroLongInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEKaonZeroShortInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HELambdaInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HENeutronInelastic.cc,v 1.3 1999/12/15 14:52:56 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEOmegaMinusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPionMinusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPionPlusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEPlot.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEProtonInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HESigmaMinusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HESigmaPlusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HESigmaZeroInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4HEVector.cc,v 1.4 1999/12/15 16:42:01 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4HEVector.cc,v 1.5 2000/08/09 07:24:21 hpw Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -558,7 +558,11 @@ G4HEVector::CosAng( const G4HEVector & p )
if( a != 0.0 )
{
a = (px*p.px + py*p.py + pz*p.pz)/a;
if( fabs(a) > 1.0 ) a<0.0 ? a=-1.0 : a=1.0;
if( fabs(a) > 1.0 )
{
if(a<0.0) a=-1.0;
else a=1.0;
}
}
return a;
}
@@ -570,7 +574,11 @@ G4HEVector::Ang(const G4HEVector & p )
if( a != 0.0 )
{
a = (px*p.px + py*p.py + pz*p.pz)/a;
if( fabs(a) > 1.0 ) a<0.0 ? a=-1.0 : a=1.0;
if( fabs(a) > 1.0 )
{
if(a<0.0) a=-1.0;
else a=1.0;
}
}
return acos(a);
}
@@ -692,14 +700,15 @@ G4HEVector::Exch( G4HEVector & p1)
void
G4HEVector::Defs1( const G4HEVector & p1, const G4HEVector & p2)
{
G4double pt2 = p1.px*p1.px + p1.py*p1.py;
G4double pt2 = p2.px*p2.px + p2.py*p2.py;
if (pt2 > 0.0)
{
G4double ph, qx, qy, qz;
G4double a = sqrt(p2.px*p2.px + p2.py*p2.py + p2.pz*p2.pz);
G4double cost = p2.pz/a;
G4double sint = 0.5 * (sqrt(fabs((1.-cost)*(1.+cost))) + sqrt(pt2)/a);
(p2.py < 0.) ? ph = 1.5*M_PI : ph = 0.5*M_PI;
if(p2.py < 0.) ph = 1.5*M_PI;
else ph = 0.5*M_PI;
if( p2.px != 0.0)
ph = atan2(p2.py,p2.px);
qx = cost*cos(ph)*p1.px - sin(ph)*p1.py
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEXiMinusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4HEXiZeroInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
//