Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ErrorFreeTrajParam Class Reference

#include <G4ErrorFreeTrajParam.hh>

Public Member Functions

 G4ErrorFreeTrajParam ()
 
 G4ErrorFreeTrajParam (const G4Point3D &pos, const G4Vector3D &mom)
 
 G4ErrorFreeTrajParam (const G4ErrorFreeTrajParam &)=default
 
 G4ErrorFreeTrajParam (G4ErrorFreeTrajParam &&)=default
 
virtual ~G4ErrorFreeTrajParam ()
 
G4ErrorFreeTrajParamoperator= (const G4ErrorFreeTrajParam &)=default
 
G4ErrorFreeTrajParamoperator= (G4ErrorFreeTrajParam &&)=default
 
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)
 

Detailed Description

Definition at line 48 of file G4ErrorFreeTrajParam.hh.

Constructor & Destructor Documentation

◆ G4ErrorFreeTrajParam() [1/4]

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( )
inline

Definition at line 52 of file G4ErrorFreeTrajParam.hh.

53 : fInvP(0.), fLambda(0.), fPhi(0.), fYPerp(0.), fZPerp(0.){}

◆ G4ErrorFreeTrajParam() [2/4]

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( const G4Point3D pos,
const G4Vector3D mom 
)

Definition at line 39 of file G4ErrorFreeTrajParam.cc.

41{
42 SetParameters( pos, mom );
43}
void SetParameters(const G4Point3D &pos, const G4Vector3D &mom)

◆ G4ErrorFreeTrajParam() [3/4]

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( const G4ErrorFreeTrajParam )
default

◆ G4ErrorFreeTrajParam() [4/4]

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( G4ErrorFreeTrajParam &&  )
default

◆ ~G4ErrorFreeTrajParam()

virtual G4ErrorFreeTrajParam::~G4ErrorFreeTrajParam ( )
inlinevirtual

Definition at line 61 of file G4ErrorFreeTrajParam.hh.

61{}

Member Function Documentation

◆ GetDirection()

G4Vector3D G4ErrorFreeTrajParam::GetDirection ( ) const
inline

Definition at line 77 of file G4ErrorFreeTrajParam.hh.

77{ return fDir;}

Referenced by G4ErrorFreeTrajState::G4ErrorFreeTrajState().

◆ GetInvP()

G4double G4ErrorFreeTrajParam::GetInvP ( ) const
inline

Definition at line 79 of file G4ErrorFreeTrajParam.hh.

79{ return fInvP; }

◆ GetLambda()

G4double G4ErrorFreeTrajParam::GetLambda ( ) const
inline

Definition at line 80 of file G4ErrorFreeTrajParam.hh.

80{ return fLambda; }

Referenced by G4ErrorSurfaceTrajState::BuildErrorMatrix(), and G4ErrorFreeTrajState::G4ErrorFreeTrajState().

◆ GetPhi()

G4double G4ErrorFreeTrajParam::GetPhi ( ) const
inline

◆ GetYPerp()

G4double G4ErrorFreeTrajParam::GetYPerp ( ) const
inline

Definition at line 82 of file G4ErrorFreeTrajParam.hh.

82{ return fYPerp; }

◆ GetZPerp()

G4double G4ErrorFreeTrajParam::GetZPerp ( ) const
inline

Definition at line 83 of file G4ErrorFreeTrajParam.hh.

83{ return fZPerp; }

◆ operator=() [1/2]

G4ErrorFreeTrajParam & G4ErrorFreeTrajParam::operator= ( const G4ErrorFreeTrajParam )
default

◆ operator=() [2/2]

G4ErrorFreeTrajParam & G4ErrorFreeTrajParam::operator= ( G4ErrorFreeTrajParam &&  )
default

◆ SetParameters()

void G4ErrorFreeTrajParam::SetParameters ( const G4Point3D pos,
const G4Vector3D mom 
)

Definition at line 47 of file G4ErrorFreeTrajParam.cc.

49{
50 fInvP = 1./mom.mag();
51 fDir = mom*fInvP;
52 fLambda = 90.*deg - mom.theta();
53 fPhi = mom.phi();
54 G4Vector3D vxPerp(0.,0.,0.);
55 if( mom.mag() > 0.) {
56 vxPerp = mom/mom.mag();
57 }
58 G4Vector3D vyPerp = G4Vector3D( -vxPerp.y(), vxPerp.x(), 0.);
59 vyPerp /= vyPerp.mag();
60 G4Vector3D vzPerp = vxPerp.cross( vyPerp );
61 vzPerp /= vzPerp.mag();
62 // check if right handed
63 // fXPerp = pos.proj( mom );
64 G4ThreeVector posv(pos);
65 if( vyPerp.mag() != 0. ) {
66 // now all 2 scalar memeber variables retain the signs
67 // fYPerp = posv.project( vyPerp ).mag();
68 // fZPerp = posv.project( vzPerp ).mag();
69 fYPerp = posv.dot( vyPerp );
70 fZPerp = posv.dot( vzPerp );
71 } else {
72 fYPerp = 0.;
73 fZPerp = 0.;
74 }
75}
HepGeom::Vector3D< G4double > G4Vector3D
Definition: G4Vector3D.hh:34
BasicVector3D< T > cross(const BasicVector3D< T > &v) const

Referenced by G4ErrorFreeTrajParam(), G4ErrorFreeTrajState::SetParameters(), and Update().

◆ Update()

void G4ErrorFreeTrajParam::Update ( const G4Track aTrack)

Definition at line 78 of file G4ErrorFreeTrajParam.cc.

79{
80 SetParameters( aTrack->GetPosition(), aTrack->GetMomentum() );
81
82}
const G4ThreeVector & GetPosition() const
G4ThreeVector GetMomentum() const

Referenced by G4ErrorFreeTrajState::Update().

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 86 of file G4ErrorFreeTrajParam.cc.

87{
88 G4int oldprc = out.precision(8);
89 out << " InvP= " << tp.fInvP << " Theta= "
90 << tp.fLambda << " Phi= " << tp.fPhi << " YPerp= " << tp.fYPerp
91 << " ZPerp= " << tp.fZPerp << G4endl;
92 out << " momentum direction= " << tp.fDir << G4endl;
93 out.precision(oldprc);
94
95 return out;
96}
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57

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