Geant4  10.02.p03
G4ErrorTrajState Class Referenceabstract

#include <G4ErrorTrajState.hh>

Inheritance diagram for G4ErrorTrajState:
Collaboration diagram for G4ErrorTrajState:

Public Member Functions

 G4ErrorTrajState ()
 
 G4ErrorTrajState (const G4String &partType, const G4Point3D &pos, const G4Vector3D &mom, const G4ErrorTrajErr &errmat=G4ErrorTrajErr(5, 0))
 
virtual ~G4ErrorTrajState ()
 
void SetData (const G4String &partType, const G4Point3D &pos, const G4Vector3D &mom)
 
void BuildCharge ()
 
virtual G4int PropagateError (const G4Track *)
 
virtual G4int Update (const G4Track *)
 
void UpdatePosMom (const G4Point3D &pos, const G4Vector3D &mom)
 
void DumpPosMomError (std::ostream &out=G4cout) const
 
virtual void Dump (std::ostream &out=G4cout) const =0
 
const G4StringGetParticleType () const
 
void SetParticleType (const G4String &partType)
 
G4Point3D GetPosition () const
 
virtual void SetPosition (const G4Point3D pos)
 
G4Vector3D GetMomentum () const
 
virtual void SetMomentum (const G4Vector3D &mom)
 
G4ErrorTrajErr GetError () const
 
virtual void SetError (G4ErrorTrajErr em)
 
G4Track * GetG4Track () const
 
void SetG4Track (G4Track *trk)
 
G4double GetCharge () const
 
void SetCharge (G4double ch)
 
virtual G4eTSType GetTSType () const
 

Protected Attributes

G4String fParticleType
 
G4Point3D fPosition
 
G4Vector3D fMomentum
 
G4double fCharge
 
G4ErrorTrajErr fError
 
G4eTSType theTSType
 
G4Track * theG4Track
 
G4int iverbose
 

Friends

std::ostream & operator<< (std::ostream &, const G4ErrorTrajState &ts)
 

Detailed Description

Definition at line 49 of file G4ErrorTrajState.hh.

Constructor & Destructor Documentation

◆ G4ErrorTrajState() [1/2]

G4ErrorTrajState::G4ErrorTrajState ( )
inline

Definition at line 53 of file G4ErrorTrajState.hh.

◆ G4ErrorTrajState() [2/2]

G4ErrorTrajState::G4ErrorTrajState ( const G4String partType,
const G4Point3D pos,
const G4Vector3D mom,
const G4ErrorTrajErr errmat = G4ErrorTrajErr(5,0) 
)

Definition at line 41 of file G4ErrorTrajState.cc.

Here is the call graph for this function:

◆ ~G4ErrorTrajState()

virtual G4ErrorTrajState::~G4ErrorTrajState ( )
inlinevirtual

Definition at line 60 of file G4ErrorTrajState.hh.

60 {}
Here is the call graph for this function:

Member Function Documentation

◆ BuildCharge()

void G4ErrorTrajState::BuildCharge ( )

Definition at line 85 of file G4ErrorTrajState.cc.

86 {
88  G4ParticleDefinition* particle = particleTable->FindParticle(fParticleType);
89  if( particle == 0)
90  {
91  std::ostringstream message;
92  message << "Particle type not defined: " << fParticleType;
93  G4Exception( "G4ErrorTrajState::BuildCharge()", "GEANT4e-error",
94  FatalException, message);
95  }
96  else
97  {
98  fCharge = particle->GetPDGCharge();
99  }
100 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ParticleTable * GetParticleTable()
G4double GetPDGCharge() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Dump()

virtual void G4ErrorTrajState::Dump ( std::ostream &  out = G4cout) const
pure virtual

Implemented in G4ErrorFreeTrajState, and G4ErrorSurfaceTrajState.

Here is the caller graph for this function:

◆ DumpPosMomError()

void G4ErrorTrajState::DumpPosMomError ( std::ostream &  out = G4cout) const

Definition at line 104 of file G4ErrorTrajState.cc.

105 {
106  out << *this;
107 }
Here is the caller graph for this function:

◆ GetCharge()

G4double G4ErrorTrajState::GetCharge ( ) const
inline

Definition at line 114 of file G4ErrorTrajState.hh.

115  { return fCharge; }

◆ GetError()

G4ErrorTrajErr G4ErrorTrajState::GetError ( ) const
inline

Definition at line 104 of file G4ErrorTrajState.hh.

105  { return fError; }
G4ErrorTrajErr fError
Here is the caller graph for this function:

◆ GetG4Track()

G4Track* G4ErrorTrajState::GetG4Track ( ) const
inline

Definition at line 109 of file G4ErrorTrajState.hh.

110  { return theG4Track; }
Here is the caller graph for this function:

◆ GetMomentum()

G4Vector3D G4ErrorTrajState::GetMomentum ( ) const
inline

Definition at line 99 of file G4ErrorTrajState.hh.

100  { return fMomentum; }
Here is the caller graph for this function:

◆ GetParticleType()

const G4String& G4ErrorTrajState::GetParticleType ( ) const
inline

Definition at line 89 of file G4ErrorTrajState.hh.

90  { return fParticleType;}
Here is the caller graph for this function:

◆ GetPosition()

G4Point3D G4ErrorTrajState::GetPosition ( ) const
inline

Definition at line 94 of file G4ErrorTrajState.hh.

95  { return fPosition; }
Here is the caller graph for this function:

◆ GetTSType()

virtual G4eTSType G4ErrorTrajState::GetTSType ( ) const
inlinevirtual

Definition at line 119 of file G4ErrorTrajState.hh.

120  { return theTSType; }
Here is the caller graph for this function:

◆ PropagateError()

G4int G4ErrorTrajState::PropagateError ( const G4Track *  )
virtual

Reimplemented in G4ErrorFreeTrajState.

Definition at line 53 of file G4ErrorTrajState.cc.

54 {
55  std::ostringstream message;
56  message << "Wrong trajectory state type !" << G4endl
57  << "Called for trajectory state type: " << G4int(GetTSType());
58  G4Exception("G4ErrorTrajState::PropagateError()", "GEANT4e-Error",
59  FatalException, message);
60  return -1;
61 }
int G4int
Definition: G4Types.hh:78
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
virtual G4eTSType GetTSType() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCharge()

void G4ErrorTrajState::SetCharge ( G4double  ch)
inline

Definition at line 116 of file G4ErrorTrajState.hh.

117  { fCharge = ch; }

◆ SetData()

void G4ErrorTrajState::SetData ( const G4String partType,
const G4Point3D pos,
const G4Vector3D mom 
)

Definition at line 74 of file G4ErrorTrajState.cc.

76 {
77  fParticleType = partType;
78  BuildCharge();
79  fPosition = pos;
80  fMomentum = mom;
81 }
static const G4double pos
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetError()

virtual void G4ErrorTrajState::SetError ( G4ErrorTrajErr  em)
inlinevirtual

Definition at line 106 of file G4ErrorTrajState.hh.

107  { fError = em; }
G4ErrorTrajErr fError

◆ SetG4Track()

void G4ErrorTrajState::SetG4Track ( G4Track *  trk)
inline

Definition at line 111 of file G4ErrorTrajState.hh.

112  { theG4Track = trk; }
Here is the caller graph for this function:

◆ SetMomentum()

virtual void G4ErrorTrajState::SetMomentum ( const G4Vector3D mom)
inlinevirtual

Reimplemented in G4ErrorSurfaceTrajState, and G4ErrorFreeTrajState.

Definition at line 101 of file G4ErrorTrajState.hh.

102  { fMomentum = mom; }

◆ SetParticleType()

void G4ErrorTrajState::SetParticleType ( const G4String partType)
inline

Definition at line 91 of file G4ErrorTrajState.hh.

92  { fParticleType = partType;}

◆ SetPosition()

virtual void G4ErrorTrajState::SetPosition ( const G4Point3D  pos)
inlinevirtual

Reimplemented in G4ErrorSurfaceTrajState, and G4ErrorFreeTrajState.

Definition at line 96 of file G4ErrorTrajState.hh.

97  { fPosition = pos; }
static const G4double pos

◆ Update()

virtual G4int G4ErrorTrajState::Update ( const G4Track *  )
inlinevirtual

Reimplemented in G4ErrorFreeTrajState.

Definition at line 75 of file G4ErrorTrajState.hh.

75 { return -1; }
Here is the call graph for this function:

◆ UpdatePosMom()

void G4ErrorTrajState::UpdatePosMom ( const G4Point3D pos,
const G4Vector3D mom 
)

Definition at line 65 of file G4ErrorTrajState.cc.

67 {
68  fPosition = pos;
69  fMomentum = mom;
70 }
static const G4double pos
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const G4ErrorTrajState ts 
)
friend

Definition at line 111 of file G4ErrorTrajState.cc.

112 {
113  // long mode = out.setf(std::ios::fixed,std::ios::floatfield);
114  out
115  << " G4ErrorTrajState of type " << ts.theTSType << " : partycle: "
116  << ts.fParticleType << " position: " << std::setw(6) << ts.fPosition
117  << " momentum: " << ts.fMomentum
118  << " error matrix ";
119  G4cout << ts.fError << G4endl;
120 
121  return out;
122 }
G4ErrorTrajErr fError
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Data Documentation

◆ fCharge

G4double G4ErrorTrajState::fCharge
protected

Definition at line 127 of file G4ErrorTrajState.hh.

◆ fError

G4ErrorTrajErr G4ErrorTrajState::fError
protected

Definition at line 128 of file G4ErrorTrajState.hh.

◆ fMomentum

G4Vector3D G4ErrorTrajState::fMomentum
protected

Definition at line 126 of file G4ErrorTrajState.hh.

◆ fParticleType

G4String G4ErrorTrajState::fParticleType
protected

Definition at line 124 of file G4ErrorTrajState.hh.

◆ fPosition

G4Point3D G4ErrorTrajState::fPosition
protected

Definition at line 125 of file G4ErrorTrajState.hh.

◆ iverbose

G4int G4ErrorTrajState::iverbose
protected

Definition at line 134 of file G4ErrorTrajState.hh.

◆ theG4Track

G4Track* G4ErrorTrajState::theG4Track
protected

Definition at line 132 of file G4ErrorTrajState.hh.

◆ theTSType

G4eTSType G4ErrorTrajState::theTSType
protected

Definition at line 130 of file G4ErrorTrajState.hh.


The documentation for this class was generated from the following files: