Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -27,17 +27,20 @@
#include "G4ExcitedStringDecay.hh"
#include "G4KineticTrack.hh"
G4ExcitedStringDecay::G4ExcitedStringDecay()
{
theStringDecay=NULL;
}
G4ExcitedStringDecay::G4ExcitedStringDecay(G4VLongitudinalStringDecay * aStringDecay)
: theStringDecay(aStringDecay)
G4ExcitedStringDecay::G4ExcitedStringDecay() : G4VStringFragmentation(),
theStringDecay(0)
{}
G4ExcitedStringDecay::G4ExcitedStringDecay(const G4ExcitedStringDecay &) : G4VStringFragmentation()
G4ExcitedStringDecay::G4ExcitedStringDecay(G4VLongitudinalStringDecay * aStringDecay)
: G4VStringFragmentation(),
theStringDecay(aStringDecay)
{}
G4ExcitedStringDecay::G4ExcitedStringDecay(const G4ExcitedStringDecay &)
: G4VStringFragmentation(),
theStringDecay(0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay::copy ctor not accessible");
}
G4ExcitedStringDecay::~G4ExcitedStringDecay()
@@ -74,6 +77,8 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings
(const G4ExcitedStringVector * theStrings)
{
G4LorentzVector KTsum(0.,0.,0.,0.);
//G4cout<<"theStrings->size() "<<theStrings->size()<<G4endl;
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
{
KTsum+= theStrings->operator[](astring)->Get4Momentum();
@@ -89,22 +94,24 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings
G4int attempts(0);
G4bool success=false;
do {
//G4cout<<"Check of momentum at string fragmentations. New try."<<G4endl;
std::for_each(theResult->begin() , theResult->end() , DeleteKineticTrack());
theResult->clear();
attempts++;
//G4cout<<G4endl<<"attempts "<<attempts<<G4endl;
G4LorentzVector KTsecondaries(0.,0.,0.,0.);
G4bool NeedEnergyCorrector=false;
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
{
//G4cout<<G4endl<<"String No "<<astring+1<<" "<<theStrings->operator[](astring)->Get4Momentum().mag()<<G4endl;
//G4cout<<"String No "<<astring+1<<" "<<theStrings->operator[](astring)->Get4Momentum().mag2()<<" "<<theStrings->operator[](astring)->GetRightParton()->GetPDGcode()<<" "<<theStrings->operator[](astring)->GetLeftParton()->GetPDGcode()<<" "<<theStrings->operator[](astring)->Get4Momentum()<<G4endl;
//G4int Uzhi; G4cin >>Uzhi;
G4KineticTrackVector * generatedKineticTracks = NULL;
if ( theStrings->operator[](astring)->IsExcited() )
{
//G4cout<<"Fragment String"<<G4endl;
generatedKineticTracks=FragmentString(*theStrings->operator[](astring));
} else {
generatedKineticTracks = new G4KineticTrackVector;
@@ -120,7 +127,7 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings
G4LorentzVector KTsum1(0.,0.,0.,0.);
for ( unsigned int aTrack=0; aTrack<generatedKineticTracks->size();aTrack++)
{
//G4cout<<" Prod part "<<(*generatedKineticTracks)[aTrack]->GetDefinition()->GetParticleName()<<" "<<(*generatedKineticTracks)[aTrack]->Get4Momentum()<<G4endl;
//G4cout<<"Prod part "<<(*generatedKineticTracks)[aTrack]->GetDefinition()->GetParticleName()<<" "<<(*generatedKineticTracks)[aTrack]->Get4Momentum()<<G4endl;
theResult->push_back(generatedKineticTracks->operator[](aTrack));
KTsum1+= (*generatedKineticTracks)[aTrack]->Get4Momentum();
}
@@ -139,9 +146,11 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings
//--DEBUG G4cout << "Strings/secs total 4 momentum " << KTsum << " " <<KTsecondaries << G4endl;
success=true;
//G4cout<<"success "<<success<<G4endl;
if ( NeedEnergyCorrector ) success=EnergyAndMomentumCorrector(theResult, KTsum);
} while(!success && (attempts < 100));
//G4cout<<"success after Ecorr "<<success<<G4endl;
} while(!success && (attempts < 10)); // It was 100 !!! Uzhi
//G4cout<<"End frag string"<<G4endl;
#ifdef debug_ExcitedStringDecay
G4LorentzVector KTsum1=0;