Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/physics_lists/lists/src/HadronPhysicsFTFP_BERT.cc

    r1228 r1315  
    2424// ********************************************************************
    2525//
    26 // $Id: HadronPhysicsFTFP_BERT.cc,v 1.1 2007/10/19 15:35:08 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03 $
     26// $Id: HadronPhysicsFTFP_BERT.cc,v 1.3 2010/06/03 10:42:44 gunter Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
    2828//
    2929//---------------------------------------------------------------------------
     
    4949#include "G4BaryonConstructor.hh"
    5050#include "G4ShortLivedConstructor.hh"
     51
     52#include "G4QHadronInelasticDataSet.hh"
     53
     54HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(G4int)
     55                    :  G4VPhysicsConstructor("hInelastic FTFP_BERT")
     56                     , QuasiElastic(false)
     57{}
    5158
    5259HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(const G4String& name, G4bool quasiElastic)
     
    7986  theBertiniPiK->SetMaxEnergy(5*GeV);
    8087 
    81   theMiscLHEP=new G4MiscLHEPBuilder;
     88  theMiscCHIPS=new G4MiscCHIPSBuilder;
    8289}
    8390
     
    96103  delete theFTFPPro;   
    97104   
    98   delete theMiscLHEP;
     105  delete theMiscCHIPS;
     106  delete theCHIPSInelastic;
    99107}
    100108
     
    118126  thePro->Build();
    119127  thePiK->Build();
    120   theMiscLHEP->Build();
     128  // use CHIPS cross sections also for Kaons
     129  theCHIPSInelastic = new G4QHadronInelasticDataSet();
     130 
     131  FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(theCHIPSInelastic);
     132  FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(theCHIPSInelastic);
     133  FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(theCHIPSInelastic);
     134  FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(theCHIPSInelastic);
     135
     136  theMiscCHIPS->Build();
     137}
     138G4HadronicProcess*
     139HadronPhysicsFTFP_BERT::FindInelasticProcess(const G4ParticleDefinition* p)
     140{
     141  G4HadronicProcess* had = 0;
     142  if(p) {
     143     G4ProcessVector*  pvec = p->GetProcessManager()->GetProcessList();
     144     size_t n = pvec->size();
     145     if(0 < n) {
     146       for(size_t i=0; i<n; ++i) {
     147         if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
     148           had = static_cast<G4HadronicProcess*>((*pvec)[i]);
     149           break;
     150         }
     151       }
     152     }
     153  }
     154  return had;
    121155}
    122156
Note: See TracChangeset for help on using the changeset viewer.