Import Geant4 10.4.0 source tree
This commit is contained in:
+115
-113
@@ -28,6 +28,7 @@
|
||||
#include "G4ExcitedStringDecay.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4KineticTrack.hh"
|
||||
#include "G4SampleResonance.hh" //AR-Oct2017
|
||||
|
||||
//#define debug_G4ExcitedStringDecay
|
||||
//#define debug_G4ExcitedStringCorr
|
||||
@@ -69,62 +70,61 @@ int G4ExcitedStringDecay::operator!=(const G4ExcitedStringDecay &) const
|
||||
|
||||
G4KineticTrackVector *G4ExcitedStringDecay::FragmentString(const G4ExcitedString &theString)
|
||||
{
|
||||
if ( theStringDecay == NULL ) theStringDecay=new G4LundStringFragmentation();
|
||||
return theStringDecay->FragmentString(theString);
|
||||
if ( theStringDecay == NULL ) theStringDecay=new G4LundStringFragmentation();
|
||||
return theStringDecay->FragmentString(theString);
|
||||
}
|
||||
|
||||
G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStringVector * theStrings)
|
||||
{
|
||||
G4LorentzVector KTsum(0.,0.,0.,0.);
|
||||
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<G4endl;
|
||||
G4cout<<"--------------------------- G4ExcitedStringDecay ----------------------"<<G4endl;
|
||||
G4cout<<"Hadronization of Excited Strings: theStrings->size() "<<theStrings->size()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
|
||||
// for ( unsigned int astring=0; astring < 1; astring++)
|
||||
{
|
||||
if ( theStrings->operator[](astring)->IsExcited() )
|
||||
{KTsum+= theStrings->operator[](astring)->Get4Momentum();}
|
||||
else {KTsum+=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();}
|
||||
if ( theStrings->operator[](astring)->IsExcited() ) {
|
||||
KTsum+= theStrings->operator[](astring)->Get4Momentum();
|
||||
} else {
|
||||
KTsum+=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
}
|
||||
}
|
||||
|
||||
G4LorentzRotation toCms( -1 * KTsum.boostVector() );
|
||||
G4LorentzRotation toLab(toCms.inverse());
|
||||
G4LorentzVector Ptmp;
|
||||
KTsum=G4LorentzVector(0.,0.,0.,0.);
|
||||
|
||||
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
|
||||
// for ( unsigned int astring=0; astring < 1; astring++)
|
||||
{
|
||||
if ( theStrings->operator[](astring)->IsExcited() )
|
||||
{
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetLeftParton()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetLeftParton()->Set4Momentum(Ptmp);
|
||||
if ( theStrings->operator[](astring)->IsExcited() ) {
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetLeftParton()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetLeftParton()->Set4Momentum(Ptmp);
|
||||
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetRightParton()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetRightParton()->Set4Momentum(Ptmp);
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetRightParton()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetRightParton()->Set4Momentum(Ptmp);
|
||||
|
||||
KTsum+= theStrings->operator[](astring)->Get4Momentum();
|
||||
}
|
||||
else
|
||||
{
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetKineticTrack()->Set4Momentum(Ptmp);
|
||||
KTsum+= theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
}
|
||||
KTsum+= theStrings->operator[](astring)->Get4Momentum();
|
||||
} else {
|
||||
Ptmp=toCms * theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
theStrings->operator[](astring)->GetKineticTrack()->Set4Momentum(Ptmp);
|
||||
KTsum+= theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
}
|
||||
}
|
||||
|
||||
G4SampleResonance BrW; //AR-Oct2017
|
||||
const G4ParticleDefinition* TrackDefinition = 0; //AR-Oct2017
|
||||
|
||||
G4KineticTrackVector * theResult = new G4KineticTrackVector;
|
||||
G4int attempts(0);
|
||||
G4bool success=false;
|
||||
G4bool NeedEnergyCorrector=false;
|
||||
do {
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"New try No "<<attempts<<" to hadronize strings"<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
std::for_each(theResult->begin() , theResult->end() , DeleteKineticTrack());
|
||||
theResult->clear();
|
||||
@@ -135,33 +135,31 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
|
||||
NeedEnergyCorrector=false;
|
||||
|
||||
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
|
||||
// for ( unsigned int astring=0; astring < 1; astring++) // Uzhi
|
||||
{
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"String No "<<astring+1<<" Excited? "<<theStrings->operator[](astring)->IsExcited()<<G4endl;
|
||||
|
||||
G4cout<<"String No "<<astring+1<<" 4Momentum "<<theStrings->operator[](astring)->Get4Momentum()
|
||||
<<" "<<theStrings->operator[](astring)->Get4Momentum().mag()<<G4endl;
|
||||
#endif
|
||||
<<" "<<theStrings->operator[](astring)->Get4Momentum().mag()<<G4endl;
|
||||
#endif
|
||||
|
||||
G4KineticTrackVector * generatedKineticTracks = NULL;
|
||||
if ( theStrings->operator[](astring)->IsExcited() )
|
||||
{
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"Fragment String with partons: "
|
||||
<<theStrings->operator[](astring)->GetLeftParton()->GetPDGcode() <<" "
|
||||
<<theStrings->operator[](astring)->GetRightParton()->GetPDGcode()<<" "
|
||||
<<"Direction "<<theStrings->operator[](astring)->GetDirection()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
generatedKineticTracks=FragmentString(*theStrings->operator[](astring));
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"(G4ExcitedStringDecay) Number of produced hadrons = "
|
||||
<<generatedKineticTracks->size()<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"(G4ExcitedStringDecay) Number of produced hadrons = "<<generatedKineticTracks->size()<<G4endl;
|
||||
#endif
|
||||
} else {
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<" GetTrack from the String"<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<" GetTrack from the String"<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector Mom=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
G4KineticTrack * aTrack= new G4KineticTrack(
|
||||
theStrings->operator[](astring)->GetKineticTrack()->GetDefinition(),
|
||||
@@ -170,65 +168,85 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
|
||||
|
||||
aTrack->SetPosition(theStrings->operator[](astring)->GetKineticTrack()->GetPosition());
|
||||
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<" A particle stored in the track is "<<aTrack->GetDefinition()->GetParticleName()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
generatedKineticTracks = new G4KineticTrackVector;
|
||||
generatedKineticTracks->push_back(aTrack);
|
||||
}
|
||||
|
||||
//if (generatedKineticTracks == NULL)
|
||||
if (generatedKineticTracks->size() == 0)
|
||||
{
|
||||
// G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl;
|
||||
// continue;
|
||||
success=false; NeedEnergyCorrector=false; break;
|
||||
//G4cerr << "G4VPartonStringModel:No KineticTracks produced" << G4endl;
|
||||
//continue;
|
||||
success=false; NeedEnergyCorrector=false; break;
|
||||
}
|
||||
|
||||
G4LorentzVector KTsum1(0.,0.,0.,0.);
|
||||
for ( unsigned int aTrack=0; aTrack<generatedKineticTracks->size();aTrack++)
|
||||
{
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"Prod part No. "<<aTrack+1<<" "
|
||||
<<(*generatedKineticTracks)[aTrack]->GetDefinition()->GetParticleName()<<" "
|
||||
<<(*generatedKineticTracks)[aTrack]->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Sampling mass of unstable hadronic resonances, AR-Oct2017
|
||||
TrackDefinition = (*generatedKineticTracks)[aTrack]->GetDefinition();
|
||||
if ( TrackDefinition->IsShortLived() ) {
|
||||
G4double NewTrackMass = BrW.SampleMass( TrackDefinition, TrackDefinition->GetPDGMass() + 5.0*TrackDefinition->GetPDGWidth() );
|
||||
G4LorentzVector Tmp = G4LorentzVector( (*generatedKineticTracks)[aTrack]->Get4Momentum() );
|
||||
Tmp.setE( std::sqrt( sqr(NewTrackMass) + Tmp.vect().mag2() ) );
|
||||
(*generatedKineticTracks)[aTrack]->Set4Momentum(Tmp);
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"Resonance *** "<<aTrack+1<<" "
|
||||
<<(*generatedKineticTracks)[aTrack]->GetDefinition()->GetParticleName()<<" "
|
||||
<<(*generatedKineticTracks)[aTrack]->Get4Momentum()
|
||||
<<(*generatedKineticTracks)[aTrack]->Get4Momentum().mag()<<G4endl;
|
||||
#endif
|
||||
}
|
||||
//--- End AR-Oct2017
|
||||
|
||||
theResult->push_back(generatedKineticTracks->operator[](aTrack));
|
||||
KTsum1+= (*generatedKineticTracks)[aTrack]->Get4Momentum();
|
||||
}
|
||||
KTsecondaries+=KTsum1;
|
||||
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout << "String secondaries(" <<generatedKineticTracks->size()<< ")"<<G4endl
|
||||
<<"Init string momentum: "<< theStrings->operator[](astring)->Get4Momentum()<<G4endl
|
||||
<<"Final hadrons momentum: "<< KTsum1 << G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ( KTsum1.e() > 0 && std::abs((KTsum1.e()-theStrings->operator[](astring)->Get4Momentum().e()) / KTsum1.e()) > perMillion )
|
||||
{
|
||||
NeedEnergyCorrector=true;
|
||||
}
|
||||
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"NeedEnergyCorrection yes/no "<<NeedEnergyCorrector<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// clean up
|
||||
// clean up
|
||||
delete generatedKineticTracks;
|
||||
success=true;
|
||||
success=true;
|
||||
}
|
||||
|
||||
//success=true;
|
||||
|
||||
if ( NeedEnergyCorrector ) success=EnergyAndMomentumCorrector(theResult, KTsum);
|
||||
} while(!success && (attempts < 100)); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
|
||||
for ( unsigned int aTrack=0; aTrack<theResult->size();aTrack++)
|
||||
{
|
||||
Ptmp=(*theResult)[aTrack]->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
(*theResult)[aTrack]->Set4Momentum(Ptmp);
|
||||
Ptmp=(*theResult)[aTrack]->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
(*theResult)[aTrack]->Set4Momentum(Ptmp);
|
||||
}
|
||||
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
#ifdef debug_G4ExcitedStringDecay
|
||||
G4cout<<"End of the strings fragmentation (G4ExcitedStringDecay)"<<G4endl;
|
||||
|
||||
G4LorentzVector KTsum1(0.,0.,0.,0.);
|
||||
@@ -236,8 +254,8 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
|
||||
for ( unsigned int aTrack=0; aTrack<theResult->size();aTrack++)
|
||||
{
|
||||
G4cout << " corrected tracks .. " << (*theResult)[aTrack]->GetDefinition()->GetParticleName()
|
||||
<<" " << (*theResult)[aTrack]->Get4Momentum()
|
||||
<<" " << (*theResult)[aTrack]->Get4Momentum().mag()<< G4endl;
|
||||
<<" " << (*theResult)[aTrack]->Get4Momentum()
|
||||
<<" " << (*theResult)[aTrack]->Get4Momentum().mag()<< G4endl;
|
||||
KTsum1+= (*theResult)[aTrack]->Get4Momentum();
|
||||
}
|
||||
|
||||
@@ -246,42 +264,31 @@ G4KineticTrackVector *G4ExcitedStringDecay::FragmentStrings(const G4ExcitedStrin
|
||||
if ( ! success ) G4cout << "failed to correct E/p" << G4endl;
|
||||
|
||||
G4cout<<"End of the Hadronization (G4ExcitedStringDecay)"<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(!success) // Uzhi 28 June 2016
|
||||
{ // Uzhi 28 June 2016
|
||||
if(theResult->size() != 0) // Uzhi 7 Sept. 2016 it was theResult != 0
|
||||
{std::for_each(theResult->begin() , theResult->end() , DeleteKineticTrack()); // Uzhi 28 June 2016
|
||||
theResult->clear(); // Uzhi 28 June 2016
|
||||
delete theResult; theResult=0; // Uzhi 28 June 2016
|
||||
}
|
||||
for ( unsigned int astring=0; astring < theStrings->size(); astring++) // Uzhi 28 June 2016
|
||||
// for ( unsigned int astring=0; astring < 1; astring++) // Uzhi 24 Oct. 2014 Uzhi 2016 Need more correct
|
||||
for ( unsigned int astring=0; astring < theStrings->size(); astring++)
|
||||
{
|
||||
if ( theStrings->operator[](astring)->IsExcited() )
|
||||
{
|
||||
Ptmp=theStrings->operator[](astring)->GetLeftParton()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetLeftParton()->Set4Momentum(Ptmp);
|
||||
if ( theStrings->operator[](astring)->IsExcited() ) {
|
||||
Ptmp=theStrings->operator[](astring)->GetLeftParton()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetLeftParton()->Set4Momentum(Ptmp);
|
||||
|
||||
Ptmp=theStrings->operator[](astring)->GetRightParton()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetRightParton()->Set4Momentum(Ptmp);
|
||||
} else {
|
||||
Ptmp=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetKineticTrack()->Set4Momentum(Ptmp);
|
||||
}
|
||||
}
|
||||
|
||||
Ptmp=theStrings->operator[](astring)->GetRightParton()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetRightParton()->Set4Momentum(Ptmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
Ptmp=theStrings->operator[](astring)->GetKineticTrack()->Get4Momentum();
|
||||
Ptmp.transform( toLab);
|
||||
theStrings->operator[](astring)->GetKineticTrack()->Set4Momentum(Ptmp);
|
||||
}
|
||||
} // Uzhi 24 Oct. 2014
|
||||
} // Uzhi 28 June 2016
|
||||
return theResult;
|
||||
}
|
||||
|
||||
G4bool G4ExcitedStringDecay::EnergyAndMomentumCorrector
|
||||
(G4KineticTrackVector* Output, G4LorentzVector& TotalCollisionMom)
|
||||
{
|
||||
{
|
||||
const int nAttemptScale = 500;
|
||||
const double ErrLimit = 1.E-5;
|
||||
if (Output->empty()) return TRUE;
|
||||
@@ -289,25 +296,22 @@ G4bool G4ExcitedStringDecay::EnergyAndMomentumCorrector
|
||||
G4double SumMass = 0;
|
||||
G4double TotalCollisionMass = TotalCollisionMom.m();
|
||||
|
||||
std::vector<G4double> HadronMass; G4double HadronM(0.); // Uzhi 8 Sept. 2016
|
||||
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
G4cout<<G4endl<<"EnergyAndMomentumCorrector. Number of particles: "<<Output->size()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
// Calculate sum hadron 4-momenta and summing hadron mass
|
||||
unsigned int cHadron;
|
||||
for(cHadron = 0; cHadron < Output->size(); cHadron++)
|
||||
{
|
||||
SumMom += Output->operator[](cHadron)->Get4Momentum();
|
||||
HadronM=Output->operator[](cHadron)->Get4Momentum().mag(); HadronMass.push_back(HadronM); // Uzhi 8 Sept. 2016
|
||||
SumMass += Output->operator[](cHadron)->Get4Momentum().mag(); //GetDefinition()->GetPDGMass();
|
||||
SumMass += Output->operator[](cHadron)->GetDefinition()->GetPDGMass();
|
||||
}
|
||||
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
G4cout<<"Sum part mom "<<SumMom<<" "<<SumMom.mag()<<G4endl
|
||||
<<"Sum str mom "<<TotalCollisionMom<<" "<<TotalCollisionMom.mag()<<G4endl;
|
||||
G4cout<<"SumMass TotalCollisionMass "<<SumMass<<" "<<TotalCollisionMass<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
G4cout<<"Sum part mom "<<SumMom<<" "<<SumMom.mag()<<G4endl
|
||||
<<"Sum str mom "<<TotalCollisionMom<<" "<<TotalCollisionMom.mag()<<G4endl;
|
||||
G4cout<<"SumMass TotalCollisionMass "<<SumMass<<" "<<TotalCollisionMass<<G4endl;
|
||||
#endif
|
||||
|
||||
// Cannot correct a single particle
|
||||
if (Output->size() < 2) return FALSE;
|
||||
@@ -317,9 +321,9 @@ G4bool G4ExcitedStringDecay::EnergyAndMomentumCorrector
|
||||
if (SumMass < 0) return FALSE;
|
||||
SumMass = std::sqrt(SumMass);
|
||||
|
||||
// Compute c.m.s. hadron velocity and boost KTV to hadron c.m.s.
|
||||
// G4ThreeVector Beta = -SumMom.boostVector();
|
||||
G4ThreeVector Beta = -TotalCollisionMom.boostVector();
|
||||
// Compute c.m.s. hadron velocity and boost KTV to hadron c.m.s.
|
||||
//G4ThreeVector Beta = -SumMom.boostVector();
|
||||
G4ThreeVector Beta = -TotalCollisionMom.boostVector();
|
||||
Output->Boost(Beta);
|
||||
|
||||
// Scale total c.m.s. hadron energy (hadron system mass).
|
||||
@@ -333,30 +337,27 @@ G4bool G4ExcitedStringDecay::EnergyAndMomentumCorrector
|
||||
Sum = 0;
|
||||
for(cHadron = 0; cHadron < Output->size(); cHadron++)
|
||||
{
|
||||
HadronM = HadronMass.at(cHadron); // Uzhi 8 Sept. 2016
|
||||
G4LorentzVector HadronMom = Output->operator[](cHadron)->Get4Momentum();
|
||||
HadronMom.setVect(Scale*HadronMom.vect());
|
||||
G4double E = std::sqrt(HadronMom.vect().mag2() + sqr(HadronM)); // Uzhi 8 Sept. 2016
|
||||
//sqr(Output->operator[](cHadron)->GetDefinition()->GetPDGMass()));
|
||||
G4double E = std::sqrt(HadronMom.vect().mag2() + sqr(Output->operator[](cHadron)->GetDefinition()->GetPDGMass()));
|
||||
HadronMom.setE(E);
|
||||
Output->operator[](cHadron)->Set4Momentum(HadronMom);
|
||||
Sum += E;
|
||||
}
|
||||
Scale = TotalCollisionMass/Sum;
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
G4cout << "Scale-1=" << Scale -1
|
||||
<< ", TotalCollisionMass=" << TotalCollisionMass
|
||||
<< ", Sum=" << Sum
|
||||
<< G4endl;
|
||||
#endif
|
||||
<< ", TotalCollisionMass=" << TotalCollisionMass
|
||||
<< ", Sum=" << Sum
|
||||
<< G4endl;
|
||||
#endif
|
||||
if (std::fabs(Scale - 1) <= ErrLimit)
|
||||
{
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
#ifdef debug_G4ExcitedStringCorr
|
||||
if(!success)
|
||||
{
|
||||
G4cout << "G4ExcitedStringDecay::EnergyAndMomentumCorrector - Warning"<<G4endl;
|
||||
@@ -364,12 +365,13 @@ G4bool G4ExcitedStringDecay::EnergyAndMomentumCorrector
|
||||
G4cout << " Number of secondaries: " << Output->size() << G4endl;
|
||||
G4cout << " Wanted total energy: " << TotalCollisionMom.e() << G4endl;
|
||||
G4cout << " Increase number of attempts or increase ERRLIMIT"<<G4endl;
|
||||
// throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay failed to correct...");
|
||||
//throw G4HadronicException(__FILE__, __LINE__, "G4ExcitedStringDecay failed to correct...");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// Compute c.m.s. interaction velocity and KTV back boost
|
||||
Beta = TotalCollisionMom.boostVector();
|
||||
Output->Boost(Beta);
|
||||
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+32
-86
@@ -41,8 +41,6 @@
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
G4FragmentingString::G4FragmentingString(const G4FragmentingString &old)
|
||||
{
|
||||
LeftParton=old.LeftParton;
|
||||
@@ -54,29 +52,23 @@ G4FragmentingString::G4FragmentingString(const G4FragmentingString &old)
|
||||
theStableParton=old.theStableParton;
|
||||
theDecayParton=old.theDecayParton;
|
||||
decaying=old.decaying;
|
||||
Pstring=old.Pstring;
|
||||
Pleft =old.Pleft;
|
||||
Pright =old.Pright;
|
||||
}
|
||||
|
||||
G4FragmentingString & G4FragmentingString::operator =(const G4FragmentingString &old)
|
||||
{
|
||||
if (this != &old)
|
||||
{
|
||||
LeftParton=old.LeftParton;
|
||||
RightParton=old.RightParton;
|
||||
Ptleft=old.Ptleft;
|
||||
Ptright=old.Ptright;
|
||||
Pplus=old.Pplus;
|
||||
Pminus=old.Pminus;
|
||||
theStableParton=old.theStableParton;
|
||||
theDecayParton=old.theDecayParton;
|
||||
decaying=old.decaying;
|
||||
Pstring=old.Pstring;
|
||||
Pleft =old.Pleft;
|
||||
Pright =old.Pright;
|
||||
}
|
||||
return *this;
|
||||
if (this != &old)
|
||||
{
|
||||
LeftParton=old.LeftParton;
|
||||
RightParton=old.RightParton;
|
||||
Ptleft=old.Ptleft;
|
||||
Ptright=old.Ptright;
|
||||
Pplus=old.Pplus;
|
||||
Pminus=old.Pminus;
|
||||
theStableParton=old.theStableParton;
|
||||
theDecayParton=old.theDecayParton;
|
||||
decaying=old.decaying;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
@@ -94,13 +86,9 @@ G4FragmentingString::G4FragmentingString(const G4ExcitedString &excited)
|
||||
Pminus=P.e() - P.pz();
|
||||
theStableParton=0;
|
||||
theDecayParton=0;
|
||||
|
||||
//decaying=None;
|
||||
if(excited.GetDirection() > 0) {decaying=Left; }
|
||||
else {decaying=Right;}
|
||||
|
||||
Pleft = excited.GetLeftParton()->Get4Momentum();
|
||||
Pright = excited.GetRightParton()->Get4Momentum();
|
||||
Pstring= Pleft + Pright;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
@@ -110,65 +98,38 @@ G4FragmentingString::G4FragmentingString(const G4FragmentingString &old,
|
||||
const G4LorentzVector *momentum)
|
||||
{
|
||||
decaying=None;
|
||||
G4LorentzVector Momentum = G4LorentzVector(momentum->vect(),momentum->e());
|
||||
// Momentum of produced hadron
|
||||
//G4cout<<"Had Mom "<<Momentum<<G4endl;
|
||||
//G4cout<<"Str Mom "<<old.Pstring<<G4endl;
|
||||
Pstring = old.Pstring - Momentum;
|
||||
//G4cout<<"New Str Mom "<<Pstring<<" "<<Pstring.mag()<<G4endl;
|
||||
|
||||
G4double StringMass = Pstring.mag();
|
||||
|
||||
G4LorentzRotation toLAB(Pstring.boostVector());
|
||||
|
||||
Pleft = toLAB*G4LorentzVector(0.,0., StringMass/2.,StringMass/2.);
|
||||
Pright = toLAB*G4LorentzVector(0.,0.,-StringMass/2.,StringMass/2.);
|
||||
|
||||
Ptleft =Pleft.vect(); Ptleft.setZ(0.);
|
||||
Ptright=Pright.vect(); Ptright.setZ(0.);
|
||||
|
||||
//G4cout<<"Pleft "<<Pleft<<G4endl;
|
||||
//G4cout<<"Pright "<<Pright<<G4endl;
|
||||
//G4cout<<"Pstring "<<Pstring<<G4endl;
|
||||
if ( old.decaying == Left )
|
||||
{
|
||||
RightParton= old.RightParton;
|
||||
// Ptright = old.Ptright;
|
||||
//Pright = old.Pright;
|
||||
|
||||
Ptright = old.Ptright;
|
||||
LeftParton = newdecay;
|
||||
// Ptleft = old.Ptleft - momentum->vect();
|
||||
// Ptleft.setZ(0.);
|
||||
//Pleft = old.Pleft - Momentum;
|
||||
//Pstring=Pleft + Pright;
|
||||
|
||||
Ptleft = old.Ptleft - momentum->vect();
|
||||
Ptleft.setZ(0.);
|
||||
theDecayParton=GetLeftParton();
|
||||
theStableParton=GetRightParton();
|
||||
decaying=Left;
|
||||
} else if ( old.decaying == Right )
|
||||
{
|
||||
RightParton = newdecay;
|
||||
// Ptright = old.Ptright - momentum->vect();
|
||||
// Ptright.setZ(0.);
|
||||
//Pright = old.Pright + Momentum;
|
||||
|
||||
Ptright = old.Ptright - momentum->vect();
|
||||
Ptright.setZ(0.);
|
||||
LeftParton = old.LeftParton;
|
||||
// Ptleft = old.Ptleft;
|
||||
//Pleft = old.Pleft;
|
||||
//Pstring=Pleft + Pright;
|
||||
|
||||
Ptleft = old.Ptleft;
|
||||
theDecayParton=GetRightParton();
|
||||
theStableParton=GetLeftParton();
|
||||
decaying=Right;
|
||||
} else
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4FragmentingString::G4FragmentingString: no decay Direction defined");
|
||||
}
|
||||
Pplus = Pstring.plus(); //old.Pplus - (momentum->e() + momentum->pz());
|
||||
Pminus = Pstring.minus();//old.Pminus - (momentum->e() - momentum->pz());
|
||||
Pplus = old.Pplus - (momentum->e() + momentum->pz());
|
||||
Pminus = old.Pminus - (momentum->e() - momentum->pz());
|
||||
|
||||
//G4double Eold=0.5 * (old.Pplus + old.Pminus);
|
||||
//G4double Enew=0.5 * (Pplus + Pminus);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
G4FragmentingString::G4FragmentingString(const G4FragmentingString &old,
|
||||
@@ -181,10 +142,6 @@ G4FragmentingString::G4FragmentingString(const G4FragmentingString &old,
|
||||
Pplus=0.; Pminus=0.;
|
||||
theStableParton=0; theDecayParton=0;
|
||||
|
||||
Pstring=G4LorentzVector(0.,0.,0.,0.);
|
||||
Pleft =G4LorentzVector(0.,0.,0.,0.);
|
||||
Pright =G4LorentzVector(0.,0.,0.,0.);
|
||||
|
||||
if ( old.decaying == Left )
|
||||
{
|
||||
RightParton= old.RightParton;
|
||||
@@ -197,17 +154,16 @@ Pright =G4LorentzVector(0.,0.,0.,0.);
|
||||
decaying=Right;
|
||||
} else
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined");
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4FragmentingString::G4FragmentingString: no decay Direction defined");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
G4FragmentingString::~G4FragmentingString()
|
||||
{}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
void G4FragmentingString::SetLeftPartonStable()
|
||||
@@ -241,7 +197,7 @@ G4int G4FragmentingString::GetDecayDirection() const
|
||||
G4bool G4FragmentingString::FourQuarkString() const
|
||||
{
|
||||
return LeftParton->GetParticleSubType()== "di_quark"
|
||||
&& RightParton->GetParticleSubType()== "di_quark";
|
||||
&& RightParton->GetParticleSubType()== "di_quark";
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
@@ -305,14 +261,12 @@ G4LorentzVector G4FragmentingString::Get4Momentum() const
|
||||
|
||||
G4double G4FragmentingString::Mass2() const
|
||||
{
|
||||
// return Pplus*Pminus - (Ptleft+Ptright).mag2();
|
||||
return Pstring.mag2();
|
||||
return Pplus*Pminus - (Ptleft+Ptright).mag2();
|
||||
}
|
||||
|
||||
G4double G4FragmentingString::Mass() const
|
||||
{
|
||||
// return std::sqrt(this->Mass2());
|
||||
return Pstring.mag();
|
||||
return std::sqrt(this->Mass2());
|
||||
}
|
||||
|
||||
G4double G4FragmentingString::MassT2() const
|
||||
@@ -320,11 +274,3 @@ G4double G4FragmentingString::MassT2() const
|
||||
return Pplus*Pminus;
|
||||
}
|
||||
|
||||
G4LorentzVector G4FragmentingString::GetPstring()
|
||||
{return Pstring;}
|
||||
|
||||
G4LorentzVector G4FragmentingString::GetPleft()
|
||||
{return Pleft;}
|
||||
|
||||
G4LorentzVector G4FragmentingString::GetPright()
|
||||
{return Pright;}
|
||||
|
||||
+50
-54
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronBuilder.cc 102717 2017-02-20 10:37:13Z gcosmo $
|
||||
// $Id: G4HadronBuilder.cc 106967 2017-10-31 08:41:49Z gcosmo $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -55,15 +55,16 @@ G4ParticleDefinition * G4HadronBuilder::Build(G4ParticleDefinition * black, G4Pa
|
||||
|
||||
if (black->GetParticleSubType()== "di_quark" || white->GetParticleSubType()== "di_quark" ) {
|
||||
|
||||
// Barion
|
||||
// Baryon
|
||||
Spin spin = (G4UniformRand() < barionSpinMix) ? SpinHalf : SpinThreeHalf;
|
||||
return Barion(black,white,spin);
|
||||
|
||||
} else {
|
||||
|
||||
// Meson
|
||||
// Meson
|
||||
Spin spin = (G4UniformRand() < mesonSpinMix) ? SpinZero : SpinOne;
|
||||
return Meson(black,white,spin);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,9 +75,9 @@ G4ParticleDefinition * G4HadronBuilder::BuildLowSpin(G4ParticleDefinition * blac
|
||||
if ( black->GetParticleSubType()== "quark" && white->GetParticleSubType()== "quark" ) {
|
||||
return Meson(black,white, SpinZero);
|
||||
} else {
|
||||
// will return a SpinThreeHalf Barion if all quarks the same
|
||||
// will return a SpinThreeHalf Baryon if all quarks the same
|
||||
return Barion(black,white, SpinHalf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
@@ -95,35 +96,33 @@ G4ParticleDefinition * G4HadronBuilder::BuildHighSpin(G4ParticleDefinition * bla
|
||||
G4ParticleDefinition * G4HadronBuilder::Meson(G4ParticleDefinition * black,
|
||||
G4ParticleDefinition * white, Spin theSpin)
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
// Verify Input Charge
|
||||
|
||||
G4double charge = black->GetPDGCharge()
|
||||
+ white->GetPDGCharge();
|
||||
if (std::abs(charge) > 2 || std::abs(3.*charge - 3*G4int(charge*1.001)) > perCent ) // 1.001 to avoid int(.9999) -> 0
|
||||
{
|
||||
#ifdef G4VERBOSE
|
||||
// Verify Input Charge
|
||||
G4double charge = black->GetPDGCharge() + white->GetPDGCharge();
|
||||
if (std::abs(charge) > 2 || std::abs(3.*charge - 3*G4int(charge*1.001)) > perCent ) // 1.001 to avoid int(.9999) -> 0
|
||||
{
|
||||
G4cerr << " G4HadronBuilder::Build()" << G4endl;
|
||||
G4cerr << " Invalid total charge found for on input: "
|
||||
<< charge<< G4endl;
|
||||
<< charge<< G4endl;
|
||||
G4cerr << " PGDcode input quark1/quark2 : " <<
|
||||
black->GetPDGEncoding() << " / "<<
|
||||
white->GetPDGEncoding() << G4endl;
|
||||
G4cerr << G4endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
G4int id1= black->GetPDGEncoding();
|
||||
G4int id2= white->GetPDGEncoding();
|
||||
// G4int ifl1= std::max(std::abs(id1), std::abs(id2));
|
||||
//G4int ifl1= std::max(std::abs(id1), std::abs(id2));
|
||||
if ( std::abs(id1) < std::abs(id2) )
|
||||
{
|
||||
{
|
||||
G4int xchg = id1;
|
||||
id1 = id2;
|
||||
id2 = xchg;
|
||||
}
|
||||
}
|
||||
|
||||
if (std::abs(id1) > 3 )
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4HadronBuilder::Meson : Illegal Quark content as input");
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4HadronBuilder::Meson : Illegal Quark content as input");
|
||||
|
||||
G4int PDGEncoding=0;
|
||||
|
||||
@@ -146,11 +145,11 @@ G4ParticleDefinition * G4HadronBuilder::Meson(G4ParticleDefinition * black,
|
||||
if( (IsUp && IsAnti ) || (!IsUp && !IsAnti ) )
|
||||
PDGEncoding = - PDGEncoding;
|
||||
}
|
||||
|
||||
|
||||
|
||||
G4ParticleDefinition * MesonDef=
|
||||
G4ParticleTable::GetParticleTable()->FindParticle(PDGEncoding);
|
||||
#ifdef G4VERBOSE
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (MesonDef == 0 ) {
|
||||
G4cerr << " G4HadronBuilder - Warning: No particle for PDGcode= "
|
||||
<< PDGEncoding << G4endl;
|
||||
@@ -163,39 +162,38 @@ G4ParticleDefinition * G4HadronBuilder::Meson(G4ParticleDefinition * black,
|
||||
<< " resulting Hadron " << MesonDef->GetParticleName()
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return MesonDef;
|
||||
}
|
||||
|
||||
|
||||
G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
|
||||
G4ParticleDefinition * white,Spin theSpin)
|
||||
G4ParticleDefinition * white,Spin theSpin)
|
||||
{
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
// Verify Input Charge
|
||||
G4double charge = black->GetPDGCharge()
|
||||
+ white->GetPDGCharge();
|
||||
if (std::abs(charge) > 2 || std::abs(3.*charge - 3*G4int(charge*1.001)) > perCent )
|
||||
#ifdef G4VERBOSE
|
||||
// Verify Input Charge
|
||||
G4double charge = black->GetPDGCharge() + white->GetPDGCharge();
|
||||
if (std::abs(charge) > 2 || std::abs(3.*charge - 3*G4int(charge*1.001)) > perCent )
|
||||
{
|
||||
G4cerr << " G4HadronBuilder::Build()" << G4endl;
|
||||
G4cerr << " Invalid total charge found for on input: "
|
||||
<< charge<< G4endl;
|
||||
G4cerr << " Invalid total charge found for on input: " << charge<< G4endl;
|
||||
G4cerr << " PGDcode input quark1/quark2 : " <<
|
||||
black->GetPDGEncoding() << " / "<<
|
||||
white->GetPDGEncoding() << G4endl;
|
||||
G4cerr << G4endl;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
G4int id1= black->GetPDGEncoding();
|
||||
G4int id2= white->GetPDGEncoding();
|
||||
if ( std::abs(id1) < std::abs(id2) )
|
||||
{
|
||||
{
|
||||
G4int xchg = id1;
|
||||
id1 = id2;
|
||||
id2 = xchg;
|
||||
}
|
||||
}
|
||||
|
||||
if (std::abs(id1) < 1000 || std::abs(id2) > 3 )
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4HadronBuilder::Barion: Illegal quark content as input");
|
||||
@@ -205,10 +203,10 @@ G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
|
||||
G4int diquarkSpin = std::abs(id1)%10;
|
||||
G4int ifl3 = id2;
|
||||
if (id1 < 0)
|
||||
{
|
||||
{
|
||||
ifl1 = - ifl1;
|
||||
ifl2 = - ifl2;
|
||||
}
|
||||
}
|
||||
//... Construct barion, distinguish Lambda and Sigma barions.
|
||||
G4int kfla = std::abs(ifl1);
|
||||
G4int kflb = std::abs(ifl2);
|
||||
@@ -226,10 +224,10 @@ G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
|
||||
|
||||
G4int kfll = 0;
|
||||
if(theSpin == SpinHalf && kfld > kfle && kfle > kflf) {
|
||||
// Spin J=1/2 and all three quarks different
|
||||
// Two states exist: (uds -> lambda or sigma0)
|
||||
// - lambda: s(ud)0 s : 3122; ie. reverse the two lighter quarks
|
||||
// - sigma0: s(ud)1 s : 3212
|
||||
// Spin J=1/2 and all three quarks different
|
||||
// Two states exist: (uds -> lambda or sigma0)
|
||||
// - lambda: s(ud)0 s : 3122; ie. reverse the two lighter quarks
|
||||
// - sigma0: s(ud)1 s : 3212
|
||||
if(diquarkSpin == 1 ) {
|
||||
if ( kfla == kfld) { // heaviest quark in diquark
|
||||
kfll = 1;
|
||||
@@ -242,31 +240,29 @@ G4ParticleDefinition * G4HadronBuilder::Barion(G4ParticleDefinition * black,
|
||||
}
|
||||
|
||||
G4int PDGEncoding;
|
||||
if (kfll == 1)
|
||||
PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;
|
||||
else
|
||||
PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;
|
||||
|
||||
if (id1 < 0)
|
||||
PDGEncoding = -PDGEncoding;
|
||||
if (kfll == 1) PDGEncoding = 1000 * kfld + 100 * kflf + 10 * kfle + theSpin;
|
||||
else PDGEncoding = 1000 * kfld + 100 * kfle + 10 * kflf + theSpin;
|
||||
|
||||
if (id1 < 0) PDGEncoding = -PDGEncoding;
|
||||
|
||||
G4ParticleDefinition * BarionDef=
|
||||
G4ParticleTable::GetParticleTable()->FindParticle(PDGEncoding);
|
||||
#ifdef G4VERBOSE
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if (BarionDef == 0 ) {
|
||||
G4cerr << " G4HadronBuilder - Warning: No particle for PDGcode= "
|
||||
<< PDGEncoding << G4endl;
|
||||
} else if ( ( black->GetPDGCharge() + white->GetPDGCharge()
|
||||
- BarionDef->GetPDGCharge() ) > perCent ) {
|
||||
G4cerr << " G4HadronBuilder - Warning: Incorrect Charge : "
|
||||
<< " DiQuark/Quark = "
|
||||
<< black->GetParticleName() << " / "
|
||||
<< white->GetParticleName()
|
||||
<< " resulting Hadron " << BarionDef->GetParticleName()
|
||||
<< G4endl;
|
||||
<< " DiQuark/Quark = "
|
||||
<< black->GetParticleName() << " / "
|
||||
<< white->GetParticleName()
|
||||
<< " resulting Hadron " << BarionDef->GetParticleName()
|
||||
<< G4endl;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return BarionDef;
|
||||
}
|
||||
|
||||
|
||||
+1236
-1491
File diff suppressed because it is too large
Load Diff
+336
-438
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QGSMFragmentation.cc 102717 2017-02-20 10:37:13Z gcosmo $
|
||||
// $Id: G4QGSMFragmentation.cc 106967 2017-10-31 08:41:49Z gcosmo $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -41,174 +41,167 @@
|
||||
|
||||
#include "G4Pow.hh"
|
||||
|
||||
//#define debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
//#define debug_QGSMfragmentation
|
||||
|
||||
// Class G4QGSMFragmentation
|
||||
//****************************************************************************************
|
||||
|
||||
G4QGSMFragmentation::G4QGSMFragmentation() :
|
||||
arho(0.5), aphi(0.), an(-0.5), ala(-0.75), aksi(-1.), alft(0.5)
|
||||
{
|
||||
SetStrangenessSuppression(0.41); // 0.47 0.447 Uzhi 27.09.2014 0.43 last 0.425
|
||||
SetDiquarkSuppression(0.25); // 0.087 std 0.07 Uzhi 0.25 Last
|
||||
SetDiquarkBreakProbability(0.4); // 0.05 std 0.1 Uzhi 27.09.2014
|
||||
}
|
||||
{
|
||||
SetStrangenessSuppression(0.41);
|
||||
SetDiquarkSuppression(0.25);
|
||||
SetDiquarkBreakProbability(0.4);
|
||||
}
|
||||
|
||||
G4QGSMFragmentation::~G4QGSMFragmentation()
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
G4KineticTrackVector* G4QGSMFragmentation::FragmentString(const G4ExcitedString& theString)
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<G4endl<<"QGSM StringFragm: String Mass "
|
||||
<<theString.Get4Momentum().mag()<<" Pz "
|
||||
<<theString.Get4Momentum().pz()
|
||||
<<"------------------------------------"<<G4endl;
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<G4endl<<"QGSM StringFragm: String Mass " <<theString.Get4Momentum().mag()<<" Pz "
|
||||
<<theString.Get4Momentum().pz()
|
||||
<<"------------------------------------"<<G4endl;
|
||||
G4cout<<"String ends Direct "<<theString.GetLeftParton()->GetPDGcode()<<" "
|
||||
<<theString.GetRightParton()->GetPDGcode()<<" "
|
||||
<<theString.GetDirection()<< G4endl;
|
||||
G4cout<<"Left mom "<<theString.GetLeftParton()->Get4Momentum()<<G4endl;
|
||||
G4cout<<"Right mom "<<theString.GetRightParton()->Get4Momentum()<<G4endl;
|
||||
G4cout<<"Check for Fragmentation "<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Can no longer modify Parameters for Fragmentation.
|
||||
PastInitPhase=true;
|
||||
// Can no longer modify Parameters for Fragmentation.
|
||||
PastInitPhase=true;
|
||||
|
||||
// check if string has enough mass to fragment...
|
||||
// check if string has enough mass to fragment...
|
||||
|
||||
G4KineticTrackVector * LeftVector=LightFragmentationTest(&theString);
|
||||
G4KineticTrackVector * LeftVector=LightFragmentationTest(&theString);
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
#ifdef debug_QGSMfragmentation
|
||||
if ( LeftVector != 0 ) G4cout<<"Non fragmentable - the string is converted to one hadron "<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ( LeftVector != 0 ) return LeftVector;
|
||||
if ( LeftVector != 0 ) return LeftVector;
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"The string will be fragmented. "<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LeftVector = new G4KineticTrackVector;
|
||||
G4KineticTrackVector * RightVector=new G4KineticTrackVector;
|
||||
LeftVector = new G4KineticTrackVector;
|
||||
G4KineticTrackVector * RightVector=new G4KineticTrackVector;
|
||||
|
||||
// this should work but its only a semi deep copy. %GF G4ExcitedString theStringInCMS(theString);
|
||||
G4ExcitedString *theStringInCMS=CopyExcited(theString);
|
||||
G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
|
||||
// this should work but its only a semi deep copy. %GF G4ExcitedString theStringInCMS(theString);
|
||||
G4ExcitedString *theStringInCMS=CPExcited(theString);
|
||||
G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms();
|
||||
|
||||
G4bool success=false, inner_sucess=true;
|
||||
G4int attempt=0;
|
||||
while ( !success && attempt++ < StringLoopInterrupt ) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"Loop_toFrag "<<theStringInCMS->GetLeftParton()->GetPDGcode()<<" "
|
||||
<<theStringInCMS->GetRightParton()->GetPDGcode()<<" "
|
||||
<<theStringInCMS->GetDirection()<< G4endl;
|
||||
#endif
|
||||
G4bool success=false, inner_sucess=true;
|
||||
G4int attempt=0;
|
||||
while ( !success && attempt++ < StringLoopInterrupt ) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"Loop_toFrag "<<theStringInCMS->GetLeftParton()->GetPDGcode()<<" "
|
||||
<<theStringInCMS->GetRightParton()->GetPDGcode()<<" "
|
||||
<<theStringInCMS->GetDirection()<< G4endl;
|
||||
#endif
|
||||
|
||||
G4FragmentingString *currentString=new G4FragmentingString(*theStringInCMS);
|
||||
G4FragmentingString *currentString=new G4FragmentingString(*theStringInCMS);
|
||||
|
||||
std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
|
||||
LeftVector->clear();
|
||||
std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
|
||||
RightVector->clear();
|
||||
std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
|
||||
LeftVector->clear();
|
||||
std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
|
||||
RightVector->clear();
|
||||
|
||||
inner_sucess=true; // set false on failure..
|
||||
const G4int maxNumberOfLoops = 1000;
|
||||
G4int loopCounter = -1;
|
||||
while (! StopFragmenting(currentString) && ++loopCounter < maxNumberOfLoops ) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{ // Split current string into hadron + new string
|
||||
inner_sucess=true; // set false on failure..
|
||||
const G4int maxNumberOfLoops = 1000;
|
||||
G4int loopCounter = -1;
|
||||
while (! StopFragmenting(currentString) && ++loopCounter < maxNumberOfLoops ) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{ // Split current string into hadron + new string
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"The string can fragment. "<<G4endl;;
|
||||
#endif
|
||||
G4FragmentingString *newString=0; // used as output from SplitUp...
|
||||
G4KineticTrack * Hadron=Splitup(currentString,newString);
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"The string can fragment. "<<G4endl;;
|
||||
#endif
|
||||
|
||||
if ( Hadron != 0 ) // && IsFragmentable(newString)) // Closed by Uzhi, Oct. 2014
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"Hadron prod at fragm. "<<Hadron->GetDefinition()->GetParticleName()<<G4endl;
|
||||
#endif
|
||||
if ( currentString->GetDecayDirection() > 0 )
|
||||
LeftVector->push_back(Hadron);
|
||||
else
|
||||
RightVector->push_back(Hadron);
|
||||
G4FragmentingString *newString=0; // used as output from SplitUp...
|
||||
G4KineticTrack * Hadron=Splitup(currentString,newString);
|
||||
|
||||
delete currentString;
|
||||
currentString=newString;
|
||||
if ( Hadron != 0 ) // && IsFragmentable(newString))
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"Hadron prod at fragm. "<<Hadron->GetDefinition()->GetParticleName()<<G4endl;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
if ( currentString->GetDecayDirection() > 0 ) LeftVector->push_back(Hadron);
|
||||
else RightVector->push_back(Hadron);
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"abandon ... start from the beginning ---------------"<<G4endl;
|
||||
#endif
|
||||
delete currentString;
|
||||
currentString=newString;
|
||||
|
||||
// abandon ... start from the beginning
|
||||
if (newString) delete newString;
|
||||
inner_sucess=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
inner_sucess=false;
|
||||
}
|
||||
} else {
|
||||
|
||||
// Split current string into 2 final Hadrons
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"Split remaining string into 2 final hadrons."<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"abandon ... start from the beginning ---------------"<<G4endl;
|
||||
#endif
|
||||
|
||||
if ( inner_sucess && //true) // Uzhi -- No Last Splitting
|
||||
SplitLast(currentString,LeftVector, RightVector) )
|
||||
{
|
||||
success=true;
|
||||
}
|
||||
delete currentString;
|
||||
}
|
||||
// abandon ... start from the beginning
|
||||
if (newString) delete newString;
|
||||
inner_sucess=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( loopCounter >= maxNumberOfLoops ) inner_sucess=false;
|
||||
|
||||
// Split current string into 2 final Hadrons
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"Split remaining string into 2 final hadrons."<<G4endl;
|
||||
#endif
|
||||
|
||||
if ( inner_sucess && SplitLast(currentString,LeftVector, RightVector) )
|
||||
{
|
||||
success=true;
|
||||
}
|
||||
delete currentString;
|
||||
} // End of while loop
|
||||
|
||||
delete theStringInCMS;
|
||||
delete theStringInCMS;
|
||||
|
||||
if ( ! success )
|
||||
{
|
||||
std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
|
||||
LeftVector->clear();
|
||||
std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
|
||||
delete RightVector;
|
||||
return LeftVector;
|
||||
}
|
||||
if ( ! success )
|
||||
{
|
||||
std::for_each(LeftVector->begin(), LeftVector->end(), DeleteKineticTrack());
|
||||
LeftVector->clear();
|
||||
std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack());
|
||||
delete RightVector;
|
||||
return LeftVector;
|
||||
}
|
||||
|
||||
// Join Left- and RightVector into LeftVector in correct order.
|
||||
while(!RightVector->empty()) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{
|
||||
LeftVector->push_back(RightVector->back());
|
||||
RightVector->erase(RightVector->end()-1);
|
||||
}
|
||||
delete RightVector;
|
||||
// Join Left- and RightVector into LeftVector in correct order.
|
||||
while(!RightVector->empty()) /* Loop checking, 07.08.2015, A.Ribon */
|
||||
{
|
||||
LeftVector->push_back(RightVector->back());
|
||||
RightVector->erase(RightVector->end()-1);
|
||||
}
|
||||
delete RightVector;
|
||||
|
||||
CalculateHadronTimePosition(theString.Get4Momentum().mag(), LeftVector);
|
||||
|
||||
G4LorentzRotation toObserverFrame(toCms.inverse());
|
||||
|
||||
for(size_t C1 = 0; C1 < LeftVector->size(); C1++)
|
||||
{
|
||||
G4KineticTrack* Hadron = LeftVector->operator[](C1);
|
||||
G4LorentzVector Momentum = Hadron->Get4Momentum();
|
||||
Momentum = toObserverFrame*Momentum;
|
||||
Hadron->Set4Momentum(Momentum);
|
||||
G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
|
||||
Momentum = toObserverFrame*Coordinate;
|
||||
Hadron->SetFormationTime(Momentum.e());
|
||||
G4ThreeVector aPosition(Momentum.vect());
|
||||
Hadron->SetPosition(theString.GetPosition()+aPosition);
|
||||
}
|
||||
return LeftVector;
|
||||
|
||||
CalculateHadronTimePosition(theString.Get4Momentum().mag(), LeftVector);
|
||||
|
||||
G4LorentzRotation toObserverFrame(toCms.inverse());
|
||||
|
||||
for(size_t C1 = 0; C1 < LeftVector->size(); C1++)
|
||||
{
|
||||
G4KineticTrack* Hadron = LeftVector->operator[](C1);
|
||||
G4LorentzVector Momentum = Hadron->Get4Momentum();
|
||||
Momentum = toObserverFrame*Momentum;
|
||||
Hadron->Set4Momentum(Momentum);
|
||||
G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime());
|
||||
Momentum = toObserverFrame*Coordinate;
|
||||
Hadron->SetFormationTime(Momentum.e());
|
||||
G4ThreeVector aPosition(Momentum.vect());
|
||||
Hadron->SetPosition(theString.GetPosition()+aPosition);
|
||||
}
|
||||
return LeftVector;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
@@ -216,9 +209,10 @@ G4KineticTrackVector* G4QGSMFragmentation::FragmentString(const G4ExcitedString&
|
||||
G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding,
|
||||
G4ParticleDefinition* pHadron, G4double , G4double )
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"GetLightConeZ zmin zmax Parton pHadron "<<zmin<<" "<<zmax<<" "<<PartonEncoding<<" "<<pHadron->GetParticleName()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
G4double z;
|
||||
G4double d1, d2, yf;
|
||||
G4double invD1(0.),invD2(0.), r1(0.),r2(0.),r12(0.);
|
||||
@@ -252,9 +246,9 @@ G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int
|
||||
|
||||
} else throw G4HadronicException(__FILE__, __LINE__, "Unknown PDGencoding in G4QGSMFragmentation::G4LightConeZ");
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"d1 d2 "<<d1<<" "<<d2<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"d1 d2 "<<d1<<" "<<d2<<G4endl;
|
||||
#endif
|
||||
|
||||
d1+=1.0; d2+=1.0;
|
||||
|
||||
@@ -264,10 +258,10 @@ G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int
|
||||
G4int loopCounter = 0;
|
||||
do
|
||||
{
|
||||
r1=G4Pow::GetInstance()->powA(G4UniformRand(),invD1);
|
||||
r2=G4Pow::GetInstance()->powA(G4UniformRand(),invD2);
|
||||
r12=r1+r2;
|
||||
z=r1/r12;
|
||||
r1=G4Pow::GetInstance()->powA(G4UniformRand(),invD1);
|
||||
r2=G4Pow::GetInstance()->powA(G4UniformRand(),invD2);
|
||||
r12=r1+r2;
|
||||
z=r1/r12;
|
||||
} while( ( (r12 > 1.0) || !((zmin <= z)&&(z <= zmax))) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
z = 0.5*(zmin + zmax); // Just a value between zmin and zmax, no physics considerations at all!
|
||||
@@ -280,43 +274,41 @@ G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int
|
||||
if(absCode == 1103 || absCode == 2101 ||
|
||||
absCode == 2203 || absCode == 2103)
|
||||
{
|
||||
if(absHadronCode < 1000) // Meson production
|
||||
{
|
||||
if(absHadronCode < 1000) // Meson production
|
||||
{
|
||||
if( !StrangeHadron ) {d1=1.0; d2= arho - 2.0*an + alft;}
|
||||
else {d1=1.0; d2 = 2.*arho - 2.0*an - aphi + alft;}
|
||||
} else // Baryon production
|
||||
{
|
||||
} else { // Baryon production
|
||||
if( !StrangeHadron ) {d1=2.0*(arho - an); d2= -arho + alft;}
|
||||
else {d1=2.0*(arho - an); d2 =-aphi + alft;}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"d1 d2 "<<d1<<" "<<d2<<G4endl;
|
||||
#endif
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"d1 d2 "<<d1<<" "<<d2<<G4endl;
|
||||
#endif
|
||||
|
||||
d1+=1.0; d2+=1.0;
|
||||
invD1=1./d1; invD2=1./d2;
|
||||
d1+=1.0; d2+=1.0;
|
||||
invD1=1./d1; invD2=1./d2;
|
||||
|
||||
const G4int maxNumberOfLoops = 10000;
|
||||
G4int loopCounter = 0;
|
||||
do
|
||||
{
|
||||
r1=G4Pow::GetInstance()->powA(G4UniformRand(),invD1);
|
||||
r2=G4Pow::GetInstance()->powA(G4UniformRand(),invD2);
|
||||
r12=r1+r2;
|
||||
z=r1/r12;
|
||||
} while( ( (r12 > 1.0) || !((zmin <= z)&&(z <= zmax))) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
z = 0.5*(zmin + zmax); // Just a value between zmin and zmax, no physics considerations at all!
|
||||
}
|
||||
const G4int maxNumberOfLoops = 10000;
|
||||
G4int loopCounter = 0;
|
||||
do
|
||||
{
|
||||
r1=G4Pow::GetInstance()->powA(G4UniformRand(),invD1);
|
||||
r2=G4Pow::GetInstance()->powA(G4UniformRand(),invD2);
|
||||
r12=r1+r2;
|
||||
z=r1/r12;
|
||||
} while( ( (r12 > 1.0) || !((zmin <= z)&&(z <= zmax))) && ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
z = 0.5*(zmin + zmax); // Just a value between zmin and zmax, no physics considerations at all!
|
||||
}
|
||||
|
||||
return z;
|
||||
return z;
|
||||
}
|
||||
else if(absCode == 3101 || absCode == 3103 || // For strange d-quarks
|
||||
absCode == 3201 || absCode == 3203)
|
||||
{
|
||||
d2 = (alft - (2.*ala - arho));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -336,384 +328,290 @@ G4double G4QGSMFragmentation::GetLightConeZ(G4double zmin, G4double zmax, G4int
|
||||
|
||||
return z;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
|
||||
G4LorentzVector * G4QGSMFragmentation::SplitEandP(G4ParticleDefinition * pHadron,
|
||||
G4FragmentingString * string, // Uzhi
|
||||
G4FragmentingString * NewString) // Uzhi Oct. 2014
|
||||
G4FragmentingString * string,
|
||||
G4FragmentingString * NewString)
|
||||
{
|
||||
G4double HadronMass = pHadron->GetPDGMass();
|
||||
G4double HadronMass = pHadron->GetPDGMass();
|
||||
|
||||
// G4double MinimalStringMass= FragmentationMass(NewString,&G4HadronBuilder::BuildHighSpin);
|
||||
G4double MinimalStringMass=
|
||||
FragmentationMass(NewString,&G4HadronBuilder::Build); // Uzhi 03.06.2015
|
||||
// FragmentationMass(NewString,&G4HadronBuilder::BuildLowSpin); // Uzhi 03.06.2015
|
||||
// Uzhi 03.06.2015 It would be well to sample randomly HighSpin
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
//G4double MinimalStringMass= FragmentationMass(NewString,&G4HadronBuilder::BuildHighSpin);
|
||||
G4double MinimalStringMass= FragmentationMass(NewString,&G4HadronBuilder::Build);
|
||||
//FragmentationMass(NewString,&G4HadronBuilder::BuildLowSpin); // Uzhi 03.06.2015
|
||||
// Uzhi 03.06.2015 It would be well to sample randomly HighSpin
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"G4QGSMFragmentation::SplitEandP "<<pHadron->GetParticleName()<<G4endl;
|
||||
G4cout<<"String 4 mom, String M "<<string->Get4Momentum()<<" "<<string->Mass()<<G4endl;
|
||||
G4cout<<"HadM MinimalStringMassLeft StringM hM+sM "<<HadronMass<<" "<<MinimalStringMass<<" "
|
||||
<<string->Mass()<<" "<<HadronMass+MinimalStringMass<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(HadronMass + MinimalStringMass > string->Mass())
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
G4cout<<"Mass of the string is not sufficient to produce the hadron!"<<G4endl;
|
||||
#endif
|
||||
return 0;
|
||||
}// have to start all over!
|
||||
if(HadronMass + MinimalStringMass > string->Mass())
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"Mass of the string is not sufficient to produce the hadron!"<<G4endl;
|
||||
#endif
|
||||
return 0;
|
||||
} // have to start all over!
|
||||
|
||||
// calculate and assign hadron transverse momentum component HadronPx andHadronPy
|
||||
G4double StringMT2 = string->MassT2();
|
||||
G4double StringMT = std::sqrt(StringMT2);
|
||||
// calculate and assign hadron transverse momentum component HadronPx andHadronPy
|
||||
G4double StringMT2 = string->MassT2();
|
||||
G4double StringMT = std::sqrt(StringMT2);
|
||||
|
||||
G4LorentzVector String4Momentum = string->Get4Momentum();
|
||||
String4Momentum.setPz(0.);
|
||||
G4ThreeVector StringPt = String4Momentum.vect();
|
||||
G4LorentzVector String4Momentum = string->Get4Momentum();
|
||||
String4Momentum.setPz(0.);
|
||||
G4ThreeVector StringPt = String4Momentum.vect();
|
||||
|
||||
G4ThreeVector HadronPt , RemSysPt;
|
||||
G4double HadronMassT2, ResidualMassT2;
|
||||
G4ThreeVector HadronPt , RemSysPt;
|
||||
G4double HadronMassT2, ResidualMassT2;
|
||||
|
||||
//... sample Pt of the hadron
|
||||
G4int attempt=0;
|
||||
do
|
||||
{
|
||||
attempt++; if(attempt > StringLoopInterrupt) return 0;
|
||||
//... sample Pt of the hadron
|
||||
G4int attempt=0;
|
||||
do
|
||||
{
|
||||
attempt++; if(attempt > StringLoopInterrupt) return 0;
|
||||
|
||||
HadronPt =SampleQuarkPt() + string->DecayPt();
|
||||
HadronPt.setZ(0);
|
||||
RemSysPt = StringPt - HadronPt;
|
||||
HadronPt =SampleQuarkPt() + string->DecayPt();
|
||||
HadronPt.setZ(0);
|
||||
RemSysPt = StringPt - HadronPt;
|
||||
|
||||
HadronMassT2 = sqr(HadronMass) + HadronPt.mag2();
|
||||
ResidualMassT2=sqr(MinimalStringMass) + RemSysPt.mag2();
|
||||
HadronMassT2 = sqr(HadronMass) + HadronPt.mag2();
|
||||
ResidualMassT2=sqr(MinimalStringMass) + RemSysPt.mag2();
|
||||
|
||||
} while(std::sqrt(HadronMassT2) + std::sqrt(ResidualMassT2) > StringMT); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
} while(std::sqrt(HadronMassT2) + std::sqrt(ResidualMassT2) > StringMT); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
|
||||
//... sample z to define hadron longitudinal momentum and energy
|
||||
//... but first check the available phase space
|
||||
//... sample z to define hadron longitudinal momentum and energy
|
||||
//... but first check the available phase space
|
||||
|
||||
G4double Pz2 = (sqr(StringMT2 - HadronMassT2 - ResidualMassT2) -
|
||||
4*HadronMassT2 * ResidualMassT2)/4./StringMT2;
|
||||
G4double Pz2 = (sqr(StringMT2 - HadronMassT2 - ResidualMassT2) -
|
||||
4*HadronMassT2 * ResidualMassT2)/4./StringMT2;
|
||||
|
||||
if(Pz2 < 0 ) {return 0;} // have to start all over!
|
||||
if(Pz2 < 0 ) {return 0;} // have to start all over!
|
||||
|
||||
//... then compute allowed z region z_min <= z <= z_max
|
||||
//... then compute allowed z region z_min <= z <= z_max
|
||||
|
||||
G4double Pz = std::sqrt(Pz2);
|
||||
G4double zMin = (std::sqrt(HadronMassT2+Pz2) - Pz)/std::sqrt(StringMT2);
|
||||
G4double zMax = (std::sqrt(HadronMassT2+Pz2) + Pz)/std::sqrt(StringMT2);
|
||||
G4double Pz = std::sqrt(Pz2);
|
||||
G4double zMin = (std::sqrt(HadronMassT2+Pz2) - Pz)/std::sqrt(StringMT2);
|
||||
G4double zMax = (std::sqrt(HadronMassT2+Pz2) + Pz)/std::sqrt(StringMT2);
|
||||
|
||||
/* close by Uzhi, Oct. 2014
|
||||
G4double DecayQuarkMass2 = sqr(string->GetDecayParton()->GetPDGMass());
|
||||
G4double HadronMass2T = sqr(HadronMass) + HadronPt.mag2();
|
||||
/*
|
||||
G4double DecayQuarkMass2 = sqr(string->GetDecayParton()->GetPDGMass());
|
||||
G4double HadronMass2T = sqr(HadronMass) + HadronPt.mag2();
|
||||
if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*(string->Mass2()) )
|
||||
return 0; // have to start all over!
|
||||
//... then compute allowed z region z_min <= z <= z_max
|
||||
//G4double zMin = HadronMass2T/(string->Mass2());
|
||||
//G4double zMax = 1. - DecayQuarkMass2/(string->Mass2());
|
||||
*/
|
||||
|
||||
if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*(string->Mass2()) )
|
||||
return 0; // have to start all over!
|
||||
|
||||
//... then compute allowed z region z_min <= z <= z_max
|
||||
|
||||
// G4double zMin = HadronMass2T/(string->Mass2());
|
||||
// G4double zMax = 1. - DecayQuarkMass2/(string->Mass2());
|
||||
*/
|
||||
if (zMin >= zMax) return 0; // have to start all over!
|
||||
if (zMin >= zMax) return 0; // have to start all over!
|
||||
|
||||
G4double z = GetLightConeZ(zMin, zMax,
|
||||
string->GetDecayParton()->GetPDGEncoding(), pHadron,
|
||||
HadronPt.x(), HadronPt.y());
|
||||
G4double z = GetLightConeZ(zMin, zMax, string->GetDecayParton()->GetPDGEncoding(),
|
||||
pHadron, HadronPt.x(), HadronPt.y());
|
||||
|
||||
//... now compute hadron longitudinal momentum and energy
|
||||
// longitudinal hadron momentum component HadronPz
|
||||
//... now compute hadron longitudinal momentum and energy
|
||||
// longitudinal hadron momentum component HadronPz
|
||||
|
||||
HadronPt.setZ(0.5* string->GetDecayDirection() *
|
||||
(z * string->LightConeDecay() -
|
||||
HadronMassT2/(z * string->LightConeDecay())));
|
||||
G4double HadronE = 0.5* (z * string->LightConeDecay() +
|
||||
HadronMassT2/(z * string->LightConeDecay()));
|
||||
HadronPt.setZ(0.5* string->GetDecayDirection() * (z * string->LightConeDecay() -
|
||||
HadronMassT2/(z * string->LightConeDecay())));
|
||||
G4double HadronE = 0.5* (z * string->LightConeDecay() +
|
||||
HadronMassT2/(z * string->LightConeDecay()));
|
||||
|
||||
G4LorentzVector * a4Momentum= new G4LorentzVector(HadronPt,HadronE);
|
||||
G4LorentzVector * a4Momentum= new G4LorentzVector(HadronPt,HadronE);
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"string->GetDecayDirection() string->LightConeDecay() "
|
||||
<<string->GetDecayDirection()<<" "<<string->LightConeDecay()<<G4endl;
|
||||
G4cout<<"HadronPt,HadronE "<<HadronPt<<" "<<HadronE<<G4endl;
|
||||
// G4cout<<"String4Momentum "<<String4Momentum<<G4endl;
|
||||
//G4int Uzhi; G4cin>>Uzhi;
|
||||
//G4cout<<"String4Momentum "<<String4Momentum<<G4endl;
|
||||
//G4int Uzhi; G4cin>>Uzhi;
|
||||
G4cout<<"Out of QGSM SplitEandP "<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return a4Momentum;
|
||||
return a4Momentum;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4QGSMFragmentation::SplitLast(G4FragmentingString * string,
|
||||
G4KineticTrackVector * LeftVector,
|
||||
G4KineticTrackVector * RightVector)
|
||||
G4KineticTrackVector * LeftVector,
|
||||
G4KineticTrackVector * RightVector)
|
||||
{
|
||||
//... perform last cluster decay
|
||||
//... perform last cluster decay
|
||||
|
||||
G4ThreeVector ClusterVel =string->Get4Momentum().boostVector();
|
||||
G4double ResidualMass =string->Mass();
|
||||
G4ThreeVector ClusterVel =string->Get4Momentum().boostVector();
|
||||
G4double ResidualMass =string->Mass();
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"Split last-----------------------------------------"<<G4endl;
|
||||
G4cout<<"StrMass "<<ResidualMass<<" q's "
|
||||
<<string->GetLeftParton()->GetParticleName()<<" "
|
||||
<<string->GetRightParton()->GetParticleName()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
G4double ClusterMassCut = ClusterMass; // Taken from G4VLongitudinalStringDecay
|
||||
G4int cClusterInterrupt = 0;
|
||||
G4ParticleDefinition * LeftHadron, * RightHadron;
|
||||
const G4int maxNumberOfLoops = 1000;
|
||||
G4int loopCounter = 0;
|
||||
do
|
||||
G4double ClusterMassCut = ClusterMass; // Taken from G4VLongitudinalStringDecay
|
||||
G4int cClusterInterrupt = 0;
|
||||
G4ParticleDefinition * LeftHadron, * RightHadron;
|
||||
const G4int maxNumberOfLoops = 1000;
|
||||
G4int loopCounter = 0;
|
||||
do
|
||||
{
|
||||
if (cClusterInterrupt++ >= ClusterLoopInterrupt)
|
||||
{
|
||||
if (cClusterInterrupt++ >= ClusterLoopInterrupt)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
G4ParticleDefinition * quark = NULL;
|
||||
string->SetLeftPartonStable(); // to query quark contents..
|
||||
|
||||
if (string->DecayIsQuark() && string->StableIsQuark() )
|
||||
{
|
||||
//... there are quarks on cluster ends
|
||||
LeftHadron= QuarkSplitup(string->GetLeftParton(), quark);
|
||||
} else {
|
||||
//... there is a Diquark on cluster ends
|
||||
G4int IsParticle;
|
||||
if ( string->StableIsQuark() ) {
|
||||
IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1;
|
||||
} else {
|
||||
IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? +1 : -1;
|
||||
}
|
||||
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
quark = QuarkPair.second;
|
||||
LeftHadron=hadronizer->Build(QuarkPair.first, string->GetLeftParton());
|
||||
}
|
||||
|
||||
RightHadron = hadronizer->Build(string->GetRightParton(), quark);
|
||||
|
||||
//... repeat procedure, if mass of cluster is too low to produce hadrons
|
||||
//... ClusterMassCut = 0.15*GeV model parameter
|
||||
if ( quark->GetParticleSubType()== "quark" ) {ClusterMassCut = 0.;}
|
||||
else {ClusterMassCut = ClusterMass;}
|
||||
}
|
||||
while ( (ResidualMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass() + ClusterMassCut)
|
||||
&& ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//... compute hadron momenta and energies
|
||||
G4LorentzVector LeftMom, RightMom;
|
||||
G4ThreeVector Pos;
|
||||
Sample4Momentum(&LeftMom , LeftHadron->GetPDGMass() ,
|
||||
&RightMom, RightHadron->GetPDGMass(), ResidualMass);
|
||||
LeftMom.boost(ClusterVel);
|
||||
RightMom.boost(ClusterVel);
|
||||
G4ParticleDefinition * quark = NULL;
|
||||
string->SetLeftPartonStable(); // to query quark contents..
|
||||
|
||||
#ifdef debug_QGSMfragmentation // Uzhi Oct. 2014
|
||||
if (string->DecayIsQuark() && string->StableIsQuark() )
|
||||
{
|
||||
//... there are quarks on cluster ends
|
||||
LeftHadron= QuarkSplitup(string->GetLeftParton(), quark);
|
||||
} else {
|
||||
//... there is a Diquark on cluster ends
|
||||
G4int IsParticle;
|
||||
if ( string->StableIsQuark() ) {
|
||||
IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1;
|
||||
} else {
|
||||
IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? +1 : -1;
|
||||
}
|
||||
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
quark = QuarkPair.second;
|
||||
LeftHadron=hadronizer->Build(QuarkPair.first, string->GetLeftParton());
|
||||
}
|
||||
|
||||
RightHadron = hadronizer->Build(string->GetRightParton(), quark);
|
||||
|
||||
//... repeat procedure, if mass of cluster is too low to produce hadrons
|
||||
//... ClusterMassCut = 0.15*GeV model parameter
|
||||
if ( quark->GetParticleSubType()== "quark" ) {ClusterMassCut = 0.;}
|
||||
else {ClusterMassCut = ClusterMass;}
|
||||
|
||||
} while ( (ResidualMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass() + ClusterMassCut)
|
||||
&& ++loopCounter < maxNumberOfLoops ); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
|
||||
if ( loopCounter >= maxNumberOfLoops ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//... compute hadron momenta and energies
|
||||
G4LorentzVector LeftMom, RightMom;
|
||||
G4ThreeVector Pos;
|
||||
Sample4Momentum(&LeftMom , LeftHadron->GetPDGMass() ,
|
||||
&RightMom, RightHadron->GetPDGMass(), ResidualMass);
|
||||
LeftMom.boost(ClusterVel);
|
||||
RightMom.boost(ClusterVel);
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<LeftHadron->GetParticleName()<<" "<<RightHadron->GetParticleName()<<G4endl;
|
||||
G4cout<<"Left Hadrom P M "<<LeftMom<<" "<<LeftMom.mag()<<G4endl;
|
||||
G4cout<<"Right Hadrom P M "<<RightMom<<" "<<RightMom.mag()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LeftVector->push_back(new G4KineticTrack(LeftHadron, 0, Pos, LeftMom));
|
||||
RightVector->push_back(new G4KineticTrack(RightHadron, 0, Pos, RightMom));
|
||||
|
||||
return true;
|
||||
LeftVector->push_back(new G4KineticTrack(LeftHadron, 0, Pos, LeftMom));
|
||||
RightVector->push_back(new G4KineticTrack(RightHadron, 0, Pos, RightMom));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4QGSMFragmentation::IsFragmentable(const G4FragmentingString * const string)
|
||||
{
|
||||
return sqr(FragmentationMass(string)+MassCut) <
|
||||
string->Mass2();
|
||||
return sqr(FragmentationMass(string)+MassCut) < string->Mass2();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
G4bool G4QGSMFragmentation::StopFragmenting(const G4FragmentingString * const string)
|
||||
{
|
||||
return
|
||||
sqr(FragmentationMass(string,&G4HadronBuilder::BuildHighSpin)+MassCut) >
|
||||
return sqr(FragmentationMass(string,&G4HadronBuilder::BuildHighSpin)+MassCut) >
|
||||
string->Get4Momentum().mag2();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4QGSMFragmentation::Sample4Momentum(G4LorentzVector* Mom , G4double Mass ,
|
||||
G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass)
|
||||
{
|
||||
G4double r_val = sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) - sqr(2.*Mass*AntiMass);
|
||||
G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0;
|
||||
{
|
||||
G4double r_val = sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) - sqr(2.*Mass*AntiMass);
|
||||
G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0;
|
||||
|
||||
//... sample unit vector
|
||||
G4double pz = 1. - 2.*G4UniformRand();
|
||||
G4double st = std::sqrt(1. - pz * pz)*Pabs;
|
||||
G4double phi = 2.*pi*G4UniformRand();
|
||||
G4double px = st*std::cos(phi);
|
||||
G4double py = st*std::sin(phi);
|
||||
pz *= Pabs;
|
||||
//... sample unit vector
|
||||
G4double pz = 1. - 2.*G4UniformRand();
|
||||
G4double st = std::sqrt(1. - pz * pz)*Pabs;
|
||||
G4double phi = 2.*pi*G4UniformRand();
|
||||
G4double px = st*std::cos(phi);
|
||||
G4double py = st*std::sin(phi);
|
||||
pz *= Pabs;
|
||||
|
||||
Mom->setPx(px); Mom->setPy(py); Mom->setPz(pz);
|
||||
Mom->setE(std::sqrt(Pabs*Pabs + Mass*Mass));
|
||||
|
||||
AntiMom->setPx(-px); AntiMom->setPy(-py); AntiMom->setPz(-pz);
|
||||
AntiMom->setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass));
|
||||
}
|
||||
Mom->setPx(px); Mom->setPy(py); Mom->setPz(pz);
|
||||
Mom->setE(std::sqrt(Pabs*Pabs + Mass*Mass));
|
||||
|
||||
AntiMom->setPx(-px); AntiMom->setPy(-py); AntiMom->setPz(-pz);
|
||||
AntiMom->setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass));
|
||||
}
|
||||
|
||||
//*********************************************************************************************
|
||||
// Uzhi June 2014 Insert from G4ExcitedStringDecay.cc
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4ParticleDefinition *G4QGSMFragmentation::DiQuarkSplitup(
|
||||
G4ParticleDefinition* decay,
|
||||
G4ParticleDefinition *G4QGSMFragmentation::DiQuarkSplitup(G4ParticleDefinition* decay,
|
||||
G4ParticleDefinition *&created)
|
||||
{
|
||||
//... can Diquark break or not?
|
||||
if (G4UniformRand() < DiquarkBreakProb ){
|
||||
//... Diquark break
|
||||
//... can Diquark break or not?
|
||||
if (G4UniformRand() < DiquarkBreakProb ){
|
||||
//... Diquark break
|
||||
|
||||
G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
|
||||
G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
|
||||
G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
|
||||
G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
|
||||
|
||||
if (G4UniformRand() < 0.5)
|
||||
{
|
||||
G4int Swap = stableQuarkEncoding;
|
||||
stableQuarkEncoding = decayQuarkEncoding;
|
||||
decayQuarkEncoding = Swap;
|
||||
}
|
||||
if (G4UniformRand() < 0.5)
|
||||
{
|
||||
G4int Swap = stableQuarkEncoding;
|
||||
stableQuarkEncoding = decayQuarkEncoding;
|
||||
decayQuarkEncoding = Swap;
|
||||
}
|
||||
|
||||
G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;
|
||||
// if we have a quark, we need antiquark)
|
||||
G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; // if we have a quark, we need antiquark)
|
||||
|
||||
G4double StrSup=GetStrangeSuppress(); // for changing s-sbar production, Uzhi Oct. 2014
|
||||
StrangeSuppress=0.41; // was 0.47
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
StrangeSuppress=StrSup;
|
||||
G4double StrSup=GetStrangeSuppress(); // for changing s-sbar production
|
||||
StrangeSuppress=0.41; // was 0.47
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
StrangeSuppress=StrSup;
|
||||
|
||||
//... Build new Diquark
|
||||
G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
|
||||
G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
|
||||
G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
|
||||
created = FindParticle(NewDecayEncoding);
|
||||
G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
//... Build new Diquark
|
||||
G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
|
||||
G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
|
||||
G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
|
||||
created = FindParticle(NewDecayEncoding);
|
||||
G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
|
||||
return had;
|
||||
// return hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
return had;
|
||||
//return hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
|
||||
} else {
|
||||
//... Diquark does not break
|
||||
} else {
|
||||
//... Diquark does not break
|
||||
|
||||
G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1;
|
||||
// if we have a diquark, we need quark)
|
||||
G4double StrSup=GetStrangeSuppress(); // for changing s-sbar production, Uzhi Oct. 2014
|
||||
StrangeSuppress=0.41; //0.41; 0.47
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
StrangeSuppress=StrSup;
|
||||
G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1; // if we have a diquark, we need quark)
|
||||
G4double StrSup=GetStrangeSuppress(); // for changing s-sbar production
|
||||
StrangeSuppress=0.41; //0.41; 0.47
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
StrangeSuppress=StrSup;
|
||||
|
||||
created = QuarkPair.second;
|
||||
created = QuarkPair.second;
|
||||
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
return had;
|
||||
// return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
}
|
||||
}
|
||||
// Uzhi June 2014 End of the inserting
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4KineticTrack * G4QGSMFragmentation::Splitup( // Uzhi 28 June 2016
|
||||
G4FragmentingString *string,
|
||||
G4FragmentingString *&newString)
|
||||
{
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<G4endl;
|
||||
G4cout<<"Start SplitUP (G4VLongitudinalStringDecay) ========================="<<G4endl;
|
||||
G4cout<<"String partons: " <<string->GetLeftParton()->GetPDGEncoding()<<" "
|
||||
<<string->GetRightParton()->GetPDGEncoding()<<" "
|
||||
<<"Direction " <<string->GetDecayDirection()<<G4endl;
|
||||
#endif
|
||||
|
||||
//... random choice of string end to use for creating the hadron (decay)
|
||||
G4int SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
|
||||
if (SideOfDecay < 0)
|
||||
{
|
||||
string->SetLeftPartonStable();
|
||||
} else
|
||||
{
|
||||
string->SetRightPartonStable();
|
||||
}
|
||||
|
||||
G4ParticleDefinition *newStringEnd;
|
||||
G4ParticleDefinition * HadronDefinition;
|
||||
if (string->DecayIsQuark())
|
||||
{
|
||||
HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
} else {
|
||||
HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
}
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"The parton "<<string->GetDecayParton()->GetPDGEncoding()<<" "
|
||||
<<" produces hadron "<<HadronDefinition->GetParticleName()
|
||||
<<" and is transformed to "<<newStringEnd->GetPDGEncoding()<<G4endl;
|
||||
G4cout<<"The side of the string decay Left/Right (1/-1) "<<SideOfDecay<<G4endl;
|
||||
#endif
|
||||
// create new String from old, ie. keep Left and Right order, but replace decay
|
||||
|
||||
newString=new G4FragmentingString(*string,newStringEnd); // To store possible
|
||||
// quark containt of new string
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"An attempt to determine its energy (SplitEandP)"<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString);
|
||||
|
||||
delete newString; newString=0;
|
||||
|
||||
G4KineticTrack * Hadron =0;
|
||||
if ( HadronMomentum != 0 ) {
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"The attempt was successful"<<G4endl;
|
||||
#endif
|
||||
G4ThreeVector Pos;
|
||||
Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
|
||||
|
||||
newString=new G4FragmentingString(*string,newStringEnd,
|
||||
HadronMomentum);
|
||||
|
||||
delete HadronMomentum;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#ifdef debug_QGSMfragmentation
|
||||
G4cout<<"The attempt was not successful !!!"<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"End SplitUP (G4VLongitudinalStringDecay) ====================="<<G4endl;
|
||||
#endif
|
||||
|
||||
return Hadron;
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
return had;
|
||||
//return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-22
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VKinkyStringDecay.cc 102717 2017-02-20 10:37:13Z gcosmo $
|
||||
// $Id: G4VKinkyStringDecay.cc 106967 2017-10-31 08:41:49Z gcosmo $
|
||||
// Maxim Komogorov
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -41,14 +41,14 @@
|
||||
//*****************************************************************************************************
|
||||
|
||||
G4VKinkyStringDecay::G4VKinkyStringDecay(G4VLongitudinalStringDecay* theModal)
|
||||
{
|
||||
this->SetLongitudinalStringDecay(theModal);
|
||||
}
|
||||
{
|
||||
this->SetLongitudinalStringDecay(theModal);
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
|
||||
G4double G4VKinkyStringDecay::GetLightConeGluonZ(G4double zmin, G4double zmax)
|
||||
{
|
||||
{
|
||||
G4double z, yf;
|
||||
do {
|
||||
z = zmin + G4UniformRand()*(zmax-zmin);
|
||||
@@ -56,12 +56,12 @@ G4double G4VKinkyStringDecay::GetLightConeGluonZ(G4double zmin, G4double zmax)
|
||||
}
|
||||
while (G4UniformRand() > yf); /* Loop checking, 07.08.2015, A.Ribon */
|
||||
return z;
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
|
||||
G4KineticTrackVector* G4VKinkyStringDecay::FragmentString(const G4ExcitedString& String)
|
||||
{
|
||||
{
|
||||
G4LorentzVector Mom = String.GetGluon()->Get4Momentum();
|
||||
G4ThreeVector Pos = String.GetGluon()->GetPosition();
|
||||
G4int QuarkEncoding = theLongitudinalStringDecay->SampleQuarkFlavor();
|
||||
@@ -97,20 +97,7 @@ G4KineticTrackVector* G4VKinkyStringDecay::FragmentString(const G4ExcitedString&
|
||||
KTV1->erase(KTV1->end()-1);
|
||||
}
|
||||
return KTV1;
|
||||
}
|
||||
}
|
||||
|
||||
//*****************************************************************************************************
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+385
-363
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VLongitudinalStringDecay.cc 102717 2017-02-20 10:37:13Z gcosmo $
|
||||
// $Id: G4VLongitudinalStringDecay.cc 106967 2017-10-31 08:41:49Z gcosmo $
|
||||
//
|
||||
// -----------------------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -64,58 +64,55 @@
|
||||
|
||||
G4VLongitudinalStringDecay::G4VLongitudinalStringDecay()
|
||||
{
|
||||
MassCut = 0.35*GeV;
|
||||
ClusterMass = 0.15*GeV;
|
||||
MassCut = 0.35*GeV;
|
||||
ClusterMass = 0.15*GeV;
|
||||
|
||||
SmoothParam = 0.9;
|
||||
StringLoopInterrupt = 1000;
|
||||
ClusterLoopInterrupt = 500;
|
||||
SmoothParam = 0.9;
|
||||
StringLoopInterrupt = 1000;
|
||||
ClusterLoopInterrupt = 500;
|
||||
|
||||
// Changable Parameters below.
|
||||
SigmaQT = 0.5 * GeV;
|
||||
// Changable Parameters below.
|
||||
SigmaQT = 0.5 * GeV; // 0.5 0.1
|
||||
|
||||
StrangeSuppress = 0.44; // 27 % strange quarks produced, ie. u:d:s=1:1:0.27
|
||||
DiquarkSuppress = 0.07;
|
||||
DiquarkBreakProb = 0.1;
|
||||
StrangeSuppress = 0.44; // 27 % strange quarks produced, ie. u:d:s=1:1:0.27
|
||||
DiquarkSuppress = 0.07;
|
||||
DiquarkBreakProb = 0.1;
|
||||
|
||||
//... pspin_meson is probability to create pseudo-scalar meson
|
||||
pspin_meson = 0.5;
|
||||
//... pspin_meson is probability to create pseudo-scalar meson
|
||||
pspin_meson = 0.5;
|
||||
|
||||
//... pspin_barion is probability to create 1/2 barion
|
||||
pspin_barion = 0.5;
|
||||
//... pspin_barion is probability to create 1/2 barion
|
||||
pspin_barion = 0.5;
|
||||
|
||||
//... vectorMesonMix[] is quark mixing parameters for vector mesons (Variable spin = 3)
|
||||
vectorMesonMix.resize(6);
|
||||
vectorMesonMix[0] = 0.5; // Uzhi May 2016 //AR-20Oct2014 : it was 0.5
|
||||
vectorMesonMix[1] = 0.0;
|
||||
vectorMesonMix[2] = 0.5; // Uzhi May 2016 //AR-20Oct2014 : it was 0.5
|
||||
vectorMesonMix[3] = 0.0;
|
||||
vectorMesonMix[4] = 1.0;
|
||||
vectorMesonMix[5] = 1.0;
|
||||
|
||||
//... scalarMesonMix[] is quark mixing parameters for scalar mesons (Variable spin=1)
|
||||
scalarMesonMix.resize(6);
|
||||
scalarMesonMix[0] = 0.5;
|
||||
scalarMesonMix[1] = 0.25;
|
||||
scalarMesonMix[2] = 0.5;
|
||||
scalarMesonMix[3] = 0.25;
|
||||
scalarMesonMix[4] = 1.0;
|
||||
scalarMesonMix[5] = 0.5;
|
||||
|
||||
// Parameters may be changed until the first fragmentation starts
|
||||
PastInitPhase=false;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
|
||||
scalarMesonMix,vectorMesonMix);
|
||||
Kappa = 1.0 * GeV/fermi;
|
||||
//... vectorMesonMix[] is quark mixing parameters for vector mesons (Variable spin = 3)
|
||||
vectorMesonMix.resize(6);
|
||||
vectorMesonMix[0] = 0.0; //AR-20Oct2014 : it was 0.5
|
||||
vectorMesonMix[1] = 0.0;
|
||||
vectorMesonMix[2] = 0.0; //AR-20Oct2014 : it was 0.5
|
||||
vectorMesonMix[3] = 0.0;
|
||||
vectorMesonMix[4] = 1.0;
|
||||
vectorMesonMix[5] = 1.0;
|
||||
|
||||
//... scalarMesonMix[] is quark mixing parameters for scalar mesons (Variable spin=1)
|
||||
scalarMesonMix.resize(6);
|
||||
scalarMesonMix[0] = 0.5;
|
||||
scalarMesonMix[1] = 0.25;
|
||||
scalarMesonMix[2] = 0.5;
|
||||
scalarMesonMix[3] = 0.25;
|
||||
scalarMesonMix[4] = 1.0;
|
||||
scalarMesonMix[5] = 0.5;
|
||||
|
||||
// Parameters may be changed until the first fragmentation starts
|
||||
PastInitPhase=false;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,scalarMesonMix,vectorMesonMix);
|
||||
Kappa = 1.0 * GeV/fermi;
|
||||
}
|
||||
|
||||
|
||||
G4VLongitudinalStringDecay::~G4VLongitudinalStringDecay()
|
||||
{
|
||||
delete hadronizer;
|
||||
}
|
||||
{
|
||||
delete hadronizer;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@@ -124,167 +121,154 @@ G4VLongitudinalStringDecay::~G4VLongitudinalStringDecay()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
int G4VLongitudinalStringDecay::operator==(const G4VLongitudinalStringDecay &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::operator== forbidden");
|
||||
return false;
|
||||
}
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::operator== forbidden");
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
|
||||
int G4VLongitudinalStringDecay::operator!=(const G4VLongitudinalStringDecay &) const
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::operator!= forbidden");
|
||||
return true;
|
||||
}
|
||||
{
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::operator!= forbidden");
|
||||
return true;
|
||||
}
|
||||
|
||||
//***********************************************************************************
|
||||
|
||||
// For changing Mass Cut used for selection of very small mass strings
|
||||
void G4VLongitudinalStringDecay::SetMassCut(G4double aValue){MassCut=aValue;}
|
||||
G4double G4VLongitudinalStringDecay::GetMassCut(){return MassCut;}
|
||||
void G4VLongitudinalStringDecay::SetMassCut(G4double aValue){MassCut=aValue;}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// For handling a string with very low mass
|
||||
|
||||
G4KineticTrackVector* G4VLongitudinalStringDecay::LightFragmentationTest(const
|
||||
G4ExcitedString * const string)
|
||||
G4KineticTrackVector* G4VLongitudinalStringDecay::
|
||||
LightFragmentationTest(const G4ExcitedString * const string)
|
||||
{
|
||||
// Check string decay threshold
|
||||
G4KineticTrackVector * result=0; // return 0 when string exceeds the mass cut
|
||||
// Check string decay threshold
|
||||
G4KineticTrackVector * result=0; // return 0 when string exceeds the mass cut
|
||||
|
||||
pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0);
|
||||
pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0);
|
||||
|
||||
G4FragmentingString aString(*string);
|
||||
if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {
|
||||
return 0;
|
||||
}
|
||||
G4FragmentingString aString(*string);
|
||||
if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// The string mass is very low ---------------------------
|
||||
// The string mass is very low ---------------------------
|
||||
|
||||
result=new G4KineticTrackVector;
|
||||
result=new G4KineticTrackVector;
|
||||
|
||||
if ( hadrons.second ==0 )
|
||||
{
|
||||
// Substitute string by light hadron, Note that Energy is not conserved here!
|
||||
if ( hadrons.second ==0 ) {
|
||||
// Substitute string by light hadron, Note that Energy is not conserved here!
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout << "VlongSF Warning replacing string by single hadron (G4VLongitudinalStringDecay)" <<G4endl;
|
||||
G4cout << hadrons.first->GetParticleName()<<G4endl
|
||||
<< "string .. " << string->Get4Momentum() << " "
|
||||
<< string->Get4Momentum().m() << G4endl;
|
||||
#endif
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout << "VlongSF Warning replacing string by single hadron (G4VLongitudinalStringDecay)" <<G4endl;
|
||||
G4cout << hadrons.first->GetParticleName()<<G4endl
|
||||
<< "string .. " << string->Get4Momentum() << " "
|
||||
<< string->Get4Momentum().m() << G4endl;
|
||||
#endif
|
||||
|
||||
G4ThreeVector Mom3 = string->Get4Momentum().vect();
|
||||
G4LorentzVector Mom(Mom3,
|
||||
std::sqrt(Mom3.mag2() +
|
||||
sqr(hadrons.first->GetPDGMass())));
|
||||
result->push_back(new G4KineticTrack(hadrons.first, 0,
|
||||
string->GetPosition(),
|
||||
Mom));
|
||||
} else
|
||||
{
|
||||
//... string was qq--qqbar type: Build two stable hadrons,
|
||||
G4ThreeVector Mom3 = string->Get4Momentum().vect();
|
||||
G4LorentzVector Mom(Mom3, std::sqrt(Mom3.mag2() + sqr(hadrons.first->GetPDGMass())));
|
||||
result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom));
|
||||
} else {
|
||||
//... string was qq--qqbar type: Build two stable hadrons,
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons (G4VLongitudinalStringDecay)"
|
||||
<< hadrons.first->GetParticleName() << " / "
|
||||
<< hadrons.second->GetParticleName()
|
||||
<< "string .. " << string->Get4Momentum() << " "
|
||||
<< string->Get4Momentum().m() << G4endl;
|
||||
#endif
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons (G4VLongitudinalStringDecay)"
|
||||
<< hadrons.first->GetParticleName() << " / "
|
||||
<< hadrons.second->GetParticleName()
|
||||
<< "string .. " << string->Get4Momentum() << " "
|
||||
<< string->Get4Momentum().m() << G4endl;
|
||||
#endif
|
||||
|
||||
G4LorentzVector Mom1, Mom2;
|
||||
Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(),
|
||||
&Mom2,hadrons.second->GetPDGMass(),
|
||||
string->Get4Momentum().mag());
|
||||
G4LorentzVector Mom1, Mom2;
|
||||
Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(), &Mom2,hadrons.second->GetPDGMass(),
|
||||
string->Get4Momentum().mag());
|
||||
|
||||
result->push_back(new G4KineticTrack(hadrons.first, 0,
|
||||
string->GetPosition(),
|
||||
Mom1));
|
||||
result->push_back(new G4KineticTrack(hadrons.second, 0,
|
||||
string->GetPosition(),
|
||||
Mom2));
|
||||
result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom1));
|
||||
result->push_back(new G4KineticTrack(hadrons.second, 0, string->GetPosition(), Mom2));
|
||||
|
||||
G4ThreeVector Velocity = string->Get4Momentum().boostVector();
|
||||
result->Boost(Velocity);
|
||||
}
|
||||
G4ThreeVector Velocity = string->Get4Momentum().boostVector();
|
||||
result->Boost(Velocity);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
G4double G4VLongitudinalStringDecay::FragmentationMass(
|
||||
const G4FragmentingString * const string,
|
||||
Pcreate build, pDefPair * pdefs )
|
||||
G4double G4VLongitudinalStringDecay::
|
||||
FragmentationMass( const G4FragmentingString * const string, Pcreate build, pDefPair * pdefs )
|
||||
{
|
||||
G4double mass;
|
||||
static G4ThreadLocal G4bool NeedInit(true);
|
||||
static G4ThreadLocal std::vector<double> *nomix_G4MT_TLS_ = 0 ; if (!nomix_G4MT_TLS_) nomix_G4MT_TLS_ = new std::vector<double> ; std::vector<double> &nomix = *nomix_G4MT_TLS_;
|
||||
static G4ThreadLocal G4HadronBuilder * minMassHadronizer;
|
||||
if ( NeedInit )
|
||||
{
|
||||
NeedInit = false;
|
||||
nomix.resize(6);
|
||||
for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;
|
||||
G4double mass;
|
||||
static G4ThreadLocal G4bool NeedInit(true);
|
||||
static G4ThreadLocal std::vector<double> *nomix_G4MT_TLS_ = 0 ;
|
||||
if (!nomix_G4MT_TLS_) nomix_G4MT_TLS_ = new std::vector<double>;
|
||||
std::vector<double> &nomix = *nomix_G4MT_TLS_;
|
||||
static G4ThreadLocal G4HadronBuilder * minMassHadronizer;
|
||||
if ( NeedInit )
|
||||
{
|
||||
NeedInit = false;
|
||||
nomix.resize(6);
|
||||
for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;
|
||||
|
||||
// minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);
|
||||
minMassHadronizer=hadronizer;
|
||||
}
|
||||
//minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);
|
||||
minMassHadronizer=hadronizer;
|
||||
}
|
||||
|
||||
if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;
|
||||
if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;
|
||||
|
||||
G4ParticleDefinition *Hadron1, *Hadron2=0;
|
||||
G4ParticleDefinition *Hadron1, *Hadron2=0;
|
||||
|
||||
if (!string->FourQuarkString() )
|
||||
{
|
||||
// spin 0 meson or spin 1/2 barion will be built
|
||||
if (!string->FourQuarkString() )
|
||||
{
|
||||
// spin 0 meson or spin 1/2 barion will be built
|
||||
|
||||
Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
|
||||
string->GetRightParton());
|
||||
Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(), string->GetRightParton());
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"Quarks at the string ends "<<string->GetLeftParton()->GetParticleName()<<" "<<string->GetRightParton()->GetParticleName()<<G4endl;
|
||||
G4cout<<"(G4VLongitudinalStringDecay) Hadron "<<Hadron1->GetParticleName()<<" "<<Hadron1->GetPDGMass()<<G4endl;
|
||||
#endif
|
||||
mass= (Hadron1)->GetPDGMass();
|
||||
} else
|
||||
{
|
||||
//... string is qq--qqbar: Build two stable hadrons,
|
||||
//... with extra uubar or ddbar quark pair
|
||||
G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
|
||||
if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"Quarks at the string ends "<<string->GetLeftParton()->GetParticleName()
|
||||
<<" "<<string->GetRightParton()->GetParticleName()<<G4endl;
|
||||
G4cout<<"(G4VLongitudinalStringDecay) Hadron "<<Hadron1->GetParticleName()<<" "<<Hadron1->GetPDGMass()<<G4endl;
|
||||
#endif
|
||||
|
||||
//... theSpin = 4; spin 3/2 baryons will be built
|
||||
Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
|
||||
FindParticle(iflc) );
|
||||
Hadron2 = (minMassHadronizer->*build)(string->GetRightParton(),
|
||||
FindParticle(-iflc) );
|
||||
mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
|
||||
}
|
||||
mass= (Hadron1)->GetPDGMass();
|
||||
} else {
|
||||
//... string is qq--qqbar: Build two stable hadrons,
|
||||
//... with extra uubar or ddbar quark pair
|
||||
G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
|
||||
if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;
|
||||
|
||||
//... theSpin = 4; spin 3/2 baryons will be built
|
||||
Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(), FindParticle(iflc));
|
||||
Hadron2 = (minMassHadronizer->*build)(string->GetRightParton(), FindParticle(-iflc));
|
||||
mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
|
||||
}
|
||||
|
||||
if ( pdefs != 0 )
|
||||
{ // need to return hadrons as well....
|
||||
pdefs->first = Hadron1;
|
||||
pdefs->second = Hadron2;
|
||||
}
|
||||
if ( pdefs != 0 )
|
||||
{ // need to return hadrons as well....
|
||||
pdefs->first = Hadron1;
|
||||
pdefs->second = Hadron2;
|
||||
}
|
||||
|
||||
return mass;
|
||||
return mass;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding)
|
||||
{
|
||||
G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding);
|
||||
if (ptr == NULL)
|
||||
{
|
||||
G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
{
|
||||
G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding);
|
||||
if (ptr == NULL)
|
||||
{
|
||||
G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;
|
||||
throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
|
||||
//*********************************************************************************
|
||||
// For decision on continue or stop string fragmentation
|
||||
@@ -297,320 +281,358 @@ G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding)
|
||||
// G4KineticTrackVector * RightVector)=0;
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// If a string can fragment, do the following
|
||||
// If a string fragments, do the following
|
||||
//
|
||||
// For transver of a string to its CMS frame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4ExcitedString *G4VLongitudinalStringDecay::CopyExcited(const G4ExcitedString & in)
|
||||
G4ExcitedString *G4VLongitudinalStringDecay::CPExcited(const G4ExcitedString & in)
|
||||
{
|
||||
G4Parton *Left=new G4Parton(*in.GetLeftParton());
|
||||
G4Parton *Right=new G4Parton(*in.GetRightParton());
|
||||
return new G4ExcitedString(Left,Right,in.GetDirection());
|
||||
G4Parton *Left=new G4Parton(*in.GetLeftParton());
|
||||
G4Parton *Right=new G4Parton(*in.GetRightParton());
|
||||
return new G4ExcitedString(Left,Right,in.GetDirection());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/* // Uzhi 28 June 2016, shifted to FTF and QGSM
|
||||
G4KineticTrack * G4VLongitudinalStringDecay::Splitup(
|
||||
G4FragmentingString *string,
|
||||
G4FragmentingString *&newString)
|
||||
|
||||
G4KineticTrack * G4VLongitudinalStringDecay::
|
||||
Splitup( G4FragmentingString *string, G4FragmentingString *&newString)
|
||||
{
|
||||
G4cout<<"G4VLongStrDeca Splitup ----------------------"<<G4endl;
|
||||
#ifdef debug_VStringDecay
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<G4endl;
|
||||
G4cout<<"Start SplitUP (G4VLongitudinalStringDecay) ========================="<<G4endl;
|
||||
G4cout<<"String partons: " <<string->GetLeftParton()->GetPDGEncoding()<<" "
|
||||
<<string->GetRightParton()->GetPDGEncoding()<<" "
|
||||
<<"Direction " <<string->GetDecayDirection()<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//... random choice of string end to use for creating the hadron (decay)
|
||||
G4int SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
|
||||
if (SideOfDecay < 0)
|
||||
{
|
||||
string->SetLeftPartonStable();
|
||||
} else
|
||||
{
|
||||
string->SetRightPartonStable();
|
||||
}
|
||||
//... random choice of string end to use for creating the hadron (decay)
|
||||
G4int SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
|
||||
if (SideOfDecay < 0)
|
||||
{
|
||||
string->SetLeftPartonStable();
|
||||
} else {
|
||||
string->SetRightPartonStable();
|
||||
}
|
||||
|
||||
G4ParticleDefinition *newStringEnd;
|
||||
G4ParticleDefinition * HadronDefinition;
|
||||
if (string->DecayIsQuark())
|
||||
{
|
||||
HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
} else {
|
||||
HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
}
|
||||
G4ParticleDefinition *newStringEnd;
|
||||
G4ParticleDefinition * HadronDefinition;
|
||||
if (string->DecayIsQuark())
|
||||
{
|
||||
HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
} else {
|
||||
HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
|
||||
}
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"The parton "<<string->GetDecayParton()->GetPDGEncoding()<<" "
|
||||
<<" produces hadron "<<HadronDefinition->GetParticleName()
|
||||
<<" and is transformed to "<<newStringEnd->GetPDGEncoding()<<G4endl;
|
||||
G4cout<<"The side of the string decay Left/Right (1/-1) "<<SideOfDecay<<G4endl;
|
||||
#endif
|
||||
// create new String from old, ie. keep Left and Right order, but replace decay
|
||||
#endif
|
||||
// create new String from old, ie. keep Left and Right order, but replace decay
|
||||
|
||||
newString=new G4FragmentingString(*string,newStringEnd); // To store possible
|
||||
// quark containt of new string
|
||||
newString=new G4FragmentingString(*string,newStringEnd); // To store possible quark containt of new string
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"An attempt to determine its energy (SplitEandP)"<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString);
|
||||
#endif
|
||||
|
||||
delete newString; newString=0;
|
||||
G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString);
|
||||
|
||||
delete newString; newString=0;
|
||||
|
||||
G4KineticTrack * Hadron =0;
|
||||
if ( HadronMomentum != 0 ) {
|
||||
G4KineticTrack * Hadron =0;
|
||||
if ( HadronMomentum != 0 ) {
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"The attempt was successful"<<G4endl;
|
||||
#endif
|
||||
G4ThreeVector Pos;
|
||||
Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"The attempt was successful"<<G4endl;
|
||||
#endif
|
||||
|
||||
if(HadronDefinition->GetPDGIsospin() >= 1.5) { // Uzhi June 2016
|
||||
G4LorentzVector* Tmp = new G4LorentzVector(*HadronMomentum);
|
||||
G4double HadMass2 = Tmp->mag2();
|
||||
G4ThreeVector Pos;
|
||||
Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
|
||||
|
||||
newString=new G4FragmentingString(*string,newStringEnd,HadronMomentum);
|
||||
|
||||
Tmp->setPx(0.); Tmp->setPy(0.);
|
||||
Tmp->setE(std::sqrt(Tmp->vect().mag2()+HadMass2));
|
||||
newString=new G4FragmentingString(*string,newStringEnd,
|
||||
Tmp);
|
||||
delete Tmp; // Uzhi June 2016
|
||||
} else {
|
||||
newString=new G4FragmentingString(*string,newStringEnd,
|
||||
HadronMomentum);
|
||||
}
|
||||
delete HadronMomentum;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete HadronMomentum;
|
||||
} else {
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"The attempt was not successful !!!"<<G4endl;
|
||||
#endif
|
||||
}
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"The attempt was not successful !!!"<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef debug_VStringDecay
|
||||
#ifdef debug_VStringDecay
|
||||
G4cout<<"End SplitUP (G4VLongitudinalStringDecay) ====================="<<G4endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return Hadron;
|
||||
return Hadron;
|
||||
}
|
||||
*/ // Uzhi 28 June 2016, shifted to FTF and QGSM
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
G4ParticleDefinition *
|
||||
G4VLongitudinalStringDecay::QuarkSplitup(G4ParticleDefinition*
|
||||
decay, G4ParticleDefinition *&created)
|
||||
G4ParticleDefinition * G4VLongitudinalStringDecay::
|
||||
QuarkSplitup(G4ParticleDefinition* decay, G4ParticleDefinition *&created)
|
||||
{
|
||||
G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark,
|
||||
// we need antiquark
|
||||
// (or diquark)
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle);
|
||||
created = QuarkPair.second;
|
||||
return hadronizer->Build(QuarkPair.first, decay);
|
||||
|
||||
// if we have a quark, we need antiquark (or diquark)
|
||||
G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1;
|
||||
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle);
|
||||
created = QuarkPair.second;
|
||||
return hadronizer->Build(QuarkPair.first, decay);
|
||||
}
|
||||
|
||||
/* Uzhi June 2014
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4ParticleDefinition *G4VLongitudinalStringDecay::
|
||||
DiQuarkSplitup(G4ParticleDefinition* decay, G4ParticleDefinition *&created)
|
||||
{
|
||||
//... can Diquark break or not?
|
||||
if (G4UniformRand() < DiquarkBreakProb ){
|
||||
|
||||
//... Diquark break
|
||||
|
||||
G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
|
||||
G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
|
||||
if (G4UniformRand() < 0.5)
|
||||
{
|
||||
G4int Swap = stableQuarkEncoding;
|
||||
stableQuarkEncoding = decayQuarkEncoding;
|
||||
decayQuarkEncoding = Swap;
|
||||
}
|
||||
|
||||
G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; // if we have a quark, we need antiquark
|
||||
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
|
||||
//... Build new Diquark
|
||||
G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
|
||||
G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
|
||||
G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
|
||||
G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
|
||||
created = FindParticle(NewDecayEncoding);
|
||||
G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
return had;
|
||||
//return hadronizer->Build(QuarkPair.first, decayQuark);
|
||||
|
||||
} else {
|
||||
//... Diquark does not break
|
||||
|
||||
G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1; // if we have a diquark, we need quark
|
||||
pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
|
||||
created = QuarkPair.second;
|
||||
|
||||
G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
return had;
|
||||
//return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
|
||||
}
|
||||
}
|
||||
*/ // Uzhi June 2014
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4int G4VLongitudinalStringDecay::SampleQuarkFlavor(void)
|
||||
{
|
||||
return (1 + (int)(G4UniformRand()/StrangeSuppress));
|
||||
}
|
||||
{
|
||||
return (1 + (int)(G4UniformRand()/StrangeSuppress));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::CreatePartonPair(G4int NeedParticle,G4bool AllowDiquarks)
|
||||
G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::
|
||||
CreatePartonPair(G4int NeedParticle,G4bool AllowDiquarks)
|
||||
{
|
||||
// NeedParticle = +1 for Particle, -1 for Antiparticle
|
||||
// NeedParticle = +1 for Particle, -1 for Antiparticle
|
||||
|
||||
if ( AllowDiquarks && G4UniformRand() < DiquarkSuppress )
|
||||
{
|
||||
// Create a Diquark - AntiDiquark pair , first in pair is anti to IsParticle
|
||||
G4int q1 = SampleQuarkFlavor();
|
||||
G4int q2 = SampleQuarkFlavor();
|
||||
G4int spin = (q1 != q2 && G4UniformRand() <= 0.5)? 1 : 3;
|
||||
// convention: quark with higher PDG number is first
|
||||
G4int PDGcode = (std::max(q1,q2) * 1000 + std::min(q1,q2) * 100 + spin) * NeedParticle;
|
||||
return pDefPair (FindParticle(-PDGcode),FindParticle(PDGcode));
|
||||
|
||||
|
||||
} else {
|
||||
// Create a Quark - AntiQuark pair, first in pair IsParticle
|
||||
G4int PDGcode=SampleQuarkFlavor()*NeedParticle;
|
||||
return pDefPair (FindParticle(PDGcode),FindParticle(-PDGcode));
|
||||
}
|
||||
if ( AllowDiquarks && G4UniformRand() < DiquarkSuppress )
|
||||
{
|
||||
// Create a Diquark - AntiDiquark pair , first in pair is anti to IsParticle
|
||||
G4int q1 = SampleQuarkFlavor();
|
||||
G4int q2 = SampleQuarkFlavor();
|
||||
G4int spin = (q1 != q2 && G4UniformRand() <= 0.5)? 1 : 3;
|
||||
// Convention: quark with higher PDG number is first
|
||||
G4int PDGcode = (std::max(q1,q2) * 1000 + std::min(q1,q2) * 100 + spin) * NeedParticle;
|
||||
return pDefPair (FindParticle(-PDGcode),FindParticle(PDGcode));
|
||||
} else {
|
||||
// Create a Quark - AntiQuark pair, first in pair IsParticle
|
||||
G4int PDGcode=SampleQuarkFlavor()*NeedParticle;
|
||||
return pDefPair (FindParticle(PDGcode),FindParticle(-PDGcode));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt(G4double ptMax)
|
||||
{
|
||||
G4double Pt;
|
||||
if ( ptMax < 0 ) {
|
||||
// sample full gaussian
|
||||
Pt = -G4Log(G4UniformRand());
|
||||
} else {
|
||||
// sample in limited range
|
||||
Pt = -G4Log(G4RandFlat::shoot(G4Exp(-sqr(ptMax)/sqr(SigmaQT)), 1.));
|
||||
}
|
||||
Pt = SigmaQT * std::sqrt(Pt);
|
||||
G4double phi = 2.*pi*G4UniformRand();
|
||||
return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0);
|
||||
}
|
||||
{
|
||||
G4double Pt;
|
||||
if ( ptMax < 0 ) {
|
||||
// sample full gaussian
|
||||
Pt = -G4Log(G4UniformRand());
|
||||
} else {
|
||||
// sample in limited range
|
||||
Pt = -G4Log(G4RandFlat::shoot(G4Exp(-sqr(ptMax)/sqr(SigmaQT)), 1.));
|
||||
}
|
||||
Pt = SigmaQT * std::sqrt(Pt);
|
||||
G4double phi = 2.*pi*G4UniformRand();
|
||||
return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
||||
void G4VLongitudinalStringDecay::CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector* Hadrons)
|
||||
{
|
||||
void G4VLongitudinalStringDecay::
|
||||
CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector* Hadrons)
|
||||
{
|
||||
// 'yo-yo' formation time
|
||||
//const G4double kappa = 1.0 * GeV/fermi/4.;
|
||||
G4double kappa = GetStringTensionParameter();
|
||||
for(size_t c1 = 0; c1 < Hadrons->size(); c1++)
|
||||
{
|
||||
G4double SumPz = 0;
|
||||
G4double SumE = 0;
|
||||
for(size_t c2 = 0; c2 < c1; c2++)
|
||||
{
|
||||
SumPz += Hadrons->operator[](c2)->Get4Momentum().pz();
|
||||
SumE += Hadrons->operator[](c2)->Get4Momentum().e();
|
||||
}
|
||||
G4double HadronE = Hadrons->operator[](c1)->Get4Momentum().e();
|
||||
G4double HadronPz = Hadrons->operator[](c1)->Get4Momentum().pz();
|
||||
Hadrons->operator[](c1)->SetFormationTime(
|
||||
(theInitialStringMass - 2.*SumPz + HadronE - HadronPz)/(2.*kappa)/c_light );
|
||||
|
||||
// `yo-yo` formation time
|
||||
// const G4double kappa = 1.0 * GeV/fermi/4.;
|
||||
G4double kappa = GetStringTensionParameter();
|
||||
for(size_t c1 = 0; c1 < Hadrons->size(); c1++)
|
||||
{
|
||||
G4double SumPz = 0;
|
||||
G4double SumE = 0;
|
||||
for(size_t c2 = 0; c2 < c1; c2++)
|
||||
{
|
||||
SumPz += Hadrons->operator[](c2)->Get4Momentum().pz();
|
||||
SumE += Hadrons->operator[](c2)->Get4Momentum().e();
|
||||
}
|
||||
G4double HadronE = Hadrons->operator[](c1)->Get4Momentum().e();
|
||||
G4double HadronPz = Hadrons->operator[](c1)->Get4Momentum().pz();
|
||||
Hadrons->operator[](c1)->SetFormationTime(
|
||||
(theInitialStringMass - 2.*SumPz + HadronE - HadronPz)/(2.*kappa)/c_light);
|
||||
G4ThreeVector aPosition(0, 0, (theInitialStringMass - 2.*SumE - HadronE + HadronPz)/(2.*kappa));
|
||||
Hadrons->operator[](c1)->SetPosition(aPosition);
|
||||
|
||||
G4ThreeVector aPosition(0, 0,
|
||||
(theInitialStringMass - 2.*SumE - HadronE + HadronPz)/(2.*kappa));
|
||||
Hadrons->operator[](c1)->SetPosition(aPosition);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
|
||||
} else {
|
||||
SigmaQT = aValue;
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
|
||||
} else {
|
||||
SigmaQT = aValue;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetStrangenessSuppression(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");
|
||||
} else {
|
||||
StrangeSuppress = aValue;
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");
|
||||
} else {
|
||||
StrangeSuppress = aValue;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetDiquarkSuppression(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetDiquarkSuppression after FragmentString() not allowed");
|
||||
} else {
|
||||
DiquarkSuppress = aValue;
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"4VLongitudinalStringDecay::SetDiquarkSuppression after FragmentString() not allowed");
|
||||
} else {
|
||||
DiquarkSuppress = aValue;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetDiquarkBreakProbability(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetDiquarkBreakProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
DiquarkBreakProb = aValue;
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"4VLongitudinalStringDecay::SetDiquarkBreakProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
DiquarkBreakProb = aValue;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetVectorMesonProbability(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
pspin_meson = aValue;
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
|
||||
scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetVectorMesonProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
pspin_meson = aValue;
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability(G4double aValue)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
pspin_barion = aValue;
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
|
||||
scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability after FragmentString() not allowed");
|
||||
} else {
|
||||
pspin_barion = aValue;
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetScalarMesonMixings(std::vector<G4double> aVector)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetScalarMesonMixings after FragmentString() not allowed");
|
||||
} else {
|
||||
if ( aVector.size() < 6 )
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetScalarMesonMixings( argument Vector too small");
|
||||
scalarMesonMix[0] = aVector[0];
|
||||
scalarMesonMix[1] = aVector[1];
|
||||
scalarMesonMix[2] = aVector[2];
|
||||
scalarMesonMix[3] = aVector[3];
|
||||
scalarMesonMix[4] = aVector[4];
|
||||
scalarMesonMix[5] = aVector[5];
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
|
||||
scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetScalarMesonMixings after FragmentString() not allowed");
|
||||
} else {
|
||||
if ( aVector.size() < 6 )
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetScalarMesonMixings( argument Vector too small");
|
||||
scalarMesonMix[0] = aVector[0];
|
||||
scalarMesonMix[1] = aVector[1];
|
||||
scalarMesonMix[2] = aVector[2];
|
||||
scalarMesonMix[3] = aVector[3];
|
||||
scalarMesonMix[4] = aVector[4];
|
||||
scalarMesonMix[5] = aVector[5];
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
|
||||
void G4VLongitudinalStringDecay::SetVectorMesonMixings(std::vector<G4double> aVector)
|
||||
{
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonMixings after FragmentString() not allowed");
|
||||
} else {
|
||||
if ( aVector.size() < 6 )
|
||||
throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonMixings( argument Vector too small");
|
||||
vectorMesonMix[0] = aVector[0];
|
||||
vectorMesonMix[1] = aVector[1];
|
||||
vectorMesonMix[2] = aVector[2];
|
||||
vectorMesonMix[3] = aVector[3];
|
||||
vectorMesonMix[4] = aVector[4];
|
||||
vectorMesonMix[5] = aVector[5];
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
|
||||
scalarMesonMix,vectorMesonMix);
|
||||
|
||||
}
|
||||
if ( PastInitPhase ) {
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetVectorMesonMixings after FragmentString() not allowed");
|
||||
} else {
|
||||
if ( aVector.size() < 6 )
|
||||
throw G4HadronicException(__FILE__, __LINE__,
|
||||
"G4VLongitudinalStringDecay::SetVectorMesonMixings( argument Vector too small");
|
||||
vectorMesonMix[0] = aVector[0];
|
||||
vectorMesonMix[1] = aVector[1];
|
||||
vectorMesonMix[2] = aVector[2];
|
||||
vectorMesonMix[3] = aVector[3];
|
||||
vectorMesonMix[4] = aVector[4];
|
||||
vectorMesonMix[5] = aVector[5];
|
||||
delete hadronizer;
|
||||
hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,scalarMesonMix,vectorMesonMix);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
void G4VLongitudinalStringDecay::SetStringTensionParameter(G4double aValue)
|
||||
{
|
||||
Kappa = aValue * GeV/fermi;
|
||||
Kappa = aValue * GeV/fermi;
|
||||
}
|
||||
//**************************************************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user