Import Geant4 9.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:37:50 +02:00
parent a8e9364cea
commit 96c8bcd0af
6923 changed files with 198390 additions and 41849 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.21 2007/05/27 08:27:15 gcosmo Exp $
# $Id: GNUmakefile,v 1.25 2007/11/17 18:09:22 dennis Exp $
# ----------------------------------------------------------------
# GNUmakefile for hadronic processes library. G.Folger 10-Dec-97.
# ----------------------------------------------------------------
@@ -33,6 +33,7 @@ SUBDIRS += models/de_excitation/ablation
SUBDIRS += models/em_dissociation
SUBDIRS += models/high_energy
SUBDIRS += models/im_r_matrix
SUBDIRS += models/incl
SUBDIRS += models/isotope_production
SUBDIRS += models/leading_particle
SUBDIRS += models/lll_fission
@@ -46,6 +47,8 @@ SUBDIRS += models/parton_string/management
SUBDIRS += models/parton_string/qgsm
SUBDIRS += models/pre_equilibrium/exciton_model
SUBDIRS += models/radioactive_decay
SUBDIRS += models/rpg
SUBDIRS += models/qmd
SUBDIRS += models/theo_high_energy
SUBDIRS += models/util
@@ -62,6 +65,8 @@ SUBLIBS += G4had_im_r_matrix
SUBLIBS += G4hadronic_iso
SUBLIBS += G4hadronic_leading_particle
SUBLIBS += G4hadronic_LE
SUBLIBS += G4hadronic_RPG
SUBLIBS += G4hadronic_qmd
SUBLIBS += G4had_mod_man
SUBLIBS += G4had_neu_hp
SUBLIBS += G4had_lll_fis
@@ -71,6 +76,7 @@ SUBLIBS += G4had_mod_util
SUBLIBS += G4hadronic_bert_cascade
SUBLIBS += G4hadronic_hetcpp_evaporation
SUBLIBS += G4hadronic_hetcpp_utils
SUBLIBS += G4hadronic_incl_cascade
SUBLIBS += G4hadronic_body_ci
SUBLIBS += G4hadronic_interface_ci
SUBLIBS += G4hadronic_deex_evaporation
@@ -14,8 +14,15 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
28 June 2007 Dennis Wright (hadr-cross-V09-00-00)
-------------------------------------------------
- V. Grichine changed log to std::log in G4HadronNucleonXsc.cc and
G4GlauberGribovCrossSection.cc
- D. Wright added log(0) protection in G4NeutronInelasticCrossSection.cc
and G4ProtonInelasticCrossSection.cc
15 June 2007 Gabriele Cosmo (hadr-cross-V08-03-04)
---------------------------
--------------------------------------------------
- Fixed memory leak in classes G4ElectroNuclearCrossSection and
G4PhotoNuclearCrossSection.
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGNucleonElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGNucleonInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGPionElasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGPionInelasticXS.hh,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// GEANT4 Hadron physics class -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGNucleonElasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGNucleonInelasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGPionElasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4BGGPionInelasticXS.cc,v 1.1 2007/03/13 15:19:30 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -------------------------------------------------------------------
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4ElectroNuclearCrossSection.cc,v 1.27 2007/06/15 16:36:39 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: G4ElectroNuclearCrossSection for gamma+A cross sections
@@ -25,7 +25,7 @@
//
//
// $Id: G4HadronCaptureDataSet.cc,v 1.8 2006/06/29 19:57:35 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: HadronCaptureDataSet for cross sections
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Hadron Physics class G4HadronCrossSections
@@ -25,7 +25,7 @@
//
//
// $Id: G4HadronElasticDataSet.cc,v 1.8 2006/06/29 19:57:39 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: HadronElasticDataSet for cross sections
@@ -25,7 +25,7 @@
//
//
// $Id: G4HadronFissionDataSet.cc,v 1.8 2006/06/29 19:57:41 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: HadronFissionDataSet for cross sections
@@ -25,7 +25,7 @@
//
//
// $Id: G4HadronInelasticDataSet.cc,v 1.8 2006/06/29 19:57:43 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: HadronInelasticDataSet for cross sections
@@ -63,7 +63,8 @@ GetCrossSection(const G4DynamicParticle* aPart,
G4double G4NeutronInelasticCrossSection::
GetCrossSection(G4double anEnergy, G4double atomicNumber, G4double nOfProtons)
{
G4double kineticEnergy = std::log10(anEnergy/MeV);
G4double kineticEnergy = std::log10(DBL_MIN/MeV);
if (anEnergy > DBL_MIN/MeV) kineticEnergy = std::log10(anEnergy/MeV);
G4double nOfNeutrons = atomicNumber-nOfProtons;
const G4double p1=1.3773;
const G4double p2=1.+10./atomicNumber-0.0006*atomicNumber;
@@ -25,7 +25,7 @@
//
//
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// G4 Physics class: G4PhotoNuclearCrossSection for gamma+A cross sections
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// --------------------------------------------------------------------
// by J.P Wellisch, Sun Sep 15 2002.
@@ -89,15 +89,20 @@ GetCrossSection(G4double kineticEnergy, G4double atomicNumber, G4double nOfProto
G4double ff1= 0.70-0.002*a; // slope of the drop at medium energies.
G4double ff2= 1.00+1/a; // start of the slope.
G4double ff3= 0.8+18/a-0.002*a; // stephight
fac=1-(1/(1+std::exp(-8*ff1*(std::log10(kineticEnergy)+1.37*ff2))));
fac = 1.0;
if (kineticEnergy > DBL_MIN)
fac= 1.0 - (1.0/(1+std::exp(-8*ff1*(std::log10(kineticEnergy)+1.37*ff2))));
crossSection = crossSection*(1+ff3*fac);
// low energy return to zero
ff1=1.-1/a-0.001*a; // slope of the rise
ff2=1.17-2.7/a-0.0014*a; // start of the rise
fac=-8.*ff1*(std::log10(kineticEnergy)+2.0*ff2);
fac=1/(1+std::exp(fac));
fac = 0.0;
if (kineticEnergy > DBL_MIN) {
fac=-8.*ff1*(std::log10(kineticEnergy)+2.0*ff2);
fac=1/(1+std::exp(fac));
}
crossSection = crossSection*fac;
return crossSection*millibarn;
}
@@ -14,6 +14,11 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
15 October 2007 Dennis Wright (hadr-man-V09-00-00)
--------------------------------------------------
- G4HadronicProcess::FillTotalResult: T. Koi's fix of bug #967 - replaced
aT.GetGlobalTime() with the variable time at line #664.
15 June 2007 Gabriele Cosmo (hadr-man-V08-03-03)
------------------------------------------------
- G4HadronicProcess: fixed memory leak with deletion of 'theIsoResult' and
@@ -25,7 +25,7 @@
//
//
// $Id: G4EnergyRangeManager.hh,v 1.9 2006/06/29 19:58:05 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// --------------------------------------------------------------------
#ifndef G4HadLeadBias_h
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4VLeadingParticleBiasing.hh,v 1.6 2006/06/29 19:58:19 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// --------------------------------------------------------------------
#ifndef G4VLeadingParticleBiasing_h
@@ -25,7 +25,7 @@
//
//
// $Id: G4EnergyRangeManager.cc,v 1.15 2006/06/29 19:58:21 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
@@ -661,7 +661,7 @@ G4HadronicProcess::FillTotalResult(G4HadFinalState * aR, const G4Track & aT)
if(time<0) time = aT.GetGlobalTime();
G4Track* track = new G4Track(aR->GetSecondary(i)->GetParticle(),
aT.GetGlobalTime(),
time,
aT.GetPosition());
G4double newWeight = aT.GetWeight()*aR->GetSecondary(i)->GetWeight();
+7 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.17 2007/05/25 19:27:20 dennis Exp $
# $Id: GNUmakefile,v 1.21 2007/11/17 18:09:54 dennis Exp $
# --------------------------------------------------------------
# GNUmakefile for hadronic models library. G.Folger 10-Dec-97
# --------------------------------------------------------------
@@ -26,6 +26,7 @@ SUBDIRS += de_excitation/ablation
SUBDIRS += em_dissociation
SUBDIRS += high_energy
SUBDIRS += im_r_matrix
SUBDIRS += incl
SUBDIRS += isotope_production
SUBDIRS += leading_particle
SUBDIRS += low_energy
@@ -39,6 +40,8 @@ SUBDIRS += parton_string/management
SUBDIRS += parton_string/qgsm
SUBDIRS += pre_equilibrium/exciton_model
SUBDIRS += radioactive_decay
SUBDIRS += rpg
SUBDIRS += qmd
SUBDIRS += theo_high_energy
SUBDIRS += util
@@ -50,6 +53,8 @@ SUBLIBS += G4had_im_r_matrix
SUBLIBS += G4hadronic_iso
SUBLIBS += G4hadronic_leading_particle
SUBLIBS += G4hadronic_LE
SUBLIBS += G4hadronic_RPG
SUBLIBS += G4hadronic_qmd
SUBLIBS += G4had_mod_man
SUBLIBS += G4had_neu_hp
SUBLIBS += G4had_lll_fis
@@ -59,6 +64,7 @@ SUBLIBS += G4had_mod_util
SUBLIBS += G4hadronic_bert_cascade
SUBLIBS += G4hadronic_hetcpp_evaporation
SUBLIBS += G4hadronic_hetcpp_utils
SUBLIBS += G4hadronic_incl_cascade
SUBLIBS += G4hadronic_body_ci
SUBLIBS += G4hadronic_interface_ci
SUBLIBS += G4hadronic_deex_evaporation
@@ -13,6 +13,27 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
16-Nov-2007 Gunter Folger had-binary-V09-00-05
- Correction in G4BinaryCascade for memory leak.
16-Nov-2007 Gunter Folger had-binary-V09-00-04
- remove one line of left over debug printing
05-Nov-2007 Gunter Folger had-binary-V09-00-03
- deactivate general debug printout in G4BinaryCascade
05-Nov-2007 Gunter Folger had-binary-V09-00-02
- Fixes for propagate: particles can decay outside nucleus, correct counting
for late particles
31-Oct-2007 Gunter Folger had-binary-V09-00-01
- G4BinaryLightIon... adapt to changes in BIC
- Work around problem with very low energy pion (Coulomb barrier, nuclear mass
difference)
18-Oct-2007 Gunter Folger had-binary-V09-00-00
- Collect many changes for propagate interface.
Fix for pion incident at low energy: cannot go to deexitation directly
18-May-2007 Gunter Folger had-binary-V08-03-00
- G4BinaryLightIonReaction: Protect against divide by 0 when energy momentum
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#ifndef G4BCLateParticle_h
#define G4BCLateParticle_h 1
#include "G4BCAction.hh"
#include "G4CollisionInitialState.hh"
#include "G4KineticTrack.hh"
#include "G4KineticTrackVector.hh"
#include <vector>
//#define debug_BCLateParticle 1
class G4BCLateParticle : public G4BCAction
{
public:
G4BCLateParticle(){}
virtual ~G4BCLateParticle(){}
virtual const std::vector<G4CollisionInitialState *> &
GetCollisions(G4KineticTrack * aProjectile,
std::vector<G4KineticTrack *> & ,
G4double theCurrentTime)
{
theColl.clear();
G4double ctime=std::max(0.,aProjectile->GetFormationTime()) + theCurrentTime;
G4KineticTrackVector noTarget;
G4CollisionInitialState * aLate =
new G4CollisionInitialState(ctime,
aProjectile, noTarget, this);
theColl.push_back(aLate);
#ifdef debug_BCLateParticle
G4cout << "Particle starting late " << aProjectile << " "
<< aProjectile->GetDefinition()->GetParticleName() << " "
<< 1/MeV*aProjectile->Get4Momentum() << " "
<< 1/fermi*aProjectile->GetPosition() << " "
<< aProjectile->GetFormationTime()
<< G4endl;
#endif
return theColl;
}
virtual G4KineticTrackVector * GetFinalState(G4KineticTrack * aProjectile,
std::vector<G4KineticTrack *> & )
{
G4KineticTrackVector * result = new G4KineticTrackVector;
G4KineticTrack * lateParticle=new G4KineticTrack(*aProjectile);
result->push_back(lateParticle);
return result;
}
private:
std::vector<G4CollisionInitialState *> theColl;
};
#endif
@@ -52,6 +52,7 @@
#include "G4LorentzRotation.hh"
#include "G4BCDecay.hh"
#include "G4BCLateParticle.hh"
#include "G4BCAction.hh"
class G4CollisionManager;
@@ -75,8 +76,8 @@ public:
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& theNucleus);
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector * secondaries,
G4V3DNucleus * nucleus);
virtual G4ReactionProductVector * Propagate(G4KineticTrackVector *,
G4V3DNucleus *);
private:
@@ -92,14 +93,15 @@ private:
}
void PrintWelcomeMessage();
void BuildTargetList();
void FindCollisions(G4KineticTrackVector * secondaries);
void FindDecayCollision(G4KineticTrack * secondary);
G4bool ApplyCollision(G4CollisionInitialState * collision);
void FindCollisions(G4KineticTrackVector *);
void FindDecayCollision(G4KineticTrack *);
void FindLateParticleCollision(G4KineticTrack *);
G4bool ApplyCollision(G4CollisionInitialState *);
G4bool Capture(G4bool verbose=false);
G4bool Absorb();
G4bool CheckPauliPrinciple(G4KineticTrackVector * products);
G4bool CheckPauliPrinciple(G4KineticTrackVector *);
G4double GetExcitationEnergy();
G4bool CheckDecay(G4KineticTrackVector * products);
G4bool CheckDecay(G4KineticTrackVector *);
void CorrectFinalPandE();
void UpdateTracksAndCollisions(G4KineticTrackVector * oldSecondaries,
G4KineticTrackVector * oldTarget,
@@ -111,8 +113,8 @@ private:
void StepParticlesOut();
G4LorentzVector GetFinal4Momentum();
G4LorentzVector GetFinalNucleusMomentum();
G4ReactionProductVector * Propagate1H1(G4KineticTrackVector * secondaries,
G4V3DNucleus * nucleus);
G4ReactionProductVector * Propagate1H1(G4KineticTrackVector *,
G4V3DNucleus *);
G4double GetIonMass(G4int Z, G4int A);
// utility methods
@@ -122,7 +124,9 @@ private:
// for debugging purpose
void PrintKTVector(G4KineticTrackVector * ktv, std::string comment=std::string(""));
void PrintKTVector(G4KineticTrack* kt, std::string comment=std::string(""));
void DebugApplyCollision(G4CollisionInitialState * collision,
G4KineticTrackVector *products);
private:
G4KineticTrackVector theProjectileList;
G4KineticTrackVector theTargetList;
@@ -135,6 +139,7 @@ private:
std::vector<G4BCAction *> theImR;
G4BCDecay * theDecay;
G4BCLateParticle * theLateParticle;
G4VFieldPropagation * thePropagator;
G4double theCurrentTime;
G4double theBCminP;
File diff suppressed because it is too large Load Diff
@@ -195,14 +195,18 @@
result=theModel.Propagate(initalState, fancyNucleus);
debug.push_back("################# Result size");
debug.push_back(result->size());
if (result) {
debug.push_back(result->size());
} else {
debug.push_back(" -none-");
}
debug.dump();
std::for_each(initalState->begin(), initalState->end(), Delete<G4KineticTrack>());
delete initalState;
// std::for_each(initalState->begin(), initalState->end(), Delete<G4KineticTrack>());
// delete initalState;
if(result->size()==0)
if(! result || result->size()==0)
{
delete result; result=0;
if (result) {delete result; result=0;}
delete fancyNucleus;
delete projectile;
if (++tryCount > 200)
@@ -287,11 +287,12 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
#endif
// if the particle is already outside nucleus go to next @@GF should never happen? check!
if(t_leave < 0)
{
throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation:: Attempt to track particle past a nucleus");
continue;
}
// does happen for particles added as late....
// if(t_leave < 0 )
// {
// throw G4HadronicException(__FILE__, __LINE__, "G4RKPropagation:: Attempt to track particle past a nucleus");
// continue;
// }
// Apply a straight line propagation for particle types
// not included in the model
@@ -334,6 +335,10 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
// for the moment take it past the nucleus, so we'll not worry next time..
FreeTransport(kt, 1.1*t_leave); // take past nucleus
kt->SetState(G4KineticTrack::miss_nucleus);
// G4cout << "G4RKPropagation: Warning particle cannot enter Nucleus :" << G4endl;
// G4cout << " enter nucleus, E out/in: " << kt->GetTrackingMomentum().e() << " / " << newE <<G4endl;
// G4cout << " the Field "<< currentField->GetField(kt->GetPosition()) << " "<< kt->GetPosition()<<G4endl;
// G4cout << " the particle "<<kt->GetDefinition()->GetParticleName()<<G4endl;
continue;
}
//
@@ -380,8 +385,8 @@ void G4RKPropagation::Transport(G4KineticTrackVector & active,
G4ThreeVector posold=kt->GetPosition();
// if (currentField->GetField(kt->GetPosition()) > kt->GetProjectilePotential() ||
if ( currTimeStep > 0 &&
! FieldTransport(kt, currTimeStep)) {
if (currTimeStep > 0 &&
! FieldTransport(kt, currTimeStep)) {
FreeTransport(kt,currTimeStep);
}
@@ -14,6 +14,11 @@ code and to keep track of all tags.
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
17 Nov 2007 Dennis Wright (hadr-casc-V09-00-02)
-----------------------------------------------
- Fix angular distribution for nucleon-nucleon elastic scattering
above 2.8 GeV, by modifying G4ElementaryParticleCollider::getElasticCase
25 May 2007 Dennis Wright for Aatos Heikkinen (hadr-casc-V08-03-00)
-------------------------------------------------------------------
- implemented interfaces for pre-equilibrium and equilbrium evaporation
@@ -0,0 +1,70 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Defines an development version for interface Bertini (BERT) cascade
// based on INUCL intra-nuclear transport.models
// with bullet hadron energy ~< 10 GeV
#ifndef G4IBERTINI_H
#define G4IBERTINI_H 1
#include "G4Nucleon.hh"
#include "G4Nucleus.hh"
#include "G4VIntraNuclearTransportModel.hh"
#include "G4KineticTrackVector.hh"
#include "G4FragmentVector.hh"
#include "G4ParticleChange.hh"
#include "G4ReactionProductVector.hh"
#include "G4ReactionProduct.hh"
class G4IBertini : public G4VIntraNuclearTransportModel {
public:
G4IBertini();
~G4IBertini(){
}
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& theNucleus);
private:
G4int operator==(G4IBertini& right) {
return (this == &right);
}
G4int operator!=(G4IBertini& right) {
return (this != &right);
}
G4int verboseLevel;
private:
G4HadFinalState theResult;
};
#endif // G4IBERTINI_H
@@ -46,6 +46,8 @@
#include "G4LorentzRotation.hh"
//#define BERTDEV 1 // A flag to activate a development version of Bertini cascade
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
@@ -194,9 +196,12 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
G4BigBanger* bigb = new G4BigBanger;
G4InuclCollider* collider = new G4InuclCollider(colep, inc, noneq, eqil, fiss, bigb);
G4int maxTries = 10; // maximum tries for inelastic collision to avoid infinite loop
G4int maxTries = 100; // maximum tries for inelastic collision to avoid infinite loop
G4int nTries = 0; // try counter
#ifdef BERTDEV
G4int coulombOK =0; // flag for correct Coulomb barrier
#endif
if (G4int(theNucleusA) == 1) { // special treatment for target H(1,1) (proton)
targetH = new G4InuclElementaryParticle(targetMomentum, 1);
@@ -232,7 +237,6 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
output.getOutgoingParticles().begin()->type() == proton)
)
);
} else { // only elastic collision is energetically possible
output = collider->collide(bullet, targetH);
}
@@ -253,16 +257,40 @@ G4HadFinalState* G4CascadeInterface::ApplyYourself(const G4HadProjectile& aTrack
do // we try to create inelastic interaction
{
#ifdef BERTDEV
coulombOK=0; // by default coulomb analysis is OK
#endif
output = collider->collide(bullet, target );
nTries++;
#ifdef BERTDEV
G4double coulumbBarrier = 8.7 * MeV;
std::vector<G4InuclElementaryParticle> p= output.getOutgoingParticles();
if(!p.empty()) {
for( particleIterator ipart = p.begin(); ipart != p.end(); ipart++) {
if (ipart->type() == proton) {
G4double e = ipart->getKineticEnergy()*GeV;
if (e < coulumbBarrier) coulombOK= 1; // If event with coulomb barrier violation detected -> retry
// G4cout << "///AH "<< e << "" << coulumbBarrier <<G4endl;
}
}
}
} while(
(nTries < maxTries) && // conditions for next try
(coulombOK==1) &&
((output.getOutgoingParticles().size() + output.getNucleiFragments().size()) > 2.5) &&
(output.getOutgoingParticles().size()!=0)
);
#else
} while(
(nTries < maxTries) &&
(output.getOutgoingParticles().size() + output.getNucleiFragments().size() < 2.5) &&
(output.getOutgoingParticles().size()!=0) &&
(output.getOutgoingParticles().begin()->type()==bullet->type())
);
}
);
#endif
}
if (verboseLevel > 1)
{
@@ -1945,9 +1945,9 @@ G4int G4ElementaryParticleCollider::getElasticCase(G4int is,
if(l < 3) { // nucleon nucleon
if(ekin > 2.8) {
k = 2;
if(ekin > 10.0) k = 14;
// DHW k = 2;
// DHW if(ekin > 10.0) k = 14;
k = 14;
} else {
@@ -0,0 +1,541 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
#include "G4IBertini.hh"
#include "globals.hh"
#include "G4DynamicParticleVector.hh"
#include "G4IonTable.hh"
#include "G4InuclCollider.hh"
#include "G4IntraNucleiCascader.hh"
#include "G4ElementaryParticleCollider.hh"
#include "G4NonEquilibriumEvaporator.hh"
#include "G4EquilibriumEvaporator.hh"
#include "G4Fissioner.hh"
#include "G4BigBanger.hh"
#include "G4InuclElementaryParticle.hh"
#include "G4InuclNuclei.hh"
#include "G4InuclParticle.hh"
#include "G4CollisionOutput.hh"
#include "G4V3DNucleus.hh"
#include "G4Track.hh"
#include "G4Nucleus.hh"
#include "G4NucleiModel.hh"
#include "G4LorentzRotation.hh"
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
G4IBertini::G4IBertini()
:verboseLevel(0) {
if (verboseLevel > 3) {
G4cout << " >>> G4IBertini::G4IBertini" << G4endl;
}
}
G4ReactionProductVector* G4IBertini::Propagate(G4KineticTrackVector* ,
G4V3DNucleus* ) {
return 0;
}
// #define debug_G4IBertini
G4HadFinalState* G4IBertini::ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& theNucleus) {
#ifdef debug_G4IBertini
static G4int counter(0);
counter++;
G4cerr << "Reaction number "<< counter << " "<<aTrack.GetDynamicParticle()->GetDefinition()->GetParticleName()<<" "<< aTrack.GetDynamicParticle()->GetKineticEnergy()<<G4endl;
#endif
theResult.Clear();
if (verboseLevel > 3) {
G4cout << " >>> G4IBertini::ApplyYourself" << G4endl;
};
G4double eInit = 0.0;
G4double eTot = 0.0;
G4double sumBaryon = 0.0;
G4double sumEnergy = 0.0;
// Make conversion between native Geant4 and Bertini cascade classes.
// NOTE: Geant4 units are MeV = 1 and GeV = 1000. Cascade code by default use GeV = 1.
enum particleType { nuclei = 0, proton = 1, neutron = 2, pionPlus = 3,
pionMinus = 5, pionZero = 7, photon = 10,
kaonPlus = 11, kaonMinus = 13, kaonZero = 15,
kaonZeroBar = 17, lambda = 21, sigmaPlus = 23,
sigmaZero = 25, sigmaMinus = 27, xiZero = 29, xiMinus = 31 };
G4int bulletType = 0;
// Coding particles
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
if (aTrack.GetDefinition() == G4Gamma::Gamma() ) bulletType = photon;
if (aTrack.GetDefinition() == G4KaonPlus::KaonPlus() ) bulletType = kaonPlus;
if (aTrack.GetDefinition() == G4KaonMinus::KaonMinus() ) bulletType = kaonMinus;
if (aTrack.GetDefinition() == G4Lambda::Lambda() ) bulletType = lambda;
if (aTrack.GetDefinition() == G4SigmaPlus::SigmaPlus() ) bulletType = sigmaPlus;
if (aTrack.GetDefinition() == G4SigmaZero::SigmaZero() ) bulletType = sigmaZero;
if (aTrack.GetDefinition() == G4SigmaMinus::SigmaMinus() ) bulletType = sigmaMinus;
if (aTrack.GetDefinition() == G4XiZero::XiZero() ) bulletType = xiZero;
if (aTrack.GetDefinition() == G4XiMinus::XiMinus() ) bulletType = xiMinus;
if (aTrack.GetDefinition() == G4KaonZeroLong::KaonZeroLong() ||
aTrack.GetDefinition() == G4KaonZeroShort::KaonZeroShort() ) {
if (G4UniformRand() > 0.5) {
bulletType = kaonZero;
} else {
bulletType = kaonZeroBar;
}
}
// Code momentum and energy.
G4double px,py,pz;
px=aTrack.Get4Momentum().px() / GeV;
py=aTrack.Get4Momentum().py() / GeV;
pz=aTrack.Get4Momentum().pz() / GeV;
G4LorentzVector projectileMomentum = aTrack.Get4Momentum();
G4LorentzRotation toZ;
toZ.rotateZ(-projectileMomentum.phi());
toZ.rotateY(-projectileMomentum.theta());
G4LorentzRotation toLabFrame = toZ.inverse();
// G4cout << "projectileMomentum " << projectileMomentum[0] << " " << projectileMomentum[1] << " " << projectileMomentum[2] << " " << projectileMomentum[3] << G4endl;
G4LorentzVector projectileMomentumLab = projectileMomentum*=toLabFrame;
//G4cout << "projectileMomentumLab " << projectileMomentumLab[0] << " " << projectileMomentumLab[1] << " " << projectileMomentumLab[2] << " " << projectileMomentumLab[3] << G4endl;
// G4cout << "projectileMomentum in lab frame" << projectileMomentum*=toLabFrame << G4endl;
std::vector<G4double> momentumBullet(4);
momentumBullet[0] =0.;
momentumBullet[1] =0;
momentumBullet[2] =0;
momentumBullet[3] =std::sqrt(px*px+py*py+pz*pz);
// G4cout << "momentumBullet[3]" << momentumBullet[3] << G4endl;
G4InuclElementaryParticle * bullet = new G4InuclElementaryParticle(momentumBullet, bulletType);
// bullet->printParticle(); //AH
sumEnergy = bullet->getKineticEnergy(); // In GeV
if (bulletType == proton || bulletType == neutron || bulletType == lambda ||
bulletType == sigmaPlus || bulletType == sigmaZero || bulletType == sigmaMinus ||
bulletType == xiZero || bulletType == xiMinus) {
sumBaryon += 1;
}
// Set target
G4InuclNuclei* target = 0;
G4InuclParticle* targetH = 0;
// and outcoming particles
G4DynamicParticle* cascadeParticle = 0;
std::vector<G4double> targetMomentum(4, 0.0);
G4double theNucleusA = theNucleus.GetN();
if ( !(G4int(theNucleusA) == 1) ) {
target = new G4InuclNuclei(targetMomentum,
theNucleusA,
theNucleus.GetZ());
target->setEnergy();
// target->printParticle();//AH
std::vector<G4double> bmom = bullet->getMomentum();
eInit = std::sqrt(bmom[0] * bmom[0]);
std::vector<G4double> tmom = target->getMomentum();
eInit += std::sqrt(tmom[0] * tmom[0]);
sumBaryon += theNucleusA;
if (verboseLevel > 2) {
G4cout << "Bullet: " << G4endl;
bullet->printParticle();
}
if (verboseLevel > 2) {
G4cout << "Target: " << G4endl;
target->printParticle();
}
}
G4CollisionOutput output;
// Colliders initialisation
G4ElementaryParticleCollider* colep = new G4ElementaryParticleCollider;
G4IntraNucleiCascader* inc = new G4IntraNucleiCascader; // the actual cascade
inc->setInteractionCase(1); // Interaction type is particle with nuclei.
G4NonEquilibriumEvaporator* noneq = new G4NonEquilibriumEvaporator;
G4EquilibriumEvaporator* eqil = new G4EquilibriumEvaporator;
G4Fissioner* fiss = new G4Fissioner;
G4BigBanger* bigb = new G4BigBanger;
G4InuclCollider* collider = new G4InuclCollider(colep, inc, noneq, eqil, fiss, bigb);
G4int maxTries = 100; // maximum tries for inelastic collision to avoid infinite loop
G4int nTries = 0; // try counter
G4int coulombOK =0;
if (G4int(theNucleusA) == 1) { // special treatment for target H(1,1) (proton)
targetH = new G4InuclElementaryParticle(targetMomentum, 1);
G4float cutElastic[32];
cutElastic[proton ] = 1.0; // GeV
cutElastic[neutron ] = 1.0;
cutElastic[pionPlus ] = 0.6;
cutElastic[pionMinus] = 0.2;
cutElastic[pionZero ] = 0.2;
cutElastic[kaonPlus ] = 0.5;
cutElastic[kaonMinus] = 0.5;
cutElastic[kaonMinus] = 0.5;
cutElastic[kaonZero] = 0.5;
cutElastic[kaonZeroBar] = 0.5;
cutElastic[lambda] = 1.0;
cutElastic[sigmaPlus] = 1.0;
cutElastic[sigmaZero] = 1.0;
cutElastic[sigmaMinus] = 1.0;
cutElastic[xiZero] = 1.0;
cutElastic[xiMinus] = 1.0;
if (momentumBullet[3] > cutElastic[bulletType]) { // inelastic collision possible
do { // we try to create inelastic interaction
output = collider->collide(bullet, targetH);
nTries++;
} while(
(nTries < maxTries) &&
(output.getOutgoingParticles().size() == 2 && // elastic: bullet + p = H(1,1) coming out
(output.getOutgoingParticles().begin()->type() == bulletType ||
output.getOutgoingParticles().begin()->type() == proton)
)
);
} else { // only elastic collision is energetically possible
output = collider->collide(bullet, targetH);
}
sumBaryon += 1;
std::vector<G4double> bmom = bullet->getMomentum();
eInit = std::sqrt(bmom[0] * bmom[0]);
std::vector<G4double> tmom = targetH->getMomentum();
eInit += std::sqrt(tmom[0] * tmom[0]);
if (verboseLevel > 2) {
G4cout << "Target: " << G4endl;
targetH->printParticle();
}
} else { // treat all other targets except H(1,1)
do // we try to create inelastic interaction
{
coulombOK=0; // by default coulomb analysis is OK
output = collider->collide(bullet, target );
nTries++;
//----------------------------
// G4double coulumbBarrier = 5.0 * MeV;
G4double coulumbBarrier = 8.7 * MeV; // fro 9 4 Be case 5
// G4double coulumbBarrier = 8.7 * MeV; // fro 54 26 Fe case 5
// G4double coulumbBarrier = 7.9 * MeV; // fro 197 79Au case 9
//G4double coulumbBarrier = 1.0 * MeV; // fro 197 79 case 9
std::vector<G4InuclElementaryParticle> p= output.getOutgoingParticles();
if(!p.empty()) {
for( particleIterator ipart = p.begin(); ipart != p.end(); ipart++) {
if (ipart->type() == proton) {
G4double e = ipart->getKineticEnergy()*GeV;
// G4cout << " e " << e << G4endl;
if (e < coulumbBarrier){
// if(nTries>=maxTries ) G4cout << "maxTries" << e << G4endl;
// G4cout << "ERROR: E_Coulomb barrier > proton E_kin " << std::setw(4) << e * MeV << " MeV" << G4endl;
coulombOK= 1; // event with coulomb barrier violation detected -> retry
};
}
}
}
// G4cout << "OK: " << coulombOK << " nTries: "<< nTries << G4endl;
} while(
(nTries < maxTries) && // conditions for next try
(coulombOK==1) &&
((output.getOutgoingParticles().size() + output.getNucleiFragments().size()) > 2.5) &&
(output.getOutgoingParticles().size()!=0)
);
//-----------------------------
}
if (verboseLevel > 1)
{
G4cout << " Cascade output: " << G4endl;
output.printCollisionOutput();
}
// Convert cascade data to use hadronics interface
std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
theResult.SetStatusChange(stopAndKill);
if (!particles.empty()) {
particleIterator ipart;
G4int outgoingParticle;
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
outgoingParticle = ipart->type();
std::vector<G4double> mom = ipart->getMomentum();
eTot += std::sqrt(mom[0] * mom[0]);
G4double ekin = ipart->getKineticEnergy() * GeV;
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
aMom = aMom.unit();
if (ipart->baryon() ) {
sumBaryon -= 1;
}
sumEnergy -= ekin / GeV;
switch(outgoingParticle) {
case proton:
#ifdef debug_G4IBertini
G4cerr << "proton " << counter << " " << aMom << " " << ekin << G4endl;
#endif
cascadeParticle =
new G4DynamicParticle(G4Proton::ProtonDefinition(), aMom, ekin);
break;
case neutron:
#ifdef debug_G4IBertini
G4cerr << "neutron "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
cascadeParticle =
new G4DynamicParticle(G4Neutron::NeutronDefinition(), aMom, ekin);
break;
case pionPlus:
cascadeParticle =
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), aMom, ekin);
#ifdef debug_G4IBertini
G4cerr << "pionPlus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case pionMinus:
cascadeParticle =
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), aMom, ekin);
#ifdef debug_G4IBertini
G4cerr << "pionMinus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case pionZero:
cascadeParticle =
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), aMom, ekin);
#ifdef debug_G4IBertini
G4cerr << "pionZero "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case photon:
cascadeParticle =
new G4DynamicParticle(G4Gamma::Gamma(), aMom, ekin);
#ifdef debug_G4IBertini
G4cerr << "photon "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
#endif
break;
case kaonPlus:
cascadeParticle =
new G4DynamicParticle(G4KaonPlus::KaonPlusDefinition(), aMom, ekin);
break;
case kaonMinus:
cascadeParticle =
new G4DynamicParticle(G4KaonMinus::KaonMinusDefinition(), aMom, ekin);
break;
case kaonZero:
if (G4UniformRand() > 0.5) {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroLong::KaonZeroLongDefinition(),
aMom, ekin);
} else {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroShort::KaonZeroShortDefinition(),
aMom, ekin);
}
break;
case kaonZeroBar:
if (G4UniformRand() > 0.5) {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroLong::KaonZeroLongDefinition(),
aMom, ekin);
} else {
cascadeParticle = new G4DynamicParticle(
G4KaonZeroShort::KaonZeroShortDefinition(),
aMom, ekin);
}
break;
case lambda:
cascadeParticle =
new G4DynamicParticle(G4Lambda::LambdaDefinition(), aMom, ekin);
break;
case sigmaPlus:
cascadeParticle =
new G4DynamicParticle(G4SigmaPlus::SigmaPlusDefinition(), aMom, ekin);
break;
case sigmaZero:
cascadeParticle =
new G4DynamicParticle(G4SigmaZero::SigmaZeroDefinition(), aMom, ekin);
break;
case sigmaMinus:
cascadeParticle =
new G4DynamicParticle(G4SigmaMinus::SigmaMinusDefinition(), aMom, ekin);
break;
case xiZero:
cascadeParticle =
new G4DynamicParticle(G4XiZero::XiZeroDefinition(), aMom, ekin);
break;
case xiMinus:
cascadeParticle =
new G4DynamicParticle(G4XiMinus::XiMinusDefinition(), aMom, ekin);
break;
default:
G4cout << " ERROR: G4IBertini::Propagate undefined particle type"
<< G4endl;
}
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
theResult.AddSecondary(cascadeParticle);
}
}
// get nuclei fragments
G4DynamicParticle * aFragment = 0;
G4ParticleDefinition * aIonDef = 0;
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
if (!nucleiFragments.empty()) {
nucleiIterator ifrag;
for (ifrag = nucleiFragments.begin(); ifrag != nucleiFragments.end(); ifrag++)
{
G4double eKin = ifrag->getKineticEnergy() * GeV;
std::vector<G4double> mom = ifrag->getMomentum();
eTot += std::sqrt(mom[0] * mom[0]);
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
aMom = aMom.unit();
// hpw @@@ ==> Should be zero: G4double fragmentExitation = ifrag->getExitationEnergyInGeV();
if (verboseLevel > 2) {
G4cout << " Nuclei fragment: " << G4endl;
ifrag->printParticle();
}
G4int A = G4int(ifrag->getA());
G4int Z = G4int(ifrag->getZ());
aIonDef = theTableOfParticles->FindIon(Z, A, 0, Z);
aFragment = new G4DynamicParticle(aIonDef, aMom, eKin);
sumBaryon -= A;
sumEnergy -= eKin / GeV;
aFragment->Set4Momentum(aFragment->Get4Momentum()*=toLabFrame);
theResult.AddSecondary(aFragment);
}
}
if (verboseLevel > 2) {
if (sumBaryon != 0) {
G4cout << "ERROR: no baryon number conservation, sum of baryons = "
<< sumBaryon << G4endl;
}
if (sumEnergy > 0.01 ) {
G4cout << "Kinetic energy conservation violated by "
<< sumEnergy << " GeV" << G4endl;
}
G4cout << "Total energy conservation at level ~"
<< (eInit - eTot) * GeV << " MeV" << G4endl;
if (sumEnergy < -5.0e-5 ) { // 0.05 MeV
G4cout << "FATAL ERROR: energy created "
<< sumEnergy * GeV << " MeV" << G4endl;
}
}
delete bullet;
delete colep;
delete inc;
delete noneq;
delete fiss;
delete eqil;
delete bigb;
delete collider;
if(target != 0) delete target;
if(targetH != 0) delete targetH;
// if(cascadeParticle != 0) delete cascadeParticle;
// if(aFragment != 0) delete aFragment;
return &theResult;
}
@@ -25,7 +25,7 @@
//
//
// $Id: G4Chips.hh,v 1.19 2006/06/29 20:05:53 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4Chips ----------------
// by Mikhail Kossov, September 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QBesIKJY.hh,v 1.2 2006/06/29 20:05:55 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QBesIKJY ----------------
// by Mikhail Kossov, Sept 2000.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QCHIPSWorld.hh,v 1.25 2006/06/29 20:05:57 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCHIPSWorld ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QCandidate.hh,v 1.28 2006/06/29 20:05:59 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidate ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QCandidateVector.hh,v 1.21 2006/06/29 20:06:01 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QChipolino.hh,v 1.23 2006/06/29 20:06:03 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QChipolino ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QContent.hh,v 1.28 2006/06/29 20:06:05 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QContent ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QDecayChan.hh,v 1.23 2006/06/29 20:06:07 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QDecayChan ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QDecayChanVector.hh,v 1.19 2006/06/29 20:06:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QEnvironment.hh,v 1.28 2007/02/28 14:26:25 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QEnvironment.hh,v 1.32 2007/10/07 13:31:41 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QEnvironment ----------------
// by Mikhail Kossov, August 2000.
@@ -40,6 +40,7 @@
class G4QEnvironment
{
public:
G4QEnvironment(const G4QNucleus theEnv); // Create Env and add Quasmons later
G4QEnvironment(const G4QHadronVector& projHadrons, const G4int targPDG);
G4QEnvironment(const G4QEnvironment& right); // copy QEnvironment by value
G4QEnvironment(G4QEnvironment* right); // copy QEnvironment by pointer
@@ -57,6 +58,7 @@ public:
G4QHadronVector* GetProjectiles(); // User is responsible for Destroy/Clear/Delete
// Modifiers
void AddQuasmon(G4Quasmon* Q); // Add aQuasmon to theEnvironment
G4QHadronVector* Fragment(); // User must clear and destroy the G4QHadronVec
// Static functions
@@ -77,15 +79,8 @@ private:
void InitClustersVector(G4int maxC, G4int maxA);//Init.NucClust's for 1st int
void CleanUp(); // Makes theEnvironment=vacuum & kill Quasmons
void PrepareInteractionProbabilities(const G4QContent& projQC, G4double AP);
void EvaporateResidual(G4QHadron* evap, G4bool corFlag=false);// Final Evap.
void EvaporateResidual(G4QHadron* h);// Final Evaporation of a nucl. fragment
void DecayBaryon(G4QHadron* dB); // Decay baryon (gamma+N or Delta->N+Pi)
void DecayDibaryon(G4QHadron* dB); // Decay di-baryon (deuteron is kept)
void DecayIsonucleus(G4QHadron* dB); // Decay nP+(Pi+) or nN+(Pi-) system
void DecayMultyBaryon(G4QHadron* dB);// Decay of Ap, An or AL states
void DecayAntiStrange(G4QHadron* dB);// Decay nuclei containing K+/K0
void DecayAlphaBar(G4QHadron* dB); // Decay of alpha+p or alpha+n states
void DecayAlphaDiN(G4QHadron* dB); // Decay of alpha+p+p states
void DecayAlphaAlpha(G4QHadron* dB); // Decay of alpha+alpha state
G4bool CheckGroundState(G4Quasmon* quasm,G4bool corFlag=false);//as G4Q for QHV
G4bool DecayInEnvQ(G4Quasmon* quasm); // Use befor evaporation in PANIC case
@@ -25,7 +25,7 @@
//
//
// $Id: G4QException.hh,v 1.10 2006/06/29 20:06:13 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QException ----------------
// by Mikhail Kossov, November 2003.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QFragmentation.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QHadron.hh,v 1.34 2006/11/20 16:29:11 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QHadron.hh,v 1.35 2007/08/28 15:42:32 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QHadron ----------------
// by Mikhail Kossov, Sept 1999.
@@ -111,8 +111,14 @@ public:
G4bool CorMDecayIn2(G4double corM, G4LorentzVector& fr4Mom);// This(newMass corM)+fr4Mom
G4bool CorEDecayIn2(G4double corE, G4LorentzVector& fr4Mom);// This(E+=cE,P)+f(fE-=cE,fP)
G4bool RelDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
G4double maxCost = 1., G4double minCost = -1.);
G4double maxCost = 1., G4double minCost = -1.);
G4bool CopDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
G4double cop);
G4bool DecayIn3(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& t4Mom);
G4bool RelDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
G4LorentzVector& dir, G4double maxCost = 1., G4double minCost = -1.);
G4bool CopDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
G4LorentzVector& dir, G4double cosp);
void Init3D(); // Initializes 3D nucleus with (Pos,4M)nucleons
private:
@@ -25,7 +25,7 @@
//
//
// $Id: G4QHadronBuilder.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QHadronVector.hh,v 1.22 2006/11/16 11:36:09 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -36,7 +36,7 @@
#define G4QHadronVector_h 1
//
// $Id: G4QHadronVector.hh,v 1.22 2006/11/16 11:36:09 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QInteraction.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
#ifndef G4QInteraction_h
@@ -25,7 +25,7 @@
//
//
// $Id: G4QInteractionVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -37,7 +37,7 @@
//
// $Id: G4QInteractionVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QIsotope.hh,v 1.5 2006/06/29 20:06:19 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
//
// ---------------- G4QIsotope header ----------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QNucleus.hh,v 1.31 2006/10/27 16:47:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QNucleus.hh,v 1.33 2007/10/31 13:23:07 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QNucleus ----------------
// by Mikhail Kossov, Sept 1999.
@@ -37,6 +37,7 @@
#include "G4QCandidateVector.hh"
#include "G4QHadronVector.hh"
#include "G4QChipolino.hh"
#include <utility>
#include <vector>
#include "globals.hh"
@@ -51,7 +52,7 @@ public:
G4QNucleus(G4QContent nucQC, G4LorentzVector p); // Full QuarkCont-Constructor
G4QNucleus(G4int z, G4int n, G4int s=0); // At Rest ZNS-Constructor
G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p);// Full ZNS-Constructor
G4QNucleus(const G4QNucleus& right); // Copy Constructor by value
//G4QNucleus(const G4QNucleus& right); // Copy Constructor by value
G4QNucleus(G4QNucleus* right); // Copy Constructor by pointer
~G4QNucleus(); // Public Destructor
// Overloaded Operators
@@ -93,10 +94,20 @@ public:
}
G4QHadron* GetNextNucleon()
{return (currentNucleon>=0&&currentNucleon<GetA()) ? theNucleons[currentNucleon++] :0;}
std::vector<G4double>* GetBThickness() const {return Tb;} // T(b) function, step .1 fm
//std::vector<G4double>* GetBThickness() const {return Tb;} // T(b) function, step .1 fm
std::vector<G4double> const* GetBThickness() {return &Tb;} // T(b) function, step .1 fm
// Specific Modifiers
G4bool EvaporateBaryon(G4QHadron* h1,G4QHadron* h2); // Evaporate Baryon from Nucleus
void EvaporateNucleus(G4QHadron* hA, G4QHadronVector* oHV);// Evaporate Nucleus
//void DecayBaryon(G4QHadron* dB, G4QHadronVector* oHV); // gamma+N or Delt->N+Pi @@later
void DecayDibaryon(G4QHadron* dB, G4QHadronVector* oHV); // deuteron is kept
void DecayIsonucleus(G4QHadron* dB, G4QHadronVector* oHV); // nP+(Pi+) or nN+(Pi-)
void DecayMultyBaryon(G4QHadron* dB, G4QHadronVector* oHV);// A*p, A*n or A*L
void DecayAntiStrange(G4QHadron* dB, G4QHadronVector* oHV);// nuclei with K+/K0
void DecayAlphaBar(G4QHadron* dB, G4QHadronVector* oHV); // alpha+p or alpha+n
void DecayAlphaDiN(G4QHadron* dB, G4QHadronVector* oHV); // alpha+p+p
void DecayAlphaAlpha(G4QHadron* dB, G4QHadronVector* oHV); // alpha+alpha
G4int SplitBaryon(); // Is it possible to split baryon/alpha
G4int HadrToNucPDG(G4int hPDG); // Converts hadronic PDGCode to nuclear
G4int NucToHadrPDG(G4int nPDG); // Converts nuclear PDGCode to hadronic
@@ -180,7 +191,8 @@ private:
G4int currentNucleon; // Current nucleon for the NextNucleon (? M.K.)
G4double rho0; // Normalazation density
G4double radius; // Nuclear radius
std::vector<G4double>* Tb; // T(b) function with step .1 fm (@@ make .1 a parameter)
//std::vector<G4double>* Tb; // T(b) function with step .1 fm (@@ make .1 a parameter)
std::vector<G4double> Tb; // T(b) function with step .1 fm (@@ make .1 a parameter)
};
std::ostream& operator<<(std::ostream& lhs, G4QNucleus& rhs);
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPDGCode.hh,v 1.26 2006/06/29 20:06:23 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QPDGCode ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPDGCodeVector.hh,v 1.19 2006/06/29 20:06:25 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4QPDGToG4Particle.hh,v 1.4 2006/06/29 20:06:27 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QPDGToG4Particle header ----------------
// by Mikhail Kossov, December 2003.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParentCluster.hh,v 1.23 2006/06/29 20:06:29 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QParentCluster ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParentClusterVector.hh,v 1.18 2006/06/29 20:06:31 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParticle.hh,v 1.24 2006/06/29 20:06:33 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QParticle ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParticleVector.hh,v 1.19 2006/06/29 20:06:35 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -28,7 +28,7 @@
#define G4QParton_h 1
// $Id: G4QParton.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class header file
@@ -27,7 +27,7 @@
#define G4QPartonPair_h 1
//
// $Id: G4QPartonPair.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPartonPairVector.hh,v 1.1 2006/11/16 11:36:09 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, October 2006.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPartonVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Oct 2006.
@@ -36,7 +36,7 @@
#define G4QPartonVector_h 1
//
// $Id: G4QPartonVector.hh,v 1.1 2006/10/30 10:40:34 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -27,7 +27,7 @@
#define G4QPomeron_h 1
//
// $Id: G4QPomeron.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QSplitter.hh,v 1.2 2006/06/29 20:06:37 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QSplitter ----------------
// by Mikhail Kossov, Avgust 2005.
@@ -26,7 +26,7 @@
//
//
// $Id: G4QString.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
#ifndef G4QString_h
#define G4QString_h 1
@@ -25,7 +25,7 @@
//
//
// $Id: G4QStringVector.hh,v 1.1 2006/10/30 10:40:35 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QStringVector ----------------
// by Mikhail Kossov, October 2006.
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Quasmon.hh,v 1.38 2006/06/29 20:06:39 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4Quasmon.hh,v 1.39 2007/08/09 13:07:47 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4Quasmon ----------------
// by Mikhail Kossov, July 1999.
@@ -100,8 +100,8 @@ private:
G4double GetRandomMass(G4int PDGCode, G4double maxM);
void ModifyInMatterCandidates();
void CalculateHadronizationProbabilities(G4double excE, G4double kQ,
G4LorentzVector k4M,
G4bool piF, G4bool gaF);
G4LorentzVector k4M, G4bool piF,
G4bool gaF, G4bool first=false);
void FillHadronVector(G4QHadron* qHadron);
G4int RandomPoisson(G4double meanValue);
G4double GetQPartonMomentum(G4double mMinResidual2, G4double mCandidate2);
@@ -25,7 +25,7 @@
//
//
// $Id: G4QuasmonString.hh,v 1.4 2006/06/29 20:06:41 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QuasmonString ----------------
// by Mikhail Kossov, October 2004.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QuasmonVector.hh,v 1.19 2006/06/29 20:06:43 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QuasmonVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QBesIKJY.cc,v 1.2 2006/06/29 20:06:45 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QBesIKJY ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QCHIPSWorld.cc,v 1.32 2006/06/29 20:06:47 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCHIPSWorld ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QCandidate.cc,v 1.34 2006/11/27 10:44:53 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QCandidate ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QChipolino.cc,v 1.32 2006/11/27 10:44:53 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QChipolino ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QContent.cc,v 1.43 2006/11/27 10:44:53 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QContent ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QDecayChan.cc,v 1.27 2006/11/27 10:44:54 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QDecayChan ----------------
// by Mikhail Kossov, Sept 1999.
File diff suppressed because it is too large Load Diff
@@ -25,7 +25,7 @@
//
//
// $Id: G4QException.cc,v 1.9 2006/06/29 20:06:59 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QException ----------------
// by Mikhail Kossov, November 2003.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QFragmentation.cc,v 1.3 2007/05/02 14:59:55 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QHadron.cc,v 1.48 2007/05/03 07:54:58 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QHadron.cc,v 1.51 2007/11/15 09:33:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QHadron ----------------
// by Mikhail Kossov, Sept 1999.
@@ -50,17 +50,17 @@ G4double G4QHadron::widthOfPtSquare = 0.01*GeV*GeV; // ? M.K.
G4double G4QHadron::minTransverseMass = 1.*keV; // ? M.K.
G4QHadron::G4QHadron() : theQPDG(0),theMomentum(0.,0.,0.,0.),valQ(0,0,0,0,0,0),nFragm(0),
thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),
formTime(0.) {}
thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
Color(),AntiColor(),bindE(0.),formTime(0.) {}
G4QHadron::G4QHadron(G4LorentzVector p) : theQPDG(0),theMomentum(p),valQ(0,0,0,0,0,0),
nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
bindE(0.),formTime(0.) {}
Color(),AntiColor(),bindE(0.),formTime(0.) {}
// For Chipolino or Quasmon doesn't make any sense
G4QHadron::G4QHadron(G4int PDGCode, G4LorentzVector p) : theQPDG(PDGCode),theMomentum(p),
nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
bindE(0.),formTime(0.)
Color(),AntiColor(),bindE(0.),formTime(0.)
{
#ifdef debug
G4cout<<"G4QHadron must be created with PDG="<<PDGCode<<", 4M="<<p<<G4endl;
@@ -80,7 +80,7 @@ G4QHadron::G4QHadron(G4int PDGCode, G4LorentzVector p) : theQPDG(PDGCode),theMom
// For Chipolino or Quasmon doesn't make any sense
G4QHadron::G4QHadron(G4QPDGCode QPDG, G4LorentzVector p) : theQPDG(QPDG),theMomentum(p),
nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
bindE(0.),formTime(0.)
Color(),AntiColor(),bindE(0.),formTime(0.)
{
if(theQPDG.GetQCode()>-1)
{
@@ -98,7 +98,7 @@ G4QHadron::G4QHadron(G4QPDGCode QPDG, G4LorentzVector p) : theQPDG(QPDG),theMome
// Make sense Chipolino or Quasmon
G4QHadron::G4QHadron(G4QContent QC, G4LorentzVector p): theQPDG(0),theMomentum(p),valQ(QC),
nFragm(0),thePosition(0.,0.,0.),theCollisionCount(0),isSplit(false),Direction(true),
bindE(0.),formTime(0.)
Color(),AntiColor(),bindE(0.),formTime(0.)
{
G4int curPDG=valQ.GetSPDGCode();
if(curPDG==10&&valQ.GetBaryonNumber()>0) curPDG=valQ.GetZNSPDGCode();
@@ -108,27 +108,32 @@ G4QHadron::G4QHadron(G4QContent QC, G4LorentzVector p): theQPDG(0),theMomentum(p
G4QHadron::G4QHadron(G4int PDGCode, G4double aMass, G4QContent QC) :
theQPDG(PDGCode),theMomentum(0.,0.,0., aMass),valQ(QC),nFragm(0),thePosition(0.,0.,0.),
theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),formTime(0.)
theCollisionCount(0),isSplit(false),Direction(true),Color(),AntiColor(),bindE(0.),
formTime(0.)
{}
G4QHadron::G4QHadron(G4QPDGCode QPDG, G4double aMass, G4QContent QC) :
theQPDG(QPDG),theMomentum(0.,0.,0., aMass),valQ(QC),nFragm(0),thePosition(0.,0.,0.),
theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),formTime(0.)
theCollisionCount(0),isSplit(false),Direction(true),Color(),AntiColor(),bindE(0.),
formTime(0.)
{}
G4QHadron::G4QHadron(G4int PDGCode, G4LorentzVector p, G4QContent QC) :
theQPDG(PDGCode),theMomentum(p),valQ(QC),nFragm(0),thePosition(0.,0.,0.),
theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),formTime(0.)
theCollisionCount(0),isSplit(false),Direction(true),Color(),AntiColor(),bindE(0.),
formTime(0.)
{}
G4QHadron::G4QHadron(G4QPDGCode QPDG, G4LorentzVector p, G4QContent QC) :
theQPDG(QPDG),theMomentum(p),valQ(QC),nFragm(0),thePosition(0.,0.,0.),
theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),formTime(0.)
theCollisionCount(0),isSplit(false),Direction(true),Color(),AntiColor(),bindE(0.),
formTime(0.)
{}
G4QHadron::G4QHadron(G4QParticle* pPart, G4double maxM) :
theQPDG(pPart->GetQPDG()),theMomentum(0.,0.,0.,0.),nFragm(0),thePosition(0.,0.,0.),
theCollisionCount(0),isSplit(false),Direction(true),bindE(0.),formTime(0.)
theCollisionCount(0),isSplit(false),Direction(true),Color(),AntiColor(),bindE(0.),
formTime(0.)
{
#ifdef debug
G4cout<<"G4QHadron is created & randomized with maxM="<<maxM<<G4endl;
@@ -198,7 +203,14 @@ const G4QHadron& G4QHadron::operator=(const G4QHadron &right)
return *this;
}
G4QHadron::~G4QHadron() {}
G4QHadron::~G4QHadron()
{
std::deque<G4QParton*>::iterator pos;
for(pos=Color.begin(); pos<Color.end(); pos++) {delete [] *pos;}
Color.clear();
for(pos=AntiColor.begin(); pos<AntiColor.end(); pos++) {delete [] *pos;}
AntiColor.clear();
}
// Define quark content of the particle with a particular PDG Code
void G4QHadron::DefineQC(G4int PDGCode)
@@ -395,6 +407,130 @@ G4bool G4QHadron::RelDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom,
return true;
} // End of "RelDecayIn2"
// Decay of Hadron In2Particles f&s, f w/r/to dN/dO [cp>0: ~cost^cp, cp<0: ~(1-cost)^(-cp)]
G4bool G4QHadron::CopDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom,
G4LorentzVector& dir, G4double cosp)
{// ===================================================================
G4double fM2 = f4Mom.m2();
G4double fM = sqrt(fM2); // Mass of the 1st Hadron
G4double sM2 = s4Mom.m2();
G4double sM = sqrt(sM2); // Mass of the 2nd Hadron
G4double iM2 = theMomentum.m2();
G4double iM = sqrt(iM2); // Mass of the decaying hadron
G4double vP = theMomentum.rho(); // Momentum of the decaying hadron
G4double dE = theMomentum.e(); // Energy of the decaying hadron
G4bool neg=false; // Negative (backward) distribution of t
if(cosp<0)
{
cosp=-cosp;
neg=true;
}
if(dE<vP)
{
G4cerr<<"***G4QHad::CopDecIn2: Tachionic 4-mom="<<theMomentum<<", E-p="<<dE-vP<<G4endl;
G4double accuracy=.000001*vP;
G4double emodif=std::fabs(dE-vP);
//if(emodif<accuracy)
//{
G4cerr<<"G4QHadron::CopDecIn2: *Boost* E-p shift is corrected to "<<emodif<<G4endl;
theMomentum.setE(vP+emodif+.01*accuracy);
//}
}
G4ThreeVector ltb = theMomentum.boostVector();// Boost vector for backward Lorentz Trans.
G4ThreeVector ltf = -ltb; // Boost vector for forward Lorentz Trans.
G4LorentzVector cdir = dir; // A copy to make a transformation to CMS
#ifdef ppdebug
if(cdir.e()+.001<cdir.rho()) G4cerr<<"*G4QH::RDIn2:*Boost* cd4M="<<cdir<<",e-p="
<<cdir.e()-cdir.rho()<<G4endl;
#endif
cdir.boost(ltf); // Direction transpormed to CMS of the Momentum
G4ThreeVector vdir = cdir.vect(); // 3-Vector of the direction-particle
#ifdef ppdebug
G4cout<<"G4QHad::CopDI2:dir="<<dir<<",ltf="<<ltf<<",cdir="<<cdir<<",vdir="<<vdir<<G4endl;
#endif
G4ThreeVector vx(0.,0.,1.); // Ort in the direction of the reference particle
G4ThreeVector vy(0.,1.,0.); // First ort orthogonal to the direction
G4ThreeVector vz(1.,0.,0.); // Second ort orthoganal to the direction
if(vdir.mag2() > 0.) // the refference particle isn't at rest in CMS
{
vx = vdir.unit(); // Ort in the direction of the reference particle
#ifdef ppdebug
G4cout<<"G4QH::CopDecIn2:Vx="<<vx<<",M="<<theMomentum<<",d="<<dir<<",c="<<cdir<<G4endl;
#endif
G4ThreeVector vv= vx.orthogonal(); // Not normed orthogonal vector (!)
vy = vv.unit(); // First ort orthogonal to the direction
vz = vx.cross(vy); // Second ort orthoganal to the direction
}
#ifdef ppdebug
G4cout<<"G4QHad::CopDecIn2:iM="<<iM<<"=>fM="<<fM<<"+sM="<<sM<<",ob="<<vx<<vy<<vz<<G4endl;
#endif
if(fabs(iM-fM-sM)<.00000001)
{
G4double fR=fM/iM;
G4double sR=sM/iM;
f4Mom=fR*theMomentum;
s4Mom=sR*theMomentum;
return true;
}
else if (iM+.001<fM+sM || iM==0.)
{//@@ Later on make a quark content check for the decay
G4cerr<<"***G4QH::CopDecIn2: fM="<<fM<<"+sM="<<sM<<">iM="<<iM<<",d="<<iM-fM-sM<<G4endl;
return false;
}
G4double d2 = iM2-fM2-sM2;
G4double p2 = (d2*d2/4.-fM2*sM2)/iM2; // Decay momentum(^2) in CMS of Quasmon
if(p2<0.)
{
#ifdef ppdebug
G4cout<<"*G4QH:CopDI2:p2="<<p2<<"<0,d4/4="<<d2*d2/4.<<"<4*fM2*sM2="<<4*fM2*sM2<<G4endl;
#endif
p2=0.;
}
G4double p = sqrt(p2);
G4double ct = 0;
G4double rn = pow(G4UniformRand(),cosp+1.);
if(neg) ct = rn+rn-1.; // More backward than forward
else ct = 1.-rn-rn; // More forward than backward
//
G4double phi= twopi*G4UniformRand(); // @@ Change 360.*deg to M_TWOPI (?)
G4double ps=0.;
if(fabs(ct)<1.) ps = p * sqrt(1.-ct*ct);
else
{
#ifdef ppdebug
G4cout<<"**G4QH::CopDecayIn2:ct="<<ct<<",mac="<<maxCost<<",mic="<<minCost<<G4endl;
//throw G4QException("***G4QHadron::RDIn2: bad cos(theta)");
#endif
if(ct>1.) ct=1.;
if(ct<-1.) ct=-1.;
}
G4ThreeVector pVect=(ps*sin(phi))*vz+(ps*cos(phi))*vy+p*ct*vx;
#ifdef ppdebug
G4cout<<"G4QH::CopDIn2:ct="<<ct<<",p="<<p<<",ps="<<ps<<",ph="<<phi<<",v="<<pVect<<G4endl;
#endif
f4Mom.setVect(pVect);
f4Mom.setE(sqrt(fM2+p2));
s4Mom.setVect((-1)*pVect);
s4Mom.setE(sqrt(sM2+p2));
#ifdef ppdebug
G4cout<<"G4QHadr::CopDecIn2:p2="<<p2<<",v="<<ltb<<",f4M="<<f4Mom<<" + s4M="<<s4Mom<<" = "
<<f4Mom+s4Mom<<", M="<<iM<<G4endl;
#endif
if(f4Mom.e()+.001<f4Mom.rho())G4cerr<<"*G4QH::RDIn2:*Boost* f4M="<<f4Mom<<",e-p="
<<f4Mom.e()-f4Mom.rho()<<G4endl;
f4Mom.boost(ltb); // Lor.Trans. of 1st hadron back to LS
if(s4Mom.e()+.001<s4Mom.rho())G4cerr<<"*G4QH::RDIn2:*Boost* s4M="<<s4Mom<<",e-p="
<<s4Mom.e()-s4Mom.rho()<<G4endl;
s4Mom.boost(ltb); // Lor.Trans. of 2nd hadron back to LS
#ifdef ppdebug
G4cout<<"G4QHadron::CopDecayIn2:Output, f4Mom="<<f4Mom<<" + s4Mom="<<s4Mom<<" = "
<<f4Mom+s4Mom<<", d4M="<<theMomentum-f4Mom-s4Mom<<G4endl;
#endif
return true;
} // End of "CopDecayIn2"
// Decay of the Hadron in 2 particles (f + s)
G4bool G4QHadron::DecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom)
{// ===================================================================
@@ -713,7 +849,176 @@ G4bool G4QHadron::DecayIn3
return false;
}
return true;
}
} // End of DecayIn3
// Relative Decay of the hadron in 3 particles i=>f+s+t (t is with respect to minC<ct<maxC)
G4bool G4QHadron::RelDecayIn3(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom,
G4LorentzVector& t4Mom, G4LorentzVector& dir,
G4double maxCost, G4double minCost)
{// ====================================================================================
#ifdef debug
G4cout<<"G4QH::RelDIn3:"<<theMomentum<<"=>f="<<f4Mom<<"+s="<<s4Mom<<"+t="<<t4Mom<<G4endl;
#endif
G4double iM = theMomentum.m(); // Mass of the decaying hadron
G4double fM = f4Mom.m(); // Mass of the 1st hadron
G4double sM = s4Mom.m(); // Mass of the 2nd hadron
G4double tM = t4Mom.m(); // Mass of the 3rd hadron
G4double eps = 0.001; // Accuracy of the split condition
if (fabs(iM-fM-sM-tM)<=eps)
{
G4double fR=fM/iM;
G4double sR=sM/iM;
G4double tR=tM/iM;
f4Mom=fR*theMomentum;
s4Mom=sR*theMomentum;
t4Mom=tR*theMomentum;
return true;
}
if (iM+eps<fM+sM+tM)
{
G4cout<<"***G4QHadron::RelDecayIn3:fM="<<fM<<" + sM="<<sM<<" + tM="<<tM<<" > iM="<<iM
<<",d="<<iM-fM-sM-tM<<G4endl;
return false;
}
G4double fM2 = fM*fM;
G4double sM2 = sM*sM;
G4double tM2 = tM*tM;
G4double iM2 = iM*iM;
G4double m13sBase=(iM-sM)*(iM-sM)-(fM+tM)*(fM+tM);
G4double m12sMin =(fM+sM)*(fM+sM);
G4double m12sBase=(iM-tM)*(iM-tM)-m12sMin;
G4double rR = 0.;
G4double rnd= 1.;
#ifdef debug
G4int tr = 0; //@@ Comment if "cout" below is skiped @@
#endif
G4double m12s = 0.; // Fake definition before the Loop
while (rnd > rR)
{
m12s = m12sMin + m12sBase*G4UniformRand();
G4double e1=m12s+fM2-sM2;
G4double e2=iM2-m12s-tM2;
G4double four12=4*m12s;
G4double m13sRange=0.;
G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
if(dif<0.)
{
#ifdef debug
if(dif<-.01) G4cerr<<"G4QHadron::RelDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM="
<<fM<<",m12(s+f)="<<sqrt(m12s)<<", d="<<iM-fM-sM-tM<<G4endl;
#endif
}
else m13sRange=sqrt(dif)/m12s;
rR = m13sRange/m13sBase;
rnd= G4UniformRand();
#ifdef debug
G4cout<<"G4QHadron::RelDecayIn3: try decay #"<<++tr<<", rR="<<rR<<",rnd="<<rnd<<G4endl;
#endif
}
G4double m12 = sqrt(m12s); // Mass of the H1+H2 system
G4LorentzVector dh4Mom(0.,0.,0.,m12);
if(!RelDecayIn2(t4Mom,dh4Mom,dir,maxCost,minCost))
{
G4cerr<<"***G4QHadron::RelDecayIn3: Exception1"<<G4endl;
//throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
return false;
}
#ifdef debug
G4cout<<"G4QHadron::RelDecayIn3: Now the last decay of m12="<<dh4Mom.m()<<G4endl;
#endif
if(!G4QHadron(dh4Mom).DecayIn2(f4Mom,s4Mom))
{
G4cerr<<"***G4QHadron::RelDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl;
//throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
return false;
}
return true;
} // End of RelDecayIn3
// Relative Decay of hadron in 3: i=>f+s+t. dN/dO [cp>0:~cost^cp, cp<0:~(1-cost)^(-cp)]
G4bool G4QHadron::CopDecayIn3(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom,
G4LorentzVector& t4Mom, G4LorentzVector& dir, G4double cosp)
{// ====================================================================================
#ifdef debug
G4cout<<"G4QH::CopDIn3:"<<theMomentum<<"=>f="<<f4Mom<<"+s="<<s4Mom<<"+t="<<t4Mom<<G4endl;
#endif
G4double iM = theMomentum.m(); // Mass of the decaying hadron
G4double fM = f4Mom.m(); // Mass of the 1st hadron
G4double sM = s4Mom.m(); // Mass of the 2nd hadron
G4double tM = t4Mom.m(); // Mass of the 3rd hadron
G4double eps = 0.001; // Accuracy of the split condition
if (fabs(iM-fM-sM-tM)<=eps)
{
G4double fR=fM/iM;
G4double sR=sM/iM;
G4double tR=tM/iM;
f4Mom=fR*theMomentum;
s4Mom=sR*theMomentum;
t4Mom=tR*theMomentum;
return true;
}
if (iM+eps<fM+sM+tM)
{
G4cout<<"***G4QHadron::CopDecayIn3:fM="<<fM<<" + sM="<<sM<<" + tM="<<tM<<" > iM="<<iM
<<",d="<<iM-fM-sM-tM<<G4endl;
return false;
}
G4double fM2 = fM*fM;
G4double sM2 = sM*sM;
G4double tM2 = tM*tM;
G4double iM2 = iM*iM;
G4double m13sBase=(iM-sM)*(iM-sM)-(fM+tM)*(fM+tM);
G4double m12sMin =(fM+sM)*(fM+sM);
G4double m12sBase=(iM-tM)*(iM-tM)-m12sMin;
G4double rR = 0.;
G4double rnd= 1.;
#ifdef debug
G4int tr = 0; //@@ Comment if "cout" below is skiped @@
#endif
G4double m12s = 0.; // Fake definition before the Loop
while (rnd > rR)
{
m12s = m12sMin + m12sBase*G4UniformRand();
G4double e1=m12s+fM2-sM2;
G4double e2=iM2-m12s-tM2;
G4double four12=4*m12s;
G4double m13sRange=0.;
G4double dif=(e1*e1-four12*fM2)*(e2*e2-four12*tM2);
if(dif<0.)
{
#ifdef debug
if(dif<-.01) G4cerr<<"G4QHadron::CopDecayIn3:iM="<<iM<<",tM="<<tM<<",sM="<<sM<<",fM="
<<fM<<",m12(s+f)="<<sqrt(m12s)<<", d="<<iM-fM-sM-tM<<G4endl;
#endif
}
else m13sRange=sqrt(dif)/m12s;
rR = m13sRange/m13sBase;
rnd= G4UniformRand();
#ifdef debug
G4cout<<"G4QHadron::CopDecayIn3: try decay #"<<++tr<<", rR="<<rR<<",rnd="<<rnd<<G4endl;
#endif
}
G4double m12 = sqrt(m12s); // Mass of the H1+H2 system
G4LorentzVector dh4Mom(0.,0.,0.,m12);
if(!CopDecayIn2(t4Mom,dh4Mom,dir,cosp))
{
G4cerr<<"***G4QHadron::CopDecayIn3: Exception1"<<G4endl;
//throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
return false;
}
#ifdef debug
G4cout<<"G4QHadron::DecayIn3: Now the last decay of m12="<<dh4Mom.m()<<G4endl;
#endif
if(!G4QHadron(dh4Mom).DecayIn2(f4Mom,s4Mom))
{
G4cerr<<"***G4QHadron::CopDecayIn3: Error in DecayIn2 -> Exception2"<<G4endl;
//throw G4QException("G4QHadron::DecayIn3(): DecayIn2 did not succeed");
return false;
}
return true;
} // End of CopDecayIn3
// Randomize particle mass taking into account the width
G4double G4QHadron::RandomizeMass(G4QParticle* pPart, G4double maxM)
@@ -25,7 +25,7 @@
//
//
// $Id: G4QHadronBuilder.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// -----------------------------------------------------------------------------
// GEANT4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QInteraction.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QIsotope.cc,v 1.9 2006/12/07 19:25:49 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QIsotope.cc,v 1.10 2007/11/28 14:14:36 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QIsotope class ----------------
// by Mikhail Kossov, December 2003.
@@ -656,6 +656,7 @@ G4QIsotope::G4QIsotope()
#ifdef cdebug
G4cout<<"G4QIsotope::Constructor: natIsoCrosS is filled"<<G4endl;
#endif
delete is;
}
#ifdef cdebug
G4cout<<"G4QIsotope::Constructor: is finished"<<G4endl;
@@ -667,7 +668,7 @@ G4QIsotope::~G4QIsotope() // The QIsotopes are destructed only in theEn
#ifdef debug
G4cout<<"G4QIsotope::Destructor is called"<<G4endl;
#endif
G4int uP=natElements.size(); // uP, nP, and sP must be the same
G4int uP=natElements.size();
if(uP) for(G4int i=0; i<uP; i++)
{
vector<pair<G4int,G4double>*>* curA=natElements[i];
File diff suppressed because it is too large Load Diff
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QPDGCode.cc,v 1.53 2006/11/27 10:44:55 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// $Id: G4QPDGCode.cc,v 1.55 2007/10/07 13:31:42 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QPDGCode ----------------
// by Mikhail Kossov, Sept 1999.
@@ -1733,12 +1733,12 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
}
else if(Bn==3)
{
if(!S) return mT; // Bn=3
if(!S) // Bn=3
{
if (Z==1 && N== 2) return mT; // tritium
else if(Z==2 && N== 1) return mHe3; // hetrium
}
if(S== 1 && Z==-1 && N== 3) return dnS; // nnSig-
if(S== 1 && Z==-1 && N== 3) // nnSig-
{
if (Z==-1 && N== 3) return dnS; // nnSig-
else if(Z== 3 && N==-1) return dpS; // ppSig+
@@ -1974,9 +1974,9 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
if(S>0)
{
G4double bs=0.;
if (S==2) bs=a2;
else if(S==3) bs=a3;
else if(S>3) bs=b7*exp(-b8/(A+1.));
if (A==2) bs=a2;
else if(A==3) bs=a3;
else if(A>3) bs=b7*exp(-b8/(A+1.));
m+=S*(mL-bs);
}
#ifdef debug
@@ -2305,47 +2305,33 @@ void G4QPDGCode::ConvertPDGToZNS(G4int nucPDG, G4int& z, G4int& n, G4int& s)
{// =======================================================================
if(nucPDG>80000000&&nucPDG<100000000) // Condition of conversion
{
G4int r=nucPDG-90000000;
if(!r)
{
z=0;
n=0;
s=0;
return;
}
// Antinucleus extraction
if(r<-200000) // Negative -> anLambdas
z=0;
n=0;
s=0;
G4int r=nucPDG;
if(r==90000000) return;
G4int cn =r%1000; // candidate to #of neutrons
if(cn)
{
G4int ns=(-r-200000)/1000000+1;
r+=ns*1000000; // Get out aL from PDG
s=-ns; // Remember aLambdas
if(cn>500) cn-=1000; // AntiNeutrons
n=cn; // Increment neutrons
r-=cn; // Subtract them from the residual
if(r==90000000) return;
}
if(r<-200) // Negative -> aProtons
G4int cz =r%1000000; // candidate to #of neutrons
if(cz)
{
G4int nz=(-r-200)/1000+1;
r+=nz*1000; // Get out aP from PDG
z=-nz; // Remember aProtons
if(cz>500000) cz-=1000000; // AntiProtons
z=cz/1000; // Number of protons
r-=cz; // Subtract them from the residual
if(r==90000000) return;
}
if(r<0) // Negative -> aNeutrons
G4int cs =r%10000000; // candidate to #of neutrons
if(cs)
{
G4int nn=-r;
r=0; // Get out aN from PDG
n=-nn; // Remember aNeutrons
if(cs>5000000) cs-=10000000; // AntiLambda
s=cs/1000000; // Number of Lambdas
}
G4int sz =r/1000; // Residual to analize
n+=r%1000; // A#of Neutrons
if(n>700) // AntiNutrons
{
n-=1000;
z++;
}
z+=sz%1000; // A#of Protons
if(z>700) // AntiProtons
{
z-=1000;
s++;
}
s+=sz/1000; // A#of Lambdas
}
return;
}
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4QPDGToG4Particle.cc,v 1.5 2006/06/29 20:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QG4ToG4Particle singletone class ------------------
// by Mikhail Kossov, December 2003.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParentCluster.cc,v 1.25 2006/11/27 10:44:55 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QParentCluster ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParticle.cc,v 1.33 2006/11/27 10:44:55 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QParticle ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QParton.cc,v 1.3 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -26,7 +26,7 @@
#include "G4QPartonPair.hh"
//
// $Id: G4QPartonPair.cc,v 1.1 2006/10/30 10:40:36 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPomeron.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -28,7 +28,7 @@
//
//
// $Id: G4QSplitter.cc,v 1.6 2006/11/27 10:44:55 mkossov Exp $
// GEANT4 tag $Name: geant4-09-00 $
// GEANT4 tag $Name: geant4-09-01 $
//
// ---------------- G4QSplitter ----------------
// by Mikhail Kossov, August 2005.

Some files were not shown because too many files have changed in this diff Show More