Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (15 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/hadronic/models/high_energy/src
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiKaonZeroInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiKaonZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:21 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiKaonZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiLambdaInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiLambdaInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiLambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiNeutronInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiNeutronInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiNeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiOmegaMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiProtonInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiProtonInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiSigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaPlusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiSigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiSigmaZeroInelastic.cc

    r819 r962  
    2626//
    2727// $Id: G4HEAntiSigmaZeroInelastic.cc,v 1.10 2006/06/29 20:30:08 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiXiMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEAntiXiZeroInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEAntiXiZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEAntiXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEInelastic.cc

    r819 r962  
    248248 }
    249249
     250
    250251G4int G4HEInelastic::Factorial(G4int n)
    251  {
    252    G4int result = 1;
    253    if(n<0) exit(EXIT_FAILURE);
    254    while(n>1) result *= n--;
    255    return result;
    256  }
     252{
     253  G4int result = 1;
     254  if (n < 0) G4Exception("G4HEInelastic::Factorial()", "601",
     255                         FatalException, "Negative factorial argument");
     256  while (n > 1) result *= n--;
     257  return result;
     258}
     259
    257260
    258261G4double G4HEInelastic::normal()
     
    11611164                      while( ( ran >= dndl[l] ) && ( l < 20 ) )l++;
    11621165                      l = Imin( 19, l );
    1163                       xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])/2.) );
     1166                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1]) ) );
    11641167                      if( pv[i].getSide() < 0 ) xval *= -1.;
    11651168                      pv[i].setMomentumAndUpdate( xval*et );  // Set the z-momentum
     
    17821785
    17831786void
    1784 G4HEInelastic::TuningOfHighEnergyCascading( G4HEVector pv[],
    1785                                             G4int &vecLen,
    1786                                             G4HEVector incidentParticle,
    1787                                             G4HEVector targetParticle,
    1788                                             G4double atomicWeight,
    1789                                             G4double atomicNumber)
    1790  {
    1791    G4int i,j;
    1792    G4double incidentKineticEnergy   = incidentParticle.getKineticEnergy();
    1793    G4double incidentTotalMomentum   = incidentParticle.getTotalMomentum();
    1794    G4double incidentCharge          = incidentParticle.getCharge();
    1795    G4double incidentMass            = incidentParticle.getMass();
    1796    G4double targetMass              = targetParticle.getMass();
    1797    G4int    pionPlusCode            = PionPlus.getCode();
    1798    G4int    pionMinusCode           = PionMinus.getCode();
    1799    G4int    pionZeroCode            = PionZero.getCode(); 
    1800    G4int    protonCode              = Proton.getCode();
    1801    G4int    neutronCode             = Neutron.getCode();
    1802    G4HEVector *pvmx   = new G4HEVector [10];
    1803    G4double   *reddec = new G4double [7];
    1804 
    1805    if ( incidentKineticEnergy > (25.+G4UniformRand()*75.) )
    1806      {
    1807        G4double reden = -0.7 + 0.29*std::log10(incidentKineticEnergy);
     1787G4HEInelastic::TuningOfHighEnergyCascading(G4HEVector pv[],
     1788                                           G4int &vecLen,
     1789                                           G4HEVector incidentParticle,
     1790                                           G4HEVector targetParticle,
     1791                                           G4double atomicWeight,
     1792                                           G4double atomicNumber)
     1793{
     1794  G4int i,j;
     1795  G4double incidentKineticEnergy   = incidentParticle.getKineticEnergy();
     1796  G4double incidentTotalMomentum   = incidentParticle.getTotalMomentum();
     1797  G4double incidentCharge          = incidentParticle.getCharge();
     1798  G4double incidentMass            = incidentParticle.getMass();
     1799  G4double targetMass              = targetParticle.getMass();
     1800  G4int    pionPlusCode            = PionPlus.getCode();
     1801  G4int    pionMinusCode           = PionMinus.getCode();
     1802  G4int    pionZeroCode            = PionZero.getCode(); 
     1803  G4int    protonCode              = Proton.getCode();
     1804  G4int    neutronCode             = Neutron.getCode();
     1805  G4HEVector *pvmx   = new G4HEVector [10];
     1806  G4double   *reddec = new G4double [7];
     1807
     1808  if (incidentKineticEnergy > (25.+G4UniformRand()*75.) ) {
     1809    G4double reden = -0.7 + 0.29*std::log10(incidentKineticEnergy);
    18081810//       G4double redat =  1.0 - 0.40*std::log10(atomicWeight);
    18091811//       G4double redat = 0.5 - 0.18*std::log10(atomicWeight);
    1810        G4double redat = 0.722 - 0.278*std::log10(atomicWeight);
    1811        G4double pmax   = -200.;
    1812        G4double pmapim = -200.;
    1813        G4double pmapi0 = -200.;
    1814        G4double pmapip = -200.;
    1815        G4int ipmax  = 0;
    1816        G4int maxpim = 0;
    1817        G4int maxpi0 = 0;
    1818        G4int maxpip = 0;
    1819        G4int iphmf;
     1812    G4double redat = 0.722 - 0.278*std::log10(atomicWeight);
     1813    G4double pmax   = -200.;
     1814    G4double pmapim = -200.;
     1815    G4double pmapi0 = -200.;
     1816    G4double pmapip = -200.;
     1817    G4int ipmax  = 0;
     1818    G4int maxpim = 0;
     1819    G4int maxpi0 = 0;
     1820    G4int maxpip = 0;
     1821    G4int iphmf;
    18201822       if (   (G4UniformRand() > (atomicWeight/100.-0.28))
    18211823           && (std::fabs(incidentCharge) > 0.) )
     
    19341936         }
    19351937       vecLen = j;     
    1936      }
    1937 
    1938    pvmx[0] = incidentParticle;
    1939    pvmx[1] = targetParticle;
    1940    pvmx[8].setZero();
    1941    pvmx[2].Add(pvmx[0], pvmx[1]);
    1942    pvmx[3].Lor(pvmx[0], pvmx[2]);
    1943    pvmx[4].Lor(pvmx[1], pvmx[2]);
    1944    
    1945    if(verboseLevel > 1)
    1946      {
    1947        pvmx[0].Print(0);
    1948        incidentParticle.Print(0);
    1949        pvmx[1].Print(1);
    1950        targetParticle.Print(1);
    1951        pvmx[2].Print(2);
    1952        pvmx[3].Print(3);
    1953        pvmx[4].Print(4);
    1954      }
     1938  }
     1939
     1940  pvmx[0] = incidentParticle;
     1941  pvmx[1] = targetParticle;
     1942  pvmx[8].setZero();
     1943  pvmx[2].Add(pvmx[0], pvmx[1]);
     1944  pvmx[3].Lor(pvmx[0], pvmx[2]);
     1945  pvmx[4].Lor(pvmx[1], pvmx[2]);
     1946   
     1947  if (verboseLevel > 1) {
     1948    pvmx[0].Print(0);
     1949    incidentParticle.Print(0);
     1950    pvmx[1].Print(1);
     1951    targetParticle.Print(1);
     1952    pvmx[2].Print(2);
     1953    pvmx[3].Print(3);
     1954    pvmx[4].Print(4);
     1955  }
     1956
     1957  // Calculate leading particle effect in which a single final state
     1958  // particle carries away nearly the maximum allowed momentum, while
     1959  // all other secondaries have reduced momentum.  A secondary is
     1960  // proportionately less likely to be a leading particle as the
     1961  // difference of its quantum numbers with the primary increases.
    19551962 
    1956    G4int ledpar = -1;
    1957    G4double redpar = 0.;
    1958    G4double gespar = 0.;
    1959    G4int incidentS = incidentParticle.getStrangenessNumber();
    1960    if(incidentParticle.getName() == "KaonZeroShort" || incidentParticle.getName() == "KaonZeroLong")
    1961      {
    1962        if(G4UniformRand() < 0.5) { incidentS = 1;}
    1963        else                      { incidentS = -1;}
    1964      }
    1965    G4int incidentB =   incidentParticle.getBaryonNumber();   
    1966 
    1967    if(verboseLevel > 1)
    1968      {
    1969        G4cout << " incidentS, incidentB " << incidentS << " " << incidentB << G4endl;
    1970      }
    1971 
    1972    for (i=0; i<vecLen; i++)
    1973      { G4int iphmf = pv[i].getCode();
    1974        G4double ppp   = pv[i].Length();
    1975        if (ppp > 1.e-3)
    1976          {
    1977            pvmx[5].Lor( pv[i], pvmx[2] );
    1978            G4double cost = pvmx[3].CosAng( pvmx[5] );
    1979            G4int particleS =   pv[i].getStrangenessNumber();
    1980            if(pv[i].getName() == "KaonZeroShort" || pv[i].getName() == "KaonZeroLong")
    1981              {
    1982                if(G4UniformRand() < 0.5) { particleS = 1;}
    1983                else                      { particleS = -1;}
    1984              }
    1985            G4int particleB =   pv[i].getBaryonNumber();
    1986            G4double hfmass;
    1987            if (cost > 0.)
    1988              {
    1989                reddec[0] = std::fabs( incidentMass - pv[i].getMass() );
    1990                reddec[1] = std::fabs( incidentCharge - pv[i].getCharge());
    1991                reddec[2] = std::fabs( G4double(incidentS - particleS) ); // cast for aCC
    1992                reddec[3] = std::fabs( G4double(incidentB - particleB) ); // cast for aCC
    1993                hfmass = incidentMass; 
    1994              }
    1995            else
    1996              {
    1997                reddec[0] = std::fabs( targetMass - pv[i].getMass() );
    1998                reddec[1] = std::fabs( atomicNumber/atomicWeight - pv[i].getCharge());
    1999                reddec[2] = std::fabs( G4double(particleS) ); // cast for aCC
    2000                reddec[3] = std::fabs( 1. - particleB );
    2001                hfmass = targetMass; 
    2002              }
    2003            reddec[5] = reddec[0]+reddec[1]+reddec[2]+reddec[3];
    2004            G4double sbqwgt = reddec[5];
    2005            if ( hfmass < 0.2)
    2006              {
    2007                sbqwgt = (sbqwgt-2.5)*0.10;
    2008                if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15;
    2009              }
    2010            else if (hfmass < 0.6)
    2011                sbqwgt = (sbqwgt-3.0)*0.10;
    2012            else
    2013              {
    2014                sbqwgt = (sbqwgt-2.0)*0.10;
    2015                if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15; 
    2016              }
    2017            ppp = pvmx[5].Length();
    2018            if ( (sbqwgt>0.) && (ppp>1.e-6) )
    2019              {
    2020                G4double pthmf = ppp*std::sqrt(1.-cost*cost);
    2021                G4double plhmf = ppp*cost*(1.-sbqwgt);
    2022                pvmx[7].Cross( pvmx[3], pvmx[5] );
    2023                pvmx[7].Cross( pvmx[7], pvmx[3] );
    2024                if(pvmx[3].Length() > 0.)
    2025                  pvmx[6].SmulAndUpdate( pvmx[3], plhmf/pvmx[3].Length() );
    2026                else if(verboseLevel > 1)
    2027                  G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
    2028                if(pvmx[7].Length() > 0.)   
    2029                  pvmx[7].SmulAndUpdate( pvmx[7], pthmf/pvmx[7].Length() );
    2030                else if(verboseLevel > 1)
    2031                  G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
    2032                pvmx[5].Add3(pvmx[6], pvmx[7] );
    2033                pvmx[5].setEnergy( std::sqrt(sqr(pvmx[5].Length()) + sqr(pv[i].getMass())));
    2034                pv[i].Lor( pvmx[5], pvmx[4] );
    2035                if(verboseLevel > 1)
    2036                  {
    2037                    G4cout << " Particle Momentum changed to: " << G4endl;
    2038                    pv[i].Print(i);
    2039                  }
    2040              }   
    2041 
    2042            // Neither pi0s, backward nucleons from intra-nuclear cascade,
    2043            // nor evaporation fragments can be leading particles
    2044 
    2045            if (iphmf != pionZeroCode && pv[i].getSide() > -3)
    2046              {
    2047                pvmx[7].Sub3( incidentParticle, pv[i] );
    2048                reddec[4] = pvmx[7].Length()/incidentTotalMomentum;
    2049                reddec[6] = reddec[4]*2./3. + reddec[5]/12.;
    2050                reddec[6] = Amax(0., 1. - reddec[6]);
    2051                gespar   += reddec[6];
    2052                if ( (reddec[5] <= 3.75) && (reddec[6] > redpar) )
    2053                  { ledpar = i;
    2054                    redpar = reddec[6];
    2055                  }   
    2056              }
    2057          }
    2058        pvmx[8].Add3(pvmx[8], pv[i] );
    2059      }
     1963  G4int ledpar = -1;
     1964  G4double redpar = 0.;
     1965  G4int incidentS = incidentParticle.getStrangenessNumber();
     1966  if (incidentParticle.getName() == "KaonZeroShort" ||
     1967      incidentParticle.getName() == "KaonZeroLong") {
     1968    if(G4UniformRand() < 0.5) {
     1969      incidentS = 1;
     1970    } else {
     1971      incidentS = -1;
     1972    }
     1973  }
     1974
     1975  G4int incidentB =   incidentParticle.getBaryonNumber();   
     1976
     1977  for (i=0; i<vecLen; i++) {
     1978    G4int iphmf = pv[i].getCode();
     1979    G4double ppp = pv[i].Length();
     1980
     1981    if (ppp > 1.e-3) {
     1982      pvmx[5].Lor( pv[i], pvmx[2] );  // secondary in CM frame
     1983      G4double cost = pvmx[3].CosAng( pvmx[5] );
     1984
     1985      // For each secondary, find the sum of the differences of its
     1986      // quantum numbers with that of the incident particle
     1987      // (dM + dQ + dS + dB)
     1988
     1989      G4int particleS = pv[i].getStrangenessNumber();
     1990
     1991      if (pv[i].getName() == "KaonZeroShort" ||
     1992          pv[i].getName() == "KaonZeroLong") {
     1993        if (G4UniformRand() < 0.5) {
     1994          particleS = 1;
     1995        } else {
     1996          particleS = -1;
     1997        }
     1998      }
     1999      G4int particleB = pv[i].getBaryonNumber();
     2000      G4double hfmass;
     2001      if (cost > 0.) {
     2002        reddec[0] = std::fabs( incidentMass - pv[i].getMass() );
     2003        reddec[1] = std::fabs( incidentCharge - pv[i].getCharge());
     2004        reddec[2] = std::fabs( G4double(incidentS - particleS) ); // cast for aCC
     2005        reddec[3] = std::fabs( G4double(incidentB - particleB) ); // cast for aCC
     2006        hfmass = incidentMass;
     2007
     2008      } else {
     2009        reddec[0] = std::fabs( targetMass - pv[i].getMass() );
     2010        reddec[1] = std::fabs( atomicNumber/atomicWeight - pv[i].getCharge());
     2011        reddec[2] = std::fabs( G4double(particleS) ); // cast for aCC
     2012        reddec[3] = std::fabs( 1. - particleB );
     2013        hfmass = targetMass; 
     2014      }
     2015
     2016      reddec[5] = reddec[0]+reddec[1]+reddec[2]+reddec[3];
     2017      G4double sbqwgt = reddec[5];
     2018      if (hfmass < 0.2) {
     2019        sbqwgt = (sbqwgt-2.5)*0.10;
     2020        if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15;
     2021      } else if (hfmass < 0.6) {
     2022        sbqwgt = (sbqwgt-3.0)*0.10;
     2023      } else {
     2024        sbqwgt = (sbqwgt-2.0)*0.10;
     2025        if(pv[i].getCode() == pionZeroCode) sbqwgt = 0.15;
     2026      }
     2027           
     2028      ppp = pvmx[5].Length();
     2029
     2030      // Reduce the longitudinal momentum of the secondary by a factor
     2031      // which is a function of the sum of the differences
     2032
     2033      if (sbqwgt > 0. && ppp > 1.e-6) {
     2034        G4double pthmf = ppp*std::sqrt(1.-cost*cost);
     2035        G4double plhmf = ppp*cost*(1.-sbqwgt);
     2036        pvmx[7].Cross( pvmx[3], pvmx[5] );
     2037        pvmx[7].Cross( pvmx[7], pvmx[3] );
     2038
     2039        if (pvmx[3].Length() > 0.)
     2040          pvmx[6].SmulAndUpdate( pvmx[3], plhmf/pvmx[3].Length() );
     2041        else if(verboseLevel > 1)
     2042          G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
     2043
     2044        if (pvmx[7].Length() > 0.)   
     2045          pvmx[7].SmulAndUpdate( pvmx[7], pthmf/pvmx[7].Length() );
     2046        else if(verboseLevel > 1)
     2047          G4cout << "NaNQ in Tuning of High Energy Hadronic Interactions" << G4endl;
     2048
     2049        pvmx[5].Add3(pvmx[6], pvmx[7] );
     2050        pvmx[5].setEnergy( std::sqrt(sqr(pvmx[5].Length()) + sqr(pv[i].getMass())));
     2051        pv[i].Lor( pvmx[5], pvmx[4] );
     2052        if (verboseLevel > 1) {
     2053          G4cout << " Particle Momentum changed to: " << G4endl;
     2054          pv[i].Print(i);
     2055        }
     2056      }
     2057
     2058      // Choose leading particle
     2059      // Neither pi0s, backward nucleons from intra-nuclear cascade,
     2060      // nor evaporation fragments can be leading particles
     2061
     2062      G4int ss = -3;
     2063      if (incidentS != 0) ss = 0;
     2064      if (iphmf != pionZeroCode && pv[i].getSide() > ss) {
     2065        pvmx[7].Sub3( incidentParticle, pv[i] );
     2066        reddec[4] = pvmx[7].Length()/incidentTotalMomentum;
     2067        reddec[6] = reddec[4]*2./3. + reddec[5]/12.;
     2068        reddec[6] = Amax(0., 1. - reddec[6]);
     2069        if ( (reddec[5] <= 3.75) && (reddec[6] > redpar) ) {
     2070          ledpar = i;
     2071          redpar = reddec[6];
     2072        }   
     2073      }
     2074    }
     2075    pvmx[8].Add3(pvmx[8], pv[i] );
     2076  }
    20602077
    20612078  if(false) if (ledpar >= 0)
     
    20792096       } 
    20802097     }
    2081   if(conserveEnergy)
    2082   {
     2098
     2099  if (conserveEnergy) {
    20832100    G4double ekinhf = 0.;
    2084     for(i=0; i<vecLen; i++)
    2085     {
     2101    for (i=0; i<vecLen; i++) {
    20862102      ekinhf += pv[i].getKineticEnergy();
    20872103      if(pv[i].getMass() < 0.7) ekinhf += pv[i].getMass();
    20882104    }
    20892105    if(incidentParticle.getMass() < 0.7) ekinhf -= incidentParticle.getMass();
    2090     if(ledpar < 0)
    2091     {
     2106
     2107    if(ledpar < 0) {   // no leading particle chosen
    20922108      ekinhf = incidentParticle.getKineticEnergy()/ekinhf;
    2093       for(i=0; i<vecLen; i++) pv[i].setKineticEnergyAndUpdate(ekinhf*pv[i].getKineticEnergy());
    2094     }
    2095     else
    2096     {
     2109      for (i=0; i<vecLen; i++)
     2110        pv[i].setKineticEnergyAndUpdate(ekinhf*pv[i].getKineticEnergy());
     2111
     2112    } else {   
     2113      // take the energy removed from non-leading particles and
     2114      // give it to the leading particle
    20972115      ekinhf = incidentParticle.getKineticEnergy() - ekinhf;
    20982116      ekinhf += pv[ledpar].getKineticEnergy();
     
    21002118      pv[ledpar].setKineticEnergyAndUpdate(ekinhf);
    21012119    }
    2102   } 
     2120  }
     2121
    21032122  delete [] reddec;
    21042123  delete [] pvmx;
     2124
    21052125  return;
    21062126 }     
     
    34513471                      while( ( ran >= dndl[l] ) && ( l < 20 ) )l++;
    34523472                      l = Imin( 19, l );
    3453                       xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1])/2.) );
     3473                      xval = Amin( 1.0, pt*(binl[l-1] + G4UniformRand()*(binl[l]-binl[l-1]) ) );
    34543474                      if( pv[i].getSide() < 0 ) xval *= -1.;
    34553475                      pv[i].setMomentumAndUpdate( xval*et );   // set the z-momentum
     
    54965516      sm[i] = totalMass;
    54975517    }
     5518
    54985519    if( totalMass >= totalEnergy ) {
    5499       G4cerr << "*** Error in G4HEInelastic::GenerateNBodyEvent" << G4endl;
    5500       G4cerr << "    total mass (" << totalMass << ") >= total energy ("
    5501            << totalEnergy << ")" << G4endl;
     5520      if (verboseLevel > 1) {
     5521        G4cout << "*** Error in G4HEInelastic::GenerateNBodyEvent" << G4endl;
     5522        G4cout << "    total mass (" << totalMass << ") >= total energy ("
     5523               << totalEnergy << ")" << G4endl;
     5524      }
    55025525      delete [] mass;
    55035526      delete [] energy;
     
    55075530      return -1.0;
    55085531    }
     5532
    55095533    G4double kineticEnergy = totalEnergy - totalMass;
    55105534    G4double* emm = new G4double [vecLen];
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEKaonMinusInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEKaonMinusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonPlusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEKaonPlusInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEKaonPlusInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEKaonZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEKaonZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroLongInelastic.cc

    r819 r962  
    2626//
    2727// $Id: G4HEKaonZeroLongInelastic.cc,v 1.10 2006/06/29 20:30:22 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEKaonZeroShortInelastic.cc

    r819 r962  
    2626//
    2727// $Id: G4HEKaonZeroShortInelastic.cc,v 1.10 2006/06/29 20:30:24 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HELambdaInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HELambdaInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HELambdaInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HENeutronInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HENeutronInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HENeutronInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEOmegaMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEOmegaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEOmegaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEPionMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEPionMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEPionMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929
    3030// 11-OCT-2007 F.W. Jones: fixed incorrect Imax (should be Imin) in
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEPionPlusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEPionPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEPionPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEPlot.cc

    r819 r962  
    2626//
    2727// $Id: G4HEPlot.cc,v 1.11 2006/06/29 20:30:36 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEProtonInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEProtonInelastic.cc,v 1.13.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEProtonInelastic.cc,v 1.14 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HESigmaMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HESigmaMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaPlusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HESigmaPlusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HESigmaPlusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HESigmaZeroInelastic.cc

    r819 r962  
    2626//
    2727// $Id: G4HESigmaZeroInelastic.cc,v 1.11 2006/06/29 20:30:44 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEVector.cc

    r819 r962  
    2626//
    2727// $Id: G4HEVector.cc,v 1.20 2006/11/22 23:52:32 dennis Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEXiMinusInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEXiMinusInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEXiMinusInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/high_energy/src/G4HEXiZeroInelastic.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4HEXiZeroInelastic.cc,v 1.14.2.1 2008/04/23 16:31:22 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4HEXiZeroInelastic.cc,v 1.15 2008/03/17 20:49:17 dennis Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
Note: See TracChangeset for help on using the changeset viewer.