#include <G4ErrorFreeTrajParam.hh>
Public Member Functions | |
G4ErrorFreeTrajParam () | |
G4ErrorFreeTrajParam (const G4Point3D &pos, const G4Vector3D &mom) | |
virtual | ~G4ErrorFreeTrajParam () |
void | Update (const G4Track *aTrack) |
void | SetParameters (const G4Point3D &pos, const G4Vector3D &mom) |
G4Vector3D | GetDirection () const |
G4double | GetInvP () const |
G4double | GetLambda () const |
G4double | GetPhi () const |
G4double | GetYPerp () const |
G4double | GetZPerp () const |
Friends | |
std::ostream & | operator<< (std::ostream &, const G4ErrorFreeTrajParam &ts) |
Definition at line 49 of file G4ErrorFreeTrajParam.hh.
G4ErrorFreeTrajParam::G4ErrorFreeTrajParam | ( | ) | [inline] |
G4ErrorFreeTrajParam::G4ErrorFreeTrajParam | ( | const G4Point3D & | pos, | |
const G4Vector3D & | mom | |||
) |
Definition at line 40 of file G4ErrorFreeTrajParam.cc.
References SetParameters().
00042 { 00043 SetParameters( pos, mom ); 00044 }
virtual G4ErrorFreeTrajParam::~G4ErrorFreeTrajParam | ( | ) | [inline, virtual] |
G4Vector3D G4ErrorFreeTrajParam::GetDirection | ( | ) | const [inline] |
Definition at line 70 of file G4ErrorFreeTrajParam.hh.
Referenced by G4ErrorFreeTrajState::G4ErrorFreeTrajState().
G4double G4ErrorFreeTrajParam::GetInvP | ( | ) | const [inline] |
G4double G4ErrorFreeTrajParam::GetLambda | ( | ) | const [inline] |
Definition at line 73 of file G4ErrorFreeTrajParam.hh.
Referenced by G4ErrorSurfaceTrajState::BuildErrorMatrix(), and G4ErrorFreeTrajState::G4ErrorFreeTrajState().
G4double G4ErrorFreeTrajParam::GetPhi | ( | ) | const [inline] |
Definition at line 74 of file G4ErrorFreeTrajParam.hh.
Referenced by G4ErrorSurfaceTrajState::BuildErrorMatrix(), and G4ErrorFreeTrajState::G4ErrorFreeTrajState().
G4double G4ErrorFreeTrajParam::GetYPerp | ( | ) | const [inline] |
G4double G4ErrorFreeTrajParam::GetZPerp | ( | ) | const [inline] |
void G4ErrorFreeTrajParam::SetParameters | ( | const G4Point3D & | pos, | |
const G4Vector3D & | mom | |||
) |
Definition at line 48 of file G4ErrorFreeTrajParam.cc.
Referenced by G4ErrorFreeTrajParam(), G4ErrorFreeTrajState::SetParameters(), and Update().
00050 { 00051 fInvP = 1./mom.mag(); 00052 fDir = mom*fInvP; 00053 fLambda = 90.*deg - mom.theta(); 00054 fPhi = mom.phi(); 00055 G4Vector3D vxPerp(0.,0.,0.); 00056 if( mom.mag() > 0.) { 00057 vxPerp = mom/mom.mag(); 00058 } 00059 G4Vector3D vyPerp = G4Vector3D( -vxPerp.y(), vxPerp.x(), 0.); 00060 vyPerp /= vyPerp.mag(); 00061 G4Vector3D vzPerp = vxPerp.cross( vyPerp ); 00062 vzPerp /= vzPerp.mag(); 00063 // check if right handed 00064 // fXPerp = pos.proj( mom ); 00065 G4ThreeVector posv(pos); 00066 if( vyPerp.mag() != 0. ) { 00067 // now all 2 scalar memeber variables retain the signs 00068 // fYPerp = posv.project( vyPerp ).mag(); 00069 // fZPerp = posv.project( vzPerp ).mag(); 00070 fYPerp = posv.dot( vyPerp ); 00071 fZPerp = posv.dot( vzPerp ); 00072 } else { 00073 fYPerp = 0.; 00074 fZPerp = 0.; 00075 } 00076 }
void G4ErrorFreeTrajParam::Update | ( | const G4Track * | aTrack | ) |
Definition at line 79 of file G4ErrorFreeTrajParam.cc.
References G4Track::GetMomentum(), G4Track::GetPosition(), and SetParameters().
Referenced by G4ErrorFreeTrajState::Update().
00080 { 00081 SetParameters( aTrack->GetPosition(), aTrack->GetMomentum() ); 00082 00083 }
std::ostream& operator<< | ( | std::ostream & | out, | |
const G4ErrorFreeTrajParam & | ts | |||
) | [friend] |
Definition at line 87 of file G4ErrorFreeTrajParam.cc.
00088 { 00089 G4int oldprc = out.precision(8); 00090 out << " InvP= " << tp.fInvP << " Theta= " 00091 << tp.fLambda << " Phi= " << tp.fPhi << " YPerp= " << tp.fYPerp 00092 << " ZPerp= " << tp.fZPerp << G4endl; 00093 out << " momentum direction= " << tp.fDir << G4endl; 00094 out.precision(oldprc); 00095 00096 return out; 00097 }