source: trunk/source/error_propagation/include/G4ErrorTrajState.hh@ 1095

Last change on this file since 1095 was 1058, checked in by garnier, 17 years ago

file release beta

File size: 4.3 KB
RevLine 
[815]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// $Id: G4ErrorTrajState.hh,v 1.2 2007/05/29 14:41:35 gcosmo Exp $
[1058]28// GEANT4 tag $Name: geant4-09-02-ref-02 $
[815]29//
30//
31// Class Description:
32//
33// Base class for the trajectory state
34
35// History:
36// - Created: P. Arce
37// --------------------------------------------------------------------
38
39#ifndef G4ErrorTrajState_hh
40#define G4ErrorTrajState_hh
41
42#include "globals.hh"
43#include "G4Track.hh"
44#include "G4Point3D.hh"
45#include "G4Vector3D.hh"
46#include "G4ErrorTrajErr.hh"
47
48enum G4eTSType{ G4eTS_FREE, G4eTS_OS };
49
50class G4ErrorTrajState
51{
52 public: // with description
53
54 G4ErrorTrajState(){}
55
56 G4ErrorTrajState( const G4String& partType, const G4Point3D& pos,
57 const G4Vector3D& mom,
58 const G4ErrorTrajErr& errmat = G4ErrorTrajErr(5,0) );
59 // Constructor by providing particle, position and momentum
60
61 virtual ~G4ErrorTrajState(){}
62
63 void SetData( const G4String& partType, const G4Point3D& pos,
64 const G4Vector3D& mom );
65 // Set particle, position and momentum
66
67 void BuildCharge();
68 // Build charge based on particle type
69
70 friend
71 std::ostream& operator<<(std::ostream&, const G4ErrorTrajState& ts);
72
73 virtual G4int PropagateError( const G4Track* );
74 // Propagate the error along the step
75
76 virtual G4int Update( const G4Track* ){ return -1; }
77 // Update parameters from G4Track
78
79 void UpdatePosMom( const G4Point3D& pos, const G4Vector3D& mom );
80 // Update position and momentum
81
82 void DumpPosMomError( std::ostream& out = G4cout ) const;
83 // Dump position, momentum and error
84
85 virtual void Dump( std::ostream& out = G4cout ) const = 0;
86 // Abstract method to dump all TrajState parameters
87
88 // Set and Get methods
89
90 const G4String& GetParticleType() const
91 { return fParticleType;}
92 void SetParticleType( const G4String& partType )
93 { fParticleType = partType;}
94
95 G4Point3D GetPosition() const
96 { return fPosition; }
97 virtual void SetPosition( const G4Point3D pos )
98 { fPosition = pos; }
99
100 G4Vector3D GetMomentum() const
101 { return fMomentum; }
102 virtual void SetMomentum( const G4Vector3D& mom )
103 { fMomentum = mom; }
104
105 G4ErrorTrajErr GetError() const
106 { return fError; }
107 virtual void SetError( G4ErrorTrajErr em )
108 { fError = em; }
109
110 G4Track* GetG4Track() const
111 { return theG4Track; }
112 void SetG4Track( G4Track* trk )
113 { theG4Track = trk; }
114
115 G4double GetCharge() const
116 { return fCharge; }
117 void SetCharge( G4double ch )
118 { fCharge = ch; }
119
120 virtual G4eTSType GetTSType() const
121 { return theTSType; }
122
123 protected:
124
125 G4String fParticleType;
126 G4Point3D fPosition;
127 G4Vector3D fMomentum;
128 G4double fCharge;
129 G4ErrorTrajErr fError;
130
131 G4eTSType theTSType;
132
133 G4Track* theG4Track;
134
135 G4int iverbose;
136};
137
138#endif
Note: See TracBrowser for help on using the repository browser.