Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
#include "G4NuclWatcher.hh"
|
||||
//#include "G4ExitonConfiguration.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4Analyser {
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
G4Analyser();
|
||||
void setInelCsec(G4double csec,
|
||||
G4bool withn);
|
||||
void setWatchers(const G4std::vector<G4NuclWatcher>& watchers);
|
||||
void setWatchers(const std::vector<G4NuclWatcher>& watchers);
|
||||
void try_watchers(G4double a,
|
||||
G4double z,
|
||||
G4bool if_nucl);
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
G4double averagePion0;
|
||||
G4double averageA;
|
||||
G4double averageZ;
|
||||
G4std::vector<G4NuclWatcher> ana_watchers;
|
||||
std::vector<G4NuclWatcher> ana_watchers;
|
||||
G4double inel_csec;
|
||||
G4bool withNuclei;
|
||||
};
|
||||
|
||||
@@ -30,15 +30,15 @@
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4InuclNuclei;
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
typedef G4std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef G4std::vector<partner> partners;
|
||||
typedef std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef std::vector<partner> partners;
|
||||
|
||||
class G4BertiniNucleiModel {
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle>
|
||||
std::vector<G4CascadParticle>
|
||||
generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider);
|
||||
|
||||
@@ -161,16 +161,16 @@ public:
|
||||
|
||||
G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
|
||||
G4std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return G4std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
};
|
||||
G4bool worthToPropagate(const G4CascadParticle& cparticle) const;
|
||||
|
||||
private:
|
||||
G4int verboseLevel; /*!< Each class has a verbosity level of its own. */
|
||||
G4bool passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4bool passFermi(const std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone);
|
||||
|
||||
void boundaryTransition(G4CascadParticle& cparticle);
|
||||
@@ -195,15 +195,15 @@ private:
|
||||
|
||||
G4double getRatio(G4int ip) const;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > nucleon_densities;
|
||||
std::vector<std::vector<G4double> > nucleon_densities;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > zone_potentials;
|
||||
std::vector<std::vector<G4double> > zone_potentials;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > fermi_momenta;
|
||||
std::vector<std::vector<G4double> > fermi_momenta;
|
||||
|
||||
G4std::vector<G4double> zone_radii;
|
||||
std::vector<G4double> zone_radii;
|
||||
|
||||
G4std::vector<G4double> binding_energies;
|
||||
std::vector<G4double> binding_energies;
|
||||
|
||||
G4double nuclei_radius;
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4BERTINIREGIONMODEL
|
||||
#define G4BERTINIREGIONMODEL
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/vector"
|
||||
#include <math.h>
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4double>::const_iterator iterator;
|
||||
|
||||
class G4BertiniRegionModel /// :public G4VRegionModel
|
||||
{
|
||||
public:
|
||||
G4BertiniRegionModel(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
~G4BertiniRegionModel();
|
||||
|
||||
/// instead of A and Z outer radius of the nucleus?
|
||||
/// void Init(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
G4double GetDensity(G4double radius);
|
||||
G4double GetPotentialEnergy(G4double r, G4int particle);
|
||||
G4double GetMaximumNucleonMomentum(G4double radius, G4int nucleon);
|
||||
/// G4double NumberOfRegions();
|
||||
|
||||
private:
|
||||
|
||||
G4int massNumber;
|
||||
G4int protonNumber;
|
||||
G4std::vector<G4double> radius; /// contains the outer radiuses of the shells
|
||||
G4std::vector<G4double> density;
|
||||
G4std::vector<G4double> protonFermiEnergy;
|
||||
G4std::vector<G4double> neutronFermiEnergy;
|
||||
G4std::vector<G4double> protonFermiMomentum;
|
||||
G4std::vector<G4double> neutronFermiMomentum;
|
||||
|
||||
G4std::vector<G4double> protonPotentialEnergy;
|
||||
G4std::vector<G4double> neutronPotentialEnergy;
|
||||
|
||||
static const G4double radius0;
|
||||
static const G4double BE;
|
||||
/// static const G4double pi = 3.141592;
|
||||
|
||||
G4double GetFermiMomentum(G4double density, G4double mass);
|
||||
G4double GetFermiEnergy(G4double density, G4double mass);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,13 +41,13 @@ public:
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4InuclElementaryParticle> generateBangInSCM(G4double etot,
|
||||
std::vector<G4InuclElementaryParticle> generateBangInSCM(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
G4double mn) const;
|
||||
|
||||
G4std::vector<G4double> generateMomentumModules(G4double etot,
|
||||
std::vector<G4double> generateMomentumModules(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
G4CascadParticle();
|
||||
|
||||
G4CascadParticle(const G4InuclElementaryParticle& particle,
|
||||
const G4std::vector<G4double>& pos,
|
||||
const std::vector<G4double>& pos,
|
||||
G4int izone,
|
||||
G4double cpath)
|
||||
|
||||
@@ -44,11 +44,11 @@ public:
|
||||
reflectionCounter = 0;
|
||||
};
|
||||
|
||||
void updateParticleMomentum(const G4std::vector<G4double>& mom) {
|
||||
void updateParticleMomentum(const std::vector<G4double>& mom) {
|
||||
theParticle.setMomentum(mom);
|
||||
};
|
||||
|
||||
void updatePosition(const G4std::vector<G4double>& pos) {
|
||||
void updatePosition(const std::vector<G4double>& pos) {
|
||||
position = pos;
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
G4double getPathToTheNextZone(G4double rz_in,
|
||||
G4double rz_out);
|
||||
|
||||
G4std::vector<G4double> getMomentum() const {
|
||||
std::vector<G4double> getMomentum() const {
|
||||
return theParticle.getMomentum();
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
return theParticle;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getPosition() const {
|
||||
std::vector<G4double> getPosition() const {
|
||||
return position;
|
||||
};
|
||||
|
||||
@@ -126,7 +126,7 @@ private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4InuclElementaryParticle theParticle;
|
||||
G4std::vector<G4double> position;
|
||||
std::vector<G4double> position;
|
||||
G4int current_zone;
|
||||
G4double current_path;
|
||||
G4bool movingIn;
|
||||
|
||||
+5
-5
@@ -25,14 +25,14 @@
|
||||
#include "globals.hh"
|
||||
|
||||
#include <math.h>
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
namespace G4CascadSpecialFunctions {
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScale2(G4double e);
|
||||
std::pair<G4int, G4double> getPositionInEnergyScale2(G4double e);
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScale1(G4double e);
|
||||
std::pair<G4int, G4double> getPositionInEnergyScale1(G4double e);
|
||||
|
||||
G4double absorptionCrosSection(G4double e,
|
||||
G4int type);
|
||||
@@ -40,7 +40,7 @@ namespace G4CascadSpecialFunctions {
|
||||
G4double crossSection(G4double e,
|
||||
G4int is);
|
||||
|
||||
G4std::pair<G4int, G4double> getPositionInEnergyScaleEMS(G4double e);
|
||||
std::pair<G4int, G4double> getPositionInEnergyScaleEMS(G4double e);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
#ifndef G4COLLISION_OUTPUT_HH
|
||||
#define G4COLLISION_OUTPUT_HH
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include <iostream>
|
||||
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4InuclNuclei.hh"
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
class G4CollisionOutput {
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
outgoingParticles.push_back(particle);
|
||||
};
|
||||
|
||||
void addOutgoingParticles(const G4std::vector<G4InuclElementaryParticle>& particles) {
|
||||
void addOutgoingParticles(const std::vector<G4InuclElementaryParticle>& particles) {
|
||||
for(G4int i = 0; i < G4int(particles.size()); i++)
|
||||
outgoingParticles.push_back(particles[i]);
|
||||
};
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
nucleiFragments.push_back(nuclei);
|
||||
};
|
||||
|
||||
void addTargetFragments(const G4std::vector<G4InuclNuclei>& nuclea) {
|
||||
void addTargetFragments(const std::vector<G4InuclNuclei>& nuclea) {
|
||||
for(G4int i = 0; i < G4int(nuclea.size()); i++)
|
||||
nucleiFragments.push_back(nuclea[i]);
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> getOutgoingParticles() const {
|
||||
std::vector<G4InuclElementaryParticle> getOutgoingParticles() const {
|
||||
return outgoingParticles;
|
||||
};
|
||||
|
||||
@@ -68,20 +68,20 @@ public:
|
||||
return nucleiFragments.size();
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclNuclei> getNucleiFragments() const {
|
||||
std::vector<G4InuclNuclei> getNucleiFragments() const {
|
||||
return nucleiFragments;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getTotalOutputMomentum() const {
|
||||
G4std::vector<G4double> tot_mom(4, 0.0);
|
||||
std::vector<G4double> getTotalOutputMomentum() const {
|
||||
std::vector<G4double> tot_mom(4, 0.0);
|
||||
double eex_r = 0.0;
|
||||
G4int i(0);
|
||||
for(i = 0; i < G4int(outgoingParticles.size()); i++) {
|
||||
G4std::vector<G4double> mom = outgoingParticles[i].getMomentum();
|
||||
std::vector<G4double> mom = outgoingParticles[i].getMomentum();
|
||||
for(G4int j = 0; j < 4; j++) tot_mom[j] += mom[j];
|
||||
};
|
||||
for(i = 0; i < G4int(nucleiFragments.size()); i++) {
|
||||
G4std::vector<G4double> mom = nucleiFragments[i].getMomentum();
|
||||
std::vector<G4double> mom = nucleiFragments[i].getMomentum();
|
||||
for(G4int j = 0; j < 4; j++) tot_mom[j] += mom[j];
|
||||
eex_r += 0.001 * nucleiFragments[i].getExitationEnergy();
|
||||
};
|
||||
@@ -142,13 +142,13 @@ public:
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4InuclElementaryParticle> outgoingParticles;
|
||||
std::vector<G4InuclElementaryParticle> outgoingParticles;
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleiFragments;
|
||||
std::vector<G4InuclNuclei> nucleiFragments;
|
||||
|
||||
G4double eex_rest;
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> selectPairToTune(G4double de) const;
|
||||
std::pair<std::pair<G4int, G4int>, G4int> selectPairToTune(G4double de) const;
|
||||
|
||||
G4bool on_shell;
|
||||
|
||||
|
||||
+9
-9
@@ -45,13 +45,13 @@ private:
|
||||
G4int generateMultiplicity(G4int is,
|
||||
G4double ekin) const;
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> generateSCMfinalState(G4double ekin,
|
||||
std::vector<G4InuclElementaryParticle> generateSCMfinalState(G4double ekin,
|
||||
G4double etot_scm, G4double pscm,
|
||||
G4InuclElementaryParticle* particle1,
|
||||
G4InuclElementaryParticle* particle2,
|
||||
G4LorentzConvertor* toSCM) const;
|
||||
|
||||
G4std::vector<G4double> generateMomModules(const G4std::vector<G4int>& kinds,
|
||||
std::vector<G4double> generateMomModules(const std::vector<G4int>& kinds,
|
||||
G4int mult,
|
||||
G4int is,
|
||||
G4double ekin,
|
||||
@@ -60,7 +60,7 @@ private:
|
||||
G4bool reChargering(G4double ekin,
|
||||
G4int is) const;
|
||||
|
||||
G4std::vector<G4double> particleSCMmomentumFor2to2(G4int is,
|
||||
std::vector<G4double> particleSCMmomentumFor2to2(G4int is,
|
||||
G4int kw,
|
||||
G4double ekin,
|
||||
G4double pscm) const;
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
G4int kw,
|
||||
G4double ekin) const;
|
||||
|
||||
G4std::vector<G4int> generateOutgoingKindsFor2toMany(G4int is,
|
||||
std::vector<G4int> generateOutgoingKindsFor2toMany(G4int is,
|
||||
G4int mult,
|
||||
G4double ekin) const;
|
||||
|
||||
@@ -78,9 +78,9 @@ private:
|
||||
G4int knd,
|
||||
G4double ekin) const;
|
||||
|
||||
G4bool satisfyTriangle(const G4std::vector<G4double>& modules) const;
|
||||
G4bool satisfyTriangle(const std::vector<G4double>& modules) const;
|
||||
|
||||
G4std::vector<G4double> particleSCMmomentumFor2to3(G4int is,
|
||||
std::vector<G4double> particleSCMmomentumFor2to3(G4int is,
|
||||
G4int knd,
|
||||
G4double ekin,
|
||||
G4double pmod) const;
|
||||
@@ -88,15 +88,15 @@ private:
|
||||
G4int getIL(G4int is,
|
||||
G4int mult) const;
|
||||
|
||||
G4std::pair<G4double, G4double> adjustIntervalForElastic(G4double ekin,
|
||||
std::pair<G4double, G4double> adjustIntervalForElastic(G4double ekin,
|
||||
G4double ak,
|
||||
G4double ae,
|
||||
G4int k,
|
||||
G4int l,
|
||||
const G4std::vector<G4double>& ssv,
|
||||
const std::vector<G4double>& ssv,
|
||||
G4double st) const;
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle>
|
||||
std::vector<G4InuclElementaryParticle>
|
||||
generateSCMpionAbsorption(G4double etot_scm,
|
||||
G4InuclElementaryParticle* particle1,
|
||||
G4InuclElementaryParticle* particle2) const;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define G4FISSION_CONFIGURATION_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/iostream"
|
||||
#include <iostream>
|
||||
|
||||
class G4FissionConfiguration {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "G4FissionConfiguration.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4FissionStore {
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
|
||||
G4std::vector<G4FissionConfiguration> configurations;
|
||||
std::vector<G4FissionConfiguration> configurations;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -52,14 +52,14 @@ G4int verboseLevel;
|
||||
G4double R12) const;
|
||||
|
||||
void potentialMinimization(G4double& VP,
|
||||
G4std::vector<G4double>& ED,
|
||||
std::vector<G4double>& ED,
|
||||
G4double& VC,
|
||||
G4double AF,
|
||||
G4double AS,
|
||||
G4double ZF,
|
||||
G4double ZS,
|
||||
G4std::vector<G4double>& AL1,
|
||||
G4std::vector<G4double>& BET1,
|
||||
std::vector<G4double>& AL1,
|
||||
std::vector<G4double>& BET1,
|
||||
G4double& R12) const;
|
||||
|
||||
};
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
#include "G4InuclParticle.hh"
|
||||
//#endif
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
class G4InteractionCase {
|
||||
|
||||
public:
|
||||
|
||||
G4InteractionCase() {
|
||||
bultag = G4std::pair<G4InuclParticle*, G4InuclParticle*>(0, 0);
|
||||
bultag = std::pair<G4InuclParticle*, G4InuclParticle*>(0, 0);
|
||||
inter_case = 0;
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
|
||||
void setBulletTarget(G4InuclParticle* part1,
|
||||
G4InuclParticle* part2) {
|
||||
bultag = G4std::pair<G4InuclParticle*, G4InuclParticle*>(part1, part2);
|
||||
bultag = std::pair<G4InuclParticle*, G4InuclParticle*>(part1, part2);
|
||||
};
|
||||
|
||||
void setInterCase(G4int ic) {
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
G4std::pair<G4InuclParticle*, G4InuclParticle*> bultag;
|
||||
std::pair<G4InuclParticle*, G4InuclParticle*> bultag;
|
||||
|
||||
G4int inter_case;
|
||||
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ public:
|
||||
valid_particle = false;
|
||||
};
|
||||
|
||||
G4InuclElementaryParticle(const G4std::vector<G4double>& mom,
|
||||
G4InuclElementaryParticle(const std::vector<G4double>& mom,
|
||||
G4int type)
|
||||
: G4InuclParticle(mom),
|
||||
particleType(type) {
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
particleMass = getParticleMass(ityp);
|
||||
};
|
||||
|
||||
void setMomentum(const G4std::vector<G4double>& mom) {
|
||||
void setMomentum(const std::vector<G4double>& mom) {
|
||||
|
||||
momentum = mom;
|
||||
momentum[0] = sqrt(momentum[1] * momentum[1] + momentum[2] * momentum[2] +
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
exitationEnergy = 0.0;
|
||||
};
|
||||
|
||||
G4InuclNuclei(const G4std::vector<G4double>& mom,
|
||||
G4InuclNuclei(const std::vector<G4double>& mom,
|
||||
G4double a,
|
||||
G4double z)
|
||||
: G4InuclParticle(mom),
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
Z(z) {
|
||||
|
||||
setNucleiMass();
|
||||
G4std::vector<G4double> mom(4, 0.0);
|
||||
std::vector<G4double> mom(4, 0.0);
|
||||
mom[0] = ekin + nucleiMass;
|
||||
mom[3] = sqrt(mom[0] * mom[0] - nucleiMass * nucleiMass);
|
||||
G4InuclParticle::setMomentum(mom);
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include "g4std/vector"
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
class G4InuclParticle {
|
||||
|
||||
@@ -37,17 +37,17 @@ public:
|
||||
|
||||
virtual ~G4InuclParticle() { };
|
||||
|
||||
G4InuclParticle(const G4std::vector<G4double>& mom) {
|
||||
G4InuclParticle(const std::vector<G4double>& mom) {
|
||||
|
||||
setMomentum(mom);
|
||||
};
|
||||
|
||||
void setMomentum(const G4std::vector<G4double>& mom) {
|
||||
void setMomentum(const std::vector<G4double>& mom) {
|
||||
|
||||
momentum = mom;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> getMomentum() const {
|
||||
std::vector<G4double> getMomentum() const {
|
||||
|
||||
return momentum;
|
||||
};
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
G4std::vector<G4double> momentum;
|
||||
std::vector<G4double> momentum;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include <math.h>
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace G4InuclSpecialFunctions {
|
||||
@@ -46,9 +46,9 @@ namespace G4InuclSpecialFunctions {
|
||||
G4double Z,
|
||||
G4int ntype);
|
||||
|
||||
G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > paraMaker(G4double Z);
|
||||
std::pair<std::vector<G4double>, std::vector<G4double> > paraMaker(G4double Z);
|
||||
|
||||
G4std::pair<G4double, G4double> paraMakerTruncated(G4double Z);
|
||||
std::pair<G4double, G4double> paraMakerTruncated(G4double Z);
|
||||
|
||||
G4double getAL(G4double A);
|
||||
|
||||
@@ -62,11 +62,11 @@ namespace G4InuclSpecialFunctions {
|
||||
|
||||
G4double randomPHI();
|
||||
|
||||
G4std::pair<G4double, G4double> randomCOS_SIN();
|
||||
std::pair<G4double, G4double> randomCOS_SIN();
|
||||
|
||||
G4double nucleiLevelDensity(G4double a);
|
||||
|
||||
G4std::vector<G4double> generateWithFixedTheta(G4double ct,
|
||||
std::vector<G4double> generateWithFixedTheta(G4double ct,
|
||||
G4double p);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4LorentzConvertor {
|
||||
|
||||
@@ -34,9 +34,9 @@ public:
|
||||
|
||||
G4LorentzConvertor();
|
||||
|
||||
G4LorentzConvertor(const G4std::vector<G4double>& bmom,
|
||||
G4LorentzConvertor(const std::vector<G4double>& bmom,
|
||||
G4double bmass,
|
||||
const G4std::vector<G4double>& tmom,
|
||||
const std::vector<G4double>& tmom,
|
||||
G4double tmass) {
|
||||
|
||||
setBullet(bmom, bmass);
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
degenerated = false;
|
||||
};
|
||||
|
||||
void setBullet(const G4std::vector<G4double>& bmom,
|
||||
void setBullet(const std::vector<G4double>& bmom,
|
||||
G4double bmass) {
|
||||
|
||||
bullet_mom = bmom;
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
// G4cout << " bullet: e " << bmom[0] << " mass " << bmass << G4endl;
|
||||
};
|
||||
|
||||
void setTarget(const G4std::vector<G4double>& tmom,
|
||||
void setTarget(const std::vector<G4double>& tmom,
|
||||
G4double tmass) {
|
||||
|
||||
target_mom = tmom;
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
void toTheTargetRestFrame();
|
||||
|
||||
G4std::vector<G4double> backToTheLab(const G4std::vector<G4double>& mom) const;
|
||||
std::vector<G4double> backToTheLab(const std::vector<G4double>& mom) const;
|
||||
|
||||
G4double getKinEnergyInTheTRS() const {
|
||||
|
||||
@@ -91,10 +91,10 @@ public:
|
||||
return plab;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> rotate(const G4std::vector<G4double> mom) const;
|
||||
std::vector<G4double> rotate(const std::vector<G4double> mom) const;
|
||||
|
||||
G4std::vector<G4double> rotate(const G4std::vector<G4double> mom1,
|
||||
const G4std::vector<G4double> mom) const;
|
||||
std::vector<G4double> rotate(const std::vector<G4double> mom1,
|
||||
const std::vector<G4double> mom) const;
|
||||
|
||||
G4bool reflectionNeeded() const;
|
||||
|
||||
@@ -104,15 +104,15 @@ public:
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4double> bullet_mom;
|
||||
std::vector<G4double> bullet_mom;
|
||||
G4double bullet_mass;
|
||||
|
||||
G4std::vector<G4double> target_mom;
|
||||
std::vector<G4double> target_mom;
|
||||
G4double target_mass;
|
||||
|
||||
G4std::vector<G4double> velocity;
|
||||
std::vector<G4double> velocity;
|
||||
|
||||
G4std::vector<G4double> scm_momentum;
|
||||
std::vector<G4double> scm_momentum;
|
||||
|
||||
G4double ecm_tot;
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "globals.hh"
|
||||
#endif
|
||||
|
||||
#include "g4std/algorithm"
|
||||
#include "g4std/vector"
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <math.h>
|
||||
|
||||
class G4NuclWatcher {
|
||||
@@ -35,9 +35,9 @@ class G4NuclWatcher {
|
||||
public:
|
||||
|
||||
G4NuclWatcher(G4double z,
|
||||
G4std::vector<G4double> expa,
|
||||
G4std::vector<G4double> expcs,
|
||||
G4std::vector<G4double> experr,
|
||||
std::vector<G4double> expa,
|
||||
std::vector<G4double> expcs,
|
||||
std::vector<G4double> experr,
|
||||
G4bool check,
|
||||
G4bool nucl)
|
||||
: nuclz(z),
|
||||
@@ -89,12 +89,12 @@ public:
|
||||
return izotop_chsq;
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getAverageRatio() const {
|
||||
std::pair<G4double, G4double> getAverageRatio() const {
|
||||
|
||||
return G4std::pair<G4double, G4double>(average_ratio, aver_rat_err);
|
||||
return std::pair<G4double, G4double>(average_ratio, aver_rat_err);
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getExpCs() const {
|
||||
std::pair<G4double, G4double> getExpCs() const {
|
||||
|
||||
G4double cs = 0.0;
|
||||
G4double err = 0.0;
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
err += exper_err[iz];
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(cs, err);
|
||||
return std::pair<G4double, G4double>(cs, err);
|
||||
};
|
||||
|
||||
G4bool to_check() const {
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
return nucleable;
|
||||
};
|
||||
|
||||
G4std::pair<G4double, G4double> getInuclCs() const {
|
||||
std::pair<G4double, G4double> getInuclCs() const {
|
||||
|
||||
G4double cs = 0.0;
|
||||
G4double err = 0.0;
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
err += simulated_errors[iz];
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(cs, err);
|
||||
return std::pair<G4double, G4double>(cs, err);
|
||||
};
|
||||
|
||||
void print() {
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
G4double exp_cs_err = 0.0;
|
||||
G4double inucl_cs = 0.0;
|
||||
G4double inucl_cs_err = 0.0;
|
||||
G4std::vector<G4bool> not_used(simulated_cs.size(), true);
|
||||
std::vector<G4bool> not_used(simulated_cs.size(), true);
|
||||
G4int nmatched = exper_as.size();
|
||||
G4int nused = simulated_cs.size();
|
||||
G4double lhood = 0.0;
|
||||
@@ -253,19 +253,19 @@ private:
|
||||
|
||||
G4double aver_matched;
|
||||
|
||||
G4std::vector<G4double> exper_as;
|
||||
std::vector<G4double> exper_as;
|
||||
|
||||
G4std::vector<G4double> exper_cs;
|
||||
std::vector<G4double> exper_cs;
|
||||
|
||||
G4std::vector<G4double> exper_err;
|
||||
std::vector<G4double> exper_err;
|
||||
|
||||
G4std::vector<G4double> simulated_as;
|
||||
std::vector<G4double> simulated_as;
|
||||
|
||||
G4std::vector<G4double> simulated_cs;
|
||||
std::vector<G4double> simulated_cs;
|
||||
|
||||
G4std::vector<G4double> simulated_errors;
|
||||
std::vector<G4double> simulated_errors;
|
||||
|
||||
G4std::vector<G4double> simulated_prob;
|
||||
std::vector<G4double> simulated_prob;
|
||||
|
||||
G4bool checkable;
|
||||
|
||||
|
||||
@@ -32,15 +32,15 @@
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4InuclNuclei;
|
||||
|
||||
using namespace G4InuclSpecialFunctions;
|
||||
using namespace G4CascadSpecialFunctions;
|
||||
|
||||
typedef G4std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef G4std::vector<partner> partners;
|
||||
typedef std::pair<G4InuclElementaryParticle, G4double> partner;
|
||||
typedef std::vector<partner> partners;
|
||||
|
||||
class G4NucleiModel {
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
return izone < number_of_zones ? zone_potentials[ip0][izone] : 0.0;
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle>
|
||||
std::vector<G4CascadParticle>
|
||||
generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider);
|
||||
|
||||
@@ -125,10 +125,10 @@ public:
|
||||
|
||||
G4CascadParticle initializeCascad(G4InuclElementaryParticle* particle);
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> > initializeCascad(G4InuclNuclei* bullet, G4InuclNuclei* target);
|
||||
|
||||
G4std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return G4std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
std::pair<G4int, G4int> getTypesOfNucleonsInvolved() const {
|
||||
return std::pair<G4int, G4int>(current_nucl1, current_nucl2);
|
||||
};
|
||||
G4bool worthToPropagate(const G4CascadParticle& cparticle) const;
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
|
||||
private:
|
||||
G4int verboseLevel;
|
||||
G4bool passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4bool passFermi(const std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone);
|
||||
|
||||
void boundaryTransition(G4CascadParticle& cparticle);
|
||||
@@ -159,15 +159,15 @@ G4int verboseLevel;
|
||||
|
||||
G4double getRatio(G4int ip) const;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > nucleon_densities;
|
||||
std::vector<std::vector<G4double> > nucleon_densities;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > zone_potentials;
|
||||
std::vector<std::vector<G4double> > zone_potentials;
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > fermi_momenta;
|
||||
std::vector<std::vector<G4double> > fermi_momenta;
|
||||
|
||||
G4std::vector<G4double> zone_radii;
|
||||
std::vector<G4double> zone_radii;
|
||||
|
||||
G4std::vector<G4double> binding_energies;
|
||||
std::vector<G4double> binding_energies;
|
||||
|
||||
G4double nuclei_radius;
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
#ifndef G4REGIONMODEL
|
||||
#define G4REGIONMODEL
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "g4std/vector"
|
||||
#include <math.h>
|
||||
#include "globals.hh"
|
||||
#include "G4Proton.hh"
|
||||
#include "G4Neutron.hh"
|
||||
//#include "G4NucleusModel.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4double>::const_iterator iterator;
|
||||
|
||||
class G4RegionModel //:public G4VRegionModel
|
||||
{
|
||||
public:
|
||||
G4RegionModel(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
~G4RegionModel();
|
||||
|
||||
//instead of A and Z outer radius of the nucleus?
|
||||
//void Init(const G4int numberOfLayers, const G4int A, const G4int Z);
|
||||
G4double GetDensity(G4double radius);
|
||||
G4double GetPotentialEnergy(G4double r, G4int particle);
|
||||
G4double GetMaximumNucleonMomentum(G4double radius, G4int nucleon);
|
||||
// G4double NumberOfRegions();
|
||||
|
||||
private:
|
||||
|
||||
G4int massNumber;
|
||||
G4int protonNumber;
|
||||
G4std::vector<G4double> radius; //contains the outer radiuses of the shells
|
||||
G4std::vector<G4double> density;
|
||||
G4std::vector<G4double> protonFermiEnergy;
|
||||
G4std::vector<G4double> neutronFermiEnergy;
|
||||
G4std::vector<G4double> protonFermiMomentum;
|
||||
G4std::vector<G4double> neutronFermiMomentum;
|
||||
|
||||
G4std::vector<G4double> protonPotentialEnergy;
|
||||
G4std::vector<G4double> neutronPotentialEnergy;
|
||||
|
||||
static const G4double radius0;
|
||||
static const G4double BE;
|
||||
//static const G4double pi = 3.141592;
|
||||
|
||||
G4double GetFermiMomentum(G4double density, G4double mass);
|
||||
G4double GetFermiEnergy(G4double density, G4double mass);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#define G4WATCHER_GUN_HH
|
||||
|
||||
#include "G4NuclWatcher.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
class G4WatcherGun {
|
||||
|
||||
@@ -32,14 +32,14 @@ public:
|
||||
G4WatcherGun();
|
||||
void setWatchers();
|
||||
|
||||
G4std::vector<G4NuclWatcher> getWatchers() const {
|
||||
std::vector<G4NuclWatcher> getWatchers() const {
|
||||
return watchers;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
G4int verboseLevel;
|
||||
G4std::vector<G4NuclWatcher> watchers;
|
||||
std::vector<G4NuclWatcher> watchers;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ void G4Analyser::setInelCsec(G4double csec,
|
||||
}
|
||||
}
|
||||
|
||||
void G4Analyser::setWatchers(const G4std::vector<G4NuclWatcher>& watchers) {
|
||||
void G4Analyser::setWatchers(const std::vector<G4NuclWatcher>& watchers) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4Analyser::setWatchers" << G4endl;
|
||||
@@ -106,7 +106,7 @@ void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
}
|
||||
|
||||
if (withNuclei) {
|
||||
G4std::vector<G4InuclNuclei> nucleus = output.getNucleiFragments();
|
||||
std::vector<G4InuclNuclei> nucleus = output.getNucleiFragments();
|
||||
|
||||
if (nucleus.size() >= 0) {
|
||||
G4int nbig = 0;
|
||||
@@ -129,7 +129,7 @@ void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
|
||||
if (nbig > 1) fissy_prob += 1.0;
|
||||
eventNumber += 1.0;
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
averageMultiplicity += particles.size();
|
||||
|
||||
for (G4int i = 0; i < G4int(particles.size()); i++) {
|
||||
@@ -176,7 +176,7 @@ void G4Analyser::analyse(const G4CollisionOutput& output) {
|
||||
|
||||
} else {
|
||||
eventNumber += 1.0;
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
averageMultiplicity += particles.size();
|
||||
|
||||
for (G4int i = 0; i < G4int(particles.size()); i++) {
|
||||
@@ -294,14 +294,14 @@ void G4Analyser::handleWatcherStatistics() {
|
||||
ana_watchers[iw].print();
|
||||
|
||||
if (ana_watchers[iw].to_check()) {
|
||||
G4std::pair<G4double, G4double> rat_err = ana_watchers[iw].getAverageRatio();
|
||||
std::pair<G4double, G4double> rat_err = ana_watchers[iw].getAverageRatio();
|
||||
averat += rat_err.first;
|
||||
ave_err += rat_err.second;
|
||||
gl_chsq += ana_watchers[iw].getChsq();
|
||||
G4std::pair<G4double, G4double> cs_err = ana_watchers[iw].getExpCs();
|
||||
std::pair<G4double, G4double> cs_err = ana_watchers[iw].getExpCs();
|
||||
tot_exper += cs_err.first;
|
||||
tot_exper_err += cs_err.second;
|
||||
G4std::pair<G4double, G4double> inucl_cs_err = ana_watchers[iw].getInuclCs();
|
||||
std::pair<G4double, G4double> inucl_cs_err = ana_watchers[iw].getInuclCs();
|
||||
tot_inucl += inucl_cs_err.first;
|
||||
tot_inucl_err += inucl_cs_err.second;
|
||||
G4double iz_checked = ana_watchers[iw].getNmatched();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "G4CollisionOutput.hh"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4BertiniNucleiModel::G4BertiniNucleiModel()
|
||||
: verboseLevel(2) {
|
||||
@@ -75,7 +75,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
G4double CU2 = 0.0;
|
||||
|
||||
if (a > 3.5) { /// a > 3
|
||||
G4std::vector<G4double> ur;
|
||||
std::vector<G4double> ur;
|
||||
G4int icase = 0;
|
||||
|
||||
if (a > 11.5) { /// a > 11
|
||||
@@ -106,8 +106,8 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
};
|
||||
|
||||
G4double tot_vol = 0.0;
|
||||
G4std::vector<G4double> v;
|
||||
G4std::vector<G4double> v1;
|
||||
std::vector<G4double> v;
|
||||
std::vector<G4double> v1;
|
||||
G4int i(0);
|
||||
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
@@ -130,9 +130,9 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
|
||||
/// proton
|
||||
G4double dd0 = 3.0 * z * oneBypiTimes4 / tot_vol;
|
||||
G4std::vector<G4double> rod;
|
||||
G4std::vector<G4double> pf;
|
||||
G4std::vector<G4double> vz;
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
@@ -164,7 +164,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
zone_potentials.push_back(vz);
|
||||
fermi_momenta.push_back(pf);
|
||||
/// pion
|
||||
G4std::vector<G4double> vp(number_of_zones, pion_vp);
|
||||
std::vector<G4double> vp(number_of_zones, pion_vp);
|
||||
zone_potentials.push_back(vp);
|
||||
|
||||
} else { /// a < 4
|
||||
@@ -172,9 +172,9 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
number_of_zones = 1;
|
||||
zone_radii.push_back(radForSmall);
|
||||
G4double vol = 1.0 / piTimes4thirds / pow(zone_radii[0], 3);
|
||||
G4std::vector<G4double> rod;
|
||||
G4std::vector<G4double> pf;
|
||||
G4std::vector<G4double> vz;
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
G4int i(0);
|
||||
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
@@ -207,7 +207,7 @@ void G4BertiniNucleiModel::generateModel(G4double a,
|
||||
fermi_momenta.push_back(pf);
|
||||
|
||||
/// pion
|
||||
G4std::vector<G4double> vp(number_of_zones, pion_vp_small);
|
||||
std::vector<G4double> vp(number_of_zones, pion_vp_small);
|
||||
zone_potentials.push_back(vp);
|
||||
};
|
||||
|
||||
@@ -355,8 +355,8 @@ G4InuclElementaryParticle G4BertiniNucleiModel::generateNucleon(G4int type,
|
||||
const G4double one_third = 1.0 / 3.0;
|
||||
///G4double pmod = getFermiMomentum(type, zone) * pow(inuclRndm(), one_third);
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * pow(inuclRndm(), one_third);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double pt = pmod * COS_SIN.second;
|
||||
mom[1] = pt * cos(FI);
|
||||
@@ -374,11 +374,11 @@ G4InuclElementaryParticle G4BertiniNucleiModel::generateQuasiDeutron(G4int type1
|
||||
G4cout << " >>> G4BertiniNucleiModel::generateQuasiDeutron" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom = generateNucleon(type1, zone).getMomentum();
|
||||
std::vector<G4double> mom = generateNucleon(type1, zone).getMomentum();
|
||||
|
||||
G4std::vector<G4double> mom1 = generateNucleon(type2, zone).getMomentum();
|
||||
std::vector<G4double> mom1 = generateNucleon(type2, zone).getMomentum();
|
||||
|
||||
G4std::vector<G4double> dmom(4);
|
||||
std::vector<G4double> dmom(4);
|
||||
|
||||
for(G4int i = 1; i < 4; i++) dmom[i] = mom[i] + mom1[i];
|
||||
|
||||
@@ -422,7 +422,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
G4int ptype = cparticle.getParticle().type();
|
||||
G4int zone = cparticle.getCurrentZone();
|
||||
G4double pmass = cparticle.getParticle().getMass();
|
||||
G4std::vector<G4double> pmom = cparticle.getParticle().getMomentum();
|
||||
std::vector<G4double> pmom = cparticle.getParticle().getMomentum();
|
||||
G4double r_in;
|
||||
G4double r_out;
|
||||
|
||||
@@ -460,7 +460,7 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
|
||||
} else { /// normal case
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
G4LorentzConvertor dummy_convertor;
|
||||
|
||||
dummy_convertor.setBullet(pmom, pmass);
|
||||
@@ -509,8 +509,8 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
}
|
||||
|
||||
if (cparticle.getParticle().pion()) { /// absorption possible
|
||||
G4std::vector<G4InuclElementaryParticle> qdeutrons;
|
||||
G4std::vector<G4double> acsecs;
|
||||
std::vector<G4InuclElementaryParticle> qdeutrons;
|
||||
std::vector<G4double> acsecs;
|
||||
G4double tot_abs_csec = 0.0;
|
||||
G4double abs_sec;
|
||||
G4double vol = pow(zone_radii[zone], 3);
|
||||
@@ -650,14 +650,14 @@ partners G4BertiniNucleiModel::generateInteractionPartners(G4CascadParticle& cpa
|
||||
return thePartners;
|
||||
}
|
||||
|
||||
G4std::vector<G4CascadParticle> G4BertiniNucleiModel::generateParticleFate(G4CascadParticle& cparticle,
|
||||
std::vector<G4CascadParticle> G4BertiniNucleiModel::generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BertiniNucleiModel::generateParticleFate" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4CascadParticle> outgouing_cparticles;
|
||||
std::vector<G4CascadParticle> outgouing_cparticles;
|
||||
|
||||
partners thePartners = generateInteractionPartners(cparticle);
|
||||
|
||||
@@ -682,7 +682,7 @@ G4std::vector<G4CascadParticle> G4BertiniNucleiModel::generateParticleFate(G4Cas
|
||||
|
||||
} else { /// there are possible interactions
|
||||
|
||||
G4std::vector<G4double> old_position = cparticle.getPosition();
|
||||
std::vector<G4double> old_position = cparticle.getPosition();
|
||||
G4InuclElementaryParticle bullet = cparticle.getParticle();
|
||||
G4bool no_interaction = true;
|
||||
G4int zone = cparticle.getCurrentZone();
|
||||
@@ -705,13 +705,13 @@ G4std::vector<G4CascadParticle> G4BertiniNucleiModel::generateParticleFate(G4Cas
|
||||
output.printCollisionOutput();
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> outgoing_particles =
|
||||
std::vector<G4InuclElementaryParticle> outgoing_particles =
|
||||
|
||||
output.getOutgoingParticles();
|
||||
if(passFermi(outgoing_particles, zone)) { /// interaction
|
||||
cparticle.propagateAlongThePath(thePartners[i].second);
|
||||
|
||||
G4std::vector<G4double> new_position = cparticle.getPosition();
|
||||
std::vector<G4double> new_position = cparticle.getPosition();
|
||||
|
||||
for (G4int ip = 0; ip < G4int(outgoing_particles.size()); ip++)
|
||||
outgouing_cparticles.push_back(G4CascadParticle(outgoing_particles[ip],
|
||||
@@ -783,7 +783,7 @@ G4std::vector<G4CascadParticle> G4BertiniNucleiModel::generateParticleFate(G4Cas
|
||||
return outgouing_cparticles;
|
||||
}
|
||||
|
||||
G4bool G4BertiniNucleiModel::passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4bool G4BertiniNucleiModel::passFermi(const std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone) {
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4BertiniNucleiModel::passFermi" << G4endl;
|
||||
@@ -825,8 +825,8 @@ void G4BertiniNucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
|
||||
} else {
|
||||
|
||||
G4std::vector<G4double> mom = cparticle.getMomentum();
|
||||
G4std::vector<G4double> pos = cparticle.getPosition();
|
||||
std::vector<G4double> mom = cparticle.getMomentum();
|
||||
std::vector<G4double> pos = cparticle.getPosition();
|
||||
G4int type = cparticle.getParticle().type();
|
||||
G4double pr = 0.0;
|
||||
G4double r = 0.0;
|
||||
@@ -926,7 +926,7 @@ G4CascadParticle G4BertiniNucleiModel::initializeCascad(G4InuclElementaryParticl
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = nuclei_radius * s1;
|
||||
G4std::vector<G4double> pos(3);
|
||||
std::vector<G4double> pos(3);
|
||||
pos[0] = rz * cos(phi);
|
||||
pos[1] = rz * sin(phi);
|
||||
pos[2] = -nuclei_radius * sqrt(1.0 - s1 * s1);
|
||||
@@ -940,7 +940,7 @@ G4CascadParticle G4BertiniNucleiModel::initializeCascad(G4InuclElementaryParticl
|
||||
return cpart;
|
||||
}
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4InuclNuclei* target) {
|
||||
|
||||
@@ -960,8 +960,8 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
const G4double s4max = 7.0;
|
||||
const G4int itry_max = 100;
|
||||
|
||||
G4std::vector<G4CascadParticle> casparticles;
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4CascadParticle> casparticles;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
|
||||
|
||||
G4double ab = bullet->getA();
|
||||
@@ -983,14 +983,14 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
if (itryg > 0) particles.resize(0);
|
||||
|
||||
|
||||
G4std::vector<G4std::vector<G4double> > coordinates; /// nucleons coordinates in nuclei rest frame
|
||||
G4std::vector<G4std::vector<G4double> > momentums;
|
||||
std::vector<std::vector<G4double> > coordinates; /// nucleons coordinates in nuclei rest frame
|
||||
std::vector<std::vector<G4double> > momentums;
|
||||
|
||||
if (ab < 3.0) { /// deutron, simplest case
|
||||
G4double r = 2.214 - 3.4208 * log(1.0 - 0.981 * inuclRndm());
|
||||
G4double s = 2.0 * inuclRndm() - 1.0;
|
||||
G4double r1 = r * sqrt(1.0 - s * s);
|
||||
G4std::vector<G4double> coord1(3);
|
||||
std::vector<G4double> coord1(3);
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = r1 * cos(phi);
|
||||
coord1[1] = r1 * sin(phi);
|
||||
@@ -1026,8 +1026,8 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4cout << " p nuc " << p << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = p * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
@@ -1041,7 +1041,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
} else {
|
||||
G4int ia = G4int(ab + 0.5);
|
||||
G4std::vector<G4double> coord1(3);
|
||||
std::vector<G4double> coord1(3);
|
||||
G4bool badco = true;
|
||||
G4int itry = 0;
|
||||
|
||||
@@ -1068,7 +1068,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if (sqrt(s) * exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * sqrt(s);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
@@ -1156,7 +1156,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if (sqrt(s) * exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * sqrt(s);
|
||||
G4std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
@@ -1227,14 +1227,14 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4cout << " can not generate the nucleons coordinates for a " << ab <<
|
||||
G4endl;
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
|
||||
} else { /// momentums
|
||||
G4double p;
|
||||
G4double u;
|
||||
G4double x;
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
/// G4bool badp = True;
|
||||
G4int i(0);
|
||||
|
||||
@@ -1248,7 +1248,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if (x > inuclRndm()) {
|
||||
p = sqrt(0.01953 * u);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double pt = p * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
mom[1] = pt * cos(phi);
|
||||
@@ -1263,7 +1263,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
if (itry == itry_max) {
|
||||
G4cout << " can not generate proper momentum for a " << ab << G4endl;
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
};
|
||||
};
|
||||
@@ -1292,7 +1292,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = (nuclei_radius + rb) * s1;
|
||||
G4std::vector<double> global_pos(3);
|
||||
std::vector<double> global_pos(3);
|
||||
global_pos[0] = rz * cos(phi);
|
||||
global_pos[1] = rz * sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * sqrt(1.0 - s1 * s1);
|
||||
@@ -1304,7 +1304,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
};
|
||||
|
||||
/// all nucleons at rest
|
||||
G4std::vector<G4InuclElementaryParticle> raw_particles;
|
||||
std::vector<G4InuclElementaryParticle> raw_particles;
|
||||
G4int ia = G4int(ab + 0.5);
|
||||
G4int iz = G4int(zb + 0.5);
|
||||
|
||||
@@ -1325,7 +1325,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
particleIterator ipart;
|
||||
|
||||
for (ipart = raw_particles.begin(); ipart != raw_particles.end(); ipart++) {
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
toTheBulletRestFrame.backToTheLab(ipart->getMomentum());
|
||||
|
||||
ipart->setMomentum(mom);
|
||||
@@ -1333,7 +1333,7 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
/// fill cascad particles and outgoing particles
|
||||
for (G4int ip = 0; ip < G4int(raw_particles.size()); ip++) {
|
||||
G4std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
G4double pmod = sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double t0 = -(mom[1] * coordinates[ip][0] + mom[2] * coordinates[ip][1] +
|
||||
mom[3] * coordinates[ip][2]) / pmod;
|
||||
@@ -1407,6 +1407,6 @@ G4BertiniNucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
particles[ip].printParticle();
|
||||
}
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
}
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 "G4BertiniRegionModel.hh"
|
||||
|
||||
const G4double G4BertiniRegionModel::radius0 = 1.0E-15;
|
||||
const G4double G4BertiniRegionModel::BE = 7;
|
||||
|
||||
G4BertiniRegionModel::G4BertiniRegionModel(const G4int numberOfLayers, const G4int A, const G4int Z)
|
||||
{
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass();
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
G4BertiniRegionModel::~G4BertiniRegionModel(){}
|
||||
|
||||
/*
|
||||
void G4BertiniRegionModel::Init(const G4int numberOfLayers, const G4int A, const G4int Z){
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass()/MeV;
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass()/MeV ;
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
G4double G4BertiniRegionModel::GetDensity(G4double r){
|
||||
iterator j=density.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4double G4BertiniRegionModel::GetPotentialEnergy(G4double r, G4int particle){
|
||||
if(particle == 0){ //proton
|
||||
iterator j=protonPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(particle == 1){ //neutron
|
||||
iterator j=neutronPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4double G4BertiniRegionModel::GetMaximumNucleonMomentum(G4double r,
|
||||
G4int nucleon){
|
||||
|
||||
if(nucleon == 0){
|
||||
iterator j=protonFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if(nucleon==1){
|
||||
iterator j=neutronFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
G4Exception("G4BertiniRegionModel::GetMaximumNucleonMomentum - return value undefined");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double G4BertiniRegionModel::GetFermiMomentum(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
return sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
|
||||
|
||||
}
|
||||
|
||||
G4double G4BertiniRegionModel::GetFermiEnergy(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
//G4double hbar = 1.0E-6;
|
||||
return (pow(hbar_Planck,2)/(2*aMass)*pow((3*pi2*aDensity),2/3));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
#include "G4InuclNuclei.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4BigBanger::G4BigBanger()
|
||||
: verboseLevel(1) {
|
||||
@@ -47,14 +47,14 @@ G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
const G4double small_ekin = 1.0e-6;
|
||||
|
||||
G4CollisionOutput output;
|
||||
G4std::vector<G4double> totscm;
|
||||
G4std::vector<G4double> totlab;
|
||||
std::vector<G4double> totscm;
|
||||
std::vector<G4double> totlab;
|
||||
|
||||
if(G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
G4InuclElementaryParticle dummy(small_ekin, 1);
|
||||
G4LorentzConvertor toTheNucleiSystemRestFrame;
|
||||
@@ -72,7 +72,7 @@ G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
etot << " nm " << nuclei_target->getMass() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
std::vector<G4InuclElementaryParticle> particles =
|
||||
generateBangInSCM(etot, A, Z, dummy.getParticleMass(1), dummy.getParticleMass(2));
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
@@ -82,18 +82,18 @@ G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
}
|
||||
if(!particles.empty()) { // convert back to Lab
|
||||
if (verboseLevel > 2) {
|
||||
G4std::vector<G4double> totscm(4, 0.0);
|
||||
G4std::vector<G4double> totlab(4, 0.0);
|
||||
std::vector<G4double> totscm(4, 0.0);
|
||||
std::vector<G4double> totlab(4, 0.0);
|
||||
}
|
||||
particleIterator ipart;
|
||||
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
if (verboseLevel > 2) {
|
||||
G4std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
|
||||
for(G4int i = 0; i < 4; i++) totscm[i] += mom_scm[i];
|
||||
}
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(ipart->getMomentum());
|
||||
ipart->setMomentum(mom);
|
||||
|
||||
@@ -102,7 +102,7 @@ G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
for(G4int i = 0; i < 4; i++) totlab[i] += mom[i];
|
||||
}
|
||||
};
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " In SCM: total outgoing momentum " << G4endl
|
||||
<< " E " << totscm[0] << " px " << totscm[1]
|
||||
@@ -123,7 +123,7 @@ G4CollisionOutput G4BigBanger::collide(G4InuclParticle* bullet,
|
||||
return output;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle>
|
||||
std::vector<G4InuclElementaryParticle>
|
||||
G4BigBanger::generateBangInSCM(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
@@ -143,14 +143,14 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
if (verboseLevel > 2) {
|
||||
G4cout << " ia " << ia << " iz " << iz << G4endl;
|
||||
}
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
|
||||
if(ia == 1) {
|
||||
// abnormal situation
|
||||
G4double m = iz > 0 ? mp : mn;
|
||||
G4double pmod = sqrt((etot + 2.0 * m) * etot);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod * COS_SIN.second;
|
||||
|
||||
@@ -165,18 +165,18 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
return particles;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> pmod = generateMomentumModules(etot, a, z, mp, mn);
|
||||
std::vector<G4double> pmod = generateMomentumModules(etot, a, z, mp, mn);
|
||||
G4bool bad = true;
|
||||
G4int itry = 0;
|
||||
|
||||
while(bad && itry < itry_max) {
|
||||
itry++;
|
||||
G4std::vector<G4std::vector<G4double> > scm_momentums;
|
||||
G4std::vector<G4double> tot_mom(4);
|
||||
std::vector<std::vector<G4double> > scm_momentums;
|
||||
std::vector<G4double> tot_mom(4);
|
||||
|
||||
if(ia == 2) {
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
double FI = randomPHI();
|
||||
double Pt = pmod[0] * COS_SIN.second;
|
||||
|
||||
@@ -188,7 +188,7 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
|
||||
scm_momentums.push_back(mom);
|
||||
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
|
||||
for(G4int i = 1; i < 4; i++) mom1[i] = - mom[i];
|
||||
|
||||
@@ -197,8 +197,8 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
}
|
||||
else {
|
||||
for(G4int i = 0; i < ia - 2; i++) {
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double Pt = pmod[i] * COS_SIN.second;
|
||||
|
||||
@@ -223,19 +223,19 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
}
|
||||
|
||||
if(fabs(ct) < ang_cut) {
|
||||
G4std::vector<G4double> mom2 = generateWithFixedTheta(ct, pmod[ia - 2]);
|
||||
std::vector<G4double> mom2 = generateWithFixedTheta(ct, pmod[ia - 2]);
|
||||
// rotate to the normal system
|
||||
G4std::vector<G4double> apr = tot_mom;
|
||||
std::vector<G4double> apr = tot_mom;
|
||||
G4int i;
|
||||
for(i = 1; i < 4; i++) apr[i] /= tot_mod;
|
||||
G4double a_tr = sqrt(apr[1] * apr[1] + apr[2] * apr[2]);
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
mom[1] = mom2[3] * apr[1] + ( mom2[1] * apr[2] + mom2[2] * apr[3] * apr[1]) / a_tr; // ::: replace with clhep tools?
|
||||
mom[2] = mom2[3] * apr[2] + (-mom2[1] * apr[1] + mom2[2] * apr[3] * apr[2]) / a_tr;
|
||||
mom[3] = mom2[3] * apr[3] - mom2[2] * a_tr;
|
||||
scm_momentums.push_back(mom);
|
||||
// and the last one
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
for(i = 1; i < 4; i++) mom1[i] = - mom[i] - tot_mom[i];
|
||||
scm_momentums.push_back(mom1);
|
||||
bad = false;
|
||||
@@ -257,7 +257,7 @@ G4BigBanger::generateBangInSCM(G4double etot,
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4BigBanger::generateMomentumModules(G4double etot,
|
||||
std::vector<G4double> G4BigBanger::generateMomentumModules(G4double etot,
|
||||
G4double a,
|
||||
G4double z,
|
||||
G4double mp,
|
||||
@@ -270,7 +270,7 @@ G4std::vector<G4double> G4BigBanger::generateMomentumModules(G4double etot,
|
||||
|
||||
G4int ia = int(a + 0.1);
|
||||
G4int iz = int(z + 0.1);
|
||||
G4std::vector<G4double> pmod;
|
||||
std::vector<G4double> pmod;
|
||||
G4double xtot = 0.0;
|
||||
G4double promax = maxProbability(a);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ G4double G4CascadParticle::getPathToTheNextZone(G4double rz_in,
|
||||
G4double rp = 0.0;
|
||||
G4double rr = 0.0;
|
||||
G4double pp = 0.0;
|
||||
G4std::vector<G4double> mom = theParticle.getMomentum();
|
||||
std::vector<G4double> mom = theParticle.getMomentum();
|
||||
|
||||
for (G4int i = 1; i < 4; i++) {
|
||||
rp += mom[i] * position[i - 1];
|
||||
@@ -87,7 +87,7 @@ void G4CascadParticle::propagateAlongThePath(G4double path) {
|
||||
G4cout << " >>> G4CascadParticle::propagateAlongThePath" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom = theParticle.getMomentum();
|
||||
std::vector<G4double> mom = theParticle.getMomentum();
|
||||
G4double pmod = theParticle.getMomModule();
|
||||
|
||||
for(G4int i = 0; i < 3; i++) position[i] += mom[i + 1] * path / pmod;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "G4CascadSpecialFunctions.hh"
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale2(G4double e) {
|
||||
std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale2(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -48,10 +48,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
return std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale1(G4double e) {
|
||||
std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale1(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -92,7 +92,7 @@ G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScale1
|
||||
G4cout << " e " << e << " ik " << ik << " sk " << sk << G4endl;
|
||||
}
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
return std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4double G4CascadSpecialFunctions::absorptionCrosSection(G4double e,
|
||||
@@ -122,7 +122,7 @@ G4double G4CascadSpecialFunctions::absorptionCrosSection(G4double e,
|
||||
return corr_fac * csec;
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScaleEMS(G4double e) {
|
||||
std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScaleEMS(G4double e) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -162,7 +162,7 @@ G4std::pair<G4int, G4double> G4CascadSpecialFunctions::getPositionInEnergyScaleE
|
||||
sk = 1.0;
|
||||
};
|
||||
|
||||
return G4std::pair<G4int, G4double>(ik, sk);
|
||||
return std::pair<G4int, G4double>(ik, sk);
|
||||
}
|
||||
|
||||
G4double G4CascadSpecialFunctions::crossSection(G4double e,
|
||||
@@ -347,7 +347,7 @@ G4double G4CascadSpecialFunctions::crossSection(G4double e,
|
||||
};
|
||||
|
||||
} else {
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScaleEMS(e);
|
||||
std::pair<G4int, G4double> iksk = getPositionInEnergyScaleEMS(e);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
|
||||
@@ -363,7 +363,7 @@ G4double G4CascadSpecialFunctions::crossSection(G4double e,
|
||||
};
|
||||
|
||||
} else {
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(e);
|
||||
std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(e);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
#include "G4LorentzRotation.hh"
|
||||
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef G4std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
|
||||
G4CascadeInterface::G4CascadeInterface()
|
||||
:verboseLevel(0) {
|
||||
@@ -106,7 +106,7 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
toZ.rotateY(-projectileMomentum.theta());
|
||||
G4LorentzRotation toLabFrame = toZ.inverse();
|
||||
|
||||
G4std::vector<G4double> momentumBullet(4);
|
||||
std::vector<G4double> momentumBullet(4);
|
||||
momentumBullet[0] =0.;
|
||||
momentumBullet[1] =0;
|
||||
momentumBullet[2] =0;
|
||||
@@ -123,7 +123,7 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
G4InuclNuclei* target = NULL;
|
||||
G4InuclParticle* targetH = NULL;
|
||||
|
||||
G4std::vector<G4double> targetMomentum(4, 0.0);
|
||||
std::vector<G4double> targetMomentum(4, 0.0);
|
||||
|
||||
G4double theNucleusA = theNucleus.GetN();
|
||||
|
||||
@@ -135,9 +135,9 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
theNucleus.GetZ());
|
||||
target->setEnergy();
|
||||
|
||||
G4std::vector<G4double> bmom = bullet->getMomentum();
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
G4std::vector<G4double> tmom = target->getMomentum();
|
||||
std::vector<G4double> tmom = target->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
sumBaryon += theNucleusA;
|
||||
@@ -177,9 +177,9 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
|
||||
sumBaryon += 1;
|
||||
|
||||
G4std::vector<G4double> bmom = bullet->getMomentum();
|
||||
std::vector<G4double> bmom = bullet->getMomentum();
|
||||
eInit = sqrt(bmom[0] * bmom[0]);
|
||||
G4std::vector<G4double> tmom = targetH->getMomentum();
|
||||
std::vector<G4double> tmom = targetH->getMomentum();
|
||||
eInit += sqrt(tmom[0] * tmom[0]);
|
||||
|
||||
if (verboseLevel > 2) {
|
||||
@@ -206,8 +206,8 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
|
||||
// Convert cascade data to use hadronics interface
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
|
||||
G4std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
std::vector<G4InuclNuclei> nucleiFragments = output.getNucleiFragments();
|
||||
std::vector<G4InuclElementaryParticle> particles = output.getOutgoingParticles();
|
||||
|
||||
G4int numSecondaries = nucleiFragments.size()+particles.size();
|
||||
theResult.SetStatusChange(fStopAndKill);
|
||||
@@ -219,7 +219,7 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
|
||||
for (ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
outgoingParticle = ipart->type();
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
std::vector<G4double> mom = ipart->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4double ekin = ipart->getKineticEnergy() * GeV;
|
||||
@@ -305,7 +305,7 @@ G4VParticleChange* G4CascadeInterface::ApplyYourself(const G4Track& aTrack,
|
||||
for (ifrag = nucleiFragments.begin(); ifrag != nucleiFragments.end(); ifrag++)
|
||||
{
|
||||
G4double eKin = ifrag->getKineticEnergy() * GeV;
|
||||
G4std::vector<G4double> mom = ifrag->getMomentum();
|
||||
std::vector<G4double> mom = ifrag->getMomentum();
|
||||
eTot += sqrt(mom[0] * mom[0]);
|
||||
|
||||
G4ThreeVector aMom(mom[1], mom[2], mom[3]);
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
|
||||
#include "G4CollisionOutput.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4CollisionOutput::G4CollisionOutput()
|
||||
: verboseLevel(0) {
|
||||
@@ -45,14 +45,14 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
on_shell = false;
|
||||
|
||||
G4std::vector<G4double> ini_mom = bullet->getMomentum();
|
||||
G4std::vector<G4double> momt = target->getMomentum();
|
||||
std::vector<G4double> ini_mom = bullet->getMomentum();
|
||||
std::vector<G4double> momt = target->getMomentum();
|
||||
|
||||
G4int i;
|
||||
for(i = 0; i < 4; i++) ini_mom[i] += momt[i];
|
||||
|
||||
G4std::vector<G4double> out_mom = getTotalOutputMomentum();
|
||||
G4std::vector<G4double> mon_non_cons(4);
|
||||
std::vector<G4double> out_mom = getTotalOutputMomentum();
|
||||
std::vector<G4double> mon_non_cons(4);
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " bullet momentum = " << ini_mom[0]<<", "<< ini_mom[1]<<", "<< ini_mom[2]<<", "<< ini_mom[3]<<G4endl;
|
||||
G4cout << " target momentum = " << momt[0]<<", "<< momt[1]<<", "<< momt[2]<<", "<< momt[3]<<G4endl;
|
||||
@@ -80,7 +80,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
if(npart > 0) {
|
||||
|
||||
G4std::vector<G4double> last_mom = outgoingParticles[npart - 1].getMomentum();
|
||||
std::vector<G4double> last_mom = outgoingParticles[npart - 1].getMomentum();
|
||||
|
||||
for(G4int i = 1; i < 4; i++) last_mom[i] += mon_non_cons[i];
|
||||
outgoingParticles[npart - 1].setMomentum(last_mom);
|
||||
@@ -91,7 +91,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
if(nnuc > 0) {
|
||||
|
||||
G4std::vector<G4double> last_mom = nucleiFragments[nnuc - 1].getMomentum();
|
||||
std::vector<G4double> last_mom = nucleiFragments[nnuc - 1].getMomentum();
|
||||
|
||||
for(G4int i = 1; i < 4; i++) last_mom[i] += mon_non_cons[i];
|
||||
nucleiFragments[nnuc - 1].setMomentum(last_mom);
|
||||
@@ -130,8 +130,8 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
if(need_hard_tuning) {
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> tune_par = selectPairToTune(mon_non_cons[0]);
|
||||
G4std::pair<G4int, G4int> tune_particles = tune_par.first;
|
||||
std::pair<std::pair<G4int, G4int>, G4int> tune_par = selectPairToTune(mon_non_cons[0]);
|
||||
std::pair<G4int, G4int> tune_particles = tune_par.first;
|
||||
G4int mom_ind = tune_par.second;
|
||||
|
||||
if(verboseLevel > 2) {
|
||||
@@ -141,8 +141,8 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
if(tune_particles.first >= 0 && tune_particles.second >= 0 &&
|
||||
mom_ind >= 1) { // tunning possible
|
||||
|
||||
G4std::vector<G4double> mom1 = outgoingParticles[tune_particles.first].getMomentum();
|
||||
G4std::vector<G4double> mom2 = outgoingParticles[tune_particles.second].getMomentum();
|
||||
std::vector<G4double> mom1 = outgoingParticles[tune_particles.first].getMomentum();
|
||||
std::vector<G4double> mom2 = outgoingParticles[tune_particles.second].getMomentum();
|
||||
G4double newE12 = mom1[0] + mom2[0] + mon_non_cons[0];
|
||||
G4double R = 0.5 * (newE12 * newE12 + mom2[0] * mom2[0] - mom1[0] * mom1[0]) / newE12;
|
||||
G4double Q = -(mom1[mom_ind] + mom2[mom_ind]) / newE12;
|
||||
@@ -193,7 +193,7 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
outgoingParticles[tune_particles.first ].setMomentum(mom1);
|
||||
outgoingParticles[tune_particles.second].setMomentum(mom2);
|
||||
out_mom = getTotalOutputMomentum();
|
||||
G4std::sort(outgoingParticles.begin(), outgoingParticles.end(), G4ParticleLargerEkin());
|
||||
std::sort(outgoingParticles.begin(), outgoingParticles.end(), G4ParticleLargerEkin());
|
||||
for(G4int i = 0; i < 4; i++) mon_non_cons[i] = ini_mom[i] - out_mom[i];
|
||||
pnc = sqrt(mon_non_cons[1] * mon_non_cons[1] +
|
||||
mon_non_cons[2] * mon_non_cons[2] +
|
||||
@@ -232,15 +232,15 @@ void G4CollisionOutput::setOnShell(G4InuclParticle* bullet,
|
||||
|
||||
}
|
||||
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTune(G4double de) const {
|
||||
std::pair<std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTune(G4double de) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4CollisionOutput::selectPairToTune" << G4endl;
|
||||
}
|
||||
|
||||
G4std::pair<G4int, G4int> tup(-1, -1);
|
||||
std::pair<G4int, G4int> tup(-1, -1);
|
||||
G4int i3 = -1;
|
||||
G4std::pair<G4std::pair<G4int, G4int>, G4int> badp(tup, i3);
|
||||
std::pair<std::pair<G4int, G4int>, G4int> badp(tup, i3);
|
||||
|
||||
if(outgoingParticles.size() < 2) {
|
||||
|
||||
@@ -257,11 +257,11 @@ G4std::pair<G4std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTun
|
||||
|
||||
for(G4int i = 0; i < G4int(outgoingParticles.size()) - 1; i++) {
|
||||
|
||||
G4std::vector<G4double> mom1 = outgoingParticles[i].getMomentum();
|
||||
std::vector<G4double> mom1 = outgoingParticles[i].getMomentum();
|
||||
|
||||
for(G4int j = i+1; j < G4int(outgoingParticles.size()); j++) {
|
||||
|
||||
G4std::vector<G4double> mom2 = outgoingParticles[j].getMomentum();
|
||||
std::vector<G4double> mom2 = outgoingParticles[j].getMomentum();
|
||||
|
||||
for(G4int l = 1; l < 4; l++) {
|
||||
if(mom1[l] * mom2[l] < 0.0) {
|
||||
@@ -304,7 +304,7 @@ G4std::pair<G4std::pair<G4int, G4int>, G4int> G4CollisionOutput::selectPairToTun
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4std::pair<G4int, G4int>, G4int>(tup, i3);
|
||||
return std::pair<std::pair<G4int, G4int>, G4int>(tup, i3);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
+55
-55
@@ -23,9 +23,9 @@
|
||||
#include "G4Collider.hh"
|
||||
#include "G4ElementaryParticleCollider.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4ElementaryParticleCollider::G4ElementaryParticleCollider()
|
||||
: verboseLevel(1) {
|
||||
@@ -43,8 +43,8 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
G4cout << " >>> G4ElementaryParticleCollider::collide" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> totscm(4, 0.0); //::: fix
|
||||
G4std::vector<G4double> totlab(4, 0.0);
|
||||
std::vector<G4double> totscm(4, 0.0); //::: fix
|
||||
std::vector<G4double> totlab(4, 0.0);
|
||||
|
||||
// generate nucleon or pion collission with NUCLEON
|
||||
// or pion with quasideutron
|
||||
@@ -70,8 +70,8 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
particle1->printParticle();
|
||||
particle2->printParticle();
|
||||
|
||||
G4std::vector<G4double> momb = particle1->getMomentum();
|
||||
G4std::vector<G4double> momt = particle2->getMomentum();
|
||||
std::vector<G4double> momb = particle1->getMomentum();
|
||||
std::vector<G4double> momt = particle2->getMomentum();
|
||||
|
||||
for(G4int i = 0; i < 4; i++) momb[i] += momt[i];
|
||||
G4cout << " total input: px " << momb[1] << " py " << momb[2]
|
||||
@@ -102,7 +102,7 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
pscm << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
std::vector<G4InuclElementaryParticle> particles =
|
||||
generateSCMfinalState(ekin, etot_scm, pscm, particle1, particle2, &convertToSCM);
|
||||
|
||||
if(verboseLevel > 2){
|
||||
@@ -120,7 +120,7 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
G4cout << mom_scm[0] << " " << mom_scm[1] << " "
|
||||
<< mom_scm[2] << " " << mom_scm[3] << G4endl;
|
||||
|
||||
@@ -131,7 +131,7 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
convertToSCM.backToTheLab(ipart->getMomentum());
|
||||
|
||||
if(verboseLevel > 2){
|
||||
@@ -141,7 +141,7 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
ipart->setMomentum(mom);
|
||||
};
|
||||
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " In SCM: total outgoing momentum " << G4endl
|
||||
@@ -180,7 +180,7 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
G4cout << " etot_scm " << etot_scm << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
std::vector<G4InuclElementaryParticle> particles =
|
||||
generateSCMpionAbsorption(etot_scm, particle1, particle2);
|
||||
|
||||
if(verboseLevel > 2){
|
||||
@@ -197,19 +197,19 @@ G4CollisionOutput G4ElementaryParticleCollider::collide(G4InuclParticle* bullet
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
std::vector<G4double> mom_scm = ipart->getMomentum();
|
||||
|
||||
for(G4int i = 0; i < 4; i++) totscm[i] += mom_scm[i];
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
convertToSCM.backToTheLab(ipart->getMomentum());
|
||||
|
||||
ipart->setMomentum(mom);
|
||||
};
|
||||
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
|
||||
if(verboseLevel > 2){
|
||||
G4cout << " In SCM: total outgoing momentum " << G4endl
|
||||
@@ -350,7 +350,7 @@ G4int G4ElementaryParticleCollider::generateMultiplicity(G4int is,
|
||||
};
|
||||
|
||||
const G4double large_cut = 4.0;
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(ekin);
|
||||
std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(ekin);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
G4int l = is;
|
||||
@@ -359,7 +359,7 @@ G4int G4ElementaryParticleCollider::generateMultiplicity(G4int is,
|
||||
if (l == 10) l = 3;
|
||||
if (l == 5 || l == 6) l = 4;
|
||||
|
||||
G4std::vector<G4double> sigm(5);
|
||||
std::vector<G4double> sigm(5);
|
||||
G4double stot = 0.0;
|
||||
|
||||
if (l == 7 || l == 14) { // pi0 P or pi0 N
|
||||
@@ -404,7 +404,7 @@ G4int G4ElementaryParticleCollider::generateMultiplicity(G4int is,
|
||||
return mul + 2;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> G4ElementaryParticleCollider::
|
||||
std::vector<G4InuclElementaryParticle> G4ElementaryParticleCollider::
|
||||
generateSCMfinalState(G4double ekin,
|
||||
G4double etot_scm,
|
||||
G4double pscm,
|
||||
@@ -420,8 +420,8 @@ generateSCMfinalState(G4double ekin,
|
||||
const G4double difr_const = 0.3678794;
|
||||
const G4int itry_max = 10;
|
||||
G4InuclElementaryParticle dummy;
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
G4std::vector<G4int> particle_kinds;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4int> particle_kinds;
|
||||
G4int type1 = particle1->type();
|
||||
G4int type2 = particle2->type();
|
||||
G4int is = type1 * type2;
|
||||
@@ -487,7 +487,7 @@ generateSCMfinalState(G4double ekin,
|
||||
particle_kinds.push_back(type2);
|
||||
};
|
||||
|
||||
G4std::vector<G4double> mom;
|
||||
std::vector<G4double> mom;
|
||||
|
||||
if (kw == 2) { // need to rescale momentum
|
||||
G4double m1 = dummy.getParticleMass(particle_kinds[0]);
|
||||
@@ -514,7 +514,7 @@ generateSCMfinalState(G4double ekin,
|
||||
G4cout << " after rotation px " << mom[1] << " py " << mom[2] <<
|
||||
" pz " << mom[3] << G4endl;
|
||||
}
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom1[i] = -mom[i];
|
||||
|
||||
@@ -542,13 +542,13 @@ generateSCMfinalState(G4double ekin,
|
||||
G4cout << " itry in while " << itry << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> modules =
|
||||
std::vector<G4double> modules =
|
||||
generateMomModules(particle_kinds, multiplicity, is, ekin, etot_scm);
|
||||
|
||||
if (G4int(modules.size()) == multiplicity) {
|
||||
|
||||
if (multiplicity == 3) {
|
||||
G4std::vector<G4double> mom3 =
|
||||
std::vector<G4double> mom3 =
|
||||
particleSCMmomentumFor2to3(is, knd_last, ekin, modules[2]);
|
||||
|
||||
mom3 = toSCM->rotate(mom3);
|
||||
@@ -565,11 +565,11 @@ generateSCMfinalState(G4double ekin,
|
||||
G4cout << " ok for mult " << multiplicity << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom1 = generateWithFixedTheta(ct, modules[0]);
|
||||
std::vector<G4double> mom1 = generateWithFixedTheta(ct, modules[0]);
|
||||
|
||||
mom1 = toSCM->rotate(mom3, mom1);
|
||||
|
||||
G4std::vector<G4double> mom2(4);
|
||||
std::vector<G4double> mom2(4);
|
||||
|
||||
for(G4int i = 1; i < 4; i++) mom2[i] = - (mom3[i] + mom1[i]);
|
||||
|
||||
@@ -584,8 +584,8 @@ generateSCMfinalState(G4double ekin,
|
||||
} else { // multiplicity > 3
|
||||
|
||||
// generate first mult - 2 momentums
|
||||
G4std::vector<G4std::vector<G4double> > scm_momentums;
|
||||
G4std::vector<G4double> tot_mom(4);
|
||||
std::vector<std::vector<G4double> > scm_momentums;
|
||||
std::vector<G4double> tot_mom(4);
|
||||
|
||||
for (G4int i = 0; i < multiplicity - 2; i++) {
|
||||
G4double p0 = particle_kinds[i] < 3 ? 0.36 : 0.25;
|
||||
@@ -628,7 +628,7 @@ generateSCMfinalState(G4double ekin,
|
||||
G4double pt = modules[i]*st;
|
||||
G4double phi = randomPHI();
|
||||
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
@@ -659,14 +659,14 @@ generateSCMfinalState(G4double ekin,
|
||||
|
||||
tot_mom = toSCM->rotate(tot_mom);
|
||||
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
generateWithFixedTheta(ct, modules[multiplicity - 2]);
|
||||
|
||||
mom = toSCM->rotate(tot_mom, mom);
|
||||
scm_momentums.push_back(mom);
|
||||
|
||||
// and the last one
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
|
||||
for (i = 1; i < 4; i++) mom1[i] = -mom[i] - tot_mom[i];
|
||||
|
||||
@@ -705,9 +705,9 @@ generateSCMfinalState(G4double ekin,
|
||||
return particles;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4ElementaryParticleCollider::
|
||||
std::vector<G4double> G4ElementaryParticleCollider::
|
||||
generateMomModules(
|
||||
const G4std::vector<G4int>& kinds,
|
||||
const std::vector<G4int>& kinds,
|
||||
G4int mult,
|
||||
G4int is,
|
||||
G4double ekin,
|
||||
@@ -727,8 +727,8 @@ generateMomModules(
|
||||
G4InuclElementaryParticle dummy;
|
||||
G4int itry = 0;
|
||||
|
||||
G4std::vector<G4double> modules(mult);
|
||||
G4std::vector<G4double> masses2(mult);
|
||||
std::vector<G4double> modules(mult);
|
||||
std::vector<G4double> masses2(mult);
|
||||
|
||||
for (G4int i = 0; i < mult; i++) {
|
||||
G4double mass = dummy.getParticleMass(kinds[i]);
|
||||
@@ -801,7 +801,7 @@ generateMomModules(
|
||||
}
|
||||
|
||||
G4bool G4ElementaryParticleCollider::satisfyTriangle(
|
||||
const G4std::vector<G4double>& modules) const {
|
||||
const std::vector<G4double>& modules) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4ElementaryParticleCollider::satisfyTriangle" << G4endl;
|
||||
@@ -852,7 +852,7 @@ G4int G4ElementaryParticleCollider::getIL(G4int is,
|
||||
return ifdef[mult - 3][l - 1];
|
||||
}
|
||||
|
||||
G4std::vector<G4int> G4ElementaryParticleCollider::
|
||||
std::vector<G4int> G4ElementaryParticleCollider::
|
||||
generateOutgoingKindsFor2toMany(
|
||||
G4int is,
|
||||
G4int mult,
|
||||
@@ -1085,7 +1085,7 @@ generateOutgoingKindsFor2toMany(
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
};
|
||||
|
||||
G4std::vector<G4int> kinds;
|
||||
std::vector<G4int> kinds;
|
||||
|
||||
G4int l = is;
|
||||
|
||||
@@ -1102,7 +1102,7 @@ generateOutgoingKindsFor2toMany(
|
||||
};
|
||||
|
||||
G4int il = getIL(is, mult);
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScale1(ekin);
|
||||
std::pair<G4int, G4double> iksk = getPositionInEnergyScale1(ekin);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
G4int n;
|
||||
@@ -1130,7 +1130,7 @@ generateOutgoingKindsFor2toMany(
|
||||
n = 13;
|
||||
};
|
||||
|
||||
G4std::vector<G4double> sig;
|
||||
std::vector<G4double> sig;
|
||||
G4double stot = 0.0;
|
||||
|
||||
if(l == 7 || l == 14) {
|
||||
@@ -1303,7 +1303,7 @@ G4double G4ElementaryParticleCollider::getMomModuleFor2toMany(
|
||||
return fabs(PRA);
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4ElementaryParticleCollider::
|
||||
std::vector<G4double> G4ElementaryParticleCollider::
|
||||
particleSCMmomentumFor2to3(
|
||||
G4int is,
|
||||
G4int knd,
|
||||
@@ -1367,7 +1367,7 @@ particleSCMmomentumFor2to3(
|
||||
G4double pt = pmod * sqrt(1.0 - ct * ct);
|
||||
G4double phi = randomPHI();
|
||||
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
@@ -1490,7 +1490,7 @@ G4bool G4ElementaryParticleCollider::reChargering(G4double ekin,
|
||||
G4bool rech = false;
|
||||
|
||||
if (is == 6 || is == 5 || is == 7 || is == 14) {
|
||||
G4std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(ekin);
|
||||
std::pair<G4int, G4double> iksk = getPositionInEnergyScale2(ekin);
|
||||
G4int ik = iksk.first;
|
||||
G4double sk = iksk.second;
|
||||
G4double chrg;
|
||||
@@ -1509,14 +1509,14 @@ G4bool G4ElementaryParticleCollider::reChargering(G4double ekin,
|
||||
return rech;
|
||||
}
|
||||
|
||||
G4std::pair<G4double, G4double> G4ElementaryParticleCollider::
|
||||
std::pair<G4double, G4double> G4ElementaryParticleCollider::
|
||||
adjustIntervalForElastic(
|
||||
G4double ekin,
|
||||
G4double ak,
|
||||
G4double ae,
|
||||
G4int k,
|
||||
G4int l,
|
||||
const G4std::vector<G4double>& ssv,
|
||||
const std::vector<G4double>& ssv,
|
||||
G4double st) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -1645,10 +1645,10 @@ adjustIntervalForElastic(
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(a, b);
|
||||
return std::pair<G4double, G4double>(a, b);
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4ElementaryParticleCollider::
|
||||
std::vector<G4double> G4ElementaryParticleCollider::
|
||||
particleSCMmomentumFor2to2(
|
||||
G4int is,
|
||||
G4int kw,
|
||||
@@ -1727,7 +1727,7 @@ particleSCMmomentumFor2to2(
|
||||
|
||||
G4int k1 = k - 1;
|
||||
// first set all coefficients
|
||||
G4std::vector<G4double> ssv(4);
|
||||
std::vector<G4double> ssv(4);
|
||||
G4double st = 0.0;
|
||||
|
||||
for(G4int i = 0; i < 4; i++) {
|
||||
@@ -1742,7 +1742,7 @@ particleSCMmomentumFor2to2(
|
||||
G4double b = 0.0;
|
||||
|
||||
if(k <= 3) {
|
||||
G4std::pair<G4double, G4double> ab = adjustIntervalForElastic(ekin, ak, ae, k, is, ssv, st);
|
||||
std::pair<G4double, G4double> ab = adjustIntervalForElastic(ekin, ak, ae, k, is, ssv, st);
|
||||
|
||||
a = ab.first;
|
||||
b = ab.second;
|
||||
@@ -1771,7 +1771,7 @@ particleSCMmomentumFor2to2(
|
||||
|
||||
G4double pt = pscm * sqrt(1.0 - ct * ct);
|
||||
G4double phi = randomPHI();
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
mom[1] = pt * cos(phi);
|
||||
mom[2] = pt * sin(phi);
|
||||
@@ -1870,7 +1870,7 @@ G4int G4ElementaryParticleCollider::getElasticCase(G4int is,
|
||||
return k;
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> G4ElementaryParticleCollider::
|
||||
std::vector<G4InuclElementaryParticle> G4ElementaryParticleCollider::
|
||||
generateSCMpionAbsorption(G4double etot_scm,
|
||||
G4InuclElementaryParticle* particle1,
|
||||
G4InuclElementaryParticle* particle2) const {
|
||||
@@ -1883,8 +1883,8 @@ generateSCMpionAbsorption(G4double etot_scm,
|
||||
// the nucleon distribution assumed to be isotropic in SCM
|
||||
|
||||
G4InuclElementaryParticle dummy;
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
G4std::vector<G4int> particle_kinds;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4int> particle_kinds;
|
||||
G4int type1 = particle1->type();
|
||||
G4int type2 = particle2->type();
|
||||
|
||||
@@ -1949,8 +1949,8 @@ generateSCMpionAbsorption(G4double etot_scm,
|
||||
G4double a = 0.5 * (etot_scm * etot_scm - m1 - m2);
|
||||
|
||||
G4double pmod = sqrt((a * a - m1 * m2) / (m1 + m2 + 2.0 * a));
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double pt = pmod * COS_SIN.second;
|
||||
|
||||
@@ -1958,7 +1958,7 @@ generateSCMpionAbsorption(G4double etot_scm,
|
||||
mom[2] = pt * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
|
||||
G4std::vector<G4double> mom1 = mom;
|
||||
std::vector<G4double> mom1 = mom;
|
||||
|
||||
for(G4int i = 1; i < 4; i++) mom1[i] *= -1.0;
|
||||
particles.push_back(G4InuclElementaryParticle(mom , particle_kinds[0]));
|
||||
|
||||
@@ -65,12 +65,12 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
const G4double small_ekin = 1.0e-6;
|
||||
const G4int itry_gam_max = 100;
|
||||
|
||||
G4std::vector<G4double> W(8);
|
||||
G4std::vector<G4double> A1(6);
|
||||
G4std::vector<G4double> Z1(6);
|
||||
G4std::vector<G4double> u(6);
|
||||
G4std::vector<G4double> V(6);
|
||||
G4std::vector<G4double> TM(6);
|
||||
std::vector<G4double> W(8);
|
||||
std::vector<G4double> A1(6);
|
||||
std::vector<G4double> Z1(6);
|
||||
std::vector<G4double> u(6);
|
||||
std::vector<G4double> V(6);
|
||||
std::vector<G4double> TM(6);
|
||||
|
||||
G4double coul_coeff;
|
||||
G4CollisionOutput output;
|
||||
@@ -78,7 +78,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
if (G4InuclNuclei* nuclei_target = dynamic_cast<G4InuclNuclei*>(target)) {
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -88,7 +88,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4InuclElementaryParticle dummy(small_ekin, 1);
|
||||
G4LorentzConvertor toTheNucleiSystemRestFrame;
|
||||
toTheNucleiSystemRestFrame.setBullet(dummy.getMomentum(), dummy.getMass());
|
||||
G4std::vector<G4double> ppout(4, 0.0);
|
||||
std::vector<G4double> ppout(4, 0.0);
|
||||
|
||||
if (timeToBigBang(A, Z, EEXS)) {
|
||||
|
||||
@@ -109,7 +109,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
|
||||
G4InuclNuclei dummy_nuc;
|
||||
G4double EEXS_new;
|
||||
G4std::vector<G4double> pin = PEX;
|
||||
std::vector<G4double> pin = PEX;
|
||||
pin[0] += 0.001 * EEXS;
|
||||
G4bool try_again = true;
|
||||
G4bool fission_open = true;
|
||||
@@ -154,9 +154,9 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4double E0 = getE0(A);
|
||||
G4double parlev = getPARLEVDEN(A, Z);
|
||||
G4double u1 = parlev * A;
|
||||
G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > parms = paraMaker(Z);
|
||||
G4std::vector<G4double> AK = parms.first;
|
||||
G4std::vector<G4double> CPA = parms.second;
|
||||
std::pair<std::vector<G4double>, std::vector<G4double> > parms = paraMaker(Z);
|
||||
std::vector<G4double> AK = parms.first;
|
||||
std::vector<G4double> CPA = parms.second;
|
||||
G4double DM0 = bindingEnergy(A, Z);
|
||||
G4int i(0);
|
||||
|
||||
@@ -281,15 +281,15 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
// new photon escape
|
||||
G4InuclElementaryParticle particle(10);
|
||||
G4double pmod = 0.001 * S;
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
mom[0] = pmod;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
mom_at_rest[0] = sqrt(mom_at_rest[1] * mom_at_rest[1] +
|
||||
@@ -297,14 +297,14 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
mom_at_rest[3] * mom_at_rest[3] +
|
||||
nuc_mass * nuc_mass);
|
||||
|
||||
G4std::vector<G4double> part_mom =
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3]);
|
||||
|
||||
G4std::vector<G4double> ex_mom =
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
@@ -377,14 +377,14 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4double mass = particle.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
@@ -396,13 +396,13 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
mom[0] = sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[3] * mom[3] + mass * mass);
|
||||
|
||||
G4std::vector<G4double> part_mom =
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> ex_mom =
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
@@ -428,14 +428,14 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4double mass = nuclei.getMass();
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt((2.0 * mass + S) * S);
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
G4double new_nuc_mass = dummy_nuc.getNucleiMass(A1[icase],
|
||||
@@ -448,13 +448,13 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
mom[2] * mom[2] +
|
||||
mom[3] * mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> part_mom =
|
||||
std::vector<G4double> part_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] +
|
||||
part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
G4std::vector<G4double> ex_mom =
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheNucleiSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] +
|
||||
ex_mom[2] * ex_mom[2] +
|
||||
@@ -492,13 +492,13 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
}
|
||||
|
||||
G4CollisionOutput foutput = theFissioner->collide(0, &nuclei);
|
||||
G4std::vector<G4InuclNuclei> nuclea = foutput.getNucleiFragments();
|
||||
std::vector<G4InuclNuclei> nuclea = foutput.getNucleiFragments();
|
||||
|
||||
if (nuclea.size() == 2) { // fission o'k
|
||||
// convert back to the lab
|
||||
|
||||
for(G4int i = 0; i < 2; i++) {
|
||||
G4std::vector<G4double> mom = nuclea[i].getMomentum();
|
||||
std::vector<G4double> mom = nuclea[i].getMomentum();
|
||||
mom = toTheNucleiSystemRestFrame.backToTheLab(mom);
|
||||
nuclea[i].setMomentum(mom);
|
||||
nuclea[i].setEnergy();
|
||||
@@ -537,7 +537,7 @@ G4CollisionOutput G4EquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
|
||||
}
|
||||
|
||||
G4std::vector<G4double> pnuc(4);
|
||||
std::vector<G4double> pnuc(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) pnuc[i] = pin[i] - ppout[i];
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ G4FissionConfiguration G4FissionStore::generateConfiguration(G4double amax,
|
||||
const G4double small = -30.0;
|
||||
|
||||
G4double totProb = 0.0;
|
||||
G4std::vector<G4double> probs(configurations.size());
|
||||
std::vector<G4double> probs(configurations.size());
|
||||
|
||||
// G4cout << " amax " << amax << " ic " << configurations.size() << G4endl;
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* bullet,
|
||||
|
||||
TEM += DTEM;
|
||||
|
||||
G4std::vector<G4double> AL1(2, -0.15);
|
||||
G4std::vector<G4double> BET1(2, 0.05);
|
||||
std::vector<G4double> AL1(2, -0.15);
|
||||
std::vector<G4double> BET1(2, 0.05);
|
||||
G4FissionStore fissionStore;
|
||||
G4double R12 = pow(A1, one_third) + pow(A2, one_third);
|
||||
|
||||
@@ -88,7 +88,7 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* bullet,
|
||||
G4double X3 = 1.0 / pow(A1, one_third);
|
||||
G4double X4 = 1.0 / pow(A2, one_third);
|
||||
Z1 = G4int(getZopt(A1, A2, Z, X3, X4, R12)) - 1.0;
|
||||
G4std::vector<G4double> EDEF1(2);
|
||||
std::vector<G4double> EDEF1(2);
|
||||
G4double Z2 = Z - Z1;
|
||||
G4double VPOT, VCOUL;
|
||||
|
||||
@@ -140,11 +140,11 @@ G4CollisionOutput G4Fissioner::collide(G4InuclParticle* bullet,
|
||||
G4double mass2 = nuclei2.getMass();
|
||||
G4double EK = config.ekin;
|
||||
G4double pmod = sqrt(0.001 * EK * mass1 * mass2 / mass_in);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double Fi = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
G4std::vector<G4double> mom1(4);
|
||||
G4std::vector<G4double> mom2(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom2(4);
|
||||
|
||||
mom1[1] = P1 * cos(Fi);
|
||||
mom1[2] = P1 * sin(Fi);
|
||||
@@ -220,14 +220,14 @@ G4double G4Fissioner::getZopt(G4double A1,
|
||||
}
|
||||
|
||||
void G4Fissioner::potentialMinimization(G4double& VP,
|
||||
G4std::vector<G4double> & ED,
|
||||
std::vector<G4double> & ED,
|
||||
G4double& VC,
|
||||
G4double AF,
|
||||
G4double AS,
|
||||
G4double ZF,
|
||||
G4double ZS,
|
||||
G4std::vector<G4double>& AL1,
|
||||
G4std::vector<G4double>& BET1,
|
||||
std::vector<G4double>& AL1,
|
||||
std::vector<G4double>& BET1,
|
||||
G4double& R12) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "G4NucleiModel.hh"
|
||||
#include "G4CascadParticle.hh"
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4IntraNucleiCascader::G4IntraNucleiCascader()
|
||||
: verboseLevel(1) {
|
||||
@@ -64,7 +64,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
G4InuclNuclei* bnuclei = dynamic_cast<G4InuclNuclei*>(bullet);
|
||||
G4InuclElementaryParticle* bparticle = dynamic_cast<G4InuclElementaryParticle*>(bullet);
|
||||
G4NucleiModel model(tnuclei);
|
||||
G4std::vector<G4double> momentum_in = bullet->getMomentum();
|
||||
std::vector<G4double> momentum_in = bullet->getMomentum();
|
||||
|
||||
momentum_in[0] += tnuclei->getMass();
|
||||
|
||||
@@ -82,9 +82,9 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
itry++;
|
||||
model.reset();
|
||||
|
||||
G4std::vector<G4CascadParticle> cascad_particles;
|
||||
std::vector<G4CascadParticle> cascad_particles;
|
||||
G4ExitonConfiguration theExitonConfiguration;
|
||||
G4std::vector<G4InuclElementaryParticle> output_particles;
|
||||
std::vector<G4InuclElementaryParticle> output_particles;
|
||||
G4double afin = tnuclei->getA();
|
||||
G4double zfin = tnuclei->getZ();
|
||||
|
||||
@@ -104,7 +104,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
afin += ab;
|
||||
zfin += zb;
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
all_particles = model.initializeCascad(bnuclei, tnuclei);
|
||||
|
||||
cascad_particles = all_particles.first;
|
||||
@@ -131,7 +131,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
};
|
||||
};
|
||||
|
||||
G4std::vector<G4CascadParticle> new_cascad_particles;
|
||||
std::vector<G4CascadParticle> new_cascad_particles;
|
||||
G4int iloop = 0;
|
||||
|
||||
while (!cascad_particles.empty() && !model.empty()) {
|
||||
@@ -194,7 +194,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
for (G4int i = 0; i < G4int(new_cascad_particles.size()); i++)
|
||||
cascad_particles.push_back(new_cascad_particles[i]);
|
||||
|
||||
G4std::pair<G4int, G4int> holes = model.getTypesOfNucleonsInvolved();
|
||||
std::pair<G4int, G4int> holes = model.getTypesOfNucleonsInvolved();
|
||||
|
||||
theExitonConfiguration.incrementHoles(holes.first);
|
||||
|
||||
@@ -210,12 +210,12 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
<< " output_particles " << output_particles.size() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> momentum_out(4, 0.0);
|
||||
std::vector<G4double> momentum_out(4, 0.0);
|
||||
particleIterator ipart;
|
||||
|
||||
for (ipart = output_particles.begin(); ipart != output_particles.end(); ipart++) {
|
||||
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
std::vector<G4double> mom = ipart->getMomentum();
|
||||
|
||||
for (G4int j = 0; j < 4; j++) momentum_out[j] += mom[j];
|
||||
|
||||
@@ -253,7 +253,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
}
|
||||
|
||||
if (goodCase(afin, zfin, Eex, ekin_in)) { // ok, exitation energy > cut
|
||||
G4std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
output.addOutgoingParticles(output_particles);
|
||||
outgoing_nuclei.setMomentum(momentum_out);
|
||||
outgoing_nuclei.setEnergy();
|
||||
@@ -285,7 +285,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
output_particles.push_back(last_particle);
|
||||
};
|
||||
|
||||
G4std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(output_particles.begin(), output_particles.end(), G4ParticleLargerEkin());
|
||||
output.addOutgoingParticles(output_particles);
|
||||
|
||||
return output;
|
||||
@@ -296,7 +296,7 @@ G4CollisionOutput G4IntraNucleiCascader::collide(G4InuclParticle* bullet,
|
||||
|
||||
// special branch to avoid the cascad generation but to get the input for evaporation etc
|
||||
|
||||
G4std::vector<G4double> momentum_out(4, 0.0);
|
||||
std::vector<G4double> momentum_out(4, 0.0);
|
||||
G4InuclNuclei outgoing_nuclei(169, 69);
|
||||
|
||||
outgoing_nuclei.setMomentum(momentum_out);
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
#include "G4InuclElementaryParticle.hh"
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "G4ParticleLargerEkin.hh"
|
||||
#include "g4std/algorithm"
|
||||
#include <algorithm>
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef G4std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclNuclei>::iterator nucleiIterator;
|
||||
|
||||
G4InuclCollider::G4InuclCollider()
|
||||
: verboseLevel(2) {
|
||||
@@ -122,12 +122,12 @@ G4CollisionOutput G4InuclCollider::collide(G4InuclParticle* bullet,
|
||||
G4cout << " degenerated? " << convertToTargetRestFrame.trivial() << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> bmom(4, 0.0);
|
||||
std::vector<G4double> bmom(4, 0.0);
|
||||
|
||||
bmom[3] = convertToTargetRestFrame.getTRSMomentum();
|
||||
|
||||
G4InuclNuclei ntarget(at, zt);
|
||||
G4std::vector<G4double> tmom(4, 0.0);
|
||||
std::vector<G4double> tmom(4, 0.0);
|
||||
|
||||
ntarget.setMomentum(tmom);
|
||||
ntarget.setEnergy();
|
||||
@@ -208,14 +208,14 @@ G4CollisionOutput G4InuclCollider::collide(G4InuclParticle* bullet,
|
||||
|
||||
// convert to the LAB
|
||||
G4bool withReflection = convertToTargetRestFrame.reflectionNeeded();
|
||||
G4std::vector<G4InuclElementaryParticle> particles =
|
||||
std::vector<G4InuclElementaryParticle> particles =
|
||||
TRFoutput.getOutgoingParticles();
|
||||
|
||||
if(!particles.empty()) {
|
||||
particleIterator ipart;
|
||||
for(ipart = particles.begin(); ipart != particles.end(); ipart++) {
|
||||
|
||||
G4std::vector<G4double> mom = ipart->getMomentum();
|
||||
std::vector<G4double> mom = ipart->getMomentum();
|
||||
|
||||
if(withReflection) mom[3] = -mom[3];
|
||||
mom = convertToTargetRestFrame.rotate(mom);
|
||||
@@ -223,15 +223,15 @@ G4CollisionOutput G4InuclCollider::collide(G4InuclParticle* bullet,
|
||||
mom = convertToTargetRestFrame.backToTheLab(ipart->getMomentum());
|
||||
ipart->setMomentum(mom);
|
||||
};
|
||||
G4std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
std::sort(particles.begin(), particles.end(), G4ParticleLargerEkin());
|
||||
};
|
||||
|
||||
G4std::vector<G4InuclNuclei> nucleus = TRFoutput.getNucleiFragments();
|
||||
std::vector<G4InuclNuclei> nucleus = TRFoutput.getNucleiFragments();
|
||||
|
||||
if(!nucleus.empty()) {
|
||||
nucleiIterator inuc;
|
||||
for(inuc = nucleus.begin(); inuc != nucleus.end(); inuc++) {
|
||||
G4std::vector<G4double> mom = inuc->getMomentum();
|
||||
std::vector<G4double> mom = inuc->getMomentum();
|
||||
if(withReflection) mom[3] = -mom[3];
|
||||
mom = convertToTargetRestFrame.rotate(mom);
|
||||
inuc->setMomentum(mom);
|
||||
|
||||
@@ -134,7 +134,7 @@ G4double G4InuclSpecialFunctions::randomPHI() {
|
||||
return twopi * inuclRndm();
|
||||
}
|
||||
|
||||
G4std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
|
||||
std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -143,10 +143,10 @@ G4std::pair<G4double, G4double> G4InuclSpecialFunctions::randomCOS_SIN() {
|
||||
|
||||
G4double CT = 1.0 - 2.0 * inuclRndm();
|
||||
|
||||
return G4std::pair<G4double, G4double>(CT, sqrt(1.0 - CT * CT));
|
||||
return std::pair<G4double, G4double>(CT, sqrt(1.0 - CT * CT));
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct,
|
||||
std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double ct,
|
||||
G4double p) {
|
||||
G4int verboseLevel = 2;
|
||||
|
||||
@@ -154,10 +154,10 @@ G4std::vector<G4double> G4InuclSpecialFunctions::generateWithFixedTheta(G4double
|
||||
G4cout << " >>> G4InuclSpecialFunctions::generateWithFixedTheta" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> momr(4);
|
||||
std::vector<G4double> momr(4);
|
||||
G4double phi = randomPHI();
|
||||
G4double pt = p * sqrt(fabs(1.0 - ct * ct));
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
momr[1] = pt * cos(phi);
|
||||
momr[2] = pt * sin(phi);
|
||||
momr[3] = p * ct;
|
||||
|
||||
@@ -97,13 +97,13 @@ void G4LorentzConvertor::toTheCenterOfMass() {
|
||||
gapp = ga * pscm;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::rotate(const G4std::vector<G4double> mom) const {
|
||||
std::vector<G4double> G4LorentzConvertor::rotate(const std::vector<G4double> mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(G4std::vector<G4double>)" << G4endl;
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(std::vector<G4double>)" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom_rot(4);
|
||||
std::vector<G4double> mom_rot(4);
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " ga " << ga << " gbpp " << gbpp << " gapp " << gapp << G4endl;
|
||||
@@ -134,16 +134,16 @@ G4std::vector<G4double> G4LorentzConvertor::rotate(const G4std::vector<G4double>
|
||||
return mom_rot;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::rotate(const G4std::vector<G4double> mom1,
|
||||
const G4std::vector<G4double> mom) const {
|
||||
std::vector<G4double> G4LorentzConvertor::rotate(const std::vector<G4double> mom1,
|
||||
const std::vector<G4double> mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(G4std::vector<G4double>,G4std::vector<G4double>)" << G4endl;
|
||||
G4cout << " >>> G4LorentzConvertor::rotate(std::vector<G4double>,std::vector<G4double>)" << G4endl;
|
||||
}
|
||||
|
||||
const G4double small = 1.0e-10;
|
||||
|
||||
G4std::vector<G4double> mom_rot(4);
|
||||
std::vector<G4double> mom_rot(4);
|
||||
|
||||
G4double pp = 0.0;
|
||||
|
||||
@@ -237,7 +237,7 @@ void G4LorentzConvertor::toTheTargetRestFrame() {
|
||||
gapp = ga * pscm;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> G4LorentzConvertor::backToTheLab(const G4std::vector<G4double>& mom) const {
|
||||
std::vector<G4double> G4LorentzConvertor::backToTheLab(const std::vector<G4double>& mom) const {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4LorentzConvertor::backToTheLab" << G4endl;
|
||||
@@ -251,7 +251,7 @@ G4std::vector<G4double> G4LorentzConvertor::backToTheLab(const G4std::vector<G4d
|
||||
G4cout << " v2 " << v2 << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom1(4);
|
||||
std::vector<G4double> mom1(4);
|
||||
|
||||
if(v2 < small) {
|
||||
mom1 = mom;
|
||||
|
||||
+11
-11
@@ -62,8 +62,8 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
// initialization
|
||||
G4double A = nuclei_target->getA();
|
||||
G4double Z = nuclei_target->getZ();
|
||||
G4std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
G4std::vector<G4double> pin = PEX;
|
||||
std::vector<G4double> PEX = nuclei_target->getMomentum();
|
||||
std::vector<G4double> pin = PEX;
|
||||
G4double EEXS = nuclei_target->getExitationEnergy();
|
||||
pin[0] += 0.001 * EEXS;
|
||||
G4InuclNuclei dummy_nuc;
|
||||
@@ -91,7 +91,7 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
G4double AR = A - QP;
|
||||
G4double ZR = Z - QPP;
|
||||
G4int NEX = G4int(QEX + 0.5);
|
||||
G4std::vector<G4double> ppout(4, 0.0);
|
||||
std::vector<G4double> ppout(4, 0.0);
|
||||
G4bool try_again = NEX > 0 ? true : false;
|
||||
|
||||
while (try_again) {
|
||||
@@ -116,7 +116,7 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
|
||||
if (QEX < sqrt(2.0 * EG)) { // ok
|
||||
|
||||
G4std::pair<G4double, G4double> parms = paraMakerTruncated(Z);
|
||||
std::pair<G4double, G4double> parms = paraMakerTruncated(Z);
|
||||
|
||||
G4double AK1 = parms.first;
|
||||
G4double CPA1 = parms.second;
|
||||
@@ -153,7 +153,7 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
if (F1 > 0.0 && F2 > 0.0) {
|
||||
G4double F = F2 / F1;
|
||||
G4double M1 = 2.77 * MELE * PL;
|
||||
G4std::vector<G4double> D(3, 0.0);
|
||||
std::vector<G4double> D(3, 0.0);
|
||||
D[0] = M1 * F2 * F2 * pow(F, NEX - 1) / (QEX + 1.0);
|
||||
|
||||
if (D[0] > 0.0) {
|
||||
@@ -286,14 +286,14 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
EPART *= 0.001; // to the GeV
|
||||
// generate particle momentum
|
||||
G4double pmod = sqrt(EPART * (2.0 * mass + EPART));
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = pmod * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
mom[2] = P1 * sin(FI);
|
||||
mom[3] = pmod * COS_SIN.first;
|
||||
G4std::vector<G4double> mom_at_rest(4);
|
||||
std::vector<G4double> mom_at_rest(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) mom_at_rest[i] = -mom[i];
|
||||
|
||||
@@ -319,14 +319,14 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
mom[0] = sqrt(mom[1] * mom[1] + mom[2] * mom[2] +
|
||||
mom[3] * mom[3] + mass * mass);
|
||||
|
||||
G4std::vector<G4double> part_mom =
|
||||
std::vector<G4double> part_mom =
|
||||
toTheExitonSystemRestFrame.backToTheLab(mom);
|
||||
|
||||
part_mom[0] = sqrt(part_mom[1] * part_mom[1] +
|
||||
part_mom[2] * part_mom[2] + part_mom[3] * part_mom[3] +
|
||||
mass * mass);
|
||||
|
||||
G4std::vector<G4double> ex_mom =
|
||||
std::vector<G4double> ex_mom =
|
||||
toTheExitonSystemRestFrame.backToTheLab(mom_at_rest);
|
||||
|
||||
ex_mom[0] = sqrt(ex_mom[1] * ex_mom[1] + ex_mom[2] * ex_mom[2]
|
||||
@@ -416,7 +416,7 @@ G4CollisionOutput G4NonEquilibriumEvaporator::collide(G4InuclParticle* bullet,
|
||||
// the exitation energy has to be re-set properly for the energy
|
||||
// conservation
|
||||
|
||||
G4std::vector<G4double> pnuc(4);
|
||||
std::vector<G4double> pnuc(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) pnuc[i] = pin[i] - ppout[i];
|
||||
G4InuclNuclei nuclei(pnuc, A, Z);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "G4LorentzConvertor.hh"
|
||||
#include "G4CollisionOutput.hh"
|
||||
|
||||
typedef G4std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
typedef std::vector<G4InuclElementaryParticle>::iterator particleIterator;
|
||||
|
||||
G4NucleiModel::G4NucleiModel()
|
||||
: verboseLevel(2) {
|
||||
@@ -82,7 +82,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
|
||||
if (a > 3.5) { // a > 3
|
||||
|
||||
G4std::vector<G4double> ur;
|
||||
std::vector<G4double> ur;
|
||||
|
||||
G4int icase = 0;
|
||||
|
||||
@@ -115,9 +115,9 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
|
||||
G4double tot_vol = 0.0;
|
||||
|
||||
G4std::vector<G4double> v;
|
||||
std::vector<G4double> v;
|
||||
|
||||
G4std::vector<G4double> v1;
|
||||
std::vector<G4double> v1;
|
||||
|
||||
G4int i(0);
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
@@ -139,9 +139,9 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
// proton
|
||||
G4double dd0 = 3.0 * z * oneBypiTimes4 / tot_vol;
|
||||
|
||||
G4std::vector<G4double> rod;
|
||||
G4std::vector<G4double> pf;
|
||||
G4std::vector<G4double> vz;
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
G4double rd = dd0 * v[i] / v1[i];
|
||||
@@ -173,7 +173,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
fermi_momenta.push_back(pf);
|
||||
|
||||
// pion stuff (primitive)
|
||||
G4std::vector<G4double> vp(number_of_zones, pion_vp);
|
||||
std::vector<G4double> vp(number_of_zones, pion_vp);
|
||||
zone_potentials.push_back(vp);
|
||||
|
||||
} else { // a < 4
|
||||
@@ -181,9 +181,9 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
number_of_zones = 1;
|
||||
zone_radii.push_back(radForSmall);
|
||||
G4double vol = 1.0 / piTimes4thirds / pow(zone_radii[0], 3);
|
||||
G4std::vector<G4double> rod;
|
||||
G4std::vector<G4double> pf;
|
||||
G4std::vector<G4double> vz;
|
||||
std::vector<G4double> rod;
|
||||
std::vector<G4double> pf;
|
||||
std::vector<G4double> vz;
|
||||
|
||||
G4int i(0);
|
||||
for (i = 0; i < number_of_zones; i++) {
|
||||
@@ -216,7 +216,7 @@ void G4NucleiModel::generateModel(G4double a,
|
||||
fermi_momenta.push_back(pf);
|
||||
|
||||
// pion (primitive)
|
||||
G4std::vector<G4double> vp(number_of_zones, pion_vp_small);
|
||||
std::vector<G4double> vp(number_of_zones, pion_vp_small);
|
||||
zone_potentials.push_back(vp);
|
||||
};
|
||||
|
||||
@@ -366,9 +366,9 @@ G4InuclElementaryParticle G4NucleiModel::generateNucleon(G4int type,
|
||||
|
||||
G4double pmod = fermi_momenta[type - 1][zone] * pow(inuclRndm(), one_third);
|
||||
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
|
||||
G4double FI = randomPHI();
|
||||
|
||||
@@ -389,9 +389,9 @@ G4InuclElementaryParticle G4NucleiModel::generateQuasiDeutron(G4int type1,
|
||||
G4cout << " >>> G4NucleiModel::generateQuasiDeutron" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom = generateNucleon(type1, zone).getMomentum();
|
||||
G4std::vector<G4double> mom1 = generateNucleon(type2, zone).getMomentum();
|
||||
G4std::vector<G4double> dmom(4);
|
||||
std::vector<G4double> mom = generateNucleon(type1, zone).getMomentum();
|
||||
std::vector<G4double> mom1 = generateNucleon(type2, zone).getMomentum();
|
||||
std::vector<G4double> dmom(4);
|
||||
|
||||
for (G4int i = 1; i < 4; i++) dmom[i] = mom[i] + mom1[i];
|
||||
|
||||
@@ -437,7 +437,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
G4int ptype = cparticle.getParticle().type();
|
||||
G4int zone = cparticle.getCurrentZone();
|
||||
G4double pmass = cparticle.getParticle().getMass();
|
||||
G4std::vector<G4double> pmom = cparticle.getParticle().getMomentum();
|
||||
std::vector<G4double> pmom = cparticle.getParticle().getMomentum();
|
||||
G4double r_in;
|
||||
G4double r_out;
|
||||
|
||||
@@ -475,7 +475,7 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
|
||||
} else { // normal case
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
|
||||
G4LorentzConvertor dummy_convertor;
|
||||
|
||||
@@ -526,8 +526,8 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
|
||||
if (cparticle.getParticle().pion()) { // absorption possible
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> qdeutrons;
|
||||
G4std::vector<G4double> acsecs;
|
||||
std::vector<G4InuclElementaryParticle> qdeutrons;
|
||||
std::vector<G4double> acsecs;
|
||||
|
||||
G4double tot_abs_csec = 0.0;
|
||||
G4double abs_sec;
|
||||
@@ -674,14 +674,14 @@ partners G4NucleiModel::generateInteractionPartners(G4CascadParticle& cparticle)
|
||||
return thePartners;
|
||||
}
|
||||
|
||||
G4std::vector<G4CascadParticle> G4NucleiModel::generateParticleFate(G4CascadParticle& cparticle,
|
||||
std::vector<G4CascadParticle> G4NucleiModel::generateParticleFate(G4CascadParticle& cparticle,
|
||||
G4ElementaryParticleCollider* theElementaryParticleCollider) {
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4NucleiModel::generateParticleFate" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4CascadParticle> outgouing_cparticles;
|
||||
std::vector<G4CascadParticle> outgouing_cparticles;
|
||||
|
||||
partners thePartners = generateInteractionPartners(cparticle);
|
||||
|
||||
@@ -706,7 +706,7 @@ G4std::vector<G4CascadParticle> G4NucleiModel::generateParticleFate(G4CascadPart
|
||||
|
||||
} else { // there are possible interactions
|
||||
|
||||
G4std::vector<G4double> old_position = cparticle.getPosition();
|
||||
std::vector<G4double> old_position = cparticle.getPosition();
|
||||
|
||||
G4InuclElementaryParticle bullet = cparticle.getParticle();
|
||||
|
||||
@@ -734,14 +734,14 @@ G4std::vector<G4CascadParticle> G4NucleiModel::generateParticleFate(G4CascadPart
|
||||
output.printCollisionOutput();
|
||||
}
|
||||
|
||||
G4std::vector<G4InuclElementaryParticle> outgoing_particles =
|
||||
std::vector<G4InuclElementaryParticle> outgoing_particles =
|
||||
|
||||
output.getOutgoingParticles();
|
||||
|
||||
if (passFermi(outgoing_particles, zone)) { // interaction
|
||||
cparticle.propagateAlongThePath(thePartners[i].second);
|
||||
|
||||
G4std::vector<G4double> new_position = cparticle.getPosition();
|
||||
std::vector<G4double> new_position = cparticle.getPosition();
|
||||
|
||||
for (G4int ip = 0; ip < G4int(outgoing_particles.size()); ip++)
|
||||
outgouing_cparticles.push_back(G4CascadParticle(outgoing_particles[ip],
|
||||
@@ -810,7 +810,7 @@ G4std::vector<G4CascadParticle> G4NucleiModel::generateParticleFate(G4CascadPart
|
||||
return outgouing_cparticles;
|
||||
}
|
||||
|
||||
G4bool G4NucleiModel::passFermi(const G4std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4bool G4NucleiModel::passFermi(const std::vector<G4InuclElementaryParticle>& particles,
|
||||
G4int zone) {
|
||||
if (verboseLevel > 3) {
|
||||
G4cout << " >>> G4NucleiModel::passFermi" << G4endl;
|
||||
@@ -852,9 +852,9 @@ void G4NucleiModel::boundaryTransition(G4CascadParticle& cparticle) {
|
||||
|
||||
} else {
|
||||
|
||||
G4std::vector<G4double> mom = cparticle.getMomentum();
|
||||
std::vector<G4double> mom = cparticle.getMomentum();
|
||||
|
||||
G4std::vector<G4double> pos = cparticle.getPosition();
|
||||
std::vector<G4double> pos = cparticle.getPosition();
|
||||
|
||||
G4int type = cparticle.getParticle().type();
|
||||
|
||||
@@ -972,7 +972,7 @@ G4CascadParticle G4NucleiModel::initializeCascad(G4InuclElementaryParticle* part
|
||||
|
||||
G4double rz = nuclei_radius * s1;
|
||||
|
||||
G4std::vector<G4double> pos(3);
|
||||
std::vector<G4double> pos(3);
|
||||
|
||||
pos[0] = rz * cos(phi);
|
||||
pos[1] = rz * sin(phi);
|
||||
@@ -987,7 +987,7 @@ G4CascadParticle G4NucleiModel::initializeCascad(G4InuclElementaryParticle* part
|
||||
return cpart;
|
||||
}
|
||||
|
||||
G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4InuclNuclei* target) {
|
||||
|
||||
@@ -1007,8 +1007,8 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
const G4double s4max = 7.0;
|
||||
const G4int itry_max = 100;
|
||||
|
||||
G4std::vector<G4CascadParticle> casparticles;
|
||||
G4std::vector<G4InuclElementaryParticle> particles;
|
||||
std::vector<G4CascadParticle> casparticles;
|
||||
std::vector<G4InuclElementaryParticle> particles;
|
||||
|
||||
// first decide whether it will be cascad or compound final nuclei
|
||||
|
||||
@@ -1033,15 +1033,15 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
if(itryg > 0) particles.resize(0);
|
||||
|
||||
// nucleons coordinates and momenta in nuclei rest frame
|
||||
G4std::vector<G4std::vector<G4double> > coordinates;
|
||||
G4std::vector<G4std::vector<G4double> > momentums;
|
||||
std::vector<std::vector<G4double> > coordinates;
|
||||
std::vector<std::vector<G4double> > momentums;
|
||||
|
||||
if (ab < 3.0) { // deutron, simplest case
|
||||
|
||||
G4double r = 2.214 - 3.4208 * log(1.0 - 0.981 * inuclRndm());
|
||||
G4double s = 2.0 * inuclRndm() - 1.0;
|
||||
G4double r1 = r * sqrt(1.0 - s * s);
|
||||
G4std::vector<G4double> coord1(3);
|
||||
std::vector<G4double> coord1(3);
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = r1 * cos(phi);
|
||||
coord1[1] = r1 * sin(phi);
|
||||
@@ -1077,8 +1077,8 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4cout << " p nuc " << p << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> mom(4);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::vector<G4double> mom(4);
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double FI = randomPHI();
|
||||
G4double P1 = p * COS_SIN.second;
|
||||
mom[1] = P1 * cos(FI);
|
||||
@@ -1093,7 +1093,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
G4int ia = int(ab + 0.5);
|
||||
|
||||
G4std::vector<G4double> coord1(3);
|
||||
std::vector<G4double> coord1(3);
|
||||
|
||||
G4bool badco = true;
|
||||
|
||||
@@ -1123,7 +1123,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if (sqrt(s) * exp(-s) > u && s < s3max) {
|
||||
s = r0forAeq3 * sqrt(s);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u * cos(phi);
|
||||
@@ -1215,7 +1215,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if (sqrt(s) * exp(-s) * (1.0 + b * s) > u && s < s4max) {
|
||||
s = r0forAeq4 * sqrt(s);
|
||||
G4std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<double, double> COS_SIN = randomCOS_SIN();
|
||||
u = s * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
coord1[0] = u*cos(phi);
|
||||
@@ -1291,7 +1291,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4cout << " can not generate the nucleons coordinates for a " << ab <<
|
||||
G4endl;
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
|
||||
} else { // momentums
|
||||
@@ -1299,7 +1299,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double p;
|
||||
G4double u;
|
||||
G4double x;
|
||||
G4std::vector<G4double> mom(4);
|
||||
std::vector<G4double> mom(4);
|
||||
//G4bool badp = True;
|
||||
G4int i(0);
|
||||
|
||||
@@ -1313,7 +1313,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
|
||||
if(x > inuclRndm()) {
|
||||
p = sqrt(0.01953 * u);
|
||||
G4std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
std::pair<G4double, G4double> COS_SIN = randomCOS_SIN();
|
||||
G4double pt = p * COS_SIN.second;
|
||||
G4double phi = randomPHI();
|
||||
mom[1] = pt * cos(phi);
|
||||
@@ -1328,7 +1328,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
if(itry == itry_max) {
|
||||
G4cout << " can not generate proper momentum for a " << ab << G4endl;
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
};
|
||||
|
||||
@@ -1360,7 +1360,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
G4double s1 = sqrt(inuclRndm());
|
||||
G4double phi = randomPHI();
|
||||
G4double rz = (nuclei_radius + rb) * s1;
|
||||
G4std::vector<double> global_pos(3);
|
||||
std::vector<double> global_pos(3);
|
||||
global_pos[0] = rz * cos(phi);
|
||||
global_pos[1] = rz * sin(phi);
|
||||
global_pos[2] = -(nuclei_radius + rb) * sqrt(1.0 - s1 * s1);
|
||||
@@ -1372,7 +1372,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
};
|
||||
|
||||
// all nucleons at rest
|
||||
G4std::vector<G4InuclElementaryParticle> raw_particles;
|
||||
std::vector<G4InuclElementaryParticle> raw_particles;
|
||||
G4int ia = int(ab + 0.5);
|
||||
G4int iz = int(zb + 0.5);
|
||||
|
||||
@@ -1390,7 +1390,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
particleIterator ipart;
|
||||
|
||||
for (ipart = raw_particles.begin(); ipart != raw_particles.end(); ipart++) {
|
||||
G4std::vector<G4double> mom =
|
||||
std::vector<G4double> mom =
|
||||
toTheBulletRestFrame.backToTheLab(ipart->getMomentum());
|
||||
ipart->setMomentum(mom);
|
||||
};
|
||||
@@ -1398,7 +1398,7 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
// fill cascad particles and outgoing particles
|
||||
|
||||
for(G4int ip = 0; ip < G4int(raw_particles.size()); ip++) {
|
||||
G4std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
std::vector<G4double> mom = raw_particles[ip].getMomentum();
|
||||
G4double pmod = sqrt(mom[1] * mom[1] + mom[2] * mom[2] + mom[3] * mom[3]);
|
||||
G4double t0 = -(mom[1] * coordinates[ip][0] + mom[2] * coordinates[ip][1] +
|
||||
mom[3] * coordinates[ip][2]) / pmod;
|
||||
@@ -1477,6 +1477,6 @@ G4NucleiModel::initializeCascad(G4InuclNuclei* bullet,
|
||||
for(ip = 0; ip < G4int(particles.size()); ip++) particles[ip].printParticle();
|
||||
}
|
||||
|
||||
return G4std::pair<G4std::vector<G4CascadParticle>, G4std::vector<G4InuclElementaryParticle> >
|
||||
return std::pair<std::vector<G4CascadParticle>, std::vector<G4InuclElementaryParticle> >
|
||||
(casparticles, particles);
|
||||
}
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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 "G4RegionModel.hh"
|
||||
|
||||
const G4double G4RegionModel::radius0 = 1.0E-15;
|
||||
const G4double G4RegionModel::BE = 7;
|
||||
|
||||
G4RegionModel::G4RegionModel(const G4int numberOfLayers, const G4int A, const G4int Z)
|
||||
{
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass();
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass();
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
G4RegionModel::~G4RegionModel(){}
|
||||
|
||||
/*
|
||||
void G4RegionModel::Init(const G4int numberOfLayers, const G4int A, const G4int Z){
|
||||
//count the radiuses, densities and fermi momenta with A and Z
|
||||
G4double r = radius0*pow(A, 1/3);
|
||||
|
||||
if(numberOfLayers==1){
|
||||
radius.push_back(r);
|
||||
|
||||
G4double rho = A / (4/3*pi*pow(r,3));
|
||||
density.push_back(rho);
|
||||
|
||||
G4double protonMass = G4Proton::Proton()->GetPDGMass()/MeV;
|
||||
G4double neutronMass = G4Neutron::Neutron()->GetPDGMass()/MeV ;
|
||||
G4double protonDensity = Z / (4/3*pi*pow(r,3));
|
||||
G4double neutronDensity = (A-Z) / (4/3*pi*pow(r,3));
|
||||
|
||||
protonFermiEnergy.push_back(GetFermiEnergy(protonDensity, protonMass));
|
||||
neutronFermiEnergy.push_back(GetFermiEnergy(neutronDensity, neutronMass));
|
||||
|
||||
protonFermiMomentum.push_back(GetFermiMomentum(protonDensity, protonMass));
|
||||
neutronFermiMomentum.push_back(GetFermiMomentum(neutronDensity, neutronMass));
|
||||
|
||||
G4double fermiEP = *protonFermiEnergy.begin();
|
||||
G4double fermiEN = *neutronFermiEnergy.begin();
|
||||
protonPotentialEnergy.push_back(-(fermiEP + BE));
|
||||
neutronPotentialEnergy.push_back(-(fermiEN + BE));
|
||||
}
|
||||
else{
|
||||
if(numberOfLayers==3){
|
||||
radius.push_back(0.1*r);
|
||||
radius.push_back(0.2*r);
|
||||
radius.push_back(0.9*r);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
G4double G4RegionModel::GetDensity(G4double r){
|
||||
iterator j=density.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
G4double G4RegionModel::GetPotentialEnergy(G4double r, G4int particle){
|
||||
if(particle == 0){ //proton
|
||||
iterator j=protonPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(particle == 1){ //neutron
|
||||
iterator j=neutronPotentialEnergy.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4double G4RegionModel::GetMaximumNucleonMomentum(G4double r,
|
||||
G4int nucleon){
|
||||
|
||||
if(nucleon == 0){
|
||||
iterator j=protonFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if(nucleon==1){
|
||||
iterator j=neutronFermiMomentum.begin();
|
||||
for(iterator i=radius.begin(); i<radius.end(); i++){
|
||||
if(r <= *i) return *j;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
G4Exception("G4RegionModel::GetMaximumNucleonMomentum - return value undefined");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4double G4RegionModel::GetFermiMomentum(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
return sqrt(2*aMass*GetFermiEnergy(aDensity, aMass));
|
||||
|
||||
|
||||
}
|
||||
|
||||
G4double G4RegionModel::GetFermiEnergy(G4double aDensity,
|
||||
G4double aMass){
|
||||
|
||||
//G4double hbar = 1.0E-6;
|
||||
return (pow(hbar_Planck,2)/(2*aMass)*pow((3*pi2*aDensity),2/3));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ void G4WatcherGun::setWatchers() {
|
||||
G4cout << " >>> G4WatcherGun::setWatchers" << G4endl;
|
||||
}
|
||||
|
||||
G4std::vector<G4double> as;
|
||||
G4std::vector<G4double> cs;
|
||||
G4std::vector<G4double> errs;
|
||||
std::vector<G4double> as;
|
||||
std::vector<G4double> cs;
|
||||
std::vector<G4double> errs;
|
||||
|
||||
// specific stuff to monitor the difference with fortran
|
||||
// particle type
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
#include "g4std/iostream"
|
||||
#include <iostream>
|
||||
|
||||
G4double G4InuclSpecialFunctions::bindingEnergyExact(G4double A,
|
||||
G4double Z) {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "G4InuclSpecialFunctions.hh"
|
||||
|
||||
G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > G4InuclSpecialFunctions::paraMaker(G4double Z) {
|
||||
std::pair<std::vector<G4double>, std::vector<G4double> > G4InuclSpecialFunctions::paraMaker(G4double Z) {
|
||||
G4int verboseLevel = 1;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -37,8 +37,8 @@ G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > G4InuclSpecialFun
|
||||
const G4double CP[5] = {0.50, 0.28, 0.20, 0.15, 0.10};
|
||||
const G4double AA[5] = {0.68, 0.82, 0.91, 0.97, 0.98};
|
||||
const G4double CA[5] = {0.10, 0.10, 0.10, 0.08, 0.06};
|
||||
G4std::vector<G4double> AK(6);
|
||||
G4std::vector<G4double> CPA(6);
|
||||
std::vector<G4double> AK(6);
|
||||
std::vector<G4double> CPA(6);
|
||||
AK[0] = 0.0;
|
||||
CPA[0] = 0.0;
|
||||
G4double AK2 = 0.0;
|
||||
@@ -87,10 +87,10 @@ G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> > G4InuclSpecialFun
|
||||
AK[4] = AK6 - 0.06;
|
||||
CPA[4] = 4.0 * CP6 / 3.0;
|
||||
|
||||
return G4std::pair<G4std::vector<G4double>, G4std::vector<G4double> >(AK, CPA);
|
||||
return std::pair<std::vector<G4double>, std::vector<G4double> >(AK, CPA);
|
||||
}
|
||||
|
||||
G4std::pair<G4double, G4double> G4InuclSpecialFunctions::paraMakerTruncated(G4double Z) {
|
||||
std::pair<G4double, G4double> G4InuclSpecialFunctions::paraMakerTruncated(G4double Z) {
|
||||
G4int verboseLevel = 1;
|
||||
|
||||
if (verboseLevel > 3) {
|
||||
@@ -126,5 +126,5 @@ G4std::pair<G4double, G4double> G4InuclSpecialFunctions::paraMakerTruncated(G4do
|
||||
};
|
||||
};
|
||||
|
||||
return G4std::pair<G4double, G4double>(AK2, CP2);
|
||||
return std::pair<G4double, G4double>(AK2, CP2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user