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
StepMaxProcess.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file StepMaxProcess.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 "
StepMaxProcess.hh
"
34
#include "StepMaxMessenger.hh"
35
#include "HistoManager.hh"
36
37
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38
39
StepMaxProcess::StepMaxProcess
(
const
G4String
& processName,
G4ProcessType
type)
40
:
G4VDiscreteProcess
(processName,type),fMess(0)
41
{
42
fMaxStep1
=
fMaxStep2
=
DBL_MAX
;
43
fApplyMaxStep2
=
true
;
44
fMess
=
new
StepMaxMessenger
(
this
);
45
}
46
47
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48
49
StepMaxProcess::~StepMaxProcess
() {
delete
fMess
; }
50
51
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52
53
G4bool
StepMaxProcess::IsApplicable
(
const
G4ParticleDefinition
&
particle
)
54
{
55
return
(particle.
GetPDGCharge
() != 0. && !particle.
IsShortLived
());
56
}
57
58
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59
60
void
StepMaxProcess::SetMaxStep1
(
G4double
step
) {
fMaxStep1
=
step
;}
61
62
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
63
64
void
StepMaxProcess::ApplyMaxStep2
(
G4bool
value
) {
fApplyMaxStep2
=
value
;}
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
67
68
G4double
StepMaxProcess::PostStepGetPhysicalInteractionLength
(
const
G4Track
&,
69
G4double
,
70
G4ForceCondition
*
condition
)
71
{
72
// condition is set to "Not Forced"
73
*condition =
NotForced
;
74
75
if
(
fApplyMaxStep2
) {
76
G4AnalysisManager
* analysisManager =
G4AnalysisManager::Instance
();
77
G4int
ih = 10;
78
if
(analysisManager->
GetH1Activation
(ih))
79
fMaxStep2
= analysisManager->
GetH1Width
(ih)*analysisManager->
GetH1Unit
(ih);
80
return
fMaxStep2
;
81
}
82
else
return
fMaxStep1
;
83
}
84
85
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
86
87
G4VParticleChange
*
StepMaxProcess::PostStepDoIt
(
const
G4Track
& aTrack,
88
const
G4Step
&)
89
{
90
// do nothing
91
aParticleChange
.
Initialize
(aTrack);
92
return
&
aParticleChange
;
93
}
94
95
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
geant4
tree
geant4-10.6-release
examples
extended
hadronic
Hadr07
src
StepMaxProcess.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:07
using
1.8.2 with
ECCE GitHub integration