Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4StoppingHadronBuilder.cc
Go to the documentation of this file.
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$
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4StoppingHadronBuilder
31//
32// Author: 2002 J.P. Wellisch
33//
34// Modified:
35// 10.11.2005 V.Ivanchenko edit to provide a standard and add mu-
36//----------------------------------------------------------------------------
37//
38
45
46#include "G4ParticleTable.hh"
47#include "G4ProcessManager.hh"
48#include "G4PionMinus.hh"
49#include "G4KaonMinus.hh"
50#include "G4AntiProton.hh"
51#include "G4AntiNeutron.hh"
52
54 theMuonMinusAbsorption(0),thePionMinusAbsorption(0),
55 theKaonMinusAbsorption(0), theAntiProtonAnnihilation(0),
56 theAntiNeutronAnnihilation(0),
57 wasActivated(false)
58{}
59
61{
62 if(wasActivated) {
63 delete theMuonMinusAbsorption;
64 delete thePionMinusAbsorption;
65 delete theKaonMinusAbsorption;
66 delete theAntiProtonAnnihilation;
67 delete theAntiNeutronAnnihilation;
68 }
69}
70
72{
73 G4ProcessManager * aProcMan = 0;
74 wasActivated=true;
75//G4cout << " adding stopping hadron Physics" << G4endl;
76
77 // Muon Minus Physics
79 theMuonMinusAbsorption = new G4MuonMinusCaptureAtRest();
80 aProcMan->AddRestProcess(theMuonMinusAbsorption);
81
82 // PionMinus
84 thePionMinusAbsorption = new G4PionMinusAbsorptionAtRest();
85 aProcMan->AddRestProcess(thePionMinusAbsorption);
86
87 // KaonMinus
89 theKaonMinusAbsorption = new G4KaonMinusAbsorption();
90 aProcMan->AddRestProcess(theKaonMinusAbsorption);
91
92 // anti-Proton
94 theAntiProtonAnnihilation = new G4AntiProtonAnnihilationAtRest();
95 aProcMan->AddRestProcess(theAntiProtonAnnihilation);
96
97 // AntiNeutron
99 theAntiNeutronAnnihilation = new G4AntiNeutronAnnihilationAtRest();
100 aProcMan->AddRestProcess(theAntiNeutronAnnihilation);
101
102}
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
G4ProcessManager * GetProcessManager() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)