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

#include <G4HEVector.hh>

Public Member Functions

 G4HEVector (const G4HadProjectile *aParticle)
 
 G4HEVector ()
 
 G4HEVector (const G4HEVector &p)
 
G4HEVectoroperator= (const G4HEVector &p)
 
 ~G4HEVector ()
 
G4double Amax (G4double a, G4double b)
 
G4String getParticleName (G4int code, G4int baryon)
 
void setMomentum (const G4ParticleMomentum mom)
 
void setMomentum (const G4ParticleMomentum *mom)
 
void setMomentumAndUpdate (const G4ParticleMomentum mom)
 
void setMomentumAndUpdate (const G4ParticleMomentum *mom)
 
const G4ParticleMomentum getMomentum () const
 
G4double getTotalMomentum () const
 
void setMomentum (G4double x, G4double y, G4double z)
 
void setMomentumAndUpdate (G4double x, G4double y, G4double z)
 
void setMomentum (G4double x, G4double y)
 
void setMomentumAndUpdate (G4double x, G4double y)
 
void setMomentum (G4double z)
 
void setMomentumAndUpdate (G4double z)
 
void setEnergy (G4double e)
 
void setEnergyAndUpdate (G4double e)
 
void setKineticEnergy (G4double ekin)
 
void setKineticEnergyAndUpdate (G4double ekin)
 
G4double getEnergy () const
 
G4double getKineticEnergy () const
 
void setMass (G4double m)
 
void setMassAndUpdate (G4double m)
 
G4double getMass () const
 
void setCharge (G4double c)
 
G4double getCharge () const
 
void setTOF (G4double t)
 
G4double getTOF ()
 
void setSide (G4int s)
 
G4int getSide ()
 
void setFlag (G4bool f)
 
G4bool getFlag ()
 
void setCode (G4int c)
 
G4int getCode () const
 
G4String getName () const
 
G4int getBaryonNumber () const
 
G4int getStrangenessNumber () const
 
G4int getQuarkContent (G4int flavor)
 
G4int getAntiQuarkContent (G4int flavor)
 
void setZero ()
 
G4String getType () const
 
void Add (const G4HEVector &p1, const G4HEVector &p2)
 
void Sub (const G4HEVector &p1, const G4HEVector &p2)
 
void Lor (const G4HEVector &p1, const G4HEVector &p2)
 
G4double CosAng (const G4HEVector &p) const
 
G4double Ang (const G4HEVector &p)
 
G4double Dot4 (const G4HEVector &p1, const G4HEVector &p2)
 
G4double Impu (const G4HEVector &p1, const G4HEVector &p2)
 
void Add3 (const G4HEVector &p1, const G4HEVector &p2)
 
void Sub3 (const G4HEVector &p1, const G4HEVector &p2)
 
void Cross (const G4HEVector &p1, const G4HEVector &p2)
 
G4double Dot (const G4HEVector &p1, const G4HEVector &p2)
 
void Smul (const G4HEVector &p, G4double h)
 
void SmulAndUpdate (const G4HEVector &p, G4double h)
 
void Norz (const G4HEVector &p)
 
G4double Length () const
 
void Exch (G4HEVector &p1)
 
void Defs1 (const G4HEVector &p1, const G4HEVector &p2)
 
void Defs (const G4HEVector &p1, const G4HEVector &p2, G4HEVector &my, G4HEVector &mz)
 
void Trac (const G4HEVector &p1, const G4HEVector &mx, const G4HEVector &my, const G4HEVector &mz)
 
void setDefinition (G4String name)
 
G4int FillQuarkContent ()
 
void Print (G4int L) const
 

Protected Types

enum  { NumberOfQuarkFlavor = 8 }
 

Protected Attributes

G4double px
 
G4double py
 
G4double pz
 
G4double energy
 
G4double kineticEnergy
 
G4double mass
 
G4double charge
 
G4double timeOfFlight
 
G4int side
 
G4bool flag
 
G4int code
 
G4String particleName
 
G4String particleType
 
G4int baryon
 
G4int strangeness
 
G4int theQuarkContent [NumberOfQuarkFlavor]
 
G4int theAntiQuarkContent [NumberOfQuarkFlavor]
 

Detailed Description

Definition at line 49 of file G4HEVector.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumberOfQuarkFlavor 

Definition at line 67 of file G4HEVector.hh.

@ NumberOfQuarkFlavor
Definition: G4HEVector.hh:67

Constructor & Destructor Documentation

◆ G4HEVector() [1/3]

G4HEVector::G4HEVector ( const G4HadProjectile aParticle)

Definition at line 44 of file G4HEVector.cc.

45 {
46 G4ThreeVector aMom = 1./GeV*aParticle->Get4Momentum().vect();
47 px = aMom.x();
48 py = aMom.y();
49 pz = aMom.z();
50 energy = aParticle->GetTotalEnergy()/GeV;
51 kineticEnergy = aParticle->GetKineticEnergy()/GeV;
52 mass = aParticle->GetDefinition()->GetPDGMass()/GeV;
53 charge = aParticle->GetDefinition()->GetPDGCharge()/eplus;
54 timeOfFlight = 0.0;
55 side = 0;
56 flag = false;
57 code = aParticle->GetDefinition()->GetPDGEncoding();
58 baryon = aParticle->GetDefinition()->GetBaryonNumber();
61 strangeness = aParticle->GetDefinition()->GetQuarkContent(3);
62 }
double z() const
double x() const
double y() const
Hep3Vector vect() const
G4double charge
Definition: G4HEVector.hh:58
G4int side
Definition: G4HEVector.hh:60
G4double pz
Definition: G4HEVector.hh:54
G4double py
Definition: G4HEVector.hh:53
G4double mass
Definition: G4HEVector.hh:57
G4String particleName
Definition: G4HEVector.hh:63
G4int baryon
Definition: G4HEVector.hh:65
G4int strangeness
Definition: G4HEVector.hh:66
G4String getParticleName(G4int code, G4int baryon)
Definition: G4HEVector.cc:71
G4double kineticEnergy
Definition: G4HEVector.hh:56
G4double px
Definition: G4HEVector.hh:52
G4int code
Definition: G4HEVector.hh:62
G4bool flag
Definition: G4HEVector.hh:61
G4String particleType
Definition: G4HEVector.hh:64
G4double energy
Definition: G4HEVector.hh:55
G4double timeOfFlight
Definition: G4HEVector.hh:59
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetTotalEnergy() const
const G4String & GetParticleType() const
G4int GetQuarkContent(G4int flavor) const
G4double GetPDGCharge() const

◆ G4HEVector() [2/3]

G4HEVector::G4HEVector ( )
inline

Definition at line 75 of file G4HEVector.hh.

76 {
77 px = 0.0;
78 py = 0.0;
79 pz = 0.0;
80 energy = 0.0;
81 kineticEnergy = 0.0;
82 mass = 0.0;
83 charge = 0.0;
84 timeOfFlight = 0.0;
85 side = 0;
86 flag = false;
87 code = 0;
88 particleName = "";
89 particleType = "";
90 baryon = 0;
91 strangeness = 0;
92 for (G4int i = 0; i < NumberOfQuarkFlavor; i++) {
93 theQuarkContent[i] = 0;
95 }
96 }
int G4int
Definition: G4Types.hh:66
G4int theAntiQuarkContent[NumberOfQuarkFlavor]
Definition: G4HEVector.hh:69
G4int theQuarkContent[NumberOfQuarkFlavor]
Definition: G4HEVector.hh:68

◆ G4HEVector() [3/3]

G4HEVector::G4HEVector ( const G4HEVector p)
inline

Definition at line 99 of file G4HEVector.hh.

100 {
101 px = p.px;
102 py = p.py;
103 pz = p.pz;
104 energy = p.energy;
106 mass = p.mass;
107 charge = p.charge;
109 side = p.side;
110 flag = p.flag;
111 code = p.code;
114 baryon = p.baryon;
116 }

◆ ~G4HEVector()

G4HEVector::~G4HEVector ( )
inline

Definition at line 139 of file G4HEVector.hh.

139{ };

Member Function Documentation

◆ Add()

void G4HEVector::Add ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 516 of file G4HEVector.cc.

517 {
518 px = p1.px + p2.px;
519 py = p1.py + p2.py;
520 pz = p1.pz + p2.pz;
521 energy = p1.energy + p2.energy;
522 G4double b = energy*energy - px*px - py*py - pz*pz;
523 if( b < 0 )
524 mass = -1. * std::sqrt( -b );
525 else
526 mass = std::sqrt( b );
528 charge = p1.charge + p2.charge;
529 code = 0;
530 particleName = "";
531 particleType = "";
532 baryon = 0;
533 strangeness = 0;
534 }
double G4double
Definition: G4Types.hh:64
G4double Amax(G4double a, G4double b)
Definition: G4HEVector.cc:64

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::NBodyPhaseSpace(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ Add3()

void G4HEVector::Add3 ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 623 of file G4HEVector.cc.

624 {
625 px = p1.px + p2.px;
626 py = p1.py + p2.py;
627 pz = p1.pz + p2.pz;
628 return;
629 }

Referenced by G4HEInelastic::NBodyPhaseSpace(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ Amax()

G4double G4HEVector::Amax ( G4double  a,
G4double  b 
)

Definition at line 64 of file G4HEVector.cc.

65 {
66 G4double c = a;
67 if(b > a) c = b;
68 return c;
69 }

Referenced by Add(), Lor(), setMassAndUpdate(), setMomentumAndUpdate(), and Sub().

◆ Ang()

G4double G4HEVector::Ang ( const G4HEVector p)

Definition at line 592 of file G4HEVector.cc.

593 {
594 G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
595 if( a != 0.0 )
596 {
597 a = (px*p.px + py*p.py + pz*p.pz)/a;
598 if( std::fabs(a) > 1.0 )
599 {
600 if(a<0.0) a=-1.0;
601 else a=1.0;
602 }
603 }
604 return std::acos(a);
605 }

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), and G4HEInelastic::MediumEnergyClusterProduction().

◆ CosAng()

G4double G4HEVector::CosAng ( const G4HEVector p) const

Definition at line 578 of file G4HEVector.cc.

579{
580 G4double a = std::sqrt( (px*px + py*py + pz*pz)*(p.px*p.px + p.py*p.py + p.pz*p.pz) );
581 if (a != 0.0) {
582 a = (px*p.px + py*p.py + pz*p.pz)/a;
583 if (std::fabs(a) > 1.0) {
584 if (a < 0.0) a = -1.0;
585 else a = 1.0;
586 }
587 }
588 return a;
589}

Referenced by G4HEInelastic::TuningOfHighEnergyCascading().

◆ Cross()

void G4HEVector::Cross ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 641 of file G4HEVector.cc.

642 {
643 G4double tpx = p1.py * p2.pz - p1.pz * p2.py;
644 G4double tpy = p1.pz * p2.px - p1.px * p2.pz;
645 G4double tpz = p1.px * p2.py - p1.py * p2.px;
646 px=tpx;
647 py=tpy;
648 pz=tpz;
649 return;
650 }

Referenced by G4HEInelastic::TuningOfHighEnergyCascading().

◆ Defs()

void G4HEVector::Defs ( const G4HEVector p1,
const G4HEVector p2,
G4HEVector my,
G4HEVector mz 
)

Definition at line 758 of file G4HEVector.cc.

760 {
761 my = p1;
762 mz = p2;
763 px = my.py*mz.pz - my.pz*mz.py;
764 py = my.pz*mz.px - my.px*mz.pz;
765 pz = my.px*mz.py - my.py*mz.px;
766 my.px = mz.py*pz - mz.pz*py;
767 my.py = mz.pz*px - mz.px*pz;
768 my.pz = mz.px*py - mz.py*px;
769 G4double pp;
770 pp = std::sqrt(px*px + py*py + pz*pz);
771 if (pp > 0.)
772 {
773 pp = 1./pp;
774 px = px*pp ;
775 py = py*pp ;
776 pz = pz*pp ;
777 }
778 pp = std::sqrt(my.px*my.px + my.py*my.py + my.pz*my.pz);
779 if (pp > 0.)
780 {
781 pp = 1./pp;
782 my.px = my.px*pp ;
783 my.py = my.py*pp ;
784 my.pz = my.pz*pp ;
785 }
786 pp = std::sqrt(mz.px*mz.px + mz.py*mz.py + mz.pz*mz.pz);
787 if (pp > 0.)
788 {
789 pp = 1./pp;
790 mz.px = mz.px*pp ;
791 mz.py = mz.py*pp ;
792 mz.pz = mz.pz*pp ;
793 }
794 return;
795 }

◆ Defs1()

void G4HEVector::Defs1 ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 726 of file G4HEVector.cc.

727 {
728 G4double pt2 = p2.px*p2.px + p2.py*p2.py;
729 if (pt2 > 0.0)
730 {
731 G4double ph, qx, qy, qz;
732 G4double a = std::sqrt(p2.px*p2.px + p2.py*p2.py + p2.pz*p2.pz);
733 G4double cost = p2.pz/a;
734 G4double sint = 0.5 * (std::sqrt(std::fabs((1.-cost)*(1.+cost))) + std::sqrt(pt2)/a);
735 if(p2.py < 0.) ph = 1.5*pi;
736 else ph = halfpi;
737 if( p2.px != 0.0)
738 ph = std::atan2(p2.py,p2.px);
739 qx = cost*std::cos(ph)*p1.px - std::sin(ph)*p1.py
740 + sint*std::cos(ph)*p1.pz;
741 qy = cost*std::sin(ph)*p1.px + std::cos(ph)*p1.py
742 + sint*std::sin(ph)*p1.pz;
743 qz = - sint *p1.px
744 + cost *p1.pz;
745 px = qx;
746 py = qy;
747 pz = qz;
748 }
749 else
750 {
751 px = p1.px;
752 py = p1.py;
753 pz = p1.pz;
754 }
755 }
const G4double pi

Referenced by G4HEInelastic::ElasticScattering(), G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), and G4HEInelastic::QuasiElasticScattering().

◆ Dot()

G4double G4HEVector::Dot ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 653 of file G4HEVector.cc.

654 {
655 return ( p1.px * p2.px + p1.py * p2.py + p1.pz * p2.pz );
656 }

Referenced by Lor().

◆ Dot4()

G4double G4HEVector::Dot4 ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 608 of file G4HEVector.cc.

609 {
610 return ( p1.energy*p2.energy - p1.px*p2.px - p1.py*p2.py - p1.pz*p2.pz );
611 }

◆ Exch()

void G4HEVector::Exch ( G4HEVector p1)

Definition at line 717 of file G4HEVector.cc.

718 {
719 G4HEVector mx = *this;
720 *this = p1;
721 p1 = mx;
722 return;
723 }

◆ FillQuarkContent()

G4int G4HEVector::FillQuarkContent ( )

Definition at line 1140 of file G4HEVector.cc.

1141{
1142 // Calculate quark and anti-quark content
1143 // Return value is PDG encoding for this particle
1144 // Error if return value is differnt from this->thePDGEncoding
1145
1146 G4int tempPDGcode = code;
1147 G4double echarge = 1.;
1148
1149 for (G4int flavor=0; flavor<NumberOfQuarkFlavor; flavor++){
1150 theQuarkContent[flavor] =0;
1151 theAntiQuarkContent[flavor] =0;
1152 }
1153
1154 G4int temp = std::abs(tempPDGcode);
1155 G4int multiplet = temp/10000;
1156 temp -= G4int(multiplet*10000);
1157 G4int quark1 = temp/1000;
1158 temp -= G4int(quark1*1000);
1159 G4int quark2 = temp/100;
1160 temp -= G4int(quark2*100);
1161 G4int quark3 = temp/10;
1162 temp -= G4int(quark3*10);
1163
1164 // G4int spin= (temp-1); DHW 19 May 2011: variable set but not used
1165
1166 if (particleType =="quark") {
1167 if (tempPDGcode>0){
1168 if (tempPDGcode<=NumberOfQuarkFlavor){
1169 theQuarkContent[tempPDGcode-1] =1;
1170 } else {
1171 // --- thePDGEncoding is wrong
1172 tempPDGcode = 0;
1173 }
1174 } else {
1175 G4int temp0 = -1*tempPDGcode;
1176 if (temp0 <= NumberOfQuarkFlavor) {
1177 theAntiQuarkContent[temp0-1] =1;
1178 } else {
1179 // --- thePDGEncoding is wrong
1180 tempPDGcode = 0;
1181 }
1182 }
1183
1184 } else if (particleType == "Meson") {
1185 // -- exceptions --
1186 // if (tempPDGcode == 310) spin = 0; //K0s
1187 // DHW 19 May 2011: variable set but not used
1188
1189 if (tempPDGcode == 130) { //K0l
1190 // spin = 0; DHW 19 May 2011: variable set but not used
1191 quark2 = 3;
1192 quark3 = 1;
1193 }
1194
1195 if (quark1 !=0)
1196 {
1197 tempPDGcode = 0;
1198 }
1199 if ((quark2==0)||(quark3==0)){
1200 tempPDGcode = 0;
1201 }
1202 if (quark2<quark3) {
1203 tempPDGcode = 0;
1204 }
1205 // check quark flavor
1206 if (quark2>=NumberOfQuarkFlavor){
1207 tempPDGcode = 0;
1208 }
1209 // check heavier quark type
1210 if (quark2 & 1) {
1211 // down type qurak
1212 if (tempPDGcode >0) {
1213 theQuarkContent[quark3-1] =1;
1214 theAntiQuarkContent[quark2-1] =1;
1215 } else {
1216 theQuarkContent[quark2-1] =1;
1217 theAntiQuarkContent[quark3-1] =1;
1218 }
1219 } else {
1220 // up type quark
1221 if (tempPDGcode >0) {
1222 theQuarkContent[quark2-1] =1;
1223 theAntiQuarkContent[quark3-1] =1;
1224 } else {
1225 theQuarkContent[quark3-1] =1;
1226 theAntiQuarkContent[quark2-1] =1;
1227 }
1228 }
1229 // check charge
1230 G4double totalCharge = 0.0;
1231 for (G4int flavor= 0; flavor<NumberOfQuarkFlavor-1; flavor+=2){
1232 totalCharge += (-1./3.)*echarge*theQuarkContent[flavor];
1233 totalCharge += 1./3.*echarge*theAntiQuarkContent[flavor];
1234 totalCharge += 2./3.*echarge*theQuarkContent[flavor+1];
1235 totalCharge += (-2./3.)*echarge*theAntiQuarkContent[flavor+1];
1236 }
1237 if (std::abs(totalCharge-charge)>0.1*echarge) {
1238 tempPDGcode = 0;
1239 }
1240 } else if (particleType == "baryon"){
1241 // check Meson or not
1242 if ((quark1==0)||(quark2==0)||(quark3==0)){
1243 tempPDGcode = 0;
1244 }
1245 //exceptions
1246 if (std::abs(tempPDGcode) == 3122) {
1247 // Lambda
1248 quark2 = 2;
1249 quark3 = 1;
1250 // spin = 1; DHW 19 May 2011: variable set but not used
1251 } else if (std::abs(tempPDGcode) == 4122) {
1252 // Lambda_c
1253 quark2 = 2;
1254 quark3 = 1;
1255 // spin = 1; DHW 19 May 2011: variable set but not used
1256 }
1257 // check quark flavor
1258 if ((quark1<quark2)||(quark2<quark3)||(quark1<quark3)) {
1259 tempPDGcode = 0;
1260 }
1261 if (quark1>=NumberOfQuarkFlavor) {
1262 tempPDGcode = 0;
1263 }
1264 if (tempPDGcode >0) {
1265 theQuarkContent[quark1-1] ++;
1266 theQuarkContent[quark2-1] ++;
1267 theQuarkContent[quark3-1] ++;
1268 } else {
1269 theAntiQuarkContent[quark1-1] ++;
1270 theAntiQuarkContent[quark2-1] ++;
1271 theAntiQuarkContent[quark3-1] ++;
1272 }
1273 // check charge
1274 G4double totalCharge = 0.0;
1275 for (G4int flavor= 0; flavor<NumberOfQuarkFlavor-1; flavor+=2){
1276 totalCharge += (-1./3.)*echarge*theQuarkContent[flavor];
1277 totalCharge += 1./3.*echarge*theAntiQuarkContent[flavor];
1278 totalCharge += 2./3.*echarge*theQuarkContent[flavor+1];
1279 totalCharge += (-2./3.)*echarge*theAntiQuarkContent[flavor+1];
1280 }
1281 if (std::abs(totalCharge - charge) > 0.1*echarge) tempPDGcode = 0;
1282
1283 } else {
1284 }
1285 return tempPDGcode;
1286}

Referenced by getAntiQuarkContent(), and getQuarkContent().

◆ getAntiQuarkContent()

G4int G4HEVector::getAntiQuarkContent ( G4int  flavor)

Definition at line 474 of file G4HEVector.cc.

475 {
476 if(flavor > 0 && flavor < 8)
477 {
478 G4int check;
479 check = FillQuarkContent();
480 if(check != code)
481 {
482 return 0;
483 }
484 else
485 {
486 return theAntiQuarkContent[flavor-1];
487 }
488 }
489 else
490 {
491 return 0;
492 }
493 }
G4int FillQuarkContent()
Definition: G4HEVector.cc:1140

◆ getBaryonNumber()

G4int G4HEVector::getBaryonNumber ( ) const

Definition at line 441 of file G4HEVector.cc.

442{
443 return baryon;
444}

Referenced by G4HEInelastic::FillParticleChange(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ getCharge()

G4double G4HEVector::getCharge ( ) const

Definition at line 373 of file G4HEVector.cc.

374{
375 return charge;
376}

Referenced by G4HEInelastic::TuningOfHighEnergyCascading().

◆ getCode()

G4int G4HEVector::getCode ( ) const

Definition at line 426 of file G4HEVector.cc.

427{
428 return code;
429}

Referenced by G4HEAntiKaonZeroInelastic::ApplyYourself(), G4HEAntiLambdaInelastic::ApplyYourself(), G4HEAntiNeutronInelastic::ApplyYourself(), G4HEAntiOmegaMinusInelastic::ApplyYourself(), G4HEAntiProtonInelastic::ApplyYourself(), G4HEAntiSigmaMinusInelastic::ApplyYourself(), G4HEAntiSigmaPlusInelastic::ApplyYourself(), G4HEAntiXiMinusInelastic::ApplyYourself(), G4HEAntiXiZeroInelastic::ApplyYourself(), G4HEKaonMinusInelastic::ApplyYourself(), G4HEKaonPlusInelastic::ApplyYourself(), G4HEKaonZeroInelastic::ApplyYourself(), G4HEKaonZeroLongInelastic::ApplyYourself(), G4HEKaonZeroShortInelastic::ApplyYourself(), G4HELambdaInelastic::ApplyYourself(), G4HENeutronInelastic::ApplyYourself(), G4HEOmegaMinusInelastic::ApplyYourself(), G4HEPionMinusInelastic::ApplyYourself(), G4HEPionPlusInelastic::ApplyYourself(), G4HEProtonInelastic::ApplyYourself(), G4HESigmaMinusInelastic::ApplyYourself(), G4HESigmaPlusInelastic::ApplyYourself(), G4HEXiMinusInelastic::ApplyYourself(), G4HEXiZeroInelastic::ApplyYourself(), G4HEInelastic::FillParticleChange(), G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(), G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda(), G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(), G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus(), G4HEAntiProtonInelastic::FirstIntInCasAntiProton(), G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus(), G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus(), G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus(), G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero(), G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(), G4HEKaonPlusInelastic::FirstIntInCasKaonPlus(), G4HEKaonZeroInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(), G4HELambdaInelastic::FirstIntInCasLambda(), G4HENeutronInelastic::FirstIntInCasNeutron(), G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus(), G4HEPionMinusInelastic::FirstIntInCasPionMinus(), G4HEPionPlusInelastic::FirstIntInCasPionPlus(), G4HEProtonInelastic::FirstIntInCasProton(), G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus(), G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus(), G4HEXiMinusInelastic::FirstIntInCasXiMinus(), G4HEXiZeroInelastic::FirstIntInCasXiZero(), G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::QuasiElasticScattering(), G4HEInelastic::StrangeParticlePairProduction(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ getEnergy()

◆ getFlag()

G4bool G4HEVector::getFlag ( )

Definition at line 414 of file G4HEVector.cc.

415 {
416 return flag;
417 }

◆ getKineticEnergy()

◆ getMass()

G4double G4HEVector::getMass ( ) const

Definition at line 361 of file G4HEVector.cc.

362{
363 return mass;
364}

Referenced by G4HEAntiKaonZeroInelastic::ApplyYourself(), G4HEAntiLambdaInelastic::ApplyYourself(), G4HEAntiNeutronInelastic::ApplyYourself(), G4HEAntiOmegaMinusInelastic::ApplyYourself(), G4HEAntiProtonInelastic::ApplyYourself(), G4HEAntiSigmaMinusInelastic::ApplyYourself(), G4HEAntiSigmaPlusInelastic::ApplyYourself(), G4HEAntiXiMinusInelastic::ApplyYourself(), G4HEAntiXiZeroInelastic::ApplyYourself(), G4HEKaonMinusInelastic::ApplyYourself(), G4HEKaonPlusInelastic::ApplyYourself(), G4HEKaonZeroInelastic::ApplyYourself(), G4HEKaonZeroLongInelastic::ApplyYourself(), G4HEKaonZeroShortInelastic::ApplyYourself(), G4HELambdaInelastic::ApplyYourself(), G4HENeutronInelastic::ApplyYourself(), G4HEOmegaMinusInelastic::ApplyYourself(), G4HEPionMinusInelastic::ApplyYourself(), G4HEPionPlusInelastic::ApplyYourself(), G4HEProtonInelastic::ApplyYourself(), G4HESigmaMinusInelastic::ApplyYourself(), G4HESigmaPlusInelastic::ApplyYourself(), G4HEXiMinusInelastic::ApplyYourself(), G4HEXiZeroInelastic::ApplyYourself(), G4HEInelastic::ElasticScattering(), G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(), G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda(), G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(), G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus(), G4HEAntiProtonInelastic::FirstIntInCasAntiProton(), G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus(), G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus(), G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus(), G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero(), G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(), G4HEKaonPlusInelastic::FirstIntInCasKaonPlus(), G4HEKaonZeroInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(), G4HELambdaInelastic::FirstIntInCasLambda(), G4HENeutronInelastic::FirstIntInCasNeutron(), G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus(), G4HEPionMinusInelastic::FirstIntInCasPionMinus(), G4HEPionPlusInelastic::FirstIntInCasPionPlus(), G4HEProtonInelastic::FirstIntInCasProton(), G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus(), G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus(), G4HEXiMinusInelastic::FirstIntInCasXiMinus(), G4HEXiZeroInelastic::FirstIntInCasXiZero(), G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::NBodyPhaseSpace(), G4HEInelastic::NuclearExcitation(), G4HEInelastic::QuasiElasticScattering(), G4HEInelastic::StrangeParticlePairProduction(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ getMomentum()

◆ getName()

G4String G4HEVector::getName ( ) const

Definition at line 431 of file G4HEVector.cc.

432{
433 return particleName;
434}

Referenced by G4HEAntiKaonZeroInelastic::ApplyYourself(), G4HEAntiLambdaInelastic::ApplyYourself(), G4HEAntiNeutronInelastic::ApplyYourself(), G4HEAntiOmegaMinusInelastic::ApplyYourself(), G4HEAntiProtonInelastic::ApplyYourself(), G4HEAntiSigmaMinusInelastic::ApplyYourself(), G4HEAntiSigmaPlusInelastic::ApplyYourself(), G4HEAntiXiMinusInelastic::ApplyYourself(), G4HEAntiXiZeroInelastic::ApplyYourself(), G4HEKaonMinusInelastic::ApplyYourself(), G4HEKaonPlusInelastic::ApplyYourself(), G4HEKaonZeroInelastic::ApplyYourself(), G4HEKaonZeroLongInelastic::ApplyYourself(), G4HEKaonZeroShortInelastic::ApplyYourself(), G4HELambdaInelastic::ApplyYourself(), G4HENeutronInelastic::ApplyYourself(), G4HEOmegaMinusInelastic::ApplyYourself(), G4HEPionMinusInelastic::ApplyYourself(), G4HEPionPlusInelastic::ApplyYourself(), G4HEProtonInelastic::ApplyYourself(), G4HESigmaMinusInelastic::ApplyYourself(), G4HESigmaPlusInelastic::ApplyYourself(), G4HEXiMinusInelastic::ApplyYourself(), G4HEXiZeroInelastic::ApplyYourself(), G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(), G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda(), G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(), G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus(), G4HEAntiProtonInelastic::FirstIntInCasAntiProton(), G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus(), G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus(), G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus(), G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(), G4HEKaonPlusInelastic::FirstIntInCasKaonPlus(), G4HEKaonZeroInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(), G4HELambdaInelastic::FirstIntInCasLambda(), G4HENeutronInelastic::FirstIntInCasNeutron(), G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus(), G4HEPionMinusInelastic::FirstIntInCasPionMinus(), G4HEPionPlusInelastic::FirstIntInCasPionPlus(), G4HEProtonInelastic::FirstIntInCasProton(), G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus(), G4HEXiMinusInelastic::FirstIntInCasXiMinus(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ getParticleName()

G4String G4HEVector::getParticleName ( G4int  code,
G4int  baryon 
)

Definition at line 71 of file G4HEVector.cc.

72 {
73 G4String name;
74 if(aCode == 211) name = "PionPlus";
75 else if(aCode == 111) name = "PionZero";
76 else if(aCode == -211) name = "PionMinus";
77 else if(aCode == 321) name = "KaonPlus";
78 else if(aCode == 311) name = "KaonZero";
79 else if(aCode == -311) name = "AntiKaonZero";
80 else if(aCode == -321) name = "KaonMinus";
81 else if(aCode == 310) name = "KaonZeroShort";
82 else if(aCode == 130) name = "KaonZeroLong";
83 else if(aCode == 2212) name = "Proton";
84 else if(aCode == -2212) name = "AntiProton";
85 else if(aCode == 2112) name = "Neutron";
86 else if(aCode == -2112) name = "AntiNeutron";
87 else if(aCode == 3122) name = "Lambda";
88 else if(aCode == -3122) name = "AntiLambda";
89 else if(aCode == 3222) name = "SigmaPlus";
90 else if(aCode == 3212) name = "SigmaZero";
91 else if(aCode == 3112) name = "SigmaMinus";
92 else if(aCode == -3222) name = "AntiSigmaPlus";
93 else if(aCode == -3212) name = "AntiSigmaZero";
94 else if(aCode == -3112) name = "AntiSigmaMinus";
95 else if(aCode == 3322) name = "XiZero";
96 else if(aCode == 3312) name = "XiMinus";
97 else if(aCode == -3322) name = "AntiXiZero";
98 else if(aCode == -3312) name = "AntiXiMinus";
99 else if(aCode == 3334) name = "OmegaMinus";
100 else if(aCode == -3334) name = "AntiOmegaMinus";
101 else if(aCode == 0)
102 {
103 if(aBaryon==2) name = "Deuteron";
104 else if(aBaryon==3) name = "Triton";
105 else if(aBaryon==4) name = "Alpha";
106 }
107 else if(aCode == 22) name = "Gamma";
108 else
109 {
110 G4cout << "particle " << aCode << " " <<aBaryon<< " not known in this generator!!" << G4endl;
111 }
112 return name;
113 }
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by G4HEVector().

◆ getQuarkContent()

G4int G4HEVector::getQuarkContent ( G4int  flavor)

Definition at line 452 of file G4HEVector.cc.

453 {
454 if(flavor > 0 && flavor < 8)
455 {
456 G4int check;
457 check = FillQuarkContent();
458 if(check != code)
459 {
460 return 0;
461 }
462 else
463 {
464 return theQuarkContent[flavor-1];
465 }
466 }
467 else
468 {
469 return 0;
470 }
471 }

◆ getSide()

G4int G4HEVector::getSide ( )

Definition at line 400 of file G4HEVector.cc.

401 {
402 return side;
403 }

Referenced by G4HEInelastic::HighEnergyCascading(), and G4HEInelastic::MediumEnergyCascading().

◆ getStrangenessNumber()

G4int G4HEVector::getStrangenessNumber ( ) const

Definition at line 446 of file G4HEVector.cc.

447{
448 return strangeness;
449}

Referenced by G4HEInelastic::TuningOfHighEnergyCascading().

◆ getTOF()

G4double G4HEVector::getTOF ( )

Definition at line 386 of file G4HEVector.cc.

387 {
388 return timeOfFlight;
389 }

◆ getTotalMomentum()

G4double G4HEVector::getTotalMomentum ( ) const

Definition at line 166 of file G4HEVector.cc.

167{
168 return std::sqrt(px*px + py*py + pz*pz);
169}

Referenced by G4HEAntiSigmaZeroInelastic::ApplyYourself(), G4HESigmaZeroInelastic::ApplyYourself(), G4HEInelastic::ElasticScattering(), G4HEAntiKaonZeroInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasAntiKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasAntiKaonZero(), G4HEAntiLambdaInelastic::FirstIntInCasAntiLambda(), G4HEAntiNeutronInelastic::FirstIntInCasAntiNeutron(), G4HEAntiOmegaMinusInelastic::FirstIntInCasAntiOmegaMinus(), G4HEAntiProtonInelastic::FirstIntInCasAntiProton(), G4HEAntiSigmaMinusInelastic::FirstIntInCasAntiSigmaMinus(), G4HEAntiSigmaPlusInelastic::FirstIntInCasAntiSigmaPlus(), G4HEAntiXiMinusInelastic::FirstIntInCasAntiXiMinus(), G4HEAntiXiZeroInelastic::FirstIntInCasAntiXiZero(), G4HEKaonMinusInelastic::FirstIntInCasKaonMinus(), G4HEKaonPlusInelastic::FirstIntInCasKaonPlus(), G4HEKaonZeroInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroLongInelastic::FirstIntInCasKaonZero(), G4HEKaonZeroShortInelastic::FirstIntInCasKaonZero(), G4HELambdaInelastic::FirstIntInCasLambda(), G4HENeutronInelastic::FirstIntInCasNeutron(), G4HEOmegaMinusInelastic::FirstIntInCasOmegaMinus(), G4HEPionMinusInelastic::FirstIntInCasPionMinus(), G4HEPionPlusInelastic::FirstIntInCasPionPlus(), G4HEProtonInelastic::FirstIntInCasProton(), G4HESigmaMinusInelastic::FirstIntInCasSigmaMinus(), G4HESigmaPlusInelastic::FirstIntInCasSigmaPlus(), G4HEXiMinusInelastic::FirstIntInCasXiMinus(), G4HEXiZeroInelastic::FirstIntInCasXiZero(), G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ getType()

◆ Impu()

G4double G4HEVector::Impu ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 614 of file G4HEVector.cc.

615 {
616 return ( - sqr( p1.energy - p2.energy)
617 + sqr( p1.px - p2.px)
618 + sqr( p1.py - p2.py)
619 + sqr( p1.pz - p2.pz) );
620 }
T sqr(const T &x)
Definition: templates.hh:145

◆ Length()

◆ Lor()

void G4HEVector::Lor ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 558 of file G4HEVector.cc.

559 {
560 G4double a;
561 a = ( Dot(p1,p2)/(p2.energy+p2.mass) - p1.energy ) / p2.mass;
562 px = p1.px + a*p2.px;
563 py = p1.py + a*p2.py;
564 pz = p1.pz + a*p2.pz;
565 energy = std::sqrt( sqr(p1.mass) + px*px + py*py + pz*pz);
566 mass = p1.mass;
569 side = p1.side;
570 flag = p1.flag;
571 code = p1.code;
574 baryon = p1.baryon;
576 }
G4double Dot(const G4HEVector &p1, const G4HEVector &p2)
Definition: G4HEVector.cc:653

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::NBodyPhaseSpace(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ Norz()

void G4HEVector::Norz ( const G4HEVector p)

Definition at line 689 of file G4HEVector.cc.

690 {
691 G4double a = p.px*p.px + p.py*p.py + p.pz*p.pz;
692 if (a > 0.0) a = 1./std::sqrt(a);
693 px = a * p.px;
694 py = a * p.py;
695 pz = a * p.pz;
696 mass = p.mass;
697 energy = std::sqrt(px*px + py*py + pz*pz + mass*mass);
699 charge = p.charge;
701 side = p.side;
702 flag = p.flag;
703 code = p.code;
706 baryon = p.baryon;
708 return;
709 }

◆ operator=()

G4HEVector & G4HEVector::operator= ( const G4HEVector p)
inline

Definition at line 119 of file G4HEVector.hh.

120 {
121 px = p.px;
122 py = p.py;
123 pz = p.pz;
124 energy = p.energy;
126 mass = p.mass;
127 charge = p.charge;
129 side = p.side;
130 flag = p.flag;
131 code = p.code;
134 baryon = p.baryon;
136 return *this;
137 }

◆ Print()

void G4HEVector::Print ( G4int  L) const

Definition at line 1289 of file G4HEVector.cc.

1290{
1291 G4cout << "HEV: "
1292 << L << " " << px << " " << py << " " << pz << " "
1293 << energy << " " << mass << " " << charge << " "
1294 << timeOfFlight << " " << side << " " << flag << " "
1295 << code << " " << baryon << " " << particleName << G4endl;
1296 return;
1297}

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ setCharge()

void G4HEVector::setCharge ( G4double  c)

Definition at line 367 of file G4HEVector.cc.

368 {
369 charge = c;
370 return;
371 }

◆ setCode()

void G4HEVector::setCode ( G4int  c)

Definition at line 420 of file G4HEVector.cc.

421 {
422 code = c;
423 return;
424 }

◆ setDefinition()

void G4HEVector::setDefinition ( G4String  name)

Definition at line 812 of file G4HEVector.cc.

813 {
814 if(name == "PionPlus")
815 {
816 mass = 0.1395700;
817 charge = 1.;
818 code = 211;
819 particleType = "Meson";
820 particleName = name;
821 baryon = 0;
822 strangeness = 0;
823 }
824 else if(name == "PionZero")
825 {
826 mass = 0.1349764;
827 charge = 0.;
828 code = 111;
829 particleType = "Meson";
830 particleName = name;
831 baryon = 0;
832 strangeness = 0;
833 }
834 else if(name == "PionMinus")
835 {
836 mass = 0.1395700;
837 charge = -1.;
838 code = -211;
839 particleType = "Meson";
840 particleName = name;
841 baryon = 0;
842 strangeness = 0;
843 }
844 else if(name == "KaonPlus")
845 {
846 mass = 0.493677;
847 charge = 1.;
848 code = 321;
849 particleType = "Meson";
850 particleName = name;
851 baryon = 0;
852 strangeness = 1;
853 }
854 else if(name == "KaonZero")
855 {
856 mass = 0.497672;
857 charge = 0.;
858 code = 311;
859 particleType = "Meson";
860 particleName = name;
861 baryon = 0;
862 strangeness = 1;
863 }
864 else if(name == "AntiKaonZero")
865 {
866 mass = 0.497672;
867 charge = 0.;
868 code = -311;
869 particleType = "Meson";
870 particleName = name;
871 baryon = 0;
872 strangeness =-1;
873 }
874 else if(name == "KaonMinus")
875 {
876 mass = 0.493677;
877 charge = -1.;
878 code = -321;
879 particleType = "Meson";
880 particleName = name;
881 baryon = 0;
882 strangeness = -1;
883 }
884 else if(name == "KaonZeroShort")
885 {
886 mass = 0.497672;
887 charge = 0.;
888 code = 310;
889 particleType = "Meson";
890 particleName = name;
891 baryon = 0;
892 strangeness = 0;
893 }
894 else if(name == "KaonZeroLong")
895 {
896 mass = 0.497672;
897 charge = 0.;
898 code = 130;
899 particleType = "Meson";
900 particleName = name;
901 baryon = 0;
902 strangeness = 0;
903 }
904 else if(name == "Proton")
905 {
906 mass = 0.9382723;
907 charge = 1.;
908 code = 2212;
909 particleType = "Baryon";
910 particleName = name;
911 baryon = 1;
912 strangeness = 0;
913 }
914 else if(name == "AntiProton")
915 {
916 mass = 0.9382723;
917 charge = -1.;
918 code = -2212;
919 particleType = "AntiBaryon";
920 particleName = name;
921 baryon = -1;
922 strangeness = 0;
923 }
924 else if(name == "Neutron")
925 {
926 mass = 0.93956563;
927 charge = 0.;
928 code = 2112;
929 particleType = "Baryon";
930 particleName = name;
931 baryon = 1;
932 strangeness = 0;
933 }
934 else if(name == "AntiNeutron")
935 {
936 mass = 0.93956563;
937 charge = 0.;
938 code = -2112;
939 particleType = "AntiBaryon";
940 particleName = name;
941 baryon = -1;
942 strangeness = 0;
943 }
944 else if(name == "Lambda")
945 {
946 mass = 1.115684;
947 charge = 0.;
948 code = 3122;
949 particleType = "Baryon";
950 particleName = name;
951 baryon = 1;
952 strangeness = -1;
953 }
954 else if(name == "AntiLambda")
955 {
956 mass = 1.115684;
957 charge = 0.;
958 code = -3122;
959 particleType = "AntiBaryon";
960 particleName = name;
961 baryon = -1;
962 strangeness = 1;
963 }
964 else if(name == "SigmaPlus")
965 {
966 mass = 1.18937;
967 charge = 1.;
968 code = 3222;
969 particleType = "Baryon";
970 particleName = name;
971 baryon = 1;
972 strangeness = -1;
973 }
974 else if(name == "SigmaZero")
975 {
976 mass = 1.19255;
977 charge = 0.;
978 code = 3212;
979 particleType = "Baryon";
980 particleName = name;
981 baryon = 1;
982 strangeness = -1;
983 }
984 else if(name == "SigmaMinus")
985 {
986 mass = 1.19744;
987 charge = -1.;
988 code = 3112;
989 particleType = "Baryon";
990 particleName = name;
991 baryon = 1;
992 strangeness = -1;
993 }
994 else if(name == "AntiSigmaPlus")
995 {
996 mass = 1.18937;
997 charge = -1.;
998 code = -3222;
999 particleType = "AntiBaryon";
1000 particleName = name;
1001 baryon = -1;
1002 strangeness = 1;
1003 }
1004 else if(name == "AntiSigmaZero")
1005 {
1006 mass = 1.19255;
1007 charge = 0.;
1008 code = -3212;
1009 particleType = "AntiBaryon";
1010 particleName = name;
1011 baryon = -1;
1012 strangeness = 1;
1013 }
1014 else if(name == "AntiSigmaMinus")
1015 {
1016 mass = 1.19744;
1017 charge = 1.;
1018 code = -3112;
1019 particleType = "AntiBaryon";
1020 particleName = name;
1021 baryon = -1;
1022 strangeness = 1;
1023 }
1024 else if(name == "XiZero")
1025 {
1026 mass = 1.3149;
1027 charge = 0.;
1028 code = 3322;
1029 particleType = "Baryon";
1030 particleName = name;
1031 baryon = 1;
1032 strangeness = -2;
1033 }
1034 else if(name == "XiMinus")
1035 {
1036 mass = 1.32132;
1037 charge = -1.;
1038 code = 3312;
1039 particleType = "Baryon";
1040 particleName = name;
1041 baryon = 1;
1042 strangeness = -2;
1043 }
1044 else if(name == "AntiXiZero")
1045 {
1046 mass = 1.3149;
1047 charge = 0.;
1048 code = -3322;
1049 particleType = "AntiBaryon";
1050 particleName = name;
1051 baryon = -1;
1052 strangeness = 2;
1053 }
1054 else if(name == "AntiXiMinus")
1055 {
1056 mass = 1.32132;
1057 charge = 1.;
1058 code = -3312;
1059 particleType = "AntiBaryon";
1060 particleName = name;
1061 baryon = -1;
1062 strangeness = 2;
1063 }
1064 else if(name == "OmegaMinus")
1065 {
1066 mass = 1.67245;
1067 charge = -1.;
1068 code = 3334;
1069 particleType = "Baryon";
1070 particleName = name;
1071 baryon = 1;
1072 strangeness = -3;
1073 }
1074 else if(name == "AntiOmegaMinus")
1075 {
1076 mass = 1.67245;
1077 charge = 1.;
1078 code = -3334;
1079 particleType = "AntiBaryon";
1080 particleName = name;
1081 baryon = -1;
1082 strangeness = 3;
1083 }
1084 else if(name == "Deuteron")
1085 {
1086 mass = 1.875613;
1087 charge = 1.;
1088 code = 0;
1089 particleType = "Nucleus";
1090 particleName = name;
1091 baryon = 2;
1092 strangeness = 0;
1093 }
1094 else if(name == "Triton")
1095 {
1096 mass = 2.80925;
1097 charge = 1.;
1098 code = 0;
1099 particleType = "Nucleus";
1100 particleName = name;
1101 baryon = 3;
1102 strangeness = 0;
1103 }
1104 else if(name == "Alpha")
1105 {
1106 mass = 3.727417;
1107 charge = 2.;
1108 code = 0;
1109 particleType = "Nucleus";
1110 particleName = name;
1111 baryon = 4;
1112 strangeness = 0;
1113 }
1114 else if(name == "Gamma")
1115 {
1116 mass = 0.;
1117 charge = 0.;
1118 code = 22;
1119 particleType = "Boson";
1120 particleName = name;
1121 baryon = 0;
1122 strangeness = 0;
1123 }
1124 else
1125 {
1126 G4cout << "particle " << name << " not known in this generator!!" << G4endl;
1127 return;
1128 }
1129 px = 0.;
1130 py = 0.;
1131 pz = 0.;
1132 kineticEnergy = 0.;
1133 energy = mass;
1134 timeOfFlight = 0.;
1135 side = 0;
1136 flag = false;
1137 return;
1138 }

Referenced by G4HEAntiKaonZeroInelastic::ApplyYourself(), G4HEAntiLambdaInelastic::ApplyYourself(), G4HEAntiNeutronInelastic::ApplyYourself(), G4HEAntiOmegaMinusInelastic::ApplyYourself(), G4HEAntiProtonInelastic::ApplyYourself(), G4HEAntiSigmaMinusInelastic::ApplyYourself(), G4HEAntiSigmaPlusInelastic::ApplyYourself(), G4HEAntiXiMinusInelastic::ApplyYourself(), G4HEAntiXiZeroInelastic::ApplyYourself(), G4HEKaonMinusInelastic::ApplyYourself(), G4HEKaonPlusInelastic::ApplyYourself(), G4HEKaonZeroInelastic::ApplyYourself(), G4HEKaonZeroLongInelastic::ApplyYourself(), G4HEKaonZeroShortInelastic::ApplyYourself(), G4HELambdaInelastic::ApplyYourself(), G4HENeutronInelastic::ApplyYourself(), G4HEOmegaMinusInelastic::ApplyYourself(), G4HEPionMinusInelastic::ApplyYourself(), G4HEPionPlusInelastic::ApplyYourself(), G4HEProtonInelastic::ApplyYourself(), G4HESigmaMinusInelastic::ApplyYourself(), G4HESigmaPlusInelastic::ApplyYourself(), G4HEXiMinusInelastic::ApplyYourself(), G4HEXiZeroInelastic::ApplyYourself(), G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::SetParticles().

◆ setEnergy()

◆ setEnergyAndUpdate()

void G4HEVector::setEnergyAndUpdate ( G4double  e)

Definition at line 233 of file G4HEVector.cc.

234 {
235 if (e <= mass)
236 {
237 energy = mass;
238 kineticEnergy = 0.;
239 px = 0.;
240 py = 0.;
241 pz = 0.;
242 }
243 else
244 {
245 energy = e;
247 G4double momold = std::sqrt(px*px + py*py + pz*pz);
248 G4double momnew = std::sqrt(energy*energy - mass*mass);
249 if (momold == 0.)
250 {
251 G4double cost = 1.0- 2.0*G4UniformRand();
252 G4double sint = std::sqrt(1. - cost*cost);
253 G4double phi = twopi* G4UniformRand();
254 px = momnew * sint * std::cos(phi);
255 py = momnew * sint * std::sin(phi);
256 pz = momnew * cost;
257 }
258 else
259 {
260 momnew /= momold;
261 px *= momnew;
262 py *= momnew;
263 pz *= momnew;
264 }
265 }
266 return;
267 }
#define G4UniformRand()
Definition: Randomize.hh:53

Referenced by G4HEInelastic::HighEnergyCascading(), and G4HEInelastic::MediumEnergyCascading().

◆ setFlag()

◆ setKineticEnergy()

void G4HEVector::setKineticEnergy ( G4double  ekin)

◆ setKineticEnergyAndUpdate()

void G4HEVector::setKineticEnergyAndUpdate ( G4double  ekin)

Definition at line 277 of file G4HEVector.cc.

278 {
279 if (ekin <= 0.)
280 {
281 energy = mass;
282 kineticEnergy = 0.;
283 px = 0.;
284 py = 0.;
285 pz = 0.;
286 }
287 else
288 {
289 energy = ekin + mass;
290 kineticEnergy = ekin;
291 G4double momold = std::sqrt(px*px + py*py + pz*pz);
292 G4double momnew = std::sqrt(energy*energy - mass*mass);
293 if (momold == 0.)
294 {
295 G4double cost = 1.0-2.0*G4UniformRand();
296 G4double sint = std::sqrt(1. - cost*cost);
297 G4double phi = twopi* G4UniformRand();
298 px = momnew * sint * std::cos(phi);
299 py = momnew * sint * std::sin(phi);
300 pz = momnew * cost;
301 }
302 else
303 {
304 momnew /= momold;
305 px *= momnew;
306 py *= momnew;
307 pz *= momnew;
308 }
309 }
310 return;
311 }

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), G4HEInelastic::NBodyPhaseSpace(), G4HEInelastic::QuasiElasticScattering(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ setMass()

◆ setMassAndUpdate()

void G4HEVector::setMassAndUpdate ( G4double  m)

Definition at line 331 of file G4HEVector.cc.

332{
333 kineticEnergy = Amax(0., energy - mass);
334 mass = amass;
336 G4double momnew = std::sqrt(Amax(0., energy*energy - mass*mass));
337 if (momnew == 0.0) {
338 px = 0.;
339 py = 0.;
340 pz = 0.;
341 } else {
342 G4double momold = std::sqrt(px*px + py*py + pz*pz);
343 if (momold == 0.) {
344 G4double cost = 1.-2.*G4UniformRand();
345 G4double sint = std::sqrt(1.-cost*cost);
346 G4double phi = twopi*G4UniformRand();
347 px = momnew*sint*std::cos(phi);
348 py = momnew*sint*std::sin(phi);
349 pz = momnew*cost;
350 } else {
351 momnew /= momold;
352 px *= momnew ;
353 py *= momnew ;
354 pz *= momnew ;
355 }
356 }
357 return;
358}

◆ setMomentum() [1/5]

void G4HEVector::setMomentum ( const G4ParticleMomentum mom)

Definition at line 126 of file G4HEVector.cc.

127 {
128 px = mom->x();
129 py = mom->y();
130 pz = mom->z();
131 return;
132 }

◆ setMomentum() [2/5]

◆ setMomentum() [3/5]

void G4HEVector::setMomentum ( G4double  x,
G4double  y 
)

Definition at line 192 of file G4HEVector.cc.

193{
194 px = x;
195 py = y;
196 return;
197}

◆ setMomentum() [4/5]

void G4HEVector::setMomentum ( G4double  x,
G4double  y,
G4double  z 
)

Definition at line 172 of file G4HEVector.cc.

173{
174 px = x;
175 py = y;
176 pz = z;
177 return;
178}

◆ setMomentum() [5/5]

void G4HEVector::setMomentum ( G4double  z)

Definition at line 210 of file G4HEVector.cc.

211 {
212 pz = z;
213 return;
214 }

◆ setMomentumAndUpdate() [1/5]

void G4HEVector::setMomentumAndUpdate ( const G4ParticleMomentum mom)

Definition at line 146 of file G4HEVector.cc.

147 {
148 px = mom->x();
149 py = mom->y();
150 pz = mom->z();
151 energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
153 return;
154 }

◆ setMomentumAndUpdate() [2/5]

◆ setMomentumAndUpdate() [3/5]

void G4HEVector::setMomentumAndUpdate ( G4double  x,
G4double  y 
)

Definition at line 200 of file G4HEVector.cc.

201 {
202 px = x;
203 py = y;
204 energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
206 return;
207 }

◆ setMomentumAndUpdate() [4/5]

void G4HEVector::setMomentumAndUpdate ( G4double  x,
G4double  y,
G4double  z 
)

Definition at line 181 of file G4HEVector.cc.

182{
183 px = x;
184 py = y;
185 pz = z;
186 energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
188 return;
189}

◆ setMomentumAndUpdate() [5/5]

void G4HEVector::setMomentumAndUpdate ( G4double  z)

Definition at line 217 of file G4HEVector.cc.

218 {
219 pz = z;
220 energy = std::sqrt(mass*mass + px*px + py*py + pz*pz);
222 return;
223 }

◆ setSide()

◆ setTOF()

◆ setZero()

void G4HEVector::setZero ( )

Definition at line 496 of file G4HEVector.cc.

497 {
498 px = 0.0;
499 py = 0.0;
500 pz = 0.0;
501 energy = 0.0;
502 kineticEnergy = 0.0;
503 mass = 0.0;
504 charge = 0.0;
505 timeOfFlight = 0.0;
506 side = 0;
507 flag = false;
508 code = 0;
509 particleName = "";
510 particleType = "";
511 baryon = 0;
512 strangeness = 0;
513 }

Referenced by G4HEInelastic::HighEnergyCascading(), G4HEInelastic::HighEnergyClusterProduction(), G4HEInelastic::MediumEnergyCascading(), G4HEInelastic::MediumEnergyClusterProduction(), and G4HEInelastic::TuningOfHighEnergyCascading().

◆ Smul()

void G4HEVector::Smul ( const G4HEVector p,
G4double  h 
)

◆ SmulAndUpdate()

◆ Sub()

void G4HEVector::Sub ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 537 of file G4HEVector.cc.

538 {
539 px = p1.px - p2.px;
540 py = p1.py - p2.py;
541 pz = p1.pz - p2.pz;
542 energy = p1.energy - p2.energy;
543 G4double b = energy*energy - px*px - py*py - pz*pz;
544 if( b < 0 )
545 mass = -1. * std::sqrt( -b );
546 else
547 mass = std::sqrt( b );
549 charge = p1.charge - p2.charge;
550 code = 0;
551 particleName = "";
552 particleType = "";
553 baryon = 0;
554 strangeness = 0;
555 }

Referenced by G4HEInelastic::MediumEnergyCascading().

◆ Sub3()

void G4HEVector::Sub3 ( const G4HEVector p1,
const G4HEVector p2 
)

Definition at line 632 of file G4HEVector.cc.

633 {
634 px = p1.px - p2.px;
635 py = p1.py - p2.py;
636 pz = p1.pz - p2.pz;
637 return;
638 }

Referenced by G4HEInelastic::TuningOfHighEnergyCascading().

◆ Trac()

void G4HEVector::Trac ( const G4HEVector p1,
const G4HEVector mx,
const G4HEVector my,
const G4HEVector mz 
)

Definition at line 798 of file G4HEVector.cc.

800 {
801 G4double qx, qy, qz;
802 qx = mx.px*p1.px + mx.py*p1.py + mx.pz*p1.pz;
803 qy = my.px*p1.px + my.py*p1.py + my.pz*p1.pz;
804 qz = mz.px*p1.px + mz.py*p1.py + mz.pz*p1.pz;
805 px = qx ;
806 py = qy ;
807 pz = qz ;
808 return;
809 }

Member Data Documentation

◆ baryon

G4int G4HEVector::baryon
protected

◆ charge

G4double G4HEVector::charge
protected

◆ code

◆ energy

◆ flag

G4bool G4HEVector::flag
protected

◆ kineticEnergy

◆ mass

◆ particleName

G4String G4HEVector::particleName
protected

◆ particleType

G4String G4HEVector::particleType
protected

◆ px

◆ py

◆ pz

◆ side

G4int G4HEVector::side
protected

◆ strangeness

G4int G4HEVector::strangeness
protected

◆ theAntiQuarkContent

G4int G4HEVector::theAntiQuarkContent[NumberOfQuarkFlavor]
protected

Definition at line 69 of file G4HEVector.hh.

Referenced by FillQuarkContent(), G4HEVector(), and getAntiQuarkContent().

◆ theQuarkContent

G4int G4HEVector::theQuarkContent[NumberOfQuarkFlavor]
protected

Definition at line 68 of file G4HEVector.hh.

Referenced by FillQuarkContent(), G4HEVector(), and getQuarkContent().

◆ timeOfFlight

G4double G4HEVector::timeOfFlight
protected

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