G4NeutronKiller.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id: G4NeutronKiller.cc 69887 2013-05-17 08:17:02Z gcosmo $
00027 //
00028 //---------------------------------------------------------------------------
00029 //
00030 // ClassName:   G4NeutronKiller
00031 //
00032 // Description: The process to kill particles to save CPU
00033 //
00034 // Author:      V.Ivanchenko 26/09/00 for HARP software
00035 //
00036 //----------------------------------------------------------------------------
00037 //
00038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00039 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00040 
00041 #include "G4NeutronKiller.hh"
00042 
00043 #include "G4SystemOfUnits.hh"
00044 #include "G4NeutronKillerMessenger.hh"
00045 #include "G4TransportationProcessType.hh"
00046 
00047 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00048 
00049 G4NeutronKiller::G4NeutronKiller(const G4String& processName, G4ProcessType aType)
00050  : G4VDiscreteProcess(processName, aType)
00051 {
00052   // set Process Sub Type
00053   SetProcessSubType(static_cast<int>(NEUTRON_KILLER));
00054 
00055   kinEnergyThreshold = 0.0;
00056   timeThreshold = DBL_MAX;
00057   pMess = new G4NeutronKillerMessenger(this);
00058 }
00059 
00060 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00061 
00062 G4NeutronKiller::~G4NeutronKiller() 
00063 { 
00064   delete pMess; 
00065 }
00066 
00067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00068 
00069 G4bool G4NeutronKiller::IsApplicable(const G4ParticleDefinition& particle)
00070 {
00071   return (particle.GetParticleName() == "neutron");
00072 }
00073 
00074 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00075 
00076 void G4NeutronKiller::SetTimeLimit(G4double val)
00077 {
00078   timeThreshold = val;
00079   if(verboseLevel > 0) 
00080     G4cout << "### G4NeutronKiller: timeLimit(ns) = " 
00081            << timeThreshold/ns << G4endl;
00082 }
00083 
00084 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00085 
00086 void G4NeutronKiller::SetKinEnergyLimit(G4double val)
00087 {
00088   kinEnergyThreshold = val;
00089   if(verboseLevel > 0) 
00090     G4cout << "### G4NeutronKiller: Tracking cut E(MeV) = " 
00091            << kinEnergyThreshold/MeV << G4endl;
00092 }
00093 
00094 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00095 
00096 

Generated on Mon May 27 17:49:05 2013 for Geant4 by  doxygen 1.4.7