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
G4VFastSimulationModel.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4VFastSimulationModel.hh
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
//
28
//
29
//---------------------------------------------------------------
30
//
31
// G4VFastSimulationModel.hh
32
//
33
// Description:
34
// Base class for fast simulation models.
35
//
36
// History:
37
// Oct 97: Verderi && MoraDeFreitas - First Implementation.
38
//
39
//---------------------------------------------------------------
40
41
42
#ifndef G4VFastSimulationModel_h
43
#define G4VFastSimulationModel_h
44
45
#include "
G4FastTrack.hh
"
46
#include "
G4FastStep.hh
"
47
48
//---------------------------
49
// For possible future needs:
50
//---------------------------
51
typedef
G4Region
G4Envelope
;
52
53
//-------------------------------------------
54
//
55
// G4VFastSimulationModel class
56
//
57
//-------------------------------------------
58
59
// Class Description:
60
// This is the abstract class for the implementation of parameterisations.
61
// You have to inherit from it to implement your concrete parameterisation
62
// model.
63
//
64
65
class
G4VFastSimulationModel
66
{
67
public
:
// With description
68
69
G4VFastSimulationModel
(
const
G4String
& aName);
70
// aName identifies the parameterisation model.
71
72
G4VFastSimulationModel
(
const
G4String
& aName,
G4Envelope
*,
73
G4bool
IsUnique=
FALSE
);
74
// This constructor allows you to get a quick "getting started".
75
// In addition to the model name, this constructor accepts a G4LogicalVolume
76
// pointer. This volume will automatically becomes the envelope, and the
77
// needed G4FastSimulationManager object is constructed if necessary giving
78
// it the G4LogicalVolume pointer and the boolean value. If it already
79
// exists, the model is simply added to this manager. However the
80
// G4VFastSimulationModel object will not keep track of the envelope given
81
// in the constructor.
82
// The boolean argument is there for optimization purpose: if you know that
83
// the G4LogicalVolume envelope is placed only once you can turn this
84
// boolean value to "true" (an automated mechanism is foreseen here.)
85
86
public
:
// Without description
87
virtual
~G4VFastSimulationModel
() {};
88
89
public
:
// With description
90
91
virtual
G4bool
IsApplicable
(
const
G4ParticleDefinition
&) = 0;
92
// In your implementation, you have to return "true" when your model is
93
// applicable to the G4ParticleDefinition passed to this method. The
94
// G4ParticleDefinition provides all intrisic particle informations (mass,
95
// charge, spin, name ...).
96
97
virtual
G4bool
ModelTrigger
(
const
G4FastTrack
&) = 0;
98
// You have to return "true" when the dynamics conditions to trigger your
99
// parameterisation are fulfiled. The G4FastTrack provides you access to
100
// the current G4Track, gives simple access to envelope related features
101
// (G4LogicalVolume, G4VSolid, G4AffineTransform references between the
102
// global and the envelope local coordinates systems) and simple access to
103
// the position, momentum expressed in the envelope coordinate system.
104
// Using those quantities and the G4VSolid methods, you can for example
105
// easily check how far you are from the envelope boundary.
106
107
virtual
void
DoIt
(
const
G4FastTrack
&,
G4FastStep
&) = 0;
108
// Your parameterisation properly said. The G4FastTrack reference provides
109
// input informations. The final state of the particles after parameterisation
110
// has to be returned through the G4FastStep reference. This final state is
111
// described has "requests" the tracking will apply after your
112
// parameterisation has been invoked.
113
114
// ---------------------------
115
// -- Idem for AtRest methods:
116
// ---------------------------
117
// -- A default dummy implementation is provided.
118
119
virtual
120
G4bool
AtRestModelTrigger
(
const
G4FastTrack
&) {
return
false
;}
121
// You have to return "true" when the dynamics conditions to trigger your
122
// parameterisation are fulfiled. The G4FastTrack provides you access to
123
// the current G4Track, gives simple access to envelope related features
124
// (G4LogicalVolume, G4VSolid, G4AffineTransform references between the
125
// global and the envelope local coordinates systems) and simple access to
126
// the position, momentum expressed in the envelope coordinate system.
127
// Using those quantities and the G4VSolid methods, you can for example
128
// easily check how far you are from the envelope boundary.
129
130
virtual
131
void
AtRestDoIt
(
const
G4FastTrack
&,
G4FastStep
&) {}
132
// Your parameterisation properly said. The G4FastTrack reference provides
133
// input informations. The final state of the particles after parameterisation
134
// has to be returned through the G4FastStep reference. This final state is
135
// described has "requests" the tracking will apply after your
136
// parameterisation has been invoked.
137
138
public
:
// Without description
139
140
// Useful public methods :
141
const
G4String
GetName
()
const
;
142
G4bool
operator ==
(
const
G4VFastSimulationModel
&)
const
;
143
144
private
:
145
//-------------
146
// Model Name:
147
//-------------
148
G4String
theModelName
;
149
};
150
151
inline
const
G4String
G4VFastSimulationModel::GetName
()
const
152
{
153
return
theModelName
;
154
}
155
156
inline
G4bool
157
G4VFastSimulationModel::operator ==
(
const
G4VFastSimulationModel
& fsm)
const
158
{
159
return
(
this
==&fsm) ?
true
:
false
;
160
}
161
#endif
geant4
tree
geant4-10.6-release
source
processes
parameterisation
include
G4VFastSimulationModel.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:52
using
1.8.2 with
ECCE GitHub integration