Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LHEPStoppingHadronBuilder.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: G4LHEPStoppingHadronBuilder
31//
32// Author: 16-Oct-2012 A. Ribon
33// Copied from the original G4StoppingHadronBuilder and renamed
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
41#include "G4MuonMinusCapture.hh"
46
47#include "G4ParticleTable.hh"
48#include "G4ProcessManager.hh"
49#include "G4PionMinus.hh"
50#include "G4KaonMinus.hh"
51#include "G4AntiProton.hh"
52#include "G4AntiNeutron.hh"
53
55 theMuonMinusAbsorption(0),thePionMinusAbsorption(0),
56 theKaonMinusAbsorption(0), theAntiProtonAnnihilation(0),
57 theAntiNeutronAnnihilation(0),
58 wasActivated(false)
59{}
60
62{
63 if(wasActivated) {
64 delete theMuonMinusAbsorption;
65 delete thePionMinusAbsorption;
66 delete theKaonMinusAbsorption;
67 delete theAntiProtonAnnihilation;
68 delete theAntiNeutronAnnihilation;
69 }
70}
71
73{
74 G4ProcessManager * aProcMan = 0;
75 wasActivated=true;
76//G4cout << " adding stopping hadron Physics" << G4endl;
77
78 // Muon Minus Physics
80 theMuonMinusAbsorption = new G4MuonMinusCapture();
81 aProcMan->AddRestProcess(theMuonMinusAbsorption);
82
83 // PionMinus
85 thePionMinusAbsorption = new G4PionMinusAbsorptionAtRest();
86 aProcMan->AddRestProcess(thePionMinusAbsorption);
87
88 // KaonMinus
90 theKaonMinusAbsorption = new G4KaonMinusAbsorption();
91 aProcMan->AddRestProcess(theKaonMinusAbsorption);
92
93 // anti-Proton
95 theAntiProtonAnnihilation = new G4AntiProtonAnnihilationAtRest();
96 aProcMan->AddRestProcess(theAntiProtonAnnihilation);
97
98 // AntiNeutron
100 theAntiNeutronAnnihilation = new G4AntiNeutronAnnihilationAtRest();
101 aProcMan->AddRestProcess(theAntiNeutronAnnihilation);
102
103}
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)