Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4ElectroNuclearCrossSection -- header file
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Hadron physics class -- header file
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4PhotoNuclearCrossSection -- header file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroNuclearCrossSection.cc,v 1.24 2005/06/04 12:54:19 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4ElectroNuclearCrossSection for gamma+A cross sections
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronCaptureDataSet.cc,v 1.7 2005/06/04 12:54:19 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronCaptureDataSet for cross sections
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Hadron Physics class G4HadronCrossSections
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronElasticDataSet.cc,v 1.7 2005/06/04 12:54:19 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronElasticDataSet for cross sections
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronFissionDataSet.cc,v 1.7 2005/06/04 12:54:19 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronFissionDataSet for cross sections
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HadronInelasticDataSet.cc,v 1.7 2005/06/04 12:54:19 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: HadronInelasticDataSet for cross sections
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4PhotoNuclearCrossSection for gamma+A cross sections
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// by J.P Wellisch, Sun Sep 15 2002.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation
|
||||
==================================================
|
||||
|
||||
History file for hadronic/management directory
|
||||
----------------------------------------------
|
||||
|
||||
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)
|
||||
---------------------------------------------------------------
|
||||
|
||||
18 Nov 2005 Dennis Wright (hadr-man-V07-01-00)
|
||||
----------------------------------------------
|
||||
|
||||
- G4HadronicProcess.cc: <sstream> migration
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.hh,v 1.7 2005/06/04 12:51:43 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4HadLeadBias_h
|
||||
|
||||
@@ -60,7 +60,8 @@ class G4ParticleChange;
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronicProcess( const G4String &processName = "Hadronic" );
|
||||
G4HadronicProcess( const G4String &processName = "Hadronic",
|
||||
G4ProcessType aType = fHadronic );
|
||||
virtual ~G4HadronicProcess();
|
||||
|
||||
void RegisterMe( G4HadronicInteraction *a );
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VLeadingParticleBiasing.hh,v 1.5 2005/06/04 12:51:43 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VLeadingParticleBiasing_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EnergyRangeManager.cc,v 1.12 2005/06/04 12:51:43 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Energy Range Manager
|
||||
// original by H.P. Wellisch
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include "G4HadronicProcess.hh"
|
||||
#include "G4EffectiveCharge.hh"
|
||||
@@ -71,8 +71,9 @@ EnableIsotopeProductionGlobally() {isoIsEnabled = true;}
|
||||
void G4HadronicProcess::
|
||||
DisableIsotopeProductionGlobally() {isoIsEnabled = false;}
|
||||
|
||||
G4HadronicProcess::G4HadronicProcess( const G4String &processName) :
|
||||
G4VDiscreteProcess( processName )
|
||||
G4HadronicProcess::G4HadronicProcess( const G4String &processName,
|
||||
G4ProcessType aType ) :
|
||||
G4VDiscreteProcess( processName, aType)
|
||||
{
|
||||
ModelingState = 0;
|
||||
isoIsOnAnyway = 0;
|
||||
@@ -554,15 +555,20 @@ G4HadFinalState * aResult)
|
||||
}
|
||||
|
||||
// prepare the IsoResult.
|
||||
char the1[100] = {""};
|
||||
std::ostrstream ost1(the1, 100, std::ios::out);
|
||||
ost1 <<Z<<"_"<<A<<"\0";
|
||||
G4String * biff = new G4String(the1);
|
||||
G4IsoResult * theResult = new G4IsoResult(*biff, aNucleus);
|
||||
|
||||
// cleaning up.
|
||||
delete biff;
|
||||
|
||||
|
||||
std::ostringstream ost1;
|
||||
ost1 <<Z<<"_"<<A;
|
||||
G4String biff = ost1.str();
|
||||
G4IsoResult * theResult = new G4IsoResult(biff, aNucleus);
|
||||
|
||||
// char the1[100] = {""};
|
||||
// std::ostrstream ost1(the1, 100, std::ios::out);
|
||||
// ost1 <<Z<<"_"<<A<<"\0";
|
||||
// G4String * biff = new G4String(the1);
|
||||
// G4IsoResult * theResult = new G4IsoResult(*biff, aNucleus);
|
||||
// // cleaning up.
|
||||
// delete biff;
|
||||
|
||||
return theResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Physics Simulation
|
||||
==========================================================
|
||||
|
||||
History file for hadronic/models/cascade
|
||||
----------------------------------------
|
||||
|
||||
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 Nov 2005 Dennis Wright (hadr-casc-V07-01-00)
|
||||
----------------------------------------------
|
||||
|
||||
- cascade (bertini-V07-01-00 by Aatos Heikkinen)
|
||||
elastic scattering interface added:
|
||||
G4ElasticCascadeInterface.hh, .cc added
|
||||
G4CascadeInterface.hh modified
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
// CLASS DESCRIPTION
|
||||
// G4CascadeInterface defines an interface to HETC and INUCL
|
||||
// models of an medium energy (~ 0.5 - 5 GeV) intra-nuclear transport.
|
||||
// models of an medium energy (~ 0.5 - 10 GeV) intra-nuclear transport.
|
||||
// If you have any questions, please contact
|
||||
// package writer aatos.heikkinen@cern.ch.
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// CLASS DESCRIPTION
|
||||
// G4ElasticCascadeInterface defines an interface to INUCL
|
||||
// models of an medium energy (~ 0.5 - 10 GeV) intra-nuclear transport.
|
||||
// Elastic reaction is forced in this interface
|
||||
// If you have any questions, please contact
|
||||
// package writer aatos.heikkinen@cern.ch.,
|
||||
// Also coded by Pekka Kaitataniemi, Helsinki Institute of Physics
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ELASTICCASCADEINTERFACE_H
|
||||
#define G4ELASTICCASCADEINTERFACE_H 1
|
||||
|
||||
#include "G4Nucleon.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4VIntraNuclearTransportModel.hh"
|
||||
#include "G4KineticTrackVector.hh"
|
||||
#include "G4FragmentVector.hh"
|
||||
#include "G4ParticleChange.hh"
|
||||
#include "G4ReactionProductVector.hh"
|
||||
#include "G4ReactionProduct.hh"
|
||||
|
||||
#include "G4HadronicInteraction.hh"
|
||||
|
||||
//class G4CascadeInterface : public G4VIntraNuclearTransportModel {
|
||||
|
||||
//class G4ElasticCascadeInterface : public G4HadronElastic {
|
||||
|
||||
class G4ElasticCascadeInterface : public G4HadronicInteraction {
|
||||
public:
|
||||
|
||||
G4ElasticCascadeInterface();
|
||||
|
||||
~G4ElasticCascadeInterface(){
|
||||
}
|
||||
|
||||
G4ReactionProductVector* Propagate(G4KineticTrackVector* theSecondaries, G4V3DNucleus* theNucleus);
|
||||
|
||||
G4HadFinalState* ApplyYourself(const G4HadProjectile& aTrack,
|
||||
G4Nucleus& theNucleus);
|
||||
|
||||
private:
|
||||
|
||||
G4int operator==(G4ElasticCascadeInterface& right) {
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
G4int operator!=(G4ElasticCascadeInterface& right) {
|
||||
return (this != &right);
|
||||
}
|
||||
|
||||
G4int verboseLevel;
|
||||
private:
|
||||
G4HadFinalState theResult;
|
||||
|
||||
};
|
||||
|
||||
#endif //G4ELASTICCASCADEINTERFACE_H
|
||||
@@ -0,0 +1,396 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
#include "G4ElasticCascadeInterface.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticleVector.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4InuclCollider.hh"
|
||||
#include "G4IntraNucleiCascader.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
#include "G4NonEquilibriumEvaporator.hh"
|
||||
#include "G4EquilibriumEvaporator.hh"
|
||||
#include "G4Fissioner.hh"
|
||||
#include "G4BigBanger.hh"
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4InuclParticle.hh"
|
||||
#include "G4CollisionOutput.hh"
|
||||
#include "G4V3DNucleus.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Nucleus.hh"
|
||||
#include "G4NucleiModel.hh"
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
|
||||
G4ElasticCascadeInterface::G4ElasticCascadeInterface()
|
||||
:verboseLevel(0)
|
||||
{
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4ElasticCascadeInterface::G4ElasticCascadeInterface" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
G4ReactionProductVector* G4ElasticCascadeInterface::Propagate(G4KineticTrackVector*, G4V3DNucleus* ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// #define debug_G4ElasticCascadeInterface
|
||||
|
||||
G4HadFinalState* G4ElasticCascadeInterface::ApplyYourself(const G4HadProjectile& aTrack,
|
||||
G4Nucleus& theNucleus) {
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
static G4int counter(0);
|
||||
counter++;
|
||||
G4cerr << "Reaction number "<< counter << " "<<aTrack.GetDynamicParticle()->GetDefinition()->GetParticleName()<<" "<< aTrack.GetDynamicParticle()->GetKineticEnergy()<<G4endl;
|
||||
#endif
|
||||
|
||||
theResult.Clear();
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4ElasticCascadeInterface::ApplyYourself" << G4endl;
|
||||
};
|
||||
|
||||
G4double eInit = 0.0;
|
||||
G4double eTot = 0.0;
|
||||
G4double sumBaryon = 0.0;
|
||||
G4double sumEnergy = 0.0;
|
||||
|
||||
// Make conversion between native Geant4 and Bertini cascade classes.
|
||||
// NOTE: Geant4 units are MeV = 1 and GeV = 1000. Cascade code by default use GeV = 1.
|
||||
|
||||
enum particleType { nuclei = 0, proton = 1, neutron = 2, pionPlus = 3, pionMinus = 5, pionZero = 7, photon = 10 };
|
||||
|
||||
G4int bulletType = 0;
|
||||
|
||||
// Coding particles
|
||||
if (aTrack.GetDefinition() == G4Proton::Proton() ) bulletType = proton;
|
||||
if (aTrack.GetDefinition() == G4Neutron::Neutron() ) bulletType = neutron;
|
||||
if (aTrack.GetDefinition() == G4PionPlus::PionPlus() ) bulletType = pionPlus;
|
||||
if (aTrack.GetDefinition() == G4PionMinus::PionMinus() ) bulletType = pionMinus;
|
||||
if (aTrack.GetDefinition() == G4PionZero::PionZero() ) bulletType = pionZero;
|
||||
if (aTrack.GetDefinition() == G4Gamma::Gamma() ) bulletType = photon;
|
||||
|
||||
// Code momentum and energy.
|
||||
G4double px,py,pz;
|
||||
px=aTrack.Get4Momentum().px() / GeV;
|
||||
py=aTrack.Get4Momentum().py() / GeV;
|
||||
pz=aTrack.Get4Momentum().pz() / GeV;
|
||||
|
||||
G4LorentzVector projectileMomentum = aTrack.Get4Momentum();
|
||||
G4LorentzRotation toZ;
|
||||
toZ.rotateZ(-projectileMomentum.phi());
|
||||
toZ.rotateY(-projectileMomentum.theta());
|
||||
G4LorentzRotation toLabFrame = toZ.inverse();
|
||||
|
||||
std::vector<G4double> momentumBullet(4);
|
||||
momentumBullet[0] =0.;
|
||||
momentumBullet[1] =0;
|
||||
momentumBullet[2] =0;
|
||||
momentumBullet[3] =std::sqrt(px*px+py*py+pz*pz);
|
||||
|
||||
G4InuclElementaryParticle * bullet = new G4InuclElementaryParticle(momentumBullet, bulletType);
|
||||
|
||||
sumEnergy = bullet->getKineticEnergy(); // In GeV
|
||||
if (bulletType == proton || bulletType == neutron) {
|
||||
sumBaryon += 1;
|
||||
}
|
||||
|
||||
// Set target
|
||||
G4InuclNuclei* target = NULL;
|
||||
G4InuclParticle* targetH = NULL;
|
||||
// and outcoming particles
|
||||
G4DynamicParticle* cascadeParticle = NULL;
|
||||
|
||||
std::vector<G4double> targetMomentum(4, 0.0);
|
||||
|
||||
G4double theNucleusA = theNucleus.GetN();
|
||||
|
||||
if ( !(G4int(theNucleusA) == 1) ) {
|
||||
target = new G4InuclNuclei(targetMomentum,
|
||||
theNucleusA,
|
||||
theNucleus.GetZ());
|
||||
target->setEnergy();
|
||||
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = std::sqrt(bmom[0] * bmom[0]);
|
||||
std::vector<G4double> tmom = target->getMomentum();
|
||||
eInit += std::sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
sumBaryon += theNucleusA;
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Bullet: " << G4endl;
|
||||
bullet->printParticle();
|
||||
}
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Target: " << G4endl;
|
||||
target->printParticle();
|
||||
}
|
||||
}
|
||||
|
||||
G4CollisionOutput output;
|
||||
|
||||
// Colliders initialisation
|
||||
G4ElementaryParticleCollider* colep = new G4ElementaryParticleCollider;
|
||||
G4IntraNucleiCascader* inc = new G4IntraNucleiCascader; // the actual cascade
|
||||
inc->setInteractionCase(1); // Interaction type is particle with nuclei.
|
||||
|
||||
G4NonEquilibriumEvaporator* noneq = new G4NonEquilibriumEvaporator;
|
||||
G4EquilibriumEvaporator* eqil = new G4EquilibriumEvaporator;
|
||||
G4Fissioner* fiss = new G4Fissioner;
|
||||
G4BigBanger* bigb = new G4BigBanger;
|
||||
G4InuclCollider* collider = new G4InuclCollider(colep, inc, noneq, eqil, fiss, bigb);
|
||||
|
||||
G4int maxTries = 10; // maximum tries for inelastic collision to avoid infinite loop
|
||||
G4int nTries = 0; // try counter
|
||||
|
||||
if (G4int(theNucleusA) == 1) { // special treatment for target H(1,1) (proton)
|
||||
|
||||
targetH = new G4InuclElementaryParticle(targetMomentum, 1);
|
||||
|
||||
G4float cutElastic[8];
|
||||
cutElastic[proton ] = 1.0; // GeV
|
||||
cutElastic[neutron ] = 1.0;
|
||||
cutElastic[pionPlus ] = 0.6;
|
||||
cutElastic[pionMinus] = 0.2;
|
||||
cutElastic[pionZero ] = 0.2;
|
||||
|
||||
// Was >
|
||||
if (momentumBullet[3] < cutElastic[bulletType]) { // elastic collision possible
|
||||
|
||||
do { // we try to create elastic interaction
|
||||
output = collider->collide(bullet, targetH);
|
||||
nTries++;
|
||||
} while(
|
||||
(nTries < maxTries) &&
|
||||
(output.getOutgoingParticles().size() != 2 && // elastic: bullet + p = H(1,1) coming out
|
||||
(output.getOutgoingParticles().begin()->type() != bulletType ||
|
||||
output.getOutgoingParticles().begin()->type() != proton) //changed all != -> ==
|
||||
)
|
||||
);
|
||||
|
||||
} else { // only elastic collision is energetically possible
|
||||
output = collider->collide(bullet, targetH);
|
||||
}
|
||||
|
||||
sumBaryon += 1;
|
||||
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = std::sqrt(bmom[0] * bmom[0]);
|
||||
std::vector<G4double> tmom = targetH->getMomentum();
|
||||
eInit += std::sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << "Target: " << G4endl;
|
||||
targetH->printParticle();
|
||||
}
|
||||
|
||||
} else { // treat all other targets excepet H(1,1)
|
||||
|
||||
do // we try to create inelastic interaction ELASTIC COLLISION
|
||||
{
|
||||
output = collider->collide(bullet, target );
|
||||
nTries++;
|
||||
} while(
|
||||
(nTries < maxTries) &&
|
||||
//changed < to >
|
||||
//(output.getOutgoingParticles().size() + output.getNucleiFragments().size() < 2.5) &&
|
||||
(output.getOutgoingParticles().size() + output.getNucleiFragments().size() != 2) &&
|
||||
(output.getOutgoingParticles().size()==0) && // != -> ==
|
||||
(output.getOutgoingParticles().begin()->type() != bullet->type()) //changed == -> !=
|
||||
);
|
||||
}
|
||||
|
||||
if (verboseLevel > 1)
|
||||
{
|
||||
G4cout << " Cascade output: " << G4endl;
|
||||
output.printCollisionOutput();
|
||||
}
|
||||
|
||||
// Convert cascade data to use hadronics interface
|
||||
std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
|
||||
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
|
||||
theResult.SetStatusChange(stopAndKill);
|
||||
|
||||
if (!particles.empty()) {
|
||||
particleIterator ipart;
|
||||
G4int outgoingParticle;
|
||||
|
||||
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
outgoingParticle = ipart->type();
|
||||
std::vector<G4double> mom = ipart->getMomentum();
|
||||
eTot += std::sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4double ekin = ipart->getKineticEnergy() * GeV;
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
aMom = aMom.unit();
|
||||
|
||||
if (outgoingParticle == proton || outgoingParticle == neutron) {
|
||||
sumBaryon -= 1;
|
||||
}
|
||||
|
||||
sumEnergy -= ekin / GeV;
|
||||
|
||||
switch(outgoingParticle) {
|
||||
|
||||
case proton:
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "proton " << counter << " " << aMom << " " << ekin << G4endl;
|
||||
#endif
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Proton::ProtonDefinition(), aMom, ekin);
|
||||
break;
|
||||
|
||||
case neutron:
|
||||
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "neutron "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Neutron::NeutronDefinition(), aMom, ekin);
|
||||
break;
|
||||
|
||||
case pionPlus:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionPlus::PionPlusDefinition(), aMom, ekin);
|
||||
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "pionPlus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case pionMinus:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionMinus::PionMinusDefinition(), aMom, ekin);
|
||||
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "pionMinus "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case pionZero:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4PionZero::PionZeroDefinition(), aMom, ekin);
|
||||
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "pionZero "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case photon:
|
||||
cascadeParticle =
|
||||
new G4DynamicParticle(G4Gamma::Gamma(), aMom, ekin);
|
||||
|
||||
#ifdef debug_G4ElasticCascadeInterface
|
||||
G4cerr << "photon "<< counter<<" "<<aMom<<" "<< ekin<<G4endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
G4cout << " ERROR: G4ElasticCascadeInterface::Propagate undefined particle type"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
cascadeParticle->Set4Momentum(cascadeParticle->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(cascadeParticle);
|
||||
}
|
||||
}
|
||||
|
||||
// get nuclei fragments
|
||||
G4DynamicParticle * aFragment = NULL;
|
||||
G4ParticleDefinition * aIonDef = 0;
|
||||
G4ParticleTable *theTableOfParticles = G4ParticleTable::GetParticleTable();
|
||||
|
||||
if (!nucleiFragments.empty()) {
|
||||
nucleiIterator ifrag;
|
||||
|
||||
for (ifrag = nucleiFragments.begin(); ifrag != nucleiFragments.end(); ifrag++)
|
||||
{
|
||||
G4double eKin = ifrag->getKineticEnergy() * GeV;
|
||||
std::vector<G4double> mom = ifrag->getMomentum();
|
||||
eTot += std::sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
aMom = aMom.unit();
|
||||
|
||||
// hpw @@@ ==> Should be zero: G4double fragmentExitation = ifrag->getExitationEnergyInGeV();
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " Nuclei fragment: " << G4endl;
|
||||
ifrag->printParticle();
|
||||
}
|
||||
|
||||
G4int A = G4int(ifrag->getA());
|
||||
G4int Z = G4int(ifrag->getZ());
|
||||
aIonDef = theTableOfParticles->FindIon(Z, A, 0, Z);
|
||||
|
||||
aFragment = new G4DynamicParticle(aIonDef, aMom, eKin);
|
||||
|
||||
sumBaryon -= A;
|
||||
sumEnergy -= eKin / GeV;
|
||||
|
||||
aFragment->Set4Momentum(aFragment->Get4Momentum()*=toLabFrame);
|
||||
theResult.AddSecondary(aFragment);
|
||||
}
|
||||
}
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
if (sumBaryon != 0) {
|
||||
G4cout << "ERROR: no baryon number conservation, sum of baryons = "
|
||||
<< sumBaryon << G4endl;
|
||||
}
|
||||
|
||||
if (sumEnergy > 0.01 ) {
|
||||
G4cout << "Kinetic energy conservation violated by "
|
||||
<< sumEnergy << " GeV" << G4endl;
|
||||
}
|
||||
|
||||
G4cout << "Total energy conservation at level ~"
|
||||
<< (eInit - eTot) * GeV << " MeV" << G4endl;
|
||||
|
||||
if (sumEnergy < -5.0e-5 ) { // 0.05 MeV
|
||||
G4cout << "FATAL ERROR: energy created "
|
||||
<< sumEnergy * GeV << " MeV" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
delete bullet;
|
||||
delete colep;
|
||||
delete inc;
|
||||
delete noneq;
|
||||
delete fiss;
|
||||
delete eqil;
|
||||
delete bigb;
|
||||
delete collider;
|
||||
|
||||
if(target != NULL) delete target;
|
||||
if(targetH != NULL) delete targetH;
|
||||
// if(cascadeParticle != NULL) delete cascadeParticle;
|
||||
// if(aFragment != NULL) delete aFragment;
|
||||
|
||||
return &theResult;
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Chips.hh,v 1.18 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4Chips ----------------
|
||||
// by Mikhail Kossov, September 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QCHIPSWorld.hh,v 1.24 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCHIPSWorld ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QCandidate.hh,v 1.27 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidate ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QCandidateVector.hh,v 1.20 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QChipolino.hh,v 1.22 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QChipolino ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QContent.hh,v 1.27 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QContent ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QDecayChan.hh,v 1.22 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QDecayChan ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QDecayChanVector.hh,v 1.18 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QEnvironment.hh,v 1.26 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QEnvironment ----------------
|
||||
// by Mikhail Kossov, August 2000.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QException.hh,v 1.9 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QException ----------------
|
||||
// by Mikhail Kossov, November 2003.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QHadron.hh,v 1.30 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QHadron ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QHadronVector.hh,v 1.19 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QIsotope.hh,v 1.3 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QIsotope.hh,v 1.4 2005/11/30 16:31:03 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ---------------- G4QIsotope header ----------------
|
||||
@@ -85,6 +85,10 @@ public:
|
||||
// ======================================================================================
|
||||
G4int GetLastIndex(G4int Z); // Returns the last defined index (if only natural: =0)
|
||||
|
||||
// Indices can have differen numbers (not 1,2,3,...) & in different sequences (9,3,7,...)
|
||||
// ======================================================================================
|
||||
G4bool IsDefined(G4int Z, G4int Ind); // Returns true if defined, false, if not defined
|
||||
|
||||
// A#ofNeutrons in Element with Z & UseDefIndex. Universal for Nat(index=0) & UserDefElem
|
||||
// ======================================================================================
|
||||
G4int GetNeutrons(G4int Z, G4int index=0);//If theElement doesn't exist, returns negative
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QNucleus.hh,v 1.28 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QNucleus ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QPDGCode.hh,v 1.25 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QPDGCode ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QPDGCodeVector.hh,v 1.18 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+6
-2
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QPDGToG4Particle.hh,v 1.2 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QPDGToG4Particle.hh,v 1.3 2005/08/30 07:15:14 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QPDGToG4Particle header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -32,6 +32,9 @@
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
|
||||
#ifndef G4QPDGToG4Particle_hh
|
||||
#define G4QPDGToG4Particle_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
@@ -56,3 +59,4 @@ public:
|
||||
// Body
|
||||
private:
|
||||
};
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParentCluster.hh,v 1.22 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QParentCluster ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParentClusterVector.hh,v 1.17 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParticle.hh,v 1.23 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QParticle ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParticleVector.hh,v 1.18 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidateVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QSplitter.hh,v 1.1 2005/08/30 07:15:14 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QSplitter ----------------
|
||||
// by Mikhail Kossov, Avgust 2005.
|
||||
// header for Hadron-Hadron Splitter in parton pairs of the CHIPS Model
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4QSplitter_h
|
||||
#define G4QSplitter_h 1
|
||||
|
||||
#include "G4QuasmonVector.hh"
|
||||
//#include "G4RandomDirection.hh"
|
||||
// Call G4RandomDirection() (global) instead of old RndmDir() (local)
|
||||
|
||||
class G4QSplitter
|
||||
{
|
||||
public:
|
||||
// projectile Hadron (probably as a part of proj Nucleus) colliding with a nuclear target
|
||||
//G4QSplitter(G4QHadron projHadron, const G4bool projEnvFlag, const G4int targPDG);
|
||||
// projectile Hadron (probably as a part of proj Nucleus) colliding with nuclear Cluster
|
||||
G4QSplitter(G4QHadron projHadron, const G4bool projEnvFlag, const G4int targPDG,
|
||||
const G4bool targEnvFlag); // Cluster can have target nuclear environment
|
||||
// projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear target
|
||||
//G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG);
|
||||
// projectile Cluster (probably as a part of proj Nucleus) colliding with nuclear Cluster
|
||||
//G4QSplitter(G4QNucleus projCluster, const G4bool projEnvFlag, const G4int targPDG,
|
||||
// const G4bool targEnvFlag); // Cluster can have target nuclear environment
|
||||
G4QSplitter(const G4QSplitter& right); // Copy the splitted system by value
|
||||
G4QSplitter(G4QSplitter* right); // Copy the splitted system by pointer
|
||||
~G4QSplitter(); // Public Destructor
|
||||
|
||||
// Overloaded operators
|
||||
const G4QSplitter& operator=(const G4QSplitter& right); // Copy the splitted system
|
||||
G4bool operator==(const G4QSplitter &right) const; // Compare two splitted systems
|
||||
G4bool operator!=(const G4QSplitter &right) const; // Compare two splitted systems
|
||||
|
||||
//Selectors
|
||||
G4bool GetProjEnvFlag(); // Flag of nuclear environment around the projectile
|
||||
G4bool GetTargEnvFlag(); // Flag of nuclear environment around the target
|
||||
G4QuasmonVector* GetQuasmons(); // Get not decayed Quasmons (User must ClearAndDestr)
|
||||
G4QHadronVector* GetHadrons(); // Get current outputHadrons (User must ClearAndDestr)
|
||||
G4double GetWeight(); // Get weight of the event (?)
|
||||
G4int GetNOfHadrons(); // Get the number of created G4QHadrons
|
||||
G4int GetNOfQuasmons(); // Get the number of created G4Quasmons
|
||||
// Modifiers (Output: a Vector of Quasmons for fragmentation, some Quasms can be Hadrons)
|
||||
G4QHadronVector* Fragment(); // User must clear and destroy the G4QHadronVector
|
||||
|
||||
// Static functions
|
||||
//static void SetParameters(G4double StParName=0., G4bool stFlag=false);
|
||||
|
||||
private:
|
||||
G4QHadronVector HadronizeQString(); // Main HadronizationFunction used in Fragment()
|
||||
G4double RandomizeMomFractionFree(G4int nPart); // RandomMomFrac for nPart free partons
|
||||
G4double RandomizeMomFractionString(G4int nPart); // RandomMomFrac for nPart free partons
|
||||
|
||||
// Body
|
||||
private:
|
||||
// Static Parameters
|
||||
//static G4double StParName; // Example of static parameter (see SetParameters)
|
||||
|
||||
// Body
|
||||
G4bool theProjEnvFlag; // Projectile Environment Flag
|
||||
G4bool theTargEnvFlag; // Target Environment Flag
|
||||
G4QContent theProjQC; // Projectile Quark Content
|
||||
G4QContent theTargQC; // Target Quark Content
|
||||
G4LorentzVector theProj4Mom; // Projectile 4-momentum
|
||||
G4LorentzVector theTarg4Mom; // Target 4-momentum
|
||||
// Internal Quasmons
|
||||
G4QuasmonVector theQuasmons; // Vector of generated secondary Quasmons
|
||||
// Output Hadrons
|
||||
G4QHadronVector theQHadrons; // Vector of generated output Hadrons
|
||||
|
||||
// Internal working parameters
|
||||
G4QCHIPSWorld* theWorld; // the CHIPS World
|
||||
G4LorentzVector tot4Mom; // Total 4-momentum in the reaction
|
||||
G4int totCharge; // Total charge in the reaction (for current control)
|
||||
G4int totBaryNum; // Total baryon number in the reaction (for cur.cont.)
|
||||
G4double theWeight; // Weight of the event
|
||||
};
|
||||
|
||||
//General function makes Random Unit 3D-Vector
|
||||
G4ThreeVector RndmDir(); // @@ ??
|
||||
|
||||
// Inline functions
|
||||
inline G4bool G4QSplitter::operator==(const G4QSplitter &rhs) const {return this == &rhs;}
|
||||
inline G4bool G4QSplitter::operator!=(const G4QSplitter &rhs) const {return this != &rhs;}
|
||||
|
||||
#endif
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Quasmon.hh,v 1.37 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4Quasmon ----------------
|
||||
// by Mikhail Kossov, July 1999.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QuasmonString.hh,v 1.3 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QuasmonString ----------------
|
||||
// by Mikhail Kossov, October 2004.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QuasmonVector.hh,v 1.18 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QuasmonVector ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QCHIPSWorld.cc,v 1.31 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCHIPSWorld ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QCandidate.cc,v 1.32 2005/05/13 16:14:59 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCandidate ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QChipolino.cc,v 1.30 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QChipolino ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QContent.cc,v 1.39 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QContent ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QDecayChan.cc,v 1.25 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QDecayChan ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QEnvironment.cc,v 1.110 2005/05/31 08:23:52 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QEnvironment ----------------
|
||||
// by Mikhail Kossov, August 2000.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QException.cc,v 1.8 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QException ----------------
|
||||
// by Mikhail Kossov, November 2003.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QHadron.cc,v 1.41 2005/05/20 12:07:37 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QHadron ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QIsotope.cc,v 1.5 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QIsotope.cc,v 1.6 2005/11/30 16:31:03 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QIsotope class ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -1561,31 +1561,18 @@ G4int G4QIsotope::InitElement(G4int Z, G4int index, // Ret: -1 - Empty, -2 - Wro
|
||||
{
|
||||
G4int I=abund->size();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QIsotope::InitElement is called with nI="<<I<<" pairs"<<G4endl;
|
||||
G4cout<<"G4QIsotope::InitElement: called with I="<<I<<" pairs,Z="<<Z<<",i="<<indexG4endl;
|
||||
#endif
|
||||
if(I<=0)
|
||||
{
|
||||
G4cerr<<"--Worning--G4QIsotope::InitEl:(-1)0VectorOfNewEl,Z="<<Z<<",i="<<index<<G4endl;
|
||||
return -1;
|
||||
return -2;
|
||||
}
|
||||
G4int mind=0; // Prototype of the maximum existing index for this Z
|
||||
G4bool found=false; // Prototype of the"ZWithTheSameIndex is found" event
|
||||
G4int nE=newElems.size(); // A number of definitions in the newElements vector
|
||||
if(nE) for(G4int i=0; i<nE; i++) // LOOP over new UserDefinedElements
|
||||
if(IsDefined(Z,index)) // This index is already defined
|
||||
{
|
||||
G4int zin=newElems[i]->first;
|
||||
G4int zi=zin%1000; // Existing Z
|
||||
G4int in=zin/1000; // Existing index
|
||||
if(Z==zi) // The new Element with the same Z is found
|
||||
{
|
||||
if(in<=index) found=true;
|
||||
if(in>mind) mind=in;
|
||||
}
|
||||
G4cerr<<"-Worning-G4QIsotope::InitEl:VONewEl,Z="<<Z<<",ind="<<index<<" exists"<<G4endl;
|
||||
return index;
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QIsotope::InitElement: nE="<<nE<<",ind="<<index<<",found="<<found<<G4endl;
|
||||
#endif
|
||||
if(found || index<=0) index=mind+1; // IndexExists or Small: mustBeSubstituted by 1stFree
|
||||
G4int ZInd=1000*index+Z; // Fake Z increased by the UserDefinedIndex
|
||||
vector<pair<G4int,G4double>*>*A = new vector<pair<G4int,G4double>*>;
|
||||
vector<pair<G4int,G4double>*>*S = new vector<pair<G4int,G4double>*>;
|
||||
@@ -1653,7 +1640,7 @@ G4int G4QIsotope::InitElement(G4int Z, G4int index, // Ret: -1 - Empty, -2 - Wro
|
||||
return index;
|
||||
}
|
||||
|
||||
// The highest index defined for Element with Z (Index>0 correspondToUserDefinedElements)
|
||||
// The highest index defined for Element with Z (Index>0 correspondToUserDefinedElements)
|
||||
G4int G4QIsotope::GetLastIndex(G4int Z) // Returns theLastDefinedIndex (if onlyNatural: =0)
|
||||
// =================================
|
||||
{
|
||||
@@ -1671,6 +1658,30 @@ G4int G4QIsotope::GetLastIndex(G4int Z) // Returns theLastDefinedIndex (if onlyN
|
||||
}
|
||||
return mind;
|
||||
}
|
||||
|
||||
// Indices can have differen numbers (not 1,2,3,...) & in different sequences (9,3,7,...)
|
||||
G4bool G4QIsotope::IsDefined(G4int Z, G4int Ind) // Ind is an index to be found (true)
|
||||
// ==========================================
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QIsotope::IsDefined is called Z="<<Z<<", I="<<Ind<<G4endl;
|
||||
#endif
|
||||
if(Ind<=0)
|
||||
{
|
||||
if(Ind<0) G4cerr<<"-W-G4QIsotope::IsDefined: Z="<<Z<<", Ind="<<Ind<<" < 0->=0"<<G4endl;
|
||||
return true; // to avoid definition with the negative index
|
||||
}
|
||||
G4int nE=newElems.size(); // A number of definitions in the newElements vector
|
||||
if(nE) for(G4int i=0; i<nE; i++) // LOOP over new UserDefinedElements
|
||||
{
|
||||
G4int zin=newElems[i]->first;
|
||||
G4int zi=zin%1000; // Existing Z
|
||||
G4int in=zin/1000; // Existing index
|
||||
if(Z==zi && Ind==in) return true; // The index for the element Z is found
|
||||
}
|
||||
return false; // The index for the element Z is not found
|
||||
}
|
||||
|
||||
// A#ofNeutrons in theElement with Z & UserDefIndex. Universal for Nat(index=0) & UserDefEl
|
||||
G4int G4QIsotope::GetNeutrons(G4int Z, G4int index) // If theElem doesn't exist, returns <0
|
||||
// =============================================
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QNucleus.cc,v 1.53 2005/05/23 09:39:33 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QNucleus ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QPDGCode.cc,v 1.50 2005/03/24 16:06:06 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QPDGCode.cc,v 1.51 2005/07/06 07:04:22 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QPDGCode ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
@@ -1897,7 +1897,7 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
|
||||
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;
|
||||
G4cout<<"**G4QPDGCode::CalcNuclMass:A="<<A<<"<1 || Z="<<Z<<"<0 || N="<<N<<"<0"<<G4endl;
|
||||
//@@throw G4QException("***G4QPDGCode::GetNuclMass: Impossible nucleus");
|
||||
#endif
|
||||
return 0.; // @@ Temporary
|
||||
@@ -1908,10 +1908,15 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
|
||||
else
|
||||
{
|
||||
//G4double fA=A;
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A))m=k+G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
else if(A==256 && Z==128) m=256000.;
|
||||
else
|
||||
m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass();
|
||||
// IsInTable is inside G4NucleiProperties::GetNuclearMass
|
||||
// G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm) creates new Ion!
|
||||
if(A==256 && Z==128) m=256000.;
|
||||
else m=k+G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
//if(G4NucleiPropertiesTable::IsInTable(Z,A))
|
||||
// m=k+G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
//else if(A==256 && Z==128) m=256000.;
|
||||
//else
|
||||
// m=k+G4ParticleTable::GetParticleTable()->FindIon(Z,A,0,Z)->GetPDGMass();
|
||||
//m+=-sh[Z]-sh[N]+b1*D*D*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*D)))+Z*Z*(b5*pow(fA,b9)+b6/fA);
|
||||
}
|
||||
//@@//G4double maxM= k+Z*mP+N*mN+S*mL+eps; // @@ eps -- Wings of the Mass parabola
|
||||
@@ -1946,13 +1951,16 @@ G4double G4QPDGCode::CalculateNuclMass(G4int z, G4int n, G4int s)
|
||||
//else if(Nm<=9&&Zm<=9) mm+=1.433e-5*pow(double(Zm),2.39)-Zm*me+c[Nm-1][Zm-1];// Geant4
|
||||
else
|
||||
{
|
||||
// IsInTable is inside G4NucleiProperties::GetNuclearMass
|
||||
// G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm) creates new Ion!
|
||||
mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm);
|
||||
//G4double fA=Am;
|
||||
if(G4NucleiPropertiesTable::IsInTable(Zm,Am))
|
||||
mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm);
|
||||
else
|
||||
mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass();
|
||||
//mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm)))
|
||||
// +Zm*Zm*(b5*pow(fA,b9)+b6/Am);
|
||||
//if(G4NucleiPropertiesTable::IsInTable(Zm,Am))
|
||||
// mm=km+G4NucleiProperties::GetNuclearMass(Am,Zm);
|
||||
//else
|
||||
// mm=km+G4ParticleTable::GetParticleTable()->FindIon(Zm,Am,0,Zm)->GetPDGMass();
|
||||
// //mm+=-sh[Zm]-sh[Nm]+b1*Dm*Dm*pow(fA,b2)+b3*(1.-2./(1.+exp(b4*Dm)))
|
||||
// // +Zm*Zm*(b5*pow(fA,b9)+b6/Am);
|
||||
}
|
||||
//@@//G4double mM= km+Zm*mP+Nm*mN+eps;
|
||||
//@@//if(mm>mM) mm=mM;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QPDGToG4Particle.cc,v 1.4 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QG4ToG4Particle singletone class ------------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParentCluster.cc,v 1.23 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QParentCluster ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4QParticle.cc,v 1.31 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QParticle ----------------
|
||||
// by Mikhail Kossov, Sept 1999.
|
||||
|
||||
@@ -0,0 +1,931 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// 1 2 3 4 5 6 7 8 9
|
||||
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
//
|
||||
//
|
||||
// $Id: G4QSplitter.cc,v 1.1 2005/08/30 07:15:14 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QSplitter ----------------
|
||||
// by Mikhail Kossov, August 2005.
|
||||
// class for Hadron-Hadron String Interaction used by the CHIPS Model
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
//#define chdebug
|
||||
//#define debug
|
||||
//#define sdebug
|
||||
//#define ppdebug
|
||||
//#define cdebug
|
||||
//#define cldebug
|
||||
//#define edebug
|
||||
//#define fdebug
|
||||
//#define pdebug
|
||||
//#define rdebug
|
||||
//#define ffdebug
|
||||
//#define pcdebug
|
||||
//#define mudebug
|
||||
|
||||
#include "G4QSplitter.hh"
|
||||
#include <cmath>
|
||||
using namespace std;
|
||||
|
||||
G4QSplitter::G4QSplitter(G4QHadron projHadron, const G4bool projEnvFlag,
|
||||
const G4int targPDG, const G4bool targEnvFlag) :
|
||||
theProjEnvFlag(projEnvFlag), theTargEnvFlag(targEnvFlag), theWeight(1.)
|
||||
{
|
||||
static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
//static const G4double Temperature = 180.; // Temperature as a parameter
|
||||
//static const G4double Temp2 = Temperature*Temperature; // Squared Temperature
|
||||
theWorld= G4QCHIPSWorld::Get(); // Get a pointer to the CHIPS World
|
||||
#ifdef debug
|
||||
G4cout<<"-->G4QString::Constr:pPDG="<<projHadron.GetPDGCode()<<",tPDG="<<targPDG<<G4endl;
|
||||
#endif
|
||||
// Target initialization
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
totBaryNum= targQPDG.GetBaryNum(); // Only a Prototype
|
||||
totCharge = targQPDG.GetCharge(); // Only a Prototype
|
||||
theTargQC = targQPDG.GetQuarkContent();
|
||||
G4double tM = targQPDG.GetMass();
|
||||
theTarg4Mom = G4LorentzVector(0.,0.,0.,tM);
|
||||
G4QHadron targHadron(targQPDG,theTarg4Mom); // Target Hadron
|
||||
|
||||
// Projectile initialization
|
||||
theProj4Mom = projHadron.Get4Momentum();
|
||||
G4ThreeVector projBoost = theProj4Mom.boostVector(); // Projectile BoostVector to LS
|
||||
G4ThreeVector projRBoost= -projBoost; // Projevtile Boost vector to projectile CMS
|
||||
G4QPDGCode projQPDG(projHadron.GetPDGCode());
|
||||
theProjQC = projQPDG.GetQuarkContent();
|
||||
totBaryNum+= projQPDG.GetBaryNum(); // Final control value
|
||||
totCharge += projQPDG.GetCharge(); // Final control value
|
||||
tot4Mom = theProj4Mom+theTarg4Mom; // Final control value
|
||||
|
||||
G4double projM = projQPDG.GetMass();
|
||||
G4double projM2 = projM*projM;
|
||||
G4double pM2 = theProj4Mom.m2();
|
||||
G4double tM2 = tM*tM;
|
||||
G4double dM2 = fabs(pM2-projM2);
|
||||
if(dM2>1.) G4cout<<"-Warn-G4QS::Constr:dM2="<<dM2<<",M2="<<projM2<<",LVM2="<<pM2<<G4endl;
|
||||
G4double pM=sqrt(pM2); // @@ do we need pM ? @@ (in print)
|
||||
|
||||
// === Print out of the input information at Creation time & tot 4-mom Calculation ======
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QS::Cons:PQC="<<theProjQC<<",TQC="<<theTargQC<<",P4Mom="<<theProj4Mom<<
|
||||
theProj4Mom.m2()<<theProj4Mom.m()<<G4endl;
|
||||
G4cout<<"G4QSpl::Constr: tC="<<totCharge<<",tB="<<totBaryNum<<",tot4M="<<tot4Mom<<G4endl;
|
||||
#endif
|
||||
//G4int nP=theWorld->GetQPEntries(); // A#of init'ed particles in CHIPS World (@@?)
|
||||
//G4int nCl=nP-90; // A#of init'ed clusters in CHIPS World (@@?)
|
||||
//#ifdef pdebug
|
||||
//G4cout<<"G4QS:Const:Before QEX:n="<<nP<<G4endl;
|
||||
//#endif
|
||||
// @@@@@@ ===> Here the Quark Exchange Quasmon Creation must be added <=== @@@@@@
|
||||
// @@ --- old ---
|
||||
//G4int nQTarg=theTargQC.GetTot(); // a#of Quark-partons in the Target
|
||||
//G4int nQProj=theProjQC.GetTot(); // a#of Quark-partons in the Progectile
|
||||
// @@ --- new ---
|
||||
G4LorentzVector tSum=theProj4Mom+theTarg4Mom;
|
||||
G4double sumM=tM+pM;
|
||||
G4double dn=2.17*(tSum.m2()/sumM/sumM-1.); // additional partons (gluons) - real
|
||||
G4int np=static_cast<int>(dn); // additional partons (gluons) - basic int
|
||||
if(G4UniformRand()>1.-dn+np) np++; // randomized int additional partons(gluons)
|
||||
G4int nQTarg=theTargQC.GetTot()+np; // a#of Quark-partons in the Target
|
||||
G4int nQProj=theProjQC.GetTot()+np; // a#of Quark-partons in the Progectile
|
||||
// @@ --- new ---
|
||||
//G4int mQTarg=theTargQC.GetTot(); // a#of Quark-partons in the Target
|
||||
//G4int mQProj=theProjQC.GetTot(); // a#of Quark-partons in the Progectile
|
||||
////G4double tothM=tot4Mom.m()/2.; // C.M. mass of the protons
|
||||
////G4int nQCM=classG4Quasmon.CalculateNumberOfQPartons(tothM);
|
||||
//G4double tothM2=tot4Mom.m2()/4.; // C.M. mass of the protons
|
||||
//G4int nQCM=static_cast<int>((1.+sqrt(tothM2/Temp2+1.))/2.);
|
||||
//G4int nQTarg=nQCM; // a#of Quark-partons in the Target
|
||||
//if(nQTarg<mQTarg) nQTarg=mQTarg;
|
||||
//G4int nQProj=nQCM; // a#of Quark-partons in the Progectile
|
||||
//if(nQProj<mQProj) nQProj=mQProj;
|
||||
// @@ --- end ---
|
||||
G4double interc=1.; // @@ A parameter ?!
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSpl::Constr: nP="<<nQProj<<", nT="<<nQTarg<<", intercept="<<interc<<G4endl;
|
||||
#endif
|
||||
// @@ Now projectile can be only meson or baryon @@ -- @@ Improve for clusters @@ --
|
||||
G4LorentzVector pq4Mom(0.,0.,0.,0.); // Prototype of LV of quark of progectile
|
||||
G4double rPMass=0.; // Prototype of the residProjMass (Meson case)
|
||||
G4bool FreeFraF=false; // Prototype of the free exchange Flag
|
||||
if(G4UniformRand()<FreeFraF) FreeFraF=true;// Confirm the free exchange
|
||||
if(nQProj<2) G4cout<<"***G4QSpl::Constr: nQProj="<<nQProj<<"<2 ***Fata error***"<<G4endl;
|
||||
else if(nQProj>2) // ---> Baryon case (clusters are not implem.)
|
||||
{
|
||||
//if(nQProj>3)G4cout<<"-Wor-G4QS::Const:nQProj="<<nQProj<<">3 is not implem'd"<<G4endl;
|
||||
G4double xP=0.;
|
||||
if(FreeFraF) xP=RandomizeMomFractionFree(nQProj);
|
||||
else
|
||||
{
|
||||
xP=RandomizeMomFractionString(nQProj);
|
||||
theWeight*=pow(xP,interc);
|
||||
G4cout<<"************G4QS::C: string xP="<<xP<<G4endl;
|
||||
}
|
||||
rPMass = sqrt(pM2*(1.-xP)); // Residual Projectile mass
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QS::C: nQProj="<<nQProj<<", xProj="<<xP<<", rPMass="<<rPMass<<G4endl;
|
||||
#endif
|
||||
}
|
||||
G4LorentzVector pr4Mom(0.,0.,0.,rPMass); // Prototype of LV of the residual projectile
|
||||
G4bool projFl=false;
|
||||
G4bool targFl=false;
|
||||
G4bool tmpBl=projHadron.DecayIn2(pq4Mom,pr4Mom);
|
||||
if(tmpBl) projFl=true; // Proj decay is OK
|
||||
//if(projHadron.DecayIn2(pq4Mom,pr4Mom)) projFl=true;
|
||||
else G4cout<<"*Warning*G4QSplitter::Constr:ProjDecIn2 rpM="<<rPMass<<", pM="<<pM<<G4endl;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSpl::Con:"<<projFl<<" split PROJ in R4M="<<pr4Mom<<" & Q4M="<<pq4Mom<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector tq4Mom(0.,0.,0.,0.); // Prototype of LV of quark of the target
|
||||
//if(nQTarg<3)G4cout<<"***G4QStr::Const: nQTarg="<<nQTarg<<"<3 ***FatalError***"<<G4endl;
|
||||
//if(nQTarg>3)G4cout<<"-W-G4QS::Const: nQTarg="<<nQTarg<<">3 is not implemented"<<G4endl;
|
||||
G4double xT=0.;
|
||||
if(FreeFraF) xT=RandomizeMomFractionFree(nQTarg);
|
||||
else
|
||||
{
|
||||
xT=RandomizeMomFractionString(nQTarg);
|
||||
theWeight*=pow(xT,interc);
|
||||
G4cout<<"************G4QS::C: string xT="<<xT<<G4endl;
|
||||
}
|
||||
G4double rTMass = sqrt(tM2*(1.-xT)); // Residual Target mass
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QS::C: nQTarg="<<nQTarg<<", xProj="<<xT<<", rTMass="<<rTMass<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector tr4Mom(0.,0.,0.,rTMass); // Prototype of LV of the residual projectile
|
||||
if(targHadron.DecayIn2(tq4Mom,tr4Mom)) targFl=true; // Targ decay is OK
|
||||
else G4cout<<"**Worning**G4QStr::Constr:TargDecIn2 rtM="<<rTMass<<", tM="<<tM<<G4endl;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::Con:"<<targFl<<" split TARG in R4M="<<tr4Mom<<" & Q4M="<<tq4Mom<<G4endl;
|
||||
#endif
|
||||
G4bool elasFl=false; // ByDefault avoid the elastic scattering
|
||||
if (targFl && projFl) // --- @@ Now only for pp case @@ ---
|
||||
{
|
||||
G4LorentzVector newProj4M=pr4Mom+tq4Mom;
|
||||
G4double nPM2=newProj4M.m2();
|
||||
G4double npM=sqrt(nPM2);
|
||||
G4bool pcorFl=false; // ByDefault no MassSh correction for newProj.
|
||||
// @@ Just to try ---- Start
|
||||
//G4LorentzVector newTarg4M=tr4Mom+pq4Mom;
|
||||
//G4double nTM2=newTarg4M.m2();
|
||||
//G4double ntM=sqrt(nTM2);
|
||||
#ifdef pdebug
|
||||
//G4cout<<"G4QStr::C:ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
|
||||
#endif
|
||||
//if(ntM<tM+mPi0 && npM<pM+mPi0) elasFl=true; // Target&Project are underMinMass => El
|
||||
// @@ Just to try ---- End
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QS::Cons: npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
|
||||
#endif
|
||||
if(npM<pM+mPi0) // The projectile is under min mass (@@ In Future put other cut @@)
|
||||
{
|
||||
G4double valk=tq4Mom.e(); // Momentum of the target quark
|
||||
//#ifdef pdebug
|
||||
G4double dvalk=valk-tq4Mom.rho();
|
||||
if(fabs(dvalk)>.00001) G4cout<<"***kp***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
|
||||
//#endif
|
||||
G4double dmas=pM2-pr4Mom.m2(); // Difference of squared masses
|
||||
G4double vale=pr4Mom.e();
|
||||
G4ThreeVector pr=pr4Mom.v();
|
||||
G4double valp=pr.mag();
|
||||
G4ThreeVector upr=pr/valp; // Unit vector in the pr direction
|
||||
G4double cost=-(dmas/(valk+valk)-vale)/valp; // Initial cos(theta)
|
||||
if(fabs(cost)>1.)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"***p***>>>G4QS::C: cost="<<cost<<G4endl;
|
||||
#endif
|
||||
// Get max value of |cos(theta)| and change tq value to get the pM on mass shell
|
||||
if(cost>0.) // --->>> cost>0.
|
||||
{
|
||||
valk=dmas/(vale-valp)/2; // Momentum is too big (must be reduced)
|
||||
G4ThreeVector tqf=upr*valk; // final targetQuark 3-vector
|
||||
tq4Mom.set(valk,tqf); // Fill new 4-mom for targetQuark
|
||||
tr4Mom.set(tM-valk,-tqf); // Fill new 4-mom for targetResidual
|
||||
newProj4M=tq4Mom+pr4Mom; // Final Projectile 4-mom in LS
|
||||
}
|
||||
else // --->>> cost<0.
|
||||
{
|
||||
G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
|
||||
if(hvalk>tM) // Momentum can not be increased to this value
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"**p-Cor**>G4QS::C: hvalk="<<hvalk<<" > tM="<<tM<<", dm="<<dmas<<", e="
|
||||
<<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
|
||||
#endif
|
||||
// Put the scatteredProjectile on the massShell, and rescatter the target quark
|
||||
G4LorentzVector tmpProj4M=newProj4M+pq4Mom; // TempCriticalCompound for Project
|
||||
newProj4M=G4LorentzVector(0.,0.,0.,pM); // New Project is on the mass shell
|
||||
G4QHadron tmpHadron(tmpProj4M); // Create a Hadron for decay
|
||||
pq4Mom=G4LorentzVector(0.,0.,0.,0.); // NewProjParton on lightMassShell
|
||||
tmpBl=tmpHadron.DecayIn2(newProj4M,pq4Mom); // Decay the Compound in newProg+pQ
|
||||
if(!tmpBl)G4cout<<"G4QS::C:DecIn2 err "<<sqrt(tmpProj4M.m2())<<"<"<<pM<<G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < tM="<<tM<<G4endl;
|
||||
#endif
|
||||
valk=hvalk/2; // Momentum is too small (must be reduced)
|
||||
G4ThreeVector tqf=upr*(-valk); // Final targetQuark 3-vector
|
||||
tq4Mom.set(valk,tqf); // Fill new 4-mom for targetQuark
|
||||
tr4Mom.set(tM-valk,-tqf); // Fill new 4-mom for targetResidual
|
||||
newProj4M=tq4Mom+pr4Mom;
|
||||
}
|
||||
}
|
||||
if(fabs(newProj4M.m()-pM)>.0001)G4cout<<"G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Turn the target quark-parton to the projectile residual in LS = CMSofTheTarget
|
||||
#ifdef pdebug
|
||||
G4cout<<"---p--->>>G4QS::C: cost="<<cost<<G4endl;
|
||||
#endif
|
||||
G4ThreeVector tq=tq4Mom.v(); // 3-mom of the targetQ (LS)
|
||||
G4double tqlp=upr.dot(tq); // Projection of tq on the projectile
|
||||
G4ThreeVector tql=upr*tqlp; // tq part along pr
|
||||
G4ThreeVector tqt=tq-tql; // tq part perpendicular to pr
|
||||
G4double cosi=tqlp/valk; // Initial cos(theta)
|
||||
G4ThreeVector tqlf=tql*(cost/cosi); // final tq part along pr
|
||||
G4double sini=sqrt(1.-cosi*cosi); // Initial sin(theta)
|
||||
G4double sint=sqrt(1.-cost*cost); // Desired sin(theta)
|
||||
G4ThreeVector tqpf=tqt*(sint/sini); // final tq part perpendicular pr
|
||||
G4ThreeVector tqf=tqlf+tqpf; // final tq
|
||||
tq4Mom.setV(tqf); // Change the momentum direction of targetQ
|
||||
tr4Mom.setV(-tqf); // Change the momentum direction of targetR
|
||||
if(fabs(tqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<tqf.mag()<<","<<valk<<G4endl;
|
||||
newProj4M=tq4Mom+pr4Mom;
|
||||
if(fabs(newProj4M.m()-pM)>.001)G4cout<<"*G4QS::C:"<<newProj4M.m()<<","<<pM<<G4endl;
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::C: Proj under GS, newP4M="<<newProj4M<<", pq4M="<<pq4Mom<<G4endl;
|
||||
#endif
|
||||
pcorFl=true; // Projectile is on the GS mass shell
|
||||
}
|
||||
G4bool tcorFl=false; // ByDefault no MassSh correction for newTarg.
|
||||
G4LorentzVector newTarg4M=tr4Mom+pq4Mom;
|
||||
G4double nTM2=newTarg4M.m2();
|
||||
G4double ntM=sqrt(nTM2);
|
||||
//newTarg4M=tr4Mom+pq4Mom;
|
||||
//nTM2=newTarg4M.m2();
|
||||
//ntM=sqrt(nTM2);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::C: ntM="<<ntM<<" <? tM="<<tM<<"+mPi0="<<mPi0<<" = "<<tM+mPi0<<G4endl;
|
||||
#endif
|
||||
if(ntM<tM+mPi0 && !pcorFl) // The target is under min mass (@@ InFut put another cut@@)
|
||||
{
|
||||
// Turn the projectile quark-parton to the target rsidual in CMS of the Projectile
|
||||
G4LorentzVector pqc4M=pq4Mom; // projectileQuark => projCM system <step1>
|
||||
pqc4M.boost(projRBoost); // projectileQuark => projCM system <step2>
|
||||
G4double valk=pqc4M.e(); // Momentum of the target quark in projCM
|
||||
//#ifdef pdebug
|
||||
G4double dvalk=valk-pqc4M.rho();
|
||||
if(fabs(dvalk)>.00001) G4cout<<"***kt***G4QS::C:vk="<<valk<<",dvk="<<dvalk<<G4endl;
|
||||
//#endif
|
||||
G4double dmas=tM2-tr4Mom.m2(); // Difference of squared masses (targ - targRes)
|
||||
G4LorentzVector trc4M=tr4Mom; // targetResidual => projCM system <step1>
|
||||
trc4M.boost(projRBoost); // targetResidual => projCM system <step2>
|
||||
G4double vale=trc4M.e(); // Energy of the targetResidual in projCM
|
||||
G4ThreeVector tr=trc4M.v(); // 3-mom of the targetResidual in projCM
|
||||
G4double valp=tr.mag(); // momentum of the targetResidual in projCM
|
||||
if(fabs(dmas-tM2+trc4M.m2())>.1) G4cout<<"**t**G4QS::C: trM2="<<tr4Mom.m2()<<"="
|
||||
<<trc4M.m2()<<","<<vale*vale-valp*valp<<G4endl;
|
||||
G4ThreeVector utr=tr/valp; // Unit vector in the tr direction in projCM
|
||||
G4double cost=-(dmas/(valk+valk)-vale)/valp; // Initial cos(theta)
|
||||
if(fabs(cost)>1.)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"***t***>>>G4QS::C: cost="<<cost<<G4endl;
|
||||
#endif
|
||||
// Get max value of |cos(theta)| and change pq value to get the tM on mass shell
|
||||
if(cost>0.) // --->>> cost>0.
|
||||
{
|
||||
valk=dmas/(vale-valp)/2; // Momentum is too big (must be reduced)
|
||||
G4ThreeVector pqf=utr*valk; // final projectileQuark 3-vector
|
||||
G4LorentzVector pqc4M(valk,pqf); // Fill new 4-mom for projectileQuark in CM
|
||||
pq4Mom=pqc4M; // <step1> // Fill new 4-mom for projectileQuark in LS
|
||||
pq4Mom.boost(projBoost); // <step2> // Fill new 4-mom for projectileQuark in LS
|
||||
G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResidual in CM
|
||||
pr4Mom=prc4M; // <step1> // Fill new 4-mom for projectResidual in LS
|
||||
pr4Mom.boost(projBoost); // <step2> // Fill new 4-mom for projectResidual in LS
|
||||
newTarg4M=pq4Mom+tr4Mom; // Final Target 4-mom in LS
|
||||
}
|
||||
else // --->>> cost<-1 => cost=-1
|
||||
{
|
||||
G4double hvalk=dmas/(vale+valp); // Momentum's too small (must be increased, LIM)
|
||||
if(hvalk>pM) // Momentum can not be increased to this value
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"**t-Cor**>G4QS::C: hvalk="<<hvalk<<" > pM="<<pM<<", dm="<<dmas<<", e="
|
||||
<<vale<<", p="<<valp<<", ct="<<cost<<G4endl;
|
||||
#endif
|
||||
// Put the scatteredProjectile on the massShell, rescatter the targetQuark (LS)
|
||||
G4LorentzVector tmpTarg4M=newTarg4M+tq4Mom; // TempCriticalCompound for Target
|
||||
newTarg4M=G4LorentzVector(0.,0.,0.,tM); // New Target is on the mass shell
|
||||
G4QHadron tmpHadron(tmpTarg4M); // Create a CompHadron for decay
|
||||
tq4Mom=G4LorentzVector(0.,0.,0.,0.); // NewTargParton on lightMassShell
|
||||
tmpBl=tmpHadron.DecayIn2(newTarg4M,tq4Mom); // Decay the Compound in newTarg+tQ
|
||||
if(!tmpBl)G4cout<<"G4QS::C:DecIn2-err "<<sqrt(tmpTarg4M.m2())<<"<"<<tM<<G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"***---***>G4QS::C: hvalk="<<hvalk<<" < pM="<<pM<<G4endl;
|
||||
#endif
|
||||
valk=hvalk/2; // Momentum is too small (mustBeIncreased)
|
||||
G4ThreeVector pqf=utr*(-valk); // Final projectileQuark 3-vector in CM
|
||||
G4LorentzVector pqc4M(valk,pqf); // Fill new 4-mom for projectQuark in CM
|
||||
pq4Mom=pqc4M; // <step1> // Fill new 4-mom for projectQuark in LS
|
||||
pq4Mom.boost(projBoost); // <step1> // Fill new 4-mom for projectQuark in LS
|
||||
G4LorentzVector nTc4M=pqc4M+trc4M;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QS::C:After Boost="<<projBoost<<G4endl;
|
||||
G4cout<<"G4QS::C:Aft: q="<<pqc4M<<pqc4M.m2()<<",t="<<nTc4M<<nTc4M.m2()<<G4endl;
|
||||
G4cout<<"G4QS::C:E="<<nTc4M.e()<<" = q="<<pqc4M.e()<<"="<<valk<<" + r="<<
|
||||
trc4M.e()<<"="<<vale<<" = "<<pqc4M.e()+trc4M.e()<<",c="<<pq4Mom<<G4endl;
|
||||
if(fabs(nTc4M.m()-tM)>.0001) G4cout<<"*G4QS::C:"<<nTc4M.m()<<"!="<<tM<<G4endl;
|
||||
G4double pp=pqf.dot(tr); // trc3M*pqc=-valk*valp
|
||||
G4double ee=vale*valk;
|
||||
G4cout<<"G4QS::C:tM2="<<tM2<<"="<<tM*tM<<",pp="<<pp*2<<"="<<-valk*valp*2<<",d="
|
||||
<<ee-pp<<"="<<dmas<<"="<<(tM2-trc4M.m2())<<",u="<<utr.dot(utr)<<G4endl;
|
||||
G4double sen=nTc4M.e();
|
||||
G4double smo=nTc4M.rho();
|
||||
G4cout<<"G4QS::C:qM2="<<pqc4M.m2()<<",rM2="<<trc4M.m2()<<",E="<<sen<<"="<<
|
||||
vale+valk<<",P="<<smo<<"="<<valp-valk<<",M="<<sqrt(sen*sen-smo*smo)<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector prc4M(pM-valk,-pqf); // Fill new 4-mom for projectResid in CM
|
||||
pr4Mom=prc4M; // <step1> // Fill new 4-mom for projectResid in LS
|
||||
pr4Mom.boost(projBoost); // <step2> // Fill new 4-mom for projectResid in LS
|
||||
newTarg4M=pq4Mom+tr4Mom;
|
||||
}
|
||||
}
|
||||
if(fabs(newTarg4M.m()-tM)>.0001)
|
||||
G4cout<<"******************************G4QS::C:"<<newTarg4M.m()<<"="<<pM<<G4endl;
|
||||
}
|
||||
else // -1<cos(theta)<1 - only rotate the projQ
|
||||
{
|
||||
// Turn the projectile quark-parton to the target residual in CMS of the Projectile
|
||||
#ifdef pdebug
|
||||
G4cout<<"---t--->>>G4QS::C: cost="<<cost<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector prc4M=pr4Mom; // projectileQuark => projCM system <step1>
|
||||
prc4M.boost(projRBoost); // projectileQuark => projCM system <step2>
|
||||
G4ThreeVector pq=pqc4M.v(); // 3-vector of the projQ in projCM
|
||||
G4double pqlp=utr.dot(pq); // Projection of pq on the target in projCM
|
||||
G4ThreeVector pql=utr*pqlp; // pq part along pr
|
||||
G4ThreeVector pqt=pq-pql; // pq part perpendicular to tr in projCM
|
||||
G4double cosi=pqlp/valk; // Initial cos(theta)
|
||||
G4ThreeVector pqlf=pql*(cost/cosi); // final pq part along tr
|
||||
G4double sini=sqrt(1.-cosi*cosi); // Initial sin(theta)
|
||||
G4double sint=sqrt(1.-cost*cost); // Desired sin(theta)
|
||||
G4ThreeVector pqpf=pqt*(sint/sini); // final pq part perpendicular tr
|
||||
G4ThreeVector pqf=pqlf+pqpf; // final pq
|
||||
pqc4M.setV(pqf); // Change the momentumDirection of projQ(CM)
|
||||
pq4Mom=pqc4M; // Fill new 4-mom for projQuark in LS<step1>
|
||||
pq4Mom.boost(projBoost); // Fill new 4-mom for projQuark in LS<step2>
|
||||
prc4M.setV(-pqf); // Change the momentumDirection of projR(CM)
|
||||
#ifdef pdebug
|
||||
G4LorentzVector nT4M=pqc4M+trc4M;
|
||||
if(fabs(nT4M.m()-tM)>.001)G4cout<<"****t****G4QS::C:M="<<nT4M.m()<<"="<<tM<<G4endl;
|
||||
#endif
|
||||
pr4Mom=prc4M; // <step1> // Fill new 4-mom for projResidual in LS
|
||||
pr4Mom.boost(projBoost); // <step2> // Fill new 4-mom for projResidual in LS
|
||||
if(fabs(pqf.mag()-valk)>.0001)G4cout<<"*G4QS::C:||="<<pqf.mag()<<"="<<valk<<G4endl;
|
||||
newTarg4M=pq4Mom+tr4Mom;
|
||||
if(fabs(newTarg4M.m()-tM)>.001)G4cout<<"*G4QS::C:"<<newTarg4M.m()<<"="<<tM<<G4endl;
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::C: Targ under GS, newT4M="<<newTarg4M<<", tq4M="<<tq4Mom<<G4endl;
|
||||
#endif
|
||||
tcorFl=true; // Target is on the GS mass shell
|
||||
newProj4M=pr4Mom+tq4Mom; // Recalculate the Projectile (!)
|
||||
nPM2=newProj4M.m2();
|
||||
npM=sqrt(nPM2);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::C:npM="<<npM<<" <? pM="<<pM<<"+mPi0="<<mPi0<<" = "<<pM+mPi0<<G4endl;
|
||||
#endif
|
||||
if(npM<pM+mPi0) elasFl=true; // Force elastic scattering (@@InFut putAnotherCut@@)
|
||||
}
|
||||
else if(ntM<tM+mPi0) elasFl=true; // Force elastScattering (@@InFut put another cut@@)
|
||||
if(elasFl) // Ellastic scattering happened
|
||||
{
|
||||
// **** Put the hadrons on the mass shell conserving the CMS scattering angle ****
|
||||
G4LorentzVector theTot4M=theProj4Mom+theTarg4Mom;// 4-momentum of CMS of "targ+proj"
|
||||
G4ThreeVector cmsBoost = theTot4M.boostVector(); // CMS Boost Vector "CMS to LS"
|
||||
G4ThreeVector cmsRBoost= -cmsBoost; // CMS Boost Vector "LS to CMS"
|
||||
G4LorentzVector cmsProj4M=theProj4Mom; // LS projectile => CMS <step1>
|
||||
cmsProj4M.boost(cmsRBoost); // LS projectile => CMS <step2>
|
||||
G4LorentzVector cmsTarg4M=theTarg4Mom; // LS target => CMS <step1>
|
||||
cmsTarg4M.boost(cmsRBoost); // LS target => CMS <step2>
|
||||
G4double pcm=cmsProj4M.rho(); // CMS momentum for the elastic scattering
|
||||
//#ifdef pdebug
|
||||
if(fabs(cmsTarg4M.rho()-pcm) > 0.0001)
|
||||
G4cout<<"-Worning-G4QSplitter::Constr: P="<<cmsTarg4M.rho()<<"#"<<pcm<<G4endl;
|
||||
//#endif
|
||||
G4LorentzVector cmsNewPr4M=newProj4M; // LS finalProj => CMS <step1>
|
||||
cmsNewPr4M.boost(cmsRBoost); // LS finalProj => CMS <step2>
|
||||
G4ThreeVector puV=cmsNewPr4M.v()/cmsNewPr4M.rho(); // Direction of the projectile
|
||||
//#ifdef pdebug
|
||||
G4LorentzVector cmsNewTg4M=newTarg4M; // LS finalTarg => CMS <step1> @@ TMP
|
||||
cmsNewTg4M.boost(cmsRBoost); // LS finalTarg => CMS <step2> @@ TMP
|
||||
G4ThreeVector tuV=cmsNewTg4M.v()/cmsNewTg4M.rho(); // Direction of the projectile
|
||||
if(1.+puV.dot(tuV) > 0.001)
|
||||
G4cout<<"-Worning-G4QSplitter::Constr: ct="<<puV.dot(tuV)<<G4endl;
|
||||
//#endif
|
||||
cmsProj4M.setV(puV*pcm);
|
||||
newProj4M=cmsProj4M;
|
||||
newProj4M.boost(cmsBoost); // CMS FinalProjectile => LS <step2>
|
||||
G4QHadron* projH = new G4QHadron(projHadron); // Prototype of the Projectile Hadron
|
||||
projH->Set4Momentum(newProj4M);
|
||||
theQHadrons.push_back(projH); // Fill theProjectileHadron(delete equivalent)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::Constr: Fill ElastProjH="<<projQPDG<<newProj4M<<G4endl;
|
||||
#endif
|
||||
cmsTarg4M.setV(puV*(-pcm));
|
||||
newTarg4M=cmsTarg4M;
|
||||
newTarg4M.boost(cmsBoost); // CMS FinalTarget => LS <step2>
|
||||
G4QHadron* targH = new G4QHadron(targQPDG,newTarg4M); // Prototype of theTargetHadron
|
||||
theQHadrons.push_back(targH); // Fill the Target Hadron (delete equivalent)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::Constr: Fill ElastTargH="<<targQPDG<<newTarg4M<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// Inelastic scattering: one or both hadrons are excited (charge exchange is not in).
|
||||
if(pcorFl) // Projectile is on the mass shell
|
||||
{
|
||||
G4QHadron* projH = new G4QHadron(projHadron); // Prototype of the Projectile Hadron
|
||||
projH->Set4Momentum(newProj4M);
|
||||
theQHadrons.push_back(projH); // Fill theProjectileHadron(delete equivalent)
|
||||
G4Quasmon* targQ = new G4Quasmon(targQPDG.GetQuarkContent(),newTarg4M);
|
||||
theQuasmons.push_back(targQ); // Insert Projectile Quasmon (delete equival.)
|
||||
}
|
||||
if(tcorFl) // Target is on the mass shell
|
||||
{
|
||||
G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M);
|
||||
theQuasmons.push_back(projQ); // Insert Projectile Quasmon (delete equival.)
|
||||
G4QHadron* targH = new G4QHadron(targQPDG,newTarg4M);//Prototype of theTargetHadron
|
||||
theQHadrons.push_back(targH); // Fill the Target Hadron (delete equivalent)
|
||||
}
|
||||
else // Both are excited (two Quasmons only)
|
||||
{
|
||||
G4Quasmon* projQ = new G4Quasmon(projHadron.GetQC(),newProj4M);
|
||||
theQuasmons.push_back(projQ); // Insert Projectile Quasmon (delete equival.)
|
||||
G4Quasmon* targQ = new G4Quasmon(targQPDG.GetQuarkContent(),newTarg4M);
|
||||
theQuasmons.push_back(targQ); // Insert Projectile Quasmon (delete equival.)
|
||||
}
|
||||
}
|
||||
}
|
||||
else G4cout<<"-Wor-G4QSplitter::Constr:T="<<targFl<<" or P="<<projFl<<" err"<<G4endl;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::Constructor: *** End of Constructor ***, elF="<<elasFl<<G4endl;
|
||||
#endif
|
||||
// This is the first Check of the control values -- @@ Must be remade @@ --
|
||||
#ifdef chdebug
|
||||
G4int finCharge=0;
|
||||
G4int finBaryoN=0;
|
||||
G4int nHad=theQHadrons.size();
|
||||
if(nHad) for(G4int ih=0; ih<nHad; ih++)
|
||||
{
|
||||
finCharge+=theQHadrons[ih]->GetCharge();
|
||||
finBaryoN+=theQHadrons[ih]->GetBaryonNumber();
|
||||
}
|
||||
G4int nQuas=theQuasmons.size();
|
||||
if(nQuas) for(G4int iq=0; iq<nQuas; iq++)
|
||||
{
|
||||
finCharge+=theQuasmons[iq]->GetCharge();
|
||||
finBaryoN+=theQuasmons[iq]->GetBaryonNumber();
|
||||
}
|
||||
G4cout<<"G4QStr::C:nH="<<nHad<<",nQ="<<nQuas<<",C="<<finCharge<<",B="<<finBaryoN<<G4endl;
|
||||
if(finCharge!=totCharge || finBaryoN!=totBaryNum)
|
||||
{
|
||||
G4cerr<<"***G4QStr::C:tC="<<totCharge<<",C="<<finCharge<<",tB="<<totBaryNum
|
||||
<<",B="<<finBaryoN<<G4endl;
|
||||
if(nHad) for(G4int h=0; h<nHad; h++)
|
||||
{
|
||||
G4QHadron* cH = theQHadrons[h];
|
||||
G4cerr<<"::G4QS::C:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
|
||||
}
|
||||
if(nQuas) for(G4int q=0; q<nQuas; q++)
|
||||
{
|
||||
G4Quasmon* cQ = theQuasmons[q];
|
||||
G4cerr<<"::G4QS::C:q#"<<q<<",C="<<cQ->GetCharge()<<",QuarkCon="<<cQ->GetQC()<<G4endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // End of the G4QSplitter constructor
|
||||
|
||||
G4QSplitter::G4QSplitter(const G4QSplitter &right)
|
||||
{
|
||||
// theQuasmons (Vector)
|
||||
G4int nQ = right.theQuasmons.size();
|
||||
if(nQ) for(G4int iq=0; iq<nQ; iq++)
|
||||
{
|
||||
G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]);
|
||||
#ifdef fdebug
|
||||
G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
theQuasmons.push_back(curQ); // (delete equivalent)
|
||||
}
|
||||
theProjEnvFlag = right.theProjEnvFlag;
|
||||
theTargEnvFlag = right.theTargEnvFlag;
|
||||
theWeight = right.theWeight;
|
||||
theProjQC = right.theProjQC;
|
||||
theTargQC = right.theTargQC;
|
||||
theProj4Mom = right.theProj4Mom;
|
||||
theTarg4Mom = right.theTarg4Mom;
|
||||
|
||||
theWorld = right.theWorld;
|
||||
tot4Mom = right.tot4Mom;
|
||||
totCharge = right.totCharge;
|
||||
totBaryNum = right.totBaryNum;
|
||||
}
|
||||
|
||||
const G4QSplitter& G4QSplitter::operator=(const G4QSplitter &right)
|
||||
{// ========================================================================
|
||||
// theQuasmons (Vector)
|
||||
G4int nQ = right.theQuasmons.size();
|
||||
if(nQ) for(G4int iq=0; iq<nQ; iq++)
|
||||
{
|
||||
G4Quasmon* curQ = new G4Quasmon(right.theQuasmons[iq]);
|
||||
#ifdef fdebug
|
||||
G4cout<<"G4QS::CopyByVal:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
theQuasmons.push_back(curQ); // (delete equivalent)
|
||||
}
|
||||
theProjEnvFlag = right.theProjEnvFlag;
|
||||
theTargEnvFlag = right.theTargEnvFlag;
|
||||
theWeight = right.theWeight;
|
||||
theProjQC = right.theProjQC;
|
||||
theTargQC = right.theTargQC;
|
||||
theProj4Mom = right.theProj4Mom;
|
||||
theTarg4Mom = right.theTarg4Mom;
|
||||
|
||||
theWorld = right.theWorld;
|
||||
tot4Mom = right.tot4Mom;
|
||||
totCharge = right.totCharge;
|
||||
totBaryNum = right.totBaryNum;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4QSplitter::G4QSplitter(G4QSplitter* right)
|
||||
{
|
||||
// theQuasmons (Vector)
|
||||
G4int nQ = right->theQuasmons.size();
|
||||
if(nQ) for(G4int iq=0; iq<nQ; iq++)
|
||||
{
|
||||
G4Quasmon* curQ = new G4Quasmon(right->theQuasmons[iq]);
|
||||
#ifdef fdebug
|
||||
G4cout<<"G4QS::CopyByPoint:Q#"<<iq<<","<<curQ->GetQC()<<curQ->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
theQuasmons.push_back(curQ); // (delete equivalent)
|
||||
}
|
||||
theProjEnvFlag = right->theProjEnvFlag;
|
||||
theTargEnvFlag = right->theTargEnvFlag;
|
||||
theWeight = right->theWeight;
|
||||
theProjQC = right->theProjQC;
|
||||
theTargQC = right->theTargQC;
|
||||
theProj4Mom = right->theProj4Mom;
|
||||
theTarg4Mom = right->theTarg4Mom;
|
||||
|
||||
theWorld = right->theWorld;
|
||||
tot4Mom = right->tot4Mom;
|
||||
totCharge = right->totCharge;
|
||||
totBaryNum = right->totBaryNum;
|
||||
}
|
||||
|
||||
G4QSplitter::~G4QSplitter()
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"~G4QSplitter: before theQHadrons nH="<<theQHadrons.size()<<G4endl;
|
||||
#endif
|
||||
for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron());
|
||||
#ifdef debug
|
||||
G4cout<<"~G4QSplitter: before theQuasmons nQ="<<theQuasmons.size()<<G4endl;
|
||||
#endif
|
||||
for_each(theQuasmons.begin(), theQuasmons.end(), DeleteQuasmon());
|
||||
#ifdef debug
|
||||
G4cout<<"~G4QSplitter: === DONE ==="<<G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ================== Initialization of Static Parameters ============
|
||||
//G4double G4QSplitter::StParName=0.; // Static Parameter (Example)
|
||||
//G4bool G4QSplitter::stFlag=false; // Static Flag (Example)
|
||||
|
||||
// Fill the private static parameters
|
||||
//void G4QSplitter::SetParameters(G4double aStPar, G4bool aStFlag)
|
||||
//{// ====================================================================================
|
||||
// StParName=aStPar; // (Example)
|
||||
// stFlag=aStFlag; // (Example)
|
||||
//}
|
||||
|
||||
|
||||
//The public Hadronisation function with the Exception treatment (del respons. of User !)
|
||||
G4QHadronVector* G4QSplitter::Fragment()
|
||||
{// ========================== -- @@ Must be changed @@ --
|
||||
// Make the final check before filling the output -- @@ Must be changed @@ --
|
||||
#ifdef chdebug
|
||||
G4int fCharge=0;
|
||||
G4int fBaryoN=0;
|
||||
G4int nHad=theQHadrons.size();
|
||||
if(nHad) for(G4int ih=0; ih<nHad; ih++)
|
||||
{
|
||||
fCharge+=theQHadrons[ih]->GetCharge();
|
||||
fBaryoN+=theQHadrons[ih]->GetBaryonNumber();
|
||||
}
|
||||
G4int nQuas=theQuasmons.size();
|
||||
if(nQuas)for(G4int iqs=0; iqs<nQuas; iqs++)
|
||||
{
|
||||
fCharge+=theQuasmons[iqs]->GetCharge();
|
||||
fBaryoN+=theQuasmons[iqs]->GetBaryonNumber();
|
||||
}
|
||||
if(fCharge!=totCharge || fBaryoN!=totBaryNum)
|
||||
{
|
||||
G4cerr<<"***G4QS::Frag:tC="<<totCharge<<",C="<<fCharge<<",tB="<<totBaryNum
|
||||
<<",B="<<fBaryoN<<G4endl;
|
||||
if(nHad) for(G4int h=0; h<nHad; h++)
|
||||
{
|
||||
G4QHadron* cH = theQHadrons[h];
|
||||
G4cerr<<":G4QS::HQ:h#"<<h<<",QC="<<cH->GetQC()<<",PDG="<<cH->GetPDGCode()<<G4endl;
|
||||
}
|
||||
if(nQuas) for(G4int q=0; q<nQuas; q++)
|
||||
{
|
||||
G4Quasmon* cQ = theQuasmons[q];
|
||||
G4cerr<<":G4QS::HQ:q#"<<q<<",C="<<cQ->GetCharge()<<",QCont="<<cQ->GetQC()<<G4endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
G4QHadronVector dummy; // Prototype of the output G4QuasmonVector to avoid wornings
|
||||
G4QHadronVector* finalQHadrons = &dummy; // Prototype of the output G4QuasmonVector
|
||||
G4int nH = theQHadrons.size();
|
||||
if(nH)
|
||||
{
|
||||
for(G4int ih=0; ih<nH; ih++)
|
||||
{
|
||||
G4QHadron* curH = new G4QHadron(theQHadrons[ih]);
|
||||
finalQHadrons->push_back(curH); // deleted after the "while LOOP"
|
||||
}
|
||||
}
|
||||
for_each(theQuasmons.begin(),theQuasmons.end(),DeleteQuasmon()); //CleanUp Quasm's
|
||||
theQuasmons.clear();
|
||||
return finalQHadrons;
|
||||
} // End of the Fragmentation member function
|
||||
|
||||
//The public extraction of the number of the created (in Constructor) G4QHadrons
|
||||
G4int G4QSplitter::GetNOfHadrons() {return theQHadrons.size();}
|
||||
|
||||
//The public extraction of the number of the created (in Constructor) G4Quasmons
|
||||
G4int G4QSplitter::GetNOfQuasmons() {return theQuasmons.size();}
|
||||
|
||||
//The public extraction of the projectile environment flag ("true" - exists)
|
||||
G4bool G4QSplitter::GetProjEnvFlag() {return theProjEnvFlag;}
|
||||
|
||||
//The public extraction of the target environment flag ("true" - exists)
|
||||
G4bool G4QSplitter::GetTargEnvFlag() {return theTargEnvFlag;}
|
||||
|
||||
//The public Quasmons duplication with delete responsibility of User (!)
|
||||
G4QuasmonVector* G4QSplitter::GetQuasmons()
|
||||
{// ==============================
|
||||
G4int nQ=theQuasmons.size();
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::GetQuasmons is called nQ="<<nQ<<G4endl;
|
||||
#endif
|
||||
G4QuasmonVector* quasmons = new G4QuasmonVector; // Intermediate
|
||||
if(nQ) for(G4int iq=0; iq<nQ; iq++)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::GetQuasmons:Q#"<<iq<<",QPDG="<<theQuasmons[iq]->GetQPDG()<<",QQC="
|
||||
<<theQuasmons[iq]->GetQC()<<",Q4M="<<theQuasmons[iq]->Get4Momentum()<<G4endl;
|
||||
#endif
|
||||
if(theQuasmons[iq]->GetStatus())
|
||||
{
|
||||
G4Quasmon* curQ = new G4Quasmon(theQuasmons[iq]);
|
||||
quasmons->push_back(curQ); // (del. equiv. - user is responsibile)
|
||||
}
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::GetQuasmons ===OUT==="<<G4endl;
|
||||
#endif
|
||||
return quasmons;
|
||||
} // End of GetQuasmons
|
||||
|
||||
//The public Quasmons duplication with delete responsibility of User (!)
|
||||
G4QHadronVector* G4QSplitter::GetHadrons()
|
||||
{// =============================
|
||||
G4int nH=theQHadrons.size();
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::GetHadrons is called nH="<<nH<<G4endl;
|
||||
#endif
|
||||
G4QHadronVector* hadrons = new G4QHadronVector; // Intermediate
|
||||
if(nH) for(G4int ih=0; ih<nH; ih++)
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QStr::GetHadrons: H#"<<ih<<",QPDG="<<theQHadrons[ih]->GetQPDG()<<",QQC="
|
||||
<<theQHadrons[ih]->GetQC()<<",H_Mass="<<theQHadrons[ih]->GetMass()<<G4endl;
|
||||
#endif
|
||||
if(!theQHadrons[ih]->GetNFragments())
|
||||
{
|
||||
G4QHadron* curH = new G4QHadron(theQHadrons[ih]);
|
||||
hadrons->push_back(curH); // (del. equiv. - user is responsibile)
|
||||
}
|
||||
}
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QSplitter::GetHadrons ===OUT==="<<G4endl;
|
||||
#endif
|
||||
return hadrons;
|
||||
} // End of GetHadrons
|
||||
|
||||
// Randomize the momentum fraction for the CHIPS of nPart free partons [x*(1-x)^(n-2)]
|
||||
G4double G4QSplitter::RandomizeMomFractionFree(G4int nPart)
|
||||
{// ==============================================
|
||||
// @@ TMP --- Begin ---
|
||||
if(2>1)
|
||||
{
|
||||
if(nPart<2)
|
||||
{
|
||||
G4cerr<<"**G4QSplitter::RandMomFractionString: n="<<nPart<<" < 2, retun 0"<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4double x=0.5;
|
||||
if(nPart==2) return x; // GS meson
|
||||
G4double r=G4UniformRand();
|
||||
if(r==0.) return 0.;
|
||||
if(r==1.) return 1.;
|
||||
if (nPart==3) x=r; // GS baryon
|
||||
else if(nPart==4) x=1.-sqrt(r); // GS quaternion
|
||||
else x=1.-pow(r,1./(nPart-2.)); // nPart>4
|
||||
return x;
|
||||
}
|
||||
//if(nPart!=3) G4cerr<<"*>>>>>*G4QSplitter::RandMomFractionFree: n="<<nPart<<G4endl;
|
||||
// @@ TMP --- End ---
|
||||
if(nPart<2)
|
||||
{
|
||||
G4cerr<<"**G4QSplitter::RandMomFractionFree: n="<<nPart<<" < 2, retun 0."<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4double x=0.5;
|
||||
if(nPart==2) return x; // GS meson
|
||||
G4double r=G4UniformRand();
|
||||
if(r==0.) return 0.;
|
||||
if(r==1.) return 1.;
|
||||
if(nPart==3) x=sqrt(r); // GS baryon
|
||||
else if(nPart==4) // GS quaternion
|
||||
{
|
||||
if (r==0.5) x=0.5;
|
||||
else if(r<0.5) x=sqrt(r+r)*(.5+.1579*(r-.5));
|
||||
else x=1.-sqrt(2.-r-r)*(.5+.1579*(.5-r));
|
||||
}
|
||||
else
|
||||
{
|
||||
G4int n1=nPart-2;
|
||||
G4double r1=n1;
|
||||
G4double r2=r1-1.;
|
||||
G4double rr=r2/r1;
|
||||
G4double rp=pow(rr,n1);
|
||||
G4double p2=rp+rp;
|
||||
if (r==rr) x=p2;
|
||||
else
|
||||
{
|
||||
if(r<rr)
|
||||
{
|
||||
G4double pr=0.;
|
||||
G4double pra=0.;
|
||||
if(nPart>8)
|
||||
{
|
||||
if(nPart>10)
|
||||
{
|
||||
if(nPart>11) // >11
|
||||
{
|
||||
pr=.614/pow((nPart+1.25),.75);
|
||||
pra=.915/pow((nPart+6.7),1.75);
|
||||
}
|
||||
else // 11
|
||||
{
|
||||
pr=.09945;
|
||||
pra=.00667;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>9) // 10
|
||||
{
|
||||
pr=.1064;
|
||||
pra=.00741;
|
||||
}
|
||||
else // 9
|
||||
{
|
||||
pr=.11425;
|
||||
pra=.00828;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>6)
|
||||
{
|
||||
if(nPart>7) // 8
|
||||
{
|
||||
pr=.12347;
|
||||
pra=.00926;
|
||||
}
|
||||
else // 7
|
||||
{
|
||||
pr=.13405;
|
||||
pra=.01027;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>5) // 6
|
||||
{
|
||||
pr=.1454;
|
||||
pra=.01112;
|
||||
}
|
||||
else // 5
|
||||
{
|
||||
pr=.15765;
|
||||
pra=.00965;
|
||||
}
|
||||
}
|
||||
}
|
||||
x=pow((r/p2),(1.-rr+pra))*(rr+pr*(r-p2));
|
||||
}
|
||||
else
|
||||
{
|
||||
G4double sr=0.;
|
||||
if(nPart>8)
|
||||
{
|
||||
if(nPart>10)
|
||||
{
|
||||
if(nPart>11) sr=.86/(nPart+1.05); // >11
|
||||
else sr=.0774; // 11
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>9) sr=.0849; // 10
|
||||
else sr=.0938; // 9
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>6)
|
||||
{
|
||||
if(nPart>7) sr=.1047; // 8
|
||||
else sr=.1179; // 7
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nPart>5) sr=.1339; // 6
|
||||
else sr=.15135; // 5
|
||||
}
|
||||
}
|
||||
x=1.-sqrt((1.-r)/(1.-p2))*(1.-rr+sr*(p2-r));
|
||||
}
|
||||
}
|
||||
}
|
||||
return x;
|
||||
} // End of RandomizeMomFractionFree
|
||||
|
||||
// Randomize MomentumFraction for CHIPS of nPart partons for Pomeron exchange [(1-x)^(n-2)]
|
||||
G4double G4QSplitter::RandomizeMomFractionString(G4int nPart)
|
||||
{// ================================================
|
||||
if(nPart<2)
|
||||
{
|
||||
G4cerr<<"**G4QSplitter::RandMomFractionString: n="<<nPart<<" < 2, retun 0"<<G4endl;
|
||||
return 0.;
|
||||
}
|
||||
G4double x=0.5;
|
||||
if(nPart==2) return x; // GS meson
|
||||
G4double r=G4UniformRand();
|
||||
if(r==0.) return 0.;
|
||||
if(r==1.) return 1.;
|
||||
if (nPart==3) x=r; // GS baryon
|
||||
else if(nPart==4) x=1.-sqrt(r); // GS quaternion
|
||||
else x=1.-pow(r,1./(nPart-2.)); // nPart>4
|
||||
return x;
|
||||
} // End of RandomizeMomFractionString
|
||||
@@ -24,8 +24,8 @@
|
||||
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
//
|
||||
//
|
||||
// $Id: G4Quasmon.cc,v 1.83 2005/06/27 15:30:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4Quasmon.cc,v 1.84 2005/12/14 13:57:13 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4Quasmon ----------------
|
||||
// by Mikhail Kossov, July 1999.
|
||||
@@ -392,16 +392,27 @@ G4QHadronVector G4Quasmon::HadronizeQuasmon(G4QNucleus& qEnv, G4int nQuasms)
|
||||
}
|
||||
else q4Mom.setE(p);
|
||||
}
|
||||
G4double quasM= sqrt(qM2); // Current mass of Quasmon
|
||||
G4double tmpEq=q4Mom.e(); // Energy of Quasmon
|
||||
G4double tmpPq=q4Mom.rho(); // Momentum of Quasmon
|
||||
G4double quasM= sqrt(qM2); // Current mass of Quasmon
|
||||
G4double tmpEq=q4Mom.e(); // Energy of Quasmon
|
||||
G4double tmpPq=q4Mom.rho(); // Momentum of Quasmon
|
||||
if(tmpEq<tmpPq)
|
||||
{
|
||||
G4cerr<<"*G4Q::HQ:Boost,4M="<<q4Mom<<",P="<<tmpPq<<">E="<<tmpEq<<",Q="<<valQ<<G4endl;
|
||||
throw G4QException("G4Q::HQ:*TMP EXCEPTION - Tachionic boost");
|
||||
}
|
||||
G4double qurF=quasM/(tmpEq-tmpPq); // Factor for k Lor.Trans. to LS
|
||||
G4ThreeVector qltb = q4Mom.boostVector();// Boost vector for backward Lor.Trans. in LS
|
||||
G4cerr<<"*Warning*G4Quasmon::HQ:Boost in vacuum ,4M="<<q4Mom<<",P="<<tmpPq<<">E="
|
||||
<<tmpEq<<",Q="<<valQ<<G4endl;
|
||||
if(fabs(tmpEq-tmpPq)<.01 && !valQ.GetCharge() && !valQ.GetBaryonNumber()
|
||||
&& !valQ.GetStrangeness()) // Quantum numbers of a photon
|
||||
{
|
||||
q4Mom.setE(tmpPq);
|
||||
G4QHadron* gamH = new G4QHadron(22,q4Mom);
|
||||
FillHadronVector(gamH); // Fill Moving Environment (delete equivalent)
|
||||
KillQuasmon(); // This Quasmon is done
|
||||
qEnv=theEnvironment; // Update QEnvironment
|
||||
return theQHadrons; // The last decay of the quasmon...
|
||||
}
|
||||
else throw G4QException("G4Q::HQ: EXCEPTION - Not Recoverable Tachionic boost");
|
||||
}
|
||||
G4double qurF=quasM/(tmpEq-tmpPq); // Factor for k Lorentz Transformation to LS
|
||||
G4ThreeVector qltb = q4Mom.boostVector();// Boost vector for backward Lor.Trans. to LS
|
||||
//////////G4double b2=qltb.mag2(); // beta^2 of Quasmon
|
||||
#ifdef debug
|
||||
G4cout<<"G4Q::HQ: Quasm="<<q4Mom<<",qM="<<quasM<<",qQC="<<valQ<<G4endl;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901
|
||||
//
|
||||
//
|
||||
// $Id: G4QuasmonString.cc,v 1.3 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QuasmonString.cc,v 1.4 2005/11/30 16:31:03 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QuasmonString ----------------
|
||||
// by Mikhail Kossov, August 2000.
|
||||
@@ -767,7 +767,7 @@ G4QHadronVector* G4QuasmonString::GetHadrons()
|
||||
return hadrons;
|
||||
} // End of GetHadrons
|
||||
|
||||
// Randomize the momentum fraction for the CHIPS of nPart free partons [x*(1-x)^(n-2)]
|
||||
// Randomize the momentum fraction for the CHIPS of nPart free partons [x*(1-x)^(n-3)]
|
||||
G4double G4QuasmonString::RandomizeMomFractionFree(G4int nPart)
|
||||
{// ==============================================
|
||||
// @@ TMP --- Begin ---
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ElectroNuclearReaction.hh,v 1.22 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4ElectroNuclearReaction -- header file
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GammaNuclearReaction.hh,v 1.12 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4GammaNuclearReaction -- header file
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QANuMuNuclearCrossSection.hh,v 1.3 2005/11/30 16:26:42 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QANuMuNuclearCrossSection -- header file
|
||||
// M.V. Kossov, CERN-ITEP(Moscow), 20-DEC-2005
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
|
||||
//
|
||||
// Short description: this G4 singletone class calculates (nu_mu,mu) Nuclear cross section
|
||||
// (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
|
||||
// ****************************************************************************************
|
||||
|
||||
#ifndef G4QANuMuNuclearCrossSection_h
|
||||
#define G4QANuMuNuclearCrossSection_h 1
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include <vector>
|
||||
#include "Randomize.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4VQCrossSection.hh"
|
||||
|
||||
class G4QANuMuNuclearCrossSection : public G4VQCrossSection
|
||||
{
|
||||
protected:
|
||||
|
||||
G4QANuMuNuclearCrossSection() {};
|
||||
|
||||
public:
|
||||
|
||||
~G4QANuMuNuclearCrossSection() {};
|
||||
|
||||
static G4VQCrossSection* GetPointer(); // Gives a pointer to this singletone
|
||||
|
||||
G4double ThresholdEnergy(G4int Z, G4int N);
|
||||
|
||||
G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double Momentum);
|
||||
|
||||
G4int GetExchangePDGCode();
|
||||
|
||||
G4double GetDirectPart(G4double Q2);
|
||||
|
||||
G4double GetNPartons(G4double Q2);
|
||||
|
||||
G4double GetQEL_ExchangeQ2();
|
||||
|
||||
G4double GetNQE_ExchangeQ2();
|
||||
|
||||
// Get static members
|
||||
G4double GetLastTOTCS() {return lastSig;}
|
||||
G4double GetLastQELCS() {return lastQEL;}
|
||||
|
||||
private:
|
||||
G4int GetFunctions(G4int z, G4int n, G4double* t, G4double* q, G4double* e);
|
||||
G4double HighEnergyTX(G4double lE);
|
||||
G4double HighEnergyQE(G4double lE);
|
||||
|
||||
// Body
|
||||
private:
|
||||
static G4double lastSig; // Last calculated total cross section
|
||||
static G4double lastQEL; // Last calculated quasi-elastic cross section
|
||||
static G4int lastL; // Last bin used in the cross section TheLastBin
|
||||
static G4double lastE; // Last energy used in the cross section Energy
|
||||
static G4double* lastEN; // Pointer to the last array of the energy axis
|
||||
static G4double* lastTX; // Pointer to the last array of the total CS function
|
||||
static G4double* lastQE; // Pointer to the last array of the QE CS function
|
||||
};
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.hh,v 1.8 2005/06/04 13:08:23 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QCaptureAtRest.hh,v 1.1 2005/11/25 20:26:36 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
+23
-8
@@ -20,14 +20,14 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCollision.hh,v 1.3 2005/05/13 16:14:59 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QCollision.hh,v 1.4 2005/11/30 16:26:42 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCollision header ----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
// Header of G4QCollision class (mu-,pi-,K-) of the CHIPS Simulation Branch in GEANT4
|
||||
// -------------------------------------------------------------------------------
|
||||
// This is a unique CHIPS class for the Nuclear Capture At Rest Prosesses.
|
||||
// This is a unique CHIPS class for the Hadron-Nuclear Inelastic Interaction Prosesses.
|
||||
// -------------------------------------------------------------------------------
|
||||
// At present (Dec.04) only pi+/-, K+/- proton, neutron, antiproton and antineutron
|
||||
// collisions with protons are implemented, which are fundamental for the in matter
|
||||
@@ -91,9 +91,11 @@
|
||||
#include "G4QElectronNuclearCrossSection.hh"
|
||||
#include "G4QMuonNuclearCrossSection.hh"
|
||||
#include "G4QTauNuclearCrossSection.hh"
|
||||
#include "G4QNuMuNuclearCrossSection.hh"
|
||||
#include "G4QANuMuNuclearCrossSection.hh"
|
||||
#include "G4QuasmonString.hh"
|
||||
//<vector> is included in G4QIsotope.hh
|
||||
//#include <vector>
|
||||
#include "G4QPDGToG4Particle.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4QCollision : public G4VDiscreteProcess
|
||||
{
|
||||
@@ -127,13 +129,19 @@ public:
|
||||
|
||||
G4int GetNumberOfNeutronsInTarget();
|
||||
|
||||
// Static functions
|
||||
// Static functions ---------------------------------------------------------------------
|
||||
static void SetManual();
|
||||
static void SetStandard();
|
||||
static void SetParameters(G4double temper=180., G4double ssin2g=.1, G4double etaetap=.3,
|
||||
G4double fN=0., G4double fD=0., G4double cP=1., G4double mR=1.,
|
||||
G4int npCHIPSWorld=234, G4double solAn=.5, G4bool efFlag=false,
|
||||
G4double piTh=141.4,G4double mpi2=20000.,G4double dinum=1880.);
|
||||
static void SetPhotNucBias(G4double phnB=1.);
|
||||
static void SetWeakNucBias(G4double ccnB=1.);
|
||||
//--- End of static member functions ----------------------------------------------------
|
||||
|
||||
G4double GetPhotNucBias(){return photNucBias;}
|
||||
G4double GetWeakNucBias(){return weakNucBias;}
|
||||
|
||||
private:
|
||||
|
||||
@@ -144,7 +152,7 @@ private:
|
||||
G4QCollision(const G4QCollision&);
|
||||
|
||||
// BODY
|
||||
// Static Parameters
|
||||
// Static Parameters --------------------------------------------------------------------
|
||||
static G4bool manualFlag; // If false then standard parameters are used
|
||||
static G4int nPartCWorld; // The#of particles for hadronization (limit of A of fragm.)
|
||||
// -> Parameters of the G4Quasmon class:
|
||||
@@ -162,7 +170,10 @@ private:
|
||||
static G4double PiPrThresh; // Pion Production Threshold for gammas
|
||||
static G4double M2ShiftVir; // Shift for M2=-Q2=m_pi^2 of the virtual gamma
|
||||
static G4double DiNuclMass; // Double Nucleon Mass for virtual normalization
|
||||
//
|
||||
// -> Biasing parameters:
|
||||
static G4double photNucBias; // Biasing parameter for photo-($e,mu,tau)Nuclear reactions
|
||||
static G4double weakNucBias; // Biasing parameter for Charged Currents (nu,mu) reactions
|
||||
//--------------------------------- End of static parameters ---------------------------
|
||||
// Working parameters
|
||||
G4VQCrossSection* theCS;
|
||||
G4LorentzVector EnMomConservation; // Residual of Energy/Momentum Cons.
|
||||
@@ -171,6 +182,10 @@ private:
|
||||
// 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
|
||||
|
||||
+25
-25
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QElectronNuclearCrossSection -- header file
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
|
||||
G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double Momentum);
|
||||
|
||||
G4int GetExchangePDGCode(G4double nu=0., G4double Q2=0.);
|
||||
G4int GetExchangePDGCode();
|
||||
|
||||
G4double GetExchangeEnergy();
|
||||
|
||||
@@ -90,20 +90,20 @@ private:
|
||||
static G4double* lastJ3; // Pointer to the last array of the J3 function
|
||||
};
|
||||
|
||||
inline G4double G4QElectronNuclearCrossSection::DFun(G4double x)// Parametrization of the PhotoNucCS
|
||||
inline G4double G4QElectronNuclearCrossSection::DFun(G4double x)//PhotoNucCSParametrization
|
||||
{
|
||||
static const G4double shd=1.0734; // HE PomShadowing(D)
|
||||
static const G4double poc=0.0375; // HE Pomeron coefficient
|
||||
static const G4double pos=16.5; // HE Pomeron shift
|
||||
static const G4double reg=.11; // HE Reggeon slope
|
||||
static const G4double mel=0.5109989; // Mass of an electron in MeV
|
||||
static const G4double lmel=std::log(mel); // Log of an electron mass
|
||||
G4double y=std::exp(x-lastG-lmel); // y for the x
|
||||
static const G4double lmel=std::log(mel); // Log of an electron mass
|
||||
G4double y=std::exp(x-lastG-lmel); // y for the x
|
||||
G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor
|
||||
return (poc*(x-pos)+shd*std::exp(-reg*x))*flux;
|
||||
}
|
||||
|
||||
inline G4double G4QElectronNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc cross section
|
||||
inline G4double G4QElectronNuclearCrossSection::Fun(G4double x) // Integrated PhoNucCS
|
||||
{
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
@@ -114,25 +114,25 @@ inline G4double G4QElectronNuclearCrossSection::Fun(G4double x) // Integrated Ph
|
||||
inline G4double G4QElectronNuclearCrossSection::HighEnergyJ1(G4double lEn)
|
||||
{
|
||||
static const G4double le=std::log(50000.); // log(E0)
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double ele=std::exp(-d*le); // E0^(-d)
|
||||
return ha*(lEn*lEn-le2)-ab*(lEn-le)-cd*(std::exp(-d*lEn)-ele);
|
||||
}
|
||||
|
||||
inline G4double G4QElectronNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(1-d)
|
||||
G4double En=std::exp(lEn);
|
||||
return a*((lEn-1.)*En-le1)-ab*(En-e)+cd*(std::exp(d*lEn)-ele);
|
||||
@@ -140,14 +140,14 @@ inline G4double G4QElectronNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
|
||||
inline G4double G4QElectronNuclearCrossSection::HighEnergyJ3(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(2-d)
|
||||
G4double lastE2=std::exp(lEn+lEn);
|
||||
return ha*((lEn-.5)*lastE2-leh)-hab*(lastE2-e2)+cd*(std::exp(d*lEn)-ele);
|
||||
+23
-23
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QMuonNuclearCrossSection.hh,v 1.3 2005/06/27 15:30:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QMuonNuclearCrossSection.hh,v 1.2 2005/11/25 21:34:17 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QMuonNuclearCrossSection -- header file
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double Momentum);
|
||||
|
||||
G4int GetExchangePDGCode(G4double nu=0., G4double Q2=0.);
|
||||
G4int GetExchangePDGCode();
|
||||
|
||||
G4double GetExchangeEnergy();
|
||||
|
||||
@@ -107,7 +107,7 @@ inline G4double G4QMuonNuclearCrossSection::DFun(G4double x)// Parametrization o
|
||||
return (poc*(x-pos)+shd*std::exp(-reg*x))*flux;
|
||||
}
|
||||
|
||||
inline G4double G4QMuonNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc cross section
|
||||
inline G4double G4QMuonNuclearCrossSection::Fun(G4double x) // Integrated PhoNucCS
|
||||
{
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
@@ -118,25 +118,25 @@ inline G4double G4QMuonNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc
|
||||
inline G4double G4QMuonNuclearCrossSection::HighEnergyJ1(G4double lEn)
|
||||
{
|
||||
static const G4double le=std::log(50000.); // log(E0)
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double ele=std::exp(-d*le); // E0^(-d)
|
||||
return ha*(lEn*lEn-le2)-ab*(lEn-le)-cd*(std::exp(-d*lEn)-ele);
|
||||
}
|
||||
|
||||
inline G4double G4QMuonNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(1-d)
|
||||
G4double En=std::exp(lEn);
|
||||
return a*((lEn-1.)*En-le1)-ab*(En-e)+cd*(std::exp(d*lEn)-ele);
|
||||
@@ -144,14 +144,14 @@ inline G4double G4QMuonNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
|
||||
inline G4double G4QMuonNuclearCrossSection::HighEnergyJ3(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(2-d)
|
||||
G4double lastE2=std::exp(lEn+lEn);
|
||||
return ha*((lEn-.5)*lastE2-leh)-hab*(lastE2-e2)+cd*(std::exp(d*lEn)-ele);
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QNuMuNuclearCrossSection.hh,v 1.3 2005/11/30 16:26:42 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QNuMuNuclearCrossSection -- header file
|
||||
// M.V. Kossov, CERN-ITEP(Moscow), 20-DEC-2005
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 20-DEC-2005
|
||||
//
|
||||
// Short description: this G4 singletone class calculates (nu_mu,mu) Nuclear cross section
|
||||
// (Energy limit: E<320GeV->badExtrapolation) for a particular isotope (proportional to A)
|
||||
// ****************************************************************************************
|
||||
|
||||
#ifndef G4QNuMuNuclearCrossSection_h
|
||||
#define G4QNuMuNuclearCrossSection_h 1
|
||||
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4NucleiProperties.hh"
|
||||
#include "G4NucleiPropertiesTable.hh"
|
||||
#include <vector>
|
||||
#include "Randomize.hh"
|
||||
#include "G4MuonPlus.hh"
|
||||
#include "G4MuonMinus.hh"
|
||||
#include "G4VQCrossSection.hh"
|
||||
|
||||
class G4QNuMuNuclearCrossSection : public G4VQCrossSection
|
||||
{
|
||||
protected:
|
||||
|
||||
G4QNuMuNuclearCrossSection() {};
|
||||
|
||||
public:
|
||||
|
||||
~G4QNuMuNuclearCrossSection() {};
|
||||
|
||||
static G4VQCrossSection* GetPointer(); // Gives a pointer to this singletone
|
||||
|
||||
G4double ThresholdEnergy(G4int Z, G4int N);
|
||||
|
||||
G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double Momentum);
|
||||
|
||||
G4int GetExchangePDGCode();
|
||||
|
||||
G4double GetDirectPart(G4double Q2);
|
||||
|
||||
G4double GetNPartons(G4double Q2);
|
||||
|
||||
G4double GetQEL_ExchangeQ2();
|
||||
|
||||
G4double GetNQE_ExchangeQ2();
|
||||
|
||||
// Get static members
|
||||
G4double GetLastTOTCS() {return lastSig;}
|
||||
G4double GetLastQELCS() {return lastQEL;}
|
||||
|
||||
private:
|
||||
G4int GetFunctions(G4int z, G4int n, G4double* t, G4double* q, G4double* e);
|
||||
G4double HighEnergyTX(G4double lE);
|
||||
G4double HighEnergyQE(G4double lE);
|
||||
|
||||
// Body
|
||||
private:
|
||||
static G4double lastSig; // Last calculated total cross section
|
||||
static G4double lastQEL; // Last calculated quasi-elastic cross section
|
||||
static G4int lastL; // Last bin used in the cross section TheLastBin
|
||||
static G4double lastE; // Last energy used in the cross section Energy
|
||||
static G4double* lastEN; // Pointer to the last array of the energy axis
|
||||
static G4double* lastTX; // Pointer to the last array of the total CS function
|
||||
static G4double* lastQE; // Pointer to the last array of the QE CS function
|
||||
};
|
||||
|
||||
#endif
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QPhotonNuclearCrossSection -- header file
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QProtonNuclearCrossSection -- header file
|
||||
+28
-28
@@ -21,16 +21,16 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QTauNuclearCrossSection.hh,v 1.3 2005/06/27 15:30:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QTauNuclearCrossSection.hh,v 1.2 2005/11/25 21:34:17 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 physics class: G4QTauNuclearCrossSection -- header file
|
||||
// M.V. Kossov, CERN-ITEP(Moscow), 4-FEB-2004
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 4-Feb-04
|
||||
//
|
||||
// Short description: this G4 singletone class calculates muonNuclear cross section for
|
||||
// the particular isotope (GetCrossSection member function)
|
||||
// Short description: this G4 singletone class calculates tau-lepton-nuclear cross section
|
||||
// for the particular isotope (GetCrossSection member function)
|
||||
// ****************************************************************************************
|
||||
// ********* This HEADER is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double Momentum);
|
||||
|
||||
G4int GetExchangePDGCode(G4double nu=0., G4double Q2=0.);
|
||||
G4int GetExchangePDGCode();
|
||||
|
||||
G4double GetExchangeEnergy();
|
||||
|
||||
@@ -100,14 +100,14 @@ inline G4double G4QTauNuclearCrossSection::DFun(G4double x)// Parametrization of
|
||||
static const G4double poc=0.0375; // HE Pomeron coefficient
|
||||
static const G4double pos=16.5; // HE Pomeron shift
|
||||
static const G4double reg=.11; // HE Reggeon slope
|
||||
static const G4double mtu=1777.; // Mass of a muon in MeV
|
||||
static const G4double lmtu=std::log(mtu); // Log of a muon mass
|
||||
G4double y=std::exp(x-lastG-lmtu); // y for the x
|
||||
static const G4double mtu=1777.; // Mass of a muon in MeV
|
||||
static const G4double lmtu=std::log(mtu); // Log of a muon mass
|
||||
G4double y=std::exp(x-lastG-lmtu); // y for the x
|
||||
G4double flux=lastG*(2.-y*(2.-y))-1.; // flux factor
|
||||
return (poc*(x-pos)+shd*std::exp(-reg*x))*flux;
|
||||
}
|
||||
|
||||
inline G4double G4QTauNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc cross section
|
||||
inline G4double G4QTauNuclearCrossSection::Fun(G4double x) // Integrated PhoNucCS
|
||||
{
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
@@ -118,25 +118,25 @@ inline G4double G4QTauNuclearCrossSection::Fun(G4double x) // Integrated PhoNuc
|
||||
inline G4double G4QTauNuclearCrossSection::HighEnergyJ1(G4double lEn)
|
||||
{
|
||||
static const G4double le=std::log(50000.); // log(E0)
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double le2=le*le; // log(E0)^2
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ha=a*.5; // a/2
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=0.11; // d
|
||||
static const G4double cd=1.0734/d; // c/d
|
||||
static const G4double ele=std::exp(-d*le); // E0^(-d)
|
||||
return ha*(lEn*lEn-le2)-ab*(lEn-le)-cd*(std::exp(-d*lEn)-ele);
|
||||
}
|
||||
|
||||
inline G4double G4QTauNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double le1=(le-1.)*e; // (log(E0)-1)*E0
|
||||
static const G4double a=.0375; // a
|
||||
static const G4double ab=a*16.5; // a*b
|
||||
static const G4double d=1.-0.11; // 1-d
|
||||
static const G4double cd=1.0734/d; // c/(1-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(1-d)
|
||||
G4double En=std::exp(lEn);
|
||||
return a*((lEn-1.)*En-le1)-ab*(En-e)+cd*(std::exp(d*lEn)-ele);
|
||||
@@ -144,14 +144,14 @@ inline G4double G4QTauNuclearCrossSection::HighEnergyJ2(G4double lEn)
|
||||
|
||||
inline G4double G4QTauNuclearCrossSection::HighEnergyJ3(G4double lEn)
|
||||
{
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double e=50000.; // E0
|
||||
static const G4double le=std::log(e); // log(E0)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double e2=e*e; // E0^2
|
||||
static const G4double leh=(le-.5)*e2; // (log(E0)-.5)*E0^2
|
||||
static const G4double ha=.0375*.5; // a/2
|
||||
static const G4double hab=ha*16.5; // a*b/2
|
||||
static const G4double d=2.-.11; // 2-d
|
||||
static const G4double cd=1.0734/d; // c/(2-d)
|
||||
static const G4double ele=std::exp(d*le); // E0^(2-d)
|
||||
G4double lastE2=std::exp(lEn+lEn);
|
||||
return ha*((lEn-.5)*lastE2-leh)-hab*(lastE2-e2)+cd*(std::exp(d*lEn)-ele);
|
||||
+19
-5
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VQCrossSection.hh,v 1.4 2005/06/27 15:30:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VQCrossSection.hh,v 1.3 2005/11/30 16:26:42 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// GEANT4 virtual class: G4VQCrossSection -- header file
|
||||
@@ -83,10 +83,12 @@ class G4VQCrossSection
|
||||
{
|
||||
protected:
|
||||
|
||||
G4VQCrossSection() {}
|
||||
G4VQCrossSection() {;} // for each particle a separate instance of G4QCollision should be
|
||||
// used (and inside use a separate instance of G4Q*CrossSection)
|
||||
|
||||
public:
|
||||
virtual ~G4VQCrossSection() {}
|
||||
virtual ~G4VQCrossSection() {;}// for each particle a separate instance of G4QCollision
|
||||
//@@ can be improved in future)// should be used and inside a separate istance of CS's
|
||||
|
||||
virtual G4double GetCrossSection(G4double Momentum, G4int Z, G4int N);
|
||||
|
||||
@@ -99,6 +101,14 @@ public:
|
||||
// Define in the derived class, F=0 - create DAMDB, F=-1 - read DAMDB, F=1 - update DAMDB
|
||||
virtual G4double CalculateCrossSection(G4int F, G4int I, G4int Z, G4int N, G4double P)=0;
|
||||
|
||||
virtual G4double GetLastTOTCS(); // Get the last calculated total cross-section
|
||||
|
||||
virtual G4double GetLastQELCS(); // Get the last calculated quasi-elastic cross-section
|
||||
|
||||
virtual G4double GetDirectPart(G4double Q2); // Direct interaction with quark-partons
|
||||
|
||||
virtual G4double GetNPartons(G4double Q2); // #of quark-partons in non-perturbative PhSp
|
||||
|
||||
// Subroutines for the t-chanel processes with a leader (DIS, Elastic, Quasielastic etc.)
|
||||
|
||||
virtual G4double GetExchangeEnergy(); // Returns energy of the t-chanel particle (gam,pi)
|
||||
@@ -107,7 +117,11 @@ public:
|
||||
|
||||
virtual G4double GetVirtualFactor(G4double nu, G4double Q2); // Returns a ReductionFactor
|
||||
|
||||
virtual G4int GetExchangePDGCode(G4double nu=0., G4double Q2=0.);//PDGCode of ExchangePrt
|
||||
virtual G4double GetQEL_ExchangeQ2(); // Get randomized Q2 for quasi-elastic scattering
|
||||
|
||||
virtual G4double GetNQE_ExchangeQ2(); // Get randomized Q2 for non quasi-elastic scat.
|
||||
|
||||
virtual G4int GetExchangePDGCode(); // PDGCode of the Exchange Particle
|
||||
|
||||
// Body: Basic Parameters of DAMDB (each derived class can add it's own values)
|
||||
// -----------------------------------------------------------------------------
|
||||
+574
@@ -0,0 +1,574 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QANuMuNuclearCrossSection.cc,v 1.5 2005/12/01 17:28:18 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QANuMuNuclearCrossSection for gamma+A cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
|
||||
//
|
||||
// ****************************************************************************************
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
//===============================================================================================
|
||||
|
||||
///#define debug
|
||||
#define edebug
|
||||
//#define pdebug
|
||||
//#define ppdebug
|
||||
//#define tdebug
|
||||
//#define sdebug
|
||||
|
||||
#include "G4QANuMuNuclearCrossSection.hh"
|
||||
|
||||
// Initialization of the
|
||||
G4double G4QANuMuNuclearCrossSection::lastSig=0.;//Last calculated total cross section
|
||||
G4double G4QANuMuNuclearCrossSection::lastQEL=0.;//Last calculated quasi-el. cross section
|
||||
G4int G4QANuMuNuclearCrossSection::lastL=0; //Last used in cross section TheLastBin
|
||||
G4double G4QANuMuNuclearCrossSection::lastE=0.; //Last used in cross section TheEnergy
|
||||
G4double* G4QANuMuNuclearCrossSection::lastEN=0; //Pointer to the Energy Scale of TX & QE
|
||||
G4double* G4QANuMuNuclearCrossSection::lastTX=0; //Pointer to the LastArray of TX function
|
||||
G4double* G4QANuMuNuclearCrossSection::lastQE=0; //Pointer to the LastArray of QE function
|
||||
|
||||
// Returns Pointer to the G4VQCrossSection class
|
||||
G4VQCrossSection* G4QANuMuNuclearCrossSection::GetPointer()
|
||||
{
|
||||
static G4QANuMuNuclearCrossSection theCrossSection;//**Static body of the Cross Section**
|
||||
return &theCrossSection;
|
||||
}
|
||||
|
||||
// Gives the threshold energy = the same for all nuclei (@@ can be reduced for hevy nuclei)
|
||||
G4double G4QANuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
{
|
||||
//static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
|
||||
//static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
|
||||
//static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double thresh=mmu+mmu2/dmN; // Universal threshold in GeV
|
||||
// ---------
|
||||
//static const G4double infEn = 9.e27;
|
||||
G4double dN=0.;
|
||||
if(Z>0||N>0) dN=thresh*GeV; // @@ if upgraded, change it in a total cross section
|
||||
//@@ "dN=mmu+mmu2/G4NucleiProperties::GetNuclearMass(<G4double>(Z+N),<G4double>(Z)/GeV"
|
||||
return dN;
|
||||
}
|
||||
|
||||
// The main member function giving the gamma-A cross section (E_kin in MeV, CS in mb)
|
||||
G4double G4QANuMuNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4int targZ,
|
||||
G4int targN, G4double Momentum)
|
||||
{
|
||||
static const G4double mb38=1.E-11*millibarn;// Conversion 10^-38 cm^2 to mb=10^-27 cm^2
|
||||
static const G4int nE=33; // !! If change this, change it in GetFunctions() (*.hh) !!
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double EMi=mmu+mmu2/dmN; // Universal threshold of the reaction in GeV
|
||||
static const G4double EMa=300.; // Maximum tabulated Energy of nu_mu in GeV
|
||||
// *** Begin of the Associative memory for acceleration of the cross section calculations
|
||||
static std::vector <G4double> colH; //?? Vector of HighEnergyCoefficients (functional)
|
||||
static std::vector <G4double*> TX; // Vector of pointers to the TX tabulated functions
|
||||
static std::vector <G4double*> QE; // Vector of pointers to the QE tabulated functions
|
||||
static G4bool first=true; // Flag of initialization of the energy axis
|
||||
// *** End of Static Definitions (Associative Memory) ***
|
||||
//const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the Muon
|
||||
//G4double TotEnergy2=Momentum;
|
||||
lastE=Momentum/GeV; // Kinetic energy of the muon neutrino (in GeV!)
|
||||
if (lastE<=EMi) // Energy is below the minimum energy in the table
|
||||
{
|
||||
lastE=0.;
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
G4int Z=targZ; // New Z, which can change the sign
|
||||
if(F<=0) // This isotope was not the last used isotop
|
||||
{
|
||||
if(F<0) // This isotope was found in DAMDB =========> RETRIEVE
|
||||
{
|
||||
lastTX =TX[I]; // Pointer to the prepared TX function (same isotope)
|
||||
lastQE =QE[I]; // Pointer to the prepared QE function (same isotope)
|
||||
}
|
||||
else // This isotope wasn't calculated previously => CREATE
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
lastEN = new G4double[nE]; // This must be done only once!
|
||||
Z=-Z; // To explain GetFunctions that E-axis must be filled
|
||||
first=false; // To make it only once
|
||||
}
|
||||
lastTX = new G4double[nE]; // Allocate memory for the new TX function
|
||||
lastQE = new G4double[nE]; // Allocate memory for the new QE function
|
||||
G4int res=GetFunctions(Z,targN,lastTX,lastQE,lastEN);//@@analize(0=first,-1=bad,1=OK)
|
||||
if(res<0) G4cerr<<"*W*G4NuMuNuclearCS::CalcCrossSect:Bad Function Retrieve"<<G4endl;
|
||||
// *** The synchronization check ***
|
||||
G4int sync=TX.size();
|
||||
if(sync!=I) G4cerr<<"***G4NuMuNuclearCS::CalcCrossSect:Sync.="<<sync<<"#"<<I<<G4endl;
|
||||
TX.push_back(lastTX);
|
||||
QE.push_back(lastQE);
|
||||
} // End of creation of the new set of parameters
|
||||
} // End of parameters udate
|
||||
// ============================== NOW Calculate the Cross Section =====================
|
||||
if (lastE<=EMi) // Check that antiNuEnergy is higher than ThreshE
|
||||
{
|
||||
lastE=0.;
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
if(lastE<EMa) // Linear fit is made explicitly to fix the last bin for the randomization
|
||||
{
|
||||
G4int chk=1;
|
||||
G4int ran=mL/2;
|
||||
G4int sep=ran; // as a result = an index of the left edge of the interval
|
||||
while(ran>=2)
|
||||
{
|
||||
G4int newran=ran/2;
|
||||
if(lastE<=lastEN[sep]) sep-=newran;
|
||||
else if(newran>1) sep+=newran;
|
||||
ran=newran;
|
||||
chk=chk+chk;
|
||||
}
|
||||
if(chk+chk!=mL) G4cerr<<"*Warn*G4NuMuNuclearCS::CalcCS:Table! mL="<<mL<<G4endl;
|
||||
G4double lowE=lastEN[sep];
|
||||
G4double highE=lastEN[sep+1];
|
||||
G4double lowTX=lastTX[sep];
|
||||
G4double lowQE=lastQE[sep];
|
||||
if(lastE<lowE||sep>=mL||lastE>highE)
|
||||
G4cerr<<"*Warn*G4NuMuNuclearCS::CalcCS:Bin! "<<lowE<<" < "<<lastE<<" < "<<highE
|
||||
<<", sep="<<sep<<", mL="<<mL<<G4endl;
|
||||
lastSig=lastE*(lastE-lowE)*(lastTX[sep+1]-lowTX)/(highE-lowE)+lowTX; // Recover *E
|
||||
lastQEL=(lastE-lowE)*(lastQE[sep+1]-lowQE)/(highE-lowE)+lowQE;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4NuMuNuclearCS::CalcCS: T="<<lastSig<<", Q="<<lastQEL<<", E="<<lastE<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
lastSig=lastTX[mL]; // @@ No extrapolation, just a const, while it looks shrinking...
|
||||
lastQEL=lastQE[mL];
|
||||
}
|
||||
if(lastQEL<0.) lastQEL = 0.;
|
||||
if(lastSig<0.) lastSig = 0.;
|
||||
// The cross-sections are expected to be in mb
|
||||
lastSig*=mb38;
|
||||
lastQEL*=mb38;
|
||||
return lastSig;
|
||||
}
|
||||
|
||||
// Calculate the cros-section functions
|
||||
// ****************************************************************************************
|
||||
// *** This tables are the same for all lepto-nuclear reactions, only mass is different ***
|
||||
// ***@@ IT'S REASONABLE TO MAKE ADDiTIONAL VIRTUAL CLASS FOR LEPTO-NUCLEAR WITH THIS@@ ***
|
||||
// ****************************************************************************************
|
||||
G4int G4QANuMuNuclearCrossSection::GetFunctions (G4int z, G4int n,
|
||||
G4double* t, G4double* q, G4double* e)
|
||||
{
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double thresh=mmu+mmu2/dmN; // Universal threshold in GeV
|
||||
static const G4int nE=33; // !! If change this, change it in GetCrossSection() (*.cc) !!
|
||||
static const G4double nuEn[nE]={thresh,
|
||||
0.112443, 0.121027, 0.130968, 0.142546, 0.156109, 0.172102, 0.191090, 0.213802,
|
||||
0.241183, 0.274476, 0.315330, 0.365955, 0.429353, 0.509647, 0.612580, 0.746264,
|
||||
0.922326, 1.157700, 1.477470, 1.919460, 2.541810, 3.435700, 4.747300, 6.716420,
|
||||
9.746220, 14.53270, 22.31170, 35.34420, 57.90250, 98.34160, 173.6130, 319.4900};
|
||||
static const G4double TOTX[nE]={0.,
|
||||
0.084587, 0.288685, 0.410021, 0.511290, 0.602236, 0.686143, 0.764097, 0.836055,
|
||||
0.901224, 0.958271, 1.005510, 1.041180, 1.063760, 1.072400, 1.067220, 1.049490,
|
||||
1.021490, 0.986186, 0.946382, 0.905672, 0.866103, 0.828985, 0.795853, 0.766550,
|
||||
0.740733, 0.717822, 0.697109, 0.677882, 0.659543, 0.641549, 0.622752, 0.603635};
|
||||
static const G4double QELX[nE]={0.,
|
||||
.0095112, .0349388, .0536998, .0728821, .0940146, .1180870, .1460120, .1787500,
|
||||
.2173600, .2627240, .3122570, .3633810, .4144780, .4639300, .5103820, .5520940,
|
||||
.5873830, .6154440, .6358140, .6496310, .6580280, .6629570, .6655750, .6671860,
|
||||
.6680500, .6687700, .6692590, .6694790, .6697380, .6699010, .6700020, .6699120};
|
||||
// --------------------------------
|
||||
G4int first=0;
|
||||
if(z<0.)
|
||||
{
|
||||
first=1;
|
||||
z=-z;
|
||||
}
|
||||
if(z<1 || z>92) // neutron & plutonium are forbidden
|
||||
{
|
||||
G4cout<<"**G4QANuMuNuclearCrossSection::GetFunctions:Z="<<z<<".No CS returned"<<G4endl;
|
||||
return -1;
|
||||
}
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
G4double a=n+z;
|
||||
G4double za=z+a;
|
||||
G4double dz=z+z;
|
||||
G4double da=a+a;
|
||||
G4double ta=da+a;
|
||||
if(first) e[k]=nuEn[k]; // Energy of neutrino E (first bin k=0 can be modified)
|
||||
t[k]=TOTX[k]*nuEn[k]*(za+za)/ta+QELX[k]*(dz+dz-da)/ta; // TotalCrossSection
|
||||
q[k]=QELX[k]*dz/a; // QuasiElasticCrossSection
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
// Randomize Q2 from neutrino to the scattered muon when the scattering is quasi-elastic
|
||||
G4double G4QANuMuNuclearCrossSection::GetQEL_ExchangeQ2()
|
||||
{
|
||||
static const G4double mmu=.105658369;// Mass of muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared Mass of muon in GeV^2
|
||||
static const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
|
||||
static const double MN=.931494043; // Nucleon mass (inside nucleus, atomicMassUnit,GeV)
|
||||
static const double MN2=MN*MN; // M_N^2 in GeV^2
|
||||
static const G4double power=-3.5; // direct power for the magic variable
|
||||
static const G4double pconv=1./power;// conversion power for the magic variable
|
||||
static const G4int nQ2=101; // #Of point in the Q2l table (in GeV^2)
|
||||
static const G4int lQ2=nQ2-1; // index of the last in the Q2l table
|
||||
static const G4int bQ2=lQ2-1; // index of the before last in the Q2 ltable
|
||||
// Reversed table
|
||||
static const G4double Xl[nQ2]={5.20224e-16,
|
||||
.006125,.0137008,.0218166,.0302652,.0389497,.0478144,.0568228,.0659497,.0751768,.0844898,
|
||||
.093878, .103332, .112844, .122410, .132023, .141680, .151376, .161109, .170875, .180672,
|
||||
.190499, .200352, .210230, .220131, .230055, .239999, .249963, .259945, .269944, .279960,
|
||||
.289992, .300039, .310099, .320173, .330260, .340359, .350470, .360592, .370724, .380867,
|
||||
.391019, .401181, .411352, .421531, .431719, .441915, .452118, .462329, .472547, .482771,
|
||||
.493003, .503240, .513484, .523734, .533989, .544250, .554517, .564788, .575065, .585346,
|
||||
.595632, .605923, .616218, .626517, .636820, .647127, .657438, .667753, .678072, .688394,
|
||||
.698719, .709048, .719380, .729715, .740053, .750394, .760738, .771085, .781434, .791786,
|
||||
.802140, .812497, .822857, .833219, .843582, .853949, .864317, .874687, .885060, .895434,
|
||||
.905810, .916188, .926568, .936950, .947333, .957719, .968105, .978493, .988883, .999275};
|
||||
// Direct table
|
||||
static const G4double Xmax=Xl[lQ2];
|
||||
static const G4double Xmin=Xl[0];
|
||||
static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2)
|
||||
static const G4double inl[nQ2]={0,
|
||||
1.52225, 2.77846, 3.96651, 5.11612, 6.23990, 7.34467, 8.43466, 9.51272, 10.5809, 11.6406,
|
||||
12.6932, 13.7394, 14.7801, 15.8158, 16.8471, 17.8743, 18.8979, 19.9181, 20.9353, 21.9496,
|
||||
22.9614, 23.9707, 24.9777, 25.9826, 26.9855, 27.9866, 28.9860, 29.9837, 30.9798, 31.9745,
|
||||
32.9678, 33.9598, 34.9505, 35.9400, 36.9284, 37.9158, 38.9021, 39.8874, 40.8718, 41.8553,
|
||||
42.8379, 43.8197, 44.8007, 45.7810, 46.7605, 47.7393, 48.7174, 49.6950, 50.6718, 51.6481,
|
||||
52.6238, 53.5990, 54.5736, 55.5476, 56.5212, 57.4943, 58.4670, 59.4391, 60.4109, 61.3822,
|
||||
62.3531, 63.3236, 64.2937, 65.2635, 66.2329, 67.2019, 68.1707, 69.1390, 70.1071, 71.0748,
|
||||
72.0423, 73.0095, 73.9763, 74.9429, 75.9093, 76.8754, 77.8412, 78.8068, 79.7721, 80.7373,
|
||||
81.7022, 82.6668, 83.6313, 84.5956, 85.5596, 86.5235, 87.4872, 88.4507, 89.4140, 90.3771,
|
||||
91.3401, 92.3029, 93.2656, 94.2281, 95.1904, 96.1526, 97.1147, 98.0766, 99.0384, 100.000};
|
||||
G4double Enu=lastE; // Get energy of the last calculated cross-section
|
||||
G4double dEnu=Enu+Enu; // doubled energy of nu/anu
|
||||
G4double Enu2=Enu*Enu; // squared energy of nu/anu
|
||||
G4double ME=Enu*MN; // M*E
|
||||
G4double dME=ME+ME; // 2*M*E
|
||||
G4double dEMN=(dEnu+MN)*ME;
|
||||
G4double MEm=ME-hmmu2;
|
||||
G4double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
|
||||
G4double E2M=MN*Enu2-(Enu+MN)*hmmu2;
|
||||
G4double ymax=(E2M+sqE)/dEMN;
|
||||
G4double ymin=(E2M-sqE)/dEMN;
|
||||
G4double rmin=1.-ymin;
|
||||
G4double rhm2E=hmmu2/Enu2;
|
||||
G4double Q2mi=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E)); // Q2_min(E_nu)
|
||||
G4double Q2ma=dME*ymax; // Q2_max(E_nu)
|
||||
G4double Xma=pow((1.+Q2mi),power); // X_max(E_nu)
|
||||
G4double Xmi=pow((1.+Q2ma),power); // X_min(E_nu)
|
||||
// Find the integral values integ(Xmi) & integ(Xma) using the direct table
|
||||
G4double rXi=(Xmi-Xmin)/dX;
|
||||
G4int iXi=static_cast<int>(rXi);
|
||||
if(iXi<0) iXi=0;
|
||||
if(iXi>bQ2) iXi=bQ2;
|
||||
G4double dXi=rXi-iXi;
|
||||
G4double bnti=inl[iXi];
|
||||
G4double inti=bnti+dXi*(inl[iXi+1]-bnti);
|
||||
//
|
||||
G4double rXa=(Xma-Xmin)/dX;
|
||||
G4int iXa=static_cast<int>(rXa);
|
||||
if(iXa<0) iXa=0;
|
||||
if(iXa>bQ2) iXa=bQ2;
|
||||
G4double dXa=rXa-iXa;
|
||||
G4double bnta=inl[iXa];
|
||||
G4double inta=bnta+dXa*(inl[iXa+1]-bnta);
|
||||
// *** Find X using the reversed table ***
|
||||
G4double intx=inti+(inta-inti)*G4UniformRand();
|
||||
G4int intc=static_cast<int>(intx);
|
||||
if(intc<0) intc=0;
|
||||
if(intc>bQ2) intc=bQ2; // If it is more than max, then the BAD extrapolation
|
||||
G4double dint=intx-intc;
|
||||
G4double mX=Xl[intc];
|
||||
G4double X=mX+dint*(Xl[intc+1]-mX);
|
||||
G4double Q2=pow(X,pconv)-1.;
|
||||
return Q2*GeV*GeV;
|
||||
}
|
||||
|
||||
// Randomize Q2 from neutrino to the scattered muon when the scattering is not quasiElastic
|
||||
G4double G4QANuMuNuclearCrossSection::GetNQE_ExchangeQ2()
|
||||
{
|
||||
static const double mpi=.13957018; // charged pi meson mass in GeV
|
||||
static const G4double mmu=.105658369; // Mass of muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared Mass of muon in GeV^2
|
||||
static const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
|
||||
static const double MN=.931494043; // Nucleon mass (inside nucleus,atomicMassUnit,GeV)
|
||||
static const double MN2=MN*MN; // M_N^2 in GeV^2
|
||||
static const double dMN=MN+MN; // 2*M_N in GeV
|
||||
static const double mcV=(dMN+mpi)*mpi;// constant of W>M+mc cut for Quasi-Elastic
|
||||
static const G4int power=7; // direct power for the magic variable
|
||||
static const G4double pconv=1./power; // conversion power for the magic variable
|
||||
static const G4int nX=21; // #Of point in the Xl table (in GeV^2)
|
||||
static const G4int lX=nX-1; // index of the last in the Xl table
|
||||
static const G4int bX=lX-1; // @@ index of the before last in the Xl table
|
||||
static const G4int nE=20; // #Of point in the El table (in GeV^2)
|
||||
static const G4int bE=nE-1; // index of the last in the El table
|
||||
static const G4int pE=bE-1; // index of the before last in the El table
|
||||
// Reversed table
|
||||
static const G4double X0[nX]={5.21412e-05,
|
||||
.437860, .681908, .891529, 1.08434, 1.26751, 1.44494, 1.61915, 1.79198, 1.96493, 2.13937,
|
||||
2.31664, 2.49816, 2.68559, 2.88097, 3.08705, 3.30774, 3.54917, 3.82233, 4.15131, 4.62182};
|
||||
static const G4double X1[nX]={.00102591,
|
||||
1.00443, 1.55828, 2.03126, 2.46406, 2.87311, 3.26723, 3.65199, 4.03134, 4.40835, 4.78561,
|
||||
5.16549, 5.55031, 5.94252, 6.34484, 6.76049, 7.19349, 7.64917, 8.13502, 8.66246, 9.25086};
|
||||
static const G4double X2[nX]={.0120304,
|
||||
2.59903, 3.98637, 5.15131, 6.20159, 7.18024, 8.10986, 9.00426, 9.87265, 10.7217, 11.5564,
|
||||
12.3808, 13.1983, 14.0116, 14.8234, 15.6359, 16.4515, 17.2723, 18.1006, 18.9386, 19.7892};
|
||||
static const G4double X3[nX]={.060124,
|
||||
5.73857, 8.62595, 10.9849, 13.0644, 14.9636, 16.7340, 18.4066, 20.0019, 21.5342, 23.0142,
|
||||
24.4497, 25.8471, 27.2114, 28.5467, 29.8564, 31.1434, 32.4102, 33.6589, 34.8912, 36.1095};
|
||||
static const G4double X4[nX]={.0992363,
|
||||
8.23746, 12.1036, 15.1740, 17.8231, 20.1992, 22.3792, 24.4092, 26.3198, 28.1320, 29.8615,
|
||||
31.5200, 33.1169, 34.6594, 36.1536, 37.6044, 39.0160, 40.3920, 41.7353, 43.0485, 44.3354};
|
||||
static const G4double X5[nX]={.0561127,
|
||||
7.33661, 10.5694, 13.0778, 15.2061, 17.0893, 18.7973, 20.3717, 21.8400, 23.2211, 24.5291,
|
||||
25.7745, 26.9655, 28.1087, 29.2094, 30.2721, 31.3003, 32.2972, 33.2656, 34.2076, 35.1265};
|
||||
static const G4double X6[nX]={.0145859,
|
||||
4.81774, 6.83565, 8.37399, 9.66291, 10.7920, 11.8075, 12.7366, 13.5975, 14.4025, 15.1608,
|
||||
15.8791, 16.5628, 17.2162, 17.8427, 18.4451, 19.0259, 19.5869, 20.1300, 20.6566, 21.1706};
|
||||
static const G4double X7[nX]={.00241155,
|
||||
2.87095, 4.02492, 4.89243, 5.61207, 6.23747, 6.79613, 7.30433, 7.77270, 8.20858, 8.61732,
|
||||
9.00296, 9.36863, 9.71682, 10.0495, 10.3684, 10.6749, 10.9701, 11.2550, 11.5306, 11.7982};
|
||||
static const G4double X8[nX]={.000316863,
|
||||
1.76189, 2.44632, 2.95477, 3.37292, 3.73378, 4.05420, 4.34415, 4.61009, 4.85651, 5.08666,
|
||||
5.30299, 5.50738, 5.70134, 5.88609, 6.06262, 6.23178, 6.39425, 6.55065, 6.70149, 6.84742};
|
||||
static const G4double X9[nX]={3.73544e-05,
|
||||
1.17106, 1.61289, 1.93763, 2.20259, 2.42976, 2.63034, 2.81094, 2.97582, 3.12796, 3.26949,
|
||||
3.40202, 3.52680, 3.64482, 3.75687, 3.86360, 3.96557, 4.06323, 4.15697, 4.24713, 4.33413};
|
||||
static const G4double XA[nX]={4.19131e-06,
|
||||
.849573, 1.16208, 1.38955, 1.57379, 1.73079, 1.86867, 1.99221, 2.10451, 2.20770, 2.30332,
|
||||
2.39252, 2.47622, 2.55511, 2.62977, 2.70066, 2.76818, 2.83265, 2.89437, 2.95355, 3.01051};
|
||||
static const G4double XB[nX]={4.59981e-07,
|
||||
.666131, .905836, 1.07880, 1.21796, 1.33587, 1.43890, 1.53080, 1.61399, 1.69011, 1.76040,
|
||||
1.82573, 1.88682, 1.94421, 1.99834, 2.04959, 2.09824, 2.14457, 2.18878, 2.23107, 2.27162};
|
||||
static const G4double XC[nX]={4.99861e-08,
|
||||
.556280, .752730, .893387, 1.00587, 1.10070, 1.18317, 1.25643, 1.32247, 1.38269, 1.43809,
|
||||
1.48941, 1.53724, 1.58203, 1.62416, 1.66391, 1.70155, 1.73728, 1.77128, 1.80371, 1.83473};
|
||||
static const G4double XD[nX]={5.40832e-09,
|
||||
.488069, .657650, .778236, .874148, .954621, 1.02432, 1.08599, 1.14138, 1.19172, 1.23787,
|
||||
1.28049, 1.32008, 1.35705, 1.39172, 1.42434, 1.45514, 1.48429, 1.51197, 1.53829, 1.56339};
|
||||
static const G4double XE[nX]={5.84029e-10,
|
||||
.445057, .597434, .705099, .790298, .861468, .922865, .976982, 1.02542, 1.06930, 1.10939,
|
||||
1.14630, 1.18050, 1.21233, 1.24208, 1.27001, 1.29630, 1.32113, 1.34462, 1.36691, 1.38812};
|
||||
static const G4double XF[nX]={6.30137e-11,
|
||||
.418735, .560003, .659168, .737230, .802138, .857898, .906854, .950515, .989915, 1.02580,
|
||||
1.05873, 1.08913, 1.11734, 1.14364, 1.16824, 1.19133, 1.21306, 1.23358, 1.25298, 1.27139};
|
||||
static const G4double XG[nX]={6.79627e-12,
|
||||
.405286, .539651, .633227, .706417, .766929, .818642, .863824, .903931, .939963, .972639,
|
||||
1.00250, 1.02995, 1.05532, 1.07887, 1.10082, 1.12134, 1.14058, 1.15867, 1.17572, 1.19183};
|
||||
static const G4double XH[nX]={7.32882e-13,
|
||||
.404391, .535199, .625259, .695036, .752243, .800752, .842823, .879906, .912994, .942802,
|
||||
.969862, .994583, 1.01729, 1.03823, 1.05763, 1.07566, 1.09246, 1.10816, 1.12286, 1.13667};
|
||||
static const G4double XI[nX]={7.90251e-14,
|
||||
.418084, .548382, .636489, .703728, .758106, .803630, .842633, .876608, .906576, .933269,
|
||||
.957233, .978886, .998556, 1.01651, 1.03295, 1.04807, 1.06201, 1.07489, 1.08683, 1.09792};
|
||||
static const G4double XJ[nX]={8.52083e-15,
|
||||
.447299, .579635, .666780, .731788, .783268, .825512, .861013, .891356, .917626, .940597,
|
||||
.960842, .978802, .994820, 1.00917, 1.02208, 1.03373, 1.04427, 1.05383, 1.06253, 1.07046};
|
||||
// Direct table
|
||||
static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
|
||||
X9[0],XA[0],XB[0],XC[0],XD[0],XE[0],XF[0],XG[0],XH[0],XI[0],XJ[0]};
|
||||
static const G4double dX[nE]={
|
||||
(X0[lX]-X0[0])/lX, (X1[lX]-X1[0])/lX, (X2[lX]-X2[0])/lX, (X3[lX]-X3[0])/lX,
|
||||
(X4[lX]-X4[0])/lX, (X5[lX]-X5[0])/lX, (X6[lX]-X6[0])/lX, (X7[lX]-X7[0])/lX,
|
||||
(X8[lX]-X8[0])/lX, (X9[lX]-X9[0])/lX, (XA[lX]-XA[0])/lX, (XB[lX]-XB[0])/lX,
|
||||
(XC[lX]-XC[0])/lX, (XD[lX]-XD[0])/lX, (XE[lX]-XE[0])/lX, (XF[lX]-XF[0])/lX,
|
||||
(XG[lX]-XG[0])/lX, (XH[lX]-XH[0])/lX, (XI[lX]-XI[0])/lX, (XJ[lX]-XJ[0])/lX};
|
||||
static const G4double* Xl[nE]=
|
||||
{X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
|
||||
static const G4double I0[nX]={0,
|
||||
.354631, 1.08972, 2.05138, 3.16564, 4.38343, 5.66828, 6.99127, 8.32858, 9.65998, 10.9680,
|
||||
12.2371, 13.4536, 14.6050, 15.6802, 16.6686, 17.5609, 18.3482, 19.0221, 19.5752, 20.0000};
|
||||
static const G4double I1[nX]={0,
|
||||
.281625, .877354, 1.67084, 2.60566, 3.64420, 4.75838, 5.92589, 7.12829, 8.34989, 9.57708,
|
||||
10.7978, 12.0014, 13.1781, 14.3190, 15.4162, 16.4620, 17.4496, 18.3724, 19.2245, 20.0000};
|
||||
static const G4double I2[nX]={0,
|
||||
.201909, .642991, 1.24946, 1.98463, 2.82370, 3.74802, 4.74263, 5.79509, 6.89474, 8.03228,
|
||||
9.19947, 10.3889, 11.5938, 12.8082, 14.0262, 15.2427, 16.4527, 17.6518, 18.8356, 20.0000};
|
||||
static const G4double I3[nX]={0,
|
||||
.140937, .461189, .920216, 1.49706, 2.17728, 2.94985, 3.80580, 4.73758, 5.73867, 6.80331,
|
||||
7.92637, 9.10316, 10.3294, 11.6013, 12.9150, 14.2672, 15.6548, 17.0746, 18.5239, 20.0000};
|
||||
static const G4double I4[nX]={0,
|
||||
.099161, .337358, .694560, 1.16037, 1.72761, 2.39078, 3.14540, 3.98768, 4.91433, 5.92245,
|
||||
7.00942, 8.17287, 9.41060, 10.7206, 12.1010, 13.5500, 15.0659, 16.6472, 18.2924, 20.0000};
|
||||
static const G4double I5[nX]={0,
|
||||
.071131, .255084, .543312, .932025, 1.41892, 2.00243, 2.68144, 3.45512, 4.32283, 5.28411,
|
||||
6.33859, 7.48602, 8.72621, 10.0590, 11.4844, 13.0023, 14.6128, 16.3158, 18.1115, 20.0000};
|
||||
static const G4double I6[nX]={0,
|
||||
.053692, .202354, .443946, .778765, 1.20774, 1.73208, 2.35319, 3.07256, 3.89177, 4.81249,
|
||||
5.83641, 6.96528, 8.20092, 9.54516, 10.9999, 12.5670, 14.2486, 16.0466, 17.9630, 20.0000};
|
||||
static const G4double I7[nX]={0,
|
||||
.043065, .168099, .376879, .672273, 1.05738, 1.53543, 2.10973, 2.78364, 3.56065, 4.44429,
|
||||
5.43819, 6.54610, 7.77186, 9.11940, 10.5928, 12.1963, 13.9342, 15.8110, 17.8313, 20.0000};
|
||||
static const G4double I8[nX]={0,
|
||||
.036051, .143997, .327877, .592202, .941572, 1.38068, 1.91433, 2.54746, 3.28517, 4.13277,
|
||||
5.09574, 6.17984, 7.39106, 8.73568, 10.2203, 11.8519, 13.6377, 15.5854, 17.7033, 20.0000};
|
||||
static const G4double I9[nX]={0,
|
||||
.030977, .125727, .289605, .528146, .846967, 1.25183, 1.74871, 2.34384, 3.04376, 3.85535,
|
||||
4.78594, 5.84329, 7.03567, 8.37194, 9.86163, 11.5150, 13.3430, 15.3576, 17.5719, 20.0000};
|
||||
static const G4double IA[nX]={0,
|
||||
.027129, .111420, .258935, .475812, .768320, 1.14297, 1.60661, 2.16648, 2.83034, 3.60650,
|
||||
4.50394, 5.53238, 6.70244, 8.02569, 9.51488, 11.1841, 13.0488, 15.1264, 17.4362, 20.0000};
|
||||
static const G4double IB[nX]={0,
|
||||
.024170, .100153, .234345, .433198, .703363, 1.05184, 1.48607, 2.01409, 2.64459, 3.38708,
|
||||
4.25198, 5.25084, 6.39647, 7.70319, 9.18708, 10.8663, 12.7617, 14.8968, 17.2990, 20.0000};
|
||||
static const G4double IC[nX]={0,
|
||||
.021877, .091263, .214670, .398677, .650133, .976322, 1.38510, 1.88504, 2.48555, 3.19709,
|
||||
4.03129, 5.00127, 6.12184, 7.40989, 8.88482, 10.5690, 12.4888, 14.6748, 17.1638, 20.0000};
|
||||
static const G4double ID[nX]={0,
|
||||
.020062, .084127, .198702, .370384, .606100, .913288, 1.30006, 1.77535, 2.34912, 3.03253,
|
||||
3.83822, 4.78063, 5.87634, 7.14459, 8.60791, 10.2929, 12.2315, 14.4621, 17.0320, 20.0000};
|
||||
static const G4double IE[nX]={0,
|
||||
.018547, .078104, .185102, .346090, .567998, .858331, 1.22535, 1.67824, 2.22735, 2.88443,
|
||||
3.66294, 4.57845, 5.64911, 6.89637, 8.34578, 10.0282, 11.9812, 14.2519, 16.8993, 20.0000};
|
||||
static const G4double IF[nX]={0,
|
||||
.017143, .072466, .172271, .323007, .531545, .805393, 1.15288, 1.58338, 2.10754, 2.73758,
|
||||
3.48769, 4.37450, 5.41770, 6.64092, 8.07288, 9.74894, 11.7135, 14.0232, 16.7522, 20.0000};
|
||||
static const G4double IG[nX]={0,
|
||||
.015618, .066285, .158094, .297316, .490692, .745653, 1.07053, 1.47479, 1.96931, 2.56677,
|
||||
3.28205, 4.13289, 5.14068, 6.33158, 7.73808, 9.40133, 11.3745, 13.7279, 16.5577, 20.0000};
|
||||
static const G4double IH[nX]={0,
|
||||
.013702, .058434, .139923, .264115, .437466, .667179, .961433, 1.32965, 1.78283, 2.33399,
|
||||
2.99871, 3.79596, 4.74916, 5.88771, 7.24937, 8.88367, 10.8576, 13.2646, 16.2417, 20.0000};
|
||||
static const G4double II[nX]={0,
|
||||
.011264, .048311, .116235, .220381, .366634, .561656, .813132, 1.13008, 1.52322, 2.00554,
|
||||
2.59296, 3.30542, 4.16834, 5.21490, 6.48964, 8.05434, 9.99835, 12.4580, 15.6567, 20.0000};
|
||||
static const G4double IJ[nX]={0,
|
||||
.008628, .037206, .089928, .171242, .286114, .440251, .640343, .894382, 1.21208, 1.60544,
|
||||
2.08962, 2.68414, 3.41486, 4.31700, 5.44048, 6.85936, 8.69067, 11.1358, 14.5885, 20.0000};
|
||||
static const G4double* Il[nE]=
|
||||
{I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
|
||||
static const G4double lE[nE]={
|
||||
-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
|
||||
2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
|
||||
static const G4double lEmi=lE[0];
|
||||
static const G4double lEma=lE[nE-1];
|
||||
static const G4double dlE=(lEma-lEmi)/bE;
|
||||
//***************************************************************************************
|
||||
G4double Enu=lastE; // Get energy of the last calculated cross-section
|
||||
G4double lEn=std::log(Enu); // log(E) for interpolation
|
||||
G4double rE=(lEn-lEmi)/dlE; // Position of the energy
|
||||
G4int fE=static_cast<int>(rE); // Left bin for interpolation
|
||||
if(fE<0) fE=0;
|
||||
if(fE>pE)fE=pE;
|
||||
G4int sE=fE+1; // Right bin for interpolation
|
||||
G4double dE=rE-fE; // relative log shift from the left bin
|
||||
G4double dEnu=Enu+Enu; // doubled energy of nu/anu
|
||||
G4double Enu2=Enu*Enu; // squared energy of nu/anu
|
||||
G4double Emu=Enu-mmu; // Free Energy of neutrino/anti-neutrino
|
||||
G4double ME=Enu*MN; // M*E
|
||||
G4double dME=ME+ME; // 2*M*E
|
||||
G4double dEMN=(dEnu+MN)*ME;
|
||||
G4double MEm=ME-hmmu2;
|
||||
G4double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
|
||||
G4double E2M=MN*Enu2-(Enu+MN)*hmmu2;
|
||||
G4double ymax=(E2M+sqE)/dEMN;
|
||||
G4double ymin=(E2M-sqE)/dEMN;
|
||||
G4double rmin=1.-ymin;
|
||||
G4double rhm2E=hmmu2/Enu2;
|
||||
G4double Q2mi=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E)); // Q2_min(E_nu)
|
||||
G4double Q2ma=dME*ymax; // Q2_max(E_nu)
|
||||
G4double Q2nq=Emu*dMN-mcV;
|
||||
if(Q2ma>Q2nq) Q2ma=Q2nq; // Correction for Non Quasi Elastic
|
||||
// --- now r_min=Q2mi/Q2ma and r_max=1.; when r is randomized -> Q2=r*Q2ma ---
|
||||
G4double Rmi=Q2mi/Q2ma;
|
||||
G4double shift=.875/(1.+.2977/Enu/Enu)/pow(Enu,.78);
|
||||
// --- E-interpolation must be done in a log scale ---
|
||||
G4double Xmi=pow((shift-Rmi),power);// X_min(E_nu)
|
||||
G4double Xma=pow((shift-1.),power); // X_max(E_nu)
|
||||
// Find the integral values integ(Xmi) & integ(Xma) using the direct table
|
||||
G4double idX=dX[fE]+dE*(dX[sE]-dX[fE]); // interpolated X step
|
||||
G4double iXmi=Xmin[fE]+dE*(Xmin[sE]-Xmin[fE]); // interpolated X minimum
|
||||
G4double rXi=(Xmi-iXmi)/idX;
|
||||
G4int iXi=static_cast<int>(rXi);
|
||||
if(iXi<0) iXi=0;
|
||||
if(iXi>bX) iXi=bX;
|
||||
G4double dXi=rXi-iXi;
|
||||
G4double bntil=Il[fE][iXi];
|
||||
G4double intil=bntil+dXi*(Il[fE][iXi+1]-bntil);
|
||||
G4double bntir=Il[sE][iXi];
|
||||
G4double intir=bntir+dXi*(Il[sE][iXi+1]-bntir);
|
||||
G4double inti=intil+dE*(intir-intil);// interpolated begin of the integral
|
||||
//
|
||||
G4double rXa=(Xma-iXmi)/idX;
|
||||
G4int iXa=static_cast<int>(rXa);
|
||||
if(iXa<0) iXa=0;
|
||||
if(iXa>bX) iXa=bX;
|
||||
G4double dXa=rXa-iXa;
|
||||
G4double bntal=Il[fE][iXa];
|
||||
G4double intal=bntal+dXa*(Il[fE][iXa+1]-bntal);
|
||||
G4double bntar=Il[sE][iXa];
|
||||
G4double intar=bntar+dXa*(Il[sE][iXa+1]-bntar);
|
||||
G4double inta=intal+dE*(intar-intal);// interpolated end of the integral
|
||||
//
|
||||
// *** Find X using the reversed table ***
|
||||
G4double intx=inti+(inta-inti)*G4UniformRand();
|
||||
G4int intc=static_cast<int>(intx);
|
||||
if(intc<0) intc=0;
|
||||
if(intc>bX) intc=bX;
|
||||
G4double dint=intx-intc;
|
||||
G4double mXl=Xl[fE][intc];
|
||||
G4double Xlb=mXl+dint*(Xl[fE][intc+1]-mXl);
|
||||
G4double mXr=Xl[sE][intc];
|
||||
G4double Xrb=mXr+dint*(Xl[sE][intc+1]-mXr);
|
||||
G4double X=Xlb+dE*(Xrb-Xlb); // interpolated X value
|
||||
G4double R=shift-pow(X,pconv);
|
||||
G4double Q2=R*Q2ma;
|
||||
return Q2*GeV*GeV;
|
||||
}
|
||||
|
||||
// It returns a fraction of the direct interaction of the neutrino with quark-partons
|
||||
G4double G4QANuMuNuclearCrossSection::GetDirectPart(G4double Q2)
|
||||
{
|
||||
G4double f=Q2/4.62;
|
||||
G4double ff=f*f;
|
||||
G4double r=ff*ff;
|
||||
G4double s=pow((1.+.6/Q2),(-1.-(1.+r)/(12.5+r/.3)));
|
||||
//@@ It is the same for nu/anu, but for nu it is a bit less, and for anu a bit more (par)
|
||||
return 1.-s*(1.-s/2);
|
||||
}
|
||||
|
||||
// #of quark-partons in the nonperturbative phase space is the same for neut and anti-neut
|
||||
G4double G4QANuMuNuclearCrossSection::GetNPartons(G4double Q2)
|
||||
{
|
||||
return 3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
|
||||
}
|
||||
|
||||
// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
|
||||
G4int G4QANuMuNuclearCrossSection::GetExchangePDGCode() {return 211;}
|
||||
+85
-11
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCaptureAtRest.cc,v 1.20 2005/06/27 15:30:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QCaptureAtRest.cc,v 1.1 2005/11/25 20:29:25 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCaptureAtRest class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -131,10 +131,14 @@ G4bool G4QCaptureAtRest::IsApplicable(const G4ParticleDefinition& particle)
|
||||
|
||||
G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4Step& step)
|
||||
{
|
||||
static const G4double mNeut= G4QPDGCode(2112).GetMass();
|
||||
static const G4double mProt= G4QPDGCode(2212).GetMass();
|
||||
static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
static const G4double mNeut = G4QPDGCode(2112).GetMass();
|
||||
static const G4double mNeut2= mNeut*mNeut;
|
||||
static const G4double dmNeut= mNeut+mNeut;
|
||||
static const G4double mProt = G4QPDGCode(2212).GetMass();
|
||||
static const G4double dmProt= mProt+mProt;
|
||||
static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
static const G4double mDeut = G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
static const G4double mAlph = G4QPDGCode(2112).GetNuclMass(2,2,0);
|
||||
//static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
//static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
//static const G4double mTau = G4QPDGCode(15).GetMass();
|
||||
@@ -147,7 +151,7 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt is called,EnDeposition="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
if (! IsApplicable(*particle)) // Check applicability
|
||||
if (!IsApplicable(*particle)) // Check applicability
|
||||
{
|
||||
G4cerr<<"G4QCaptureAtRest::AtRestDoIt: Only mu-,pi-,K-,S-,X-,O-,aP,aN,aS+."<< G4endl;
|
||||
return 0;
|
||||
@@ -285,12 +289,83 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
localtime += Time;
|
||||
std::vector<G4double>* cascE = new std::vector<G4double>;
|
||||
std::vector<G4Track*>* cascT = new std::vector<G4Track*>;
|
||||
G4bool neutronElastic = false; // Flag of elastic neutro-nucleeus Scattering
|
||||
G4bool chargExElastic = false; // Flag of charge exchange Quasi-Elastic Scat.
|
||||
G4LorentzVector proj4M;
|
||||
G4double mAT=0.; // Prototype of mass of the GS target nucleus
|
||||
G4double totNE=0.; // Prototype of total neutron energy
|
||||
G4double mAP=0.; // Prototype of M_GSCompoundNucleus-proton
|
||||
if(projPDG==2112)
|
||||
{
|
||||
proj4M=stoppedHadron->Get4Momentum();
|
||||
totNE=proj4M.e();
|
||||
// For low energy neutrons the threshold of the capture must be checked
|
||||
G4QPDGCode QPDGbase;
|
||||
mAT=QPDGbase.GetNuclMass(Z,N,0); // mass of the GS target nucleus
|
||||
G4double mAR=sqrt(mAT*(mAT+totNE+totNE)+mNeut2); // Real compound mass
|
||||
G4double mAN=QPDGbase.GetNuclMass(Z,N+1,0); // mass of the GS compound nucleus
|
||||
mAP=QPDGbase.GetNuclMass(Z-1,N+1,0); // M_GSCompoundNucleus-proton
|
||||
G4double mAA=1000000.; // Default (light nuclei) mass of the GSCompoundNucleus-alpha
|
||||
if(Z>=2 && N>=1) mAA=QPDGbase.GetNuclMass(Z-2,N-1,0); // mass of GSCompNucleus-alpha
|
||||
G4double eProt=mAR-mAP-mProt;
|
||||
if(mAR<mAN && eProt>0.)
|
||||
{
|
||||
G4double eNeut=totNE-mNeut;
|
||||
if(eNeut<0.) eNeut=0.;
|
||||
if(totNE-mNeut<.0001) chargExElastic=true; // neutron is too soft -> chargeExchange
|
||||
else
|
||||
{
|
||||
G4double probP=sqrt(eProt*(dmProt+eProt));
|
||||
G4double probN=sqrt(eNeut*(dmNeut+eNeut));
|
||||
if((probN+probP)*G4UniformRand()<probN) neutronElastic=true; // nElastic Scattering
|
||||
else chargExElastic=true; // proton's phase space is bigger -> chargeExchange
|
||||
}
|
||||
}
|
||||
else if(mAR<mAN||(mAR<mAP+mProt&&mAR<mAA+mAlph)) neutronElastic=true; // nElaScattering
|
||||
}
|
||||
G4int nuPDG=14; // Prototype for weak decay
|
||||
if(projPDG==15) nuPDG=16;
|
||||
if(projPDG==-211 && targPDG==90001000) // Use Panofsky ratio for (p+pi-) system decay
|
||||
if(projPDG==2112 && neutronElastic) // Elastic scattering of low energy neutron
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:nElast, 4M="<<proj4M<<",Z="<<Z<<",N="<<N<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector a4Mom(0.,0.,0.,mAT); // 4-momentum of the target nucleus
|
||||
G4LorentzVector totLV=proj4M+a4Mom; // 4-momentum of the compound system
|
||||
G4LorentzVector n4Mom(0.,0.,0.,mNeut); // mass of the secondary neutron
|
||||
if(!G4QHadron(totLV).DecayIn2(a4Mom,n4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:n+A=>n+A,Z="<<Z<<",N="<<N<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* secnuc = new G4QHadron(targPDG,a4Mom); // Create recoil nucleus
|
||||
output->push_back(secnuc); // Fill recoil nucleus to the output
|
||||
G4QHadron* neutron = new G4QHadron(2112,n4Mom); // Create Hadron for the Neutron
|
||||
output->push_back(neutron); // Fill the neutron to the output
|
||||
}
|
||||
if(projPDG==2112 && chargExElastic) // ChargeEx from neutron to proton: (n,p) reac
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt:npChEx, 4M="<<proj4M<<",Z="<<Z<<",N="<<N<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector totLV(0.,0.,0.,mAT); // 4-momentum of the target nucleus
|
||||
totLV+=proj4M; // 4-momentum of the compound system
|
||||
G4LorentzVector a4Mom(0.,0.,0.,mAP); // 4-momentum of the residual to (n,p)
|
||||
G4LorentzVector p4Mom(0.,0.,0.,mProt); // mass of the secondary proton
|
||||
if(!G4QHadron(totLV).DecayIn2(a4Mom,p4Mom))
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCaptureAtRest::AtRestDoIt:n+A=p+A',Z="<<Z<<",N="<<N<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
G4QHadron* secnuc = new G4QHadron(targPDG-999,a4Mom); // Create recharged nucleus
|
||||
output->push_back(secnuc); // Fill recharged nucleus to the output
|
||||
G4QHadron* proton = new G4QHadron(2212,p4Mom); // Create Hadron for the Proton
|
||||
output->push_back(proton) ; // Fill the proton to the output
|
||||
}
|
||||
else if(projPDG==-211 && targPDG==90001000)// Use Panofsky Ratio for (p+pi-) system decay
|
||||
{ // (p+pi-=>n+pi0)/p+pi-=>n+gamma) = 3/2
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Panofsky targPDG="<<targPDG<<G4endl;
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: Panofsky targPDG="<<targPDG<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector totLV(0.,0.,0.,mp+mProt);// 4-momentum of the compound system
|
||||
G4int pigamPDG=111; // Prototype is for pi0
|
||||
@@ -459,8 +534,7 @@ G4VParticleChange* G4QCaptureAtRest::AtRestDoIt(const G4Track& track, const G4St
|
||||
G4cout<<"G4QCaptureAtRest::AtRestDoIt: CHIPS M="<<mp<<",dE="<<EnergyDeposition<<G4endl;
|
||||
#endif
|
||||
G4LorentzVector projLV(0.,0.,0.,mp);
|
||||
// @@ it can be a flag @@ now for tau it is only energy deposition, for mu +EMCascade
|
||||
if(projPDG==13)
|
||||
if(projPDG==13) // now for tau it is only energy deposition, for mu this EMCascade
|
||||
{
|
||||
MuCaptureEMCascade(Z, N, cascE);
|
||||
G4int nsec=cascE->size();
|
||||
+421
-127
@@ -20,8 +20,8 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QCollision.cc,v 1.5 2005/06/27 15:30:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QCollision.cc,v 1.6 2005/12/01 17:28:18 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ---------------- G4QCollision class -----------------
|
||||
// by Mikhail Kossov, December 2003.
|
||||
@@ -29,7 +29,6 @@
|
||||
// ---------------------------------------------------------------
|
||||
// ****************************************************************************************
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
|
||||
//#define debug
|
||||
@@ -37,6 +36,12 @@
|
||||
|
||||
#include "G4QCollision.hh"
|
||||
|
||||
// Initialization of static vectors
|
||||
std::vector<G4int> G4QCollision::ElementZ; // Z of the element(i) in theLastCalc
|
||||
std::vector<G4double> G4QCollision::ElProbInMat; // SumProbabilityElements in Material
|
||||
std::vector<std::vector<G4int>*> G4QCollision::ElIsoN; // N of isotope(j) of Element(i)
|
||||
std::vector<std::vector<G4double>*>G4QCollision::IsoProbInEl;//SumProbabIsotopes inElementI
|
||||
|
||||
G4QCollision::G4QCollision(const G4String& processName) : G4VDiscreteProcess(processName)
|
||||
{
|
||||
#ifdef debug
|
||||
@@ -65,6 +70,8 @@ G4bool G4QCollision::EnergyFlux=false; // Flag for Energy Flux use (not MultyQ
|
||||
G4double G4QCollision::PiPrThresh=141.4; // Pion Production Threshold for gammas
|
||||
G4double G4QCollision::M2ShiftVir=20000.;// Shift for M2=-Q2=m_pi^2 of the virtualGamma
|
||||
G4double G4QCollision::DiNuclMass=1880.; // DoubleNucleon Mass for VirtualNormalization
|
||||
G4double G4QCollision::photNucBias=1.; // BiasingParameter for photo(e,mu,tau)Nuclear
|
||||
G4double G4QCollision::weakNucBias=1.; // BiasingParameter for ChargedCurrents(nu,mu)
|
||||
|
||||
void G4QCollision::SetManual() {manualFlag=true;}
|
||||
void G4QCollision::SetStandard() {manualFlag=false;}
|
||||
@@ -94,6 +101,9 @@ void G4QCollision::SetParameters(G4double temper, G4double ssin2g, G4double etae
|
||||
G4QEnvironment::SetParameters(SolidAngle); // SolAngle of pbar-A secondary mesons capture
|
||||
}
|
||||
|
||||
void G4QCollision::SetPhotNucBias(G4double phnB) {photNucBias=phnB;}
|
||||
void G4QCollision::SetWeakNucBias(G4double ccnB) {weakNucBias=ccnB;}
|
||||
|
||||
// Destructor
|
||||
|
||||
G4QCollision::~G4QCollision() {}
|
||||
@@ -109,6 +119,9 @@ G4int G4QCollision::GetNumberOfNeutronsInTarget()
|
||||
return nOfNeutrons;
|
||||
}
|
||||
|
||||
// output of the function must be in units of length! L=1/sig_V,sig_V=SUM(n(j,i)*sig(j,i)),
|
||||
// where n(i,j) is a number of nuclei of the isotop j of the element i in V=1(lengtUnit^3)
|
||||
// ********** All CHIPS cross sections are calculated in the surface units ************
|
||||
G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCondition* Fc)
|
||||
{
|
||||
*Fc = NotForced;
|
||||
@@ -126,11 +139,11 @@ G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCon
|
||||
G4cout<<"G4QCollision::GetMeanFreePath:"<<nE<<" Elem's in theMaterial"<<G4endl;
|
||||
#endif
|
||||
G4bool leptoNuc=false; // By default the reaction is not lepto-nuclear
|
||||
G4VQCrossSection* CSmanager=G4QProtonNuclearCrossSection::GetPointer();
|
||||
G4VQCrossSection* CSmanager=0;
|
||||
if(incidentParticleDefinition == G4Proton::Proton())
|
||||
CSmanager=G4QProtonNuclearCrossSection::GetPointer();
|
||||
CSmanager=G4QProtonNuclearCrossSection::GetPointer();
|
||||
else if(incidentParticleDefinition == G4Gamma::Gamma())
|
||||
CSmanager=G4QPhotonNuclearCrossSection::GetPointer();
|
||||
CSmanager=G4QPhotonNuclearCrossSection::GetPointer();
|
||||
else if(incidentParticleDefinition == G4Electron::Electron() ||
|
||||
incidentParticleDefinition == G4Positron::Positron())
|
||||
{
|
||||
@@ -143,25 +156,116 @@ G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCon
|
||||
CSmanager=G4QMuonNuclearCrossSection::GetPointer();
|
||||
leptoNuc=true;
|
||||
}
|
||||
else if(incidentParticleDefinition == G4TauPlus::TauPlus() ||
|
||||
incidentParticleDefinition == G4TauMinus::TauMinus())
|
||||
{
|
||||
CSmanager=G4QTauNuclearCrossSection::GetPointer();
|
||||
leptoNuc=true;
|
||||
}
|
||||
else if(incidentParticleDefinition == G4NeutrinoMu::NeutrinoMu() )
|
||||
{
|
||||
CSmanager=G4QNuMuNuclearCrossSection::GetPointer();
|
||||
leptoNuc=true;
|
||||
}
|
||||
else if(incidentParticleDefinition == G4AntiNeutrinoMu::AntiNeutrinoMu() )
|
||||
{
|
||||
CSmanager=G4QANuMuNuclearCrossSection::GetPointer();
|
||||
leptoNuc=true;
|
||||
}
|
||||
else G4cout<<"G4QCollision::GetMeanFreePath:Particle isn't implemented in CHIPS"<<G4endl;
|
||||
|
||||
G4QIsotope* Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singelton
|
||||
G4double sigma=0.;
|
||||
G4QIsotope* Isotopes = G4QIsotope::Get(); // Pointer to the G4QIsotopes singleton
|
||||
G4double sigma=0.; // Sums over elements for the material
|
||||
G4int IPIE=IsoProbInEl.size(); // How many old elements?
|
||||
if(IPIE) for(G4int ip=0; ip<IPIE; ++ip) // Clean up the SumProb's of Isotopes (SPI)
|
||||
{
|
||||
std::vector<G4double>* SPI=IsoProbInEl[ip]; // Pointer to the SPI vector
|
||||
SPI->clear();
|
||||
delete SPI;
|
||||
std::vector<G4int>* IsN=ElIsoN[ip]; // Pointer to the N vector
|
||||
IsN->clear();
|
||||
delete IsN;
|
||||
}
|
||||
ElProbInMat.clear(); // Clean up the SumProb's of Elements (SPE)
|
||||
ElementZ.clear(); // Clear the body vector for Z of Elements
|
||||
IsoProbInEl.clear(); // Clear the body vector for SPI
|
||||
ElIsoN.clear(); // Clear the body vector for N of Isotopes
|
||||
for(G4int i=0; i<nE; ++i)
|
||||
{
|
||||
G4int Z = static_cast<G4int>((*theElementVector)[i]->GetZ()); // Z of the Element
|
||||
std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->GetCSVector(Z); // Pointer to CS
|
||||
G4int nIs=cs->size(); // A#Of Isotopes in the Element
|
||||
if(nIs) for(G4int j=0; j<nIs; j++) // Calculate CS for eachIsotope of El
|
||||
G4Element* pElement=(*theElementVector)[i]; // Pointer to the current element
|
||||
G4int Z = static_cast<G4int>(pElement->GetZ()); // Z of the Element
|
||||
ElementZ.push_back(Z); // Remember Z of the Element
|
||||
G4int isoSize=0; // The default for the isoVectorLength is 0
|
||||
G4int indEl=0; // Index of non-trivial element or 0(default)
|
||||
G4IsotopeVector* isoVector=pElement->GetIsotopeVector(); // Get the predefined IsoVect
|
||||
if(isoVector) isoSize=isoVector->size();// Get size of the existing isotopeVector
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::GetMeanFreePath: isovectorLength="<<isoSize<<G4endl; // Result
|
||||
#endif
|
||||
if(isoSize) // The Element has non-trivial abumdance set
|
||||
{
|
||||
std::pair<G4int,G4double>* curIs=(*cs)[j]; // A pointer, which is used twice
|
||||
G4int N=curIs->first; // #ofNeuterons in the isotope
|
||||
curIs->second = CSmanager->GetCrossSection(Momentum, Z, N); // CS calculation
|
||||
indEl=pElement->GetIndex(); // Index of the non-trivial element
|
||||
if(!Isotopes->IsDefined(Z,indEl)) // This index is not defined for this Z: define
|
||||
{
|
||||
std::vector<std::pair<G4int,G4double>*>* newAbund =
|
||||
new std::vector<std::pair<G4int,G4double>*>;
|
||||
G4double* abuVector=pElement->GetRelativeAbundanceVector();
|
||||
for(G4int j=0; j<isoSize; j++) // Calculation of abundance vector for isotopes
|
||||
{
|
||||
G4int N=pElement->GetIsotope(j)->GetN()-Z; // N means A=N+Z !
|
||||
if(pElement->GetIsotope(j)->GetZ()!=Z)G4cerr<<"G4QCaptureAtRest::GetMeanFreePath"
|
||||
<<": Z="<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
|
||||
G4double abund=abuVector[j];
|
||||
std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl;
|
||||
#endif
|
||||
newAbund->push_back(pr);
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: pairVectorLength="<<newAbund->size()<<G4endl;
|
||||
#endif
|
||||
indEl=G4QIsotope::Get()->InitElement(Z,indEl,newAbund); // definition of the newInd
|
||||
for(G4int k=0; k<isoSize; k++) delete (*newAbund)[k]; // Cleaning temporary
|
||||
delete newAbund; // Was "new" in the beginning of the name space
|
||||
}
|
||||
}
|
||||
std::vector<std::pair<G4int,G4double>*>* cs= Isotopes->GetCSVector(Z,indEl);//CSPointer
|
||||
std::vector<G4double>* SPI = new std::vector<G4double>; // Pointer to the SPI vector
|
||||
IsoProbInEl.push_back(SPI);
|
||||
std::vector<G4int>* IsN = new std::vector<G4int>; // Pointer to the N vector
|
||||
ElIsoN.push_back(IsN);
|
||||
G4int nIs=cs->size(); // A#Of Isotopes in the Element
|
||||
G4double susi=0.; // sum of CS over isotopes
|
||||
if(nIs) for(G4int j=0; j<nIs; j++) // Calculate CS for eachIsotope of El
|
||||
{
|
||||
std::pair<G4int,G4double>* curIs=(*cs)[j]; // A pointer, which is used twice
|
||||
G4int N=curIs->first; // #of Neuterons in the isotope j of El i
|
||||
IsN->push_back(N); // Remember Min N for the Element
|
||||
G4double CSI=CSmanager->GetCrossSection(Momentum,Z,N); // CrossS(j,i) for the isotope
|
||||
curIs->second = CSI;
|
||||
susi+=CSI; // Make a sum per isotopes
|
||||
SPI->push_back(susi); // Remember summed cross-section
|
||||
} // End of temporary initialization of the cross sections in the G4QIsotope singeltone
|
||||
sigma+=Isotopes->GetMeanCrossSection(Z)*NOfNucPerVolume[i]; // SUM(MeanCS*NOFNperV)
|
||||
sigma+=Isotopes->GetMeanCrossSection(Z,indEl)*NOfNucPerVolume[i];//SUM(MeanCS*NOfNperV)
|
||||
ElProbInMat.push_back(sigma);
|
||||
} // End of LOOP over Elements
|
||||
|
||||
// Check that cross section is not zero and return the mean free path
|
||||
if(photNucBias!=1.) if(incidentParticleDefinition == G4MuonPlus::MuonPlus() ||
|
||||
incidentParticleDefinition == G4MuonMinus::MuonMinus() ||
|
||||
incidentParticleDefinition == G4Electron::Electron() ||
|
||||
incidentParticleDefinition == G4Positron::Positron() ||
|
||||
incidentParticleDefinition == G4TauMinus::TauMinus() ||
|
||||
incidentParticleDefinition == G4TauPlus::TauPlus() )
|
||||
sigma*=photNucBias;
|
||||
if(photNucBias!=1.) if(incidentParticleDefinition==G4NeutrinoE::NeutrinoE() ||
|
||||
incidentParticleDefinition==G4AntiNeutrinoE::AntiNeutrinoE() ||
|
||||
incidentParticleDefinition==G4NeutrinoTau::NeutrinoTau() ||
|
||||
incidentParticleDefinition==G4AntiNeutrinoTau::AntiNeutrinoTau()||
|
||||
incidentParticleDefinition==G4NeutrinoMu::NeutrinoMu() ||
|
||||
incidentParticleDefinition==G4AntiNeutrinoMu::AntiNeutrinoMu() )
|
||||
sigma*=weakNucBias;
|
||||
if(sigma > 0.) return 1./sigma; // Mean path [distance]
|
||||
return DBL_MAX;
|
||||
}
|
||||
@@ -169,30 +273,32 @@ G4double G4QCollision::GetMeanFreePath(const G4Track& aTrack,G4double,G4ForceCon
|
||||
|
||||
G4bool G4QCollision::IsApplicable(const G4ParticleDefinition& particle)
|
||||
{
|
||||
if (particle == *( G4MuonPlus::MuonPlus() )) return true;
|
||||
else if (particle == *( G4MuonMinus::MuonMinus() )) return true;
|
||||
else if (particle == *( G4TauPlus::TauPlus() )) return true;
|
||||
else if (particle == *( G4TauMinus::TauMinus() )) return true;
|
||||
else if (particle == *( G4Electron::Electron() )) return true;
|
||||
else if (particle == *( G4Positron::Positron() )) return true;
|
||||
else if (particle == *( G4Gamma::Gamma() )) return true;
|
||||
else if (particle == *( G4Proton::Proton() )) return true;
|
||||
//else if (particle == *( G4Neutron::Neutron() )) return true;
|
||||
//else if (particle == *( G4PionMinus::PionMinus() )) return true;
|
||||
//else if (particle == *( G4PionPlus::PionPlus() )) return true;
|
||||
//else if (particle == *( G4KaonPlus::KaonPlus() )) return true;
|
||||
//else if (particle == *( G4KaonMinus::KaonMinus() )) return true;
|
||||
//else if (particle == *( G4KaonZeroLong::KaonZeroLong() )) return true;
|
||||
//else if (particle == *(G4KaonZeroShort::KaonZeroShort())) return true;
|
||||
//else if (particle == *( G4Lambda::Lambda() )) return true;
|
||||
//else if (particle == *( G4SigmaPlus::SigmaPlus() )) return true;
|
||||
//else if (particle == *( G4SigmaMinus::SigmaMinus() )) return true;
|
||||
//else if (particle == *( G4SigmaZero::SigmaZero() )) return true;
|
||||
//else if (particle == *( G4XiMinus::XiMinus() )) return true;
|
||||
//else if (particle == *( G4XiZero::XiZero() )) return true;
|
||||
//else if (particle == *( G4OmegaMinus::OmegaMinus() )) return true;
|
||||
//else if (particle == *( G4AntiNeutron::AntiNeutron() )) return true;
|
||||
//else if (particle == *( G4AntiProton::AntiProton() )) return true;
|
||||
if (particle == *( G4MuonPlus::MuonPlus() )) return true;
|
||||
else if (particle == *( G4MuonMinus::MuonMinus() )) return true;
|
||||
else if (particle == *( G4TauPlus::TauPlus() )) return true;
|
||||
else if (particle == *( G4TauMinus::TauMinus() )) return true;
|
||||
else if (particle == *( G4Electron::Electron() )) return true;
|
||||
else if (particle == *( G4Positron::Positron() )) return true;
|
||||
else if (particle == *( G4Gamma::Gamma() )) return true;
|
||||
//else if (particle == *( G4Proton::Proton() )) return true;
|
||||
else if (particle == *(G4AntiNeutrinoMu::AntiNeutrinoMu())) return true;
|
||||
else if (particle == *( G4NeutrinoMu::NeutrinoMu() )) return true;
|
||||
//else if (particle == *( G4Neutron::Neutron() )) return true;
|
||||
//else if (particle == *( G4PionMinus::PionMinus() )) return true;
|
||||
//else if (particle == *( G4PionPlus::PionPlus() )) return true;
|
||||
//else if (particle == *( G4KaonPlus::KaonPlus() )) return true;
|
||||
//else if (particle == *( G4KaonMinus::KaonMinus() )) return true;
|
||||
//else if (particle == *( G4KaonZeroLong::KaonZeroLong() )) return true;
|
||||
//else if (particle == *( G4KaonZeroShort::KaonZeroShort() )) return true;
|
||||
//else if (particle == *( G4Lambda::Lambda() )) return true;
|
||||
//else if (particle == *( G4SigmaPlus::SigmaPlus() )) return true;
|
||||
//else if (particle == *( G4SigmaMinus::SigmaMinus() )) return true;
|
||||
//else if (particle == *( G4SigmaZero::SigmaZero() )) return true;
|
||||
//else if (particle == *( G4XiMinus::XiMinus() )) return true;
|
||||
//else if (particle == *( G4XiZero::XiZero() )) return true;
|
||||
//else if (particle == *( G4OmegaMinus::OmegaMinus() )) return true;
|
||||
//else if (particle == *( G4AntiNeutron::AntiNeutron() )) return true;
|
||||
//else if (particle == *( G4AntiProton::AntiProton() )) return true;
|
||||
#ifdef debug
|
||||
G4cout<<"***G4QCollision::IsApplicable: PDG="<<particle.GetPDGEncoding()<<G4endl;
|
||||
#endif
|
||||
@@ -205,21 +311,51 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
static const G4double mu2=mu*mu; // squared muon mass
|
||||
//static const G4double dpi=M_PI+M_PI; // 2*pi (for Phi distr.) ***changed to twopi***
|
||||
static const G4double mNeut= G4QPDGCode(2112).GetMass();
|
||||
static const G4double mNeut2= mNeut*mNeut;
|
||||
static const G4double muN= mNeut+mu;
|
||||
static const G4double muN2= muN*muN;
|
||||
static const G4double fmuN= 4*mNeut2*mu2;
|
||||
static const G4double musN= mNeut2+mu2;
|
||||
static const G4double mProt= G4QPDGCode(2212).GetMass();
|
||||
static const G4double mProt2= mProt*mProt;
|
||||
static const G4double muP= mProt+mu;
|
||||
static const G4double muP2= muP*muP;
|
||||
static const G4double fmuP= 4*mProt2*mu2;
|
||||
static const G4double musP= mProt2+mu2;
|
||||
static const G4double dM=mProt+mNeut; // doubled nucleon mass
|
||||
static const G4double mudM=mu2/dM; // for x limit
|
||||
static const G4double hdM=dM/2.; // M of the "nucleon"
|
||||
//static const G4double hdM2=hdM*hdM; // M2 of the "nucleon"
|
||||
//static const G4double mPi0 = G4QPDGCode(111).GetMass();
|
||||
//static const G4double mDeut= G4QPDGCode(2112).GetNuclMass(1,1,0);
|
||||
//static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
static const G4double mPi = G4QPDGCode(211).GetMass();
|
||||
static const G4double mPPi = mPi+mProt; // Delta threshold
|
||||
//static const G4double mPPi2= mPPi*mPPi; // Delta low threshold for W2
|
||||
//static const G4double mDel2= 1400*1400; // Delta up threshold for W2 (in MeV^2)
|
||||
static const G4double muD = mPPi+mu; // Multiperipheral threshold
|
||||
static const G4double muD2 = muD*muD;
|
||||
//static const G4double mMu = G4QPDGCode(13).GetMass();
|
||||
//static const G4double mTau = G4QPDGCode(15).GetMass();
|
||||
//static const G4double mEl = G4QPDGCode(11).GetMass();
|
||||
//
|
||||
const G4DynamicParticle* projHadron = track.GetDynamicParticle();
|
||||
const G4ParticleDefinition* particle=projHadron->GetDefinition();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: Before the GetMeanFreePath is called"<<G4endl;
|
||||
#endif
|
||||
G4ForceCondition cond=NotForced;
|
||||
GetMeanFreePath(track, 1., &cond);
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: After the GetMeanFreePath is called"<<G4endl;
|
||||
#endif
|
||||
G4bool scat=false;
|
||||
G4int scatPDG=0; // Must be filled if true
|
||||
G4LorentzVector proj4M=projHadron->Get4Momentum();
|
||||
G4LorentzVector scat4M=proj4M; // Must be filled if true
|
||||
G4double momentum = projHadron->GetTotalMomentum(); // 3-momentum of the Particle
|
||||
G4double Momentum=proj4M.rho();
|
||||
if(std::fabs(Momentum-momentum)>.001)G4cerr<<"G4QC::PSDI P="<<Momentum<<"="<<momentum<<G4endl;
|
||||
if(std::fabs(Momentum-momentum)>.001)
|
||||
G4cerr<<"G4QCollision::PostStepDoIt: P="<<Momentum<<"="<<momentum<<G4endl;
|
||||
#ifdef debug
|
||||
G4double mp=proj4M.m();
|
||||
G4cout<<"G4QCollision::PostStepDoIt is called, P="<<Momentum<<"="<<momentum<<G4endl;
|
||||
@@ -233,104 +369,102 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
const G4Material* material = track.GetMaterial(); // Get the current material
|
||||
G4int Z=0;
|
||||
const G4ElementVector* theElementVector = material->GetElementVector();
|
||||
G4int i=0;
|
||||
G4double sum=0.;
|
||||
G4int nE=material->GetNumberOfElements();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: "<<nE<<" elements in the material."<<G4endl;
|
||||
#endif
|
||||
G4int projPDG=0; // PDG Code prototype for the captured hadron
|
||||
// Not all these particles are implemented yet (see Is Applicable)
|
||||
if (particle == G4MuonPlus::MuonPlus() ) projPDG= -13;
|
||||
else if (particle == G4MuonMinus::MuonMinus() ) projPDG= 13;
|
||||
else if (particle == G4Electron::Electron() ) projPDG= 11;
|
||||
else if (particle == G4Positron::Positron() ) projPDG= -11;
|
||||
else if (particle == G4Gamma::Gamma() ) projPDG= 22;
|
||||
else if (particle == G4Proton::Proton() ) projPDG= 2212;
|
||||
else if (particle == G4Neutron::Neutron() ) projPDG= 2112;
|
||||
else if (particle == G4PionMinus::PionMinus() ) projPDG= -211;
|
||||
else if (particle == G4PionPlus::PionPlus() ) projPDG= 211;
|
||||
else if (particle == G4KaonPlus::KaonPlus() ) projPDG= 2112;
|
||||
else if (particle == G4KaonMinus::KaonMinus() ) projPDG= -321;
|
||||
else if (particle == G4KaonZeroLong::KaonZeroLong() ) projPDG= 130;
|
||||
else if (particle == G4KaonZeroShort::KaonZeroShort()) projPDG= 310;
|
||||
else if (particle == G4TauPlus::TauPlus() ) projPDG= -15;
|
||||
else if (particle == G4TauMinus::TauMinus() ) projPDG= 15;
|
||||
else if (particle == G4Lambda::Lambda() ) projPDG= 3122;
|
||||
else if (particle == G4SigmaPlus::SigmaPlus() ) projPDG= 3222;
|
||||
else if (particle == G4SigmaMinus::SigmaMinus() ) projPDG= 3112;
|
||||
else if (particle == G4SigmaZero::SigmaZero() ) projPDG= 3212;
|
||||
else if (particle == G4XiMinus::XiMinus() ) projPDG= 3312;
|
||||
else if (particle == G4XiZero::XiZero() ) projPDG= 3322;
|
||||
else if (particle == G4OmegaMinus::OmegaMinus() ) projPDG= 3334;
|
||||
else if (particle == G4AntiNeutron::AntiNeutron() ) projPDG=-2112;
|
||||
else if (particle == G4AntiProton::AntiProton() ) projPDG=-2212;
|
||||
if (particle == G4MuonPlus::MuonPlus() ) projPDG= -13;
|
||||
else if (particle == G4MuonMinus::MuonMinus() ) projPDG= 13;
|
||||
else if (particle == G4NeutrinoMu::NeutrinoMu() ) projPDG= 14;
|
||||
else if (particle == G4AntiNeutrinoMu::AntiNeutrinoMu() ) projPDG= -14;
|
||||
else if (particle == G4Electron::Electron() ) projPDG= 11;
|
||||
else if (particle == G4Positron::Positron() ) projPDG= -11;
|
||||
else if (particle == G4NeutrinoE::NeutrinoE() ) projPDG= 12;
|
||||
else if (particle == G4AntiNeutrinoE::AntiNeutrinoE() ) projPDG= -12;
|
||||
else if (particle == G4Gamma::Gamma() ) projPDG= 22;
|
||||
else if (particle == G4Proton::Proton() ) projPDG= 2212;
|
||||
else if (particle == G4Neutron::Neutron() ) projPDG= 2112;
|
||||
else if (particle == G4PionMinus::PionMinus() ) projPDG= -211;
|
||||
else if (particle == G4PionPlus::PionPlus() ) projPDG= 211;
|
||||
else if (particle == G4KaonPlus::KaonPlus() ) projPDG= 2112;
|
||||
else if (particle == G4KaonMinus::KaonMinus() ) projPDG= -321;
|
||||
else if (particle == G4KaonZeroLong::KaonZeroLong() ) projPDG= 130;
|
||||
else if (particle == G4KaonZeroShort::KaonZeroShort() ) projPDG= 310;
|
||||
else if (particle == G4TauPlus::TauPlus() ) projPDG= -15;
|
||||
else if (particle == G4TauMinus::TauMinus() ) projPDG= 15;
|
||||
else if (particle == G4NeutrinoTau::NeutrinoTau() ) projPDG= 16;
|
||||
else if (particle == G4AntiNeutrinoTau::AntiNeutrinoTau()) projPDG= -16;
|
||||
else if (particle == G4Lambda::Lambda() ) projPDG= 3122;
|
||||
else if (particle == G4SigmaPlus::SigmaPlus() ) projPDG= 3222;
|
||||
else if (particle == G4SigmaMinus::SigmaMinus() ) projPDG= 3112;
|
||||
else if (particle == G4SigmaZero::SigmaZero() ) projPDG= 3212;
|
||||
else if (particle == G4XiMinus::XiMinus() ) projPDG= 3312;
|
||||
else if (particle == G4XiZero::XiZero() ) projPDG= 3322;
|
||||
else if (particle == G4OmegaMinus::OmegaMinus() ) projPDG= 3334;
|
||||
else if (particle == G4AntiNeutron::AntiNeutron() ) projPDG=-2112;
|
||||
else if (particle == G4AntiProton::AntiProton() ) projPDG=-2212;
|
||||
G4int aProjPDG=std::abs(projPDG);
|
||||
#ifdef debug
|
||||
G4int prPDG=particle->GetPDGEncoding();
|
||||
G4cout<<"G4QCollision::PostStepRestDoIt: projPDG="<<projPDG<<",stPDG="<<prPDG<<G4endl;
|
||||
G4cout<<"G4QCollision::PostStepDoIt: projPDG="<<projPDG<<", stPDG="<<prPDG<<G4endl;
|
||||
#endif
|
||||
if(!projPDG)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCollision::PostStepDoIt: Undefined captured hadron"<<G4endl;
|
||||
G4cerr<<"---Warning---G4QCollision::PostStepDoIt:Undefined interacting hadron"<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
// @@ It's a standard randomization procedure, which can be placed in G4QMaterial class
|
||||
std::vector<G4double> sumfra;
|
||||
G4int EPIM=ElProbInMat.size();
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollis::PostStDoIt: m="<<EPIM<<",n="<<nE<<",T="<<ElProbInMat[EPIM-1]<<G4endl;
|
||||
#endif
|
||||
G4double rnd = ElProbInMat[EPIM-1]*G4UniformRand();
|
||||
G4int i=0;
|
||||
for(i=0; i<nE; ++i)
|
||||
{
|
||||
G4double frac=material->GetFractionVector()[i];
|
||||
sum+=frac;
|
||||
sumfra.push_back(sum); // remember the summation steps
|
||||
{
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt:EPM["<<i<<"]="<<ElProbInMat[i]<<",r="<<rnd<<G4endl;
|
||||
#endif
|
||||
if (rnd<ElProbInMat[i]) break;
|
||||
}
|
||||
G4double rnd = sum*G4UniformRand();
|
||||
for(i=0; i<nE; ++i) if (rnd<sumfra[i]) break;
|
||||
if(i>=nE) i=nE-1; // Top limit for the Element
|
||||
G4Element* pElement=(*theElementVector)[i];
|
||||
Z=static_cast<G4int>(pElement->GetZ());
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: i="<<i<<", Z(element)="<<Z<<G4endl;
|
||||
#endif
|
||||
if(Z<=0)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCollision::PostStepDoIt:Element with Z="<<Z<< G4endl;
|
||||
G4cerr<<"---Warning---G4QCollision::PostStepDoIt: Element with Z="<<Z<<G4endl;
|
||||
if(Z<0) return 0;
|
||||
}
|
||||
G4int N = Z;
|
||||
G4int isoSize=0; // The default for the isoVectorLength is 0
|
||||
G4IsotopeVector* isoVector=pElement->GetIsotopeVector();
|
||||
if(isoVector) isoSize=isoVector->size(); // Get real size of the isotopeVector if exists
|
||||
std::vector<G4double>* SPI = IsoProbInEl[i];// Vector of summedProbabilities for isotopes
|
||||
std::vector<G4int>* IsN = ElIsoN[i]; // Vector of "#of neutrons" in the isotope El[i]
|
||||
G4int nofIsot=SPI->size(); // #of isotopes in the element i
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: isovectorLength="<<isoSize<<G4endl;
|
||||
G4cout<<"G4QCollis::PosStDoIt:n="<<nofIsot<<",T="<<(*SPI)[nofIsot-1]<<",r="<<rnd<<G4endl;
|
||||
#endif
|
||||
if(isoSize) // The Element has not trivial abumdance set
|
||||
rnd = (*SPI)[nofIsot-1]*G4UniformRand(); // Randomize the isotop of the Element
|
||||
G4int j=0;
|
||||
for(j=0; j<nofIsot; ++j)
|
||||
{
|
||||
// @@ the following solution is temporary till G4Element can contain the QIsotopIndex
|
||||
G4int curInd=G4QIsotope::Get()->GetLastIndex(Z);
|
||||
if(!curInd) // The new artificial element must be defined
|
||||
{
|
||||
std::vector<std::pair<G4int,G4double>*>* newAbund =
|
||||
new std::vector<std::pair<G4int,G4double>*>;
|
||||
G4double* abuVector=pElement->GetRelativeAbundanceVector();
|
||||
for(G4int j=0; j<isoSize; j++)
|
||||
{
|
||||
N=pElement->GetIsotope(j)->GetN()-Z;
|
||||
if(pElement->GetIsotope(j)->GetZ()!=Z) G4cerr<<"*G4QCaptureAtRest::AtRestDoIt: Z="
|
||||
<<pElement->GetIsotope(j)->GetZ()<<"#"<<Z<<G4endl;
|
||||
G4double abund=abuVector[j];
|
||||
std::pair<G4int,G4double>* pr= new std::pair<G4int,G4double>(N,abund);
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt:pair#="<<j<<", N="<<N<<",ab="<<abund<<G4endl;
|
||||
G4cout<<"G4QCollision::PostStepDoIt: SP["<<j<<"]="<<(*SPI)[j]<<", r="<<rnd<<G4endl;
|
||||
#endif
|
||||
newAbund->push_back(pr);
|
||||
}
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: pairVectorLength="<<newAbund->size()<<G4endl;
|
||||
#endif
|
||||
curInd=G4QIsotope::Get()->InitElement(Z,1,newAbund);
|
||||
for(G4int k=0; k<isoSize; k++) delete (*newAbund)[k];
|
||||
delete newAbund;
|
||||
}
|
||||
// @@ ^^^^^^^^^^ End of the temporary solution ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
N = G4QIsotope::Get()->GetNeutrons(Z,curInd);
|
||||
if(rnd < (*SPI)[j]) break;
|
||||
}
|
||||
else N = G4QIsotope::Get()->GetNeutrons(Z);
|
||||
nOfNeutrons=N; // Remember it for energy-mom. check
|
||||
if(j>=nofIsot) j=nofIsot-1; // Top limit for the isotope
|
||||
G4int N =(*IsN)[j]; ; // Randomized number of neutrons
|
||||
#ifdef debug
|
||||
G4cout<<"G4QCollision::PostStepDoIt: j="<<i<<", N(isotope)="<<Z<<G4endl;
|
||||
#endif
|
||||
if(N<0)
|
||||
{
|
||||
G4cerr<<"-Warning-G4QCollision::PostStepDoIt: Isotope with Z="<<Z<<", 0>N="<<N<<G4endl;
|
||||
return 0;
|
||||
}
|
||||
nOfNeutrons=N; // Remember it for the energy-momentum check
|
||||
G4double dd=0.025;
|
||||
G4double am=Z+N;
|
||||
G4double sr=std::sqrt(am);
|
||||
@@ -344,28 +478,34 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
#endif
|
||||
if(N<0)
|
||||
{
|
||||
G4cerr<<"---Worning---G4QCollision::PostStepDoIt:Element with N="<<N<< G4endl;
|
||||
G4cerr<<"---Warning---G4QCollision::PostStepDoIt:Element with N="<<N<< G4endl;
|
||||
return 0;
|
||||
}
|
||||
if(projPDG==11||projPDG==-11||projPDG==13||projPDG==-13||projPDG==15||projPDG==-15)
|
||||
G4int targPDG=90000000+Z*1000+N; // PDG Code of the target nucleus
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double tM=targQPDG.GetMass();
|
||||
if(aProjPDG==11 || aProjPDG==13 || aProjPDG==15) // leptons with photonuclear
|
||||
{ // Lepto-nuclear case with the equivalent photon algorithm. @@InFuture + neutrino & QE
|
||||
G4double kinEnergy= projHadron->GetKineticEnergy();
|
||||
G4ParticleMomentum dir = projHadron->GetMomentumDirection();
|
||||
G4VQCrossSection* CSmanager=G4QElectronNuclearCrossSection::GetPointer();
|
||||
G4int aProjPDG=std::abs(projPDG);
|
||||
if(aProjPDG==13) CSmanager=G4QMuonNuclearCrossSection::GetPointer();
|
||||
if(aProjPDG==15) CSmanager=G4QTauNuclearCrossSection::GetPointer();
|
||||
G4double xSec=CSmanager->GetCrossSection(Momentum, Z, N);// Recalculate Cross Section
|
||||
if(aProjPDG== 13) CSmanager=G4QMuonNuclearCrossSection::GetPointer();
|
||||
if(projPDG== 14) CSmanager=G4QNuMuNuclearCrossSection::GetPointer();
|
||||
if(projPDG== -14) CSmanager=G4QANuMuNuclearCrossSection::GetPointer();
|
||||
if(aProjPDG== 15) CSmanager=G4QTauNuclearCrossSection::GetPointer();
|
||||
// @@ Probably this is not necessary any more
|
||||
G4double xSec=CSmanager->GetCrossSection(Momentum, Z, N);// Recalculate Cross Section!
|
||||
// @@ check a possibility to separate p, n, or alpha (!)
|
||||
G4double photonEnergy = CSmanager->GetExchangeEnergy(); // Energy of EqivExchangePart
|
||||
if(xSec <= 0.) // The cross-section iz 0 -> Do Nothing
|
||||
{
|
||||
G4cerr<<"-Warning-G4QCollision::PSDoIt: IsStillCalled photE="<<photonEnergy<<G4endl;
|
||||
//Do Nothing Action insead of the reaction
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
aParticleChange.ProposeMomentumDirection(dir) ;
|
||||
return G4VDiscreteProcess::PostStepDoIt(track,step);
|
||||
}
|
||||
G4double photonEnergy = CSmanager->GetExchangeEnergy(); // Energy of EqivExchangePart
|
||||
if( kinEnergy < photonEnergy )
|
||||
{
|
||||
//Do Nothing Action insead of the reaction
|
||||
@@ -433,11 +573,143 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
aParticleChange.ProposeMomentumDirection(findir); // new direction for the muon
|
||||
const G4ThreeVector photon3M=iniP*dir-finP*findir;
|
||||
projPDG=22;
|
||||
proj4M=G4LorentzVector(photon3M,photon3M.mag());
|
||||
proj4M=G4LorentzVector(photon3M,photon3M.mag()); //@@ photon is real?
|
||||
}
|
||||
if(aProjPDG==14) // *** neutrino nuclear interactions (only nu_mu/anu_mu & only CC) ***
|
||||
{
|
||||
G4double kinEnergy= projHadron->GetKineticEnergy();// For neutrino this is total energy
|
||||
G4double dKinE=kinEnergy+kinEnergy; // doubled energy for s calculation
|
||||
G4ParticleMomentum dir = projHadron->GetMomentumDirection(); // unit vector
|
||||
G4VQCrossSection* CSmanager=G4QNuMuNuclearCrossSection::GetPointer();
|
||||
proj4M=G4LorentzVector(dir*kinEnergy,kinEnergy); // temporary
|
||||
G4bool nuanu=true;
|
||||
scatPDG=13; // Prototype = secondary scattered mu-
|
||||
if(projPDG==-14)
|
||||
{
|
||||
nuanu=false;
|
||||
CSmanager=G4QANuMuNuclearCrossSection::GetPointer(); // @@ open
|
||||
scatPDG=-13; // secondary scattered mu+
|
||||
}
|
||||
// @@ Probably this is not necessary any more
|
||||
G4double xSec=CSmanager->GetCrossSection(Momentum, Z, N);// Recalculate Cross Section
|
||||
// @@ check a possibility to separate p, n, or alpha (!)
|
||||
if(xSec <= 0.) // The cross-section = 0 -> Do Nothing
|
||||
{
|
||||
G4cerr<<"-Warning-G4QCollision::PSDoIt: IsStillCalled nuE="<<kinEnergy<<G4endl;
|
||||
//Do Nothing Action insead of the reaction
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
aParticleChange.ProposeMomentumDirection(dir) ;
|
||||
return G4VDiscreteProcess::PostStepDoIt(track,step);
|
||||
}
|
||||
scat=true; // event with changed scattered projectile
|
||||
G4double totCS = CSmanager->GetLastTOTCS(); // the last total cross section (isotope?)
|
||||
if(std::fabs(xSec-totCS)/xSec>.0001)
|
||||
G4cout<<"-Warning-G4QCollision::PostStepDoIt: xS="<<xSec<<"# CS="<<totCS<<G4endl;
|
||||
G4double qelCS = CSmanager->GetLastQELCS(); // the last total cross section
|
||||
if(totCS - qelCS < 0.) totCS = qelCS; // only at low energies
|
||||
// make different definitions for neutrino and antineutrino (inFuture for nue/anue too)
|
||||
G4double mIN=mProt; // Just a prototype (for anu, Z=1, N=0)
|
||||
G4double mOT=mNeut;
|
||||
G4double OT=muN2;
|
||||
G4double mOT2=mNeut2;
|
||||
G4double muOT=fmuN;
|
||||
G4double musOT=musN;
|
||||
if(nuanu)
|
||||
{
|
||||
targPDG-=1;
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double rM=targQPDG.GetMass();
|
||||
mIN=tM-rM; // bounded in-mass of the neutron
|
||||
tM=rM;
|
||||
mOT=mProt;
|
||||
OT=muP2;
|
||||
mOT2=mProt2;
|
||||
muOT=fmuP;
|
||||
musOT=musP;
|
||||
projPDG=2212; // proton is going out
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Z>1||N>0) // Calculate the splitted mass
|
||||
{
|
||||
targPDG-=1000;
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double rM=targQPDG.GetMass();
|
||||
mIN=tM-rM; // bounded in-mass of the proton
|
||||
tM=rM;
|
||||
}
|
||||
else targPDG=0;
|
||||
projPDG=2112; // neutron is going out
|
||||
}
|
||||
G4double s=mIN*(mIN+dKinE); // s=(M_cm)^2
|
||||
if(s<=OT) // *** Do nothing solution ***
|
||||
{
|
||||
//Do NothingToDo Action insead of the reaction (@@ Can we make it common?)
|
||||
G4cout << "G4QCollision::PostStepDoIt: probability correction - DoNothing"<<G4endl;
|
||||
aParticleChange.ProposeEnergy(kinEnergy);
|
||||
aParticleChange.ProposeLocalEnergyDeposit(0.);
|
||||
aParticleChange.ProposeMomentumDirection(dir) ;
|
||||
return G4VDiscreteProcess::PostStepDoIt(track,step);
|
||||
}
|
||||
if((!nuanu||N)&&totCS*G4UniformRand()<qelCS||s<muD2)// ****** Quasi-Elastic interaction
|
||||
{
|
||||
G4double Q2=CSmanager->GetQEL_ExchangeQ2(); // OK, im MeV^2
|
||||
G4double ds=s+s; // dpubled s
|
||||
G4double sqs=std::sqrt(s); // M_cm
|
||||
G4double pi=(s-mIN*mIN)/(sqs+sqs); // initial momentum in CMS
|
||||
G4double dpi=pi+pi; // doubled initial momentum in CMS
|
||||
G4double sd=s-musOT; // s-mu2-mOT2
|
||||
G4double qo2=(sd*sd-muOT)/(ds+ds); // squared momentum of secondaries in CMS
|
||||
G4double qo=std::sqrt(qo2); // momentum of secondaries in CMS
|
||||
G4double cost=(dpi*std::sqrt(qo2+mu2)-Q2-mu2)/dpi/qo; // cos(theta) in CMS
|
||||
G4LorentzVector t4M(0.,0.,0.,mIN); // 4mom of the effective target
|
||||
G4LorentzVector c4M=t4M+proj4M; // 4mom of the compound system
|
||||
t4M.setT(mOT); // now it is 4mom of the outgoing nucleon
|
||||
scat4M=G4LorentzVector(0.,0.,0.,mu); // 4mom of the scattered muon
|
||||
if(!G4QHadron(c4M).RelDecayIn2(scat4M, t4M, c4M, cost, cost))
|
||||
{
|
||||
G4cerr<<"G4QCol::PSD:c4M="<<c4M<<sqs<<",mM="<<mu<<",tM="<<mOT<<",c="<<cost<<G4endl;
|
||||
throw G4QException("G4Quasmon::HadronizeQuasm: Can't dec QE nu,mu Compound");
|
||||
}
|
||||
proj4M=t4M; // 4mom of the new projectile nucleon
|
||||
}
|
||||
else // ***** Non Quasi Elastic interaction
|
||||
{
|
||||
G4double Q2=CSmanager->GetNQE_ExchangeQ2();
|
||||
projPDG=CSmanager->GetExchangePDGCode();
|
||||
//@@ Temporary made only for direct interaction and for N=3 (good for small Q2)
|
||||
//@@ inFuture use N=GetNPartons and directFraction=GetDirectPart, @@ W2...
|
||||
G4double r=G4UniformRand();
|
||||
G4double r1=0.5; // (1-x)
|
||||
if(r<0.5) r1=sqrt(r+r)*(.5+.1579*(r-.5));
|
||||
else if(r>0.5) r1=1.-sqrt(2.-r-r)*(.5+.1579*(.5-r));
|
||||
G4double xn=1.-mudM/Momentum; // Normalization of (1-x) [x>mudM/Mom]
|
||||
G4double x1=xn*r1; // (1-x)
|
||||
G4double x=1.-x1; // x=2k/M
|
||||
//G4double W2=(hdM2+Q2/x)*x1; // W2 candidate
|
||||
G4double mx=hdM*x;
|
||||
G4double we=(Q2/mx-mx)/2; // transfered energy
|
||||
G4double muQ2=(mu2+Q2)/2;
|
||||
G4double cost=(kinEnergy*we-muQ2)/kinEnergy/std::sqrt(we*we+Q2);
|
||||
if(std::fabs(cost)>1)
|
||||
{
|
||||
if(cost>1.) cost=1.;
|
||||
else cost=-1.;
|
||||
we=(muQ2*muQ2-kinEnergy*kinEnergy*Q2)/kinEnergy/(mu2+Q2); // minimum we
|
||||
}
|
||||
scat4M=G4LorentzVector(0.,0.,0.,mu); // 4mom of the scattered muon
|
||||
G4LorentzVector t4M(0.,0.,0.,-Q2); // 4mom of the virtual W
|
||||
if(!G4QHadron(proj4M).RelDecayIn2(scat4M, t4M, proj4M, cost, cost))
|
||||
{
|
||||
G4cerr<<"G4QCol::PSD:4M="<<proj4M<<",mM="<<mu<<",Q2="<<Q2<<",c="<<cost<<G4endl;
|
||||
throw G4QException("G4Quasmon::HadronizeQuasm: Can't dec nu->mu+W");
|
||||
}
|
||||
proj4M=t4M; // 4m of the pion
|
||||
}
|
||||
aParticleChange.ProposeEnergy(0.) ;
|
||||
aParticleChange.ProposeTrackStatus(fStopAndKill); // the initial neutrino is killed
|
||||
}
|
||||
G4int targPDG=90000000+Z*1000+N; // PDG Code of the target nucleus
|
||||
G4QPDGCode targQPDG(targPDG);
|
||||
G4double tM=targQPDG.GetMass();
|
||||
EnMomConservation=proj4M+G4LorentzVector(0.,0.,0.,tM); // Total 4-mom of the reaction
|
||||
G4QHadronVector* output=new G4QHadronVector; // Prototype of the output G4QHadronVector
|
||||
// @@@@@@@@@@@@@@ Temporary for the testing purposes --- Begin
|
||||
@@ -511,6 +783,12 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
aParticleChange.Initialize(track);
|
||||
G4double localtime = track.GetGlobalTime();
|
||||
G4ThreeVector position = track.GetPosition();
|
||||
// --- the scattered hadron with changed nature can be added here ---
|
||||
if(scat)
|
||||
{
|
||||
G4QHadron* scatHadron = new G4QHadron(scatPDG,scat4M);
|
||||
output->push_back(scatHadron);
|
||||
}
|
||||
// ------------- From here the secondaries are filled -------------------------
|
||||
G4int tNH = output->size(); // A#of hadrons in the output
|
||||
aParticleChange.SetNumberOfSecondaries(tNH);
|
||||
@@ -519,7 +797,13 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
G4cout<<"G4QCollision::PostStepDoIt: "<<tNH<<" particles are generated"<<G4endl;
|
||||
#endif
|
||||
G4int nOut=output->size(); // Real length of the output @@ Temporary
|
||||
if(tNH==1) tNH=0; // @@ Temporary
|
||||
if(tNH==1 && !scat) // @@ Temporary. Find out why it happened!
|
||||
{
|
||||
G4cout<<"-Warning-G4QCollision::PostStepDoIt: only one secondary! Make 0."<<G4endl;
|
||||
tNH=0;
|
||||
delete output->operator[](0); // delete the creazy hadron
|
||||
output->pop_back(); // clean up the output vector
|
||||
}
|
||||
if(tNH==2&&2!=nOut) G4cout<<"--Warning--G4QCollision::PostStepDoIt: 2 # "<<nOut<<G4endl;
|
||||
// Deal with ParticleChange final state interface to GEANT4 output of the process
|
||||
//if(tNH==2) for(i=0; i<tNH; i++) // @@ Temporary tNH==2 instead of just tNH
|
||||
@@ -566,10 +850,20 @@ G4VParticleChange* G4QCollision::PostStepDoIt(const G4Track& track, const G4Step
|
||||
#endif
|
||||
theDefinition = G4ParticleTable::GetParticleTable()->FindIon(aZ,aA,0,aZ);
|
||||
}
|
||||
else theDefinition = G4ParticleTable::GetParticleTable()->FindParticle(PDGCode);
|
||||
//else theDefinition = G4ParticleTable::GetParticleTable()->FindParticle(PDGCode);
|
||||
else
|
||||
{
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::PostStepDoIt:Define particle with PDG="<<PDGCode<<G4endl;
|
||||
#endif
|
||||
theDefinition = G4QPDGToG4Particle::Get()->GetParticleDefinition(PDGCode);
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QCollision::PostStepDoIt:AfterParticleDefinition PDG="<<PDGCode<<G4endl;
|
||||
#endif
|
||||
}
|
||||
if(!theDefinition)
|
||||
{
|
||||
G4cout<<"---Worning---G4QCollision::PostStepDoIt: drop PDG="<<PDGCode<<G4endl;
|
||||
G4cout<<"---Warning---G4QCollision::PostStepDoIt: drop PDG="<<PDGCode<<G4endl;
|
||||
delete hadr;
|
||||
continue;
|
||||
}
|
||||
+59
-55
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QElectronNuclearCrossSection.cc,v 1.3 2005/06/27 15:30:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QElectronNuclearCrossSection.cc,v 1.2 2005/11/25 21:34:17 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QElectronNuclearCrossSection for gamma+A cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
|
||||
//
|
||||
//===============================================================================================
|
||||
//================================================================================
|
||||
|
||||
///#define debug
|
||||
#define edebug
|
||||
@@ -69,8 +69,8 @@ G4double G4QElectronNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//static const G4double mNeut = G4QPDGCode(2112).GetMass();
|
||||
//static const G4double mProt = G4QPDGCode(2212).GetMass();
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0);
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1);
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/MeV;
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/MeV;
|
||||
// ---------
|
||||
static const G4double infEn = 9.e27;
|
||||
|
||||
@@ -80,16 +80,19 @@ G4double G4QElectronNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0);
|
||||
G4double mT= 0.;
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A)) mT=G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A))
|
||||
mT=G4NucleiProperties::GetNuclearMass(A,Z)/MeV;
|
||||
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
|
||||
// ---------
|
||||
G4double mP= infEn;
|
||||
//if(Z) mP= G4QPDGCode(111).GetNuclMass(Z-1,N,0);
|
||||
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1)) mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1);
|
||||
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1))
|
||||
mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV;
|
||||
else return infEn;
|
||||
G4double mN= infEn;
|
||||
//if(N) mN= G4QPDGCode(111).GetNuclMass(Z,N-1,0);
|
||||
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1)) mN=G4NucleiProperties::GetNuclearMass(A-1,Z);
|
||||
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1))
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV;
|
||||
else return infEn;
|
||||
G4double dP= mP+mProt-mT;
|
||||
G4double dN= mN+mNeut-mT;
|
||||
@@ -105,8 +108,8 @@ G4double G4QElectronNuclearCrossSection::CalculateCrossSection(G4int F,G4int I,G
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double EMi=2.0612; // Minimum tabulated Energy of the Electron
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron
|
||||
static const G4double lEMi=std::log(EMi); // Minimum tabulated logarithmic Energy of Electron
|
||||
static const G4double lEMa=std::log(EMa); // Maximum tabulated logarithmic Energy of Electron
|
||||
static const G4double lEMi=std::log(EMi); // Min tabulated logarithmic Energy of Electron
|
||||
static const G4double lEMa=std::log(EMa); // Max tabulated logarithmic Energy of Electron
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Log step in the table for electron Energy
|
||||
static const G4double alop=1./137.036/3.14159265; //coefficient for Ee>50000 calculations
|
||||
static const G4double mel=0.5109989; // Mass of the electron in MeV
|
||||
@@ -129,8 +132,8 @@ G4double G4QElectronNuclearCrossSection::CalculateCrossSection(G4int F,G4int I,G
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
G4double A=targN+targZ; // New A (can differ from G4double targetAtomicNumber)
|
||||
if(F<=0) // This isotope was not the last used isotop
|
||||
G4double A=targN+targZ; // New A (can differ from G4double targetAtomicNumber)
|
||||
if(F<=0) // This isotope was not the last used isotop
|
||||
{
|
||||
if(F<0) // This isotope was found in DAMDB =========> RETRIEVE
|
||||
{
|
||||
@@ -140,13 +143,13 @@ G4double G4QElectronNuclearCrossSection::CalculateCrossSection(G4int F,G4int I,G
|
||||
lastF =colF[I]; // Last ZeroPosition in the J-functions
|
||||
lastH =colH[I]; // Last High Energy Coefficient (A-dependent)
|
||||
}
|
||||
else // This isotope wasn't calculated previously => CREATE
|
||||
else // This isotope wasn't calculated previously => CREATE
|
||||
{
|
||||
lastJ1 = new G4double[nE]; // Allocate memory for the new J1 function
|
||||
lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function
|
||||
lastJ3 = new G4double[nE]; // Allocate memory for the new J3 function
|
||||
lastF = GetFunctions(A,lastJ1,lastJ2,lastJ3);//newZeroPos and J-functions filling
|
||||
lastH = alop*A*(1.-.072*std::log(A));//similar to lastSP of G4PhotonuclearCrossSection
|
||||
lastH = alop*A*(1.-.072*std::log(A)); // like lastSP of G4PhotonuclearCrossSection
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QElectronNuclearCS::CalculateCrossSection: lH="<<lastH<<",A="<<A<<G4endl;
|
||||
#endif
|
||||
@@ -168,8 +171,8 @@ G4double G4QElectronNuclearCrossSection::CalculateCrossSection(G4int F,G4int I,G
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
G4double lE=std::log(lastE); // log(muE) (it is necessary for the fit)
|
||||
lastG=lE-lmel; // Gamma of the muon (used to recover log(muE))
|
||||
G4double lE=std::log(lastE); // log(muE) (it is necessary for the fit)
|
||||
lastG=lE-lmel; // Gamma of the electron (used to recover log(muE))
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
if(lE<lEMa) // Linear fit is made explicitly to fix the last bin for the randomization
|
||||
@@ -219,7 +222,7 @@ G4int G4QElectronNuclearCrossSection::GetFunctions(G4double a, G4double* x,
|
||||
G4double* y, G4double* z)
|
||||
{
|
||||
static const G4int nN=14;
|
||||
static const G4int nE=336; // !! If change this, change it in GetCrossSection() (*.cc) !!
|
||||
static const G4int nE=336; // !! If change this, change it in GetCrossSection() (*.cc) !!
|
||||
static G4int L[nN]={138, 2, 32, 75, 26, 41, 0, 67, 58, 46, 41, 38, 39, 36};
|
||||
// !! @@ Change it from ln(A) to A approximation !!
|
||||
static G4double A[nN]={1.,2.,3.,4.,6.,7.,9.,12.,16.,27.,63.546,118.71,207.2,238.472};
|
||||
@@ -2341,14 +2344,14 @@ G4int G4QElectronNuclearCrossSection::GetFunctions(G4double a, G4double* x,
|
||||
if(a!=ai) a=ai;
|
||||
for(G4int i=0; i<nN; i++)
|
||||
{
|
||||
if(std::fabs(a-A[i])<.0005) // A coincide with one of the basic A's -> get from Tab
|
||||
if(std::fabs(a-A[i])<.0005) // if A coincides with one of the basic A's -> get from Tab
|
||||
{
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
x[k]=P0[i][k]; // J0
|
||||
y[k]=P1[i][k]; // J1
|
||||
z[k]=P2[i][k]; // J2
|
||||
}
|
||||
}
|
||||
r=L[i]; // Low channel for the J-functions
|
||||
}
|
||||
if(r<0) // Not the basic A-value -> must be calculated
|
||||
@@ -2371,7 +2374,7 @@ G4int G4QElectronNuclearCrossSection::GetFunctions(G4double a, G4double* x,
|
||||
}
|
||||
r=L[k];
|
||||
if(L[k1]<r) r=L[k1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2397,8 +2400,9 @@ G4double G4QElectronNuclearCrossSection::GetExchangeEnergy()
|
||||
G4double lastLE=lastG+lmel; // recover log(eE) from the gamma (lastG)
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
for(G4int i=lastF;i<=lastL;i++) Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
G4double ris=lastSig*G4UniformRand(); // Sig can be > Y[lastL=mL], then it is in the funct. region
|
||||
for(G4int i=lastF;i<=lastL;i++)
|
||||
Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
G4double ris=lastSig*G4UniformRand(); // If Sig > Y[lastL=mL] -> it is in functRegion
|
||||
#ifdef debug
|
||||
G4cout<<"G4QElectronNuclearCrossSection::GetExchEnergy: "<<ris<<",Y="<<Y[lastL]<<G4endl;
|
||||
#endif
|
||||
@@ -2407,10 +2411,10 @@ G4double G4QElectronNuclearCrossSection::GetExchangeEnergy()
|
||||
G4int j=lastF;
|
||||
G4double Yj=Y[j]; // It mast be 0 (some times just very small)
|
||||
while (ris>Yj && j<lastL) // Associative search
|
||||
{
|
||||
{
|
||||
j++;
|
||||
Yj=Y[j]; // High value
|
||||
}
|
||||
}
|
||||
G4int j1=j-1;
|
||||
G4double Yi=Y[j1]; // Low value
|
||||
phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
|
||||
@@ -2452,7 +2456,7 @@ G4double G4QElectronNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double lmel=std::log(mel); // Log of electron mass
|
||||
static const G4double z=std::log(EMa); // Initial argument
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTableEdge (small change)
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTableEdge
|
||||
static const G4int imax=27; // Not more than "imax" steps to find the solution
|
||||
static const G4double eps=0.001; // Accuracy which satisfies the search
|
||||
G4double lastLE=lastG+lmel; // recover log(eE) from the gamma (lastG)
|
||||
@@ -2490,21 +2494,21 @@ G4double G4QElectronNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
|
||||
G4double G4QElectronNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
{
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double mel2=mel*mel; // Squared Mass of electron in MeV
|
||||
G4double y=nu/lastE; // Part of energy carried by the equivalent pfoton
|
||||
if(y>=1.-1./(lastG+lastG)) return 0.; // The region where the method does not work
|
||||
G4double y2=y*y; // Squared photonic part of energy
|
||||
G4double ye=1.-y; // Part of energy carried by the secondary electron
|
||||
G4double Qi2=mel2*y2/ye; // Minimum Q2
|
||||
G4double Qa2=4*lastE*lastE*ye; // Maximum Q2
|
||||
G4double iar=Qi2/Qa2; // Q2min/Q2max ratio
|
||||
G4double Dy=ye+.5*y2; // D(y) function
|
||||
G4double Py=ye/Dy; // P(y) function
|
||||
G4double ePy=1.-std::exp(Py); // 1-exp(P(y)) part
|
||||
G4double Uy=Py*(1.-iar); // U(y) function
|
||||
G4double Fy=(ye+ye)*(1.+ye)*iar/y2; // F(y) function
|
||||
G4double fr=iar/(1.-ePy*iar); // Q-fraction
|
||||
static const G4double mel=0.5109989; // Mass of electron in MeV
|
||||
static const G4double mel2=mel*mel; // Squared Mass of electron in MeV
|
||||
G4double y=nu/lastE; // Part of energy carried by the equivalent pfoton
|
||||
if(y>=1.-1./(lastG+lastG)) return 0.; // The region where the method does not work
|
||||
G4double y2=y*y; // Squared photonic part of energy
|
||||
G4double ye=1.-y; // Part of energy carried by secondary electron
|
||||
G4double Qi2=mel2*y2/ye; // Minimum Q2
|
||||
G4double Qa2=4*lastE*lastE*ye; // Maximum Q2
|
||||
G4double iar=Qi2/Qa2; // Q2min/Q2max ratio
|
||||
G4double Dy=ye+.5*y2; // D(y) function
|
||||
G4double Py=ye/Dy; // P(y) function
|
||||
G4double ePy=1.-std::exp(Py); // 1-exp(P(y)) part
|
||||
G4double Uy=Py*(1.-iar); // U(y) function
|
||||
G4double Fy=(ye+ye)*(1.+ye)*iar/y2; // F(y) function
|
||||
G4double fr=iar/(1.-ePy*iar); // Q-fraction
|
||||
if(Fy<=-fr)
|
||||
{
|
||||
#ifdef edebug
|
||||
@@ -2512,14 +2516,14 @@ G4double G4QElectronNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
#endif
|
||||
return 0.;
|
||||
}
|
||||
G4double LyQa2=std::log(Fy+fr); // L(y,Q2max) function
|
||||
G4double LyQa2=std::log(Fy+fr); // L(y,Q2max) function
|
||||
G4bool cond=true;
|
||||
G4int maxTry=3;
|
||||
G4int cntTry=0;
|
||||
G4double Q2=Qi2;
|
||||
while(cond&&cntTry<maxTry) // The loop to avoid x>1.
|
||||
{
|
||||
G4double R=G4UniformRand(); // Random number (0,1)
|
||||
G4double R=G4UniformRand(); // Random number (0,1)
|
||||
Q2=Qi2*(ePy+1./(std::exp(R*LyQa2-(1.-R)*Uy)-Fy));
|
||||
cntTry++;
|
||||
cond = Q2>1878.*nu;
|
||||
@@ -2542,19 +2546,19 @@ G4double G4QElectronNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
}
|
||||
|
||||
// This class can provide only virtual exchange photons for all nu's and Q2's
|
||||
G4int G4QElectronNuclearCrossSection::GetExchangePDGCode(G4double, G4double) {return 22;}
|
||||
G4int G4QElectronNuclearCrossSection::GetExchangePDGCode() {return 22;}
|
||||
|
||||
G4double G4QElectronNuclearCrossSection::GetVirtualFactor(G4double nu, G4double Q2)
|
||||
{
|
||||
static const G4double dM=938.27+939.57; // Mean double nucleon mass = m_n+m_p (@@ no binding)
|
||||
static const G4double Q0=843.; // Coefficient of the dipole nucleonic form-factor
|
||||
static const G4double Q02=Q0*Q0; // Squared coefficient of the dipole nucleonic form-factor
|
||||
static const G4double blK0=std::log(185.); // Coefficient of the b-function
|
||||
static const G4double bp=0.85; // Power of the b-function
|
||||
static const G4double clK0=std::log(1390.); // Coefficient of the c-function
|
||||
static const G4double cp=3.; // Power of the c-function
|
||||
//G4double x=Q2/dM/nu; // Direct x definition
|
||||
G4double K=nu-Q2/dM; // K=nu*(1-x)
|
||||
static const G4double dM=938.27+939.57;// MeanDoubleNucleonMass = m_n+m_p(@@ no binding)
|
||||
static const G4double Q0=843.; // Coefficient of the dipole nucleonic form-factor
|
||||
static const G4double Q02=Q0*Q0; // SquaredCoefficient of dipoleNucleonicFormFactor
|
||||
static const G4double blK0=std::log(185.); // Coefficient of the b-function
|
||||
static const G4double bp=0.85; // Power of the b-function
|
||||
static const G4double clK0=std::log(1390.);// Coefficient of the c-function
|
||||
static const G4double cp=3.; // Power of the c-function
|
||||
//G4double x=Q2/dM/nu; // Direct x definition
|
||||
G4double K=nu-Q2/dM; // K=nu*(1-x)
|
||||
if(K<0.)
|
||||
{
|
||||
#ifdef edebug
|
||||
@@ -2563,8 +2567,8 @@ G4double G4QElectronNuclearCrossSection::GetVirtualFactor(G4double nu, G4double
|
||||
return 0.;
|
||||
}
|
||||
G4double lK=std::log(K); // ln(K)
|
||||
G4double x=1.-K/nu; // This definitin saves one div.
|
||||
G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor
|
||||
G4double x=1.-K/nu; // This definitin saves one div.
|
||||
G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor
|
||||
G4double b=std::exp(bp*(lK-blK0)); // b-factor
|
||||
G4double c=std::exp(cp*(lK-clK0)); // c-factor
|
||||
G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2)
|
||||
+27
-26
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QMuonNuclearCrossSection.cc,v 1.3 2005/06/27 15:30:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QMuonNuclearCrossSection.cc,v 1.2 2005/11/25 21:34:17 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QMuonNuclearCrossSection for gamma+A cross sections
|
||||
@@ -33,7 +33,7 @@
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
//===============================================================================================
|
||||
//=========================================================================================
|
||||
|
||||
///#define debug
|
||||
#define edebug
|
||||
@@ -73,9 +73,9 @@ G4double G4QMuonNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//static const G4double mNeut = G4QPDGCode(2112).GetMass();
|
||||
//static const G4double mProt = G4QPDGCode(2212).GetMass();
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0);
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1);
|
||||
static const G4double mAlph = G4NucleiProperties::GetNuclearMass(4,2);
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/MeV;
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/MeV;
|
||||
static const G4double mAlph = G4NucleiProperties::GetNuclearMass(4,2)/MeV;
|
||||
// ---------
|
||||
static const G4double infEn = 9.e27;
|
||||
|
||||
@@ -85,20 +85,21 @@ G4double G4QMuonNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0);
|
||||
G4double mT= 0.;
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A)) mT=G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A))
|
||||
mT=G4NucleiProperties::GetNuclearMass(A,Z)/MeV;
|
||||
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
|
||||
// --------- Splitting thresholds
|
||||
G4double mP= infEn;
|
||||
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1))
|
||||
mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1); // Residual mass for a proton
|
||||
mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // Residual mass for a proton
|
||||
|
||||
G4double mN= infEn;
|
||||
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1))
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-1,Z); // Residual mass for a neutron
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // Residual mass for a neutron
|
||||
|
||||
G4double mA= infEn;
|
||||
if(N>1&&Z>1&&G4NucleiPropertiesTable::IsInTable(Z-2,A-4))
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-4,Z-2); // Residual mass for an alpha
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // Residual mass for an alpha
|
||||
|
||||
G4double dP= mP +mProt - mT;
|
||||
G4double dN= mN +mNeut - mT;
|
||||
@@ -115,14 +116,14 @@ G4double G4QMuonNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4i
|
||||
static const G4int nE=336; // !! If change this, change it in GetFunctions() (*.hh) !!
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double EMi=2.0612; // Minimum tabulated KineticEnergy of Muon
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron
|
||||
static const G4double lEMi=std::log(EMi); // Minimum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double lEMa=std::log(EMa); // Maximum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Muon
|
||||
static const G4double lEMi=std::log(EMi); // Minimum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double lEMa=std::log(EMa); // Maximum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic table step for MuonKinEnergy
|
||||
static const G4double alop=1./137.036/3.14159265; //coeffitient for E>50000 calculations
|
||||
static const G4double mmu=105.65839; // Mass of the muon in MeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared Mass of muon in MeV^2
|
||||
static const G4double lmmu=std::log(mmu); // Log of the electron mass
|
||||
static const G4double lmmu=std::log(mmu); // Log of the muon mass
|
||||
// *** Begin of the Associative memory for acceleration of the cross section calculations
|
||||
static std::vector <G4int> colF; // Vector of LastStartPosition in Ji-function tables
|
||||
static std::vector <G4double> colH; // Vector of HighEnergyCoefficients (functional)
|
||||
@@ -158,7 +159,7 @@ G4double G4QMuonNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4i
|
||||
lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function
|
||||
lastJ3 = new G4double[nE]; // Allocate memory for the new J3 function
|
||||
lastF = GetFunctions(A,lastJ1,lastJ2,lastJ3);//newZeroPos and J-functions filling
|
||||
lastH = alop*A*(1.-.072*std::log(A));//similar to lastSP of G4PhotonuclearCrossSection
|
||||
lastH = alop*A*(1.-.072*std::log(A)); // like lastSP of G4PhotonuclearCrossSection
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4MuonNuclearCS::CalculateCrossSection: lastH="<<lastH<<",A="<<A<<G4endl;
|
||||
#endif
|
||||
@@ -2352,14 +2353,14 @@ G4int G4QMuonNuclearCrossSection::GetFunctions(G4double a,G4double*x,G4double*y,
|
||||
if(a!=ai) a=ai;
|
||||
for(G4int i=0; i<nN; i++)
|
||||
{
|
||||
if(std::fabs(a-A[i])<.0005) // A coincides with one of basic A's -> get from Tab
|
||||
if(std::fabs(a-A[i])<.0005) // A coincides with one of basic A's -> get from Tab
|
||||
{
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
x[k]=P0[i][k]; // J0
|
||||
y[k]=P1[i][k]; // J1
|
||||
z[k]=P2[i][k]; // J2
|
||||
}
|
||||
}
|
||||
r=L[i]; // Low channel for the J-functions
|
||||
}
|
||||
if(r<0) // Not the basic A-value -> must be calculated
|
||||
@@ -2382,7 +2383,7 @@ G4int G4QMuonNuclearCrossSection::GetFunctions(G4double a,G4double*x,G4double*y,
|
||||
}
|
||||
r=L[k];
|
||||
if(L[k1]<r) r=L[k1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2419,10 +2420,10 @@ G4double G4QMuonNuclearCrossSection::GetExchangeEnergy()
|
||||
G4int j=lastF;
|
||||
G4double Yj=Y[j]; // It mast be 0 (some times just very small)
|
||||
while (ris>Yj && j<lastL) // Associative search
|
||||
{
|
||||
{
|
||||
j++;
|
||||
Yj=Y[j]; // High value
|
||||
}
|
||||
}
|
||||
G4int j1=j-1;
|
||||
G4double Yi=Y[j1]; // Low value
|
||||
phLE=lEMi+(j1+(ris-Yi)/(Yj-Yi))*dlnE;
|
||||
@@ -2437,11 +2438,11 @@ G4double G4QMuonNuclearCrossSection::GetExchangeEnergy()
|
||||
G4cerr<<"**G4QMuonNucCS::GetExEn:L="<<lastL<<",S="<<lastSig<<",Y="<<Y[lastL]<<G4endl;
|
||||
G4double f=(ris-Y[lastL])/lastH; // ScaledResidualValue of the cross-sec. integral
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QMuonNucCS::GetExEn: HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
|
||||
G4cout<<"G4QMuNucCS::GetExEn:HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
|
||||
#endif
|
||||
phLE=SolveTheEquation(f); // Solve equation to find theLog(phE) (comp lastLE)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
|
||||
G4cout<<"G4QMuonNuclearCrossSection::GetExchangeEnergy:HighEnergy lphE="<<phLE<<G4endl;
|
||||
#endif
|
||||
}
|
||||
if(phLE>lastLE)
|
||||
@@ -2466,7 +2467,7 @@ G4double G4QMuonNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
static const G4double mmu=105.65839; // Mass of muon in MeV
|
||||
static const G4double lmmu=std::log(mmu); // Log of muon mass
|
||||
static const G4double z=std::log(EMa); // Initial argument
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTabEdge (small)
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTabEdge
|
||||
static const G4int imax=27; // Not more than "imax" steps to find the solution
|
||||
static const G4double eps=0.001; // Accuracy which satisfies the search
|
||||
G4double lastLE=lastG+lmmu; // recover log(eE) from the gamma (lastG)
|
||||
@@ -2488,7 +2489,7 @@ G4double G4QMuonNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
G4cout<<"G4MuNCS::SolveTheE:i="<<i<<",d="<<d<<",x="<<x<<",fx="<<fx<<",df="<<df<<G4endl;
|
||||
#endif
|
||||
if(x>=lastLE)
|
||||
{
|
||||
{
|
||||
G4cerr<<"*G4ElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE
|
||||
<<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
|
||||
x=topLim;
|
||||
@@ -2509,7 +2510,7 @@ G4double G4QMuonNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
G4double y=nu/lastE; // Part of energy carried by the equivalent pfoton
|
||||
if(y>=1.-1./(lastG+lastG)) return 0.; // The region where the method does not work
|
||||
G4double y2=y*y; // Squared photonic part of energy
|
||||
G4double ye=1.-y; // Part of energy carried by the secondary electron
|
||||
G4double ye=1.-y; // Part of energy carried by the secondary muon
|
||||
G4double Qi2=mmu2*y2/ye; // Minimum Q2
|
||||
G4double Qa2=4*lastE*lastE*ye; // Maximum Q2
|
||||
G4double iar=Qi2/Qa2; // Q2min/Q2max ratio
|
||||
@@ -2556,7 +2557,7 @@ G4double G4QMuonNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
}
|
||||
|
||||
// This class can provide only virtual exchange photons for all nu's and Q2's
|
||||
G4int G4QMuonNuclearCrossSection::GetExchangePDGCode(G4double, G4double) {return 22;}
|
||||
G4int G4QMuonNuclearCrossSection::GetExchangePDGCode() {return 22;}
|
||||
|
||||
G4double G4QMuonNuclearCrossSection::GetVirtualFactor(G4double nu, G4double Q2)
|
||||
{
|
||||
+574
@@ -0,0 +1,574 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * *
|
||||
// * 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. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QNuMuNuclearCrossSection.cc,v 1.6 2005/12/01 17:28:18 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QNuMuNuclearCrossSection for gamma+A cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-01
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 17-Oct-03
|
||||
//
|
||||
// ****************************************************************************************
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
//===============================================================================================
|
||||
|
||||
///#define debug
|
||||
#define edebug
|
||||
//#define pdebug
|
||||
//#define ppdebug
|
||||
//#define tdebug
|
||||
//#define sdebug
|
||||
|
||||
#include "G4QNuMuNuclearCrossSection.hh"
|
||||
|
||||
// Initialization of the
|
||||
G4double G4QNuMuNuclearCrossSection::lastSig=0.;// Last calculated total cross section
|
||||
G4double G4QNuMuNuclearCrossSection::lastQEL=0.;// Last calculated quasi-el. cross section
|
||||
G4int G4QNuMuNuclearCrossSection::lastL=0; // Last used in cross section TheLastBin
|
||||
G4double G4QNuMuNuclearCrossSection::lastE=0.; // Last used in cross section TheEnergy
|
||||
G4double* G4QNuMuNuclearCrossSection::lastEN=0; // Pointer to the Energy Scale of TX & QE
|
||||
G4double* G4QNuMuNuclearCrossSection::lastTX=0; // Pointer to the LastArray of TX function
|
||||
G4double* G4QNuMuNuclearCrossSection::lastQE=0; // Pointer to the LastArray of QE function
|
||||
|
||||
// Returns Pointer to the G4VQCrossSection class
|
||||
G4VQCrossSection* G4QNuMuNuclearCrossSection::GetPointer()
|
||||
{
|
||||
static G4QNuMuNuclearCrossSection theCrossSection; //**Static body of the Cross Section**
|
||||
return &theCrossSection;
|
||||
}
|
||||
|
||||
// Gives the threshold energy = the same for all nuclei (@@ can be reduced for hevy nuclei)
|
||||
G4double G4QNuMuNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
{
|
||||
//static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1.,0.)/GeV;
|
||||
//static const G4double mProt = G4NucleiProperties::GetNuclearMass(1.,1.)/GeV;
|
||||
//static const G4double mDeut = G4NucleiProperties::GetNuclearMass(2.,1.)/GeV/2.;
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double thresh=mmu+mmu2/dmN; // Universal threshold in GeV
|
||||
// ---------
|
||||
//static const G4double infEn = 9.e27;
|
||||
G4double dN=0.;
|
||||
if(Z>0||N>0) dN=thresh*GeV; // @@ if upgraded, change it in a total cross section
|
||||
//@@ "dN=mmu+mmu2/G4NucleiProperties::GetNuclearMass(<G4double>(Z+N),<G4double>(Z)/GeV"
|
||||
return dN;
|
||||
}
|
||||
|
||||
// The main member function giving the gamma-A cross section (E_kin in MeV, CS in mb)
|
||||
G4double G4QNuMuNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4int targZ,
|
||||
G4int targN, G4double Momentum)
|
||||
{
|
||||
static const G4double mb38=1.E-11*millibarn;// Conversion 10^-38 cm^2 to mb=10^-27 cm^2
|
||||
static const G4int nE=33; // !! If change this, change it in GetFunctions() (*.hh) !!
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double EMi=mmu+mmu2/dmN; // Universal threshold of the reaction in GeV
|
||||
static const G4double EMa=300.; // Maximum tabulated Energy of nu_mu in GeV
|
||||
// *** Begin of the Associative memory for acceleration of the cross section calculations
|
||||
static std::vector <G4double> colH; //?? Vector of HighEnergyCoefficients (functional)
|
||||
static std::vector <G4double*> TX; // Vector of pointers to the TX tabulated functions
|
||||
static std::vector <G4double*> QE; // Vector of pointers to the QE tabulated functions
|
||||
static G4bool first=true; // Flag of initialization of the energy axis
|
||||
// *** End of Static Definitions (Associative Memory) ***
|
||||
//const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the Muon
|
||||
//G4double TotEnergy2=Momentum;
|
||||
lastE=Momentum/GeV; // Kinetic energy of the muon neutrino (in GeV!)
|
||||
if (lastE<=EMi) // Energy is below the minimum energy in the table
|
||||
{
|
||||
lastE=0.;
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
G4int Z=targZ; // New Z, which can change the sign
|
||||
if(F<=0) // This isotope was not the last used isotop
|
||||
{
|
||||
if(F<0) // This isotope was found in DAMDB =========> RETRIEVE
|
||||
{
|
||||
lastTX =TX[I]; // Pointer to the prepared TX function (same isotope)
|
||||
lastQE =QE[I]; // Pointer to the prepared QE function (same isotope)
|
||||
}
|
||||
else // This isotope wasn't calculated previously => CREATE
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
lastEN = new G4double[nE]; // This must be done only once!
|
||||
Z=-Z; // To explain GetFunctions that E-axis must be filled
|
||||
first=false; // To make it only once
|
||||
}
|
||||
lastTX = new G4double[nE]; // Allocate memory for the new TX function
|
||||
lastQE = new G4double[nE]; // Allocate memory for the new QE function
|
||||
G4int res=GetFunctions(Z,targN,lastTX,lastQE,lastEN);//@@analize(0=first,-1=bad,1=OK)
|
||||
if(res<0) G4cerr<<"*W*G4NuMuNuclearCS::CalcCrossSect:Bad Function Retrieve"<<G4endl;
|
||||
// *** The synchronization check ***
|
||||
G4int sync=TX.size();
|
||||
if(sync!=I) G4cerr<<"***G4NuMuNuclearCS::CalcCrossSect:Sync.="<<sync<<"#"<<I<<G4endl;
|
||||
TX.push_back(lastTX);
|
||||
QE.push_back(lastQE);
|
||||
} // End of creation of the new set of parameters
|
||||
} // End of parameters udate
|
||||
// ============================== NOW Calculate the Cross Section =====================
|
||||
if (lastE<=EMi) // Check that the neutrinoEnergy is higher than ThreshE
|
||||
{
|
||||
lastE=0.;
|
||||
lastSig=0.;
|
||||
return 0.;
|
||||
}
|
||||
if(lastE<EMa) // Linear fit is made explicitly to fix the last bin for the randomization
|
||||
{
|
||||
G4int chk=1;
|
||||
G4int ran=mL/2;
|
||||
G4int sep=ran; // as a result = an index of the left edge of the interval
|
||||
while(ran>=2)
|
||||
{
|
||||
G4int newran=ran/2;
|
||||
if(lastE<=lastEN[sep]) sep-=newran;
|
||||
else if(newran>1) sep+=newran;
|
||||
ran=newran;
|
||||
chk=chk+chk;
|
||||
}
|
||||
if(chk+chk!=mL) G4cerr<<"*Warn*G4NuMuNuclearCS::CalcCS:Table! mL="<<mL<<G4endl;
|
||||
G4double lowE=lastEN[sep];
|
||||
G4double highE=lastEN[sep+1];
|
||||
G4double lowTX=lastTX[sep];
|
||||
G4double lowQE=lastQE[sep];
|
||||
if(lastE<lowE||sep>=mL||lastE>highE)
|
||||
G4cerr<<"*Warn*G4NuMuNuclearCS::CalcCS:Bin! "<<lowE<<" < "<<lastE<<" < "<<highE
|
||||
<<", sep="<<sep<<", mL="<<mL<<G4endl;
|
||||
lastSig=lastE*(lastE-lowE)*(lastTX[sep+1]-lowTX)/(highE-lowE)+lowTX; // Recover *E
|
||||
lastQEL=(lastE-lowE)*(lastQE[sep+1]-lowQE)/(highE-lowE)+lowQE;
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4NuMuNuclearCS::CalcCS: T="<<lastSig<<", Q="<<lastQEL<<", E="<<lastE<<G4endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
lastSig=lastTX[mL]; // @@ No extrapolation, just a const, while it looks shrinking...
|
||||
lastQEL=lastQE[mL];
|
||||
}
|
||||
if(lastQEL<0.) lastQEL = 0.;
|
||||
if(lastSig<0.) lastSig = 0.;
|
||||
// The cross-sections are expected to be in mb
|
||||
lastSig*=mb38;
|
||||
lastQEL*=mb38;
|
||||
return lastSig;
|
||||
}
|
||||
|
||||
// Calculate the cros-section functions
|
||||
// ****************************************************************************************
|
||||
// *** This tables are the same for all lepto-nuclear reactions, only mass is different ***
|
||||
// ***@@ IT'S REASONABLE TO MAKE ADDiTIONAL VIRTUAL CLASS FOR LEPTO-NUCLEAR WITH THIS@@ ***
|
||||
// ****************************************************************************************
|
||||
G4int G4QNuMuNuclearCrossSection::GetFunctions(G4int z, G4int n,
|
||||
G4double* t, G4double* q, G4double* e)
|
||||
{
|
||||
static const G4double mN=.931494043;// Nucleon mass (inside nucleus, AtomicMassUnit, GeV)
|
||||
static const G4double dmN=mN+mN; // Doubled nucleon mass (2*AtomicMassUnit, GeV)
|
||||
static const G4double mmu=.105658369; // Mass of a muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared mass of a muon in GeV^2
|
||||
static const G4double thresh=mmu+mmu2/dmN; // Universal threshold in GeV
|
||||
static const G4int nE=33; // !! If change this, change it in GetCrossSection() (*.cc) !!
|
||||
static const G4double nuEn[nE]={thresh,
|
||||
0.112443, 0.121027, 0.130968, 0.142546, 0.156109, 0.172102, 0.191090, 0.213802,
|
||||
0.241183, 0.274476, 0.315330, 0.365955, 0.429353, 0.509647, 0.612580, 0.746264,
|
||||
0.922326, 1.157700, 1.477470, 1.919460, 2.541810, 3.435700, 4.747300, 6.716420,
|
||||
9.746220, 14.53270, 22.31170, 35.34420, 57.90250, 98.34160, 173.6130, 319.4900};
|
||||
static const G4double TOTX[nE]={0.,
|
||||
0.084587, 0.288685, 0.410021, 0.511290, 0.602236, 0.686143, 0.764097, 0.836055,
|
||||
0.901224, 0.958271, 1.005510, 1.041180, 1.063760, 1.072400, 1.067220, 1.049490,
|
||||
1.021490, 0.986186, 0.946382, 0.905672, 0.866103, 0.828985, 0.795853, 0.766550,
|
||||
0.740733, 0.717822, 0.697109, 0.677882, 0.659543, 0.641549, 0.622752, 0.603635};
|
||||
static const G4double QELX[nE]={0.,
|
||||
.0095112, .0349388, .0536998, .0728821, .0940146, .1180870, .1460120, .1787500,
|
||||
.2173600, .2627240, .3122570, .3633810, .4144780, .4639300, .5103820, .5520940,
|
||||
.5873830, .6154440, .6358140, .6496310, .6580280, .6629570, .6655750, .6671860,
|
||||
.6680500, .6687700, .6692590, .6694790, .6697380, .6699010, .6700020, .6699120};
|
||||
// --------------------------------
|
||||
G4int first=0;
|
||||
if(z<0.)
|
||||
{
|
||||
first=1;
|
||||
z=-z;
|
||||
}
|
||||
if(z<1 || z>92) // neutron and plutonium are forbidden
|
||||
{
|
||||
G4cout<<"***G4QNuMuNuclearCrossSection::GetFunctions:Z="<<z<<".No CS returned"<<G4endl;
|
||||
return -1;
|
||||
}
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
G4double a=n+z;
|
||||
G4double na=n+a;
|
||||
G4double dn=n+n;
|
||||
G4double da=a+a;
|
||||
G4double ta=da+a;
|
||||
if(first) e[k]=nuEn[k]; // Energy of neutrino E (first bin k=0 can be modified)
|
||||
t[k]=TOTX[k]*nuEn[k]*(na+na)/ta+QELX[k]*(dn+dn-da)/ta; // TotalCrossSection
|
||||
q[k]=QELX[k]*dn/a; // QuasiElasticCrossSection
|
||||
}
|
||||
return first;
|
||||
}
|
||||
|
||||
// Randomize Q2 from neutrino to the scattered muon when the scattering is quasi-elastic
|
||||
G4double G4QNuMuNuclearCrossSection::GetQEL_ExchangeQ2()
|
||||
{
|
||||
static const G4double mmu=.105658369;// Mass of muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared Mass of muon in GeV^2
|
||||
static const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
|
||||
static const double MN=.931494043; // Nucleon mass (inside nucleus, atomicMassUnit,GeV)
|
||||
static const double MN2=MN*MN; // M_N^2 in GeV^2
|
||||
static const G4double power=-3.5; // direct power for the magic variable
|
||||
static const G4double pconv=1./power;// conversion power for the magic variable
|
||||
static const G4int nQ2=101; // #Of point in the Q2l table (in GeV^2)
|
||||
static const G4int lQ2=nQ2-1; // index of the last in the Q2l table
|
||||
static const G4int bQ2=lQ2-1; // index of the before last in the Q2 ltable
|
||||
// Reversed table
|
||||
static const G4double Xl[nQ2]={1.87905e-10,
|
||||
.005231, .010602, .016192, .022038, .028146, .034513, .041130, .047986, .055071, .062374,
|
||||
.069883, .077587, .085475, .093539, .101766, .110150, .118680, .127348, .136147, .145069,
|
||||
.154107, .163255, .172506, .181855, .191296, .200825, .210435, .220124, .229886, .239718,
|
||||
.249617, .259578, .269598, .279675, .289805, .299986, .310215, .320490, .330808, .341169,
|
||||
.351568, .362006, .372479, .382987, .393527, .404099, .414700, .425330, .435987, .446670,
|
||||
.457379, .468111, .478866, .489643, .500441, .511260, .522097, .532954, .543828, .554720,
|
||||
.565628, .576553, .587492, .598447, .609416, .620398, .631394, .642403, .653424, .664457,
|
||||
.675502, .686557, .697624, .708701, .719788, .730886, .741992, .753108, .764233, .775366,
|
||||
.786508, .797658, .808816, .819982, .831155, .842336, .853524, .864718, .875920, .887128,
|
||||
.898342, .909563, .920790, .932023, .943261, .954506, .965755, .977011, .988271, .999539};
|
||||
// Direct table
|
||||
static const G4double Xmax=Xl[lQ2];
|
||||
static const G4double Xmin=Xl[0];
|
||||
static const G4double dX=(Xmax-Xmin)/lQ2; // step in X(Q2, GeV^2)
|
||||
static const G4double inl[nQ2]={0,
|
||||
1.88843, 3.65455, 5.29282, 6.82878, 8.28390, 9.67403, 11.0109, 12.3034, 13.5583, 14.7811,
|
||||
15.9760, 17.1466, 18.2958, 19.4260, 20.5392, 21.6372, 22.7215, 23.7933, 24.8538, 25.9039,
|
||||
26.9446, 27.9766, 29.0006, 30.0171, 31.0268, 32.0301, 33.0274, 34.0192, 35.0058, 35.9876,
|
||||
36.9649, 37.9379, 38.9069, 39.8721, 40.8337, 41.7920, 42.7471, 43.6992, 44.6484, 45.5950,
|
||||
46.5390, 47.4805, 48.4197, 49.3567, 50.2916, 51.2245, 52.1554, 53.0846, 54.0120, 54.9377,
|
||||
55.8617, 56.7843, 57.7054, 58.6250, 59.5433, 60.4603, 61.3761, 62.2906, 63.2040, 64.1162,
|
||||
65.0274, 65.9375, 66.8467, 67.7548, 68.6621, 69.5684, 70.4738, 71.3784, 72.2822, 73.1852,
|
||||
74.0875, 74.9889, 75.8897, 76.7898, 77.6892, 78.5879, 79.4860, 80.3835, 81.2804, 82.1767,
|
||||
83.0724, 83.9676, 84.8622, 85.7563, 86.6499, 87.5430, 88.4356, 89.3277, 90.2194, 91.1106,
|
||||
92.0013, 92.8917, 93.7816, 94.6711, 95.5602, 96.4489, 97.3372, 98.2252, 99.1128, 100.000};
|
||||
G4double Enu=lastE; // Get energy of the last calculated cross-section
|
||||
G4double dEnu=Enu+Enu; // doubled energy of nu/anu
|
||||
G4double Enu2=Enu*Enu; // squared energy of nu/anu
|
||||
G4double ME=Enu*MN; // M*E
|
||||
G4double dME=ME+ME; // 2*M*E
|
||||
G4double dEMN=(dEnu+MN)*ME;
|
||||
G4double MEm=ME-hmmu2;
|
||||
G4double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
|
||||
G4double E2M=MN*Enu2-(Enu+MN)*hmmu2;
|
||||
G4double ymax=(E2M+sqE)/dEMN;
|
||||
G4double ymin=(E2M-sqE)/dEMN;
|
||||
G4double rmin=1.-ymin;
|
||||
G4double rhm2E=hmmu2/Enu2;
|
||||
G4double Q2mi=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E)); // Q2_min(E_nu)
|
||||
G4double Q2ma=dME*ymax; // Q2_max(E_nu)
|
||||
G4double Xma=pow((1.+Q2mi),power); // X_max(E_nu)
|
||||
G4double Xmi=pow((1.+Q2ma),power); // X_min(E_nu)
|
||||
// Find the integral values integ(Xmi) & integ(Xma) using the direct table
|
||||
G4double rXi=(Xmi-Xmin)/dX;
|
||||
G4int iXi=static_cast<int>(rXi);
|
||||
if(iXi<0) iXi=0;
|
||||
if(iXi>bQ2) iXi=bQ2;
|
||||
G4double dXi=rXi-iXi;
|
||||
G4double bnti=inl[iXi];
|
||||
G4double inti=bnti+dXi*(inl[iXi+1]-bnti);
|
||||
//
|
||||
G4double rXa=(Xma-Xmin)/dX;
|
||||
G4int iXa=static_cast<int>(rXa);
|
||||
if(iXa<0) iXa=0;
|
||||
if(iXa>bQ2) iXa=bQ2;
|
||||
G4double dXa=rXa-iXa;
|
||||
G4double bnta=inl[iXa];
|
||||
G4double inta=bnta+dXa*(inl[iXa+1]-bnta);
|
||||
// *** Find X using the reversed table ***
|
||||
G4double intx=inti+(inta-inti)*G4UniformRand();
|
||||
G4int intc=static_cast<int>(intx);
|
||||
if(intc<0) intc=0;
|
||||
if(intc>bQ2) intc=bQ2; // If it is more than max, then the BAD extrapolation
|
||||
G4double dint=intx-intc;
|
||||
G4double mX=Xl[intc];
|
||||
G4double X=mX+dint*(Xl[intc+1]-mX);
|
||||
G4double Q2=pow(X,pconv)-1.;
|
||||
return Q2*GeV*GeV;
|
||||
}
|
||||
|
||||
// Randomize Q2 from neutrino to the scattered muon when the scattering is not quasiElastic
|
||||
G4double G4QNuMuNuclearCrossSection::GetNQE_ExchangeQ2()
|
||||
{
|
||||
static const double mpi=.13957018; // charged pi meson mass in GeV
|
||||
static const G4double mmu=.105658369; // Mass of muon in GeV
|
||||
static const G4double mmu2=mmu*mmu; // Squared Mass of muon in GeV^2
|
||||
static const double hmmu2=mmu2/2; // .5*m_mu^2 in GeV^2
|
||||
static const double MN=.931494043; // Nucleon mass (inside nucleus,atomicMassUnit,GeV)
|
||||
static const double MN2=MN*MN; // M_N^2 in GeV^2
|
||||
static const double dMN=MN+MN; // 2*M_N in GeV
|
||||
static const double mcV=(dMN+mpi)*mpi;// constant of W>M+mc cut for Quasi-Elastic
|
||||
static const G4int power=7; // direct power for the magic variable
|
||||
static const G4double pconv=1./power; // conversion power for the magic variable
|
||||
static const G4int nX=21; // #Of point in the Xl table (in GeV^2)
|
||||
static const G4int lX=nX-1; // index of the last in the Xl table
|
||||
static const G4int bX=lX-1; // @@ index of the before last in the Xl table
|
||||
static const G4int nE=20; // #Of point in the El table (in GeV^2)
|
||||
static const G4int bE=nE-1; // index of the last in the El table
|
||||
static const G4int pE=bE-1; // index of the before last in the El table
|
||||
// Reversed table
|
||||
static const G4double X0[nX]={6.14081e-05,
|
||||
.413394, .644455, .843199, 1.02623, 1.20032, 1.36916, 1.53516, 1.70008, 1.86539, 2.03244,
|
||||
2.20256, 2.37723, 2.55818, 2.74762, 2.94857, 3.16550, 3.40582, 3.68379, 4.03589, 4.77419};
|
||||
static const G4double X1[nX]={.00125268,
|
||||
.861178, 1.34230, 1.75605, 2.13704, 2.49936, 2.85072, 3.19611, 3.53921, 3.88308, 4.23049,
|
||||
4.58423, 4.94735, 5.32342, 5.71700, 6.13428, 6.58447, 7.08267, 7.65782, 8.38299, 9.77330};
|
||||
static const G4double X2[nX]={.015694,
|
||||
1.97690, 3.07976, 4.02770, 4.90021, 5.72963, 6.53363, 7.32363, 8.10805, 8.89384, 9.68728,
|
||||
10.4947, 11.3228, 12.1797, 13.0753, 14.0234, 15.0439, 16.1692, 17.4599, 19.0626, 21.7276};
|
||||
static const G4double X3[nX]={.0866877,
|
||||
4.03498, 6.27651, 8.20056, 9.96931, 11.6487, 13.2747, 14.8704, 16.4526, 18.0351, 19.6302,
|
||||
21.2501, 22.9075, 24.6174, 26.3979, 28.2730, 30.2770, 32.4631, 34.9243, 37.8590, 41.9115};
|
||||
static const G4double X4[nX]={.160483,
|
||||
5.73111, 8.88884, 11.5893, 14.0636, 16.4054, 18.6651, 20.8749, 23.0578, 25.2318, 27.4127,
|
||||
29.6152, 31.8540, 34.1452, 36.5074, 38.9635, 41.5435, 44.2892, 47.2638, 50.5732, 54.4265};
|
||||
static const G4double X5[nX]={.0999307,
|
||||
5.25720, 8.11389, 10.5375, 12.7425, 14.8152, 16.8015, 18.7296, 20.6194, 22.4855, 24.3398,
|
||||
26.1924, 28.0527, 29.9295, 31.8320, 33.7699, 35.7541, 37.7975, 39.9158, 42.1290, 44.4649};
|
||||
static const G4double X6[nX]={.0276367,
|
||||
3.53378, 5.41553, 6.99413, 8.41629, 9.74057, 10.9978, 12.2066, 13.3796, 14.5257, 15.6519,
|
||||
16.7636, 17.8651, 18.9603, 20.0527, 21.1453, 22.2411, 23.3430, 24.4538, 25.5765, 26.7148};
|
||||
static const G4double X7[nX]={.00472383,
|
||||
2.08253, 3.16946, 4.07178, 4.87742, 5.62140, 6.32202, 6.99034, 7.63368, 8.25720, 8.86473,
|
||||
9.45921, 10.0430, 10.6179, 11.1856, 11.7475, 12.3046, 12.8581, 13.4089, 13.9577, 14.5057};
|
||||
static const G4double X8[nX]={.000630783,
|
||||
1.22723, 1.85845, 2.37862, 2.84022, 3.26412, 3.66122, 4.03811, 4.39910, 4.74725, 5.08480,
|
||||
5.41346, 5.73457, 6.04921, 6.35828, 6.66250, 6.96250, 7.25884, 7.55197, 7.84232, 8.13037};
|
||||
static const G4double X9[nX]={7.49179e-05,
|
||||
.772574, 1.16623, 1.48914, 1.77460, 2.03586, 2.27983, 2.51069, 2.73118, 2.94322, 3.14823,
|
||||
3.34728, 3.54123, 3.73075, 3.91638, 4.09860, 4.27779, 4.45428, 4.62835, 4.80025, 4.97028};
|
||||
static const G4double XA[nX]={8.43437e-06,
|
||||
.530035, .798454, 1.01797, 1.21156, 1.38836, 1.55313, 1.70876, 1.85712, 1.99956, 2.13704,
|
||||
2.27031, 2.39994, 2.52640, 2.65007, 2.77127, 2.89026, 3.00726, 3.12248, 3.23607, 3.34823};
|
||||
static const G4double XB[nX]={9.27028e-07,
|
||||
.395058, .594211, .756726, .899794, 1.03025, 1.15167, 1.26619, 1.37523, 1.47979, 1.58059,
|
||||
1.67819, 1.77302, 1.86543, 1.95571, 2.04408, 2.13074, 2.21587, 2.29960, 2.38206, 2.46341};
|
||||
static const G4double XC[nX]={1.00807e-07,
|
||||
.316195, .474948, .604251, .717911, .821417, .917635, 1.00829, 1.09452, 1.17712, 1.25668,
|
||||
1.33364, 1.40835, 1.48108, 1.55207, 1.62150, 1.68954, 1.75631, 1.82193, 1.88650, 1.95014};
|
||||
static const G4double XD[nX]={1.09102e-08,
|
||||
.268227, .402318, .511324, .606997, .694011, .774803, .850843, .923097, .992243, 1.05878,
|
||||
1.12309, 1.18546, 1.24613, 1.30530, 1.36313, 1.41974, 1.47526, 1.52978, 1.58338, 1.63617};
|
||||
static const G4double XE[nX]={1.17831e-09,
|
||||
.238351, .356890, .453036, .537277, .613780, .684719, .751405, .814699, .875208, .933374,
|
||||
.989535, 1.04396, 1.09685, 1.14838, 1.19870, 1.24792, 1.29615, 1.34347, 1.38996, 1.43571};
|
||||
static const G4double XF[nX]={1.27141e-10,
|
||||
.219778, .328346, .416158, .492931, .562525, .626955, .687434, .744761, .799494, .852046,
|
||||
.902729, .951786, .999414, 1.04577, 1.09099, 1.13518, 1.17844, 1.22084, 1.26246, 1.30338};
|
||||
static const G4double XG[nX]={1.3713e-11,
|
||||
.208748, .310948, .393310, .465121, .530069, .590078, .646306, .699515, .750239, .798870,
|
||||
.845707, .890982, .934882, .977559, 1.01914, 1.05973, 1.09941, 1.13827, 1.17637, 1.21379};
|
||||
static const G4double XH[nX]={1.47877e-12,
|
||||
.203089, .301345, .380162, .448646, .510409, .567335, .620557, .670820, .718647, .764421,
|
||||
.808434, .850914, .892042, .931967, .970812, 1.00868, 1.04566, 1.08182, 1.11724, 1.15197};
|
||||
static const G4double XI[nX]={1.59454e-13,
|
||||
.201466, .297453, .374007, .440245, .499779, .554489, .605506, .653573, .699213, .742806,
|
||||
.784643, .824952, .863912, .901672, .938353, .974060, 1.00888, 1.04288, 1.07614, 1.10872};
|
||||
static const G4double XJ[nX]={1.71931e-14,
|
||||
.202988, .297870, .373025, .437731, .495658, .548713, .598041, .644395, .688302, .730147,
|
||||
.770224, .808762, .845943, .881916, .916805, .950713, .983728, 1.01592, 1.04737, 1.07813};
|
||||
// Direct table
|
||||
static const G4double Xmin[nE]={X0[0],X1[0],X2[0],X3[0],X4[0],X5[0],X6[0],X7[0],X8[0],
|
||||
X9[0],XA[0],XB[0],XC[0],XD[0],XE[0],XF[0],XG[0],XH[0],XI[0],XJ[0]};
|
||||
static const G4double dX[nE]={
|
||||
(X0[lX]-X0[0])/lX, (X1[lX]-X1[0])/lX, (X2[lX]-X2[0])/lX, (X3[lX]-X3[0])/lX,
|
||||
(X4[lX]-X4[0])/lX, (X5[lX]-X5[0])/lX, (X6[lX]-X6[0])/lX, (X7[lX]-X7[0])/lX,
|
||||
(X8[lX]-X8[0])/lX, (X9[lX]-X9[0])/lX, (XA[lX]-XA[0])/lX, (XB[lX]-XB[0])/lX,
|
||||
(XC[lX]-XC[0])/lX, (XD[lX]-XD[0])/lX, (XE[lX]-XE[0])/lX, (XF[lX]-XF[0])/lX,
|
||||
(XG[lX]-XG[0])/lX, (XH[lX]-XH[0])/lX, (XI[lX]-XI[0])/lX, (XJ[lX]-XJ[0])/lX};
|
||||
static const G4double* Xl[nE]=
|
||||
{X0,X1,X2,X3,X4,X5,X6,X7,X8,X9,XA,XB,XC,XD,XE,XF,XG,XH,XI,XJ};
|
||||
static const G4double I0[nX]={0,
|
||||
.411893, 1.25559, 2.34836, 3.60264, 4.96046, 6.37874, 7.82342, 9.26643, 10.6840, 12.0555,
|
||||
13.3628, 14.5898, 15.7219, 16.7458, 17.6495, 18.4217, 19.0523, 19.5314, 19.8501, 20.0000};
|
||||
static const G4double I1[nX]={0,
|
||||
.401573, 1.22364, 2.28998, 3.51592, 4.84533, 6.23651, 7.65645, 9.07796, 10.4780, 11.8365,
|
||||
13.1360, 14.3608, 15.4967, 16.5309, 17.4516, 18.2481, 18.9102, 19.4286, 19.7946, 20.0000};
|
||||
static const G4double I2[nX]={0,
|
||||
.387599, 1.17339, 2.19424, 3.37090, 4.65066, 5.99429, 7.37071, 8.75427, 10.1232, 11.4586,
|
||||
12.7440, 13.9644, 15.1065, 16.1582, 17.1083, 17.9465, 18.6634, 19.2501, 19.6982, 20.0000};
|
||||
static const G4double I3[nX]={0,
|
||||
.366444, 1.09391, 2.04109, 3.13769, 4.33668, 5.60291, 6.90843, 8.23014, 9.54840, 10.8461,
|
||||
12.1083, 13.3216, 14.4737, 15.5536, 16.5512, 17.4573, 18.2630, 18.9603, 19.5417, 20.0000};
|
||||
static const G4double I4[nX]={0,
|
||||
.321962, .959681, 1.79769, 2.77753, 3.85979, 5.01487, 6.21916, 7.45307, 8.69991, 9.94515,
|
||||
11.1759, 12.3808, 13.5493, 14.6720, 15.7402, 16.7458, 17.6813, 18.5398, 19.3148, 20.0000};
|
||||
static const G4double I5[nX]={0,
|
||||
.257215, .786302, 1.49611, 2.34049, 3.28823, 4.31581, 5.40439, 6.53832, 7.70422, 8.89040,
|
||||
10.0865, 11.2833, 12.4723, 13.6459, 14.7969, 15.9189, 17.0058, 18.0517, 19.0515, 20.0000};
|
||||
static const G4double I6[nX]={0,
|
||||
.201608, .638914, 1.24035, 1.97000, 2.80354, 3.72260, 4.71247, 5.76086, 6.85724, 7.99243,
|
||||
9.15826, 10.3474, 11.5532, 12.7695, 13.9907, 15.2117, 16.4275, 17.6337, 18.8258, 20.0000};
|
||||
static const G4double I7[nX]={0,
|
||||
.168110, .547208, 1.07889, 1.73403, 2.49292, 3.34065, 4.26525, 5.25674, 6.30654, 7.40717,
|
||||
8.55196, 9.73492, 10.9506, 12.1940, 13.4606, 14.7460, 16.0462, 17.3576, 18.6767, 20.0000};
|
||||
static const G4double I8[nX]={0,
|
||||
.150652, .497557, .990048, 1.60296, 2.31924, 3.12602, 4.01295, 4.97139, 5.99395, 7.07415,
|
||||
8.20621, 9.38495, 10.6057, 11.8641, 13.1561, 14.4781, 15.8267, 17.1985, 18.5906, 20.0000};
|
||||
static const G4double I9[nX]={0,
|
||||
.141449, .470633, .941304, 1.53053, 2.22280, 3.00639, 3.87189, 4.81146, 5.81837, 6.88672,
|
||||
8.01128, 9.18734, 10.4106, 11.6772, 12.9835, 14.3261, 15.7019, 17.1080, 18.5415, 20.0000};
|
||||
static const G4double IA[nX]={0,
|
||||
.136048, .454593, .912075, 1.48693, 2.16457, 2.93400, 3.78639, 4.71437, 5.71163, 6.77265,
|
||||
7.89252, 9.06683, 10.2916, 11.5631, 12.8780, 14.2331, .625500, 17.0525, 18.5115, 20.0000};
|
||||
static const G4double IB[nX]={0,
|
||||
.132316, .443455, .891741, 1.45656, 2.12399, 2.88352, 3.72674, 4.64660, 5.63711, 6.69298,
|
||||
7.80955, 8.98262, 10.2084, 11.4833, 12.8042, 14.1681, 15.5721, 17.0137, 18.4905, 20.0000};
|
||||
static const G4double IC[nX]={0,
|
||||
.129197, .434161, .874795, 1.43128, 2.09024, 2.84158, 3.67721, 4.59038, 5.57531, 6.62696,
|
||||
7.74084, 8.91291, 10.1395, 11.4173, 12.7432, 14.1143, 15.5280, 16.9817, 18.4731, 20.0000};
|
||||
static const G4double ID[nX]={0,
|
||||
.126079, .424911, .857980, 1.40626, 2.05689, 2.80020, 3.62840, 4.53504, 5.51456, 6.56212,
|
||||
7.67342, 8.84458, 10.0721, 11.3527, 12.6836, 14.0618, 15.4849, 16.9504, 18.4562, 20.0000};
|
||||
static const G4double IE[nX]={0,
|
||||
.122530, .414424, .838964, 1.37801, 2.01931, 2.75363, 3.57356, 4.47293, 5.44644, 6.48949,
|
||||
7.59795, 8.76815, 9.99673, 11.2806, 12.6170, 14.0032, 15.4369, 16.9156, 18.4374, 20.0000};
|
||||
static const G4double IF[nX]={0,
|
||||
.118199, .401651, .815838, 1.34370, 1.97370, 2.69716, 3.50710, 4.39771, 5.36401, 6.40164,
|
||||
7.50673, 8.67581, 9.90572, 11.1936, 12.5367, 13.9326, 15.3790, 16.8737, 18.4146, 20.0000};
|
||||
static const G4double IG[nX]={0,
|
||||
.112809, .385761, .787075, 1.30103, 1.91700, 2.62697, 3.42451, 4.30424, 5.26158, 6.29249,
|
||||
7.39341, 8.56112, 9.79269, 11.0855, 12.4369, 13.8449, 15.3071, 16.8216, 18.3865, 20.0000};
|
||||
static const G4double IH[nX]={0,
|
||||
.106206, .366267, .751753, 1.24859, 1.84728, 2.54062, 3.32285, .189160, 5.13543, 6.15804,
|
||||
7.25377, 8.41975, 9.65334, 10.9521, 12.3139, 13.7367, 15.2184, 16.7573, 18.3517, 20.0000};
|
||||
static const G4double II[nX]={0,
|
||||
.098419, .343194, .709850, 1.18628, 1.76430, 2.43772, 3.20159, 4.05176, 4.98467, 5.99722,
|
||||
7.08663, 8.25043, 9.48633, 10.7923, 12.1663, 13.6067, 15.1118, 16.6800, 18.3099, 20.0000};
|
||||
static const G4double IJ[nX]={0,
|
||||
.089681, .317135, .662319, 1.11536, 1.66960, 2.32002, 3.06260, 3.89397, 4.81126, 5.81196,
|
||||
6.89382, 8.05483, 9.29317, 10.6072, 11.9952, 13.4560, 14.9881, 16.5902, 18.2612, 20.0000};
|
||||
static const G4double* Il[nE]=
|
||||
{I0,I1,I2,I3,I4,I5,I6,I7,I8,I9,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ};
|
||||
static const G4double lE[nE]={
|
||||
-1.98842,-1.58049,-1.17256,-.764638,-.356711, .051215, .459141, .867068, 1.27499, 1.68292,
|
||||
2.09085, 2.49877, 2.90670, 3.31463, 3.72255, 4.13048, 4.53840, 4.94633, 5.35426, 5.76218};
|
||||
static const G4double lEmi=lE[0];
|
||||
static const G4double lEma=lE[nE-1];
|
||||
static const G4double dlE=(lEma-lEmi)/bE;
|
||||
//***************************************************************************************
|
||||
G4double Enu=lastE; // Get energy of the last calculated cross-section
|
||||
G4double lEn=std::log(Enu); // log(E) for interpolation
|
||||
G4double rE=(lEn-lEmi)/dlE; // Position of the energy
|
||||
G4int fE=static_cast<int>(rE); // Left bin for interpolation
|
||||
if(fE<0) fE=0;
|
||||
if(fE>pE)fE=pE;
|
||||
G4int sE=fE+1; // Right bin for interpolation
|
||||
G4double dE=rE-fE; // relative log shift from the left bin
|
||||
G4double dEnu=Enu+Enu; // doubled energy of nu/anu
|
||||
G4double Enu2=Enu*Enu; // squared energy of nu/anu
|
||||
G4double Emu=Enu-mmu; // Free Energy of neutrino/anti-neutrino
|
||||
G4double ME=Enu*MN; // M*E
|
||||
G4double dME=ME+ME; // 2*M*E
|
||||
G4double dEMN=(dEnu+MN)*ME;
|
||||
G4double MEm=ME-hmmu2;
|
||||
G4double sqE=Enu*std::sqrt(MEm*MEm-mmu2*MN2);
|
||||
G4double E2M=MN*Enu2-(Enu+MN)*hmmu2;
|
||||
G4double ymax=(E2M+sqE)/dEMN;
|
||||
G4double ymin=(E2M-sqE)/dEMN;
|
||||
G4double rmin=1.-ymin;
|
||||
G4double rhm2E=hmmu2/Enu2;
|
||||
G4double Q2mi=(Enu2+Enu2)*(rmin-rhm2E-std::sqrt(rmin*rmin-rhm2E-rhm2E)); // Q2_min(E_nu)
|
||||
G4double Q2ma=dME*ymax; // Q2_max(E_nu)
|
||||
G4double Q2nq=Emu*dMN-mcV;
|
||||
if(Q2ma>Q2nq) Q2ma=Q2nq; // Correction for Non Quasi Elastic
|
||||
// --- now r_min=Q2mi/Q2ma and r_max=1.; when r is randomized -> Q2=r*Q2ma ---
|
||||
G4double Rmi=Q2mi/Q2ma;
|
||||
G4double shift=1.+.9673/(1.+.323/Enu/Enu)/pow(Enu,.78); //@@ different for anti-nu
|
||||
// --- E-interpolation must be done in a log scale ---
|
||||
G4double Xmi=pow((shift-Rmi),power);// X_min(E_nu)
|
||||
G4double Xma=pow((shift-1.),power); // X_max(E_nu)
|
||||
// Find the integral values integ(Xmi) & integ(Xma) using the direct table
|
||||
G4double idX=dX[fE]+dE*(dX[sE]-dX[fE]); // interpolated X step
|
||||
G4double iXmi=Xmin[fE]+dE*(Xmin[sE]-Xmin[fE]); // interpolated X minimum
|
||||
G4double rXi=(Xmi-iXmi)/idX;
|
||||
G4int iXi=static_cast<int>(rXi);
|
||||
if(iXi<0) iXi=0;
|
||||
if(iXi>bX) iXi=bX;
|
||||
G4double dXi=rXi-iXi;
|
||||
G4double bntil=Il[fE][iXi];
|
||||
G4double intil=bntil+dXi*(Il[fE][iXi+1]-bntil);
|
||||
G4double bntir=Il[sE][iXi];
|
||||
G4double intir=bntir+dXi*(Il[sE][iXi+1]-bntir);
|
||||
G4double inti=intil+dE*(intir-intil);// interpolated begin of the integral
|
||||
//
|
||||
G4double rXa=(Xma-iXmi)/idX;
|
||||
G4int iXa=static_cast<int>(rXa);
|
||||
if(iXa<0) iXa=0;
|
||||
if(iXa>bX) iXa=bX;
|
||||
G4double dXa=rXa-iXa;
|
||||
G4double bntal=Il[fE][iXa];
|
||||
G4double intal=bntal+dXa*(Il[fE][iXa+1]-bntal);
|
||||
G4double bntar=Il[sE][iXa];
|
||||
G4double intar=bntar+dXa*(Il[sE][iXa+1]-bntar);
|
||||
G4double inta=intal+dE*(intar-intal);// interpolated end of the integral
|
||||
//
|
||||
// *** Find X using the reversed table ***
|
||||
G4double intx=inti+(inta-inti)*G4UniformRand();
|
||||
G4int intc=static_cast<int>(intx);
|
||||
if(intc<0) intc=0;
|
||||
if(intc>bX) intc=bX;
|
||||
G4double dint=intx-intc;
|
||||
G4double mXl=Xl[fE][intc];
|
||||
G4double Xlb=mXl+dint*(Xl[fE][intc+1]-mXl);
|
||||
G4double mXr=Xl[sE][intc];
|
||||
G4double Xrb=mXr+dint*(Xl[sE][intc+1]-mXr);
|
||||
G4double X=Xlb+dE*(Xrb-Xlb); // interpolated X value
|
||||
G4double R=shift-pow(X,pconv);
|
||||
G4double Q2=R*Q2ma;
|
||||
return Q2*GeV*GeV;
|
||||
}
|
||||
|
||||
// It returns a fraction of the direct interaction of the neutrino with quark-partons
|
||||
G4double G4QNuMuNuclearCrossSection::GetDirectPart(G4double Q2)
|
||||
{
|
||||
G4double f=Q2/4.62;
|
||||
G4double ff=f*f;
|
||||
G4double r=ff*ff;
|
||||
G4double s=pow((1.+.6/Q2),(-1.-(1.+r)/(12.5+r/.3)));
|
||||
//@@ It is the same for nu/anu, but for nu it is a bit less, and for anu a bit more (par)
|
||||
return 1.-s*(1.-s/2);
|
||||
}
|
||||
|
||||
// #of quark-partons in the nonperturbative phase space is the same for neut and anti-neut
|
||||
G4double G4QNuMuNuclearCrossSection::GetNPartons(G4double Q2)
|
||||
{
|
||||
return 3.+.3581*std::log(1.+Q2/.04); // a#of partons in the nonperturbative phase space
|
||||
}
|
||||
|
||||
// This class can provide only virtual exchange pi+ (a substitute for W+ boson)
|
||||
G4int G4QNuMuNuclearCrossSection::GetExchangePDGCode() {return 211;}
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QPhotonNuclearCrossSection for gamma+A cross sections
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QProtonNuclearCrossSection for gamma+A cross sections
|
||||
+35
-34
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4QTauNuclearCrossSection.cc,v 1.3 2005/06/27 15:30:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4QTauNuclearCrossSection.cc,v 1.2 2005/11/25 21:34:17 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// G4 Physics class: G4QTauNuclearCrossSection for gamma+A cross sections
|
||||
@@ -33,7 +33,7 @@
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
// ****************************************************************************************
|
||||
//===============================================================================================
|
||||
//=========================================================================================
|
||||
|
||||
///#define debug
|
||||
#define edebug
|
||||
@@ -73,9 +73,9 @@ G4double G4QTauNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//static const G4double mNeut = G4QPDGCode(2112).GetMass();
|
||||
//static const G4double mProt = G4QPDGCode(2212).GetMass();
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0);
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1);
|
||||
static const G4double mAlph = G4NucleiProperties::GetNuclearMass(4,2);
|
||||
static const G4double mNeut = G4NucleiProperties::GetNuclearMass(1,0)/MeV;
|
||||
static const G4double mProt = G4NucleiProperties::GetNuclearMass(1,1)/MeV;
|
||||
static const G4double mAlph = G4NucleiProperties::GetNuclearMass(4,2)/MeV;
|
||||
// ---------
|
||||
static const G4double infEn = 9.e27;
|
||||
|
||||
@@ -85,20 +85,21 @@ G4double G4QTauNuclearCrossSection::ThresholdEnergy(G4int Z, G4int N)
|
||||
// CHIPS - Direct GEANT
|
||||
//G4double mT= G4QPDGCode(111).GetNuclMass(Z,N,0);
|
||||
G4double mT= 0.;
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A)) mT=G4NucleiProperties::GetNuclearMass(A,Z);
|
||||
if(G4NucleiPropertiesTable::IsInTable(Z,A))
|
||||
mT=G4NucleiProperties::GetNuclearMass(A,Z)/MeV;
|
||||
else return 0.; // If it is not in the Table of Stable Nuclei, then the Threshold=0
|
||||
// --------- Splitting thresholds
|
||||
G4double mP= infEn;
|
||||
if(Z&&G4NucleiPropertiesTable::IsInTable(Z-1,A-1))
|
||||
mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1); // Residual mass for a proton
|
||||
mP=G4NucleiProperties::GetNuclearMass(A-1,Z-1)/MeV; // Residual mass for a proton
|
||||
|
||||
G4double mN= infEn;
|
||||
if(N&&G4NucleiPropertiesTable::IsInTable(Z,A-1))
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-1,Z); // Residual mass for a neutron
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-1,Z)/MeV; // Residual mass for a neutron
|
||||
|
||||
G4double mA= infEn;
|
||||
if(N>1&&Z>1&&G4NucleiPropertiesTable::IsInTable(Z-2,A-4))
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-4,Z-2); // Residual mass for an alpha
|
||||
mN=G4NucleiProperties::GetNuclearMass(A-4,Z-2)/MeV; // Residual mass for an alpha
|
||||
|
||||
G4double dP= mP +mProt - mT;
|
||||
G4double dN= mN +mNeut - mT;
|
||||
@@ -114,15 +115,15 @@ G4double G4QTauNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4in
|
||||
{
|
||||
static const G4int nE=336; // !! If change this, change it in GetFunctions() (*.hh) !!
|
||||
static const G4int mL=nE-1;
|
||||
static const G4double EMi=2.0612; // Minimum tabulated KineticEnergy of Muon
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Electron
|
||||
static const G4double lEMi=std::log(EMi); // Minimum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double lEMa=std::log(EMa); // Maximum tabulatedLogarithmKinEnergy of Muon
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic table step for MuonKinEnergy
|
||||
static const G4double EMi=2.0612; // Minimum tabulated KineticEnergy of Tau
|
||||
static const G4double EMa=50000.; // Maximum tabulated Energy of the Tau
|
||||
static const G4double lEMi=std::log(EMi); // Minimum tabulatedLogarithmKinEnergy of Tau
|
||||
static const G4double lEMa=std::log(EMa); // Maximum tabulatedLogarithmKinEnergy of Tau
|
||||
static const G4double dlnE=(lEMa-lEMi)/mL; // Logarithmic table step for TauKinEnergy
|
||||
static const G4double alop=1./137.036/3.14159265; //coeffitient for E>50000 calculations
|
||||
static const G4double mtu=1777.; // Mass of the muon in MeV
|
||||
static const G4double mtu2=mtu*mtu; // Squared Mass of muon in MeV^2
|
||||
static const G4double lmtu=std::log(mtu); // Log of the electron mass
|
||||
static const G4double mtu=1777.; // Mass of a tau lepton in MeV
|
||||
static const G4double mtu2=mtu*mtu; // Squared Mass of a tau-lepton in MeV^2
|
||||
static const G4double lmtu=std::log(mtu); // Log of the tau-lepton mass
|
||||
// *** Begin of the Associative memory for acceleration of the cross section calculations
|
||||
static std::vector <G4int> colF; // Vector of LastStartPosition in Ji-function tables
|
||||
static std::vector <G4double> colH; // Vector of HighEnergyCoefficients (functional)
|
||||
@@ -130,7 +131,7 @@ G4double G4QTauNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4in
|
||||
static std::vector <G4double*> J2; // Vector of pointers to the J2 tabulated functions
|
||||
static std::vector <G4double*> J3; // Vector of pointers to the J3 tabulated functions
|
||||
// *** End of Static Definitions (Associative Memory) ***
|
||||
//const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the Muon
|
||||
//const G4double Energy = aPart->GetKineticEnergy()/MeV; // Energy of the Tau-lepton
|
||||
G4double TotEnergy2=Momentum*Momentum+mtu2;
|
||||
G4double TotEnergy=std::sqrt(TotEnergy2); // Total energy of the muon
|
||||
lastE=TotEnergy-mtu; // Kinetic energy of the muon
|
||||
@@ -158,7 +159,7 @@ G4double G4QTauNuclearCrossSection::CalculateCrossSection(G4int F, G4int I, G4in
|
||||
lastJ2 = new G4double[nE]; // Allocate memory for the new J2 function
|
||||
lastJ3 = new G4double[nE]; // Allocate memory for the new J3 function
|
||||
lastF = GetFunctions(A,lastJ1,lastJ2,lastJ3);//newZeroPos and J-functions filling
|
||||
lastH = alop*A*(1.-.072*std::log(A));//similar to lastSP of G4PhotonuclearCrossSection
|
||||
lastH = alop*A*(1.-.072*std::log(A)); // like lastSP of G4PhotonuclearCrossSection
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4MuonNuclearCS::CalculateCrossSection: lastH="<<lastH<<",A="<<A<<G4endl;
|
||||
#endif
|
||||
@@ -2352,7 +2353,7 @@ G4int G4QTauNuclearCrossSection::GetFunctions(G4double a,G4double*x,G4double*y,G
|
||||
if(a!=ai) a=ai;
|
||||
for(G4int i=0; i<nN; i++)
|
||||
{
|
||||
if(std::fabs(a-A[i])<.0005) // A coincides with one of basic A's -> get from Tab
|
||||
if(std::fabs(a-A[i])<.0005) // A coincides with one of basic A's -> get from Tab
|
||||
{
|
||||
for(G4int k=0; k<nE; k++)
|
||||
{
|
||||
@@ -2408,8 +2409,8 @@ G4double G4QTauNuclearCrossSection::GetExchangeEnergy()
|
||||
G4double lastLE=lastG+lmtu; // recover log(eE) from the gamma (lastG)
|
||||
G4double dlg1=lastG+lastG-1.;
|
||||
G4double lgoe=lastG/lastE;
|
||||
for(G4int i=lastF;i<=lastL;i++)
|
||||
Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
for(G4int i=lastF; i<=lastL; i++)
|
||||
Y[i]=dlg1*lastJ1[i]-lgoe*(lastJ2[i]+lastJ2[i]-lastJ3[i]/lastE);
|
||||
G4double ris=lastSig*G4UniformRand(); // Sig can be > Y[lastL=mL], then it is funct. reg.
|
||||
#ifdef debug
|
||||
G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: "<<ris<<",Y="<<Y[lastL]<<G4endl;
|
||||
@@ -2437,11 +2438,11 @@ G4double G4QTauNuclearCrossSection::GetExchangeEnergy()
|
||||
G4cerr<<"**G4QTauNucCS::GetExEn: L="<<lastL<<",S="<<lastSig<<",Y="<<Y[lastL]<<G4endl;
|
||||
G4double f=(ris-Y[lastL])/lastH; // ScaledResidualValue of the cross-sec. integral
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QTauNuclCS::GetExEn: HighEnergy f="<<f<<",ris="<<ris<<",lastH="<<lastH<<G4endl;
|
||||
G4cout<<"G4QTauNucCS::GetExEn:HighEnergy f="<<f<<", ris="<<ris<<", lH="<<lastH<<G4endl;
|
||||
#endif
|
||||
phLE=SolveTheEquation(f); // Solve equation to find theLog(phE) (comp lastLE)
|
||||
#ifdef pdebug
|
||||
G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
|
||||
G4cout<<"G4QTauNuclearCrossSection::GetExchangeEnergy: HighEnergy lphE="<<phLE<<G4endl;
|
||||
#endif
|
||||
}
|
||||
if(phLE>lastLE)
|
||||
@@ -2466,7 +2467,7 @@ G4double G4QTauNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
static const G4double mtu=1777.; // Mass of muon in MeV
|
||||
static const G4double lmtu=std::log(mtu); // Log of muon mass
|
||||
static const G4double z=std::log(EMa); // Initial argument
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTabEdge (small)
|
||||
static const G4double p=poc*(z-pos)+shd*std::exp(-reg*z); // CrossX on theHighTabEdge
|
||||
static const G4int imax=27; // Not more than "imax" steps to find the solution
|
||||
static const G4double eps=0.001; // Accuracy which satisfies the search
|
||||
G4double lastLE=lastG+lmtu; // recover log(eE) from the gamma (lastG)
|
||||
@@ -2488,7 +2489,7 @@ G4double G4QTauNuclearCrossSection::SolveTheEquation(G4double f)
|
||||
G4cout<<"G4MuNCS::SolveTheE:i="<<i<<",d="<<d<<",x="<<x<<",fx="<<fx<<",df="<<df<<G4endl;
|
||||
#endif
|
||||
if(x>=lastLE)
|
||||
{
|
||||
{
|
||||
G4cerr<<"*G4ElNCS::SolveTheEq:*Correction*"<<i<<",d="<<d<<",x="<<x<<">lE="<<lastLE
|
||||
<<",f="<<f<<",fx="<<fx<<",df="<<df<<",A(Z="<<lastZ<<",N="<<lastN<<")"<<G4endl;
|
||||
x=topLim;
|
||||
@@ -2509,7 +2510,7 @@ G4double G4QTauNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
G4double y=nu/lastE; // Part of energy carried by the equivalent pfoton
|
||||
if(y>=1.-1./(lastG+lastG)) return 0.; // The region where the method does not work
|
||||
G4double y2=y*y; // Squared photonic part of energy
|
||||
G4double ye=1.-y; // Part of energy carried by the secondary electron
|
||||
G4double ye=1.-y; // Part of energy carried by the secondary tau-lept
|
||||
G4double Qi2=mtu2*y2/ye; // Minimum Q2
|
||||
G4double Qa2=4*lastE*lastE*ye; // Maximum Q2
|
||||
G4double iar=Qi2/Qa2; // Q2min/Q2max ratio
|
||||
@@ -2556,7 +2557,7 @@ G4double G4QTauNuclearCrossSection::GetExchangeQ2(G4double nu)
|
||||
}
|
||||
|
||||
// This class can provide only virtual exchange photons for all nu's and Q2's
|
||||
G4int G4QTauNuclearCrossSection::GetExchangePDGCode(G4double, G4double) {return 22;}
|
||||
G4int G4QTauNuclearCrossSection::GetExchangePDGCode() {return 22;}
|
||||
|
||||
G4double G4QTauNuclearCrossSection::GetVirtualFactor(G4double nu, G4double Q2)
|
||||
{
|
||||
@@ -2576,12 +2577,12 @@ G4double G4QTauNuclearCrossSection::GetVirtualFactor(G4double nu, G4double Q2)
|
||||
#endif
|
||||
return 0.;
|
||||
}
|
||||
G4double lK=std::log(K); // ln(K)
|
||||
G4double lK=std::log(K); // ln(K)
|
||||
G4double x=1.-K/nu; // This definitin saves one div.
|
||||
G4double GD=1.+Q2/Q02; // Reversed nucleonic form-factor
|
||||
G4double b=std::exp(bp*(lK-blK0)); // b-factor
|
||||
G4double c=std::exp(cp*(lK-clK0)); // c-factor
|
||||
G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2)
|
||||
G4double ef=std::exp(r*(b-c*r*r)); // exponential factor
|
||||
G4double b=std::exp(bp*(lK-blK0)); // b-factor
|
||||
G4double c=std::exp(cp*(lK-clK0)); // c-factor
|
||||
G4double r=.5*std::log(Q2+nu*nu)-lK; // r=.5*log((Q^2+nu^2)/K^2)
|
||||
G4double ef=std::exp(r*(b-c*r*r)); // exponential factor
|
||||
return (1.-x)*ef/GD/GD;
|
||||
}
|
||||
+18
-6
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VQCrossSection.cc,v 1.4 2005/06/27 15:30:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VQCrossSection.cc,v 1.3 2005/11/30 16:26:42 mkossov Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// CHIPS virtual class: G4VQCrossSection for the collision cross sections
|
||||
// Created: M.V. Kossov, CERN/ITEP(Moscow), 10-OCT-04
|
||||
// The last update: M.V. Kossov, CERN/ITEP (Moscow) 27-Nov-04
|
||||
//
|
||||
//===============================================================================================
|
||||
//=========================================================================================
|
||||
// ****************************************************************************************
|
||||
// ********** This CLASS is temporary moved from the photolepton_hadron directory *********
|
||||
// ******* DO NOT MAKE ANY CHANGE! With time it'll move back to photolepton...(M.K.) ******
|
||||
@@ -96,7 +96,7 @@ G4double G4VQCrossSection::GetCrossSection(G4double Momentum, G4int targZ, G4int
|
||||
lastTH =colTH[i]; // Last THreshold (A-dependent)
|
||||
lastCS =colCS[i]; // Last CrossSect (A-dependent)
|
||||
if(Momentum<=lastTH) return 0.; // Momentum is below the Threshold value
|
||||
else if(std::fabs(lastP/Momentum-1.)<tolerance) return lastCS*millibarn; // Use last CS
|
||||
else if(std::fabs(lastP/Momentum-1.)<tolerance) return lastCS*millibarn;// Use lastCS
|
||||
lastI = i; // Make the found isotope to be current isotope
|
||||
lastCS=CalculateCrossSection(-1,lastI,lastN,lastZ,Momentum);//read&update DB, calc.CS
|
||||
break; // Go out of the LOOP
|
||||
@@ -118,18 +118,30 @@ G4double G4VQCrossSection::GetCrossSection(G4double Momentum, G4int targZ, G4int
|
||||
} // End of creation of the new set of parameters
|
||||
} // End of parameters udate
|
||||
else if(Momentum<=lastTH) return 0.; // Momentum is below the Threshold value
|
||||
else if(std::fabs(lastP/Momentum-1.)<tolerance) return lastCS*millibarn; // Use the last CS
|
||||
else if(std::fabs(lastP/Momentum-1.)<tolerance) return lastCS*millibarn; // Use theLastCS
|
||||
else lastCS=CalculateCrossSection(1,lastI,lastN,lastZ,Momentum); // Update DB, calc. CS
|
||||
colP[lastI]=Momentum;
|
||||
colCS[lastI]=lastCS;
|
||||
return lastCS*millibarn;
|
||||
}
|
||||
|
||||
G4double G4VQCrossSection::GetDirectPart(G4double) {return 0.;} // Direct interaction
|
||||
|
||||
G4double G4VQCrossSection::GetNPartons(G4double) {return 3.;} // Direct interaction
|
||||
|
||||
G4double G4VQCrossSection::GetLastTOTCS() {return 0.;} // Get the last total CS
|
||||
|
||||
G4double G4VQCrossSection::GetLastQELCS() {return 0.;} // Get the last quasi-elast CS
|
||||
|
||||
G4double G4VQCrossSection::GetExchangeEnergy() {return 0.;}
|
||||
|
||||
G4double G4VQCrossSection::GetExchangeQ2(G4double) {return 0.;}
|
||||
|
||||
G4int G4VQCrossSection::GetExchangePDGCode(G4double, G4double) {return 0;}
|
||||
G4double G4VQCrossSection::GetQEL_ExchangeQ2() {return 0.;}
|
||||
|
||||
G4double G4VQCrossSection::GetNQE_ExchangeQ2() {return 0.;}
|
||||
|
||||
G4int G4VQCrossSection::GetExchangePDGCode() {return 0;}
|
||||
|
||||
G4double G4VQCrossSection::GetVirtualFactor(G4double nu, G4double Q2) {return 0.*nu*Q2;}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Simulation
|
||||
==================================================
|
||||
|
||||
History file for Low Energy Parameterized Models
|
||||
------------------------------------------------
|
||||
|
||||
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)
|
||||
---------------------------------------------------------------
|
||||
|
||||
28 Nov 2005 - G. Cosmo (hadr-cohe-V07-01-05)
|
||||
---------------------------------------------
|
||||
Migrated to <sstream> from G4ElasticHadrNucleusHE.
|
||||
|
||||
25 Nov 2005 - D. Wright (hadr-cohe-V07-01-04)
|
||||
---------------------------------------------
|
||||
From Solaris testing: line 83 of G4DiffElasticHadrScattering.hh:
|
||||
multiple declaration of variable c1. Fixed.
|
||||
|
||||
25 Nov 2005 - D. Wright (hadr-cohe-V07-01-03)
|
||||
---------------------------------------------
|
||||
Add detailed comments of N. Starkov from previous tags to History
|
||||
file:
|
||||
G4DiffElasticHadrNucleus.hh, .cc :
|
||||
add high energy elastic scattering on protons
|
||||
add new method HadronProtonDiffCrSec
|
||||
|
||||
G4ElasticHadrNucleusHE.hh, .cc :
|
||||
add high energy elastic scattering on protons
|
||||
|
||||
G4HadronValues.hh, .cc :
|
||||
use PDG value instead of static particle pointers
|
||||
|
||||
From V. Ivantchenko: fixed memory leaks
|
||||
4-momentum balance fixed, tested OK
|
||||
fixed compiler warnings
|
||||
|
||||
25 Nov 2005 - V.Ivanchenko (ghad-cohe-V07-01-03)
|
||||
------------------------------------------------
|
||||
Integration of recent development of the subpackage
|
||||
Remove of the G4Rutherford for the time being
|
||||
|
||||
+75
-85
@@ -21,9 +21,22 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DiffElasticHadrNucleus.hh,v 1.10 2005/06/10 13:23:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4DiffElasticHadrNucleus.hh,v 1.13 2005/11/25 19:17:32 dennis Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
//
|
||||
// G4DiffElasticHadrNucleus header file
|
||||
//
|
||||
// High energy hadron-nucleus elastic scattering
|
||||
// Kinetic energy T > 1 GeV
|
||||
// N. Starkov 2003.
|
||||
//
|
||||
// Modifications:
|
||||
// 14.11.05 The HE elastic scattering on proton is added (N.Starkov)
|
||||
// 23.11.05 int -> G4int, fabs -> abs (V.Ivanchenko)
|
||||
//
|
||||
|
||||
#ifndef G4DiffElasticHadrNucleus_h
|
||||
#define G4DiffElasticHadrNucleus_h 1
|
||||
|
||||
@@ -32,49 +45,51 @@
|
||||
#include "G4HadronValues.hh"
|
||||
#include "G4IntegrHadrNucleus.hh"
|
||||
|
||||
class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
G4IntegrHadrNucleus
|
||||
{
|
||||
class G4DiffElasticHadrNucleus: public G4IntegrHadrNucleus
|
||||
{
|
||||
|
||||
public:
|
||||
G4DiffElasticHadrNucleus() : // G4HadronValues(),
|
||||
G4IntegrHadrNucleus()
|
||||
{
|
||||
Factors();
|
||||
r0 = 1.1; // The WS's parameters
|
||||
r01 = 1.16;
|
||||
rAmax = 2.5;
|
||||
NpointsB = 500;
|
||||
}
|
||||
public:
|
||||
|
||||
G4DiffElasticHadrNucleus();
|
||||
|
||||
~G4DiffElasticHadrNucleus() {;}
|
||||
~G4DiffElasticHadrNucleus();
|
||||
|
||||
G4double HadrNuclDifferCrSec(
|
||||
G4double HadrNuclDifferCrSec(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus,
|
||||
G4double Q2);
|
||||
|
||||
G4double HadrNuclDifferCrSecT(
|
||||
G4double HadrNuclDifferCrSecT(
|
||||
const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus,
|
||||
G4double Q2,
|
||||
G4int Kind);
|
||||
|
||||
G4double Thickness(G4int A, G4double b);
|
||||
G4double Thickness(G4int A, G4double b);
|
||||
|
||||
void GetIntegrandB(G4int Anucleus);
|
||||
void GetIntegrandB(G4int Anucleus);
|
||||
|
||||
G4double GetIntegrandS(G4int Anucleus, G4double b, G4int Kind);
|
||||
G4double GetIntegrandS(G4int Anucleus, G4double b, G4int Kind);
|
||||
|
||||
void GetNucleusParameters(G4Nucleus * aNucleus);
|
||||
void GetNucleusParameters(G4Nucleus * aNucleus);
|
||||
|
||||
G4double HadronProtonDiffCrSec(G4double Q2);
|
||||
|
||||
G4double MyJ0(G4double x)
|
||||
void GetKinematics(const G4DynamicParticle * aHadron);
|
||||
|
||||
void GetParametersHP(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double LineInterpol(G4double p0, G4double p1,
|
||||
G4double c0, G4double c1,
|
||||
G4double p);
|
||||
// ====================================================
|
||||
G4double MyJ0(G4double x)
|
||||
{
|
||||
G4double x1, x2, x3, x4, x5, x6, x7, f0, th0, res;
|
||||
|
||||
x2 = x*x/9.0;
|
||||
|
||||
if(std::fabs(x)<=3)
|
||||
if(std::abs(x)<=3.0)
|
||||
{
|
||||
x3 = x2*x2;
|
||||
x4 = x3*x2;
|
||||
@@ -104,8 +119,8 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
G4double MyI0(G4double x)
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double MyI0(G4double x)
|
||||
{
|
||||
G4double p1=1.0, p2=3.5156229, p3=3.0899424,
|
||||
p4=1.2067492, p5=0.2659732, p6=3.360768e-2,
|
||||
@@ -114,7 +129,7 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
q4=-1.57565e-3, q5=9.16281e-3, q6=-2.057706e-2,
|
||||
q7=2.635537e-2, q8=-1.647633e-2, q9=3.922377e-3;
|
||||
|
||||
G4double k1=3.75, ax=std::fabs(x), y=0.0, result=0.0;
|
||||
G4double k1=3.75, ax=std::abs(x), y=0.0, result=0.0;
|
||||
|
||||
if(ax<k1)
|
||||
{
|
||||
@@ -131,86 +146,61 @@ class G4DiffElasticHadrNucleus: public //G4HadronValues
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void Factors();
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double binom(G4int N, G4int M)
|
||||
{
|
||||
G4double binom(G4int N, G4int M)
|
||||
{
|
||||
G4double Fact1 = 1;
|
||||
if ((N>1) & (N>=M))
|
||||
{
|
||||
Fact1 = Factorials[N]/Factorials[M]/
|
||||
Fact1 = Factorials[N]/Factorials[M]/
|
||||
Factorials[N-M];
|
||||
}
|
||||
return Fact1;
|
||||
}
|
||||
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double Factorial(G4int N)
|
||||
G4double Factorial(G4int N)
|
||||
{
|
||||
G4double Res;
|
||||
Res = 1;
|
||||
if(N == 0) return Res;
|
||||
G4double Res=1;
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
if(N == 0) return Res;
|
||||
|
||||
if(N >= 100) Res = 2.50662827*std::exp(static_cast<double>(-N-1))*
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
if(N >= 100) Res = 2.50662827*
|
||||
std::exp(static_cast<double>(-N-1))*
|
||||
std::pow(static_cast<double>(N+1),N+0.5)*
|
||||
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
|
||||
139/51840/(N+1)/(N+1)/(N+1)-
|
||||
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
|
||||
|
||||
return Res;
|
||||
}
|
||||
return Res;
|
||||
}
|
||||
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
void Factors()
|
||||
{
|
||||
G4int ii, ll, mm;
|
||||
G4double Sum1, Fac1, Fac3, Sum3;
|
||||
|
||||
Factorials[0] = 1;
|
||||
|
||||
for( ii = 1; ii<250; ii++)
|
||||
{
|
||||
if(ii >= 100) Mnoj[ii] = 3.03; // there is the saturation
|
||||
else
|
||||
{
|
||||
Sum1 = 0;
|
||||
Fac1 = 1;
|
||||
|
||||
Factorials[ii] = Factorial(ii);
|
||||
|
||||
for( ll = 0; ll<=ii; ll++)
|
||||
{
|
||||
Fac1 = binom(ii,ll);
|
||||
|
||||
Fac3 = 1;
|
||||
Sum3 = 1;
|
||||
for( mm = 1; mm<=ii-ll; mm++)
|
||||
{
|
||||
Fac3 = binom(ii-ll,mm);
|
||||
Sum3 = Sum3 + 1/Fac3;
|
||||
} // mm
|
||||
Sum1 = Sum1 + Sum3/Fac1;
|
||||
} // ll
|
||||
Mnoj[ii] = Sum1;
|
||||
} // else
|
||||
} // ii
|
||||
Mnoj[0] = 1;
|
||||
|
||||
} // Factors
|
||||
// --------------------------------------------------------
|
||||
public:
|
||||
|
||||
G4double Mnoj[250], Factorials[250];
|
||||
G4double ReIntegrand[1000], ImIntegrand[1000], Thick[1000];
|
||||
G4double rAfm, rAGeV, stepB, MomentumCMN;
|
||||
G4double SigTot, Slope, ReOnIm, HdrE, ConstU, Q2;
|
||||
G4double ProtonM, HadronM, HadronE, Sh, PM2, HM2;
|
||||
|
||||
public:
|
||||
|
||||
G4double R1, R2, Pnucl, Aeff, AIm, ARe, Dem, DIm, InCoh, InCohI;
|
||||
G4double r0, r01, rAmax;
|
||||
G4int NpointsB;
|
||||
};
|
||||
G4double EcmP, EcmH, Kcm, CosCM, SqrtS, MaxT, FmaxT, DsigDt;
|
||||
G4double Slope1, Slope2, Coeff1, Coeff2, IntConst, MaxTR;
|
||||
G4double Slope0, Coeff0;
|
||||
G4int NumbPointsB, NumbPointsT, HadrCode;
|
||||
G4String HadronName;
|
||||
|
||||
G4double Mnoj[250], Factorials[250];
|
||||
G4double ReIntegrand[1000], ImIntegrand[1000], Thick[1000];
|
||||
G4double rAfm, rAGeV, stepB, MomentumCMN, MomentumH;
|
||||
|
||||
G4double R1, R2, Pnucl, Aeff, AIm, ARe, Dem, DIm, InCoh, InCohI;
|
||||
G4double r0, r01, rAmax;
|
||||
G4double BoundaryP[7], BoundaryTL[7], BoundaryTG[7];
|
||||
G4int NpointsB, HadrCodes[7], Intern;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+141
-102
@@ -20,11 +20,22 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4ElasticHadrNucleusHE.hh,v 1.17 2005/11/23 11:24:08 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// $Id: G4ElasticHadrNucleusHE.hh,v 1.15 2005/06/10 13:28:07 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
|
||||
//
|
||||
// G4ElasticHadrNucleusHe header file
|
||||
//
|
||||
// The generator of high energy hadron-nucleus elastic scattering
|
||||
// The hadron kinetic energy T > 1 GeV
|
||||
// N. Starkov 2003.
|
||||
//
|
||||
// Modifications:
|
||||
// 19.05.04 Variant for G4 6.1: The 'ApplyYourself' was changed
|
||||
// 14.11.05 The HE elastic scattering on proton is added (N.Starkov)
|
||||
// 23.11.05 cleanup (V.Ivanchenko)
|
||||
//
|
||||
// G4ElasticHadrNucleusHe.hh
|
||||
|
||||
#ifndef G4ElasticHadrNucleusHE_h
|
||||
#define G4ElasticHadrNucleusHE_h 1
|
||||
@@ -54,35 +65,28 @@
|
||||
// on the formula is changed on the integral
|
||||
// one
|
||||
|
||||
class ElasticData
|
||||
{
|
||||
public:
|
||||
G4String hadrName;
|
||||
G4int nuclAtomicNumber;
|
||||
G4double TableE[ONE*AreaNumb];
|
||||
G4double TableQ2[ONQ2];
|
||||
G4double TableCrossSec[ONQ2XE*AreaNumb];
|
||||
class ElasticData
|
||||
{
|
||||
public:
|
||||
|
||||
ElasticData() {;}
|
||||
~ElasticData(){;}
|
||||
ElasticData() {};
|
||||
~ElasticData() {};
|
||||
|
||||
ElasticData (const ElasticData &t)
|
||||
ElasticData (const ElasticData &t)
|
||||
{
|
||||
G4int k;
|
||||
|
||||
hadrName = t.hadrName;
|
||||
nuclAtomicNumber = t.nuclAtomicNumber;
|
||||
for(k = 0; k<ONE*AreaNumb; k++)
|
||||
TableE[k] = t.TableE[k];
|
||||
hadrName = t.hadrName;
|
||||
nuclAtomicNumber = t.nuclAtomicNumber;
|
||||
for(k = 0; k<ONE*AreaNumb; k++) TableE[k] = t.TableE[k];
|
||||
|
||||
for(k = 0; k<ONQ2; k++)
|
||||
TableQ2[k] = t.TableQ2[k];
|
||||
for(k = 0; k<ONQ2; k++) TableQ2[k] = t.TableQ2[k];
|
||||
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++)
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++)
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
}
|
||||
|
||||
ElasticData & operator=(const ElasticData &t)
|
||||
ElasticData & operator=(const ElasticData &t)
|
||||
{
|
||||
G4int k;
|
||||
if(this!=&t)
|
||||
@@ -90,97 +94,132 @@
|
||||
hadrName = t.hadrName;
|
||||
nuclAtomicNumber = t.nuclAtomicNumber;
|
||||
for(k = 0; k<ONE*AreaNumb; k++)
|
||||
TableE[k] = t.TableE[k];
|
||||
TableE[k] = t.TableE[k];
|
||||
|
||||
for(k = 0; k<ONQ2; k++)
|
||||
TableQ2[k] = t.TableQ2[k];
|
||||
for(k = 0; k<ONQ2; k++) TableQ2[k] = t.TableQ2[k];
|
||||
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++)
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
TableCrossSec[k] = t.TableCrossSec[k];
|
||||
}
|
||||
return *this;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
class G4ElasticHadrNucleusHE : public G4DiffElasticHadrNucleus,
|
||||
public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4ElasticHadrNucleusHE(const G4ParticleDefinition * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4ElasticHadrNucleusHE();
|
||||
|
||||
~G4ElasticHadrNucleusHE() {;}
|
||||
|
||||
G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack,
|
||||
G4Nucleus &aNucleus);
|
||||
|
||||
G4double RandomElastic0();
|
||||
|
||||
G4double RandomElastic1( const G4DynamicParticle * aHadron,
|
||||
const ElasticData * aData);
|
||||
|
||||
private:
|
||||
G4int ReadOfData(G4ParticleDefinition * aParticle,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4String GetHadronName(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double GetQ2limit(G4double R1);
|
||||
|
||||
void CreationArray(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForHeavy(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForLight(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double InterPol(G4double X1, G4double X2, G4double X3,
|
||||
G4double Y1, G4double Y2, G4double Y3,
|
||||
G4double X);
|
||||
// +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
G4double Factorial1(G4int N)
|
||||
void Clean()
|
||||
{
|
||||
G4double Res;
|
||||
Res = 1;
|
||||
if(N == 0) return Res;
|
||||
G4int k;
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
hadrName = "Nothing";
|
||||
nuclAtomicNumber = 0;
|
||||
for(k = 0; k<ONE*AreaNumb; k++) TableE[k] = 0;
|
||||
|
||||
for(k = 0; k<ONQ2; k++) TableQ2[k] = 0;
|
||||
|
||||
for(k = 0; k< ONQ2XE*AreaNumb; k++) TableCrossSec[k] = 0;
|
||||
|
||||
else Res = 2.50662827*std::exp(static_cast<double>(-N-1))*
|
||||
std::pow(static_cast<double>(N+1),N+0.5)*
|
||||
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
|
||||
139/51840/(N+1)/(N+1)/(N+1)-
|
||||
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
|
||||
return Res;
|
||||
}
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
std::vector<ElasticData> SetOfElasticData;
|
||||
|
||||
G4IonTable * MyIonTable;
|
||||
G4DiffElasticHadrNucleus aDiffElHadNcls;
|
||||
// G4HadFinalState FinState;
|
||||
G4String hadrName;
|
||||
G4int nuclAtomicNumber;
|
||||
G4double TableE[ONE*AreaNumb];
|
||||
G4double TableQ2[ONQ2];
|
||||
G4double TableCrossSec[ONQ2XE*AreaNumb];
|
||||
|
||||
G4int Nstep, // The number of steps on Q2
|
||||
iKindWork, //
|
||||
iContr, //
|
||||
iPoE; // The number of steps on E
|
||||
G4int iTypeWork;
|
||||
G4double aNucleon; //,
|
||||
// * pTableCrSec, // The array of distr. func.
|
||||
// // at all energies
|
||||
// * pTableE; // The array of E values
|
||||
G4double iQ2[ONQ2], // The array of Q2 values
|
||||
pTableCrSec[ONQ2XE*AreaNumb],
|
||||
pTableE[ONE*AreaNumb],
|
||||
iIntgr[ONQ2], // The array of distr. func.
|
||||
// at one energy
|
||||
Factorials1[250]; // The array for factorials
|
||||
G4double dEbeg1, dEend1, dQ2, maxQ2;
|
||||
};
|
||||
|
||||
}; // The end of the class description
|
||||
class G4ElasticHadrNucleusHE : public G4DiffElasticHadrNucleus,
|
||||
public G4HadronicInteraction
|
||||
{
|
||||
public:
|
||||
G4ElasticHadrNucleusHE(const G4ParticleDefinition * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4ElasticHadrNucleusHE();
|
||||
|
||||
~G4ElasticHadrNucleusHE();
|
||||
|
||||
G4HadFinalState * ApplyYourself( const G4HadProjectile &aTrack,
|
||||
G4Nucleus &aNucleus);
|
||||
|
||||
G4double RandomElastic0();
|
||||
|
||||
G4double RandomElastic1( const G4DynamicParticle * aHadron,
|
||||
const ElasticData * aData);
|
||||
|
||||
void GetHadronNucleusData(G4DynamicParticle * aParticle,
|
||||
G4Nucleus * aNucleus,
|
||||
ElasticData & ElD );
|
||||
|
||||
G4int ReadOfData(G4ParticleDefinition * aParticle,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double GetQ2limit(G4double R1);
|
||||
|
||||
void CreationArray(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForHeavy(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
void ArrayForLight(const G4DynamicParticle * aHadron,
|
||||
G4Nucleus * aNucleus);
|
||||
|
||||
G4double InterPol(G4double X1, G4double X2, G4double X3,
|
||||
G4double Y1, G4double Y2, G4double Y3,
|
||||
G4double X);
|
||||
G4double HadronNucleusQ2(G4DynamicParticle * aHadron,
|
||||
G4Nucleus & aNucleus);
|
||||
|
||||
// ======================================================
|
||||
|
||||
G4float GetFt(G4double T);
|
||||
G4float GetDistrFun(G4double Q2);
|
||||
G4double GetQ2(G4double Ran);
|
||||
G4double HadronProtonQ2(G4DynamicParticle * aHadron);
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
G4double Factorial1(G4int N)
|
||||
{
|
||||
G4double Res=1;
|
||||
|
||||
if(N == 0) return Res;
|
||||
|
||||
if(N < 100) for(G4int M = 1; M<=N; M++) Res = Res*M;
|
||||
|
||||
else Res = 2.50662827*
|
||||
std::exp(static_cast<double>(-N-1))*
|
||||
std::pow(static_cast<double>(N+1),N+0.5)*
|
||||
(1+1/12/(N+1)+1/288/(N+1)/(N+1)-
|
||||
139/51840/(N+1)/(N+1)/(N+1)-
|
||||
571/2488320/(N+1)/(N+1)/(N+1)/(N+1));
|
||||
return Res;
|
||||
}
|
||||
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
G4DynamicParticle aHad;
|
||||
G4int HadrCode;
|
||||
G4String HadronName;
|
||||
|
||||
std::vector<ElasticData> SetOfElasticData;
|
||||
|
||||
G4IonTable * MyIonTable;
|
||||
G4DiffElasticHadrNucleus aDiffElHadNcls;
|
||||
|
||||
G4int Nstep, // The number of steps on Q2
|
||||
iKindWork, //
|
||||
iContr, //
|
||||
iPoE; // The number of steps on E
|
||||
G4int iTypeWork;
|
||||
G4double aNucleon;
|
||||
G4double iQ2[ONQ2], // The array of Q2 values
|
||||
pTableCrSec[ONQ2XE*AreaNumb],
|
||||
pTableE[ONE*AreaNumb],
|
||||
iIntgr[ONQ2], // The array of distr. func.
|
||||
// at one energy
|
||||
Factorials1[250]; // The array for factorials
|
||||
G4double dEbeg1, dEend1, dQ2, maxQ2;
|
||||
|
||||
}; // The end of the class description
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,37 +20,27 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4HadronValues.hh
|
||||
// $Id: G4HadronValues.hh,v 1.9 2005/11/23 11:24:08 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
//
|
||||
// G4HadronValues header file
|
||||
//
|
||||
//
|
||||
// Kinematic and dynamic values
|
||||
// N. Starkov 2003.
|
||||
//
|
||||
// Modifications:
|
||||
// 14.11.05 Use PDG code instead of static particle pointers (N.Starkov)
|
||||
// 23.11.05 cleanup (V.Ivanchenko)
|
||||
//
|
||||
|
||||
#ifndef G4HadronValues_h
|
||||
#define G4HadronValues_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Lambda.hh"
|
||||
#include "G4SigmaPlus.hh"
|
||||
#include "G4SigmaMinus.hh"
|
||||
#include "G4SigmaZero.hh"
|
||||
#include "G4XiMinus.hh"
|
||||
#include "G4XiZero.hh"
|
||||
#include "G4OmegaMinus.hh"
|
||||
|
||||
#include "G4AntiNeutron.hh"
|
||||
#include "G4AntiProton.hh"
|
||||
#include "G4AntiLambda.hh"
|
||||
#include "G4AntiSigmaPlus.hh"
|
||||
#include "G4AntiSigmaMinus.hh"
|
||||
#include "G4AntiSigmaZero.hh"
|
||||
#include "G4AntiXiMinus.hh"
|
||||
#include "G4AntiXiZero.hh"
|
||||
#include "G4AntiOmegaMinus.hh"
|
||||
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4PionMinus.hh"
|
||||
#include "G4KaonPlus.hh"
|
||||
#include "G4KaonMinus.hh"
|
||||
|
||||
#define MyPi 3.141593
|
||||
#define MbToGeV2 2.568
|
||||
@@ -58,20 +48,18 @@
|
||||
#define MbToFm2 25.68
|
||||
|
||||
class G4HadronValues
|
||||
{
|
||||
public:
|
||||
{
|
||||
public:
|
||||
|
||||
G4HadronValues() {;}
|
||||
~G4HadronValues() {;}
|
||||
G4HadronValues();
|
||||
~G4HadronValues();
|
||||
|
||||
// protected:
|
||||
void GetHadronValues(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double HadrTot, HadrSlope, HadrReIm, DDSect2, DDSect3,
|
||||
MomentumCM;
|
||||
|
||||
void GetHadronValues(const G4DynamicParticle * aHadron);
|
||||
|
||||
G4double HadrTot, HadrSlope, HadrReIm, DDSect2, DDSect3,
|
||||
MomentumCM;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+714
-302
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -20,64 +20,87 @@
|
||||
// * statement, and all its terms. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4HadronValues.cc
|
||||
// $Id: G4HadronValues.cc,v 1.14 2005/11/24 19:05:56 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
//
|
||||
// G4HadronValues class
|
||||
//
|
||||
//
|
||||
// Kinematic and dynamic values
|
||||
// N. Starkov 2003.
|
||||
//
|
||||
// Modifications:
|
||||
// 14.11.05 Use PDG code instead of static particle pointers (N.Starkov)
|
||||
// 23.11.05 cleanup (V.Ivanchenko)
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4HadronValues.hh"
|
||||
|
||||
G4HadronValues::G4HadronValues()
|
||||
{}
|
||||
|
||||
void
|
||||
G4HadronValues::GetHadronValues(const G4DynamicParticle* aHadron)
|
||||
G4HadronValues::~G4HadronValues()
|
||||
{}
|
||||
|
||||
void
|
||||
G4HadronValues::GetHadronValues(const G4DynamicParticle* aHadron)
|
||||
{
|
||||
G4int iHadron(-1), iHadrCode;
|
||||
iHadrCode = aHadron->GetDefinition()->GetPDGEncoding();
|
||||
|
||||
G4ParticleDefinition * dHadron = aHadron->GetDefinition();
|
||||
// G4cout<<" Code "<<iHadrCode<<G4endl;
|
||||
|
||||
G4int iHadron(-1);
|
||||
if( iHadrCode == 2212 ||
|
||||
iHadrCode == 2112 ||
|
||||
iHadrCode == 3122 ||
|
||||
iHadrCode == 3222 ||
|
||||
iHadrCode == 3112 ||
|
||||
iHadrCode == 3212 ||
|
||||
iHadrCode == 3312 ||
|
||||
iHadrCode == 3322 ||
|
||||
iHadrCode == 3334 ) iHadron = 0;
|
||||
|
||||
if(dHadron == G4Proton::Proton() ||
|
||||
dHadron == G4Neutron::Neutron() ||
|
||||
dHadron == G4Lambda::Lambda() ||
|
||||
dHadron == G4SigmaPlus::SigmaPlus() ||
|
||||
dHadron == G4SigmaMinus::SigmaMinus()||
|
||||
dHadron == G4SigmaZero::SigmaZero() ||
|
||||
dHadron == G4XiMinus::XiMinus() ||
|
||||
dHadron == G4XiZero::XiZero() ||
|
||||
dHadron == G4OmegaMinus::OmegaMinus()) iHadron=0;
|
||||
else if(
|
||||
iHadrCode == -2212 ||
|
||||
iHadrCode == -2112 ||
|
||||
iHadrCode == -3122 ||
|
||||
iHadrCode == -3222 ||
|
||||
iHadrCode == -3112 ||
|
||||
iHadrCode == -3212 ||
|
||||
iHadrCode == -3312 ||
|
||||
iHadrCode == -3322 ||
|
||||
iHadrCode == -3334 ) iHadron = 1;
|
||||
|
||||
else if(dHadron == G4AntiProton::AntiProton() ||
|
||||
dHadron == G4AntiNeutron::AntiNeutron() ||
|
||||
dHadron == G4AntiLambda::AntiLambda() ||
|
||||
dHadron == G4AntiSigmaPlus::AntiSigmaPlus() ||
|
||||
dHadron == G4AntiSigmaMinus::AntiSigmaMinus()||
|
||||
dHadron == G4AntiSigmaZero::AntiSigmaZero() ||
|
||||
dHadron == G4AntiXiMinus::AntiXiMinus() ||
|
||||
dHadron == G4AntiXiZero::AntiXiZero() ||
|
||||
dHadron == G4AntiOmegaMinus::AntiOmegaMinus()) iHadron=1;
|
||||
else if( iHadrCode == 211) iHadron = 2;
|
||||
else if( iHadrCode == -211) iHadron = 3;
|
||||
else if( iHadrCode == 321) iHadron = 4;
|
||||
else if( iHadrCode == -321) iHadron = 5;
|
||||
|
||||
else if(dHadron == G4PionPlus::PionPlus()) iHadron=2;
|
||||
|
||||
else if(dHadron == G4PionMinus::PionMinus()) iHadron=3;
|
||||
|
||||
else if(dHadron == G4KaonPlus::KaonPlus()) iHadron=4;
|
||||
|
||||
else if(dHadron == G4KaonMinus::KaonMinus()) iHadron=5;
|
||||
|
||||
else {
|
||||
G4Exception(" There is not method for this hadron ");
|
||||
}
|
||||
else {
|
||||
G4cout << "G4HadronValues::GetHadronValues iHadrCode= "
|
||||
<< iHadrCode
|
||||
<< " " << aHadron->GetDefinition()->GetParticleName()
|
||||
<< G4endl;
|
||||
G4Exception(" There is not method for this hadron ");
|
||||
}
|
||||
|
||||
G4double mHadr = aHadron->GetMass()/1000.; // In GeV
|
||||
G4double HadrEnergy = aHadron->GetTotalEnergy()/1000.; // In GeV
|
||||
G4double HadrMoment = aHadron->GetTotalMomentum()/1000.; // In GeV
|
||||
G4double sHadr = 2*HadrEnergy*0.938+0.938*0.938+mHadr*mHadr;
|
||||
G4double sqrS = std::sqrt(sHadr);
|
||||
G4double Ecm = (sHadr-mHadr*mHadr+0.938*.938)/2/sqrS;
|
||||
MomentumCM = std::sqrt(Ecm*Ecm-0.938*0.938);
|
||||
|
||||
if(HadrEnergy<1.0)
|
||||
if(HadrEnergy-mHadr<1.0)
|
||||
{
|
||||
G4cout<<HadrEnergy<<G4endl;
|
||||
G4Exception(" The hadron Energy is very low for this method!");
|
||||
}
|
||||
|
||||
switch (iHadron)
|
||||
{
|
||||
|
||||
@@ -98,23 +121,20 @@
|
||||
|
||||
// if(HadrEnergy>1000) HadrReIm=0.15;
|
||||
|
||||
if( dHadron == G4Lambda::Lambda() ||
|
||||
dHadron == G4SigmaPlus::SigmaPlus() ||
|
||||
dHadron == G4SigmaMinus::SigmaMinus()||
|
||||
dHadron == G4SigmaZero::SigmaZero())
|
||||
if( iHadrCode == 3122 || iHadrCode == 3222 ||
|
||||
iHadrCode == 3112 || iHadrCode == 3212 )
|
||||
{
|
||||
HadrTot *=0.80;
|
||||
HadrSlope *=0.85;
|
||||
}
|
||||
|
||||
if( dHadron == G4XiMinus::XiMinus() ||
|
||||
dHadron == G4XiZero::XiZero())
|
||||
if( iHadrCode == 3312 || iHadrCode == 3322 )
|
||||
{
|
||||
HadrTot *=0.70;
|
||||
HadrSlope *=0.75;
|
||||
}
|
||||
|
||||
if( dHadron == G4OmegaMinus::OmegaMinus())
|
||||
if( iHadrCode == 3334)
|
||||
{
|
||||
HadrTot *=0.60;
|
||||
HadrSlope *=0.65;
|
||||
@@ -138,34 +158,33 @@
|
||||
|
||||
// if(HadrEnergy>1000) HadrReIm=0.15;
|
||||
|
||||
if( dHadron == G4AntiLambda::AntiLambda() ||
|
||||
dHadron == G4AntiSigmaPlus::AntiSigmaPlus() ||
|
||||
dHadron == G4AntiSigmaMinus::AntiSigmaMinus()||
|
||||
dHadron == G4AntiSigmaZero::AntiSigmaZero())
|
||||
if( iHadrCode == -3122 || iHadrCode == -3222 ||
|
||||
iHadrCode == -3112 || iHadrCode == -3212 )
|
||||
{
|
||||
HadrTot *=0.75;
|
||||
HadrSlope *=0.85;
|
||||
}
|
||||
|
||||
if( dHadron == G4AntiXiMinus::AntiXiMinus() ||
|
||||
dHadron == G4AntiXiZero::AntiXiZero())
|
||||
|
||||
if( iHadrCode == -3312 || iHadrCode == -3322 )
|
||||
{
|
||||
HadrTot *=0.65;
|
||||
HadrSlope *=0.75;
|
||||
}
|
||||
|
||||
if( dHadron == G4AntiOmegaMinus::AntiOmegaMinus())
|
||||
if( iHadrCode == -3334)
|
||||
{
|
||||
HadrTot *=0.55;
|
||||
HadrSlope *=0.65;
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2: // pi plus
|
||||
|
||||
HadrTot = 10.6+2.*std::log(HadrEnergy)+
|
||||
25*std::pow(HadrEnergy,-0.43); // mb
|
||||
if(HadrMoment>2.0)
|
||||
HadrTot = 10.6+2.*log(HadrEnergy)+
|
||||
25*std::pow(HadrEnergy,-0.43); // mb
|
||||
else HadrTot = 40-50*(HadrMoment-1.5)*(HadrMoment-1.7);
|
||||
HadrSlope = 7.28+0.245*std::log(sHadr); //GeV-2
|
||||
HadrReIm = 0.2*std::log(sHadr/100)*std::pow(sHadr,-0.15);
|
||||
DDSect2 = 4.6; //mb*GeV-2
|
||||
@@ -176,6 +195,10 @@
|
||||
|
||||
HadrTot = 10.6+2*std::log(HadrEnergy)+
|
||||
30*std::pow(HadrEnergy,-0.43); // mb
|
||||
|
||||
if(HadrMoment<1.399)
|
||||
HadrTot = HadrTot+21.0/0.4*(1.4-HadrMoment);
|
||||
|
||||
HadrSlope = 7.28+0.245*std::log(sHadr); // GeV-2
|
||||
HadrReIm = 0.2*std::log(sHadr/100)*std::pow(sHadr,-0.15);
|
||||
DDSect2 = 4.6; //mb*GeV-2
|
||||
@@ -188,7 +211,8 @@
|
||||
9.0*std::pow(HadrEnergy,-0.55); // mb
|
||||
if(HadrEnergy>100) HadrSlope = 15.0;
|
||||
else
|
||||
HadrSlope = 5.28+1.76*std::log(sHadr)-
|
||||
// HadrSlope = 5.28+1.76*std::log(sHadr)-
|
||||
HadrSlope = 1.0+1.76*std::log(sHadr)-
|
||||
2.84*std::pow(sHadr,-0.5); // GeV-2
|
||||
HadrReIm = 0.4*(sHadr-20)*(sHadr-150)*std::pow(sHadr+50,-2.1);
|
||||
DDSect2 = 3.5; //mb*GeV-2
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4IntegrHadrNucleus.cc,v 1.12 2005/06/10 13:23:42 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4IntegrHadrNucleus.cc,v 1.13 2005/11/23 10:34:03 vnivanch Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// IntegrHadrNucleus.cc
|
||||
|
||||
@@ -42,15 +42,11 @@
|
||||
|
||||
G4int Anucleus = (int) aNucleus->GetN();
|
||||
|
||||
if(Anucleus<4)
|
||||
{
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
}
|
||||
if(Anucleus==2 || Anucleus==3)
|
||||
G4Exception(" This nucleus is very light for this model !!!");
|
||||
|
||||
if(Anucleus>208)
|
||||
{
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
}
|
||||
if(Anucleus>238)
|
||||
G4Exception(" This nucleus is very heavy for this model !!!");
|
||||
|
||||
MbToB = 2.568;
|
||||
Pi1 = 3.1416;
|
||||
@@ -150,10 +146,10 @@
|
||||
G4Nucleus * aNucleus)
|
||||
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
G4double MassH = aHadron->GetMass()/1000;
|
||||
if(HadrEnergy-MassH < 1.0)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -167,9 +163,9 @@ if(HadrEnergy < 1.4999)
|
||||
G4Nucleus * aNucleus)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
G4double MassH = aHadron->GetMass()/1000;
|
||||
if(HadrEnergy-MassH < 1.0)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -183,9 +179,9 @@ if(HadrEnergy < 1.4999)
|
||||
G4Nucleus * aNucleus)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
G4double MassH = aHadron->GetMass()/1000;
|
||||
if(HadrEnergy-MassH < 1.0)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -199,9 +195,9 @@ if(HadrEnergy < 1.4999)
|
||||
G4Nucleus * aNucleus)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
G4double MassH = aHadron->GetMass()/1000;
|
||||
if(HadrEnergy-MassH < 1.0)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
@@ -215,9 +211,9 @@ if(HadrEnergy < 1.4999)
|
||||
G4Nucleus * aNucleus)
|
||||
{
|
||||
HadrEnergy = aHadron->GetTotalEnergy()/1000;
|
||||
|
||||
if(HadrEnergy < 1.4999)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
G4double MassH = aHadron->GetMass()/1000;
|
||||
if(HadrEnergy-MassH < 1.0)
|
||||
G4Exception(" The hadron energy is very low for this model !!!");
|
||||
|
||||
G4HadronValues::GetHadronValues(aHadron);
|
||||
GetIntegralCrSec(aNucleus);
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
|
||||
==========================================================
|
||||
Geant4 - an Object-Oriented Toolkit for Physics Simulation
|
||||
==========================================================
|
||||
|
||||
History file for hadronic/models/de_excitation
|
||||
----------------------------------------------
|
||||
|
||||
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 Nov 2005 Dennis Wright (hadr-deex-V07-01-00)
|
||||
----------------------------------------------
|
||||
|
||||
- photon_evaporation (tag hadr-deex-photo-V07-01-00 by Aatos Heikkinen)
|
||||
<sstream> migration for G4NuclearLevelManager.cc,
|
||||
G4NuclearLevelDataStore.cc,
|
||||
G4DiscreteGammaDeexcitation.cc
|
||||
minor update of G4VGammaDeexcitation.cc
|
||||
|
||||
- util (tag hadr-deex-util-V07-01-00 by Aatos Heikkinen)
|
||||
<sstream> migration for G4CoulombBarrier.cc
|
||||
G4VCoulombBarrier.cc,
|
||||
|
||||
- gem_evaporation (tag hadr-deex-gem-V07-01-00 by Aatos Heikkinen)
|
||||
<sstream> migration for G4GEMCoulombBarrierHE.cc
|
||||
|
||||
- fermi_breakup (tag hadr-deex-fermi-V07-01-00 by Aatos Heikkinen)
|
||||
<sstream> migration for G4FermiSplitter.cc
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AlphaEvaporationChannel.hh,v 1.2 2005/06/04 13:21:21 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (Nov. 1999)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4AlphaEvaporationProbability.hh,v 1.2 2005/06/04 13:21:21 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (Nov 1999)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DeuteronEvaporationChannel.hh,v 1.2 2005/06/04 13:21:21 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (Nov. 1999)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4DeuteronEvaporationProbability.hh,v 1.2 2005/06/04 13:21:21 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara (Nov 1999)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Evaporation.hh,v 1.2 2005/06/04 13:21:21 jwellisc Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Hadronic Process: Nuclear De-excitations
|
||||
// by V. Lara
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user