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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
source
analysis
digits_hits
error_propagation
include
src
G4ErrorFreeTrajParam.cc
G4ErrorFreeTrajState.cc
G4ErrorGeomVolumeTarget.cc
G4ErrorMagFieldLimitProcess.cc
G4ErrorMatrix.cc
G4ErrorMessenger.cc
G4ErrorPhysicsList.cc
G4ErrorPropagator.cc
G4ErrorPropagatorManager.cc
G4ErrorRunManagerHelper.cc
G4ErrorStepLengthLimitProcess.cc
G4ErrorSurfaceTrajParam.cc
G4ErrorSurfaceTrajState.cc
G4ErrorSymMatrix.cc
G4ErrorTrackLengthTarget.cc
G4ErrorTrajState.cc
G4VErrorLimitProcess.cc
event
externals
g3tog4
geometry
global
graphics_reps
intercoms
interfaces
materials
parameterisations
particles
persistency
physics_lists
processes
readout
run
track
tracking
visualization
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4ErrorTrajState.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ErrorTrajState.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
//
26
//
27
// ------------------------------------------------------------
28
// GEANT 4 class implementation file
29
// ------------------------------------------------------------
30
//
31
32
#include "
G4ErrorTrajState.hh
"
33
#include "
G4ParticleTable.hh
"
34
#include "
G4ParticleDefinition.hh
"
35
#include "
G4ErrorPropagatorData.hh
"
36
37
#include <iomanip>
38
39
//--------------------------------------------------------------------------
40
G4ErrorTrajState::G4ErrorTrajState
(
const
G4String
& partType,
41
const
G4Point3D
&
pos
,
42
const
G4Vector3D
&
mom
,
43
const
G4ErrorTrajErr
& errmat)
44
: fParticleType(partType), fPosition(pos), fMomentum(mom), fCharge(0.),
45
fError(errmat), theTSType(
G4eTS_FREE
), theG4Track(0)
46
{
47
iverbose
=
G4ErrorPropagatorData::verbose
();
48
}
49
50
51
//--------------------------------------------------------------------------
52
G4int
G4ErrorTrajState::PropagateError
(
const
G4Track
* )
53
{
54
std::ostringstream
message
;
55
message <<
"Wrong trajectory state type !"
<<
G4endl
56
<<
"Called for trajectory state type: "
<<
G4int
(
GetTSType
());
57
G4Exception
(
"G4ErrorTrajState::PropagateError()"
,
"GEANT4e-Error"
,
58
FatalException
, message);
59
return
-1;
60
}
61
62
63
//--------------------------------------------------------------------------
64
void
G4ErrorTrajState::UpdatePosMom
(
const
G4Point3D
&
pos
,
65
const
G4Vector3D
&
mom
)
66
{
67
fPosition
=
pos
;
68
fMomentum
=
mom
;
69
}
70
71
72
//--------------------------------------------------------------------------
73
void
G4ErrorTrajState::SetData
(
const
G4String
& partType,
74
const
G4Point3D
&
pos
,
const
G4Vector3D
&
mom
)
75
{
76
fParticleType
= partType;
77
BuildCharge
();
78
fPosition
=
pos
;
79
fMomentum
=
mom
;
80
}
81
82
83
//--------------------------------------------------------------------------
84
void
G4ErrorTrajState::BuildCharge
()
85
{
86
G4ParticleTable
* particleTable =
G4ParticleTable::GetParticleTable
();
87
G4ParticleDefinition
*
particle
= particleTable->
FindParticle
(
fParticleType
);
88
if
( particle == 0)
89
{
90
std::ostringstream
message
;
91
message <<
"Particle type not defined: "
<<
fParticleType
;
92
G4Exception
(
"G4ErrorTrajState::BuildCharge()"
,
"GEANT4e-error"
,
93
FatalException
, message);
94
}
95
else
96
{
97
fCharge
= particle->
GetPDGCharge
();
98
}
99
}
100
101
102
//------------------------------------------------------------------------
103
void
G4ErrorTrajState::DumpPosMomError
( std::ostream& out )
const
104
{
105
out << *
this
;
106
}
107
108
109
//--------------------------------------------------------------------------
110
std::ostream&
operator<<
(std::ostream& out,
const
G4ErrorTrajState
& ts)
111
{
112
// long mode = out.setf(std::ios::fixed,std::ios::floatfield);
113
out
114
<<
" G4ErrorTrajState of type "
<< ts.
theTSType
<<
" : partycle: "
115
<< ts.
fParticleType
<<
" position: "
<< std::setw(6) << ts.
fPosition
116
<<
" momentum: "
<< ts.
fMomentum
117
<<
" error matrix "
;
118
G4cout
<< ts.
fError
<<
G4endl
;
119
120
return
out;
121
}
122
geant4
tree
geant4-10.6-release
source
error_propagation
src
G4ErrorTrajState.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:13
using
1.8.2 with
ECCE GitHub integration