Geant4.10
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4.10.00.p01
examples
extended
field
field01
include
F01StepCut.hh
Go to the documentation of this file.
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
/// \file field/field01/include/F01StepCut.hh
27
/// \brief Definition of the F01StepCut class
28
//
29
//
30
// $Id: F01StepCut.hh 76248 2013-11-08 11:19:52Z gcosmo $
31
//
32
//
33
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
34
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35
36
#ifndef F01StepCut_h
37
#define F01StepCut_h 1
38
39
#include "
G4VDiscreteProcess.hh
"
40
41
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42
43
class
F01StepCut
:
public
G4VDiscreteProcess
44
{
45
public
:
46
47
F01StepCut
(
const
G4String
& processName =
"UserStepCut"
);
48
F01StepCut
(
F01StepCut
&);
49
50
virtual
~F01StepCut
();
51
52
virtual
G4double
PostStepGetPhysicalInteractionLength
(
53
const
G4Track
& track,
54
G4double
previousStepSize,
55
G4ForceCondition
*
condition
56
);
57
58
virtual
G4VParticleChange
*
PostStepDoIt
(
59
const
G4Track
&,
60
const
G4Step
&
61
);
62
63
void
SetMaxStep
(
G4double
);
64
65
protected
:
66
67
// it is not needed here !
68
virtual
G4double
GetMeanFreePath
(
const
G4Track
& aTrack,
69
G4double
previousStepSize,
70
G4ForceCondition
* condition
71
);
72
73
private
:
74
75
// hide assignment operator as private
76
F01StepCut
& operator=(
const
F01StepCut
&
right
);
77
78
private
:
79
80
G4double
fMaxChargedStep;
81
};
82
83
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84
85
// inlined function members implementation
86
87
inline
G4double
F01StepCut::PostStepGetPhysicalInteractionLength
(
88
const
G4Track
& aTrack,
89
G4double
,
90
G4ForceCondition
*
condition
)
91
{
92
// condition is set to "Not Forced"
93
*condition =
NotForced
;
94
95
G4double
proposedStep =
DBL_MAX
;
96
97
if
((fMaxChargedStep > 0.) &&
98
(aTrack.
GetVolume
() != 0) &&
99
(aTrack.
GetVolume
()->
GetName
() ==
"Absorber"
) &&
100
(aTrack.
GetDynamicParticle
()->
GetDefinition
()->
GetPDGCharge
() != 0.))
101
proposedStep = fMaxChargedStep;
102
103
return
proposedStep;
104
}
105
106
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
107
108
inline
G4VParticleChange
*
F01StepCut::PostStepDoIt
(
109
const
G4Track
& aTrack,
110
const
G4Step
&
111
)
112
{
113
// do nothing
114
aParticleChange
.
Initialize
(aTrack);
115
return
&
aParticleChange
;
116
}
117
118
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
119
120
inline
G4double
F01StepCut::GetMeanFreePath
(
const
G4Track
&,
121
G4double
,
122
G4ForceCondition
*)
123
{
124
return
0.;
125
}
126
127
#endif
condition
G4double condition(const G4ErrorSymMatrix &m)
F01StepCut::F01StepCut
F01StepCut(const G4String &processName="UserStepCut")
Definition:
F01StepCut.cc:44
F01StepCut::SetMaxStep
void SetMaxStep(G4double)
Definition:
F01StepCut.cc:66
G4VDiscreteProcess.hh
right
Definition:
F04UserTrackInformation.hh:37
G4Track::GetDynamicParticle
const G4DynamicParticle * GetDynamicParticle() const
F01StepCut::PostStepDoIt
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
Definition:
F01StepCut.hh:108
G4DynamicParticle::GetDefinition
G4ParticleDefinition * GetDefinition() const
F01StepCut::~F01StepCut
virtual ~F01StepCut()
Definition:
F01StepCut.cc:55
G4VPhysicalVolume::GetName
const G4String & GetName() const
G4Step
Definition:
G4Step.hh:76
F01StepCut
Definition:
F01StepCut.hh:43
G4ParticleChange::Initialize
virtual void Initialize(const G4Track &)
Definition:
G4ParticleChange.cc:228
F01StepCut::GetMeanFreePath
virtual G4double GetMeanFreePath(const G4Track &aTrack, G4double previousStepSize, G4ForceCondition *condition)
Definition:
F01StepCut.hh:120
NotForced
Definition:
G4ForceCondition.hh:56
F01StepCut::PostStepGetPhysicalInteractionLength
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
Definition:
F01StepCut.hh:87
G4VProcess::aParticleChange
G4ParticleChange aParticleChange
Definition:
G4VProcess.hh:289
G4Track
Definition:
G4Track.hh:73
G4Track::GetVolume
G4VPhysicalVolume * GetVolume() const
G4VDiscreteProcess
Definition:
G4VDiscreteProcess.hh:58
G4double
double G4double
Definition:
G4Types.hh:76
G4ForceCondition
G4ForceCondition
Definition:
G4ForceCondition.hh:49
G4ParticleDefinition::GetPDGCharge
G4double GetPDGCharge() const
Definition:
G4ParticleDefinition.hh:163
DBL_MAX
#define DBL_MAX
Definition:
templates.hh:83
G4VParticleChange
Definition:
G4VParticleChange.hh:94
G4String
Definition:
examples/extended/parallel/TopC/ParN02/AnnotatedFiles/G4String.hh:45
Generated on Wed Apr 30 2014 15:54:34 for Geant4.10 by
1.8.7