source: trunk/source/processes/electromagnetic/lowenergy/test/hTest/src/hTestHadronPhysicsList1.cc @ 1350

Last change on this file since 1350 was 1350, checked in by garnier, 13 years ago

update to last version 4.9.4

File size: 5.0 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//---------------------------------------------------------------------------
27//
28//---------------------------------------------------------------------------
29//
30// ClassName:   hTestHadronPhysicsList1
31// 
32// Description: Implementation file for "LowEnergy" HadronPhysicsList
33//
34// Authors:    10.04.01 V.Ivanchenko
35//
36// Modified:   11.04.02 V.Ivanchenko migrate to CHIPS
37//
38//----------------------------------------------------------------------------
39//
40
41//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
42//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
43
44#include "hTestHadronPhysicsList1.hh"
45#include "G4HadronElasticProcess.hh"
46#include "G4LElastic.hh"
47#include "G4PionMinusNuclearReaction.hh"
48#include "G4ParticleDefinition.hh"
49#include "G4ProcessManager.hh"
50#include "G4HadronInelasticProcess.hh"
51#include "G4PionMinusNuclearAtRestChips.hh"
52#include "G4KaonMinusAbsorptionAtRest.hh"
53#include "G4GammaNuclearReaction.hh"
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
56
57void hTestHadronPhysicsList1::ConstructProcess()
58{
59   G4cout << "CHIPS Hadronic PhysicsList is initilized" << G4endl;
60   G4HadronElasticProcess* theElasticProcess = new G4HadronElasticProcess();
61   G4LElastic* theElasticModel = new G4LElastic();
62   theElasticProcess->RegisterMe(theElasticModel);
63
64   theParticleIterator->reset();
65   while ((*theParticleIterator)()) {
66
67      G4ParticleDefinition* particle = theParticleIterator->value();
68      G4ProcessManager* pmanager = particle->GetProcessManager();
69      G4String particleName = particle->GetParticleName();
70      G4String particleType = particle->GetParticleType();
71      G4int bNumber = particle->GetBaryonNumber();
72       
73      if (particleType == "meson" || bNumber != 0) {
74         pmanager->AddDiscreteProcess(theElasticProcess);
75         theElasticProcess->RegisterMe(theElasticModel);
76
77         G4String nm = particleName + "Inel";
78         G4HadronInelasticProcess* theInelasticProcess = 
79                               new G4HadronInelasticProcess(nm, particle);
80         G4PionMinusNuclearReaction* chips = new G4PionMinusNuclearReaction();
81         theInelasticProcess->RegisterMe(chips);
82         pmanager->AddDiscreteProcess(theElasticProcess);
83         pmanager->AddDiscreteProcess(theInelasticProcess);
84
85         G4cout << "Process <" << nm << "> is added to " << particleName << G4endl;
86      }
87
88      if (particleName == "pi-") {   
89         pmanager->AddRestProcess(new G4PionMinusNuclearAtRestChips(), ordDefault);
90         G4cout << "Process <PionMinusAnnihilationAtRest> is added to " 
91                << particleName << G4endl;
92      }
93
94      if (particleName == "kaon-") {
95         pmanager->AddRestProcess(new G4KaonMinusAbsorptionAtRest(), ordDefault);
96         G4cout << "Process <PionMinusAbsorptionAtRest> is added to " 
97                << particleName << G4endl;
98      }
99
100      if (particleName == "gamma") {
101         G4HadronInelasticProcess* theInelasticProcess = 
102                               new G4HadronInelasticProcess("gamNucl", particle);
103         theInelasticProcess->RegisterMe(new G4GammaNuclearReaction());
104         pmanager->AddDiscreteProcess(theInelasticProcess);
105         G4cout << "Process <gamNucl> is added to " 
106                << particleName << G4endl;
107
108      }
109
110    } 
111 }
112
113//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
Note: See TracBrowser for help on using the repository browser.