source: trunk/source/processes/transportation/src/G4NeutronKiller.cc @ 1253

Last change on this file since 1253 was 1228, checked in by garnier, 14 years ago

update geant4.9.3 tag

File size: 3.6 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: G4NeutronKiller.cc,v 1.2 2007/06/01 07:53:27 ahoward Exp $
27// GEANT4 tag $Name: geant4-09-03 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4NeutronKiller
32//
33// Description: The process to kill particles to save CPU
34//
35// Author:      V.Ivanchenko 26/09/00 for HARP software
36//
37//----------------------------------------------------------------------------
38//
39//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42#include "G4NeutronKiller.hh"
43#include "G4NeutronKillerMessenger.hh"
44
45//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
46
47G4NeutronKiller::G4NeutronKiller(const G4String& processName, G4ProcessType aType)
48 : G4VDiscreteProcess(processName, aType)
49{
50  kinEnergyThreshold = 0.0;
51  timeThreshold = DBL_MAX;
52  pMess = new G4NeutronKillerMessenger(this);
53}
54
55//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56
57G4NeutronKiller::~G4NeutronKiller() 
58{ 
59  delete pMess; 
60}
61
62//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64G4bool G4NeutronKiller::IsApplicable(const G4ParticleDefinition& particle)
65{
66  return (particle.GetParticleName() == "neutron");
67}
68
69//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70
71void G4NeutronKiller::SetTimeLimit(G4double val)
72{
73  timeThreshold = val;
74  if(verboseLevel > 0) 
75    G4cout << "### G4NeutronKiller: timeLimit(ns) = " 
76           << timeThreshold/ns << G4endl;
77}
78
79//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
81void G4NeutronKiller::SetKinEnergyLimit(G4double val)
82{
83  kinEnergyThreshold = val;
84  if(verboseLevel > 0) 
85    G4cout << "### G4NeutronKiller: Tracking cut E(MeV) = " 
86           << kinEnergyThreshold/MeV << G4endl;
87}
88
89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90
91
Note: See TracBrowser for help on using the repository browser.