Geant4  10.02.p03
G4ErrorFreeTrajParam Class Reference

#include <G4ErrorFreeTrajParam.hh>

Collaboration diagram for G4ErrorFreeTrajParam:

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
 

Private Attributes

G4Vector3D fDir
 
G4double fInvP
 
G4double fLambda
 
G4double fPhi
 
G4double fYPerp
 
G4double fZPerp
 

Friends

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

Detailed Description

Definition at line 49 of file G4ErrorFreeTrajParam.hh.

Constructor & Destructor Documentation

◆ G4ErrorFreeTrajParam() [1/2]

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( )
inline

◆ G4ErrorFreeTrajParam() [2/2]

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

Definition at line 40 of file G4ErrorFreeTrajParam.cc.

42 {
43  SetParameters( pos, mom );
44 }
void SetParameters(const G4Point3D &pos, const G4Vector3D &mom)
Here is the call graph for this function:

◆ ~G4ErrorFreeTrajParam()

virtual G4ErrorFreeTrajParam::~G4ErrorFreeTrajParam ( )
inlinevirtual

Definition at line 58 of file G4ErrorFreeTrajParam.hh.

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

Member Function Documentation

◆ GetDirection()

G4Vector3D G4ErrorFreeTrajParam::GetDirection ( ) const
inline

Definition at line 70 of file G4ErrorFreeTrajParam.hh.

70 { return fDir;}
Here is the caller graph for this function:

◆ GetInvP()

G4double G4ErrorFreeTrajParam::GetInvP ( ) const
inline

Definition at line 72 of file G4ErrorFreeTrajParam.hh.

72 { return fInvP; }

◆ GetLambda()

G4double G4ErrorFreeTrajParam::GetLambda ( ) const
inline

Definition at line 73 of file G4ErrorFreeTrajParam.hh.

73 { return fLambda; }
Here is the caller graph for this function:

◆ GetPhi()

G4double G4ErrorFreeTrajParam::GetPhi ( ) const
inline

Definition at line 74 of file G4ErrorFreeTrajParam.hh.

74 { return fPhi; }
Here is the caller graph for this function:

◆ GetYPerp()

G4double G4ErrorFreeTrajParam::GetYPerp ( ) const
inline

Definition at line 75 of file G4ErrorFreeTrajParam.hh.

75 { return fYPerp; }

◆ GetZPerp()

G4double G4ErrorFreeTrajParam::GetZPerp ( ) const
inline

Definition at line 76 of file G4ErrorFreeTrajParam.hh.

76 { return fZPerp; }

◆ SetParameters()

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

Definition at line 48 of file G4ErrorFreeTrajParam.cc.

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

◆ Update()

void G4ErrorFreeTrajParam::Update ( const G4Track *  aTrack)

Definition at line 79 of file G4ErrorFreeTrajParam.cc.

80 {
81  SetParameters( aTrack->GetPosition(), aTrack->GetMomentum() );
82 
83 }
void SetParameters(const G4Point3D &pos, const G4Vector3D &mom)
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 87 of file G4ErrorFreeTrajParam.cc.

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

Member Data Documentation

◆ fDir

G4Vector3D G4ErrorFreeTrajParam::fDir
private

Definition at line 80 of file G4ErrorFreeTrajParam.hh.

◆ fInvP

G4double G4ErrorFreeTrajParam::fInvP
private

Definition at line 81 of file G4ErrorFreeTrajParam.hh.

◆ fLambda

G4double G4ErrorFreeTrajParam::fLambda
private

Definition at line 82 of file G4ErrorFreeTrajParam.hh.

◆ fPhi

G4double G4ErrorFreeTrajParam::fPhi
private

Definition at line 83 of file G4ErrorFreeTrajParam.hh.

◆ fYPerp

G4double G4ErrorFreeTrajParam::fYPerp
private

Definition at line 84 of file G4ErrorFreeTrajParam.hh.

◆ fZPerp

G4double G4ErrorFreeTrajParam::fZPerp
private

Definition at line 85 of file G4ErrorFreeTrajParam.hh.


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