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";
103 if(aBaryon==2) name =
"Deuteron";
104 else if(aBaryon==3) name =
"Triton";
105 else if(aBaryon==4) name =
"Alpha";
107 else if(aCode == 22) name =
"Gamma";
110 G4cout <<
"particle " << aCode <<
" " <<aBaryon<<
" not known in this generator!!" <<
G4endl;
252 G4double sint = std::sqrt(1. - cost*cost);
254 px = momnew * sint * std::cos(phi);
255 py = momnew * sint * std::sin(phi);
296 G4double sint = std::sqrt(1. - cost*cost);
298 px = momnew * sint * std::cos(phi);
299 py = momnew * sint * std::sin(phi);
345 G4double sint = std::sqrt(1.-cost*cost);
347 px = momnew*sint*std::cos(phi);
348 py = momnew*sint*std::sin(phi);
454 if(flavor > 0 && flavor < 8)
476 if(flavor > 0 && flavor < 8)
524 mass = -1. * std::sqrt( -b );
526 mass = std::sqrt( b );
545 mass = -1. * std::sqrt( -b );
547 mass = std::sqrt( b );
583 if (std::fabs(a) > 1.0) {
584 if (a < 0.0) a = -1.0;
598 if( std::fabs(a) > 1.0 )
655 return ( p1.
px * p2.
px + p1.
py * p2.
py + p1.
pz * p2.
pz );
692 if (a > 0.0) a = 1./std::sqrt(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;
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;
778 pp = std::sqrt(my.
px*my.
px + my.
py*my.
py + my.
pz*my.
pz);
786 pp = std::sqrt(mz.
px*mz.
px + mz.
py*mz.
py + mz.
pz*mz.
pz);
814 if(name ==
"PionPlus")
824 else if(name ==
"PionZero")
834 else if(name ==
"PionMinus")
844 else if(name ==
"KaonPlus")
854 else if(name ==
"KaonZero")
864 else if(name ==
"AntiKaonZero")
874 else if(name ==
"KaonMinus")
884 else if(name ==
"KaonZeroShort")
894 else if(name ==
"KaonZeroLong")
904 else if(name ==
"Proton")
914 else if(name ==
"AntiProton")
924 else if(name ==
"Neutron")
934 else if(name ==
"AntiNeutron")
944 else if(name ==
"Lambda")
954 else if(name ==
"AntiLambda")
964 else if(name ==
"SigmaPlus")
974 else if(name ==
"SigmaZero")
984 else if(name ==
"SigmaMinus")
994 else if(name ==
"AntiSigmaPlus")
1004 else if(name ==
"AntiSigmaZero")
1014 else if(name ==
"AntiSigmaMinus")
1024 else if(name ==
"XiZero")
1034 else if(name ==
"XiMinus")
1044 else if(name ==
"AntiXiZero")
1054 else if(name ==
"AntiXiMinus")
1064 else if(name ==
"OmegaMinus")
1074 else if(name ==
"AntiOmegaMinus")
1084 else if(name ==
"Deuteron")
1094 else if(name ==
"Triton")
1104 else if(name ==
"Alpha")
1114 else if(name ==
"Gamma")
1126 G4cout <<
"particle " << name <<
" not known in this generator!!" <<
G4endl;
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);
1175 G4int temp0 = -1*tempPDGcode;
1189 if (tempPDGcode == 130) {
1199 if ((quark2==0)||(quark3==0)){
1202 if (quark2<quark3) {
1212 if (tempPDGcode >0) {
1221 if (tempPDGcode >0) {
1237 if (std::abs(totalCharge-
charge)>0.1*echarge) {
1242 if ((quark1==0)||(quark2==0)||(quark3==0)){
1246 if (std::abs(tempPDGcode) == 3122) {
1251 }
else if (std::abs(tempPDGcode) == 4122) {
1258 if ((quark1<quark2)||(quark2<quark3)||(quark1<quark3)) {
1264 if (tempPDGcode >0) {
1281 if (std::abs(totalCharge -
charge) > 0.1*echarge) tempPDGcode = 0;
1292 << L <<
" " <<
px <<
" " <<
py <<
" " <<
pz <<
" "
G4DLLIMPORT std::ostream G4cout
void Smul(const G4HEVector &p, G4double h)
G4double Impu(const G4HEVector &p1, const G4HEVector &p2)
void setMomentumAndUpdate(const G4ParticleMomentum mom)
void Lor(const G4HEVector &p1, const G4HEVector &p2)
G4double getCharge() const
const G4ParticleMomentum getMomentum() const
void Sub(const G4HEVector &p1, const G4HEVector &p2)
G4int getQuarkContent(G4int flavor)
void Defs(const G4HEVector &p1, const G4HEVector &p2, G4HEVector &my, G4HEVector &mz)
void Norz(const G4HEVector &p)
void setEnergy(G4double e)
void setEnergyAndUpdate(G4double e)
void Add(const G4HEVector &p1, const G4HEVector &p2)
void Add3(const G4HEVector &p1, const G4HEVector &p2)
G4double CosAng(const G4HEVector &p) const
G4int theAntiQuarkContent[NumberOfQuarkFlavor]
void setKineticEnergyAndUpdate(G4double ekin)
void Cross(const G4HEVector &p1, const G4HEVector &p2)
void Exch(G4HEVector &p1)
G4int theQuarkContent[NumberOfQuarkFlavor]
G4double Amax(G4double a, G4double b)
void Defs1(const G4HEVector &p1, const G4HEVector &p2)
G4String getParticleName(G4int code, G4int baryon)
G4double getEnergy() const
G4double Ang(const G4HEVector &p)
void Trac(const G4HEVector &p1, const G4HEVector &mx, const G4HEVector &my, const G4HEVector &mz)
void setCharge(G4double c)
void SmulAndUpdate(const G4HEVector &p, G4double h)
G4double Dot4(const G4HEVector &p1, const G4HEVector &p2)
G4double Dot(const G4HEVector &p1, const G4HEVector &p2)
void setMassAndUpdate(G4double m)
void setKineticEnergy(G4double ekin)
void Print(G4int L) const
G4double getTotalMomentum() const
G4double getKineticEnergy() const
G4int getBaryonNumber() const
void setMomentum(const G4ParticleMomentum mom)
void setDefinition(G4String name)
G4int getStrangenessNumber() const
void Sub3(const G4HEVector &p1, const G4HEVector &p2)
G4int getAntiQuarkContent(G4int flavor)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetTotalEnergy() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4int GetQuarkContent(G4int flavor) const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const