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);
 
 1168       if (tempPDGcode<=NumberOfQuarkFlavor){
 
 1175       G4int temp0 = -1*tempPDGcode; 
 
 1176       if (temp0 <= NumberOfQuarkFlavor) {
 
 1189     if (tempPDGcode == 130) {     
 
 1199     if ((quark2==0)||(quark3==0)){ 
 
 1202     if (quark2<quark3) { 
 
 1206     if (quark2>=NumberOfQuarkFlavor){
 
 1212       if (tempPDGcode >0) {
 
 1221       if (tempPDGcode >0) {
 
 1231     for (
G4int flavor= 0; flavor<NumberOfQuarkFlavor-1; flavor+=2){
 
 1234       totalCharge += 2./3.*echarge*theQuarkContent[flavor+1];
 
 1235       totalCharge += (-2./3.)*echarge*theAntiQuarkContent[flavor+1];
 
 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)) { 
 
 1261     if (quark1>=NumberOfQuarkFlavor) {
 
 1264     if (tempPDGcode >0) {
 
 1275     for (
G4int flavor= 0; flavor<NumberOfQuarkFlavor-1; flavor+=2){
 
 1278       totalCharge += 2./3.*echarge*theQuarkContent[flavor+1];
 
 1279       totalCharge += (-2./3.)*echarge*theAntiQuarkContent[flavor+1];
 
 1281     if (std::abs(totalCharge - 
charge) > 0.1*echarge) tempPDGcode = 0;
 
 1292          << L << 
" " << 
px << 
" " <<  
py << 
" " <<  
pz << 
" "