Import Geant4 9.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 15:58:43 +02:00
parent 96c8bcd0af
commit b79225fb37
7544 changed files with 245407 additions and 91099 deletions
@@ -0,0 +1,19 @@
-------------------------------------------------------------------
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
History file for the Chiral Invariant Phase Space Model
-------------------------------------------------------
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
Date - Author (tag name)
----------------------------------------------------
Description of change
@@ -0,0 +1,40 @@
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
History file for hadronic/models/chiral_inv_phase_space/interface
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
31-Mar-2008 Dennis Wright (hadr-chips-body-V09-01-04)
-------------------------------------------------------------------
- add more parentheses around && within || to satisfy gcc-4.3 compiler
files affected:
G4QChipolino.cc
G4QEnvironment.cc
G4QNucleus.cc
G4Quasmon.cc
19-Mar-2008 Dennis Wright (hadr-chips-body-V09-01-03)
-------------------------------------------------------------------
- add parentheses around && within || to satisfy gcc-4.3 compiler
files affected:
G4QChipolino.cc
G4QContent.cc
G4QEnvironment.cc
G4QNucleus.cc
G4QPDGCode.cc
G4Quasmon.cc
- add braces and ; for empty while blocks to satisfy gcc-4.3
files affected:
G4QHadron.cc
18-Mar-2008 Vladimir Ivanchenko (hadr-chips-body-V09-01-02)
- G4QNucleus - fixed compillation warnings at Windows for constructors
@@ -25,7 +25,7 @@
//
//
// $Id: G4Chips.hh,v 1.19 2006/06/29 20:05:53 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QCandidateVector ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QEnvironment.hh,v 1.32 2007/10/07 13:31:41 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QEnvironment ----------------
// by Mikhail Kossov, August 2000.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QException.hh,v 1.10 2006/06/29 20:06:13 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QHadron.hh,v 1.35 2007/08/28 15:42:32 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QHadron.hh,v 1.36 2008/01/09 09:37:24 gcosmo Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QHadron ----------------
// by Mikhail Kossov, Sept 1999.
@@ -41,7 +41,7 @@
#include "Randomize.hh"
#include "G4QParticle.hh"
#include "G4QPartonVector.hh"
#include <deque>
#include <list>
class G4QHadron
{
@@ -150,8 +150,8 @@ private:
G4int theCollisionCount; // ?
G4bool isSplit; // Flag, that splitting was done
G4bool Direction; // FALSE=target, TRUE=projectile
std::deque<G4QParton*> Color; // container for quarks & anti-diquarks
std::deque<G4QParton*> AntiColor; // container for anti-quarks & diquarks
std::list<G4QParton*> Color; // container for quarks & anti-diquarks
std::list<G4QParton*> AntiColor; // container for anti-quarks & diquarks
G4double bindE; // Binding energy in nuclear matter
G4double formTime; // Formation time for the hadron
};
@@ -25,7 +25,7 @@
//
//
// $Id: G4QHadronBuilder.hh,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
#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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// ---------------- G4QIsotope header ----------------
@@ -25,7 +25,7 @@
//
//
// $Id: G4QNucleus.hh,v 1.33 2007/10/31 13:23:07 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QNucleus ----------------
// by Mikhail Kossov, Sept 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QPDGCode.hh,v 1.26 2006/06/29 20:06:23 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
#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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QStringVector ----------------
// by Mikhail Kossov, October 2006.
@@ -25,7 +25,7 @@
//
//
// $Id: G4Quasmon.hh,v 1.39 2007/08/09 13:07:47 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4Quasmon ----------------
// by Mikhail Kossov, July 1999.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QuasmonString.hh,v 1.4 2006/06/29 20:06:41 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QCandidate ----------------
// by Mikhail Kossov, Sept 1999.
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QChipolino.cc,v 1.32 2006/11/27 10:44:53 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QChipolino.cc,v 1.34 2008/03/31 20:29:33 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QChipolino ----------------
// by Mikhail Kossov, Sept 1999.
@@ -49,7 +49,9 @@ G4QChipolino::G4QChipolino(G4QContent& QCont)
G4int tban=abs(3*ban);
G4int tot=QCont.GetTot(); // Initial total number of quarks in QC
G4int tod=tot%2; // tot is even - meson or dibaryon-nucleus
if(!tod&&(tot<4||ban&&tot<tban)||tod&&tot<tban+2) QCont.IncQAQ(1,0.); // Add quark-pair
if ( (!tod && (tot < 4 || (ban && tot < tban) ) ) || (tod && tot < tban+2) )
QCont.IncQAQ(1,0.); // Add quark-pair
G4QContent rQC=QCont; // Copy for possible reduction ("annihilation" of q-qbar pairs)
tot=rQC.GetTot(); // New total number of quarks in QC (temporary)
if (tot%2)rQC.DecQAQ(-tban-2); // Reduce pairs, keep only 5 quarks (baryon case)
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QContent.cc,v 1.43 2006/11/27 10:44:53 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QContent.cc,v 1.44 2008/03/20 20:11:37 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QContent ----------------
// by Mikhail Kossov, Sept 1999.
@@ -1159,8 +1159,10 @@ G4int G4QContent::GetSPDGCode() const
G4int mI=nU-nAU-nD+nAD;
//if (abs(mI)>3||mS>3||(b>0&&s<-1)||(b<0&&s>1)) return 0;
//else if(abs(mI)>2||mS>2||(b>0&&s< 0)||(b<0&&s>0)) return 10;
if (b>0&&s==-1||b<0&&s==1) return 10;
else if(abs(mI)>2||mS>2||b>0&&s< 0||b<0&&s>0) return GetZNSPDGCode();
if ( (b > 0 && s == -1) || (b < 0 && s == 1) ) return 10;
else if (abs(mI) > 2 || mS > 2
|| (b > 0 && s < 0)
|| (b < 0 && s > 0)) return GetZNSPDGCode();
else if(mU>=mS&&mD>=mS&&mU+mD+mS==3*b) // Possible Unary Nuclear Cluster
{
G4int mZ=(mU+mD-mS-mS+3*mI)/6;
@@ -1319,8 +1321,9 @@ G4int G4QContent::NOfCombinations(const G4QContent& rhs) const
G4int mAS=rhs.GetAS();
G4int mN=mD+mU+mS-mAD-mAU-mAS;
////////////G4int PDG=abs(GetSPDGCode());
if(((nD<mD||nAD<mAD)&&!(mD-mAD)||(nU<mU||nAU<mAU)&&!(mU-mAU)||
(nS<mS||nAS<mAS)&&!(mS-mAS))&&!mN) return 1;
if (( ((nD < mD || nAD < mAD) && !(mD-mAD)) ||
((nU < mU || nAU < mAU) && !(mU-mAU)) ||
((nS < mS || nAS < mAS) && !(mS-mAS)) ) && !mN) return 1;
if(mD>0)
{
int j=nD;
@@ -25,7 +25,7 @@
//
//
// $Id: G4QDecayChan.cc,v 1.27 2006/11/27 10:44:54 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QDecayChan ----------------
// by Mikhail Kossov, Sept 1999.
@@ -27,8 +27,8 @@
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
//
//
// $Id: G4QEnvironment.cc,v 1.135 2007/11/28 13:42:13 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QEnvironment.cc,v 1.137 2008/03/31 20:30:00 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QEnvironment ----------------
// by Mikhail Kossov, August 2000.
@@ -6638,11 +6638,13 @@ G4QHadronVector* G4QEnvironment::FSInteraction()
G4cout<<"G4QEnv::FSI: Isonucleus decay result h#="<<hd<<", outPDG="<<hPDG<<G4endl;
#endif
}
else if(hBN>1 && (hBN==hCG&&!hST || !hCG&&!hST || !hCG&&hST==hBN)) //(n*P, n*N, or n*L)
{
else if ( hBN > 1 &&
( (hBN == hCG && !hST) ||
(!hCG && !hST) ||
(!hCG && hST==hBN) ) ) //(n*P, n*N, or n*L)
{
// *** Temporary Correction *** (To find out where is the error)
if(hPDG==90000003 && fabs(curHadr->Get4Momentum().m()-mNeut-mNeut)<.1)
{
if(hPDG==90000003 && fabs(curHadr->Get4Momentum().m()-mNeut-mNeut)<.1) {
hPDG=90000002;
hBN=2;
G4cout<<"--Warning--G4QEnv::FSI:3->2 neutrons conversion (***Check it***)"<<G4endl;
@@ -6661,7 +6663,7 @@ G4QHadronVector* G4QEnvironment::FSInteraction()
theQHadrons.push_back(secHadr); // (del.eq.- user is responsible for del)
//theFragments->push_back(secHadr);// (del.equiv. - user is responsible for that)
}
}
}
else if(hST<0 && hBN>0) // AntistrangeNucleus (@@ see above, already done)
{
G4LorentzVector r4M=curHadr->Get4Momentum(); // Real 4-mom of theAntiStrangeNucleus
@@ -6983,8 +6985,10 @@ G4QHadronVector* G4QEnvironment::FSInteraction()
G4int brn=curHadr->GetBaryonNumber();
bfContSum+=brn;
G4int str=curHadr->GetStrangeness();
if(brn>1&&(!str&&(chg==brn||!chg) || !chg&&str==brn)) // Check for multibaryon(split)
{
if ( brn > 1 &&
( (!str && (chg == brn || !chg)) ||
(!chg && str == brn) ) ) // Check for multibaryon(split)
{
G4int bPDG=90000001; // Prototype: multineutron
if (chg==brn) bPDG=90001000; // Multyproton
else if(str==brn) bPDG=91000000; // Multilambda
@@ -7707,8 +7711,10 @@ G4bool G4QEnvironment::CheckGroundState(G4Quasmon* quasm, G4bool corFlag)
G4LorentzVector reTLV=quasm->Get4Momentum(); // Prototyoe 4-Mom of the Residual Nucleus
G4double reTM=reTLV.m(); // Real mass of the Quasmon
G4int envPDG=theEnvironment.GetPDG();
if(resB>1 && (!resS && (resC==resB && reTM>resC*mProt || !resC && reTM>resB*mNeut)
|| resS==resB && reTM>resS*mLamb) ) // Immediate Split(@@Decay) MultiBaryon
if ( resB > 1 &&
( (!resS && ((resC == resB && reTM > resC*mProt) || (!resC && reTM > resB*mNeut) ) ) ||
(resS == resB && reTM > resS*mLamb) ) ) // Immediate Split(@@Decay) MultiBaryon
{
#ifdef chdebug
G4cout<<"G4QE::CGS:*MultyBar*E="<<envPDG<<",B="<<resB<<",C="<<resC<<",S"<<resS<<G4endl;
@@ -7798,7 +7804,7 @@ G4bool G4QEnvironment::CheckGroundState(G4Quasmon* quasm, G4bool corFlag)
<<" || rEM="<<resEMa<<"=0 & "<<!bsCond<<"=1) & n="<<nOfOUT<<">0 & F="<<corFlag
<<" then the correction must be done for PDG="<<reTPDG<<G4endl;
#endif
if((resTMa<resSMa || !resEMa&&!bsCond) && nOfOUT>0 && corFlag) // *** CORRECTION ***
if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag) // *** CORRECTION ***
{
G4QHadron* theLast = theQHadrons[nOfOUT-1];
G4int cNf=theLast->GetNFragments();
@@ -7988,8 +7994,9 @@ G4bool G4QEnvironment::CheckGroundState(G4Quasmon* quasm, G4bool corFlag)
<<",+#"<<npip<<",-#"<<npim<<",0#"<<npiz<<",E="<<envPDG<<G4endl;
#endif
//if(npip>=0&&resQPDG==89998004 || npim>=0&&resQPDG==90003998)// D+D+pi->N+N+pi
if(envPDG==90000000&&!resS&&resB>1&&(npip>=0&&resC==-2||npim>=0&&resC-resB==2))
{
if (envPDG == 90000000 && !resS && resB > 1 &&
((npip >= 0 && resC == -2) || (npim >= 0 && resC-resB == 2)) )
{
G4int npi=npip; // (Delta-)+(Delta-)+k*n+(pi+)->(k+2)*n+(pi-)
G4int piPD=-211;
G4int nuPD=2112;
@@ -8206,8 +8213,8 @@ G4bool G4QEnvironment::CheckGroundState(G4Quasmon* quasm, G4bool corFlag)
else G4cout<<"***G4QE::CGS:DecIn3 CurH+ResQ+Pion dM="<<ttM-chM<<G4endl;
#endif
}
if(reTCH<0&&chCH>0 || reTCH>reTBN&&chCH<chBN) // Isoexchange can help
{
if ( (reTCH < 0 && chCH > 0) || (reTCH > reTBN && chCH < chBN) ) // Isoexchange can help
{
G4QContent chQC=curHadr->GetQC(); // QuarkCont of the CurrentHadron
if(reTCH<0)chQC+=pimQC; // Add the negativPion QC to CurHadr
else chQC+=pipQC; // Add the positivePion QC to CurHadr
@@ -8306,7 +8313,7 @@ G4bool G4QEnvironment::CheckGroundState(G4Quasmon* quasm, G4bool corFlag)
G4int tcS=tcQC.GetStrangeness(); // Total Strangeness
G4int tcC=tcQC.GetCharge(); // Total Charge
G4int tcBN=tcQC.GetBaryonNumber(); // Total Baryon Number
if(tcBN==2|| !tcS&&!tcC||tcS==tcBN||tcC==tcBN)//dec DiBar or MulBar
if ( tcBN == 2 || (!tcS && !tcC) || tcS == tcBN || tcC == tcBN ) //dec DiBar or MulBar
{
if(tcBN==2) theEnvironment.DecayDibaryon(tcH,&theQHadrons); // DB
else theEnvironment.DecayMultyBaryon(tcH,&theQHadrons); // MB
@@ -25,7 +25,7 @@
//
//
// $Id: G4QException.cc,v 1.9 2006/06/29 20:06:59 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// GEANT 4 class header file
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QHadron.cc,v 1.51 2007/11/15 09:33:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QHadron.cc,v 1.53 2008/03/20 20:11:38 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QHadron ----------------
// by Mikhail Kossov, Sept 1999.
@@ -205,10 +205,14 @@ const G4QHadron& G4QHadron::operator=(const G4QHadron &right)
G4QHadron::~G4QHadron()
{
std::deque<G4QParton*>::iterator pos;
for(pos=Color.begin(); pos<Color.end(); pos++) {delete [] *pos;}
std::list<G4QParton*>::iterator ipos = Color.begin();
std::list<G4QParton*>::iterator epos = Color.end();
for( ; ipos != epos; ipos++) {delete [] *ipos;}
Color.clear();
for(pos=AntiColor.begin(); pos<AntiColor.end(); pos++) {delete [] *pos;}
ipos = AntiColor.begin();
epos = AntiColor.end();
for( ; ipos != epos; ipos++) {delete [] *ipos;}
AntiColor.clear();
}
@@ -1074,7 +1078,7 @@ void G4QHadron::SplitUp()
{
if (IsSplit()) return;
Splitting();
if (Color.size()!=0) return;
if (Color.empty()) return;
if (GetSoftCollisionCount() == 0)
{
// Diffractive splitting: take the particle definition and get the partons
@@ -1234,36 +1238,44 @@ void G4QHadron::SplitUp()
if (std::abs(ColorEncoding) <= 1000 && std::abs(AntiColorEncoding) <= 1000) beta1 = 1.; //... in a meson
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
HPWtest = ColorX;
while (ColorX < Xmin || ColorX > 1.|| 1. - ColorX <= Xmin);
while (ColorX < Xmin || ColorX > 1.|| 1. - ColorX <= Xmin) {
; // Possible dead loop? Don't know why this loop is here - DHW
}
Color.back()->SetX(SumX = ColorX);// this is the valenz quark.
for(G4int aPair = 0; aPair < nSeaPair; aPair++)
std::list<G4QParton*>::iterator icolor = Color.begin();
std::list<G4QParton*>::iterator ecolor = Color.end();
std::list<G4QParton*>::iterator ianticolor = AntiColor.begin();
std::list<G4QParton*>::iterator eanticolor = AntiColor.end();
for ( ; icolor != ecolor && ianticolor != eanticolor; ++icolor, ++ianticolor)
{
NumberOfUnsampledSeaQuarks--;
ColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
Color[aPair]->SetX(ColorX);
(*icolor)->SetX(ColorX);
SumX += ColorX;
NumberOfUnsampledSeaQuarks--;
AntiColorX = SampleX(Xmin, NumberOfUnsampledSeaQuarks, 2*nSeaPair, aBeta);
AntiColor[aPair]->SetX(AntiColorX); // the 'sea' partons
(*ianticolor)->SetX(AntiColorX); // the 'sea' partons
SumX += AntiColorX;
if (1. - SumX <= Xmin) break;
}
} while (1. - SumX <= Xmin);
(*(AntiColor.end()-1))->SetX(1. - SumX); // the di-quark takes the rest, then go to momentum
AntiColor.back()->SetX(1.0 - SumX); // the di-quark takes the rest, then go to momentum
// and here is the bug ;-) @@@@@@@@@@@@@
if(getenv("debug_QGSMSplitableHadron") )G4cout << "particle energy at split = "<<Get4Momentum().t()<<G4endl;
G4double lightCone = ((!Direction) ? Get4Momentum().minus() : Get4Momentum().plus());
// lightCone -= 0.5*Get4Momentum().m();
// hpw testing @@@@@ lightCone = 2.*Get4Momentum().t();
if(getenv("debug_QGSMSplitableHadron") )G4cout << "Light cone = "<<lightCone<<G4endl;
for(aSeaPair = 0; aSeaPair < nSeaPair+1; aSeaPair++)
std::list<G4QParton*>::iterator icolor = Color.begin();
std::list<G4QParton*>::iterator ecolor = Color.end();
std::list<G4QParton*>::iterator ianticolor = AntiColor.begin();
std::list<G4QParton*>::iterator eanticolor = AntiColor.end();
for ( ; icolor != ecolor && ianticolor != eanticolor; ++icolor, ++ianticolor)
{
G4QParton* aParton = Color[aSeaPair];
aParton->DefineMomentumInZ(lightCone, Direction);
aParton = AntiColor[aSeaPair];
aParton->DefineMomentumInZ(lightCone, Direction);
}
(*icolor)->DefineMomentumInZ(lightCone, Direction);
(*ianticolor)->DefineMomentumInZ(lightCone, Direction);
}
//G4cout <<G4endl<<"XSAMPLE "<<HPWtest<<G4endl;
return;
}
@@ -1572,7 +1584,9 @@ G4bool G4QHadron::SplitBaryon(G4int PDGcode, G4int* quark, G4int* diQuark)
G4ThreeVector G4QHadron::GaussianPt(G4double widthSquare, G4double maxPtSquare)
{
G4double R=0.;
while((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare);
while ((R = -widthSquare*std::log(G4UniformRand())) > maxPtSquare) {
;
}
R = std::sqrt(R);
G4double phi = twopi*G4UniformRand();
return G4ThreeVector(R*std::cos(phi), R*std::sin(phi), 0.);
@@ -25,7 +25,7 @@
//
//
// $Id: G4QHadronBuilder.cc,v 1.2 2006/12/12 11:02:22 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// -----------------------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------------
// GEANT 4 class implementation file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QIsotope.cc,v 1.10 2007/11/28 14:14:36 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QIsotope class ----------------
// by Mikhail Kossov, December 2003.
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QNucleus.cc,v 1.91 2007/11/28 13:42:13 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QNucleus.cc,v 1.95 2008/03/31 20:30:17 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QNucleus ----------------
// by Mikhail Kossov, Sept 1999.
@@ -55,10 +55,12 @@ G4double G4QNucleus::mediRatio=1.; // relative vacuum hadronization probabi
G4double G4QNucleus::nucleonDistance=.8*fermi; // Distance between nucleons (0.8 fm)
G4QNucleus::G4QNucleus(): G4QHadron(),Z(0),N(0),S(0),dZ(0),dN(0),dS(0),maxClust(0),
probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
currentNucleon(-1),rho0(0),radius(0)
// probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
probVect[0]=mediRatio;
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
#ifdef pardeb
G4cout<<"G4QNucleus::Constructor:(1) N="<<freeNuc<<", D="<<freeDib<<", W="<<clustProb
<<", R="<<mediRatio<<G4endl;
@@ -66,13 +68,13 @@ G4QNucleus::G4QNucleus(): G4QHadron(),Z(0),N(0),S(0),dZ(0),dN(0),dS(0),maxClust(
}
G4QNucleus::G4QNucleus(G4int z, G4int n, G4int s) : G4QHadron(90000000+s*1000000+z*1000+n),
Z(z),N(n),S(s),dZ(0),dN(0),dS(0),maxClust(0),probVect(),theImpactParameter(),
theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
Z(z),N(n),S(s),dZ(0),dN(0),dS(0),maxClust(0),
currentNucleon(-1),rho0(0),radius(0)
//probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
probVect[0]=mediRatio;
//for(G4int i=1; i<256; i++) probVect[i] = 0.;
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
#ifdef debug
G4cout<<"G4QNucleus::Construction By Z="<<z<<",N="<<n<<",S="<<s<<G4endl;
#endif
@@ -98,8 +100,9 @@ G4QNucleus::G4QNucleus(G4int z, G4int n, G4int s) : G4QHadron(90000000+s*1000000
#endif
}
G4QNucleus::G4QNucleus(G4int nucPDG): G4QHadron(nucPDG),maxClust(0),probVect(),
theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
G4QNucleus::G4QNucleus(G4int nucPDG): G4QHadron(nucPDG),maxClust(0),
currentNucleon(-1),rho0(0),radius(0)
//probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
InitByPDG(nucPDG);
@@ -110,7 +113,8 @@ G4QNucleus::G4QNucleus(G4int nucPDG): G4QHadron(nucPDG),maxClust(0),probVect(),
}
G4QNucleus::G4QNucleus(G4LorentzVector p, G4int nucPDG): G4QHadron(nucPDG,p),maxClust(0),
probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
currentNucleon(-1),rho0(0),radius(0)
// probVect(),theImpactParameter(),theNucleons(), currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
InitByPDG(nucPDG);
@@ -123,12 +127,12 @@ G4QNucleus::G4QNucleus(G4LorentzVector p, G4int nucPDG): G4QHadron(nucPDG,p),max
G4QNucleus::G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p) :
G4QHadron(90000000+s*1000000+z*1000+n,p),Z(z),N(n),S(s),dZ(0),dN(0),dS(0),maxClust(0),
probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),rho0(),radius(),Tb()
currentNucleon(-1),rho0(0),radius(0)
// probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
probVect[0]=mediRatio;
//for(G4int i=1; i<256; i++) probVect[i] = 0.;
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
Set4Momentum(p);
SetNFragments(0);
G4int ZNS=Z+N+S;
@@ -143,8 +147,8 @@ G4QNucleus::G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p) :
}
G4QNucleus::G4QNucleus(G4QContent nucQC): G4QHadron(nucQC),dZ(0),dN(0),dS(0),maxClust(0),
probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),rho0(),radius(),Tb()
currentNucleon(-1),rho0(0),radius(0)
// probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),rho0(),radius(),Tb()
{
static const G4double mPi0 = G4QPDGCode(111).GetMass();
//Tb = new std::vector<G4double>;
@@ -152,7 +156,7 @@ G4QNucleus::G4QNucleus(G4QContent nucQC): G4QHadron(nucQC),dZ(0),dN(0),dS(0),max
G4cout<<"G4QNucleus::Construction By QC="<<nucQC<<G4endl;
#endif
probVect[0]=mediRatio;
//for(G4int i=1; i<256; i++) probVect[i] = 0.;
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
G4int u=nucQC.GetU()-nucQC.GetAU();
G4int d=nucQC.GetD()-nucQC.GetAD();
S = nucQC.GetS()-nucQC.GetAS(); // a#of LAMBDA's in the nucleus
@@ -192,15 +196,16 @@ G4QNucleus::G4QNucleus(G4QContent nucQC): G4QHadron(nucQC),dZ(0),dN(0),dS(0),max
}
G4QNucleus::G4QNucleus(G4QContent nucQC, G4LorentzVector p):G4QHadron(nucQC,p),dZ(0),dN(0),
dS(0),maxClust(0),probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),
rho0(),radius(),Tb()
dS(0),maxClust(0),
currentNucleon(-1),rho0(0),radius(0)
//probVect(),theImpactParameter(),theNucleons(),currentNucleon(-1),rho0(),radius(),Tb()
{
//Tb = new std::vector<G4double>;
#ifdef debug
G4cout<<"G4QNucleus::(LV)Construction By QC="<<nucQC<<G4endl;
#endif
probVect[0]=mediRatio;
//for(G4int i=1; i<256; i++) probVect[i] = 0.;
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
Set4Momentum(p);
G4int u=nucQC.GetU()-nucQC.GetAU();
G4int d=nucQC.GetD()-nucQC.GetAD();
@@ -346,6 +351,7 @@ void G4QNucleus::InitByPDG(G4int nucPDG)
dN=0;
dS=0;
probVect[0]=mediRatio; // init Vacuum/Medium probability
for(G4int i=1; i<256; i++) {probVect[i] = 0.;}
if(nucPDG<80000000) nucPDG=HadrToNucPDG(nucPDG); // Convert HadrPDGCode to NucPDGCode
G4int s=0;
G4int z=0;
@@ -1459,8 +1465,10 @@ G4bool G4QNucleus::EvaporateBaryon(G4QHadron* h1, G4QHadron* h2)
//G4int cntm= 72; // Important difference !!DOn't change
//G4int cntm= 80; // Important difference !!DOn'tChange"IsoNuclei"
G4int cntm= 90; // Important difference !!DOn'tChange "Lept/Hyper"
if( (pFlag&&pExcess>pMin || nFlag&&nExcess>nMin || lFlag&&lExcess>lMin ||
aFlag&&aExcess>aMin) && minE<maxE)
if( ( (pFlag && pExcess > pMin) ||
(nFlag && nExcess > nMin) ||
(lFlag && lExcess > lMin) ||
(aFlag && aExcess > aMin) ) && minE<maxE )
{
G4double mi=uWell+minE; // Minimum Kinetic Energy for minimal nucleon
G4double mm=uWell+maxE; // Personal maximum for Kinetic Energy
@@ -1687,30 +1695,30 @@ G4bool G4QNucleus::EvaporateBaryon(G4QHadron* h1, G4QHadron* h2)
rMass=sqrt(rEn*rEn-p2); // Mass of Residual Nucleus
// Find out if the ResidualNucleus is below of the SecondBaryonDecayLimit
//@@ Calculate it depending on PDG !!!!!!!
G4bool nnCond=!nnFlag||nnFlag&&GSResNN+mNeut>rMass;
G4bool npCond=!npFlag||npFlag&&GSResNP+mProt+PBarr>rMass;
G4bool nlCond=!nlFlag||nlFlag&&GSResNL+mLamb>rMass;
G4bool naCond=!naFlag||naFlag&&GSResNA+mAlph+ABarr>rMass;
G4bool pnCond=!npFlag||npFlag&&GSResNP+mNeut>rMass;
if(barf) pnCond=!npFlag||npFlag&&GSResNP+mNeut+PBarr>rMass;
G4bool ppCond=!ppFlag||ppFlag&&GSResPP+mProt+PPBarr>rMass;
if(barf) ppCond=!ppFlag||ppFlag&&GSResPP+mProt+SPPBarr>rMass;
G4bool plCond=!plFlag||plFlag&&GSResPL+mLamb>rMass;
if(barf) plCond=!plFlag||plFlag&&GSResPL+mLamb+PBarr>rMass;
G4bool paCond=!paFlag||paFlag&&GSResPA+mAlph+APBarr>rMass;
if(barf) paCond=!paFlag||paFlag&&GSResPA+mAlph+SAPBarr>rMass;
G4bool lnCond=!nlFlag||nlFlag&&GSResNL+mNeut>rMass;
G4bool lpCond=!plFlag||plFlag&&GSResPL+mProt+PBarr>rMass;
G4bool llCond=!llFlag||llFlag&&GSResLL+mLamb>rMass;
G4bool laCond=!laFlag||laFlag&&GSResLA+mAlph+ABarr>rMass;
G4bool anCond=!naFlag||naFlag&&GSResNA+mNeut>rMass;
if(barf) anCond=!naFlag||naFlag&&GSResNA+mNeut+ABarr>rMass;
G4bool apCond=!paFlag||paFlag&&GSResPA+mProt+PABarr>rMass;
if(barf) apCond=!paFlag||paFlag&&GSResPA+mProt+SAPBarr>rMass;
G4bool alCond=!laFlag||laFlag&&GSResLA+mLamb>rMass;
if(barf) alCond=!laFlag||laFlag&&GSResLA+mLamb+ABarr>rMass;
G4bool aaCond=!aaFlag||aaFlag&&GSResAA+mAlph+AABarr>rMass;
if(barf) aaCond=!aaFlag||aaFlag&&GSResAA+mAlph+SAABarr>rMass;
G4bool nnCond = !nnFlag || (nnFlag && GSResNN+mNeut > rMass);
G4bool npCond = !npFlag || (npFlag && GSResNP+mProt+PBarr > rMass);
G4bool nlCond = !nlFlag || (nlFlag && GSResNL+mLamb > rMass);
G4bool naCond = !naFlag || (naFlag && GSResNA+mAlph+ABarr > rMass);
G4bool pnCond = !npFlag || (npFlag && GSResNP+mNeut > rMass);
if(barf) pnCond = !npFlag || (npFlag && GSResNP+mNeut+PBarr > rMass);
G4bool ppCond = !ppFlag || (ppFlag && GSResPP+mProt+PPBarr > rMass);
if(barf) ppCond = !ppFlag || (ppFlag && GSResPP+mProt+SPPBarr > rMass);
G4bool plCond = !plFlag || (plFlag && GSResPL+mLamb > rMass);
if(barf) plCond = !plFlag || (plFlag && GSResPL+mLamb+PBarr > rMass);
G4bool paCond = !paFlag || (paFlag && GSResPA+mAlph+APBarr > rMass);
if(barf) paCond = !paFlag || (paFlag && GSResPA+mAlph+SAPBarr > rMass);
G4bool lnCond = !nlFlag || (nlFlag && GSResNL+mNeut > rMass);
G4bool lpCond = !plFlag || (plFlag && GSResPL+mProt+PBarr > rMass);
G4bool llCond = !llFlag || (llFlag && GSResLL+mLamb > rMass);
G4bool laCond = !laFlag || (laFlag && GSResLA+mAlph+ABarr > rMass);
G4bool anCond = !naFlag || (naFlag && GSResNA+mNeut > rMass);
if(barf) anCond = !naFlag || (naFlag && GSResNA+mNeut+ABarr > rMass);
G4bool apCond = !paFlag || (paFlag && GSResPA+mProt+PABarr > rMass);
if(barf) apCond = !paFlag || (paFlag && GSResPA+mProt+SAPBarr > rMass);
G4bool alCond = !laFlag || (laFlag && GSResLA+mLamb > rMass);
if(barf) alCond = !laFlag || (laFlag && GSResLA+mLamb+ABarr > rMass);
G4bool aaCond = !aaFlag || (aaFlag && GSResAA+mAlph+AABarr > rMass);
if(barf) aaCond = !aaFlag || (aaFlag && GSResAA+mAlph+SAABarr > rMass);
#ifdef pdebug
G4cout<<"G4QNucl::EvaB:"<<PDG<<", E="<<tk<<", rM="<<rMass<<", ";
if(PDG==pPDG) G4cout<<"PN="<<GSResNP+mNeut<<"("<<pnCond<<"),PP="
@@ -3764,8 +3772,8 @@ void G4QNucleus::EvaporateNucleus(G4QHadron* qH, G4QHadronVector* evaHV)
/// @@@@@@@ *** TEMPORARY TO AVOID HYPERMUCLEI FOR GEANT4 *** @@@@@@@
if(thePDG>91000000) //@@MadeForGeant4@@: If there is a Lambda, substitute it by A neutron
{
G4int S=(thePDG-90000000)/1000000;
thePDG-=S*999999; // S Neutrons instead of S Lambdas
G4int SSS=(thePDG-90000000)/1000000;
thePDG-=SSS*999999; // S Neutrons instead of S Lambdas
qH->SetQPDG(G4QPDGCode(thePDG));
}
/// @@@ *** ^^^ END OF TEMPORARY ^^^ *** @@@
@@ -4250,7 +4258,8 @@ void G4QNucleus::EvaporateNucleus(G4QHadron* qH, G4QHadronVector* evaHV)
evaHV->push_back(nH); // (delete equivalent)
}
// **>>> From here the EVA code starts (baryons/hyperons can be excited) <<<**
else if(thePDG>80000000&&thePDG!=90000000 || thePDG==2112 || thePDG==2212 ||thePDG==3122)
else if ( (thePDG > 80000000 && thePDG != 90000000) ||
thePDG == 2112 || thePDG == 2212 || thePDG == 3122)
{ // @@ Improve for Sigma+, Sigma-, Ksi0 & Ksi- content in the Total Np/Nn Nuclei
if(thePDG<80000000) // Switch from QHadronCode to QNuclearCode
{
@@ -4290,9 +4299,9 @@ void G4QNucleus::EvaporateNucleus(G4QHadron* qH, G4QHadronVector* evaHV)
#endif
return;
}
else if((bA==1||!bsCond&&!dbsCond)&&totMass>GSMass+.003)//==>Fuse&DecayTech(noGamDec)
else if ( ( bA == 1 || (!bsCond && !dbsCond) ) && totMass > GSMass+.003 ) //==>Fuse&DecayTech(noGamDec)
//else if(2>3) // Close "Fuse&Decay Technology" ***@@@***
{
{
#ifdef pdebug
G4cout<<"G4QN::EvaN:SplitBar, s="<<bsCond<<",M="<<totMass<<" > GSM="<<GSMass<<G4endl;
#endif
@@ -4627,18 +4636,26 @@ void G4QNucleus::EvaporateNucleus(G4QHadron* qH, G4QHadronVector* evaHV)
<<bN<<",Z="<<bZ<<",nL="<<bS<<",totM="<<totMass<<",n="<<totMass-nResM-mNeut
<<",p="<<totMass-pResM-mProt<<",l="<<totMass-lResM-mLamb<<G4endl;
#endif
if( thePDG==90004004 || thePDG==90002004 && totMass>mHel6+.003
|| bA>4 && bsCond && bN>1 && bZ>1 && totMass>aResM+mAlph
|| bA>1 && bsCond && ( bN>0&&totMass>nResM+mNeut
|| bZ>0&&totMass>pResM+mProt
|| bS>0&&totMass>lResM+mLamb)
||bA>2&&(bN>0&&bZ>0&&(bsCond&&totMass>dResM+mDeut||dbsCond && totMass>dResM+mDeut)
||dbsCond && ( bN>1&&totMass>nnResM+mNeut+mNeut
|| bZ>1&&totMass>ppResM+mProt+mProt
|| bS>1&&totMass>llResM+mLamb+mLamb
|| bN&&bS&&totMass>lnResM+mLamb+mNeut
|| bZ&&bS&&totMass>lpResM+mLamb+mProt)))
{
if ( thePDG == 90004004 ||
(thePDG == 90002004 && totMass > mHel6+.003) ||
(bA > 4 && bsCond && bN > 1 && bZ > 1 && totMass > aResM+mAlph) ||
(bA > 1 && bsCond && ( (bN > 0 && totMass > nResM+mNeut) ||
(bZ > 0 && totMass > pResM+mProt) ||
(bS > 0 && totMass > lResM+mLamb) ) ) ||
(bA > 2 &&
( ( bN > 0 && bZ > 0 &&
((bsCond && totMass > dResM+mDeut) || (dbsCond && totMass > dResM+mDeut) ) ) ||
( dbsCond && ( (bN > 1 && totMass > nnResM+mNeut+mNeut) ||
(bZ > 1 && totMass > ppResM+mProt+mProt) ||
(bS > 1 && totMass > llResM+mLamb+mLamb) ||
(bN && bS && totMass > lnResM+mLamb+mNeut) ||
(bZ && bS && totMass > lpResM+mLamb+mProt) ) ) ) ) )
{
G4int barPDG = 90002002; // Just for the default case of Be8->alpha+alpha
G4int resPDG = 90002002;
G4int thdPDG = 0;
@@ -6445,7 +6462,9 @@ void G4QNucleus::DecayAlphaBar(G4QHadron* qH, G4QHadronVector* evaHV)
G4int totS=qQC.GetStrangeness(); // Total Strangeness (L)
G4int totC=qQC.GetCharge(); // Total Charge (p)
G4int totBN=qQC.GetBaryonNumber(); // Total Baryon Number (A)
if((!totS&&!totC||totC==totBN||totS==totBN)&&totBN>1) DecayMultyBaryon(qH,evaHV);
if ( ( (!totS && !totC) || totC == totBN || totS == totBN)
&& totBN > 1) DecayMultyBaryon(qH,evaHV);
else if(qPDG==92001002||qPDG==92002001||qPDG==91003001||qPDG==91001003||qPDG==93001001)
evaHV->push_back(qH);
else if(qPDG==92000003||qPDG==92003000||qPDG==93000002||qPDG==93002000)
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QPDGCode.cc,v 1.55 2007/10/07 13:31:42 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QPDGCode.cc,v 1.56 2008/03/20 20:11:38 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QPDGCode ----------------
// by Mikhail Kossov, Sept 1999.
@@ -635,8 +635,7 @@ G4double G4QPDGCode::GetMass()
#ifdef debug
G4cout<<"G4QPDGCode::GetMass: Mass for Q="<<ab<<",PDG="<<thePDGCode<<",N="<<nQHM<<G4endl;
#endif
if(ab<0&&thePDGCode<80000000||!thePDGCode)
{
if ( (ab < 0 && thePDGCode < 80000000) || !thePDGCode) {
#ifdef debug
if(thePDGCode!=10)
G4cout<<"**G4QPDGCode::GetMass:m=100000.,QC="<<theQCode<<",PDG="<<thePDGCode<<G4endl;
@@ -1636,8 +1635,10 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
{
if (!S&&Z<0) return mPi*N;
else if(!S&&N<0) return mPi*Z;
else if(N==1&&S==-1||N==-1&&S==1) return mK0; // Simple decision
else if(S==1&&Z==-1||S==-1&&Z==1) return mK; // Simple decision
else if ( (N == 1 && S == -1) || (N == -1 && S == 1) )
return mK0; // Simple decision
else if ( (S == 1 && Z == -1) || (S == -1 && Z == 1) )
return mK; // Simple decision
else if(S>0) // General decision
{
if (-Z>S) return S*mK-(S+Z)*mPi+eps;
@@ -1899,8 +1900,8 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
if (!A) return k+S*mL+S*eps; // @@ multy LAMBDA states are not implemented
G4double m=k+A*um; // Expected mass in atomic units
//G4double D=N-Z; // Isotopic shift of the nucleus
if(A+S<1&&k==0.||Z<0||N<0) // @@ Can be generalized to anti-nuclei
{
if ( (A+S < 1 && k==0.) || Z < 0 || N < 0 )
{ // @@ Can be generalized to anti-nuclei
#ifdef debug
G4cout<<"**G4QPDGCode::CalcNuclMass:A="<<A<<"<1 || Z="<<Z<<"<0 || N="<<N<<"<0"<<G4endl;
//@@throw G4QException("***G4QPDGCode::GetNuclMass: Impossible nucleus");
@@ -1945,8 +1946,8 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
if(!Am) return km+eps;
mm=km+Am*um; // Expected mass in atomic units
//G4double Dm=Nm-Zm; // Isotopic shift of the nucleus
if(Am<1&&km==0.||Zm<0||Nm<0) // @@ Can be generalized to anti-nuclei
{
if ( (Am < 1 && km==0.) || Zm < 0 || Nm < 0 )
{ // @@ Can be generalized to anti-nuclei
#ifdef debug
G4cerr<<"**G4QPDGCode::CalcNucM:A="<<Am<<"<1 || Z="<<Zm<<"<0 || N="<<Nm<<"<0"<<G4endl;
#endif
@@ -2212,7 +2213,7 @@ G4int G4QPDGCode::GetRelCrossIndex(G4int i, G4int o) const
if(theQCode<fragmStart) return 7;
G4int sub=theQCode-fragmStart;
if(sub>1&&sub<8||sub==15) return 7; //@@Why they are in clusters?-Residuals(?)
if ( (sub > 1 && sub < 8) || sub == 15) return 7; //@@Why they are in clusters?-Residuals(?)
G4int rel=sub; // case of nuclear baryons and isonuclei
if (sub>31)rel =(sub-32)%15; // case of heavy fragments (BaryNum>3)
else if(sub>15)rel = sub-16; // case of nuclear di-baryon & tri-baryons
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4QPDGToG4Particle.cc,v 1.5 2006/06/29 20:07:09 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// 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-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QSplitter ----------------
// by Mikhail Kossov, August 2005.
@@ -25,7 +25,7 @@
//
//
// $Id: G4QString.cc,v 1.4 2007/07/06 07:38:36 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ------------------------------------------------------------
// GEANT 4 class implementation file
@@ -27,8 +27,8 @@
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
//
//
// $Id: G4Quasmon.cc,v 1.104 2007/11/29 18:59:57 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4Quasmon.cc,v 1.107 2008/03/31 20:30:35 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4Quasmon ----------------
// by Mikhail Kossov, July 1999.
@@ -1376,23 +1376,20 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
if(rqPDG==111&&sPDG!=111&&G4UniformRand()>.5) rqPDG=221;
//if(rqPDG==221&&sPDG!=221&&sPDG!=331&&G4UniformRand()<.5) rqPDG=111;
G4int rQQ=G4QPDGCode(curQ).GetQCode();
if(rqPDG==10)
{
if(rqPDG==10) {
minSqT=G4QChipolino(curQ).GetMass2();// MinSqMass of DoubleHadron of Chipolino
minSqB=minSqT;
minT=sqrt(minSqT);
}
else if(!rqPDG||rQQ<-1)
{
} else if(!rqPDG||rQQ<-1) {
#ifdef debug
G4cerr<<"*G4Q::HQ:*** ResidualQuasmon *** PDG="<<rqPDG<<curQ<<",Q="<<rQQ<<G4endl;
#endif
minT=100000.; // Mass of free Quasmon
minSqT=10000000000.; // SqMass of free Quasmon
minSqB=10000000000.; // SqMass of bound Quasmon
}
else
{
} else {
//////////G4int baryn=curQ.GetBaryonNumber();
minT=G4QPDGCode(rqPDG).GetMass();
if(sPDG<MINPDG&&envPDG>MINPDG&&envPDG!=NUCPDG)// Hadron with environment(not QEX)
@@ -1407,68 +1404,72 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
#endif
minT=qpeM-envM;
}
minSqT=minT*minT; // Squared minimum mass of residual quasmon
minSqT=minT*minT; // Squared minimum mass of residual quasmon
#ifdef debug
G4cout<<"G4Q::HQ:rPDG="<<rqPDG<<curQ<<",minT="<<minT<<",minSqT="<<minSqT
<<",hsfl="<<hsflag<<G4endl;
#endif
G4double newT=0.; // Prototype of minimal TotBoundQuasmon mass
// (Hadron with environment (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda)
if((sPDG<MINPDG&&envPDG>MINPDG&&envPDG!=NUCPDG||sPDG>MINPDG&&sPDG!=NUCPDG&&envPDG
>pPDG) && (rqPDG>MINPDG&&rqPDG!=NUCPDG||rqPDG==2112||rqPDG==2212||rqPDG==3122))
G4double newT=0.; // Prototype of minimal TotBoundQuasmon mass
// (Hadron with environment
// (see above?) || QEX) && (Q==nucFrag || Q==n,p,Lambda)
if ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) ||
(sPDG > MINPDG && sPDG != NUCPDG && envPDG > pPDG) )
&&
( (rqPDG > MINPDG && rqPDG != NUCPDG) ||
rqPDG==2112 ||
rqPDG==2212 ||
rqPDG==3122) )
{
if(sPDG<MINPDG) // The radiatedBaryon is aVaquum(QF) particle
{
if(sPDG<MINPDG) { // The radiatedBaryon is aVaquum(QF) particle
// *** LIM ***
G4QContent rtQC=curQ; // Total Residual Quasmon Quark Content
if(envA>bEn) // Nucl Env > than A_max
{
reM=mbEn;
G4QContent rtQC=curQ; // Total Residual Quasmon Quark Content
if (envA > bEn) { // Nucl Env > than A_max
reM=mbEn;
rtQC+=bEnQC;
}
else
{
reM=envM; // MinMassOfResidEnviron = MassOfEnviron
rtQC+=envQC; // Nucl Env is below A_max=bEn
}
G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for E+Q
rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (+hadron)
newT=rtM-reM; // The effective mass
} else {
reM=envM; // MinMassOfResidEnviron = MassOfEnviron
rtQC+=envQC; // Nucl Env is below A_max=bEn
}
G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for E+Q
rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (+hadron)
newT=rtM-reM; // The effective mass
#ifdef debug
G4cout<<"G4Q::HQ:***VacuumFragmentation** M="<<newT<<",rM="<<rtM<<rtQC
<<",eM="<<envM<<",mM="<<minT<<G4endl;
#endif
}
else // The RadiatedHadron is aQuarkExchange frag.
{
} else { // The RadiatedHadron is aQuarkExchange frag.
G4QContent reQC=envQC-pQC; // Total Residual Quark Content
if(envA-pBaryn>bEn) reQC=bEnQC; // Nucl Env - fragment > than A_max
G4QNucleus reN(reQC); // Create a pseudoNucleus for ResidualNucleus
reM=reN.GetMZNS(); // Min Mass of the residual EnvironmentNucleus
G4QNucleus reN(reQC); // Create a pseudoNucleus for ResidualNucleus
reM=reN.GetMZNS(); // Min Mass of the residual EnvironmentNucleus
// *** LIM ***
G4QContent rtQC=curQ; // Total Quasmon Quark Content
G4QContent rtQC=curQ; // Total Quasmon Quark Content
#ifdef debug
G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn
G4cout<<"G4Q::HQ:reQC="<<reQC<<",rtQC="<<rtQC<<",eA="<<envA<<",pB="<<pBaryn
<<",bE="<<bEn<<bEnQC<<G4endl;
#endif
rtQC+=reQC; // Quasmon + (effective) nuclear environment
G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for residual ENE
rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (fragment)
rtQC+=reQC; // Quasmon + (effective) nuclear environment
G4QNucleus rtN(rtQC); // Create a pseudo-nucleus for residual ENE
rtM=rtN.GetMZNS(); // MinMass of TotalResidualNucleus (fragment)
// *** LIM ***
if(envA-pBaryn>bEn) newT=rtM-mbEn;
else
newT=rtM-reM;
if (envA-pBaryn > bEn) {
newT=rtM-mbEn;
} else {
newT=rtM-reM;
}
#ifdef debug
G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p="
G4cout<<"G4Q::HQ:NuclFrM="<<newT<<",r="<<rtM<<rtQC<<",e="<<envM<<envQC<<",p="
<<pMass<<pQC<<",re="<<reM<<reQC<<",exEn="<<totMass-rtM-sMass<<G4endl;
#endif
}
}
if(minT<newT) newT=minT;
}
minSqB=newT*newT; // MinSquaredMass of BoundedResidualQuasmon
}
minSqB=newT*newT; // MinSquaredMass of BoundedResidualQuasmon
}
#ifdef debug
G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl;
G4cout<<"G4Q::HQ:rq="<<rqPDG<<",miT="<<minSqT<<",miB="<<minSqB<<",M="<<rtM<<G4endl;
#endif
if(!minSqT)
{
@@ -1477,51 +1478,44 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
}
G4double m2 = BIG2; //@@ justBigNumber// Prototype/Squared Mass of Residual Quasmon
G4double kp=0.; // 3-Mpm/Mass for the residual Quasmon
if(sPDG>MINPDG && sPDG!=NUCPDG) // ==> NuclearFragmentCandidate hadronization
{
if (sPDG > MINPDG && sPDG != NUCPDG) { // ==> NuclearFragmentCandidate hadronization
#ifdef debug
G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl;
G4cout<<"G4Q::HQ: BoundM="<<pMass<<",FreeM="<<sMass<<",QM="<<quasM<<G4endl;
#endif
// = = = = P u r e k i n e m a t i c a l c a l c u l a t i o n s: = = = = =
// Fusion of k + parentCluster => colouredCluster (cc)
G4LorentzVector cl4Mom(0.,0.,0.,pMass);// 4-momentum prototype for parent cluster
G4LorentzVector tot4Mom=q4Mom+cl4Mom; // @@ Just for checking
#ifdef debug
G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl;
G4cout<<"G4Q::HQ:Q("<<quasM<<")->k("<<k4Mom<<")+CRQ("<<cr4Mom.m()<<")"<<G4endl;
#endif
G4LorentzVector cc4Mom=k4Mom+cl4Mom;// 4-mom of ColoredFragment (before kappa)
G4double ccM2=cc4Mom.m2(); // SquaredMass of the ColoredFragment
G4double frM2=sMass*sMass; // MinSuaredMass of the OutgoingFragment
if(ccM2<=frM2) // Decaying ColoredFragmM < FragmM
{
if (ccM2 <= frM2) { // Decaying ColoredFragmM < FragmM
#ifdef debug
G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k="
G4cout<<"***G4Q::HQ:FailedToFind FragmM:"<<ccM2<<"<"<<frM2<<",M="<<pMass<<"+k="
<<k4Mom<<"="<<sqrt(ccM2)<<cc4Mom<<" < fM="<<sMass<<",miK="<<minK<<G4endl;
#endif
dMass=pMass-pNMass; // Remember the difference
dMass=pMass-pNMass; // Remember the difference
pMass=pNMass;
delta=deltaN;
cl4Mom=G4LorentzVector(0.,0.,0.,pMass); // 4-momentum proto for parent cluster
tot4Mom=q4Mom+cl4Mom; // @@ Just for checking
cc4Mom=k4Mom+cl4Mom; // 4-mom of ColoredFragment (before kappa)
ccM2=cc4Mom.m2();
if(ccM2<=frM2)
{
if (ccM2 <= frM2) {
#ifdef debug
G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl;
G4cout<<"G4Q::HQ:hsflagTRUE*NuclBINDING,ccM2="<<ccM2<<"<frM2="<<frM2<<G4endl;
#endif
hsflag=true; // Flag of decay in Q+S
}
else
{
} else {
#ifdef debug
G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl;
G4cout<<"G4Q::HQ:***NUCLEAR BINDING***ccM2="<<ccM2<<" > frM2="<<frM2<<G4endl;
#endif
nucflag=true; // Nuclear binding was used
}
}
else
{
}
} else {
#ifdef debug
G4double crMass2 = cr4Mom.m2(); // SquredMass of ColouredResidualQuasmon
G4cout<<"G4Q::HQ:cM2="<<crMass2<<"="<<rEP*(rEP-rMo-rMo)<<",h="<<hili<<",l="
@@ -1544,8 +1538,7 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
G4cout<<"G4Q::HQ: must totM="<<totMass<<" > rTM="<<resTNM<<"+sM="<<sMass<<" = "
<<sMass+resTNM<<G4endl;
#endif
if(resTNM && totMass<resTNM+sMass) // Probably it never takes place
{
if(resTNM && totMass<resTNM+sMass) { // Probably it never takes place
#ifdef ppdebug
G4cout<<"***G4Quasmon::HadronizeQuasmon:***PANIC#1***TotalDE="<<excE<<"< bE="
<<sMass-pMass-dM<<", dM="<<dM<<", sM="<<sMass<<", bM="<<pMass<<G4endl;
@@ -1554,15 +1547,16 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
status =-1; // Panic exit
qEnv=theEnvironment; // Update the QEnvironment ???
return theQHadrons;
}
G4double ex=kLS-delta; // EnvironmentExcess of parton energy in LS
}
G4double ex=kLS-delta; // EnvironmentExcess of parton energy in LS
G4double dex=ex+ex;
G4QContent tmpEQ=envQC-pQC; // Quark content for Residual Environment
if(envA-pBaryn>bEn) tmpEQ=bEnQC; // Leave the minimum environment
G4QNucleus tmpN(tmpEQ); // Pseudo nucleus for Residual Environment
G4double tmpNM=tmpN.GetMZNS(); // Mass of Residual Environment
#ifdef debug
G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag
G4cout<<"G4Q::HQ:eQC="<<envQC<<",pQC="<<pQC<<",rEnvM="<<tmpNM<<",hsfl="<<hsflag
<<G4endl;
#endif
G4QContent tmpRQ=valQ+transQC; // QContent of Residual Quasmon
@@ -2035,13 +2029,14 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
// ***VFQ***
//if(kn>minSqN && kt>minSqT)
// ***VQU***
if(kn>minSqN && ku>minSqT)
if (kn > minSqN && ku > minSqT)
// ***VBQ***
//if(kn>minSqN && kt>minSqB)
// ***VTN***
//if(kt>minSqB&&sPDG<MINPDG || sPDG>MINPDG&&kn>minSqN)
{
pCond=false; // Ok, the appropriate parent cluster is found
pCond=false; // Ok, the appropriate parent cluster is found
#ifdef debug
// ***VTN***VBQ***
//G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
@@ -2053,9 +2048,7 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
//G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<" *Yes* sPDG="<<sPDG<<",kt="<<kt<<">"
// <<minSqT<<" || kn="<<kn<<">"<<minSqN<<G4endl;
#endif
}
else
{
} else {
#ifdef debug
// ***VBQ***VTN***
//G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<",No. kt="<<kt<<"<"<<minSqB<<" or kn="<<kn
@@ -2067,127 +2060,127 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
//G4cout<<"G4Q::HQ:P-Attempt#"<<pCount<<",No. kt="<<kt<<"<"<<minSqT<<" or kn="<<kn
// <<"<"<<minSqN<<" or E="<<fr4Mom.e()<<"<"<<sCBE<<G4endl;
#endif
// ***VTN*** (former default)
//if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN)
// ***VBQ***
//if(kn<minSqN && kt>=minSqB)
// ***VFQ***
//if(kn<minSqN && kt>=minSqT)
// ***VQU***
if(kn<minSqN && ku<minSqT)
// ***VTN*** (former default)
//if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || kn<minSqN&&sPDG>MINPDG&& kn>PMEMknM2)
//if(kt>=minSqB || sPDG>MINPDG&&kn>minSqN)
// ***VBQ***
//if(kt<minSqB && kt>PMEMktM2)
//if(kn<minSqN && kt>=minSqB)
// ***VFQ***
//if(kt<minSqT && kt>PMEMktM2)
//if(kn<minSqN && kt>=minSqT)
// ***VQU***
if(ku<minSqT && ku>PMEMktM2)
{
if (kn < minSqN && ku < minSqT) {
// ***VTN*** (former default)
//if(kt<minSqB&&sPDG<MINPDG && kt>PMEMktM2 || kn<minSqN&&sPDG>MINPDG&& kn>PMEMknM2)
// ***VBQ***
//if(kt<minSqB && kt>PMEMktM2)
// ***VFQ***
//if(kt<minSqT && kt>PMEMktM2)
// ***VQU***
PMEMktM2=ku;
// ***VFQ***VBQ***VTN***
//PMEMktM2=kt;
// ---------
PMEMknM2=kn;
PMEMfr4M=fr4Mom;
PMEMrQ4M=rQ4Mom;
PMEMreM2=reTNM2;
PMEMrMas=rMass;
PMEMpMas=pMass;
PMEMsMas=sMass;
PMEMdMas=dMass;
PMEMmiSN=minSqN;
PMEMmiST=minSqT;
PMEMmiSB=minSqB;
PMEMrPDG=rPDG;
PMEMsPDG=sPDG;
PMEMpPDG=pPDG;
PMEMpQC =pQC;
PMEMsQC =sQC;
PMEMtQC =transQC;
PMEMcQC =curQ;
PMEMhsfl=hsflag;
PMEMnucf=nucflag;
if(ku<minSqT && ku>PMEMktM2) {
// ***VQU***
PMEMktM2=ku;
// ***VFQ***VBQ***VTN***
//PMEMktM2=kt;
// ---------
PMEMknM2=kn;
PMEMfr4M=fr4Mom;
PMEMrQ4M=rQ4Mom;
PMEMreM2=reTNM2;
PMEMrMas=rMass;
PMEMpMas=pMass;
PMEMsMas=sMass;
PMEMdMas=dMass;
PMEMmiSN=minSqN;
PMEMmiST=minSqT;
PMEMmiSB=minSqB;
PMEMrPDG=rPDG;
PMEMsPDG=sPDG;
PMEMpPDG=pPDG;
PMEMpQC =pQC;
PMEMsQC =sQC;
PMEMtQC =transQC;
PMEMcQC =curQ;
PMEMhsfl=hsflag;
PMEMnucf=nucflag;
#ifdef pdebug
G4cout<<"G4Q::HQ:RememberBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
G4cout<<"G4Q::HQ:RememberBest rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
#endif
}
else if(!pCount) // @@ Should not be here
{
// ***VQU***
PMEMktM2=ku;
// ***VFQ***VBQ***VTN***
//PMEMktM2=kt;
// ---------
PMEMknM2=kn;
PMEMfr4M=fr4Mom;
PMEMrQ4M=rQ4Mom;
PMEMreM2=reTNM2;
PMEMrMas=rMass;
PMEMpMas=pMass;
PMEMsMas=sMass;
PMEMdMas=dMass;
PMEMmiSN=minSqN;
PMEMmiST=minSqT;
PMEMmiSB=minSqB;
PMEMrPDG=rPDG;
PMEMsPDG=sPDG;
PMEMpPDG=pPDG;
PMEMpQC =pQC;
PMEMsQC =sQC;
PMEMtQC =transQC;
PMEMcQC =curQ;
PMEMhsfl=hsflag;
PMEMnucf=nucflag;
} else if(!pCount) { // @@ Should not be here
// ***VQU***
PMEMktM2=ku;
// ***VFQ***VBQ***VTN***
//PMEMktM2=kt;
// ---------
PMEMknM2=kn;
PMEMfr4M=fr4Mom;
PMEMrQ4M=rQ4Mom;
PMEMreM2=reTNM2;
PMEMrMas=rMass;
PMEMpMas=pMass;
PMEMsMas=sMass;
PMEMdMas=dMass;
PMEMmiSN=minSqN;
PMEMmiST=minSqT;
PMEMmiSB=minSqB;
PMEMrPDG=rPDG;
PMEMsPDG=sPDG;
PMEMpPDG=pPDG;
PMEMpQC =pQC;
PMEMsQC =sQC;
PMEMtQC =transQC;
PMEMcQC =curQ;
PMEMhsfl=hsflag;
PMEMnucf=nucflag;
#ifdef pdebug
G4cout<<"G4Q::HQ:RememberFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
G4cout<<"G4Q::HQ:RememberFirst rPDG="<<rPDG<<",sPDG="<<sPDG<<",kt="<<kt<<G4endl;
#endif
}
else
{
fr4Mom=PMEMfr4M; // OK -> Recover the best found values
rQ4Mom=PMEMrQ4M; // OK
reTNM2=PMEMreM2; // OK
rMass =PMEMrMas; // OK
pMass =PMEMpMas; // OK
sMass =PMEMsMas; // OK
dMass =PMEMdMas; // OK
minSqN=PMEMmiSN; // ?
minSqT=PMEMmiST; // OK
minSqB=PMEMmiSB; // OK
rPDG =PMEMrPDG; // OK
sPDG =PMEMsPDG; // OK
// ***VQU***
ku=PMEMktM2;
// ***VFQ***VBQ***VTN***
//kt =PMEMktM2;
//-------------------
kn =PMEMknM2;
pPDG=PMEMpPDG; // OK
pQC=PMEMpQC; // OK
sQC=PMEMsQC; // OK
transQC=PMEMtQC; // OK
curQ=PMEMcQC; // OK
hsflag=PMEMhsfl; // OK
nucflag=PMEMnucf;// OK
}
}
} else {
fr4Mom=PMEMfr4M; // OK -> Recover the best found values
rQ4Mom=PMEMrQ4M; // OK
reTNM2=PMEMreM2; // OK
rMass =PMEMrMas; // OK
pMass =PMEMpMas; // OK
sMass =PMEMsMas; // OK
dMass =PMEMdMas; // OK
minSqN=PMEMmiSN; // ?
minSqT=PMEMmiST; // OK
minSqB=PMEMmiSB; // OK
rPDG =PMEMrPDG; // OK
sPDG =PMEMsPDG; // OK
// ***VQU***
ku=PMEMktM2;
// ***VFQ***VBQ***VTN***
//kt =PMEMktM2;
//-------------------
kn =PMEMknM2;
pPDG=PMEMpPDG; // OK
pQC=PMEMpQC; // OK
sQC=PMEMsQC; // OK
transQC=PMEMtQC; // OK
curQ=PMEMcQC; // OK
hsflag=PMEMhsfl; // OK
nucflag=PMEMnucf;// OK
}
}
}
pCount++;
} // End of the WHILE of the parent choice
#ifdef pdebug
G4cout<<"G4Q::HQ:>rPDG="<<rPDG<<curQ<<",sPDG="<<sPDG<<",kt="<<kt<<",F="<<fprob
<<",totQC="<<totQC<<",sQC="<<sQC<<G4endl;
#endif
if(fprob) // Calc PDG of ResidQuasm as an S-hadr
if(fprob) // Calc PDG of ResidQuasm as an S-hadr
{
rPDG=curQ.GetSPDGCode();
G4double rrr=G4UniformRand(); //TheSameAs for "rqPDG" & prev. "rPDG"
G4double rrr=G4UniformRand(); // TheSameAs for "rqPDG" & prev. "rPDG"
if(rPDG==111&&sPDG!=111&&rrr>.5) rPDG=221;
if(rPDG==221&&sPDG!=221&&sPDG!=331&&rrr<.5) rPDG=111;
}
//G4double reMass=sqrt(minSqT); // Min ResidQuasmon Mass after decay
G4double reMass=sqrt(minSqB); // Min ResidQuasmon Mass after decay
//G4double reMass=sqrt(minSqT); // Min ResidQuasmon Mass after decay
G4double reMass=sqrt(minSqB); // Min ResidQuasmon Mass after decay
if (!rPDG)
{
G4cerr<<"***G4Q::HQ:Q="<<curQ<<",r="<<rPDG<<"+s="<<sPDG<<"(sM="<<sMass<<")"<<G4endl;
@@ -2197,18 +2190,23 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
G4double aMass=0.; // @@ get rid of the "aMass" it was necessary only for pap
//G4double aMass=mPi0;
//if(envPDG>MINPDG&&(sPDG<MINPDG||envPDG!=pPDG))aMass=0.;
if((sPDG<MINPDG&&envPDG>MINPDG&&envPDG!=NUCPDG||sPDG>MINPDG&&sPDG!=NUCPDG
&&envPDG>pPDG) && iniBN>0||iniBN>1||rPDG==10) aMass=0.; // No Pi0 cond.(eg in NucE)
if ( ( ( (sPDG < MINPDG && envPDG > MINPDG && envPDG != NUCPDG) ||
(sPDG > MINPDG && sPDG!=NUCPDG && envPDG > pPDG) ) && iniBN > 0) ||
iniBN > 1 ||
rPDG == 10 ) aMass=0.; // No Pi0 cond.(eg in NucE)
#ifdef pdebug
G4cout<<"G4Q::HQ:Is hsfl="<<hsflag<<" or fdul="<<fdul<<" or [rM="<<rMass<<"<"<<reMass
<<" + "<<aMass<<" or rM2="<<reTNM2<<" < miM2="<<tmpTM2<<" and ePDG="<<envPDG
<<">pPDG="<<pPDG<<"] to fail?"<<G4endl;
G4cout <<"G4Q::HQ:Is hsfl="<<hsflag<<" or fdul="<<fdul<<" or [rM="<<rMass<<"<"<<reMass
<<" + "<<aMass<<" or rM2="<<reTNM2<<" < miM2="<<tmpTM2<<" and ePDG="<<envPDG
<<">pPDG="<<pPDG<<"] to fail?"<<G4endl;
#endif
// *** This is a condition, when fragmentation can not be continued ***
if(hsflag||sPDG<MINPDG&&rMass<reMass+aMass||sPDG>MINPDG&&envPDG>pPDG&&reTNM2<tmpTM2
||fdul)
// >>>>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc.
{
if ( hsflag ||
(sPDG < MINPDG && rMass < reMass+aMass) ||
(sPDG > MINPDG && envPDG > pPDG && reTNM2 < tmpTM2) ||
fdul ) {
// >>>>>> Decay Q->S+H or Q/C->H1+H2 or suck in or evaporate or slow down or decay etc.
// ========> Decide what to do, if fragmentation in this Candidate is impossible ===
#ifdef debug
G4cout<<"G4Q::HQ: Yes(No), hsf="<<hsflag<<",sPDG="<<sPDG<<",pM="<<pMass<<",Env="
@@ -2587,16 +2585,22 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
//if(rPDG==221 && (sPDG!=221 && sPDG!=331 && rnd>.5 || dm<548.)) rPDG=111;
if(rPDG==221 && dm<548.) rPDG=111;
// Final state convertion of pi0/eta/eta' to vector mesons
if((rPDG==111&&sPDG!=111||rPDG==221)&&rMass>544.&&dm>544.&&rnd>.5)rPDG=113;//0->rho0
if((rPDG==111&&sPDG!=111||rPDG==221)&&rMass>782.&&dm>782.&&rnd<.5)rPDG=223;//0->omega
if(rPDG==331 &&rMass>1020.&&dm>1020.&&rnd<.5) rPDG=333; // eta' -> phi0
if ( ( (rPDG == 111 && sPDG!= 111) || rPDG == 221) &&
rMass > 544. && dm > 544. && rnd > .5) rPDG=113; //0->rho0
if ( ( (rPDG == 111 && sPDG != 111) || rPDG == 221) &&
rMass > 782. && dm > 782. && rnd < .5) rPDG = 223; //0->omega
if ( rPDG == 331 && rMass > 1020. && dm > 1020. && rnd < .5) rPDG=333; // eta' -> phi0
if(rPDG== 211 && dm>544. && rnd>.5) rPDG= 213; // M-1.5*W conv. of pi+ to rho+
if(rPDG==-211 && dm>544. && rnd>.5) rPDG=-213; // M-1.5*W conv. of pi- to rho-
#ifdef debug
G4cout<<"G4Q::HQ:rCor,Q="<<quasM<<",sM="<<sMass<<",r="<<rPDG<<",rM="<<rMass<<G4endl;
#endif
if(rPDG<MINPDG&&rPDG!=2212&&rPDG!=2112&&rPDG!=3122&&rPDG!=10)//=>ResidQ isn't NuclCl
{
if (rPDG < MINPDG && rPDG != 2212 && rPDG != 2112 && rPDG != 3122 && rPDG != 10)
{ //=>ResidQ isn't NuclCl
reMass=GetRandomMass(rPDG,dm); // Randomize mass of the RResidQuasmon-Hadron
#ifdef debug
G4cout<<"G4Q::HQ:dm="<<dm<<", ResQM="<<reMass<<" is changed to PDG="<<rPDG<<G4endl;
@@ -2672,11 +2676,11 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
G4int rBaryn=rQPDG.GetBaryNum();
G4double rCB=theEnvironment.CoulombBarrier(rChg,rBaryn);
#ifdef debug
G4cout<<"G4Q::HQ:rqCB="<<rCB<<",rqC="<<rChg<<",rqB="<<sBaryn<<",rM="<<rQPDG<<",reM="
G4cout<<"G4Q::HQ:rqCB="<<rCB<<",rqC="<<rChg<<",rqB="<<sBaryn<<",rM="<<rQPDG<<",reM="
<<reMass<<G4endl;
#endif
if(totBN>1&&totS>=0 && envPDG>MINPDG && envPDG!=NUCPDG
&& (reMass+sMass>quasM || sCB+rCB+reMass+sMass+envM>totMass || !RQB&&quasM<diPiM))
if ( totBN > 1 && totS >= 0 && envPDG > MINPDG && envPDG != NUCPDG &&
(reMass+sMass > quasM || sCB+rCB+reMass+sMass+envM > totMass || (!RQB && quasM < diPiM) ) )
//if(2>3) // This Evaporation channel is closed
{
#ifdef ppdebug
@@ -3279,11 +3283,13 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
G4QNucleus rK0N(resK0QC); // Pseudo nucleus for the Resid System
G4int rK0PDG = rK0N.GetPDG(); // PDG of Residual
G4double rK0M = rK0N.GetMZNS(); // min mass of the Residual System
if(rKPM+mK > totMass && rK0M+mK0 > totMass || rKPPDG==NUCPDG || rK0PDG==NUCPDG)
{
if ( (rKPM+mK > totMass && rK0M+mK0 > totMass) ||
rKPPDG == NUCPDG ||
rK0PDG == NUCPDG )
{
#ifdef ppdebug
G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM
<<","<<rK0M<<",d="<<mK+rKPM-totMass<<","<<mK0+rK0M-totMass<<G4endl;
G4cout<<"G4Q::HQ:***PANIC#2***tM="<<totMass<<"<KM="<<mK<<","<<mK0<<",rM="<<rKPM
<<","<<rK0M<<",d="<<mK+rKPM-totMass<<","<<mK0+rK0M-totMass<<G4endl;
throw G4QException("G4Quasmon::HadronizeQuasmon: Why PANIC? (2)"); //@@ TMP
#endif
status =-1; // Panic exit
@@ -3871,46 +3877,49 @@ void G4Quasmon::FillHadronVector(G4QHadron* qH)
<<nN<<",nZ="<<nZ<<",nL="<<nS<<",totM="<<fragMas<<",n="<<fragMas-nResM-mNeut
<<",p="<<fragMas-pResM-mProt<<",l="<<fragMas-lResM-mLamb<<G4endl;
#endif
if(thePDG==90004004||bA>1&&(nN>0&&fragMas>nResM+mNeut||nZ>0&&fragMas>pResM+mProt
||nS>0&&fragMas>lResM+mLamb))
{
if ( thePDG == 90004004 ||
(bA > 1 && ( (nN > 0 && fragMas > nResM+mNeut) ||
(nZ > 0 && fragMas > pResM+mProt) ||
(nS > 0 && fragMas > lResM+mLamb) ) ) )
{
G4int barPDG = 90002002;
G4int resPDG = 90002002;
G4double barM= mAlph;
G4double resM= mAlph;
if (fragMas>nResM+mNeut) // Can radiate a neutron (priority 1)
{
if (fragMas > nResM+mNeut) { // Can radiate a neutron (priority 1)
barPDG = 90000001;
resPDG = nResPDG;
barM= mNeut;
resM= nResM;
}
else if(fragMas>pResM+mProt) // Can radiate a proton (priority 2)
{
}
else if(fragMas>pResM+mProt) // Can radiate a proton (priority 2)
{
barPDG=90001000;
resPDG=pResPDG;
barM =mProt;
resM =pResM;
}
else if(fragMas>lResM+mLamb) // Can radiate a Lambda (priority 3)
{
}
else if(fragMas>lResM+mLamb) // Can radiate a Lambda (priority 3)
{
barPDG=91000000;
resPDG=lResPDG;
barM =mLamb;
resM =lResM;
}
}
else if(thePDG!=90004004&&fragMas>GSMass)// If it's not Be8 decay in gamma
{
{
barPDG=22;
resPDG=thePDG;
barM =0.;
resM =pResM;
}
}
else if(thePDG!=90004004)
{
{
G4cerr<<"***G4Q::FillHadV:PDG="<<thePDG<<",M="<<fragMas<<"<GSM="<<GSMass<<G4endl;
throw G4QException("***G4Quasmon::FillHadronVector: Below GSM but cann't decay");
}
}
G4LorentzVector a4Mom(0.,0.,0.,barM);
G4LorentzVector b4Mom(0.,0.,0.,resM);
if(!qH->DecayIn2(a4Mom,b4Mom))
@@ -4081,8 +4090,8 @@ G4double G4Quasmon::GetQPartonMomentum(G4double kMax, G4double mC2)
}
if (vRndm<=0. || vRndm>1.)
{
G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax<<",kLi="
<<kLim<<G4endl;
//G4cout<<"-Warning-G4Quasmon::GetQPM: R="<<vRndm<<",kMi="<<kMin<<",kMa="<<kMax<<",kLi="
// <<kLim<<G4endl;
if(vRndm<=0.) vRndm=1.e-9;
else if(vRndm>1.) vRndm=1.;
}
@@ -4440,10 +4449,9 @@ void G4Quasmon::CalculateHadronizationProbabilities
curCand->ClearParClustVector(); // Clear ParentClusterVector for the Fragment
G4double probability = 0.;
G4double secondProbab = 0.;
if(aPDG>80000000 && envA>0 || aPDG<80000000)
{
G4int resPDG=0;
G4double comb=0.; // Combinatorial factor for quark exchange
if ( (aPDG > 80000000 && envA > 0) || aPDG < 80000000) {
G4int resPDG=0;
G4double comb=0.; // Combinatorial factor for quark exchange
G4QContent candQC = curCand->GetQC();
G4QContent tmpTQ=envQC+valQ-candQC; // QC of TotalResidualNucleus for the Cluster
G4QNucleus tmpT(tmpTQ); // Nucleus of TotalResidNucleus for Fragment
@@ -4548,23 +4556,29 @@ void G4Quasmon::CalculateHadronizationProbabilities
G4int resS=resQC.GetS()-resQC.GetAS();
G4int resA=resQC.GetBaryonNumber();
G4bool rI=resA>0 && resU>=0 && resD>=0 &&
(resU+resS>resD+resD||resD+resS>resU+resU);
(resU+resS>resD+resD||resD+resS>resU+resU);
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI)// The Residual Quasmon is possible
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001))
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&!piF) // *** Never try this
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||cPDG==90000001))
//G4cout<<"G4Q::CHP:PiF="<<piF<<G4endl;
// The best:
//if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 ))
if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF || piF &&
//cPDG!=90001000||G4UniformRand()<.333333))
(cPDG!=90001000||G4UniformRand()<.333333) && cPDG!=90002001&&cPDG!=90002002))
//(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002))
//cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002))
//-----------------------------------------------------------------
//if(resQ>-2 &&resPDG && resPDG!=10 && !rI && (!piF||piF && cPDG!=90001000 ))
if (resQ > -2 && resPDG && resPDG != 10 && !rI &&
(!piF ||
(piF &&
(cPDG != 90001000 || G4UniformRand() < .333333) &&
cPDG != 90002001 &&
cPDG != 90002002) ) )
//cPDG!=90001000||G4UniformRand()<.333333))
//(cPDG!=90001000||G4UniformRand()<.5)&&cPDG!=90002001&&cPDG!=90002002))
//cPDG!=90001000&&cPDG!=90002001&&cPDG!=90002002))
//-----------------------------------------------------------------
//if(resQ>-2 && resPDG && resPDG!=10 && !rI && (!piF||piF&&baryn>1))
//if(resQ>-2 && resPDG && resPDG!=10 && !rI) // baryons are too energetic
//if(resQ>-2&&resPDG&&resPDG!=10&&!rI&&(!piF||baryn==1)) // bad
{
{
G4int is=index+shift;
if(shift!=7&&is<maxC) // This quark exchange is possible
{
@@ -4630,12 +4644,16 @@ void G4Quasmon::CalculateHadronizationProbabilities
// )
// )
// ==== Just a coridor =======
//if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old)
//if(abs(dS)<3||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrForB=1(old)
//if(abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//StrongFor1(<4)
//if(baryn>1||abs(dS)<4||(qIso>0&&dC<0||qIso<0&&dC>0)&&baryn==1)//SIFF1
//if(!piF&&abs(dS)<4 || piF&&abs(dS)<3) // UniversalIsoFocusing
//if(!piF&&first&&abs(dS)<4 || (!piF&&!first||piF)&&abs(dS)<3)//ExpIsoF
if(!piF&&first&&baryn<3 || !piF&&!first || piF&&abs(dS)<3) // ExpIsoFoc
if ( (!piF && first && baryn < 3) ||
(!piF && !first) ||
(piF && abs(dS) < 3) )
// ExpIsoFoc
//if(!qIso&&!dC||qIso>0&&dC<0||qIso<0&&dC>0)//MediumIsoFocusingForAll
//if(abs(dS)<3) // Universal IsotopeFocusing(<3) (Best for pi-capture)
//if(abs(dS)<4) // Never try this (**)
@@ -4718,8 +4736,8 @@ void G4Quasmon::CalculateHadronizationProbabilities
// ***VBQ***
G4double minBM=minM;
//if(envM>boundM)
if(envA-barot<=bEn&&envM>boundM || envA-barot>bEn)
//if(2>3)
if ( (envA-barot <= bEn && envM > boundM) || envA-barot > bEn)
//if(2>3)
{
minBM=rtM;
// *** LIM ***
@@ -4847,10 +4865,14 @@ void G4Quasmon::CalculateHadronizationProbabilities
//if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001||G4UniformRand()<.5)))
//if(minBM2>rQ2&&(!piF||piF&&(cPDG!=90000001)))
//if(minBM2>rQ2&&(!piF&&baryn>4 || piF && cPDG!=90000001 &&
if(minBM2>rQ2&&(!piF || piF && cPDG!=90000001 &&
cPDG!=90001001 && cPDG!=90001002 ))
//if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon
//if(2>3)
if (minBM2 > rQ2 &&
(!piF ||
(piF &&
cPDG != 90000001 &&
cPDG != 90001001 &&
cPDG != 90001002) ) )
//if(minBM2>rQ2) // ==> Check of Residual (Virtual?) Quasmon
//if(2>3)
{
G4double nz=0.;
if(atrest) nz=1.-(minBM2-rQ2+pmk*dked)/(boundM*(rEP+pmk));
@@ -4886,11 +4908,15 @@ void G4Quasmon::CalculateHadronizationProbabilities
//if(minM2>rQ2&&baryn>3) //=>CheckResidQuasmon *** The Best ***
//if(minM2>rQ2 && (!piF || piF &&
//if(minM2>rQ2 && (!piF&&baryn>3 || piF &&
if(minM2>rQ2 && (!piF&&baryn>4 || piF &&
(cPDG!=90000001||G4UniformRand()>.3333333) && cPDG!=90001001) )
if (minM2 > rQ2 &&
( (!piF && baryn > 4) ||
(piF &&
(cPDG != 90000001 || G4UniformRand() > .3333333) &&
cPDG != 90001001) ) )
//cPDG!=90001001) )
//if(minM2>rQ2) // ==> Check of Residual Quasmon
//if(2>3)
//if(minM2>rQ2) // ==> Check of Residual Quasmon
//if(2>3)
{
G4double nz=0.;
if(atrest) nz=1.-(minM2-rQ2+pmk*dked)/(boundM*(rEP+pmk));
@@ -5089,8 +5115,8 @@ void G4Quasmon::CalculateHadronizationProbabilities
comb = valQ.NOfCombinations(candQC);
if(!comb)
{
if (aPDG==111|aPDG==211) comb=1.; // Permit pions @@ ?
else if(aPDG==311|aPDG==321) comb=SSin2Gluons; // Permit kaons @@ ?
if ( (aPDG==111)|(aPDG==211) ) comb=1.; // Permit pions @@ ?
else if ( (aPDG==311)|(aPDG==321) ) comb=SSin2Gluons; // Permit kaons @@ ?
}
if(cPDG== 211&&npip>0) comb*=(npip+1); // Bose multyplication for pi+
if(cPDG==-211&&npip>0) comb*=(npin+1); // Bose multyplication for pi-
@@ -5134,9 +5160,9 @@ void G4Quasmon::CalculateHadronizationProbabilities
<<",tM="<<totMass<<">"<<frM-CB+resTM<<"=fM="<<frM<<"+rM="<<resTM
<<"-CB="<<CB<<G4endl;
#endif
if(comb&&resPDG && totMass>frM-CB+resTM &&
(resPDG>80000000&&resPDG!=90000000 || resPDG<10000))
{
if (comb && resPDG && totMass > frM-CB+resTM &&
((resPDG > 80000000 && resPDG != 90000000) || resPDG<10000) )
{
#ifdef pdebug
if(priCon) G4cout<<"G4Q::CHP:ind="<<index<<",qQC="<<valQ<<mQ<<",cPDG="<<cPDG
<<",rPDG="<<resPDG<<curQ<<G4endl;
@@ -5370,8 +5396,9 @@ G4bool G4Quasmon::CheckGroundState(G4bool corFlag) // Correction is forbidden by
G4cout<<"G4Q::CheckGS: (totM="<<resTMa<<" < rQM+rEM="<<resSMa<<" || rEM="<<resEMa
<<"=0 && "<<bsCond<<"=0) && n="<<nOfOUT<<" >0"<<G4endl;
#endif
if((resTMa<resSMa || !resEMa&&!bsCond) && nOfOUT>0 && corFlag) // *** CORRECTION ***
{
if ( (resTMa < resSMa || (!resEMa && !bsCond) ) && nOfOUT > 0 && corFlag)
{ // *** CORRECTION ***
G4QHadron* theLast = theQHadrons[nOfOUT-1];
if(!(theLast->GetNFragments()) && theLast->GetPDGCode()!=22)//NotDecayedHadron & NotGam
{
@@ -5574,8 +5601,7 @@ G4QHadronVector* G4Quasmon::DecayQHadron(G4QHadron* qH) // Don't fill Internal Q
G4int fPDG=cV[0]->GetPDGCode();
G4int sPDG=cV[1]->GetPDGCode();
// Radiative decays In2 (eta, eta', Sigma0) are closed if the ElMaDecays=false
if(fPDG!=22 && sPDG!=22 || ElMaDecays)
{
if ( (fPDG != 22 && sPDG != 22) || ElMaDecays) {
#ifdef pdebug
G4cout<<"G4Q::DecQH:Yes2,fPDG="<<fPDG<<",sPDG="<<sPDG<<",EMF="<<ElMaDecays<<G4endl;
#endif
@@ -5707,7 +5733,7 @@ G4QHadronVector* G4Quasmon::DecayQHadron(G4QHadron* qH) // Don't fill Internal Q
G4int sPDG=cV[1]->GetPDGCode();
G4int tPDG=cV[2]->GetPDGCode();
//The radiative decays of the GS hadrons In3 are closed if ElMaDecays=false
if(fPDG!=22 && sPDG!=22 && tPDG!=22 || ElMaDecays)
if ( (fPDG != 22 && sPDG != 22 && tPDG != 22) || ElMaDecays)
{
#ifdef pdebug
G4cout<<"G4Q::DQH:Y,f="<<fPDG<<",s="<<sPDG<<",t="<<tPDG<<",F="<<ElMaDecays<<G4endl;
@@ -28,7 +28,7 @@
//
//
// $Id: G4QuasmonString.cc,v 1.7 2006/11/27 10:44:55 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QuasmonString ----------------
// by Mikhail Kossov, August 2000.
@@ -0,0 +1,122 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// G4 Tools program: NuMu DIS(Q2) fixed step integration
// .....................................................
// Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Dec-2005
//
//=====================================================================
#include "globals.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include "G4ios.hh"
//#include <CLHEP/GenericFunctions/LogGamma.hh>
// Calculation of electron spectra integrals for randomization of bound mu->e+nu+nu decay
double espec(double Z , double T) // T=E_kin in MeV
{
static double mZ=0.,mp,mc,mep,mem,me,mpp;
if(Z!=mZ)
{
double Z2=Z*Z;
double Z4=Z2*Z2;
double az=std::log(Z);
mZ=Z;
mp=(11.65+330./Z)/(1.+7.6e-17*Z4*Z4);
mc=52.83-.2257*az*az;
mep=.674;
mem=.1431+Z2/15080.;
me=5.54*std::exp(-.0327*std::pow(Z,1.241));
mpp=2.253*std::exp(-Z2/8922.7);
G4cout<<"z="<<Z<<":p="<<mp<<",c="<<mc<<",ep="<<mep<<",em="<<mem<<",e="<<me<<",pp="<<mpp
<<G4endl;
}
double p=mp;
double c=mc;
double ep=mep;
double em=mem;
double e=me;
double pp=mpp;
double res=std::pow(T,pp)/(1.+e*std::exp(em*std::pow(T,ep)))/(1.+std::pow(T/c,p));
//G4cout<<"T="<<T<<", R="<<.0001389*res<<G4endl;
return res;
}
int main()
{
const int niX=201; // number of points for randomization table
const int liX=niX-1; // the last index for randomization table (?)
//const int niE=1000000; // number of points for integration table
const int niE=1000; // number of points for integration table
// **********************************************************************
double Z=20.; // Z of the Element **********************
// **********************************************************************
double X[niX]; // randomization table
double in[niE]; // integration table
double Emax=80.; // Max kin E in MeV
double dE=Emax/niE; // Step in the integration table
double spP=0.; // Previous spectrum value [sp(0)=0]
in[0]=0.; // Not yet normed collected integrals
double e=0.; // running value of energy
double inv=0.; // Integral cumulative value
for(int i=1; i<niE; i++)
{
e+=dE;
double sp=espec(Z,e);
inv+=spP+sp; // integrate with the Gauss method
in[i]=inv;
//G4cout<<"sp="<<sp<<",in[="<<i<<"]="<<inv<<G4endl;
spP=sp;
} // End of the big loop over log(E)
for(int j=1; j<niE; j++) in[j]/=inv; // Normalize the integrals by a unit
//for(int n=1; n<niE; n++) G4cout<<"1-in["<<n<<"]="<<1.-in[n]<<G4endl;
double dx=1./liX; // The last in the table is MAXE by definition
double d=dx; // Start searching with 1, because x(0)=0
int m=1; // index in the randomization table
double oi=0.; // previouse integral value
X[0]=0.; // Interpolated randomization table (energy)
e=0.;
for(int k=1; k<niE; k++)
{
e+=dE;
double ci=in[k];
if(ci>=d)
{
if(ci==d) X[m]=e;
else X[m]=e-(ci-d)*dE/(ci-oi);
m++;
d+=dx; // start searching for another point
}
oi=ci;
}
for(int k=0; k<liX; k++)
{
G4cout<<X[k]<<",";
if(!((k+1)%10))G4cout<<G4endl;
}
return 0;
}
@@ -316,6 +316,7 @@ G4double binom(G4int N, G4int M)
return 1.;
}
// Initialize factorials and combinatoric coefficients
void Initialize()
{
//static const G4double sat = 3.03; // Stirling saturation of Dubna
@@ -447,7 +448,7 @@ G4double DiffElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ2) // A
G4double MassN2 = MassN*MassN;
G4double S = (MassN+MassN)*HadrEnergy+MassN2+MassH2;// Mondelststam s
G4double EcmH = (S-MassN2+MassH2)/2/std::sqrt(S); // CM energy of a hadron
G4double CMMom = std::sqrt(EcmH*EcmH-MassH2); // CM momentum
G4double CMMom = std::sqrt(EcmH*EcmH-MassH2); // CM momentum
G4double Stot = HadrTot*mb2G2; // in GeV^-2
G4double Bhad = HadrSlope; // in GeV^-2
@@ -484,9 +485,9 @@ G4double DiffElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ2) // A
G4double Tot1 = 0.;
for(G4int i=1; i<=A; i++) // @@ Make separately for n and p
{
N *= -Unucl*(A-i+1)*Rho2/i;
N *= -Unucl*(A-i+1)*Rho2/i; // Includes total cross-section
G4double N4 = 1.;
G4double Prod1 = std::exp(-Q2*R12B/i/4)*R12B/i;
G4double Prod1 = std::exp(-Q2*R12B/i/4)*R12B/i; // Includes the slope
G4double medTot = R12B/i;
for(G4int l=1; l<=i; l++)
{
@@ -555,7 +556,8 @@ G4double DiffElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ2) // A
G4double Corr0 = Tot00/Tot1;
ImElA0 *= Corr0;
return (ReElA0*ReElA0+(ImElA0+Din1)*(ImElA0+Din1))*CMMom*CMMom*mb2G2/4/pi2;
//return (ReElA0*ReElA0+(ImElA0+Din1)*(ImElA0+Din1))*CMMom*CMMom*mb2G2/4/pi2; // ds/do
return (ReElA0*ReElA0+(ImElA0+Din1)*(ImElA0+Din1))*mb2G2/(twopi+twopi);
} // End of DiffElasticCS
G4double CHIPSDiffElCS(G4int hPDG, G4double HadrMom, G4int Z, G4int A, G4double aQ2) // MeV
@@ -563,40 +565,62 @@ G4double CHIPSDiffElCS(G4int hPDG, G4double HadrMom, G4int Z, G4int A, G4double
static const G4double eps = 0.000001; // Accuracy of calculations
static const G4double mb2G2 = 2.568; // Transform from mb to GeV^-2
static const G4double piMG = pi/mb2G2; // PiTrans from GeV^-2 to mb
G4double hMom = HadrMom/1000.; // Momentum (GeV, inputParam)
G4double p = HadrMom/1000.; // Momentum (GeV, inputParam)
G4double p2 = p*p;
G4double MassH = G4QPDGCode(hPDG).GetMass()/1000.; // Hadron Mass in GeV
G4double MassH2 = MassH*MassH;
G4double HadrEnergy = std::sqrt(hMom*hMom+MassH2); // Tot energy in GeV
G4double HadrEnergy = std::sqrt(p2+MassH2); // Tot energy in GeV
//G4cout<<"G4GCS::DiffElasticCS: PGG_proj="<<hPDG<<", A_nuc= "<<A<<G4endl;
if(A==2 || A==3) G4Exception("G4GCS: This model does not work for nuclei with A=2, A=3");
if(A>252) G4Exception("G4GCS: This nucleus is too heavy for the model !!!");
//if(HadrEnergy-MassH<1.) G4Exception("Kin energy is too small for the model (T>1 GeV)");
CalculateParameters(hPDG, HadrMom);
CalculateIntegralCS(A, HadrEnergy);
CalculateNuclearParameters(A);
CalculateParameters(hPDG, HadrMom); // ?
CalculateIntegralCS(A, HadrEnergy); // ?
CalculateNuclearParameters(A); // ?
G4double Q2 = aQ2/1000/1000; // in GeV^2
//G4doubleMassN = A*0.938; // @@ This is bad!
G4double MassN = A*0.9315; // @@ Atomic Unit is bad too
if(G4NucleiPropertiesTable::IsInTable(Z,A))
MassN=G4NucleiProperties::GetNuclearMass(A,Z)/1000.; // Geant4 NuclearMass
MassN=G4NucleiProperties::GetNuclearMass(A,Z)/1000.; // Geant4 NuclearMass in GeV
G4double MassN2 = MassN*MassN;
G4double S = (MassN+MassN)*HadrEnergy+MassN2+MassH2;// Mondelststam s
G4double EcmH = (S-MassN2+MassH2)/2/std::sqrt(S); // CM energy of a hadron
G4double CMMom = std::sqrt(EcmH*EcmH-MassH2); // CM momentum
G4double Stot = HadrTot*mb2G2; // in GeV^-2
G4double Bhad = HadrSlope; // in GeV^-2
G4double Asq = 1+HadrReIm*HadrReIm; // |M|^2/(ImM)^2
//G4cout<<"P="<<CMMom<<",E="<<HadrEnergy<<",N="<<MassN2<<",h="<<MassH2<<",p="<<p<<G4endl;
G4double p3 = p2*p;
G4double p4 = p2*p2;
G4double sp = std::sqrt(p);
G4double p2s = p2*sp;
G4double ap = std::log(p);
G4double dl = ap-3.;
G4double dl2 = dl*dl;
G4double shPPTot = 2.91/(p2s+.0024)+5.+(32.+.3*dl2+23./p)/(1.+1.3/p4); // SigPP in mb
G4double shPNTot = 12./(p2s+.05*p+.0001/std::sqrt(sp))+.35/p
+(38.+.3*dl2+8./p)/(1.+1.2/p3); // SigPP in mb
G4double hNTot = (Z*shPPTot+(A-Z)*shPNTot)/A; // SighN in mb
G4double Stot = hNTot*mb2G2; // in GeV^-2
G4double shPPSl = 8.*std::pow(p,.055)/(1.+3.64/p4); // PPslope in GeV^-2
G4double shPNSl = (7.2+4.32/(p4*p4+.012*p3))/(1.+2.5/p4); // PNslope in GeV^-2
G4double Bhad = (Z*shPPSl+(A-Z)*shPNSl)/A; // B-slope in GeV^-2
G4double hNReIm = -.55+ap*(.12+ap*.0045); // Re/Im_hN in no unit
G4double Asq = 1+hNReIm*hNReIm; // |M|^2/(ImM)^2
G4double Rho2 = std::sqrt(Asq); // M/ImM
G4double R12 = R1*R1;
G4double R22 = R2*R2;
G4double r1 = 3.9*std::pow(A-1.,.309); // Positive diffractionalRadius
G4double r2 = 2.*std::pow(A,.36); // Negative diffraction radius
G4double pN = Pnucl; // Dubna value
//G4double pN = .4; // Screaning factor
G4double Ae = Aeff; // Dubna value
//G4double Ae = .75; // Normalization
G4double R12 = r1*r1;
G4double R22 = r2*r2;
G4double R1C = R12*r1;
G4double R2C = R22*r2;
G4double R12B = R12+Bhad+Bhad; // Slope is used
G4double R22B = R22+Bhad+Bhad; // Slope is used
G4double Norm = (R12*R1-Pnucl*R22*R2)*Aeff; // Some questionable norming
G4double R13 = R12*R1/R12B; // Slope is used
G4double R23 = Pnucl*R22*R2/R22B; // Slope is used
G4double Norm = (R1C-pN*R2C)*Ae; // ScreanFac & NormFac are used
G4double R13 = R1C/R12B; // Slope is used
G4double R23 = pN*R2C/R22B; // Slope & ScreanFact are used
G4double norFac = Stot/twopi/Norm; // totCS (in GeV^-2) is used
G4double Unucl = norFac*R13;
G4double SinFi = HadrReIm/Rho2;
G4double SinFi = hNReIm/Rho2; // Real part
G4double FiH = std::asin(SinFi);
G4double N = -1.;
G4double N2 = R23/R13; // Slope is used
@@ -605,7 +629,7 @@ G4double CHIPSDiffElCS(G4int hPDG, G4double HadrMom, G4int Z, G4int A, G4double
G4double Tot1 = 0.;
for(G4int i=1; i<=A; i++)
{
N *= -Unucl*(A-i+1)*Rho2/i;
N *= -Unucl*(A-i+1)*Rho2/i; // TotCS is used
G4double N4 = 1.;
G4double Prod1 = std::exp(-Q2*R12B/i/4)*R12B/i; // Slope is used
G4double medTot = R12B/i; // Slope is used
@@ -630,7 +654,8 @@ G4double CHIPSDiffElCS(G4int hPDG, G4double HadrMom, G4int Z, G4int A, G4double
G4double Corr0 = Tot00/Tot1;
ImElA0 *= Corr0;
return (ReElA0*ReElA0+ImElA0*ImElA0)*CMMom*CMMom*mb2G2/4/pi2;
//return (ReElA0*ReElA0+ImElA0*ImElA0)*CMMom*CMMom*mb2G2/4/pi2; // ds/do
return (ReElA0*ReElA0+ImElA0*ImElA0)*mb2G2/(twopi+twopi);
} // End of DiffElasticCS
G4double CHIPS_Tb(G4int A, G4double b) // T(b) in fm-2
@@ -704,7 +729,7 @@ G4double CoherentDifElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ
else if(A==16) r0 = 0.92;
else if(A==12) r0 = 0.80;
else r0 = 1.16*(1.-1.16/Re2); // For other nuclei which have not been tested
G4double MassN = mN; // A * AtomicUnit(GeV)
G4double MassN = A*0.9315; // @@ Atomic Unit is bad too
G4double MassN2 = MassN*MassN;
G4double S = (MassN+MassN)*HadrEnergy+MassN2+MassH2; // Mondelstam S
G4double EcmH = (S-MassN2+MassH2)/2/std::sqrt(S); // Hadron CM Energy
@@ -735,16 +760,16 @@ G4double CoherentDifElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ
G4double InExp = -hTotG2*Integ*stepB/dHS;
G4double expB = std::exp(InExp);
G4double HRIE = HadrReIm*InExp;
ReIntegrand[i] = (1.-expB*std::cos(HRIE));
ImIntegrand[i] = expB*std::sin(HRIE);
ReIntegrand[i] = (1.-expB*std::cos(HRIE)); // Real part of the amplitude
ImIntegrand[i] = expB*std::sin(HRIE); // Imaginary part of the amplit
}
InCoh = 0.; // incohirent (quasi-elastic)
ValB = -stepB;
for(G4int k=0; k<NptB; k++)
for(G4int k=0; k<NptB; k++) // Third integration (?)
{
ValB += stepB;
InCoh += Thick[k]*ValB*std::exp(-hTotG2*Thick[k]);
G4double J0qb = QJ0(std::sqrt(Q2)*ValB)*ValB;
G4double J0qb = QJ0(std::sqrt(Q2)*ValB)*ValB; // Bessel0(Q*b)
ReSum += J0qb*ReIntegrand[k];
ImSum += J0qb*ImIntegrand[k];
}
@@ -752,7 +777,8 @@ G4double CoherentDifElasticCS(G4int hPDG, G4double HadrMom, G4int A, G4double aQ
// <<Q2<<",m="<<mb2G2<<G4endl;
InCoh *= stepB*hTotG2*hTotG2*(1.+HadrReIm*HadrReIm)*std::exp(-HadrSlope*Q2)/8/mb2G2;
//G4cout<<"GHAD:RS="<<ReSum<<",IS="<<ImSum<<",CM="<<CMMom<<",st="<<stepB<<G4endl;
return (ReSum*ReSum+ImSum*ImSum)*m2G10*CMMom*CMMom*stepB*stepB/twopi;
//return (ReSum*ReSum+ImSum*ImSum)*m2G10*CMMom*CMMom*stepB*stepB/twopi; // ds/do
return (ReSum*ReSum+ImSum*ImSum)*m2G10*stepB*stepB/12; // ds/dt
}
G4double CHIPSDifElasticCS(G4int hPDG, G4double hMom, G4int A, G4int Z, G4double aQ2)
@@ -762,102 +788,117 @@ G4double CHIPSDifElasticCS(G4int hPDG, G4double hMom, G4int A, G4int Z, G4double
static const G4double mN = .938; // Atomic Unit GeV
static const G4double hc2 = .3893793; // Transform from GeV^-2 to mb
static const G4double mb2G2 = 1./hc2; // Transform from mb to GeV^-2
//static const G4double mb2G2 = 2.568; // Transform from mb to GeV^-2
static const G4double f22mb = 10; // Transform from fermi^2 to mb
static const G4double f22G2 = f22mb*mb2G2; // Transform from fm2 to GeV^-2
static const G4double f2Gm1 = std::sqrt(f22G2); // Transform from fm to GeV^-1
G4double Re = std::pow(A,.33333333); // A-dep coefficient
G4double Lim = 50.*Re; // Integration accuracy limit
G4double Lim = 100*Re; // Integration accuracy limit
G4double Tb[Npb]; // Calculated T(b) array
G4QBesIKJY QI0(BessI0); // I0 Bessel function
G4QBesIKJY QJ0(BessJ0); // J0 Bessel function
hMom = hMom/1000.; // Momentum (GeV, inputParam)
G4double p = hMom/1000.; // Momentum (GeV, inputParam)
G4double p2 = p*p;
G4double MassH = G4QPDGCode(hPDG).GetMass()/1000.; // Hadron Mass in GeV
G4double MassH2 = MassH*MassH; // Squared mass of the hadron
G4double hEnergy = std::sqrt(hMom*hMom+MassH2); // Tot energy in GeV
G4double hEnergy = std::sqrt(p2+MassH2); // Tot energy in GeV
G4double Q2 = aQ2/1000000.; // -t in GeV
G4double MassN = mN; // AtomicUnit(GeV)[prototype]
G4double MassN = A*0.9315; // @@ Atomic Unit is bad too
if(G4NucleiPropertiesTable::IsInTable(Z,A))
MassN=G4NucleiProperties::GetNuclearMass(A,Z)/1000.; // Geant4 NuclearMass in GeV
G4double MassN2 = MassN*MassN; // Squared mass of the target
G4double S = (MassN+MassN)*hEnergy+MassN2+MassH2;// Mondelstam s
G4double EcmH = (S-MassN2+MassH2)/2/std::sqrt(S); // Hadron CM Energy
G4double CMMom = std::sqrt(EcmH*EcmH-MassH2); // CM momentum (to norm CS)
// @@ Temporary only for nucleons
//G4cout<<"CHPS:E="<<hEnergy<<",dM="<<2*MassN<<",sN="<<MassN2<<",sH="<<MassH2<<G4endl;
G4double shNTot = 5.2+5.2*std::log(hEnergy)+51*std::pow(hEnergy,-.35); // SighN in mb
G4double shNSl = 5.44+.88*std::log(S); // B-slope in GeV^-2
G4double shNReIm = .13*std::log(S/350)*std::pow(S,-.18); // Re/Im_hN in no unit
//G4cout<<"2: P="<<CMMom<<",E="<<hEnergy<<",N="<<MassN2<<",h="<<MassH2<<",p="<<p<<G4endl;
// The mean value of the total can be used
G4double p3 = p2*p;
G4double p4 = p2*p2;
G4double sp = std::sqrt(p);
G4double p2s = p2*sp;
G4double ap = std::log(p);
G4double dl = ap-3.;
G4double dl2 = dl*dl;
G4double shPPTot = 2.91/(p2s+.0024)+5.+(32.+.3*dl2+23./p)/(1.+1.3/p4); // SigPP in mb
G4double shPNTot = 12./(p2s+.05*p+.0001/std::sqrt(sp))+.35/p
+(38.+.3*dl2+8./p)/(1.+1.2/p3); // SigPP in mb
G4double shNTot = (Z*shPPTot+(A-Z)*shPNTot)/A; // SighN in mb
#ifdef debug
G4cout<<"CHIPS:SI,p="<<p<<",n="<<shNTot<<",P="<<shPPTot<<",N="<<shPNTot
<<",Z="<<Z<<",A="<<A<<G4endl;
#endif
G4double shPPSl = 8.*std::pow(p,.055)/(1.+3.64/p4); // PPslope in GeV^-2
G4double shPNSl = (7.2+4.32/(p4*p4+.012*p3))/(1.+2.5/p4); // PNslope in GeV^-2
G4double shNSl = (Z*shPPSl+(A-Z)*shPNSl)/A; // B-slope in GeV^-2
#ifdef debug
G4cout<<"CHIPS:SL,n="<<shNSl<<",P="<<shPPSl<<",N="<<shPNSl<<G4endl;
#endif
G4double shNReIm = -.55+ap*(.12+ap*.0045); // Re/Im_hN in no unit
//G4cout<<"CHPS: s="<<S<<",T="<<shNTot<<",R="<<shNReIm<<",B="<<shNSl<<G4endl;
// @@ End of temporary ^^^^^^^
G4double dHS = shNSl+shNSl; // Working: doubled B-slope
//G4double rAfm = 0.;
//if (A==208) rAfm = 1.125*Re;
//else if(A==90) rAfm = 1.12*Re;
//else if(A==64) rAfm = 1.1*Re;
//else if(A==58) rAfm = 1.09*Re;
//else if(A==48) rAfm = 1.07*Re;
//else if(A==40) rAfm = 1.15*Re;
//else if(A==28) rAfm = 0.93*Re;
//else if(A==16) rAfm = 0.92*Re;
//else if(A==12) rAfm = 0.80*Re;
//else rAfm = 1.16*(Re-1.16/Re); // For other nuclei
//G4double stepB = 2.5*rAfm*f2Gm1/(Npb-1); // in GeV^-1, step of integral
G4double stepB = (Re+Re+2.7)*f2Gm1/(Npb-1); // in GeV^-1, step of integral
G4double hTotG2 = shNTot*mb2G2; // sigma_hN in GeV^-2
G4double ReSum = 0.; // Integration of RePart of Amp
G4double ImSum = 0.; // Integration of ImPart of Amp
G4double ValB = -stepB;
for(G4int i=0; i<Npb; i++)
for(G4int i=0; i<Npb; i++) // First integration over b
{
ValB += stepB; // An incident parameter
G4double ValB2 = ValB*ValB; // A working value
G4double IPH = ValB/shNSl; // A working value
G4double ValB2 = ValB*ValB; // A working value b^2
G4double IPH = ValB/shNSl; // A working value slope
G4double Integ = 0.; // Integral over ImpactParam.
G4double ValS = 0.; // Prototype of ImpactParameter
for(G4int j=1; j<Npb; j++)
for(G4int j=1; j<Npb; j++) // Second integration over b
{
ValS += stepB; // back to fm // Impact parameter GeV^-1
if(!i) Tb[j] = CHIPS_Tb(A,ValS/f2Gm1)/f22G2; // GeV^2, calculate only once
//if(!i) Tb[j] = Thickness(A,ValS/f2Gm1,rAfm)/f22G2; // Calculate T(b) only once
G4double FunS = IPH*ValS; // Working product
if(FunS > Lim) break; // (?)
Integ += ValS*std::exp(-(ValS*ValS+ValB2)/dHS)*QI0(FunS)*Tb[j];
G4double FunS = IPH*ValS; // b1*b2/slope
if(FunS > Lim) break; // To avoid NAN
Integ += ValS*std::exp(-(ValS*ValS+ValB2)/dHS)*QI0(FunS)*Tb[j]; // BessI0
}
G4double InExp = -hTotG2*Integ*stepB/dHS; // Working product
G4double expB = std::exp(InExp); // Workung sqrt
G4double InExp = -hTotG2*Integ*stepB/dHS; // Integrated absorption
G4double expB = std::exp(InExp); // Exponential absorption
G4double HRIE = shNReIm*InExp; // Phase shift
G4double J0qb = QJ0(std::sqrt(Q2)*ValB)*ValB;
G4double J0qb = QJ0(std::sqrt(Q2)*ValB)*ValB; // Bessel0(Q*b)
ReSum += J0qb*(1.-expB*std::cos(HRIE));
ImSum += J0qb*expB*std::sin(HRIE);
}
//G4cout<<"CHPS:RS="<<ReSum<<",IS="<<ImSum<<",CM="<<CMMom<<",st="<<stepB<<G4endl;
//return (ReSum*ReSum+ImSum*ImSum)*mb2G2*CMMom*CMMom*stepB*stepB/twopi;
return (ReSum*ReSum+ImSum*ImSum)*f22G2*CMMom*CMMom*stepB*stepB/twopi;
}
//return (ReSum*ReSum+ImSum*ImSum)*f22G2*CMMom*CMMom*stepB*stepB/twopi; // ds/do
return (ReSum*ReSum+ImSum*ImSum)*f22G2*stepB*stepB/12; // ds/dt
}
// Separate quasielastic calculation
G4double CHIPSDifQuasiElasticCS(G4int hPDG, G4double hMom, G4int A, G4int Z, G4double aQ2)
{// =================================================================================
static const G4int Npb = 500; // A#of intergation points
//static const G4double mN = .9315; // Atomic Unit GeV
static const G4double mN = .938; // Mass of proton GeV
static const G4double hc2 = .3893793; // Transform from GeV^-2 to mb
static const G4double mb2G2 = 1./hc2; // Transform from mb to GeV^-2
//static const G4double mb2G2 = 2.568; // Transform from mb to GeV^-2
static const G4double f22mb = 10; // Transform from fermi^2 to mb
static const G4double f22G2 = f22mb*mb2G2; // Transform from fm2 to GeV^-2
static const G4double f2Gm1 = std::sqrt(f22G2); // Transform from fm to GeV^-1
hMom = hMom/1000.; // Momentum (GeV, inputParam)
G4double MassH = G4QPDGCode(hPDG).GetMass()/1000.; // Hadron Mass in GeV
G4double MassH2 = MassH*MassH; // Squared mass of the hadron
G4double hEnergy = std::sqrt(hMom*hMom+MassH2); // Tot energy in GeV
G4double p = hMom/1000.; // Momentum (GeV, inputParam)
G4double p2 = p*p;
G4double Q2 = aQ2/1000000.; // -t in GeV
G4double MassN = mN; // A*AtomicUnit(GeV)[prototype]
//if(G4NucleiPropertiesTable::IsInTable(Z,A))
// MassN=G4NucleiProperties::GetNuclearMass(A,Z)/A/1000.; // Geant4 NuclearMass/A
G4double MassN2 = MassN*MassN; // Squared mass of the target
G4double S = (MassN+MassN)*hEnergy+MassN2+MassH2;// Mondelstam s
// @@ Temporary only for nucleons
G4double shNTot = 5.2+5.2*std::log(hEnergy)+51*std::pow(hEnergy,-.35); // SighN in mb
G4double shNSl = 6.44+.88*std::log(S); // B-slope in GeV^-2
G4double shNReIm = .13*std::log(S/350)*std::pow(S,-.18); // Re/Im_hN in no unit
G4double p3 = p2*p;
G4double p4 = p2*p2;
G4double sp = std::sqrt(p);
G4double p2s = p2*sp;
G4double ap = std::log(p);
G4double dl = ap-3.;
G4double dl2 = dl*dl;
G4double shPPTot = 2.91/(p2s+.0024)+5.+(32.+.3*dl2+23./p)/(1.+1.3/p4); // SigPP in mb
G4double shPNTot = 12./(p2s+.05*p+.0001/std::sqrt(sp))+.35/p
+(38.+.3*dl2+8./p)/(1.+1.2/p3); // SigPP in mb
G4double shNTot = (Z*shPPTot+(A-Z)*shPNTot)/A; // SighN in mb
G4double shPPSl = 8.*std::pow(p,.055)/(1.+3.64/p4); // PPslope in GeV^-2
G4double shPNSl = (7.2+4.32/(p4*p4+.012*p3))/(1.+2.5/p4); // PNslope in GeV^-2
G4double shNSl = (Z*shPPSl+(A-Z)*shPNSl)/A; // B-slope in GeV^-2
G4double shNReIm = -.55+ap*(.12+ap*.0045); // Re/Im_hN in no unit
// @@ End of temporary ^^^^^^^
G4double Re = std::pow(A,.33333333); // A-dep coefficient
G4double stepB = (Re+Re+2.7)*f2Gm1/(Npb-1); // in GeV^-1, step of integral
@@ -1008,10 +1049,10 @@ int main()
//// He Be C O Al Ti Ni Cu Sn Ta Pb U
//const G4int A[na]={4,9,12,16,27,48,58,64,120,181,207,238}; // A's of target nuclei
// He Al Pb
const G4int A[na]={208}; // A's of target nuclei
const G4int A[na]={119}; // A's of target nuclei
// p n pi+ pi- K+ K- antip
const G4int pdg[np]={2212,2112,211,-211,321,-321,-2212}; // projectiles
const G4double mom[nm]={1090.}; // momentum in MeV/c
const G4double mom[nm]={120.}; // momentum in MeV/c
#ifdef integrc
for(G4int ip=0; ip<np; ip++)
{
@@ -1048,7 +1089,7 @@ int main()
//// He Be C O Al Ti Ni Cu Sn Ta Pb U
//const G4int Z[na]={2,4, 6, 8,13,22,28,29, 50, 73, 82, 92}; // Z's of target nuclei
// He Al Pb
const G4int Z[na]={82}; // Z's of target nuclei
const G4int Z[na]={50}; // Z's of target nuclei
// Test of differential ellastic cross sections
Initialize();
//for(G4int ip=0; ip<np; ip++)
@@ -1065,7 +1106,7 @@ int main()
for(G4int it=0; it<nt; it++)
{
G4double Sig1 = CHIPSDiffElCS(PDG, mom[im], Z[ia], A[ia], t[it]);
//G4double Sig1 = DiffElasticCS(PDG, mom[im], A[ia], t[it]);
//G4double Sig1 = DiffElasticCS(PDG, mom[im], A[ia], t[it]); //Doesn't work
G4double Sig2 = CoherentDifElasticCS(PDG, mom[im], A[ia], t[it]);
G4double Sig3 = CHIPSDifElasticCS(PDG, mom[im], A[ia], Z[ia], t[it]);
G4double CQEl = CHIPSDifQuasiElasticCS(PDG, mom[im], A[ia], Z[ia], t[it]);
@@ -0,0 +1,354 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//#define debug
//#define pdebug
//#include "G4UIterminal.hh"
#include "G4ios.hh"
#include "G4QEnvironment.hh"
int main()
{
//G4double theEnergyLossPerFermi = 1.*GeV;
G4int nop = 152; // clusters (A<6)
G4double fractionOfSingleQuasiFreeNucleons = 0.5; // It is A-dependent (C=.85, U=.40)
G4double fractionOfPairedQuasiFreeNucleons = 0.05;
G4double clusteringCoefficient = 5.;
G4double temperature = 180.;
G4double halfTheStrangenessOfSee = 0.3; // = s/d = s/u
G4double etaToEtaPrime = 0.3;
G4double fusionToExchange = 100.;
//G4double theInnerCoreDensityCut = 50.;
#ifdef debug
G4cout<<"G4MulFragTst: nop="<<nop<<",fN="<<fractionOfSingleQuasiFreeNucleons
<<",fD="<<fractionOfPairedQuasiFreeNucleons<<",wC="<<clusteringCoefficient
<<",vn="<<fusionToExchange<<",T="<<temperature
<<",ss="<<halfTheStrangenessOfSee<<",se="<<etaToEtaPrime<<G4endl;
#endif
//-------- Initialize CHIPS
G4QCHIPSWorld* theW=G4QCHIPSWorld::Get();
theW->GetParticles(nop); // Create CHIPS World of nop particles
G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons,
fractionOfPairedQuasiFreeNucleons,
clusteringCoefficient,
fusionToExchange);
G4Quasmon::SetParameters(temperature, halfTheStrangenessOfSee, etaToEtaPrime);
G4int tPDG = 90006005; // PDG of the Target Nucleus
G4int nEvents= 100000;
//#ifdef debug
G4cout<<"G4MulFragTst: targetPDG="<<tPDG<<", nEv="<<nEvents<<G4endl;
//#endif
G4QHadronVector projHV;
G4int PDG1=211;
G4LorentzVector LV1(-485.221,-216.252,267.887,611.103);
//#ifdef debug
G4cout<<"G4MulFragTst: #1 projPDG="<<PDG1<<", 4M="<<LV1<<G4endl;
//#endif
G4int PDG2=-211;
G4LorentzVector LV2(-201.944,475.785,952.224,1092.41);
//#ifdef debug
G4cout<<"G4MulFragTst: #2 projPDG="<<PDG2<<", 4M="<<LV2<<G4endl;
//#endif
G4int PDG3=111;
G4LorentzVector LV3(213.293,183.683,996.566,1044.32);
//#ifdef debug
G4cout<<"G4MulFragTst: #3 projPDG="<<PDG3<<", 4M="<<LV3<<G4endl;
//#endif
//std::ifstream inFile("chipstest.in", std::ios::in);
//G4double temperature;
//G4double ssin2g;
//G4double eteps;
//G4double momb;
//G4double enb;
//G4double cP;
//G4double fN;
//G4double fD;
//G4double rM;
//G4double sA;
//G4int nop;
//G4int pPDG;
//G4int tPDG;
//G4int nEvt;
////G4int nofdecays;
////G4int decmask=0;
//inFile>>temperature>>ssin2g>>eteps>>nop>>momb>>enb>>pPDG>>tPDG>>nEvt>>fN>>fD>>cP>>rM>>sA;
//G4cout<<"CHIPStest Par's: Temp="<<temperature<<",SSs="<<ssin2g<<",P/S="<<eteps<<",nop="
// <<nop<<",p="<<momb<<",e="<<enb<<",projCode="<<pPDG<<",targCode="<<tPDG<<",nEv="
// <<nEvt<<",fN="<<fN<<",fD="<<fD<<",cP="<<cP<<",rM="<<rM<<",sA="<<sA<<G4endl;
//-------- Initialize CHIPS
//G4QCHIPSWorld* theW=G4QCHIPSWorld::Get();
//theW->GetParticles(nop); // Create CHIPS World of nop particles
//G4Exception("***CHIPStest: TMP");
//G4QNucleus::SetParameters(fN,fD,cP,rM);
//G4Quasmon::SetParameters(temperature,ssin2g,eteps);
//G4QEnvironment::SetParameters(sA); // SolAngle (pbar-A secondary capture)
//-------- write results onto a file --------
//std::ofstream outFile( "chipstest.out", std::ios::out);
//outFile.setf( std::ios::scientific, std::ios::floatfield );
//--------- Example how to write in the outFile -----------
//outFile << " " << endl;
// *********** Now momb is a momentum of the incident particle *************
//G4double mp=G4QPDGCode(pPDG).GetMass(); // @@ just for the check
//G4QContent pQC=G4QPDGCode(pPDG).GetQuarkContent();
//G4int cp=pQC.GetCharge();
//G4int bnp=pQC.GetBaryonNumber();
//G4double mp1=G4QPDGCode(PDG1).GetMass(); // @@ just for the check
G4QContent pQC1=G4QPDGCode(PDG1).GetQuarkContent();
G4int cp1=pQC1.GetCharge();
G4int bnp1=pQC1.GetBaryonNumber();
//G4double mp2=G4QPDGCode(PDG2).GetMass(); // @@ just for the check
G4QContent pQC2=G4QPDGCode(PDG2).GetQuarkContent();
G4int cp2=pQC2.GetCharge();
G4int bnp2=pQC2.GetBaryonNumber();
//G4double mp3=G4QPDGCode(PDG3).GetMass(); // @@ just for the check
G4QContent pQC3=G4QPDGCode(PDG3).GetQuarkContent();
G4int cp3=pQC3.GetCharge();
G4int bnp3=pQC3.GetBaryonNumber();
//momb=momb;
//G4double ep=sqrt(mp*mp+momb*momb); // @@ just for the check
//if(enb>0.) ep=enb;
G4double mt=G4QPDGCode(tPDG).GetMass(); // @@ just for the check
G4QContent tQC=G4QPDGCode(tPDG).GetQuarkContent();
G4int ct=tQC.GetCharge();
G4int bnt=tQC.GetBaryonNumber();
G4int totC=cp1+cp2+cp3+ct;
G4int totBN=bnp1+bnp2+bnp3+bnt;
G4LorentzVector preSumLV(0.,0.,0.,mt);
preSumLV+=LV1+LV2+LV3;
G4double fEvt=nEvents;
G4double sumE=0.;
G4double sumK=0.;
G4double sumG=0.;
G4double sumT=0.;
G4double sumN=0.;
G4double sum0=0.;
G4double sumP=0.;
G4double sum1N=0.;
G4double sumNN=0.;
G4double sumPP=0.;
G4double sumAL=0.;
G4double time=clock()/CLOCKS_PER_SEC;
// Main LOOP over events ======================================
for (G4int ir=0; ir<nEvents; ir++)
{
// Randomization loop: cycle random generator, using 2 lower digits in nEvents
G4int iRandCount = nEvents%100;
G4double vRandCount = 0.;
while (iRandCount>0)
{
vRandCount = G4UniformRand();
iRandCount--;
}
if(!(ir%1000) && ir) G4cout<<"G4MultFragTst: "<<ir<<" events are simulated"<<G4endl;
//G4cout<<"G4MultFragTst: "<<ir<<" events are simulated"<<G4endl;
G4LorentzVector totSum = preSumLV;
G4QHadron* H1 = new G4QHadron(PDG1,LV1);
G4QHadron* H2 = new G4QHadron(PDG2,LV2);
G4QHadron* H3 = new G4QHadron(PDG3,LV3);
G4int totCharge = totC;
G4int totBaryN = totBN;
G4QHadronVector projHV;
projHV.push_back(H1); // DESTROYED over 3 line
projHV.push_back(H2); // DESTROYED over 2 line
projHV.push_back(H3); // DESTROYED over 1 line
G4QEnvironment* pan= new G4QEnvironment(projHV,tPDG); // DELETED over 8 lines
std::for_each(projHV.begin(), projHV.end(), DeleteQHadron());
projHV.clear();
#ifdef debug
G4cout<<"CHIPStest:===>>> Now call Fragment (HadronizeQuasmon) function" << G4endl;
#endif
G4QHadronVector* output; // Prototype of the output
try
{
output = pan->Fragment();// DESTROYED in the end of the LOOP work space
}
catch (G4QException& error)
{
#ifdef pdebug
G4cout<<"***CHIPStest: Exception is catched"<<G4endl;
#endif
G4cerr<<"***CHIPStest Abort: "<<error.GetMessage()<<G4endl;
abort();
}
#ifdef debug
G4cout<<"CHIPStest:--->>>Now come out of Fragment (HadronizeQuasmon) function"<<G4endl;
#endif
delete pan; // Destruct theHadronVector (& theCandidateVector) of the Quasmon
#ifdef debug
G4cout << "CHIPStest: >>> Here the histograms are filled" << G4endl;
#endif
G4int tNH = output->size();
G4int npt=0;
G4int nGamma=0;
G4double EGamma=0;
G4int nP0=0;
G4int nPP=0;
G4int nPN=0;
G4int nKaons=0;
G4int nEta=0;
G4int nAlphas=0;
G4int nPhotons=0;
G4int nProtons=0;
G4int nNeutrons=0;
G4int nSpNeut=0;
G4int nSpAlph=0;
G4int nOmega=0;
G4int nDec=0;
G4int dirN=0;
#ifdef pdebug
G4cout<<"----------DONE^^^^^^^************^^^^^^^^^^^:ir="<<ir<<": #ofH="<<tNH<<G4endl;
if(!(ir%100)) G4cerr<<"#"<<ir<<G4endl;
#endif
G4bool alarm=false;
G4bool rad=false;
G4bool hyp=false;
G4bool badPDG=false;
for (G4int ind=0; ind<tNH; ind++)
{
G4QHadron* curH=output->operator[](ind);
G4double m = curH->GetMass(); // Mass of the particle
G4LorentzVector lorV = curH->Get4Momentum(); // 4-momentum of the particle
if(std::fabs(m-lorV.m())>.005)
{
G4cerr<<"***CHIPStest: m="<<lorV.m()<<" # "<<m<<", d="<<lorV.m()-m<<G4endl;
alarm=true;
}
if(!(lorV.e()>=0||lorV.e()<0) || !(lorV.px()>=0||lorV.px()<0) ||
!(lorV.py()>=0||lorV.py()<0) || !(lorV.pz()>=0||lorV.pz()<0))
{
G4cerr<<"***CHIPStest: NAN in LorentzVector="<<lorV<<G4endl;
alarm=true;
}
G4int d=curH->GetNFragments(); // In how many particles this particle decayed
G4ThreeVector p = lorV.vect(); // 3-momentum of the particle
G4double e = lorV.e(); // Energy of the particle
G4int c=curH->GetPDGCode(); // PDG Code of the particle
//if(!d&&(c==90000002||c==90002000||c==92000000||c==221||c==331))
if(!d&&(c==90000002||c==90002000||c==92000000))
{
//G4cout<<"***CHIPStest:***Dibaryon or Eta*** ind="<<ind<<", PDG="<<c<<G4endl;
G4cout<<"***CHIPStest:***Dibaryon *** ind="<<ind<<", PDG="<<c<<G4endl;
alarm=true;
}
if(!d&&(c==90000003||c==90003000||c==93000000))
{
G4cout<<"***CHIPStest:***Tribaryon *** ind="<<ind<<", PDG="<<c<<G4endl;
alarm=true;
}
if(!d) npt++;
if(d) nDec+=d;
if(c==223) nOmega++;
if(c==22) nPhotons++;
if(c==311||c==321||c==-311||c==-321) nKaons++; // kaons
if(c==221) nEta++; // etas
if(c==90002002) nAlphas++; // Alphas
if(c==2212 || c==90001000) nProtons++; // Protons
if(c==90000001 || c==90001000) dirN++; // Ditrect nucleons
if(c==2112 || c==90000001) nNeutrons++; // Neutrons
if((c==2112 || c==90000001) && std::fabs(e-1005.)<3.) nSpNeut++;// Dibar-Neutrons
if(!d && c==90002002 && e-m<7.) nSpAlph++; // Special Alphas
if(c==111) nP0++; // Neutral pions
if(c==-211) nPN++; // Negative pions
if(c==211) nPP++; // Positive pions
if(c==22) nGamma++; // Gammas
if(c==22) EGamma+=e; // Energy of gammas
if(!d) totCharge-=curH->GetCharge();
if(!d) totBaryN-=curH->GetBaryonNumber();
if(!d) totSum -= lorV;
if(c>80000000 && (c<90000000 || c%1000>500 || c%1000000>500000) ||
!(c>=0 || c<0))
{
G4cout<<"***OUTPUT ERROR*** CHIPStest: bad PDG is found. It is "<<c<<G4endl;
badPDG=true;
}
rad=rad||c==90002000||c==90003000||c==90004000||c==90000002||c==90000003||c==90000004
||c==90002003||c==90003002||c==90004002||c==90002005||c==90005002||c==90004004
||c==90006002;
hyp = hyp || c>90999999;
#ifdef pdebug
G4cout<<"#"<<ind<<"(d="<<d<<"), PDG="<<c<<",4M="<<lorV<<m<<",T="<<lorV.e()-m<<G4endl;
#endif
}
#ifdef pdebug
G4cout<<"CHECK: 4M="<<totSum<<", Charge="<<totCharge<<", BaryN="<<totBaryN<<G4endl;
#endif
G4double ss=std::fabs(totSum.t())+std::fabs(totSum.x())+std::fabs(totSum.y())+std::fabs(totSum.z());
if (totCharge ||totBaryN || !(ss<.01) || alarm || nGamma&&!EGamma || badPDG)
//if (totCharge || ss>.01 || alarm || nSpNeut)
//if (totCharge || ss>.01 || alarm || nSpAlph)
{
G4cerr<<"***CHIPStest:#"<<ir<<":n="<<tNH<<",4M="<<totSum<<",Charge="<<totCharge
<<",BaryN="<<totBaryN<<G4endl;
if(nGamma&&!EGamma)G4cerr<<"***CHIPStest: Egamma=0"<<G4endl;
totSum = preSumLV;
for (int indx=0; indx<tNH; indx++)
{
G4QHadron* curH=output->operator[](indx);
G4double m = curH->GetMass();
G4LorentzVector lorV = curH->Get4Momentum();
G4int d=curH->GetNFragments();
G4int c=curH->GetPDGCode();
if(!d) totSum -= lorV;
G4cerr<<"#"<<indx<<"("<<d<<"), PDG="<<c<<", m/LV="<<m<<lorV<<", T="<<lorV.e()-m
<<", d4M="<<totSum<<G4endl;
}
G4Exception("***CHIPStest: ALARM or charge/energy/momentum is not conserved");
}
sum0+=nP0;
sumP+=nPP;
sumN+=nPN;
G4int nPions=nP0+nPP+nPN;
sumG+=nGamma;
sumT+=EGamma;
if(nAlphas)sumAL++;
if(nProtons)sumPP++;
if(nNeutrons)sumNN++;
if(nNeutrons&&!nProtons&&!nAlphas) sum1N++;
if(nKaons)sumK++;
if(nEta)sumE++;
if (nPhotons) nPions=11;
if (nKaons==2&&npt==2) nPions=1;
else if (nKaons) nPions=10;
//histPi.fill(nPions);
//histNeut.fill(nNeutrons);
std::for_each(output->begin(), output->end(), DeleteQHadron());
output->clear();
delete output;
}
time=(clock()/CLOCKS_PER_SEC-time)/fEvt;
G4cerr<<"CHIPStest::t="<<time<<",Yields:pi-="<<sumN/fEvt<<",pi+="<<sumP/fEvt<<",pi0="
<<sum0/fEvt<<",K="<<sumK/fEvt<<",eta="<<sumE/fEvt<<",gamma="<<sumG/fEvt<<"(<E>="
<<sumT/sumG<<"),n="<<sumNN/fEvt<<",p="<<sumPP/fEvt<<",alpha="<<sumAL/fEvt
<<",onlyN="<<sum1N/fEvt<<G4endl;
return EXIT_SUCCESS;
}
@@ -0,0 +1,290 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// G4 Tools program: NuE DIS (x,Q2) approximation is integrated over x
// .....................................................
// Created: M.V. Kossov, CERN/ITEP(Moscow), 30-Sept-05
//
//=====================================================================
#include "globals.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include "G4ios.hh"
#include <CLHEP/GenericFunctions/LogGamma.hh>
void strucf(int A, double x, double Q2, double& f2, double& xf3, double& fL)
{
//const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN2=MN*MN; // M_N^2 in GeV^2
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double Wt=MN+mpi; // Delta threshold
//const double W2t=Wt*Wt; // Squared Delta threshold
const Genfun::LogGamma lGam;
static int mA=0;
static double mQ2=0., mN, mD, mDel, mU2, mU3, mV;
//static double mUU;
double N=3., D=0., Del=0., U2=0., U3=0., V=0.;
//double UU=0.;
if(A==mA && Q2==mQ2) // Associative memory for acceleration
{
N =mN;
D =mD;
Del=mDel;
U2 =mU2;
U3 =mU3;
//UU =mUU;
V =mV;
}
else
{
//double r=0.;
double min=.077; // Delta(0)
double max=.47; // Hard Pomeron
//double H=1.22;
if(Q2<=0.) G4cout<<"strucf: Q2="<<Q2<<" <= 0"<< G4endl;
double Q=std::sqrt(Q2);
//if(A==1) // Proton
//{
// r=std::sqrt(Q2/1.66);
// max=.5;
//}
//else if(A<13) // Light nuclei
//{
// double f=Q2/4.62;
// r=f*f;
// max=.3;
// if(A>2) H=1.;
//}
//else if(A>0) // Heavy nuclei
//{
// double f=Q2/3.4;
// double ff=f*f;
// r=ff*ff;
// max=.5;
// H=1.;
//}
//else G4cout<<"strucf: A="<<A<<" <= 0"<< G4endl;
//
N=3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
Del=min+(max-min)/(1.+5./Q);
D=0.68*std::pow(1.+.145/Q2,-1.-Del); // 0.68=1-0.34, m2=.145 GeV2
V=3*(1.-D)*(N-1.);
double c3=.75; // 3*0.25
double uu=std::exp(lGam(N-Del)-lGam(N-1.)-lGam(1.-Del))/N;
U2=(c3+N-3.)*uu;
U3=c3*uu;
mA = A;
mQ2 = Q2;
mN = N;
mD = D;
mDel=Del;
mU2 =U2;
mU3 =U3;
//mUU =UU; // @@
mV =V;
}
// From here the Q2 coefficients are used
double x1=std::pow(1.-x,N-2.);
double pp=D*std::pow(x,-Del)*x1;
double dir=V*x*x1;
double per=U2*pp;
f2 = per + dir;
//double W2=MN2-MN2*x+Q2/x-Q2;
//if(W2<W2t)
//{
// per=UU*pp;
// xf3= per+dir;
//}
//else
xf3= U3*pp+dir;
fL = per/5.; // 20%
return;
}
void getFun(int A, double lx, double Q2, double* f)
{
double f2=0., xf3=0., fL=0.;
if (lx>0.5) G4cerr<<"***getFun: ln(x)="<<lx<<">.5"<<G4endl;
double x=std::exp(lx);
double x2=x*x;
strucf(A, x, Q2, f2, xf3, fL);
f[0]=f2; // direct part
f[1]=(-f2+xf3)/x; // *y (neutrino) part
f[2]=(-f2-xf3)/x; // *y (anti-neutrino) part
f[3]=(f2-fL-xf3)/x2; // *y2 (neutrino) part
f[4]=(f2-fL+xf3)/x2; // *y2 (anti-neutrino) part
}
int main()
{
const double reps=.001; // relative accuracy of the total Q2 integral calculation
const double xeps=.0001; // relative accuracy of the total X integral calculation
// =========
const double GF=1.16637e-5; // Fermi constant in GeV^-2
const double GF2=GF*GF; // Squared Fermi constant in GeV^-4
const double MW=80.425; // Mass of W-boson in GeV
const double MW2=MW*MW; // Squared mass of W-boson in GeV^2
const double MW4=MW2*MW2; // Quadro mass of W-boson in GeV^4
const double hc2=38937932300.;// (hc)^2 in GeV^2*10^-38cm2 to convert GeV^-2 to 10^-38cm2
const double pif=3.14159265*4;// 4pi
const double sik=GF2*hc2/pif; // precalculated coefficient
//const double mpi=.1349766; // pi0 meson mass in GeV
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double mpi2=mpi*mpi; // m_pi^2 in GeV^2
const double me=.00051099892; // electron mass in GeV
const double me2=me*me; // m_e^2 in GeV^2
const double hme2=me2/2; // .5*m_e^2 in GeV^2
//const double mmu=.105658369; // mu meson mass in GeV
//const double mmu2=mmu*mmu; // m_mu^2 in GeV^2
//const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
//const double mtau=1.777; // tau meson mass in GeV
//const double mtau2=mtau*mtau; // m_tau^2 in GeV^2
//const double hmtau2=mtau2/2; // .5*m_e^2 in GeV^2
const double mp=.93827203; // proton mass in GeV
const double mn=.93956536; // neutron mass in GeV
//const double md=1.87561282; // deuteron mass in GeV
//const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
const double MN=(mn+mp)/2; // Nucleon mass (mean free) in GeV
const double MD=1.232; // proton mass in GeV
//const double mp2=mp*mp; // m_p^2 in GeV^2
const double MN2=MN*MN; // M_N^2 in GeV^2
const double dMN=MN+MN; // 2*M_N in GeV
const double dMN2=MN2+MN2; // 2*M_N^2 in GeV^2
const double fMN2=dMN2+dMN2; // 4*M_N^2 in GeV^2
const double EminE=me+me2/dMN;// Threshold for muon production
//const double EminMu=mmu+mmu2/dMN; // Threshold for muon production
//const double EminTau=mmu+mmu2/dMN; // Threshold for muon production
//
//const double mc=.3; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mc=std::sqrt((MN*MN+MD*MD)/2)-MN; // Squared mean between N and \Delta
//const double mc=mpi; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mcV=(dMN+mc)*mc; // constant of W>M+mc cut for Quasi-Elastic
//std::ofstream fileNuMuX("NuMuXQ2.out", std::ios::out);
//fileNuMuX.setf( std::ios::scientific, std::ios::floatfield );
// _____ Begin of Test Area
//Genfun::LogGamma logGamma;
//double n=4.9;
//double g=exp(logGamma(n));
//G4cout<<"Gamma("<<n<<") = "<<g<<G4endl;
// ^^^^^ End of Test Area
//
double f[5]; // A working array
int A=12; // Neucleus for which calculations should be done
double lEnuMin=0; // LogLog of Minimum energy of neutrino
double lEnuMax=std::log(1.+std::log(300./EminE)); // LogLog of MaximumEnergy of neutrino
int nE=49; // Number of points
double dlE=(lEnuMax-lEnuMin)/nE;
lEnuMin+=dlE/10;
lEnuMax+=dlE/5;
G4cout<<"Emin="<<EminE<<",lEi="<<lEnuMin<<",lEa="<<lEnuMax<<",dlE="<<dlE<<G4endl;
for(double lEnu=lEnuMin; lEnu<lEnuMax; lEnu+=dlE)
{
double Enu=std::exp(std::exp(lEnu)-1.)*EminE; // Energy of neutrino/anti-neutrino
double dEnu=Enu+Enu; // doubled energy of nu/anu
double Enu2=Enu*Enu; // squared energy of nu/anu
double Ee=Enu-me; // Free Energy of neutrino/anti-neutrino
double Ee2=Ee*Ee; // squared energy of nu/anu
double ME=Enu*MN; // M*E
double dME=ME+ME; // 2*M*E
double DIStsig=1.; // Total curent DIS cross-section to be integrated
double DISmsig=1.e20; // Total remembered DIS cross-section
double dEMN=(dEnu+MN)*ME;
double MEm=ME-hme2;
double sqE=Enu*std::sqrt(MEm*MEm-me2*MN2);
double E2M=MN*Enu2-(Enu+MN)*hme2;
double ymax=(E2M+sqE)/dEMN;
double ymin=(E2M-sqE)/dEMN;
double rmin=1.-ymin;
double rhm2E=hme2/Enu2;
double Q2min=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E));
double Q2max=dME*ymax;
int nQ2=8;
//G4cout<<"*** E="<<Enu<<", Q2i="<<Q2min<<" < Q2a="<<Q2max<<", yi="<<ymin<<" < ya="
// <<ymax<<G4endl;
while(std::fabs(DIStsig-DISmsig)/DIStsig>reps)
{
DISmsig=DIStsig;
DIStsig=0.;
nQ2*=2;
double dQ2=(Q2max-Q2min)/nQ2;
for(double Q2=Q2min+dQ2/2; Q2<Q2max; Q2+=dQ2)
{
double DISxint=1.; // Curent DIS x-integral
double DISmint=1.e20; // Remembered DIS x-integral
double Q2M=Q2+MW2;
double dik=MW4/Q2M/Q2M;
double qmc=Q2+mcV;
double lXQES=std::log((std::sqrt(qmc*qmc+Q2*fMN2)-qmc)/dMN2);//QuasielasticBoundary
//double lXQES=log(Q2/(Q2+mcV)); // Quasielastic boundary (W=MN+m_c)
//double xN=Q2/dME;
double xN=Q2/MN/(Ee+std::sqrt(Ee2+Q2));
//double lXmin=log(xN/ymax);
double lXmin=std::log(xN);
// ****** QE ********
if(lXQES>lXmin) lXmin=lXQES; // A cut which leaves only QES >>>>>>>>>>>>>>>>
// *** End of QE^^^^^
double lXmax=0.; // QES is in DIS
//double lXmax=lXQES; // Cut off quasielastic
int nX=8;
while(std::fabs(DISxint-DISmint)/DISxint>xeps)
{
DISmint=DISxint;
DISxint=0.;
nX*=2;
double dlX=(lXmax-lXmin)/nX;
for(double lX=lXmin+dlX/2; lX<lXmax; lX+=dlX)
{
getFun(A, lX, Q2, f);
// ***** Neutrino/Antineutrino switch ******>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DISxint+=f[0]+f[0]+xN*(f[1]+f[1]+xN*f[3]); // neutrino
//DISxint+=f[0]+f[0]+xN*(f[2]+f[2]+xN*f[4]); // anti-neutrino
//G4cout<<f[0]<<","<<f[1]<<","<<f[2]<<","<<f[3]<<","<<f[4]<<G4endl;
}
DISxint*=dlX;
//G4cout<<"--- E="<<Enu<<" --- Q2="<<Q2<<" --- nX="<<nX<<", iX="<<DISxint
// <<", mX="<<DISmint<<", rX="<<(DISxint-DISmint)/DISxint<<G4endl;
}
//G4cout<<"(E="<<Enu<<"), Q2="<<Q2<<", I="<<DISxint/dik/dik<<G4endl;
DIStsig+=DISxint*dik;
}
DIStsig*=dQ2;
//G4cout<<"=== E="<<Enu<<" ===> nQ="<<nQ2<<", iQ="<<DIStsig<<", mQ="<<DISmsig
// <<", rQ="<<(DIStsig-DISmsig)/DIStsig<<G4endl;
}
//===== tot/qe choice ====
DIStsig*=sik/Enu;
//G4cout<<"***total-neutrino*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
//G4cout<<"***total-antineutrino*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
G4cout<<"***quasiel-nu*** E="<<Enu<<" ,sig/E="<<DIStsig*Enu<<G4endl;
//G4cout<<"***quasiel-antinu*** E="<<Enu<<" ,sig/E="<<DIStsig*Enu<<G4endl;
//...................
//DIStsig*=sik;
//G4cout<<"***qelas*** E="<<Enu<<",sig="<<DIStsig<<G4endl;
//===== End of the choice
} // End of the Enery LOOP
return EXIT_SUCCESS;
}
@@ -0,0 +1,294 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// G4 Tools program: NuEl DIS (x,Q2) approximation is integrated over x & Q2
// .....................................................[ for a <nucleon> ]
// Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Oct-07
//
//=====================================================================
#include "globals.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include "G4ios.hh"
#include <CLHEP/GenericFunctions/LogGamma.hh>
void strucf(int A, double x, double Q2, double& f2, double& xf3, double& fL)
{
//const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN2=MN*MN; // M_N^2 in GeV^2
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double Wt=MN+mpi; // Delta threshold
//const double W2t=Wt*Wt; // Squared Delta threshold
const Genfun::LogGamma lGam;
static int mA=0;
static double mQ2=0., mN, mD, mDel, mU2, mU3, mV;
//static double mUU;
double N=3., D=0., Del=0., U2=0., U3=0., V=0.;
//double UU=0.;
if(A==mA && Q2==mQ2) // Associative memory for acceleration
{
N =mN;
D =mD;
Del=mDel;
U2 =mU2;
U3 =mU3;
//UU =mUU;
V =mV;
}
else
{
double Q=std::sqrt(Q2);
N=3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
Del=.077+.393/(1.+5./Q);
D=.68*std::pow(1.+.145/Q2,-1.-Del);
V=3*(N-1.);
double c3=.75;
double uu=std::exp(lGam(N-Del)-lGam(N-1.)-lGam(1.-Del))/N;
U2=(c3+N-3.)*uu;
U3=c3*uu;
//UU=uu+uu+uu; // @@
mA = A;
mQ2 = Q2;
mN = N;
mD = D;
mDel=Del;
mU2 =U2;
mU3 =U3;
//mUU =UU; // @@
mV =V;
}
// From here the Q2 coefficients are used
double x1=std::pow(1.-x,N-2.);
double pp=D*std::pow(x,-Del)*x1;
double dir=(1-D)*V*x*x1;
double per=U2*pp;
f2 = per + dir;
//double W2=MN2-MN2*x+Q2/x-Q2;
//if(W2<W2t)
//{
// per=UU*pp;
// xf3= per+dir;
//}
//else
xf3= U3*pp+dir;
fL = per/5.;
return;
}
void getFun(int A, double lx, double Q2, double* f)
{
const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
const double MN2=MN*MN; // Squared Nucleon mass (inside nucleus, atomic mass unit, GeV)
double f2=0., xf3=0., fL=0.;
if (lx>0.5) G4cerr<<"***getFun: ln(x)="<<lx<<">.5"<<G4endl;
double x=std::exp(lx);
double x2=x*x;
double c=0.;
if(Q2>.0001) c=x2*MN2/Q2;
double c2=1+c+c; // Q^2/nu^2 correction
strucf(A, x, Q2, f2, xf3, fL);
f[0]=f2; // direct part
f[1]=(-f2+xf3)/x; // *y (neutrino) part
f[2]=(-f2-xf3)/x; // *y (anti-neutrino) part
f[3]=(f2*c2-fL-xf3)/x2; // *y2 (neutrino) part
f[4]=(f2*c2-fL+xf3)/x2; // *y2 (anti-neutrino) part
}
int main()
{
const double reps=.001; // relative accuracy of the total Q2 integral calculation
const double xeps=.0001; // relative accuracy of the total X integral calculation
// =========
const double GF=1.16637e-5; // Fermi constant in GeV^-2
const double GF2=GF*GF; // Squared Fermi constant in GeV^-4
const double MW=80.425; // Mass of W-boson in GeV
const double MW2=MW*MW; // Squared mass of W-boson in GeV^2
const double MW4=MW2*MW2; // Quadro mass of W-boson in GeV^4
const double hc2=38937932300.;// (hc)^2 in GeV^2*10^-38cm2 to convert GeV^-2 to 10^-38cm2
const double pif=3.14159265*4;// 4pi
const double sik=GF2*hc2/pif; // precalculated coefficient
//const double mpi=.1349766; // pi0 meson mass in GeV
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double mpi2=mpi*mpi; // m_pi^2 in GeV^2
const double me=.00051099892; // electron mass in GeV
const double me2=me*me; // m_e^2 in GeV^2
const double hme2=me2/2; // .5*m_e^2 in GeV^2
//const double mmu=.105658369; // mu meson mass in GeV
//const double mmu2=mmu*mmu; // m_mu^2 in GeV^2
//const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
//const double mtau=1.777; // tau meson mass in GeV
//const double mtau2=mtau*mtau; // m_tau^2 in GeV^2
//const double hmtau2=mtau2/2; // .5*m_e^2 in GeV^2
//const double mp=.93827203; // proton mass in GeV
//const double mn=.93956536; // neutron mass in GeV
//const double md=1.87561282; // deuteron mass in GeV
const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN=(mn+mp)/2; // Nucleon mass (mean free) in GeV
//const double MD=1.232; // proton mass in GeV
//const double mp2=mp*mp; // m_p^2 in GeV^2
const double MN2=MN*MN; // M_N^2 in GeV^2
const double dMN=MN+MN; // 2*M_N in GeV
const double dMN2=MN2+MN2; // 2*M_N^2 in GeV^2
const double fMN2=dMN2+dMN2; // 4*M_N^2 in GeV^2
const double EminE=me+me2/dMN;// Threshold for muon production
//const double EminMu=mmu+mmu2/dMN; // Threshold for muon production
//const double EminTau=mmu+mmu2/dMN; // Threshold for muon production
//
const double mc=.261; // parameter of W2>(M_N^2+M_D^2)/2 cut for QuasiEl/Delta
//const double mc=mpi; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mcV=(dMN+mc)*mc; // constant of W>M+mc cut for Quasi-Elastic
//std::ofstream fileNuMuX("NuMuXQ2.out", std::ios::out);
//fileNuMuX.setf( std::ios::scientific, std::ios::floatfield );
// _____ Begin of Test Area
//Genfun::LogGamma logGamma;
//double n=4.9;
//double g=exp(logGamma(n));
//G4cout<<"Gamma("<<n<<") = "<<g<<G4endl;
// ^^^^^ End of Test Area
//
double f[5]; // A working array
int A=12; // Neucleus for which calculations should be done
double lEnuMin=0; // LogLog of Minimum energy of neutrino
double lEnuMax=std::log(1.+std::log(300./EminE)); // LogLog of MaximumEnergy of neutrino
//double lEnuMax=std::log(1.+std::log(300./EminMu));// LogLog of MaximumEnergy of neutrino
int nE=63;
double dlE=(lEnuMax-lEnuMin)/nE;
lEnuMin+=dlE/10;
lEnuMax+=dlE/5;
G4cout<<"Emin="<<EminE<<",lEi="<<lEnuMin<<",lEa="<<lEnuMax<<",dlE="<<dlE<<G4endl;
//G4cout<<"Emin="<<EminMu<<",lEi="<<lEnuMin<<",lEa="<<lEnuMax<<",dlE="<<dlE<<G4endl;
for(double lEnu=lEnuMin; lEnu<lEnuMax; lEnu+=dlE)
{
double Enu=std::exp(std::exp(lEnu)-1.)*EminE; // Energy of neutrino/anti-neutrino
//double Enu=std::exp(std::exp(lEnu)-1.)*EminMu; // Energy of neutrino/anti-neutrino
double dEnu=Enu+Enu; // doubled energy of nu/anu
double Enu2=Enu*Enu; // squared energy of nu/anu
double Ee=Enu-me; // Free Energy of neutrino/anti-neutrino
double Ee2=Ee*Ee; // squared energy of nu/anu
//double Emu=Enu-mmu; // Free Energy of neutrino/anti-neutrino
//double Emu2=Emu*Emu; // squared energy of nu/anu
double ME=Enu*MN; // M*E
double dME=ME+ME; // 2*M*E
double DIStsig=1.; // Total curent DIS cross-section to be integrated
double DISmsig=1.e20; // Total remembered DIS cross-section
double dEMN=(dEnu+MN)*ME;
double MEm=ME-hme2;
//double MEm=ME-hmmu2;
double sqE=Enu*std::sqrt(MEm*MEm-me2*MN2);
//double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
double E2M=MN*Enu2-(Enu+MN)*hme2;
//double E2M=MN*Enu2-(Enu+MN)*hmmu2;
double ymax=(E2M+sqE)/dEMN;
double ymin=(E2M-sqE)/dEMN;
double rmin=1.-ymin;
double rhm2E=hme2/Enu2;
//double rhm2E=hmmu2/Enu2;
double Q2min=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E));
double Q2max=dME*ymax;
int nQ2=8;
//G4cout<<"*** E="<<Enu<<", Q2i="<<Q2min<<" < Q2a="<<Q2max<<", yi="<<ymin<<" < ya="
// <<ymax<<G4endl;
while(std::fabs(DIStsig-DISmsig)/DIStsig>reps)
{
DISmsig=DIStsig;
DIStsig=0.;
nQ2*=2;
double dQ2=(Q2max-Q2min)/nQ2;
for(double Q2=Q2min+dQ2/2; Q2<Q2max; Q2+=dQ2)
{
double DISxint=1.; // Curent DIS x-integral
double DISmint=1.e20; // Remembered DIS x-integral
double Q2M=Q2+MW2;
double dik=MW4/Q2M/Q2M;
double qmc=Q2+mcV;
double lXQES=std::log((std::sqrt(qmc*qmc+Q2*fMN2)-qmc)/dMN2); // QuasielastBoundary
//double lXQES=log(Q2/(Q2+mcV)); // Quasielastic boundary (W=MN+m_c)
//double xN=Q2/dME;
double xN=Q2/MN/(Ee+std::sqrt(Ee2+Q2));
//double xN=Q2/MN/(Emu+std::sqrt(Emu2+Q2));
//double lXmin=log(xN/ymax);
double lXmin=std::log(xN);
// ****** QE ******** tot/qe
//if(lXQES>lXmin) lXmin=lXQES; // A cut which leaves only QES
// *** End of QE^^^^^
double lXmax=0.; // QES is in DIS
//double lXmax=lXQES; // Cut off quasielastic
int nX=8;
while(std::fabs(DISxint-DISmint)/DISxint>xeps)
{
DISmint=DISxint;
DISxint=0.;
nX*=2;
double dlX=(lXmax-lXmin)/nX;
for(double lX=lXmin+dlX/2; lX<lXmax; lX+=dlX)
{
getFun(A, lX, Q2, f);
DISxint+=f[0]+f[0]+xN*(f[1]+f[1]+xN*f[3]); // neutrino
//DISxint+=f[0]+f[0]+xN*(f[2]+f[2]+xN*f[4]); // anti-neutrino
//G4cout<<f[0]<<","<<f[1]<<","<<f[2]<<","<<f[3]<<","<<f[4]<<G4endl;
}
DISxint*=dlX;
//G4cout<<"--- E="<<Enu<<" --- Q2="<<Q2<<" --- nX="<<nX<<", iX="<<DISxint
// <<", mX="<<DISmint<<", rX="<<(DISxint-DISmint)/DISxint<<G4endl;
}
//G4cout<<"(E="<<Enu<<"), Q2="<<Q2<<", I="<<DISxint/dik/dik<<G4endl;
DIStsig+=DISxint*dik;
}
DIStsig*=dQ2;
//G4cout<<"=== E="<<Enu<<" ===> nQ="<<nQ2<<", iQ="<<DIStsig<<", mQ="<<DISmsig
// <<", rQ="<<(DIStsig-DISmsig)/DIStsig<<G4endl;
}
//===== tot/qe choice ====
DIStsig*=sik/Enu;
G4cout<<"***total*** E="<<Enu<<",sig/E= "<<DIStsig<<G4endl;
//...................
//DIStsig*=sik;
//G4cout<<"***qelas*** E="<<Enu<<",sig= "<<DIStsig<<G4endl;
//===== End of the choice
} // End of the Enery LOOP
// int np=0;
//for(int m=0; m<2; m++)
//{
// //fileNuMuX<<" static const G4double SH"<<n<<"[nH]={"<<G4endl<<" ";
// //G4cout<<"**** A_high="<<m<<G4endl;
// np=0;
// int nC=14;
// for(G4int en=0; en<nC; en++)
// {
// //G4double sig=1.;
// np++;
// //if(np==7) // Write by 7 number in brackets
// //{
// // if(en==nC-1) fileNuMuX<<sig<<"};"<<G4endl;
// // else fileNuMuX<<sig<<","<<G4endl<<" ";
// //}
// //else fileNuMuX<<sig<<",";
// //if(np==7) np=0;
// } // End of the point LOOP
//} // End of the isotop LOOP
return EXIT_SUCCESS;
}
@@ -61,45 +61,42 @@ void strucf(int A, double x, double Q2, double& f2, double& xf3, double& fL)
}
else
{
double r=0.;
double max=1.;
double H=1.22;
if(A==1) // Proton
{
r=std::sqrt(Q2/1.66);
max=.5;
}
else if(A<13) // Light nuclei
{
double f=Q2/4.62;
r=f*f;
max=.3;
if(A>2) H=1.;
}
else if(A>0) // Heavy nuclei
{
double f=Q2/3.4;
double ff=f*f;
r=ff*ff;
max=.5;
H=1.;
}
else G4cout<<"strucf: A="<<A<<" <= 0"<< G4endl;
//double r=0.;
double min=.077; // Delta(0)
double max=.47; // Hard Pomeron
//double H=1.22;
if(Q2<=0.) G4cout<<"strucf: Q2="<<Q2<<" <= 0"<< G4endl;
double Q=std::sqrt(Q2);
//if(A==1) // Proton
//{
// r=std::sqrt(Q2/1.66);
// max=.5;
//}
//else if(A<13) // Light nuclei
//{
// double f=Q2/4.62;
// r=f*f;
// max=.3;
// if(A>2) H=1.;
//}
//else if(A>0) // Heavy nuclei
//{
// double f=Q2/3.4;
// double ff=f*f;
// r=ff*ff;
// max=.5;
// H=1.;
//}
//else G4cout<<"strucf: A="<<A<<" <= 0"<< G4endl;
//
N=3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
Del=(1.+r)/(12.5+r/max);
double S=std::pow(1.+.6/Q2,-1.-Del);
D=H*S*(1.-.5*S);
Del=min+(max-min)/(1.+5./Q);
D=0.68*std::pow(1.+.145/Q2,-1.-Del); // 0.68=1-0.34, m2=.145 GeV2
V=3*(1.-D)*(N-1.);
double cc=Q2/.08;
double cc2=cc*cc;
//double C=(1.+cc2)/(1.+cc2/.24); // Weak?
double C=(1.+cc2)/(1.+cc2/.24)/(1.+Q2/21.6); // EM
double c3=C+C+C;
double c3=.75; // 3*0.25
double uu=std::exp(lGam(N-Del)-lGam(N-1.)-lGam(1.-Del))/N;
U2=(c3+N-3.)*uu;
U3=c3*uu;
//UU=uu+uu+uu; // @@
mA = A;
mQ2 = Q2;
mN = N;
@@ -124,7 +121,7 @@ void strucf(int A, double x, double Q2, double& f2, double& xf3, double& fL)
//}
//else
xf3= U3*pp+dir;
fL = per/4.;
fL = per/5.; // 20%
return;
}
@@ -156,7 +153,7 @@ int main()
const double pif=3.14159265*4;// 4pi
const double sik=GF2*hc2/pif; // precalculated coefficient
//const double mpi=.1349766; // pi0 meson mass in GeV
const double mpi=.13957018; // charged pi meson mass in GeV
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double mpi2=mpi*mpi; // m_pi^2 in GeV^2
//const double me=.00051099892; // electron mass in GeV
//const double me2=me*me; // m_e^2 in GeV^2
@@ -167,12 +164,12 @@ int main()
//const double mtau=1.777; // tau meson mass in GeV
//const double mtau2=mtau*mtau; // m_tau^2 in GeV^2
//const double hmtau2=mtau2/2; // .5*m_e^2 in GeV^2
//const double mp=.93827203; // proton mass in GeV
//const double mn=.93956536; // neutron mass in GeV
const double mp=.93827203; // proton mass in GeV
const double mn=.93956536; // neutron mass in GeV
//const double md=1.87561282; // deuteron mass in GeV
const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN=(mn+mp)/2; // Nucleon mass (mean free) in GeV
//const double MD=1.232; // proton mass in GeV
//const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
const double MN=(mn+mp)/2; // Nucleon mass (mean free) in GeV
const double MD=1.232; // proton mass in GeV
//const double mp2=mp*mp; // m_p^2 in GeV^2
const double MN2=MN*MN; // M_N^2 in GeV^2
const double dMN=MN+MN; // 2*M_N in GeV
@@ -183,7 +180,8 @@ int main()
//const double EminTau=mmu+mmu2/dMN; // Threshold for muon production
//
//const double mc=.3; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mc=mpi; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mc=std::sqrt((MN*MN+MD*MD)/2)-MN; // Squared mean between N and \Delta
//const double mc=mpi; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mcV=(dMN+mc)*mc; // constant of W>M+mc cut for Quasi-Elastic
//std::ofstream fileNuMuX("NuMuXQ2.out", std::ios::out);
//fileNuMuX.setf( std::ios::scientific, std::ios::floatfield );
@@ -197,8 +195,8 @@ int main()
double f[5]; // A working array
int A=12; // Neucleus for which calculations should be done
double lEnuMin=0; // LogLog of Minimum energy of neutrino
double lEnuMax=std::log(1.+std::log(300./EminMu)); // LogLog of Maximum energy of neutrino
int nE=31;
double lEnuMax=std::log(1.+std::log(300./EminMu)); // LogLog of MaximumEnergy of neutrino
int nE=49; // Number of points
double dlE=(lEnuMax-lEnuMin)/nE;
lEnuMin+=dlE/10;
lEnuMax+=dlE/5;
@@ -240,14 +238,14 @@ int main()
double Q2M=Q2+MW2;
double dik=MW4/Q2M/Q2M;
double qmc=Q2+mcV;
double lXQES=std::log((std::sqrt(qmc*qmc+Q2*fMN2)-qmc)/dMN2); // Quasielastic boundary
double lXQES=std::log((std::sqrt(qmc*qmc+Q2*fMN2)-qmc)/dMN2);//QuasielasticBoundary
//double lXQES=log(Q2/(Q2+mcV)); // Quasielastic boundary (W=MN+m_c)
//double xN=Q2/dME;
double xN=Q2/MN/(Emu+std::sqrt(Emu2+Q2));
//double lXmin=log(xN/ymax);
double lXmin=std::log(xN);
// ****** QE ********
//if(lXQES>lXmin) lXmin=lXQES; // A cut which leaves only QES
if(lXQES>lXmin) lXmin=lXQES; // A cut which leaves only QES >>>>>>>>>>>>>>>>
// *** End of QE^^^^^
double lXmax=0.; // QES is in DIS
//double lXmax=lXQES; // Cut off quasielastic
@@ -261,8 +259,9 @@ int main()
for(double lX=lXmin+dlX/2; lX<lXmax; lX+=dlX)
{
getFun(A, lX, Q2, f);
DISxint+=f[0]+f[0]+xN*(f[1]+f[1]+xN*f[3]); // neutrino
//DISxint+=f[0]+f[0]+xN*(f[2]+f[2]+xN*f[4]); // anti-neutrino
// ***** Neutrino/Antineutrino switch ******>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//DISxint+=f[0]+f[0]+xN*(f[1]+f[1]+xN*f[3]); // neutrino
DISxint+=f[0]+f[0]+xN*(f[2]+f[2]+xN*f[4]); // anti-neutrino
//G4cout<<f[0]<<","<<f[1]<<","<<f[2]<<","<<f[3]<<","<<f[4]<<G4endl;
}
DISxint*=dlX;
@@ -278,7 +277,10 @@ int main()
}
//===== tot/qe choice ====
DIStsig*=sik/Enu;
G4cout<<"***total*** E="<<Enu<<",sig/E="<<DIStsig<<G4endl;
//G4cout<<"***total-neutrino*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
G4cout<<"***total-antineutrino*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
//G4cout<<"***quasiel-nu*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
//G4cout<<"***quasiel-antinu*** E="<<Enu<<" ,sig/E="<<DIStsig<<G4endl;
//...................
//DIStsig*=sik;
//G4cout<<"***qelas*** E="<<Enu<<",sig="<<DIStsig<<G4endl;
@@ -0,0 +1,284 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// G4 Tools program: NuMu DIS (x,Q2) approximation is integrated over x & Q2
// .....................................................[ for a <nucleon> ]
// Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Oct-07
//
//=====================================================================
#include "globals.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include "G4ios.hh"
#include <CLHEP/GenericFunctions/LogGamma.hh>
void strucf(int A, double x, double Q2, double& f2, double& xf3, double& fL)
{
//const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN2=MN*MN; // M_N^2 in GeV^2
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double Wt=MN+mpi; // Delta threshold
//const double W2t=Wt*Wt; // Squared Delta threshold
const Genfun::LogGamma lGam;
static int mA=0;
static double mQ2=0., mN, mD, mDel, mU2, mU3, mV;
//static double mUU;
double N=3., D=0., Del=0., U2=0., U3=0., V=0.;
//double UU=0.;
if(A==mA && Q2==mQ2) // Associative memory for acceleration
{
N =mN;
D =mD;
Del=mDel;
U2 =mU2;
U3 =mU3;
//UU =mUU;
V =mV;
}
else
{
double Q=std::sqrt(Q2);
N=3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
Del=.077+.393/(1.+5./Q);
D=.68*std::pow(1.+.145/Q2,-1.-Del);
V=3*(N-1.);
double c3=.75;
double uu=std::exp(lGam(N-Del)-lGam(N-1.)-lGam(1.-Del))/N;
U2=(c3+N-3.)*uu;
U3=c3*uu;
//UU=uu+uu+uu; // @@
mA = A;
mQ2 = Q2;
mN = N;
mD = D;
mDel=Del;
mU2 =U2;
mU3 =U3;
//mUU =UU; // @@
mV =V;
}
// From here the Q2 coefficients are used
double x1=std::pow(1.-x,N-2.);
double pp=D*std::pow(x,-Del)*x1;
double dir=(1-D)*V*x*x1;
double per=U2*pp;
f2 = per + dir;
//double W2=MN2-MN2*x+Q2/x-Q2;
//if(W2<W2t)
//{
// per=UU*pp;
// xf3= per+dir;
//}
//else
xf3= U3*pp+dir;
fL = per/5.;
return;
}
void getFun(int A, double lx, double Q2, double* f)
{
const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
const double MN2=MN*MN; // Squared Nucleon mass (inside nucleus, atomic mass unit, GeV)
double f2=0., xf3=0., fL=0.;
if (lx>0.5) G4cerr<<"***getFun: ln(x)="<<lx<<">.5"<<G4endl;
double x=std::exp(lx);
double x2=x*x;
double c=0.;
if(Q2>.0001) c=x2*MN2/Q2;
double c2=1+c+c; // Q^2/nu^2 correction
strucf(A, x, Q2, f2, xf3, fL);
f[0]=f2; // direct part
f[1]=(-f2+xf3)/x; // *y (neutrino) part
f[2]=(-f2-xf3)/x; // *y (anti-neutrino) part
f[3]=(f2*c2-fL-xf3)/x2; // *y2 (neutrino) part
f[4]=(f2*c2-fL+xf3)/x2; // *y2 (anti-neutrino) part
}
int main()
{
const double reps=.001; // relative accuracy of the total Q2 integral calculation
const double xeps=.0001; // relative accuracy of the total X integral calculation
// =========
const double GF=1.16637e-5; // Fermi constant in GeV^-2
const double GF2=GF*GF; // Squared Fermi constant in GeV^-4
const double MW=80.425; // Mass of W-boson in GeV
const double MW2=MW*MW; // Squared mass of W-boson in GeV^2
const double MW4=MW2*MW2; // Quadro mass of W-boson in GeV^4
const double hc2=38937932300.;// (hc)^2 in GeV^2*10^-38cm2 to convert GeV^-2 to 10^-38cm2
const double pif=3.14159265*4;// 4pi
const double sik=GF2*hc2/pif; // precalculated coefficient
//const double mpi=.1349766; // pi0 meson mass in GeV
//const double mpi=.13957018; // charged pi meson mass in GeV
//const double mpi2=mpi*mpi; // m_pi^2 in GeV^2
//const double me=.00051099892; // electron mass in GeV
//const double me2=me*me; // m_e^2 in GeV^2
//const double hme2=me2/2; // .5*m_e^2 in GeV^2
const double mmu=.105658369; // mu meson mass in GeV
const double mmu2=mmu*mmu; // m_mu^2 in GeV^2
const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
//const double mtau=1.777; // tau meson mass in GeV
//const double mtau2=mtau*mtau; // m_tau^2 in GeV^2
//const double hmtau2=mtau2/2; // .5*m_e^2 in GeV^2
//const double mp=.93827203; // proton mass in GeV
//const double mn=.93956536; // neutron mass in GeV
//const double md=1.87561282; // deuteron mass in GeV
const double MN=.931494043; // Nucleon mass (inside nucleus, atomic mass unit, GeV)
//const double MN=(mn+mp)/2; // Nucleon mass (mean free) in GeV
//const double MD=1.232; // proton mass in GeV
//const double mp2=mp*mp; // m_p^2 in GeV^2
const double MN2=MN*MN; // M_N^2 in GeV^2
const double dMN=MN+MN; // 2*M_N in GeV
const double dMN2=MN2+MN2; // 2*M_N^2 in GeV^2
const double fMN2=dMN2+dMN2; // 4*M_N^2 in GeV^2
//const double EminE=me+me2/dMN;// Threshold for muon production
const double EminMu=mmu+mmu2/dMN; // Threshold for muon production
//const double EminTau=mmu+mmu2/dMN; // Threshold for muon production
//
const double mc=.261; // parameter of W2>(M_N^2+M_D^2)/2 cut for QuasiEl/Delta
//const double mc=mpi; // parameter of W>M+mc cut for Quasi-Elastic/Delta
const double mcV=(dMN+mc)*mc; // constant of W>M+mc cut for Quasi-Elastic
//std::ofstream fileNuMuX("NuMuXQ2.out", std::ios::out);
//fileNuMuX.setf( std::ios::scientific, std::ios::floatfield );
// _____ Begin of Test Area
//Genfun::LogGamma logGamma;
//double n=4.9;
//double g=exp(logGamma(n));
//G4cout<<"Gamma("<<n<<") = "<<g<<G4endl;
// ^^^^^ End of Test Area
//
double f[5]; // A working array
int A=12; // Neucleus for which calculations should be done
double lEnuMin=0; // LogLog of Minimum energy of neutrino
double lEnuMax=std::log(1.+std::log(300./EminMu)); // LogLog of MaximumEnergy of neutrino
int nE=63;
double dlE=(lEnuMax-lEnuMin)/nE;
lEnuMin+=dlE/10;
lEnuMax+=dlE/5;
G4cout<<"Emin="<<EminMu<<",lEi="<<lEnuMin<<",lEa="<<lEnuMax<<",dlE="<<dlE<<G4endl;
for(double lEnu=lEnuMin; lEnu<lEnuMax; lEnu+=dlE)
{
double Enu=std::exp(std::exp(lEnu)-1.)*EminMu; // Energy of neutrino/anti-neutrino
double dEnu=Enu+Enu; // doubled energy of nu/anu
double Enu2=Enu*Enu; // squared energy of nu/anu
double Emu=Enu-mmu; // Free Energy of neutrino/anti-neutrino
double Emu2=Emu*Emu; // squared energy of nu/anu
double ME=Enu*MN; // M*E
double dME=ME+ME; // 2*M*E
double DIStsig=1.; // Total curent DIS cross-section to be integrated
double DISmsig=1.e20; // Total remembered DIS cross-section
double dEMN=(dEnu+MN)*ME;
double MEm=ME-hmmu2;
double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
double E2M=MN*Enu2-(Enu+MN)*hmmu2;
double ymax=(E2M+sqE)/dEMN;
double ymin=(E2M-sqE)/dEMN;
double rmin=1.-ymin;
double rhm2E=hmmu2/Enu2;
double Q2min=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E));
double Q2max=dME*ymax;
int nQ2=8;
//G4cout<<"*** E="<<Enu<<", Q2i="<<Q2min<<" < Q2a="<<Q2max<<", yi="<<ymin<<" < ya="
// <<ymax<<G4endl;
while(std::fabs(DIStsig-DISmsig)/DIStsig>reps)
{
DISmsig=DIStsig;
DIStsig=0.;
nQ2*=2;
double dQ2=(Q2max-Q2min)/nQ2;
for(double Q2=Q2min+dQ2/2; Q2<Q2max; Q2+=dQ2)
{
double DISxint=1.; // Curent DIS x-integral
double DISmint=1.e20; // Remembered DIS x-integral
double Q2M=Q2+MW2;
double dik=MW4/Q2M/Q2M;
double qmc=Q2+mcV;
double lXQES=std::log((std::sqrt(qmc*qmc+Q2*fMN2)-qmc)/dMN2); // QuasielastBoundary
//double lXQES=log(Q2/(Q2+mcV)); // Quasielastic boundary (W=MN+m_c)
//double xN=Q2/dME;
double xN=Q2/MN/(Emu+std::sqrt(Emu2+Q2));
//double lXmin=log(xN/ymax);
double lXmin=std::log(xN);
// ****** QE ********
if(lXQES>lXmin) lXmin=lXQES; // A cut which leaves only QES
// *** End of QE^^^^^
double lXmax=0.; // QES is in DIS
//double lXmax=lXQES; // Cut off quasielastic
int nX=8;
while(std::fabs(DISxint-DISmint)/DISxint>xeps)
{
DISmint=DISxint;
DISxint=0.;
nX*=2;
double dlX=(lXmax-lXmin)/nX;
for(double lX=lXmin+dlX/2; lX<lXmax; lX+=dlX)
{
getFun(A, lX, Q2, f);
DISxint+=f[0]+f[0]+xN*(f[1]+f[1]+xN*f[3]); // neutrino
//DISxint+=f[0]+f[0]+xN*(f[2]+f[2]+xN*f[4]); // anti-neutrino
//G4cout<<f[0]<<","<<f[1]<<","<<f[2]<<","<<f[3]<<","<<f[4]<<G4endl;
}
DISxint*=dlX;
//G4cout<<"--- E="<<Enu<<" --- Q2="<<Q2<<" --- nX="<<nX<<", iX="<<DISxint
// <<", mX="<<DISmint<<", rX="<<(DISxint-DISmint)/DISxint<<G4endl;
}
//G4cout<<"(E="<<Enu<<"), Q2="<<Q2<<", I="<<DISxint/dik/dik<<G4endl;
DIStsig+=DISxint*dik;
}
DIStsig*=dQ2;
//G4cout<<"=== E="<<Enu<<" ===> nQ="<<nQ2<<", iQ="<<DIStsig<<", mQ="<<DISmsig
// <<", rQ="<<(DIStsig-DISmsig)/DIStsig<<G4endl;
}
//===== tot/qe choice ====
//DIStsig*=sik/Enu;
//G4cout<<"***total*** E="<<Enu<<",sig/E= "<<DIStsig<<G4endl;
//...................
DIStsig*=sik;
G4cout<<"***qelas*** E="<<Enu<<",sig= "<<DIStsig<<G4endl;
//===== End of the choice
} // End of the Enery LOOP
// int np=0;
//for(int m=0; m<2; m++)
//{
// //fileNuMuX<<" static const G4double SH"<<n<<"[nH]={"<<G4endl<<" ";
// //G4cout<<"**** A_high="<<m<<G4endl;
// np=0;
// int nC=14;
// for(G4int en=0; en<nC; en++)
// {
// //G4double sig=1.;
// np++;
// //if(np==7) // Write by 7 number in brackets
// //{
// // if(en==nC-1) fileNuMuX<<sig<<"};"<<G4endl;
// // else fileNuMuX<<sig<<","<<G4endl<<" ";
// //}
// //else fileNuMuX<<sig<<",";
// //if(np==7) np=0;
// } // End of the point LOOP
//} // End of the isotop LOOP
return EXIT_SUCCESS;
}
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
//
// G4 Tools program: NuMu DIS(Q2) fixed step integration
// .....................................................
// Created: M.V. Kossov, CERN/ITEP(Moscow), 20-Dec-2005
//
//=====================================================================
#include "globals.hh"
#include <iostream>
#include <fstream>
#include <vector>
#include "G4ios.hh"
#include "Randomize.hh"
#include "G4Timer.hh"
#include "time.h"
// All calculations have been done for C12 nucleus
double anuX(double E, double r, double p) // (E is in GeV, r=Q2/Q2max, p=1+anuE(E))
{
double E2=E*E;
double y=p-r;
double p3=(13.88+.9373*(1.+.000033*E2)*std::sqrt(E))/(1.+(10.12+1.532/E2)/E);
return std::pow(y,6)*(r+p3)/(p3*r+1.);
}
int main()
{
G4double PI=3.14159265; // \pi
G4double A=.5; // half side of the tested cube
G4double R=.5; // radius of the tested sphere
G4double B=1.; // half width of the mother cube
G4double S=6*(B+B)*(B+B); // 6 sides 2x2
G4double SC=6*(A+A)*(A+A); // The target surface of the test cube
G4double SS=4*PI*R*R; // The target surface of the test sphere
G4double c=0.; // summ for the cube
G4double s=0.; // summ for the sphere
G4double m=0.; // summ for the mother cube
G4double cf=0.; // reversed length summ for the cube
G4double sf=0.; // reversed length summ for the sphere
G4double mf=0.; // reversed length summ for the mother cube
G4double cr=0.; // length summ for the cube
G4double sr=0.; // length summ for the sphere
G4double mr=0.; // length summ for the mother cube
G4double cm=B; // min length for the cube
G4double sm=B; // min length for the sphere
G4double mm=B; // min length for the mother cube
G4int nEv=10000000; // calculation statistics
G4double f=.99; // scale factor
G4double Af=A*f; // Scaled A
G4double Rf=R*f; // Scaled R
G4double Bf=B*f; // Scaled B
G4Timer* timer = new G4Timer();
timer->Start();
for(G4int i=0; i<nEv; i++)
{
// Randomize coordinates within (+/-1,+/-1,+/-1) cube (S=6+4=24)
G4double x=G4UniformRand();
x=B*(1.-x-x); // Can be x=B*x, but B=1 is a hilf width of mother cube
G4double y=G4UniformRand();
y=B*(1.-y-y);
G4double z=G4UniformRand();
z=B*(1.-z-z);
G4double r2=x*x+y*y+z*z;
G4double r=std::sqrt(r2);
G4double w=1./r;
G4double ax=std::fabs(x);
G4double ay=std::fabs(y);
G4double az=std::fabs(z);
if(r<R && r>Rf)
{
s+=1.;
sf+=w;
sr+=r;
if(r<sm) sm=r;
}
if(ax<A && ay<A && az<A && (ax>Af || ay>Af || az>Af))
{
c+=1.;
cf+=w;
cr+=r;
if(r<cm) cm=r;
}
if(ax>Bf || ay>Bf || az>Bf)
{
m+=1.;
mf+=w;
mr+=r;
if(r<mm) mm=r;
}
}
G4double N=S*mm/m;
//G4double N=S*m*m/mf;
//G4double N=S/mf;
timer->Stop();
G4cout<<"SurfaceCalc: nE="<<nEv<<", time="<<timer->GetUserElapsed()<<" s, f="<<f<<G4endl;
delete timer;
G4cout<<"SurfaceCalculation: Cube="<<N*c/cm/SC<<", Sphere="<<N*s/sm/SS<<G4endl;
//G4cout<<"SurfaceCalculation: Cube="<<N*cf/SC<<", Sphere="<<N*sf/SS<<G4endl;
//G4cout<<"SurfaceCalculation: Cube="<<N*cr/c/c/SC<<", Sphere="<<N*sr/s/s/SS<<G4endl;
}
@@ -0,0 +1,26 @@
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
History file for hadronic/models/chiral_inv_phase_space/calcul
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
21-Nov-2008 Dennis Wright (hadr-chips-calc-V09-01-00)
-----------------------------------------------------
- add History file
- G4BoundMuDecInElIntegration.cc added by M. Kossov 8 February 2007
- G4MultyFragmentationTest.cc added by M. Kossov 5 July 2006
- G4NuElXQ2Integration.cc added by M. Kossov 25 September 2007
- G4NuElXQ2Integration_N.cc added by M. Kossov 25 October 2007
- G4NuMuXQ2Integration_N.cc added by M. Kossov 25 October 2007
- G4SurfaceCalculation.cc added by M. Kossov 8 February 2007
- G4NuMuXQ2Integration.cc updated by M. Kossov 25 September 2007
- G4GlauberCrossSections.cc updated by M. Kossov 8 February 2007
@@ -0,0 +1,91 @@
==========================================================
Geant4 - an Object-Oriented Toolkit for Physics Simulation
==========================================================
History file for hadronic/models/chiral_inv_phase_space/interface
This file should be used to summarize modifications introduced in the
code and to keep track of all tags.
---------------------------------------------------------------
* Please list in reverse chronological order (last date on top)
---------------------------------------------------------------
24-Oct-2008 Dennis Wright (hadr-chips-inter-V09-01-09)
------------------------------------------------------
- replace G4NucleiPropertiesTable::IsInTable with
G4NucleiProperties::IsInStableTable in G4QElectronNuclearCrossSection,
G4QMuonNuclearCrossSection, G4QPhotonNuclearCrossSection,
G4QTauNuclearCrossSection
2-Oct-2008 Dennis Wright (hadr-chips-inter-V09-01-08)
------------------------------------------------------
- change process type integer from 15 to fHadronAtRest for
G4PionMinusNuclearAtRestChips, G4ProtonAntiProtonAtRestChips,
G4QCaptureAtRest
- change process type integer from 16 to enum fChargeExchange for
G4QCoherentChargeExchange
- change process type integer from 12 to enum fHadronInelastic for
G4QCollision, G4QDiffraction, G4QGluonString, G4QLowEnergy
- change process type integer from 11 to fHadronElastic for
G4QElastic, G4QIonIonElastic
- remove process type from G4QAtomicElectronScattering,
G4QDiscProcessMixer.cc
1-Sep-2008 Vladimir Ivanchenko (hadr-chips-inter-V09-01-07)
-------------------------------------------------------------------
G4QCaptureAtRest - added registration in G4HadronicProcessStore
and PrintInfo by adding PreparePhysicsTable and
BuildPhysicsTable
G4GammaNuclearReaction - moved implementations from header to source
and added name "CHIPS"
G4ElectroNuclearReaction - moved instantiation of HE model to
constructor from run time and added name "CHIPS"
8-Jul-2008 Dennis Wright (hadr-chips-inter-V09-01-06)
-------------------------------------------------------------------
- add G4QIonIonElastic from HEAD
- add general process type, fHadronic to several processes
- set process sub-type to 11 (elastic) for G4QElastic, G4QIonIonElastic
- set process sub-type to 12 (inelastic) for G4QCollision, G4QDiffraction,
G4QGluonString, G4QLowEnergy
- set process sub-type to 13 (capture) for G4QCaptureAtRest
- set process sub-type to 15 (stopping) for G4PionMinusNuclearAtRestChips,
G4ProtonAntiProtonAtRestChips
- set process sub-type to 16 (quasi-elastic) for G4QCoherentChargeExchange
- set process sub-type to 10 (unknown) for G4QAtomicElectronScattering,
G4QDiscProcessMixer
6-May-2008 Dennis Wright (hadr-chips-inter-V09-01-05)
-------------------------------------------------------------------
- replace max-- with --max at lines 1191, 1195, 1197 of G4Collison.cc
This fixes gcc-4.3 compiler warning of exceeded array bounds.
20-Mar-2008 Dennis Wright (hadr-chips-inter-V09-01-04)
-------------------------------------------------------------------
- Add parentheses around && within || to fix gcc-4.3 warnings.
Files affected:
G4QCollision.cc
G4QDiffractionRatio.cc
G4QElasticCrossSection.cc
G4QIonIonCrossSection.cc
G4QLowEnergy.cc
G4QuasiFreeRatios.cc
17-Mar-2008 Vladimir Ivanchenko (hadr-chips-inter-V09-01-03)
- Check on tolerance is replaced by check on exact equality for
G4QuasiFreeRatios, G4QProtonNuclearCrossSection,
G4QNeutronNuclearCrossSection,G4QMuonNuclearCrossSection,
G4QPhotonNuclearCrossSection, G4QElectronNuclearCrossSection,
G4QDiffractionRatio, G4QElasticCrossSection. This intend to provide
reproducibility
7-Feb-2008 Gunter Folger (hadr-chips-inter-V09-01-02)
- Modify src/G4QElasticCrossSection.cc to fix problem with quasi-elastic.
When run together with elastic, the parameters to sample T were not updated,
this fix is to always update these.
@@ -24,158 +24,36 @@
// ********************************************************************
//
#ifndef G4ChiralInvariantPhaseSpace_h
#define G4ChiralInvariantPhaseSpace_h
#define G4ChiralInvariantPhaseSpace_h 1
//#define CHIPSdebug
//
// Modified:
// 16.01.08 V.Ivanchenko move inlined method to source
//
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4ParticleTable.hh"
#include "G4QEnvironment.hh"
//#include "G4Quasmon.hh"
#include "G4QNucleus.hh"
#include "G4QHadronVector.hh"
#include "G4Nucleus.hh"
#include "G4HadFinalState.hh"
#include "G4LorentzVector.hh"
#include "G4DynamicParticle.hh"
#include "G4IonTable.hh"
#include "G4Neutron.hh"
#include "G4HadProjectile.hh"
#include "G4QNucleus.hh"
#include "G4QEnvironment.hh"
#include "G4QHadronVector.hh"
class G4ChiralInvariantPhaseSpace
{
public:
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus,
G4HadFinalState * aChange = 0);
public:
virtual ~G4ChiralInvariantPhaseSpace(){}
private:
G4HadFinalState theResult;
G4ChiralInvariantPhaseSpace();
~G4ChiralInvariantPhaseSpace();
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus,
G4HadFinalState * aChange = 0);
private:
G4HadFinalState theResult;
};
inline
G4HadFinalState * G4ChiralInvariantPhaseSpace::
ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus, G4HadFinalState * aChange)
{
G4HadFinalState * aResult;
if(aChange != 0)
{
aResult = aChange;
}
else
{
aResult = & theResult;
aResult->Clear();
aResult->SetStatusChange(stopAndKill);
}
//projectile properties needed in constructor of quasmon
G4LorentzVector proj4Mom;
proj4Mom = aTrack.Get4Momentum();
G4int projectilePDGCode = aTrack.GetDefinition()
->GetPDGEncoding();
//target properties needed in constructor of quasmon
G4int targetZ = G4int(aTargetNucleus.GetZ()+0.5);
G4int targetA = G4int(aTargetNucleus.GetN()+0.5);
G4int targetPDGCode = 90000000 + 1000*targetZ + (targetA-targetZ);
// NOT NECESSARY ______________
G4double targetMass = G4ParticleTable::GetParticleTable()->GetIonTable()
->GetIonMass(targetZ, targetA);
G4LorentzVector targ4Mom(0.,0.,0.,targetMass);
// END OF NOT NECESSARY^^^^^^^^
G4int nop = 164; // nuclear clusters up to A=21
G4double fractionOfSingleQuasiFreeNucleons = 0.4;
G4double fractionOfPairedQuasiFreeNucleons = 0.0;
if(targetA>27) fractionOfPairedQuasiFreeNucleons = 0.04;
G4double clusteringCoefficient = 4.;
G4double temperature = 180.;
G4double halfTheStrangenessOfSee = 0.1; // = s/d = s/u
G4double etaToEtaPrime = 0.3;
// construct and fragment the quasmon
//G4QCHIPSWorld aWorld(nop); // Create CHIPS World of nop particles
G4QCHIPSWorld::Get()->GetParticles(nop); // Create CHIPS World of nop particles
G4QNucleus::SetParameters(fractionOfSingleQuasiFreeNucleons,
fractionOfPairedQuasiFreeNucleons,
clusteringCoefficient);
G4Quasmon::SetParameters(temperature,
halfTheStrangenessOfSee,
etaToEtaPrime);
// G4cout << "Input info "<< projectilePDGCode << " "
// << targetPDGCode <<" "
// << 1./MeV*proj4Mom<<" "
// << 1./MeV*targ4Mom << " "
// << nop << G4endl;
G4QHadronVector projHV;
G4QHadron* iH = new G4QHadron(projectilePDGCode, 1./MeV*proj4Mom);
projHV.push_back(iH);
G4QEnvironment* pan= new G4QEnvironment(projHV, targetPDGCode);
//G4Quasmon* pan= new G4Quasmon(projectilePDGCode, targetPDGCode, 1./MeV*proj4Mom, 1./MeV*targ4Mom, nop);
G4QHadronVector* output=0;
try
{
output = pan->Fragment();
}
catch(G4HadronicException & aR)
{
G4cerr << "Exception thrown passing through G4ChiralInvariantPhaseSpace "<<G4endl;
G4cerr << " targetPDGCode = "<< targetPDGCode <<G4endl;
G4cerr << " Dumping the information in the pojectile list"<<G4endl;
for(size_t i=0; i< projHV.size(); i++)
{
G4cerr <<" Incoming 4-momentum and PDG code of "<<i<<"'th hadron: "
<<" "<< projHV[i]->Get4Momentum()<<" "<<projHV[i]->GetPDGCode()<<G4endl;
}
throw;
}
std::for_each(projHV.begin(), projHV.end(), DeleteQHadron());
projHV.clear();
delete pan;
// Fill the particle change.
G4DynamicParticle * theSec;
#ifdef CHIPSdebug
G4cout << "G4ChiralInvariantPhaseSpace: NEW EVENT #ofHadrons="<<output->size()<<endl;
#endif
unsigned int particle;
for( particle = 0; particle < output->size(); particle++)
{
if(output->operator[](particle)->GetNFragments() != 0)
{
delete output->operator[](particle);
continue;
}
theSec = new G4DynamicParticle;
G4int pdgCode = output->operator[](particle)->GetPDGCode();
#ifdef CHIPSdebug
G4cout << "G4ChiralInvariantPhaseSpace: h#"<<particle<<", PDG="<<pdgCode<<endl;
#endif
G4ParticleDefinition * theDefinition;
// Note that I still have to take care of strange nuclei
// For this I need the mass calculation, and a changed interface
// for ion-tablel ==> work for Hisaya @@@@@@@
// Then I can sort out the pdgCode. I also need a decau process
// for strange nuclei; may be another chips interface
if(pdgCode>90000000)
{
G4int aZ = (pdgCode-90000000)/1000;
G4int anN = pdgCode-90000000-1000*aZ;
theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,anN+aZ,0,aZ);
if(aZ == 0 && anN == 1) theDefinition = G4Neutron::Neutron();
}
else
{
theDefinition = G4ParticleTable::GetParticleTable()->FindParticle(output->operator[](particle)->GetPDGCode());
}
theSec->SetDefinition(theDefinition);
theSec->SetMomentum(output->operator[](particle)->Get4Momentum().vect());
aResult->AddSecondary(theSec);
delete output->operator[](particle);
}
delete output;
return aResult;
}
#endif
@@ -25,8 +25,8 @@
//
//
//
// $Id: G4ElectroNuclearReaction.hh,v 1.23 2006/06/29 20:07:46 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4ElectroNuclearReaction.hh,v 1.25 2008/09/01 19:04:54 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4ElectroNuclearReaction -- header file
@@ -34,53 +34,66 @@
// The last update: J.P. Wellisch, 06-June-02
//
#ifndef G4ElectroNuclearReaction_h
#define G4ElectroNuclearReaction_h
#define G4ElectroNuclearReaction_h 1
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4ChiralInvariantPhaseSpace.hh"
#include "G4ElectroNuclearCrossSection.hh"
#include "G4PhotoNuclearCrossSection.hh"
#include "G4GammaParticipants.hh"
#include "G4QGSModel.hh"
#include "G4QGSMFragmentation.hh"
#include "G4Nucleus.hh"
#include "G4HadFinalState.hh"
#include "G4HadProjectile.hh"
#include "G4Electron.hh"
#include "G4Positron.hh"
#include "G4Gamma.hh"
#include "G4GammaParticipants.hh"
#include "G4QGSModel.hh"
#include "G4TheoFSGenerator.hh"
#include "G4GeneratorPrecompoundInterface.hh"
#include "G4QGSMFragmentation.hh"
#include "G4ExcitedStringDecay.hh"
class G4ElectroNuclearReaction : public G4HadronicInteraction
{
public:
virtual ~G4ElectroNuclearReaction(){}
G4ElectroNuclearReaction()
{
SetMinEnergy(0*GeV);
SetMaxEnergy(30*TeV);
theHEModel = new G4TheoFSGenerator;
theCascade = new G4GeneratorPrecompoundInterface;
}
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus);
public:
private:
G4ChiralInvariantPhaseSpace theLEModel;
G4TheoFSGenerator * theHEModel;
G4GeneratorPrecompoundInterface * theCascade;
G4QGSModel< G4GammaParticipants > theStringModel;
G4QGSMFragmentation theFragmentation;
G4ExcitedStringDecay * theStringDecay;
G4ElectroNuclearCrossSection theElectronData;
G4PhotoNuclearCrossSection thePhotonData;
G4HadFinalState theResult;
G4ElectroNuclearReaction():G4HadronicInteraction("CHIPS")
{
SetMinEnergy(0*GeV);
SetMaxEnergy(30*TeV);
theHEModel = new G4TheoFSGenerator;
theCascade = new G4GeneratorPrecompoundInterface;
theHEModel->SetTransport(theCascade);
theHEModel->SetHighEnergyGenerator(&theStringModel);
theStringDecay = new G4ExcitedStringDecay(&theFragmentation);
theStringModel.SetFragmentationModel(theStringDecay);
theHEModel->SetMinEnergy(2.5*GeV);
theHEModel->SetMaxEnergy(100*TeV);
}
virtual ~G4ElectroNuclearReaction() {};
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus);
private:
G4ChiralInvariantPhaseSpace theLEModel;
G4TheoFSGenerator * theHEModel;
G4GeneratorPrecompoundInterface * theCascade;
G4QGSModel< G4GammaParticipants > theStringModel;
G4QGSMFragmentation theFragmentation;
G4ExcitedStringDecay * theStringDecay;
G4ElectroNuclearCrossSection theElectronData;
G4PhotoNuclearCrossSection thePhotonData;
G4HadFinalState theResult;
};
inline G4HadFinalState* G4ElectroNuclearReaction::
ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus)
inline
G4HadFinalState* G4ElectroNuclearReaction::ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus)
{
theResult.Clear();
static const G4double dM=G4Proton::Proton()->GetPDGMass()+G4Neutron::Neutron()->GetPDGMass(); // Mean double nucleon mass = m_n+m_p (@@ no binding)
@@ -197,13 +210,6 @@ ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus)
else
{
// G4cout << "0) Getting a high energy electro-nuclear reaction"<<G4endl;
theHEModel->SetTransport(theCascade);
theHEModel->SetHighEnergyGenerator(&theStringModel);
theStringDecay = new G4ExcitedStringDecay(&theFragmentation);
theStringModel.SetFragmentationModel(theStringDecay);
theHEModel->SetMinEnergy(2.5*GeV);
theHEModel->SetMaxEnergy(100*TeV);
G4HadFinalState * aResult = theHEModel->ApplyYourself(localTrack, aTargetNucleus);
for(G4int all = 0; all < aResult->GetNumberOfSecondaries(); all++)
{
@@ -24,45 +24,38 @@
// ********************************************************************
//
//
// $Id: G4GammaNuclearReaction.hh,v 1.13 2006/06/29 20:07:48 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4GammaNuclearReaction.hh,v 1.14 2008/09/01 17:30:42 vnivanch Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4GammaNuclearReaction -- header file
// Created: J.P. Wellisch, 2000/08/18
// The last update: J.P. Wellisch, Thu Jun 6 2002.
// 01.09.2008 V.Ivanchenko move inline to source and define interaction name
//
#ifndef G4GammaNuclearReaction_h
#define G4GammaNuclearReaction_h
#define G4GammaNuclearReaction_h 1
#include "globals.hh"
#include "G4HadronicInteraction.hh"
#include "G4ChiralInvariantPhaseSpace.hh"
#include "G4Gamma.hh"
class G4GammaNuclearReaction : public G4HadronicInteraction
{
public:
virtual ~G4GammaNuclearReaction()
{
}
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus);
public:
G4GammaNuclearReaction();
virtual ~G4GammaNuclearReaction();
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
G4Nucleus& aTargetNucleus);
private:
G4ChiralInvariantPhaseSpace theModel;
private:
G4ChiralInvariantPhaseSpace theModel;
};
inline
G4HadFinalState * G4GammaNuclearReaction::
ApplyYourself(const G4HadProjectile& aTrack, G4Nucleus& aTargetNucleus)
{
if(aTrack.GetDefinition() != G4Gamma::GammaDefinition())
{
throw G4HadronicException(__FILE__, __LINE__, "Called G4GammaNuclearReaction for particle other than gamma");
}
return theModel.ApplyYourself(aTrack, aTargetNucleus);
}
#endif
@@ -31,6 +31,7 @@
#include "G4StopElementSelector.hh"
#include "G4PionMinus.hh"
#include "G4ChiralInvariantPhaseSpace.hh"
#include "G4HadronicProcessType.hh"
class G4PionMinusNuclearAtRestChips : public G4VRestProcess
{
@@ -42,7 +43,10 @@ class G4PionMinusNuclearAtRestChips : public G4VRestProcess
public:
G4PionMinusNuclearAtRestChips(const G4String& processName ="PionMinusAnnihilationAtRest")
: G4VRestProcess (processName) {}
: G4VRestProcess (processName, fHadronic)
{
SetProcessSubType(fHadronAtRest);
}
~G4PionMinusNuclearAtRestChips() {}
@@ -38,6 +38,7 @@
#include "G4Neutron.hh"
#include "G4StopElementSelector.hh"
#include "G4ChiralInvariantPhaseSpace.hh"
#include "G4HadronicProcessType.hh"
class G4ProtonAntiProtonAtRestChips : public G4VRestProcess
{
@@ -49,7 +50,10 @@ class G4ProtonAntiProtonAtRestChips : public G4VRestProcess
public:
G4ProtonAntiProtonAtRestChips(const G4String& processName ="AntiProtonAnnihilationAtRest")
: G4VRestProcess (processName) {}
: G4VRestProcess (processName, fHadronic)
{
SetProcessSubType(fHadronAtRest);
}
~G4ProtonAntiProtonAtRestChips() {}
@@ -25,7 +25,7 @@
//
//
// $Id: G4QANuANuNuclearCrossSection.hh,v 1.1 2007/11/01 16:09:38 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QANuANuNuclearCrossSection -- header file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QANuENuclearCrossSection.hh,v 1.1 2007/10/02 10:00:37 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QANuENuclearCrossSection -- header file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QANuMuNuclearCrossSection.hh,v 1.6 2006/12/01 10:57:46 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
// $Id: G4QAtomicElectronScattering.hh,v 1.2 2006/12/13 15:45:16 gunter Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QAtomicElectronScattering header ----------------
// by Mikhail Kossov, December 2003.
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QCaptureAtRest.hh,v 1.3 2007/02/09 09:33:28 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QCaptureAtRest.hh,v 1.6 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QCaptureAtRest header ----------------
// by Mikhail Kossov, December 2003.
@@ -93,6 +93,7 @@
#include "Randomize.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QEnvironment.hh"
@@ -117,9 +118,13 @@ public:
G4QCaptureAtRest(const G4String& processName ="CHIPSNuclearAbsorptionAtRest");
// Destructor
~G4QCaptureAtRest();
virtual ~G4QCaptureAtRest();
G4bool IsApplicable(const G4ParticleDefinition& particle);
virtual G4bool IsApplicable(const G4ParticleDefinition& particle);
virtual void PreparePhysicsTable(const G4ParticleDefinition&);
virtual void BuildPhysicsTable(const G4ParticleDefinition&);
G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep);
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QCoherentChargeExchange.hh,v 1.4 2007/08/09 13:04:37 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QCoherentChargeExchange.hh,v 1.5 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QCoherentChargeExchange header ----------------
// by Mikhail Kossov, December 2003.
@@ -55,6 +55,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QuasiFreeRatios.hh"
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QCollision.hh,v 1.10 2007/11/01 16:09:38 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QCollision.hh,v 1.11 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QCollision header ----------------
// by Mikhail Kossov, December 2003.
@@ -84,6 +84,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QEnvironment.hh"
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QDiffraction.hh,v 1.1 2007/08/23 15:58:43 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QDiffraction.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QDiffraction header ----------------
// by Mikhail Kossov, Aug 2007.
@@ -53,6 +53,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QDiffractionRatio.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QDiffractionRatio -- header file
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QDiscProcessMixer.hh,v 1.2 2007/08/31 09:36:57 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QDiscProcessMixer.hh,v 1.3 2008/07/09 19:45:09 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QDiscProcessMixer header ----------------
// by Mikhail Kossov, Aug 2007.
@@ -66,7 +66,7 @@ public:
// Constructor
G4QDiscProcessMixer(const G4String& processName = "Mixed Discrete Process",
const G4ParticleDefinition* proj = G4Gamma::Gamma(),
G4ProcessType pType = fNotDefined );
G4ProcessType pType = fHadronic );
// Destructor
~G4QDiscProcessMixer();
@@ -25,7 +25,7 @@
//
//
// $Id: G4QDiscreteProcessVector.hh,v 1.1 2007/08/28 15:48:15 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QDiscreteProcessVector ----------------
// by Mikhail Kossov, Aug 2007.
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QElastic.hh,v 1.3 2007/05/23 15:14:25 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QElastic.hh,v 1.4 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QElastic header ----------------
// by Mikhail Kossov, December 2003.
@@ -55,6 +55,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QElasticCrossSection.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QElasticCrossSection -- header file
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QElectronNuclearCrossSection -- header file
@@ -40,7 +40,6 @@
#include "G4Element.hh"
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NucleiPropertiesTable.hh"
#include <vector>
#include "Randomize.hh"
#include "G4Electron.hh"
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QGluonString.hh,v 1.1 2006/10/30 10:33:38 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QGluonString.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QGluonString header ----------------
// by Mikhail Kossov, October 2006.
@@ -61,6 +61,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QEnvironment.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QIonIonCrossSection -- header file
@@ -0,0 +1,127 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
// $Id: G4QIonIonElastic.hh,v 1.2 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QIonIonElastic header ----------------
// by Mikhail Kossov, December 2006.
// Header of G4QIonIonElastic class (A+A) of the CHIPS Simulation Branch in GEANT4
// -------------------------------------------------------------------------------
// This is a unique CHIPS class for the Ion-Ion Elastic Scattering Prosesses
// -------------------------------------------------------------------------------
// @@ This class is on the testing level @@
// -------------------------------------------------------------------------------
// ****************************************************************************************
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
// ****************************************************************************************
#ifndef G4QIonIonElastic_hh
#define G4QIonIonElastic_hh
// GEANT4 Headers
#include "globals.hh"
#include "G4ios.hh"
#include "Randomize.hh"
#include "G4VDiscreteProcess.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4ParticleTypes.hh"
#include "G4VParticleChange.hh"
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QIonIonCrossSection.hh"
#include "G4QElasticCrossSection.hh"
#include "G4QIsotope.hh"
#include "G4QPDGToG4Particle.hh"
#include "G4QCHIPSWorld.hh"
#include "G4QHadron.hh"
#include <vector>
class G4QIonIonElastic : public G4VDiscreteProcess
{
public:
// Constructor
G4QIonIonElastic(const G4String& processName ="CHIPS_IonIonElasticScattering");
// Destructor
~G4QIonIonElastic();
G4bool IsApplicable(const G4ParticleDefinition& particle);
G4double GetMeanFreePath(const G4Track& aTrack, G4double previousStepSize,
G4ForceCondition* condition);
// It returns the MeanFreePath of the process for the current track :
// (energy, material)
// The previousStepSize and G4ForceCondition* are not used.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
// It computes the final state of the process (at end of step),
// returned as a ParticleChange object.
// This function overloads a virtual function of the base class.
// It is invoked by the ProcessManager of the Particle.
G4LorentzVector GetEnegryMomentumConservation(){return EnMomConservation;}
G4int GetNumberOfNeutronsInTarget(){return nOfNeutrons;}
private:
// Hide assignment operator as private
G4QIonIonElastic& operator=(const G4QIonIonElastic &right);
// Copy constructor
G4QIonIonElastic(const G4QIonIonElastic&);
// BODY
// Static Parameters --------------------------------------------------------------------
static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
//--------------------------------- End of static parameters ---------------------------
// Working parameters
G4VQCrossSection* theCS;
G4LorentzVector EnMomConservation; // Residual of Energy/Momentum Cons.
G4int nOfNeutrons; // #of neutrons in the target nucleus
// Modifires for the reaction
G4double Time; // Time shift of the capture reaction
G4double EnergyDeposition; // Energy deposited in the reaction
static std::vector <G4int> ElementZ; // Z of the element(i) in theLastCalc
static std::vector <G4double> ElProbInMat; // SumProbabilityElements in Material
static std::vector <std::vector<G4int>*> ElIsoN; // N of isotope(j) of Element(i)
static std::vector <std::vector<G4double>*> IsoProbInEl;// SumProbabIsotopes in Element i
};
#endif
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4QLowEnergy.hh,v 1.3 2007/11/15 09:36:43 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QLowEnergy.hh,v 1.4 2008/10/02 21:10:07 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
// ---------------- G4QLowEnergy header ----------------
// by Mikhail Kossov, Aug 2007.
@@ -54,6 +54,7 @@
#include "G4NucleiPropertiesTable.hh"
#include "G4ThreeVector.hh"
#include "G4LorentzVector.hh"
#include "G4HadronicProcessType.hh"
// CHIPS Headers
#include "G4QNucleus.hh"
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4QMuonNuclearCrossSection.hh,v 1.5 2006/12/01 10:57:46 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// $Id: G4QMuonNuclearCrossSection.hh,v 1.6 2008/10/24 19:23:25 dennis Exp $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QMuonNuclearCrossSection -- header file
@@ -44,7 +44,6 @@
#include "G4ParticleTable.hh"
#include "G4NucleiProperties.hh"
#include "G4NucleiPropertiesTable.hh"
#include <vector>
#include "Randomize.hh"
#include "G4MuonPlus.hh"
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QNeutronNuclearCrossSection -- header file
@@ -25,7 +25,7 @@
//
//
// $Id: G4QNuENuclearCrossSection.hh,v 1.1 2007/10/02 10:00:37 mkossov Exp $
// GEANT4 tag $Name: geant4-09-01 $
// GEANT4 tag $Name: geant4-09-02 $
//
//
// GEANT4 physics class: G4QNuENuclearCrossSection -- header file

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