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
G4NeutronKiller.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: G4NeutronKiller
31//
32// Description: The process to kill particles to save CPU
33//
34// Author: V.Ivanchenko 26/09/00 for HARP software
35//
36//----------------------------------------------------------------------------
37//
38//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
39//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40
41#include "G4NeutronKiller.hh"
42
43#include "G4SystemOfUnits.hh"
46
47//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48
50 : G4VDiscreteProcess(processName, aType)
51{
52 // set Process Sub Type
53 SetProcessSubType(static_cast<int>(NEUTRON_KILLER));
54
55 kinEnergyThreshold = 0.0;
56 timeThreshold = DBL_MAX;
57 pMess = new G4NeutronKillerMessenger(this);
58}
59
60//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61
63{
64 delete pMess;
65}
66
67//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
68
70{
71 return (particle.GetParticleName() == "neutron");
72}
73
74//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
75
77{
78 timeThreshold = val;
79 if(verboseLevel > 0)
80 G4cout << "### G4NeutronKiller: timeLimit(ns) = "
81 << timeThreshold/ns << G4endl;
82}
83
84//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
85
87{
88 kinEnergyThreshold = val;
89 if(verboseLevel > 0)
90 G4cout << "### G4NeutronKiller: Tracking cut E(MeV) = "
91 << kinEnergyThreshold/MeV << G4endl;
92}
93
94//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
95
96
G4ProcessType
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void SetTimeLimit(G4double)
virtual ~G4NeutronKiller()
G4NeutronKiller(const G4String &processName="nKiller", G4ProcessType aType=fGeneral)
G4bool IsApplicable(const G4ParticleDefinition &)
void SetKinEnergyLimit(G4double)
const G4String & GetParticleName() const
G4int verboseLevel
Definition: G4VProcess.hh:368
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:403
#define DBL_MAX
Definition: templates.hh:83
#define ns
Definition: xmlparse.cc:597