source: trunk/source/physics_lists/lists/src/HadronPhysicsFTFP_BERT.cc

Last change on this file was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 5.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// $Id: HadronPhysicsFTFP_BERT.cc,v 1.4 2010/06/15 11:03:50 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   
32//
33// Author: 2007 Gunter Folger
34//   created from HadronPhysicsFTFP
35//
36// Modified:
37//
38//----------------------------------------------------------------------------
39//
40#include "HadronPhysicsFTFP_BERT.hh"
41
42#include "globals.hh"
43#include "G4ios.hh"
44#include <iomanip>  
45#include "G4ParticleDefinition.hh"
46#include "G4ParticleTable.hh"
47
48#include "G4MesonConstructor.hh"
49#include "G4BaryonConstructor.hh"
50#include "G4ShortLivedConstructor.hh"
51
52#include "G4QHadronInelasticDataSet.hh"
53
54HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(G4int)
55                    :  G4VPhysicsConstructor("hInelastic FTFP_BERT")
56                     , QuasiElastic(false)
57{}
58
59HadronPhysicsFTFP_BERT::HadronPhysicsFTFP_BERT(const G4String& name, G4bool quasiElastic)
60                    :  G4VPhysicsConstructor(name) , QuasiElastic(quasiElastic)
61{}
62
63void HadronPhysicsFTFP_BERT::CreateModels()
64{
65
66  theNeutrons=new G4NeutronBuilder;
67  theFTFPNeutron=new G4FTFPNeutronBuilder(QuasiElastic);
68  theNeutrons->RegisterMe(theFTFPNeutron);
69  theNeutrons->RegisterMe(theBertiniNeutron=new G4BertiniNeutronBuilder);
70  theBertiniNeutron->SetMinEnergy(0.0*GeV);
71  theBertiniNeutron->SetMaxEnergy(5*GeV);
72  theNeutrons->RegisterMe(theLEPNeutron=new G4LEPNeutronBuilder);
73  theLEPNeutron->SetMinInelasticEnergy(0.0*eV);   // no inelastic from LEP
74  theLEPNeutron->SetMaxInelasticEnergy(0.0*eV); 
75
76  thePro=new G4ProtonBuilder;
77  theFTFPPro=new G4FTFPProtonBuilder(QuasiElastic);
78  thePro->RegisterMe(theFTFPPro);
79  thePro->RegisterMe(theBertiniPro=new G4BertiniProtonBuilder);
80  theBertiniPro->SetMaxEnergy(5*GeV);
81
82  thePiK=new G4PiKBuilder;
83  theFTFPPiK=new G4FTFPPiKBuilder(QuasiElastic);
84  thePiK->RegisterMe(theFTFPPiK);
85  thePiK->RegisterMe(theBertiniPiK=new G4BertiniPiKBuilder);
86  theBertiniPiK->SetMaxEnergy(5*GeV);
87 
88  theMiscCHIPS=new G4MiscCHIPSBuilder;
89}
90
91HadronPhysicsFTFP_BERT::~HadronPhysicsFTFP_BERT()
92{
93  delete theNeutrons;
94  delete theBertiniNeutron;
95  delete theFTFPNeutron;
96  delete theLEPNeutron;   
97
98  delete thePiK;
99  delete theBertiniPiK;
100  delete theFTFPPiK;
101   
102  delete thePro;
103  delete theBertiniPro;
104  delete theFTFPPro;   
105   
106  delete theMiscCHIPS;
107  delete theCHIPSInelastic;
108}
109
110void HadronPhysicsFTFP_BERT::ConstructParticle()
111{
112  G4MesonConstructor pMesonConstructor;
113  pMesonConstructor.ConstructParticle();
114
115  G4BaryonConstructor pBaryonConstructor;
116  pBaryonConstructor.ConstructParticle();
117
118  G4ShortLivedConstructor pShortLivedConstructor;
119  pShortLivedConstructor.ConstructParticle(); 
120}
121
122#include "G4ProcessManager.hh"
123void HadronPhysicsFTFP_BERT::ConstructProcess()
124{
125  CreateModels();
126  theNeutrons->Build();
127  thePro->Build();
128  thePiK->Build();
129  // use CHIPS cross sections also for Kaons
130  theCHIPSInelastic = new G4QHadronInelasticDataSet();
131 
132  FindInelasticProcess(G4KaonMinus::KaonMinus())->AddDataSet(theCHIPSInelastic);
133  FindInelasticProcess(G4KaonPlus::KaonPlus())->AddDataSet(theCHIPSInelastic);
134  FindInelasticProcess(G4KaonZeroShort::KaonZeroShort())->AddDataSet(theCHIPSInelastic);
135  FindInelasticProcess(G4KaonZeroLong::KaonZeroLong())->AddDataSet(theCHIPSInelastic);
136
137  theMiscCHIPS->Build();
138}
139G4HadronicProcess* 
140HadronPhysicsFTFP_BERT::FindInelasticProcess(const G4ParticleDefinition* p)
141{
142  G4HadronicProcess* had = 0;
143  if(p) {
144     G4ProcessVector*  pvec = p->GetProcessManager()->GetProcessList();
145     size_t n = pvec->size();
146     if(0 < n) {
147       for(size_t i=0; i<n; ++i) {
148         if(fHadronInelastic == ((*pvec)[i])->GetProcessSubType()) {
149           had = static_cast<G4HadronicProcess*>((*pvec)[i]);
150           break;
151         }
152       }
153     }
154  }
155  return had;
156}
157
Note: See TracBrowser for help on using the repository browser.