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
@@ -5,14 +5,15 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4ExcitedStringDecay.hh,v 1.2 1999/12/15 14:52:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4ExcitedStringDecay.hh,v 1.6 2000/11/10 08:30:07 hpw Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
#ifndef G4ExcitedStringDecay_h
#define G4ExcitedStringDecay_h 1
#include "globals.hh"
#include "G4VStringFragmentation.hh"
#include "G4ExcitedString.hh"
#include "G4ExcitedStringVector.hh"
#include "G4KineticTrackVector.hh"
#include "G4LundStringFragmentation.hh"
@@ -30,17 +31,20 @@ class G4ExcitedStringDecay: public G4VStringFragmentation
int operator!=(const G4ExcitedStringDecay &right) const;
public:
// virtual G4ReactionProductVector * FragmentString(const G4ExcitedString &theString)=0;
virtual G4KineticTrackVector * FragmentString(const G4ExcitedString &theString);
virtual G4KineticTrackVector * FragmentStrings(const G4ExcitedStringVector * theStrings);
private:
G4KineticTrackVector * FragmentString(const G4ExcitedString &theString);
G4bool EnergyAndMomentumCorrector(G4KineticTrackVector* Output, G4LorentzVector& TotalCollisionMom);
G4VLongitudinalStringDecay * theStringDecay;
};
inline
G4KineticTrackVector *G4ExcitedStringDecay::FragmentString(const G4ExcitedString &theString)
G4KineticTrackVector *G4ExcitedStringDecay::
FragmentString(const G4ExcitedString &theString)
{
if ( theStringDecay == NULL )
theStringDecay=new G4LundStringFragmentation();
@@ -48,6 +52,56 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentString(const G4ExcitedString
return theStringDecay->FragmentString(theString);
}
inline
G4KineticTrackVector *G4ExcitedStringDecay::
FragmentStrings(const G4ExcitedStringVector * theStrings)
{
G4KineticTrackVector * theResult = new G4KineticTrackVector;
G4LorentzVector KTsum;
G4bool NeedEnergyCorrector=false;
for ( G4int astring=0; astring < theStrings->entries(); astring++)
{
KTsum+= theStrings->at(astring)->Get4Momentum();
G4KineticTrackVector * generatedKineticTracks = NULL;
if ( theStrings->at(astring)->IsExcited() )
{
generatedKineticTracks=FragmentString(*theStrings->at(astring));
} else {
generatedKineticTracks = new G4KineticTrackVector;
generatedKineticTracks->insert(theStrings->at(astring)->GetKineticTrack());
}
if (generatedKineticTracks == NULL)
{
G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl;
continue;
}
G4LorentzVector KTsum1;
for ( G4int aTrack=0; aTrack<generatedKineticTracks->entries();aTrack++)
{
theResult->insert(generatedKineticTracks->at(aTrack));
KTsum1+= (*generatedKineticTracks)[aTrack]->Get4Momentum();
}
if ( abs((KTsum1.e()-theStrings->at(astring)->Get4Momentum().e()) / KTsum1.e()) > perMillion )
{
NeedEnergyCorrector=true;
}
// clean up
delete generatedKineticTracks;
}
// G4cout << "String total energy and 4 momentum" <<KTsum.t()<<" "<< KTsum << endl;
if ( NeedEnergyCorrector ) EnergyAndMomentumCorrector(theResult, KTsum);
return theResult;
}
#endif
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4LundStringFragmentation.hh,v 1.2 1999/12/15 14:52:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $ Maxim Komogorov
// GEANT4 tag $Name: geant4-03-00 $ Maxim Komogorov
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4QGSMFragmentation.hh,v 1.3 1999/12/15 14:52:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -6,7 +6,7 @@
// and all its terms.
//
// $Id: G4VKinkyStringDecay.hh,v 1.2 1999/12/15 14:52:47 gunter Exp $
// GEANT4 tag $Name: geant4-02-00 $
// GEANT4 tag $Name: geant4-03-00 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
@@ -5,8 +5,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VLongitudinalStringDecay.hh,v 1.6 1999/12/15 17:51:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4VLongitudinalStringDecay.hh,v 1.7 2000/08/02 08:14:13 hpw Exp $
// GEANT4 tag $Name: geant4-03-00 $
// Maxim Komogorov
//
// -----------------------------------------------------------------------------
@@ -25,7 +25,7 @@
//**********************************************************************************************
class G4VLongitudinalStringDecay: public G4VStringFragmentation
class G4VLongitudinalStringDecay
{
public:
G4VLongitudinalStringDecay();