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
G4ErrorTrajState.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ErrorTrajState.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
// Class Description:
30
//
31
// Base class for the trajectory state
32
33
// History:
34
// - Created: P. Arce
35
// --------------------------------------------------------------------
36
37
#ifndef G4ErrorTrajState_hh
38
#define G4ErrorTrajState_hh
39
40
#include "
globals.hh
"
41
#include "
G4Track.hh
"
42
#include "
G4Point3D.hh
"
43
#include "
G4Vector3D.hh
"
44
#include "
G4ErrorTrajErr.hh
"
45
46
enum
G4eTSType
{
G4eTS_FREE
,
G4eTS_OS
};
47
48
class
G4ErrorTrajState
49
{
50
public
:
// with description
51
52
G4ErrorTrajState
() :
fCharge
(0.),
theG4Track
(0),
iverbose
(0) {}
53
54
G4ErrorTrajState
(
const
G4String
& partType,
const
G4Point3D
&
pos
,
55
const
G4Vector3D
&
mom
,
56
const
G4ErrorTrajErr
& errmat =
G4ErrorTrajErr
(5,0) );
57
// Constructor by providing particle, position and momentum
58
59
virtual
~G4ErrorTrajState
(){}
60
61
void
SetData
(
const
G4String
& partType,
const
G4Point3D
& pos,
62
const
G4Vector3D
& mom );
63
// Set particle, position and momentum
64
65
void
BuildCharge
();
66
// Build charge based on particle type
67
68
friend
69
std::ostream&
operator<<
(std::ostream&,
const
G4ErrorTrajState
& ts);
70
71
virtual
G4int
PropagateError
(
const
G4Track
* );
72
// Propagate the error along the step
73
74
virtual
G4int
Update
(
const
G4Track
* ){
return
-1; }
75
// Update parameters from G4Track
76
77
void
UpdatePosMom
(
const
G4Point3D
& pos,
const
G4Vector3D
& mom );
78
// Update position and momentum
79
80
void
DumpPosMomError
( std::ostream& out = G4cout )
const
;
81
// Dump position, momentum and error
82
83
virtual
void
Dump
( std::ostream& out = G4cout )
const
= 0;
84
// Abstract method to dump all TrajState parameters
85
86
// Set and Get methods
87
88
const
G4String
&
GetParticleType
()
const
89
{
return
fParticleType
;}
90
void
SetParticleType
(
const
G4String
& partType )
91
{
fParticleType
= partType;}
92
93
G4Point3D
GetPosition
()
const
94
{
return
fPosition
; }
95
virtual
void
SetPosition
(
const
G4Point3D
pos )
96
{
fPosition
=
pos
; }
97
98
G4Vector3D
GetMomentum
()
const
99
{
return
fMomentum
; }
100
virtual
void
SetMomentum
(
const
G4Vector3D
& mom )
101
{
fMomentum
=
mom
; }
102
103
G4ErrorTrajErr
GetError
()
const
104
{
return
fError
; }
105
virtual
void
SetError
(
G4ErrorTrajErr
em )
106
{
fError
= em; }
107
108
G4Track
*
GetG4Track
()
const
109
{
return
theG4Track
; }
110
void
SetG4Track
(
G4Track
* trk )
111
{
theG4Track
= trk; }
112
113
G4double
GetCharge
()
const
114
{
return
fCharge
; }
115
void
SetCharge
(
G4double
ch )
116
{
fCharge
= ch; }
117
118
virtual
G4eTSType
GetTSType
()
const
119
{
return
theTSType
; }
120
121
protected
:
122
123
G4String
fParticleType
;
124
G4Point3D
fPosition
;
125
G4Vector3D
fMomentum
;
126
G4double
fCharge
;
127
G4ErrorTrajErr
fError
;
128
129
G4eTSType
theTSType
;
130
131
G4Track
*
theG4Track
;
132
133
G4int
iverbose
;
134
};
135
136
#endif
geant4
tree
geant4-10.6-release
source
error_propagation
include
G4ErrorTrajState.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:13
using
1.8.2 with
ECCE GitHub integration