00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef G4ErrorTrajState_hh
00039 #define G4ErrorTrajState_hh
00040
00041 #include "globals.hh"
00042 #include "G4Track.hh"
00043 #include "G4Point3D.hh"
00044 #include "G4Vector3D.hh"
00045 #include "G4ErrorTrajErr.hh"
00046
00047 enum G4eTSType{ G4eTS_FREE, G4eTS_OS };
00048
00049 class G4ErrorTrajState
00050 {
00051 public:
00052
00053 G4ErrorTrajState() : fCharge(0.), theG4Track(0), iverbose(0) {}
00054
00055 G4ErrorTrajState( const G4String& partType, const G4Point3D& pos,
00056 const G4Vector3D& mom,
00057 const G4ErrorTrajErr& errmat = G4ErrorTrajErr(5,0) );
00058
00059
00060 virtual ~G4ErrorTrajState(){}
00061
00062 void SetData( const G4String& partType, const G4Point3D& pos,
00063 const G4Vector3D& mom );
00064
00065
00066 void BuildCharge();
00067
00068
00069 friend
00070 std::ostream& operator<<(std::ostream&, const G4ErrorTrajState& ts);
00071
00072 virtual G4int PropagateError( const G4Track* );
00073
00074
00075 virtual G4int Update( const G4Track* ){ return -1; }
00076
00077
00078 void UpdatePosMom( const G4Point3D& pos, const G4Vector3D& mom );
00079
00080
00081 void DumpPosMomError( std::ostream& out = G4cout ) const;
00082
00083
00084 virtual void Dump( std::ostream& out = G4cout ) const = 0;
00085
00086
00087
00088
00089 const G4String& GetParticleType() const
00090 { return fParticleType;}
00091 void SetParticleType( const G4String& partType )
00092 { fParticleType = partType;}
00093
00094 G4Point3D GetPosition() const
00095 { return fPosition; }
00096 virtual void SetPosition( const G4Point3D pos )
00097 { fPosition = pos; }
00098
00099 G4Vector3D GetMomentum() const
00100 { return fMomentum; }
00101 virtual void SetMomentum( const G4Vector3D& mom )
00102 { fMomentum = mom; }
00103
00104 G4ErrorTrajErr GetError() const
00105 { return fError; }
00106 virtual void SetError( G4ErrorTrajErr em )
00107 { fError = em; }
00108
00109 G4Track* GetG4Track() const
00110 { return theG4Track; }
00111 void SetG4Track( G4Track* trk )
00112 { theG4Track = trk; }
00113
00114 G4double GetCharge() const
00115 { return fCharge; }
00116 void SetCharge( G4double ch )
00117 { fCharge = ch; }
00118
00119 virtual G4eTSType GetTSType() const
00120 { return theTSType; }
00121
00122 protected:
00123
00124 G4String fParticleType;
00125 G4Point3D fPosition;
00126 G4Vector3D fMomentum;
00127 G4double fCharge;
00128 G4ErrorTrajErr fError;
00129
00130 G4eTSType theTSType;
00131
00132 G4Track* theG4Track;
00133
00134 G4int iverbose;
00135 };
00136
00137 #endif