Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -133,10 +133,12 @@ namespace G4INCL {
|
||||
theParticle->setHelicity(0.0);
|
||||
|
||||
ParticleType pionType;
|
||||
G4int deltaPDGCode = 0;
|
||||
switch(theParticle->getType()) {
|
||||
case DeltaPlusPlus:
|
||||
theParticle->setType(Proton);
|
||||
pionType = PiPlus;
|
||||
deltaPDGCode = 2224;
|
||||
break;
|
||||
case DeltaPlus:
|
||||
if(Random::shoot() < 1.0/3.0) {
|
||||
@@ -146,6 +148,7 @@ namespace G4INCL {
|
||||
theParticle->setType(Proton);
|
||||
pionType = PiZero;
|
||||
}
|
||||
deltaPDGCode = 2214;
|
||||
break;
|
||||
case DeltaZero:
|
||||
if(Random::shoot() < 1.0/3.0) {
|
||||
@@ -155,10 +158,12 @@ namespace G4INCL {
|
||||
theParticle->setType(Neutron);
|
||||
pionType = PiZero;
|
||||
}
|
||||
deltaPDGCode = 2114;
|
||||
break;
|
||||
case DeltaMinus:
|
||||
theParticle->setType(Neutron);
|
||||
pionType = PiMinus;
|
||||
deltaPDGCode = 1114;
|
||||
break;
|
||||
default:
|
||||
INCL_FATAL("Unrecognized delta type; type=" << theParticle->getType() << '\n');
|
||||
@@ -180,6 +185,14 @@ namespace G4INCL {
|
||||
theParticle->setMomentum(-pionMomentum);
|
||||
theParticle->adjustEnergyFromMomentum();
|
||||
|
||||
// Set the information about the parent resonance for the two daughters
|
||||
// (as unique, integer ID, we take the rounded integer of the resonance mass in keV)
|
||||
G4int parentResonanceID = static_cast<G4int>(round(deltaMass/CLHEP::keV));
|
||||
pion->setParentResonancePDGCode(deltaPDGCode);
|
||||
pion->setParentResonanceID(parentResonanceID);
|
||||
theParticle->setParentResonancePDGCode(deltaPDGCode);
|
||||
theParticle->setParentResonanceID(parentResonanceID);
|
||||
|
||||
fs->addModifiedParticle(theParticle);
|
||||
fs->addCreatedParticle(pion);
|
||||
// call loren(q1,q2,q3,b1,b2,b3,wq)
|
||||
|
||||
@@ -129,6 +129,12 @@ namespace G4INCL {
|
||||
}
|
||||
|
||||
nucleon->setType(Lambda);
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
list.push_back(nucleon);
|
||||
|
||||
@@ -91,7 +91,13 @@ namespace G4INCL {
|
||||
pion->adjustEnergyFromMomentum();
|
||||
|
||||
//INCL_DEBUG("NpiToLK " << (pion->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
|
||||
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
fs->addModifiedParticle(nucleon);
|
||||
fs->addModifiedParticle(pion);
|
||||
|
||||
|
||||
@@ -104,7 +104,13 @@ namespace G4INCL {
|
||||
}
|
||||
|
||||
nucleon->setType(Lambda);
|
||||
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
list.push_back(nucleon);
|
||||
list.push_back(pion);
|
||||
|
||||
+6
@@ -110,6 +110,12 @@ namespace G4INCL {
|
||||
|
||||
available_iso += nbr_pions*2;
|
||||
nbr_particle += nbr_pions;
|
||||
|
||||
// Erase the parent resonance information of the initial particles
|
||||
particle1->setParentResonancePDGCode(0);
|
||||
particle1->setParentResonanceID(0);
|
||||
particle2->setParentResonancePDGCode(0);
|
||||
particle2->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
ParticleType PionType = PiZero;
|
||||
|
||||
@@ -121,6 +121,12 @@ namespace G4INCL {
|
||||
nucleon->setType(ParticleTable::getNucleonType(iso));
|
||||
}
|
||||
}
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
list.push_back(nucleon);
|
||||
|
||||
@@ -226,6 +226,12 @@ namespace G4INCL {
|
||||
pion->setType(PiZero);
|
||||
}
|
||||
}
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
list.push_back(nucleon);
|
||||
|
||||
@@ -122,6 +122,12 @@ namespace G4INCL {
|
||||
nucleon->adjustEnergyFromMomentum();
|
||||
pion->adjustEnergyFromMomentum();
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
fs->addModifiedParticle(nucleon);
|
||||
fs->addModifiedParticle(pion);
|
||||
|
||||
|
||||
@@ -157,6 +157,12 @@ namespace G4INCL {
|
||||
nucleon->setType(ParticleTable::getSigmaType(iso*2));
|
||||
}
|
||||
}
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ParticleList list;
|
||||
list.push_back(nucleon);
|
||||
|
||||
@@ -1061,6 +1061,8 @@ namespace G4INCL {
|
||||
eventInfo->theta[eventInfo->nParticles] = Math::toDegrees(mom.theta());
|
||||
eventInfo->phi[eventInfo->nParticles] = Math::toDegrees(mom.phi());
|
||||
eventInfo->origin[eventInfo->nParticles] = -1;
|
||||
eventInfo->parentResonancePDGCode[eventInfo->nParticles] = (*i)->getParentResonancePDGCode();
|
||||
eventInfo->parentResonanceID[eventInfo->nParticles] = (*i)->getParentResonanceID();
|
||||
eventInfo->history.push_back("");
|
||||
if ((*i)->getType() != Composite) {
|
||||
ParticleSpecies pt((*i)->getType());
|
||||
|
||||
@@ -94,6 +94,9 @@ namespace G4INCL {
|
||||
nucleon->setMomentum(mom_nucleon);
|
||||
pion->setMomentum(-mom_nucleon);
|
||||
|
||||
ParticleType startingNucleonType = nucleon->getType();
|
||||
ParticleType startingPionType = pion->getType();
|
||||
|
||||
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
|
||||
if (iso == 1 || iso == -1) {
|
||||
rndm=3*Random::shoot();
|
||||
@@ -116,6 +119,14 @@ namespace G4INCL {
|
||||
pion->setType(pionType);
|
||||
}
|
||||
|
||||
// Erase the parent resonance information if the nucleon or pion changes type
|
||||
if ( startingNucleonType != nucleon->getType() || startingPionType != pion->getType() ) {
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
}
|
||||
|
||||
fs->addModifiedParticle(nucleon);
|
||||
fs->addModifiedParticle(pion);
|
||||
}
|
||||
|
||||
@@ -87,6 +87,12 @@ namespace G4INCL {
|
||||
nucleon->setType(deltaType); // nucleon becomes the delta
|
||||
nucleon->setEnergy(deltaEnergy); // set the energy of the delta
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
ThreeVector deltaMomentum = nucleon->getMomentum() + pion->getMomentum();
|
||||
nucleon->setMomentum(deltaMomentum);
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace G4INCL {
|
||||
pion = particle1;
|
||||
}
|
||||
|
||||
|
||||
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
|
||||
// assert(iso == 1 || iso == -1);
|
||||
if (iso == 1) {
|
||||
@@ -75,6 +74,13 @@ namespace G4INCL {
|
||||
nucleon->setType(Neutron);
|
||||
}
|
||||
pion->setType(Eta);
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
G4double sh=nucleon->getEnergy()+pion->getEnergy();
|
||||
G4double mn=nucleon->getMass();
|
||||
G4double me=pion->getMass();
|
||||
|
||||
+7
@@ -74,6 +74,13 @@ namespace G4INCL {
|
||||
nucleon = particle2;
|
||||
pion = particle1;
|
||||
}
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
G4int ipi=ParticleTable::getIsospin(pion->getType());
|
||||
ind2=ParticleTable::getIsospin(nucleon->getType());
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace G4INCL {
|
||||
pion = particle1;
|
||||
}
|
||||
|
||||
|
||||
G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
|
||||
// assert(iso == 1 || iso == -1);
|
||||
if (iso == 1) {
|
||||
@@ -75,6 +74,13 @@ namespace G4INCL {
|
||||
nucleon->setType(Neutron);
|
||||
}
|
||||
pion->setType(Omega);
|
||||
|
||||
// Erase the parent resonance information of the nucleon and pion
|
||||
nucleon->setParentResonancePDGCode(0);
|
||||
nucleon->setParentResonanceID(0);
|
||||
pion->setParentResonancePDGCode(0);
|
||||
pion->setParentResonanceID(0);
|
||||
|
||||
// nucleon->setEnergy(std::sqrt((nucleon->getMass())*(nucleon->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
|
||||
// pion->setEnergy(std::sqrt((pion->getMass())*(pion->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
|
||||
G4double sh=nucleon->getEnergy()+pion->getEnergy();
|
||||
|
||||
Reference in New Issue
Block a user