ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
StepMax.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file StepMax.cc
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
//
28
//
29
//
30
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32
33
#include "StepMax.hh"
34
#include "StepMaxMessenger.hh"
35
36
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
37
38
StepMax::StepMax
(
const
G4String
& processName,
G4ProcessType
type)
39
:
G4VDiscreteProcess
(processName,type),fMess(0)
40
{
41
fMaxStep1
=
fMaxStep2
=
DBL_MAX
;
42
fApplyMaxStep2
=
true
;
43
fMess
=
new
StepMaxMessenger
(
this
);
44
}
45
46
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47
48
StepMax::~StepMax
() {
delete
fMess
; }
49
50
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51
52
G4bool
StepMax::IsApplicable
(
const
G4ParticleDefinition
&
particle
)
53
{
54
return
(particle.
GetPDGCharge
() != 0. && !particle.
IsShortLived
());
55
}
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
void
StepMax::SetMaxStep1
(
G4double
step
) {
fMaxStep1
=
step
;}
60
61
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62
63
void
StepMax::SetMaxStep2
(
G4double
step
) {
fMaxStep2
=
step
;}
64
65
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66
67
void
StepMax::ApplyMaxStep2
(
G4bool
value
) {
fApplyMaxStep2
=
value
;}
68
69
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
70
71
G4double
StepMax::PostStepGetPhysicalInteractionLength
(
const
G4Track
&,
72
G4double
,
73
G4ForceCondition
*
condition
)
74
{
75
// condition is set to "Not Forced"
76
*condition =
NotForced
;
77
78
if
(
fApplyMaxStep2
)
return
fMaxStep2
;
79
else
return
fMaxStep1
;
80
}
81
82
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84
G4VParticleChange
*
StepMax::PostStepDoIt
(
const
G4Track
& aTrack,
const
G4Step
&)
85
{
86
// do nothing
87
aParticleChange
.
Initialize
(aTrack);
88
return
&
aParticleChange
;
89
}
90
91
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
geant4
tree
geant4-10.6-release
examples
extended
electromagnetic
TestEm11
src
StepMax.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:00
using
1.8.2 with
ECCE GitHub integration