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 | // |
---|
27 | // $Id: G4WrapperProcess.cc,v 1.1 2007/12/12 10:09:49 gcosmo Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
29 | // |
---|
30 | // |
---|
31 | // ------------------------------------------------------------ |
---|
32 | // GEANT 4 class implementation file |
---|
33 | // |
---|
34 | // ------------------------------------------------------------ |
---|
35 | // New Physics scheme 18 Dec. 1996 H.Kurahige |
---|
36 | // ------------------------------------------------------------ |
---|
37 | |
---|
38 | #include "G4WrapperProcess.hh" |
---|
39 | |
---|
40 | G4WrapperProcess::G4WrapperProcess(const G4String& aName, |
---|
41 | G4ProcessType aType) |
---|
42 | : G4VProcess(aName,aType), pRegProcess((G4VProcess*)(0)) |
---|
43 | { |
---|
44 | } |
---|
45 | |
---|
46 | G4WrapperProcess::G4WrapperProcess(const G4WrapperProcess& right) |
---|
47 | : G4VProcess(*((G4VProcess*)(&right))), pRegProcess(right.pRegProcess) |
---|
48 | { |
---|
49 | } |
---|
50 | |
---|
51 | G4WrapperProcess::~G4WrapperProcess() |
---|
52 | { |
---|
53 | if (pRegProcess!=0) delete pRegProcess; |
---|
54 | } |
---|
55 | |
---|
56 | void G4WrapperProcess::ResetNumberOfInteractionLengthLeft() |
---|
57 | { |
---|
58 | pRegProcess->ResetNumberOfInteractionLengthLeft(); |
---|
59 | } |
---|
60 | |
---|
61 | G4double G4WrapperProcess:: |
---|
62 | AlongStepGetPhysicalInteractionLength( const G4Track& track, |
---|
63 | G4double previousStepSize, |
---|
64 | G4double currentMinimumStep, |
---|
65 | G4double& proposedSafety, |
---|
66 | G4GPILSelection* selection ) |
---|
67 | { |
---|
68 | return pRegProcess-> |
---|
69 | AlongStepGetPhysicalInteractionLength( track, |
---|
70 | previousStepSize, |
---|
71 | currentMinimumStep, |
---|
72 | proposedSafety, |
---|
73 | selection ); |
---|
74 | } |
---|
75 | |
---|
76 | G4double G4WrapperProcess:: |
---|
77 | AtRestGetPhysicalInteractionLength( const G4Track& track, |
---|
78 | G4ForceCondition* condition ) |
---|
79 | { |
---|
80 | return pRegProcess->AtRestGetPhysicalInteractionLength( track, condition ); |
---|
81 | } |
---|
82 | |
---|
83 | G4double G4WrapperProcess:: |
---|
84 | PostStepGetPhysicalInteractionLength( const G4Track& track, |
---|
85 | G4double previousStepSize, |
---|
86 | G4ForceCondition* condition ) |
---|
87 | { |
---|
88 | return pRegProcess->PostStepGetPhysicalInteractionLength( track, |
---|
89 | previousStepSize, |
---|
90 | condition ); |
---|
91 | } |
---|
92 | |
---|
93 | void G4WrapperProcess::SetProcessManager(const G4ProcessManager* procMan) |
---|
94 | { |
---|
95 | pRegProcess->SetProcessManager(procMan); |
---|
96 | } |
---|
97 | |
---|
98 | const G4ProcessManager* G4WrapperProcess::GetProcessManager() |
---|
99 | { |
---|
100 | return pRegProcess->GetProcessManager(); |
---|
101 | } |
---|
102 | |
---|
103 | G4VParticleChange* G4WrapperProcess::PostStepDoIt( const G4Track& track, |
---|
104 | const G4Step& stepData ) |
---|
105 | { |
---|
106 | return pRegProcess->PostStepDoIt( track, stepData ); |
---|
107 | } |
---|
108 | |
---|
109 | G4VParticleChange* G4WrapperProcess::AlongStepDoIt( const G4Track& track, |
---|
110 | const G4Step& stepData ) |
---|
111 | { |
---|
112 | return pRegProcess->AlongStepDoIt( track, stepData ); |
---|
113 | } |
---|
114 | |
---|
115 | G4VParticleChange* G4WrapperProcess::AtRestDoIt( const G4Track& track, |
---|
116 | const G4Step& stepData ) |
---|
117 | { |
---|
118 | return pRegProcess->AtRestDoIt( track, stepData ); |
---|
119 | } |
---|
120 | |
---|
121 | G4bool G4WrapperProcess::IsApplicable(const G4ParticleDefinition& particle) |
---|
122 | { |
---|
123 | return pRegProcess->IsApplicable(particle); |
---|
124 | } |
---|
125 | |
---|
126 | void G4WrapperProcess::BuildPhysicsTable(const G4ParticleDefinition& particle) |
---|
127 | { |
---|
128 | return pRegProcess->BuildPhysicsTable(particle); |
---|
129 | } |
---|
130 | |
---|
131 | void G4WrapperProcess::PreparePhysicsTable(const G4ParticleDefinition& particle) |
---|
132 | { |
---|
133 | return pRegProcess->PreparePhysicsTable(particle); |
---|
134 | } |
---|
135 | |
---|
136 | G4bool G4WrapperProcess:: |
---|
137 | StorePhysicsTable(const G4ParticleDefinition* particle, |
---|
138 | const G4String& directory, |
---|
139 | G4bool ascii) |
---|
140 | { |
---|
141 | return pRegProcess->StorePhysicsTable(particle, directory, ascii); |
---|
142 | } |
---|
143 | |
---|
144 | G4bool G4WrapperProcess:: |
---|
145 | RetrievePhysicsTable( const G4ParticleDefinition* particle, |
---|
146 | const G4String& directory, |
---|
147 | G4bool ascii) |
---|
148 | { |
---|
149 | return pRegProcess->RetrievePhysicsTable(particle, directory, ascii); |
---|
150 | } |
---|
151 | |
---|
152 | void G4WrapperProcess::StartTracking(G4Track* track) |
---|
153 | { |
---|
154 | pRegProcess->StartTracking(track); |
---|
155 | } |
---|
156 | |
---|
157 | void G4WrapperProcess::EndTracking() |
---|
158 | { |
---|
159 | pRegProcess->EndTracking(); |
---|
160 | } |
---|
161 | |
---|
162 | void G4WrapperProcess::RegisterProcess(G4VProcess* process) |
---|
163 | { |
---|
164 | pRegProcess=process; |
---|
165 | theProcessName += process->GetProcessName(); |
---|
166 | theProcessType = process->GetProcessType(); |
---|
167 | } |
---|
168 | |
---|
169 | const G4VProcess* G4WrapperProcess::GetRegisteredProcess() const |
---|
170 | { |
---|
171 | return pRegProcess; |
---|
172 | } |
---|