Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics
include
TG4StackPopper.h
Go to the documentation of this file.
1
#ifndef TG4_STACK_POPPER_H
2
#define TG4_STACK_POPPER_H
3
4
//------------------------------------------------
5
// The Geant4 Virtual Monte Carlo package
6
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7
// All rights reserved.
8
//
9
// For the licensing terms see geant4_vmc/LICENSE.
10
// Contact: root-vmc@cern.ch
11
//-------------------------------------------------
12
17
18
#include <G4VProcess.hh>
19
20
class
TVirtualMCStack;
21
22
class
G4Track;
23
28
29
enum
TG4StackPopperProcessType
30
{
31
fStackPopper
= 601
32
};
33
39
40
class
TG4StackPopper
:
public
G4VProcess
41
{
42
public
:
43
TG4StackPopper
(
const
G4String& processName =
"stackPopper"
);
44
virtual
~TG4StackPopper
();
45
46
// static access method
47
static
TG4StackPopper
*
Instance
();
48
49
// methods
50
virtual
G4bool
IsApplicable
(
51
const
G4ParticleDefinition
&
/*particleDefinition*/
);
52
53
virtual
G4double
PostStepGetPhysicalInteractionLength
(
const
G4Track& track,
54
G4double previousStepSize, G4ForceCondition* condition);
55
56
virtual
G4VParticleChange*
PostStepDoIt
(
57
const
G4Track& track,
const
G4Step& step);
58
59
// No operation in AlongStepDoIt and AtRestDoIt
60
61
virtual
G4double
AlongStepGetPhysicalInteractionLength
(
62
const
G4Track&
/*track*/
, G4double
/*previousStepSize*/
,
63
G4double
/*currentMinimumStep*/
, G4double&
/*proposedSafety*/
,
64
G4GPILSelection*
/*selection*/
)
65
{
66
return
-1.0;
67
}
68
69
virtual
G4double
AtRestGetPhysicalInteractionLength
(
70
const
G4Track&
/*track*/
, G4ForceCondition*
/*condition*/
)
71
{
72
return
-1.0;
73
}
74
75
virtual
G4VParticleChange*
AlongStepDoIt
(
76
const
G4Track&
/*track*/
,
const
G4Step&
/*step*/
)
77
{
78
return
0;
79
}
80
81
virtual
G4VParticleChange*
AtRestDoIt
(
82
const
G4Track&
/*track*/
,
const
G4Step&
/*step*/
)
83
{
84
return
0;
85
}
86
87
void
Notify
();
88
void
Reset
();
89
void
SetMCStack
(TVirtualMCStack* mcStack);
90
void
SetDoExclusiveStep
(G4TrackStatus trackStatus);
91
92
G4bool
HasPoppedTracks
()
const
;
93
94
private
:
96
TG4StackPopper
(
const
TG4StackPopper
& right);
98
TG4StackPopper
&
operator=
(
const
TG4StackPopper
& right);
99
101
static
G4ThreadLocal
TG4StackPopper
*
fgInstance
;
102
104
TVirtualMCStack*
fMCStack
;
105
107
G4int
fNofDoneTracks
;
108
113
G4bool
fDoExclusiveStep
;
114
116
G4TrackStatus
fTrackStatus
;
117
};
118
119
// inline methods
120
121
inline
TG4StackPopper
*
TG4StackPopper::Instance
()
122
{
124
return
fgInstance
;
125
}
126
127
inline
G4bool
TG4StackPopper::IsApplicable
(
128
const
G4ParticleDefinition
&
/*particleDefinition*/
)
129
{
131
return
true
;
132
}
133
134
inline
void
TG4StackPopper::SetMCStack
(TVirtualMCStack* mcStack)
135
{
137
fMCStack
= mcStack;
138
}
139
140
#endif
// TG4_STACK_POPPER_H
G4ParticleDefinition
G4VProcess
TG4StackPopper::HasPoppedTracks
G4bool HasPoppedTracks() const
Definition
TG4StackPopper.cxx:185
TG4StackPopper::SetDoExclusiveStep
void SetDoExclusiveStep(G4TrackStatus trackStatus)
Definition
TG4StackPopper.cxx:176
TG4StackPopper::fgInstance
static G4ThreadLocal TG4StackPopper * fgInstance
this instance
Definition
TG4StackPopper.h:101
TG4StackPopper::fTrackStatus
G4TrackStatus fTrackStatus
The track status to be restored after performing exclusive step.
Definition
TG4StackPopper.h:116
TG4StackPopper::AtRestDoIt
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
Definition
TG4StackPopper.h:81
TG4StackPopper::AlongStepDoIt
virtual G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
Definition
TG4StackPopper.h:75
TG4StackPopper::Instance
static TG4StackPopper * Instance()
Definition
TG4StackPopper.h:121
TG4StackPopper::TG4StackPopper
TG4StackPopper(const G4String &processName="stackPopper")
Definition
TG4StackPopper.cxx:30
TG4StackPopper::PostStepDoIt
virtual G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step)
Definition
TG4StackPopper.cxx:85
TG4StackPopper::SetMCStack
void SetMCStack(TVirtualMCStack *mcStack)
Definition
TG4StackPopper.h:134
TG4StackPopper::TG4StackPopper
TG4StackPopper(const TG4StackPopper &right)
Not implemented.
TG4StackPopper::AlongStepGetPhysicalInteractionLength
virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track &, G4double, G4double, G4double &, G4GPILSelection *)
Definition
TG4StackPopper.h:61
TG4StackPopper::fMCStack
TVirtualMCStack * fMCStack
Cached pointer to thread-local VMC stack.
Definition
TG4StackPopper.h:104
TG4StackPopper::fDoExclusiveStep
G4bool fDoExclusiveStep
Definition
TG4StackPopper.h:113
TG4StackPopper::operator=
TG4StackPopper & operator=(const TG4StackPopper &right)
Not implemented.
TG4StackPopper::IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition &)
Definition
TG4StackPopper.h:127
TG4StackPopper::fNofDoneTracks
G4int fNofDoneTracks
the counter for popped tracks
Definition
TG4StackPopper.h:107
TG4StackPopper::PostStepGetPhysicalInteractionLength
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
Definition
TG4StackPopper.cxx:65
TG4StackPopper::Reset
void Reset()
Definition
TG4StackPopper.cxx:167
TG4StackPopper::~TG4StackPopper
virtual ~TG4StackPopper()
Definition
TG4StackPopper.cxx:53
TG4StackPopper::AtRestGetPhysicalInteractionLength
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
Definition
TG4StackPopper.h:69
TG4StackPopper::Notify
void Notify()
Definition
TG4StackPopper.cxx:159
TG4StackPopperProcessType
TG4StackPopperProcessType
Definition of Stack popper process type.
Definition
TG4StackPopper.h:30
fStackPopper
@ fStackPopper
Definition
TG4StackPopper.h:31
Generated on
for Geant4 VMC by
1.17.0