Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/physics_lists/builders/src/G4HadronElasticPhysics.cc

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4HadronElasticPhysics.cc,v 1.12 2010/06/03 16:28:39 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     26// $Id: G4HadronElasticPhysics.cc,v 1.16 2010/09/24 12:54:13 vnivanch Exp $
     27// GEANT4 tag $Name: phys-lists-V09-03-34 $
    2828//
    2929//---------------------------------------------------------------------------
    3030//
    31 // ClassName:   G4HadronElasticPhysics
     31// ClassName:   G4HadronElasticPhysics 
    3232//
    33 // Author: 11 April 2006 V. Ivanchenko
     33// Author: 23 November 2006 V. Ivanchenko
    3434//
    3535// Modified:
    36 // 05.07.2006 V.Ivanchenko define process by particle name;
    37 //                         fix problem of initialisation of HP
    38 // 24.07.2006 V.Ivanchenko add G4NeutronHPElasticData
    39 // 10.08.2006 V.Ivanchenko separate neutrons from other particles
    40 // 17.11.2006 V.Ivanchenko do not redefine G4HadronElastic default parameters
    41 // 19.02.2007 V.Ivanchenko set QModelLowLimit and LowestEnergyLimit to zero
    42 // 19.02.2007 A.Howard set QModelLowLimit and LowestEnergyLimit to zero
    43 //                     for neutrons
    44 // 06.03.2007 V.Ivanchenko use updated interface to G4UElasticCrossSection
     36// 21.03.2007 V.Ivanchenko Use G4BGGNucleonElasticXS and G4BGGPionElasticXS;
     37//                         Reduce thresholds for HE and Q-models to zero
     38// 03.06.2010 V.Ivanchenko cleanup constructors and ConstructProcess method
     39// 29.07.2010 V.Ivanchenko rename this class from G4HadronHElasticPhysics to
     40//                         G4HadronElasticPhysics, old version of the class
     41//                         is renamed to G4HadronElasticPhysics93
    4542//
    4643//----------------------------------------------------------------------------
    4744//
     45// CHIPS for sampling scattering for p and n
     46// Glauber model for samplimg of high energy pi+- (E > 1GeV)
     47// LHEP sampling model for the other particle
     48// BBG cross sections for p, n and pi+-
     49// LHEP cross sections for other particles
    4850
    4951#include "G4HadronElasticPhysics.hh"
    50 
    51 #include "G4HadronicProcess.hh"
    52 #include "G4HadronElasticProcess.hh"
    53 #include "G4HadronicInteraction.hh"
    54 #include "G4LElastic.hh"
    5552
    5653#include "G4ParticleDefinition.hh"
     
    6259#include "G4Neutron.hh"
    6360
    64 #include "G4VQCrossSection.hh"
    65 #include "G4UElasticCrossSection.hh"
     61#include "G4WHadronElasticProcess.hh"
     62#include "G4VHadronElastic.hh"
     63#include "G4CHIPSElastic.hh"
     64#include "G4ElasticHadrNucleusHE.hh"
    6665#include "G4BGGNucleonElasticXS.hh"
    6766#include "G4BGGPionElasticXS.hh"
     67#include "G4NeutronElasticXS.hh"
     68#include "G4CHIPSElasticXS.hh"
    6869
    6970G4HadronElasticPhysics::G4HadronElasticPhysics(G4int ver)
    70   : G4VPhysicsConstructor("elastic"), mname("elastic"),verbose(ver),
    71     hpFlag(false), glFlag(false),wasActivated(false)
     71  : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver),
     72    wasActivated(false)
    7273{
    73   if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl;
    74   model = 0;
    75   neutronModel = 0;
    76   neutronHPModel = 0; 
     74  if(verbose > 1) {
     75    G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName()
     76           << G4endl;
     77  }
    7778}
    7879
    79 G4HadronElasticPhysics::G4HadronElasticPhysics(
    80     const G4String& name,  G4int ver, G4bool hp, G4bool glauber)
    81   : G4VPhysicsConstructor(name), mname(name), verbose(ver), hpFlag(hp),
    82     glFlag(glauber),wasActivated(false)
     80G4HadronElasticPhysics::G4HadronElasticPhysics(const G4String&,
     81    G4int ver, G4bool, const G4String&)
     82  : G4VPhysicsConstructor("hElasticWEL_CHIPS"), verbose(ver),
     83    wasActivated(false)
    8384{
    84   if(verbose > 1) G4cout << "### HadronElasticPhysics" << G4endl;
    85   model = 0;
    86   neutronModel = 0;
    87   neutronHPModel = 0; 
     85  if(verbose > 1) {
     86    G4cout << "### G4HadronElasticPhysics: " << GetPhysicsName()
     87           << G4endl;
     88  }
    8889}
    8990
    9091G4HadronElasticPhysics::~G4HadronElasticPhysics()
    91 {
    92   delete model;
    93   delete neutronModel;
    94   delete neutronHPModel;
    95 }
     92{}
    9693
    9794void G4HadronElasticPhysics::ConstructParticle()
    9895{
    99 // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
     96  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
    10097  G4MesonConstructor pMesonConstructor;
    10198  pMesonConstructor.ConstructParticle();
     
    111108void G4HadronElasticPhysics::ConstructProcess()
    112109{
    113   if(wasActivated) return;
     110  if(wasActivated) { return; }
    114111  wasActivated = true;
    115112
     113  G4double elimit = 1.0*GeV;
    116114  if(verbose > 1) {
    117     G4cout << "### HadronElasticPhysics Construct Processes with the model <"
    118            << mname << ">" << G4endl;
     115    G4cout << "### HadronElasticPhysics Construct Processes with HE limit "
     116           << elimit << " MeV" << G4endl;
    119117  }
    120   G4HadronicProcess* hel = 0;
    121   G4VQCrossSection* man = 0;
    122118
    123   if(mname == "elastic") {
    124     G4HadronElastic* he = new G4HadronElastic();
    125     model = he;
    126     man = he->GetCS();
    127     he->SetQModelLowLimit(0.0);
    128     he->SetLowestEnergyLimit(0.0);
    129   } else {
    130     model = new G4LElastic();
    131   }
     119  G4VHadronElastic* plep0 = new G4VHadronElastic();
     120  G4VHadronElastic* plep1 = new G4VHadronElastic();
     121  plep1->SetMaxEnergy(elimit);
     122
     123  G4CHIPSElastic* chipsp = new G4CHIPSElastic();
     124  G4CHIPSElastic* chipsn = new G4CHIPSElastic();
     125
     126  G4ElasticHadrNucleusHE* he = new G4ElasticHadrNucleusHE();
     127  he->SetMinEnergy(elimit);
    132128
    133129  theParticleIterator->reset();
     
    135131  {
    136132    G4ParticleDefinition* particle = theParticleIterator->value();
    137     G4ProcessManager* pmanager = particle->GetProcessManager();
    138133    G4String pname = particle->GetParticleName();
    139134    if(pname == "anti_lambda"  ||
     
    151146       pname == "lambda"    ||
    152147       pname == "omega-"    ||
     148       pname == "pi-"       ||
     149       pname == "pi+"       ||
     150       pname == "proton"    ||
    153151       pname == "sigma-"    ||
    154152       pname == "sigma+"    ||
     
    158156       pname == "triton") {
    159157     
    160       if(mname == "elastic") {
    161         G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
    162         h->SetQElasticCrossSection(man);
    163         hel = h;
    164         if(glFlag) hel->AddDataSet(new G4UElasticCrossSection(particle));
    165       } else {                   
    166         hel = new G4HadronElasticProcess("hElastic");
     158      G4ProcessManager* pmanager = particle->GetProcessManager();
     159      G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
     160      if(pname == "proton") {
     161        //hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
     162        hel->AddDataSet(new G4CHIPSElasticXS());
     163        hel->RegisterMe(chipsp);
     164      } else if (pname == "pi+" || pname == "pi-") {
     165        hel->AddDataSet(new G4BGGPionElasticXS(particle));
     166        hel->RegisterMe(plep1);
     167        hel->RegisterMe(he);
     168      } else {
     169        hel->RegisterMe(plep0);
    167170      }
    168       hel->RegisterMe(model);
    169171      pmanager->AddDiscreteProcess(hel);
    170       if(verbose > 1)
    171         G4cout << "### HadronElasticPhysics added for "
    172                << particle->GetParticleName() << G4endl;
    173 
    174       // proton case
    175     } else if(pname == "proton") {
    176       if(mname == "elastic") {
    177         G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
    178         h->SetQElasticCrossSection(man);
    179         hel = h;
    180         if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
    181       } else {                   
    182         hel = new G4HadronElasticProcess("hElastic");
     172      if(verbose > 1) {
     173        G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
     174               << " added for " << particle->GetParticleName() << G4endl;
    183175      }
    184       hel->RegisterMe(model);
    185       pmanager->AddDiscreteProcess(hel);
    186       if(verbose > 1)
    187         G4cout << "### HadronElasticPhysics added for "
    188                << particle->GetParticleName() << G4endl;
    189176
    190177      // neutron case
    191178    } else if(pname == "neutron") {   
    192179
    193       if(mname == "elastic") {
    194         G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
    195         G4HadronElastic* nhe = new G4HadronElastic();
    196         nhe->SetQModelLowLimit(0.0);
    197         nhe->SetLowestEnergyLimit(0.0);
    198         neutronModel = nhe;
    199         h->SetQElasticCrossSection(nhe->GetCS());
    200         hel = h;
    201         if(glFlag) hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
    202       } else {                   
    203         hel = new G4HadronElasticProcess("hElastic");
    204         neutronModel = new G4LElastic();
    205       }
     180      G4ProcessManager* pmanager = particle->GetProcessManager();
     181      G4WHadronElasticProcess* hel = new G4WHadronElasticProcess();
     182      //hel->AddDataSet(new G4BGGNucleonElasticXS(particle));
     183      hel->AddDataSet(new G4CHIPSElasticXS());
     184      hel->RegisterMe(chipsn);
    206185
    207       if(hpFlag) {
    208         neutronModel->SetMinEnergy(19.5*MeV);
    209         neutronHPModel = new G4NeutronHPElastic();
    210         hel->RegisterMe(neutronHPModel);
    211         hel->AddDataSet(new G4NeutronHPElasticData());
    212       }
    213 
    214       hel->RegisterMe(neutronModel);
    215186      pmanager->AddDiscreteProcess(hel);
    216187
    217       if(verbose > 1)
    218         G4cout << "### HadronElasticPhysics added for "
    219                << particle->GetParticleName() << G4endl;
    220 
    221       // pion case
    222     } else if(pname == "pi+" || pname == "pi-") {
    223       if(mname == "elastic") {
    224         G4UHadronElasticProcess* h = new G4UHadronElasticProcess("hElastic");
    225         h->SetQElasticCrossSection(man);
    226         hel = h;
    227         if(glFlag) hel->AddDataSet(new G4BGGPionElasticXS(particle));
    228       } else {                   
    229         hel = new G4HadronElasticProcess("hElastic");
     188      if(verbose > 1) {
     189        G4cout << "### HadronElasticPhysics: " << hel->GetProcessName()
     190               << " added for " << particle->GetParticleName() << G4endl;
    230191      }
    231       hel->RegisterMe(model);
    232       pmanager->AddDiscreteProcess(hel);
    233 
    234       if(verbose > 1)
    235         G4cout << "### HadronElasticPhysics added for "
    236                << particle->GetParticleName() << G4endl;
    237192    }
    238193  }
Note: See TracChangeset for help on using the changeset viewer.