Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::ClusterUtils Class Reference

#include <G4INCLClusterUtils.hh>

Static Public Member Functions

static G4int getZ (const ParticleList &)
 
static G4int getZ (const ParticleList &, Particle *)
 
static G4int getA (const ParticleList &)
 
static G4int getA (const ParticleList &, Particle *)
 
static G4double getKineticEnergy (const ParticleList &pl)
 
static G4double getTotalEnergy (const ParticleList &)
 
static G4double getTotalEnergy (const ParticleList &, Particle *)
 
static ThreeVector getNewPositionVector (const ParticleList &pl, Particle *p)
 
static ThreeVector getNewPositionVector (const ParticleList &pl)
 
static ThreeVector getNewPositionVector (const ThreeVector &, const ParticleList &, Particle *)
 
static G4double getPhaseSpace (const ThreeVector &clusterPosition, const ThreeVector &clusterMomentum, G4int clusterA, Particle *p)
 
static G4double getPhaseSpace (const ParticleList &)
 
static G4double getPhaseSpace (const ParticleList &, Particle *)
 
static G4bool isBetterCluster (ParticleList *newCluster, ParticleList *originalCluster)
 

Protected Member Functions

 ClusterUtils ()
 
 ~ClusterUtils ()
 

Detailed Description

Definition at line 47 of file G4INCLClusterUtils.hh.

Constructor & Destructor Documentation

◆ ClusterUtils()

G4INCL::ClusterUtils::ClusterUtils ( )
protected

◆ ~ClusterUtils()

G4INCL::ClusterUtils::~ClusterUtils ( )
protected

Member Function Documentation

◆ getA() [1/2]

G4int G4INCL::ClusterUtils::getA ( const ParticleList pl)
static

Definition at line 71 of file G4INCLClusterUtils.cc.

71 {
72 G4int A = 0;
73 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
74 A += (*i)->getA();
75 }
76 return A;
77 }
int G4int
Definition: G4Types.hh:66
std::list< G4INCL::Particle * >::const_iterator ParticleIter

Referenced by getA().

◆ getA() [2/2]

G4int G4INCL::ClusterUtils::getA ( const ParticleList pl,
Particle p 
)
static

Definition at line 79 of file G4INCLClusterUtils.cc.

79 {
80 return (ClusterUtils::getA(pl) + p->getA());
81 }
static G4int getA(const ParticleList &)

◆ getKineticEnergy()

G4double G4INCL::ClusterUtils::getKineticEnergy ( const ParticleList pl)
static

Definition at line 51 of file G4INCLClusterUtils.cc.

51 {
52 G4double Ekin = 0.0;
53 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
54 Ekin += std::sqrt(std::pow((*i)->getEnergy(), 2) - std::pow((*i)->getMass(), 2));;
55 }
56 return Ekin;
57 }
double G4double
Definition: G4Types.hh:64

◆ getNewPositionVector() [1/3]

ThreeVector G4INCL::ClusterUtils::getNewPositionVector ( const ParticleList pl)
static

Definition at line 83 of file G4INCLClusterUtils.cc.

84 {
85 ThreeVector pos(0.0, 0.0, 0.0);
86 G4int A = 1;
87 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
88 pos += (pos * A)*ParticleTable::clusterPosFact[A];
89 ++A;
90 }
91 return pos;
92 }
static const G4double clusterPosFact[maxClusterMass+1]

◆ getNewPositionVector() [2/3]

ThreeVector G4INCL::ClusterUtils::getNewPositionVector ( const ParticleList pl,
Particle p 
)
static

Definition at line 94 of file G4INCLClusterUtils.cc.

95 {
96 ThreeVector pos = ClusterUtils::getNewPositionVector(pl);
97 return ((pos * pl.size()) + p->getPosition()) * ParticleTable::clusterPosFact[pl.size() + 1];
98 }
static ThreeVector getNewPositionVector(const ParticleList &pl, Particle *p)

Referenced by getNewPositionVector().

◆ getNewPositionVector() [3/3]

ThreeVector G4INCL::ClusterUtils::getNewPositionVector ( const ThreeVector oldPosition,
const ParticleList pl,
Particle p 
)
static

Definition at line 100 of file G4INCLClusterUtils.cc.

100 {
101 ThreeVector newPosition = oldPosition;
102 newPosition *= pl.size();
103 newPosition += p->getPosition();
104 newPosition *= ParticleTable::clusterPosFact[pl.size() + 1];
105 return newPosition;
106 }

◆ getPhaseSpace() [1/3]

static G4double G4INCL::ClusterUtils::getPhaseSpace ( const ParticleList )
static

◆ getPhaseSpace() [2/3]

static G4double G4INCL::ClusterUtils::getPhaseSpace ( const ParticleList ,
Particle  
)
static

◆ getPhaseSpace() [3/3]

G4double G4INCL::ClusterUtils::getPhaseSpace ( const ThreeVector clusterPosition,
const ThreeVector clusterMomentum,
G4int  clusterA,
Particle p 
)
static

Definition at line 108 of file G4INCLClusterUtils.cc.

111 {
112 G4double psSpace = (p->getPosition() - clusterPosition).mag2();
113 G4double psMomentum = (p->getMomentum() - clusterMomentum).mag2();
114 return psSpace * psMomentum * ParticleTable::clusterPosFact2[clusterA + p->getA()];
115 }
static const G4double clusterPosFact2[maxClusterMass+1]

◆ getTotalEnergy() [1/2]

G4double G4INCL::ClusterUtils::getTotalEnergy ( const ParticleList pl)
static

Definition at line 43 of file G4INCLClusterUtils.cc.

43 {
44 G4double E = 0.0;
45 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
46 E += (*i)->getEnergy();
47 }
48 return E;
49 }

◆ getTotalEnergy() [2/2]

static G4double G4INCL::ClusterUtils::getTotalEnergy ( const ParticleList ,
Particle  
)
static

◆ getZ() [1/2]

G4int G4INCL::ClusterUtils::getZ ( const ParticleList pl)
static

Definition at line 59 of file G4INCLClusterUtils.cc.

59 {
60 G4int Z = 0;
61 for(ParticleIter i = pl.begin(); i != pl.end(); ++i) {
62 Z += (*i)->getZ();
63 }
64 return Z;
65 }

Referenced by getZ().

◆ getZ() [2/2]

G4int G4INCL::ClusterUtils::getZ ( const ParticleList pl,
Particle p 
)
static

Definition at line 67 of file G4INCLClusterUtils.cc.

67 {
68 return (ClusterUtils::getZ(pl) + p->getZ());
69 }
static G4int getZ(const ParticleList &)

◆ isBetterCluster()

G4bool G4INCL::ClusterUtils::isBetterCluster ( ParticleList newCluster,
ParticleList originalCluster 
)
static

Definition at line 117 of file G4INCLClusterUtils.cc.

117 {
118 return true;
119 }

The documentation for this class was generated from the following files: