Ignore:
Timestamp:
Nov 25, 2009, 5:13:58 PM (15 years ago)
Author:
garnier
Message:

update CVS release candidate geant4.9.3.01

Location:
trunk/source/processes/hadronic/models/coherent_elastic/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchange.cc

    r1055 r1196  
    2525//
    2626//
    27 // $Id: G4ChargeExchange.cc,v 1.13 2008/11/20 12:35:19 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     27// $Id: G4ChargeExchange.cc,v 1.16 2009/09/22 16:21:46 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    312312    dd = 10.;
    313313  }
    314   G4double x1 = (1.0 - exp(-tmax*bb))*aa/bb;
    315   G4double x2 = (1.0 - exp(-tmax*dd))*cc/dd;
     314  G4double x1 = (1.0 - std::exp(-tmax*bb))*aa/bb;
     315  G4double x2 = (1.0 - std::exp(-tmax*dd))*cc/dd;
    316316 
    317317  G4double t;
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4ChargeExchangeProcess.cc

    r1007 r1196  
    2626//
    2727// $Id: G4ChargeExchangeProcess.cc,v 1.15 2008/11/27 16:43:00 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4DiffuseElastic.cc

    r1055 r1196  
    2424// ********************************************************************
    2525//
    26 // $Id: G4DiffuseElastic.cc,v 1.23 2009/03/02 09:17:43 grichine Exp $
    27 // GEANT4 tag $Name: geant4-09-03-beta-cand-01 $
     26// $Id: G4DiffuseElastic.cc,v 1.25 2009/09/22 16:21:46 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4ElasticHadrNucleusHE.cc

    r1007 r1196  
    2525//
    2626//
    27 // $Id: G4ElasticHadrNucleusHE.cc,v 1.79 2008/01/14 10:39:13 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-02 $
     27// $Id: G4ElasticHadrNucleusHE.cc,v 1.81 2009/09/22 16:21:46 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2929//
    3030//
     
    220220
    221221G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE()
    222   :G4HadronicInteraction("G4ElasticHadrNucleusHE")
     222  : G4VHadronElastic("hElasticGlauber")
     223  //  :G4HadronicInteraction("G4ElasticHadrNucleusHE")
    223224{
    224225  verboseLevel = 0;
     
    299300//
    300301//
    301 
     302/*
    302303G4HadFinalState * G4ElasticHadrNucleusHE::ApplyYourself(
    303304                          const  G4HadProjectile  &aTrack,
     
    457458  return &theParticleChange;
    458459}
    459 
     460*/
    460461//////////////////////////////////////////////////////////////////////////
    461462//
    462463//
    463464
    464 G4double G4ElasticHadrNucleusHE::
    465                      SampleT(  const G4ParticleDefinition* p,
    466                                      G4double inLabMom, G4int Z, G4int N)
     465G4double
     466G4ElasticHadrNucleusHE::SampleInvariantT(const G4ParticleDefinition* p,
     467                                         G4double inLabMom,
     468                                         G4int Z, G4int N)
    467469{
    468470  G4double plab  = inLabMom/GeV;   // (GeV/c)
     
    542544    }
    543545  return  Q2*GeV2;
     546}
     547
     548//////////////////////////////////////////////////////////////////////////
     549//
     550//
     551
     552G4double
     553G4ElasticHadrNucleusHE::SampleT(const G4ParticleDefinition* p,
     554                                G4double inLabMom,
     555                                G4int Z, G4int N)
     556{
     557  return SampleInvariantT(p, inLabMom, Z, N);
    544558}
    545559
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4HadronElastic.cc

    r1007 r1196  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HadronElastic.cc,v 1.61 2008/08/05 07:37:39 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     26// $Id: G4HadronElastic.cc,v 1.65 2009/10/08 18:56:57 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929//
     
    7979#include "G4PionMinus.hh"
    8080
     81G4VQCrossSection* G4HadronElastic::qCManager = 0;
     82
    8183G4HadronElastic::G4HadronElastic(G4ElasticHadrNucleusHE* HModel)
    8284  : G4HadronicInteraction("G4HadronElastic"), hElastic(HModel)
     
    9193  plabLowLimit     = 20.0*MeV;
    9294
    93   qCManager   = G4QElasticCrossSection::GetPointer();
     95  if(!qCManager) {qCManager = G4QElasticCrossSection::GetPointer();}
    9496  if(!hElastic) hElastic = new G4ElasticHadrNucleusHE();
    9597
     
    101103  thePionMinus= G4PionMinus::PionMinus();
    102104
    103   nnans = 0;
    104   npos  = 0;
    105   nneg  = 0;
    106   neneg = 0;
    107105}
    108106
     
    110108{
    111109  delete hElastic;
    112   if( (nnans + npos + nneg + neneg) > 0 ) {
    113     G4cout << "### G4HadronElastic destructor Warnings: ";
    114     if(nnans > 0) G4cout << "###          N(nans)    = " << nnans;
    115     if(npos > 0)  G4cout << "###          N(cost > 1)= " << npos;
    116     if(nneg > 0)  G4cout << "###          N(cost <-1)= " << nneg;
    117     if(neneg > 0) G4cout << "###          N(E < 0)=    " << neneg;
    118     G4cout << "###" << G4endl;
    119   }
    120110}
    121111
     
    234224  }
    235225
    236   // NaN finder
    237   if(!(t < 0.0 || t >= 0.0)) {
    238     if (verboseLevel > 0) {
     226  if(gtype == fSWave) t = G4UniformRand()*tmax;
     227
     228  if(verboseLevel>1) {
     229    G4cout <<"type= " << gtype <<" t= " << t << " tmax= " << tmax
     230           << " ptot= " << ptot << G4endl;
     231  }
     232  // Sampling in CM system
     233  G4double phi  = G4UniformRand()*twopi;
     234  G4double cost = 1. - 2.0*t/tmax;
     235  G4double sint;
     236
     237  // problem in sampling
     238  if(cost > 1.0 || cost < -1.0) {
     239    if(verboseLevel > 0) {
    239240      G4cout << "G4HadronElastic:WARNING: Z= " << Z << " N= "
    240              << N << " pdg= " <<  projPDG
     241             << N << " " << aParticle->GetDefinition()->GetParticleName()
    241242             << " mom(GeV)= " << plab/GeV
    242243             << " the model type " << gtype;
     
    244245      else if(gtype ==  fLElastic) G4cout << " LElastic ";
    245246      else if(gtype ==  fHElastic) G4cout << " HElastic ";
    246       G4cout << " S-wave will be sampled"
     247      G4cout << " cost= " << cost
    247248             << G4endl;
    248249    }
    249     t = 0.0;
    250     nnans++;
    251   }
    252 
    253   if(gtype == fSWave) t = G4UniformRand()*tmax;
    254 
    255   if(verboseLevel>1) {
    256     G4cout <<"type= " << gtype <<" t= " << t << " tmax= " << tmax
    257            << " ptot= " << ptot << G4endl;
    258   }
    259   // Sampling in CM system
    260   G4double phi  = G4UniformRand()*twopi;
    261   G4double cost = 1. - 2.0*t/tmax;
    262   G4double sint;
    263 
    264   // problem in sampling
    265   if(cost >= 1.0) {
    266250    cost = 1.0;
    267251    sint = 0.0;
    268     npos++;
    269   } else if(cost < -1 ) {
    270     /*
    271     G4cout << "G4HadronElastic:WARNING: Z= " << Z << " N= "
    272            << N << " " << aParticle->GetDefinition()->GetParticleName()
    273            << " mom(GeV)= " << plab/GeV
    274            << " the model type " << gtype;
    275     if(gtype ==  fQElastic) G4cout << " CHIPS ";
    276     else if(gtype ==  fLElastic) G4cout << " LElastic ";
    277     else if(gtype ==  fHElastic) G4cout << " HElastic ";
    278     G4cout << " cost= " << cost
    279            << G4endl;
    280     */
    281     cost = 1.0;
    282     sint = 0.0;
    283     nneg++;
    284252
    285253    // normal situation
     
    305273  if(eFinal <= lowestEnergyLimit) {
    306274    if(eFinal < 0.0 && verboseLevel > 0) {
    307       neneg++;
    308275      G4cout << "G4HadronElastic WARNING ekin= " << eFinal
    309276             << " after scattering of "
  • trunk/source/processes/hadronic/models/coherent_elastic/src/G4UHadronElasticProcess.cc

    r1007 r1196  
    2525//
    2626// $Id: G4UHadronElasticProcess.cc,v 1.39 2008/10/22 08:16:40 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-02 $
     27// GEANT4 tag $Name: geant4-09-03-cand-01 $
    2828//
    2929// Geant4 Hadron Elastic Scattering Process -- header file
Note: See TracChangeset for help on using the changeset viewer.