source: trunk/source/physics_lists/builders/src/G4NeutronTrackingCut.cc @ 869

Last change on this file since 869 was 850, checked in by garnier, 16 years ago

geant4.8.2 beta

File size: 3.2 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: G4NeutronTrackingCut.cc,v 1.4 2006/11/24 16:30:13 gunter Exp $
27// GEANT4 tag $Name: HEAD $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4NeutronTrackingCut
32//
33// Author: Nov 2006 G.Folger
34//
35//
36//----------------------------------------------------------------------------
37//
38
39#include "G4NeutronTrackingCut.hh"
40
41#include "G4ParticleDefinition.hh"
42#include "G4ProcessManager.hh"
43
44#include "G4Neutron.hh"
45#include "G4NeutronKiller.hh"
46
47G4NeutronTrackingCut::G4NeutronTrackingCut(const G4String& name, G4int ver)
48  :  G4VPhysicsConstructor(name), verbose(ver), wasActivated(false)
49{}
50
51G4NeutronTrackingCut::~G4NeutronTrackingCut()
52{
53  if(wasActivated) 
54  {
55      delete pNeutronKiller;
56  }   
57}
58
59void G4NeutronTrackingCut::ConstructParticle()
60{
61
62// G4cout << "G4NeutronTrackingCut::ConstructParticle" << G4endl;
63
64  G4Neutron::NeutronDefinition();
65}
66
67void G4NeutronTrackingCut::ConstructProcess()
68{
69  G4double timeLimit     =10*microsecond;
70//  G4double kineticEnergylimit =1*keV;
71  if(wasActivated) return;
72  wasActivated = true;
73
74  // Add Decay Process
75  pNeutronKiller = new G4NeutronKiller();
76  G4ParticleDefinition * particle = G4Neutron::Neutron();
77  G4ProcessManager * pmanager = particle->GetProcessManager();
78//      if(verbose > 1)
79        G4cout << "### Adding Neutron tracking cut for " << particle->GetParticleName() << G4endl;
80        G4cout << "###  cut value is " << timeLimit/microsecond << " microseconds" <<  G4endl;
81      pmanager -> AddDiscreteProcess(pNeutronKiller);
82//      pNeutronKiller->SetKinEnergyLimit(kineticEnergylimit);
83      pNeutronKiller->SetTimeLimit(timeLimit);
84}
85
86
Note: See TracBrowser for help on using the repository browser.