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: TiaraEnergyCutProcess.cc,v 1.6 2006/06/29 15:44:54 gunter Exp $ |
---|
27 | // GEANT4 tag $Name: $ |
---|
28 | // |
---|
29 | |
---|
30 | #include "TiaraEnergyCutProcess.hh" |
---|
31 | |
---|
32 | TiaraEnergyCutProcess::TiaraEnergyCutProcess(G4double minEnergyCut) |
---|
33 | : |
---|
34 | G4VProcess("TiaraEnergyCutProcess"), |
---|
35 | fMinEnergyCut(minEnergyCut) |
---|
36 | { |
---|
37 | G4VProcess::pParticleChange = new G4ParticleChange; |
---|
38 | if (!G4VProcess::pParticleChange) { |
---|
39 | G4Exception("ERROR:TiaraEnergyCutProcess::TiaraEnergyCutProcess new failed to create G4ParticleChange!"); |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | TiaraEnergyCutProcess::~TiaraEnergyCutProcess() |
---|
44 | { |
---|
45 | delete pParticleChange; |
---|
46 | } |
---|
47 | |
---|
48 | G4double TiaraEnergyCutProcess:: |
---|
49 | PostStepGetPhysicalInteractionLength(const G4Track&, |
---|
50 | G4double, |
---|
51 | G4ForceCondition* condition) |
---|
52 | { |
---|
53 | *condition = Forced; |
---|
54 | return kInfinity; |
---|
55 | } |
---|
56 | |
---|
57 | G4VParticleChange * |
---|
58 | TiaraEnergyCutProcess::PostStepDoIt(const G4Track& aTrack, const G4Step &) |
---|
59 | { |
---|
60 | pParticleChange->Initialize(aTrack); |
---|
61 | |
---|
62 | if (aTrack.GetKineticEnergy() < fMinEnergyCut) { |
---|
63 | pParticleChange->ProposeTrackStatus(fStopAndKill); |
---|
64 | } |
---|
65 | |
---|
66 | return G4VProcess::pParticleChange; |
---|
67 | } |
---|
68 | |
---|
69 | const G4String &TiaraEnergyCutProcess::GetName() const { |
---|
70 | return theProcessName; |
---|
71 | } |
---|
72 | |
---|
73 | |
---|
74 | G4double TiaraEnergyCutProcess:: |
---|
75 | AlongStepGetPhysicalInteractionLength(const G4Track&, |
---|
76 | G4double , |
---|
77 | G4double , |
---|
78 | G4double& , |
---|
79 | G4GPILSelection*) { |
---|
80 | return -1.0; |
---|
81 | } |
---|
82 | |
---|
83 | G4double TiaraEnergyCutProcess:: |
---|
84 | AtRestGetPhysicalInteractionLength(const G4Track&, |
---|
85 | G4ForceCondition*) { |
---|
86 | return -1.0; |
---|
87 | } |
---|
88 | |
---|
89 | G4VParticleChange* TiaraEnergyCutProcess::AtRestDoIt(const G4Track&, |
---|
90 | const G4Step&) { |
---|
91 | return 0; |
---|
92 | } |
---|
93 | |
---|
94 | G4VParticleChange* TiaraEnergyCutProcess::AlongStepDoIt(const G4Track&, |
---|
95 | const G4Step&) { |
---|
96 | return 0; |
---|
97 | } |
---|
98 | |
---|