Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ErrorFreeTrajParam Class Reference

#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)
 

Detailed Description

Definition at line 49 of file G4ErrorFreeTrajParam.hh.

Constructor & Destructor Documentation

G4ErrorFreeTrajParam::G4ErrorFreeTrajParam ( )
inline

Definition at line 53 of file G4ErrorFreeTrajParam.hh.

54  : fInvP(0.), fLambda(0.), fPhi(0.), fYPerp(0.), fZPerp(0.){}
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:

virtual G4ErrorFreeTrajParam::~G4ErrorFreeTrajParam ( )
inlinevirtual

Definition at line 58 of file G4ErrorFreeTrajParam.hh.

58 {}

Member Function Documentation

G4Vector3D G4ErrorFreeTrajParam::GetDirection ( ) const
inline

Definition at line 70 of file G4ErrorFreeTrajParam.hh.

70 { return fDir;}

Here is the caller graph for this function:

G4double G4ErrorFreeTrajParam::GetInvP ( ) const
inline

Definition at line 72 of file G4ErrorFreeTrajParam.hh.

72 { return fInvP; }
G4double G4ErrorFreeTrajParam::GetLambda ( ) const
inline

Definition at line 73 of file G4ErrorFreeTrajParam.hh.

73 { return fLambda; }

Here is the caller graph for this function:

G4double G4ErrorFreeTrajParam::GetPhi ( ) const
inline

Definition at line 74 of file G4ErrorFreeTrajParam.hh.

74 { return fPhi; }

Here is the caller graph for this function:

G4double G4ErrorFreeTrajParam::GetYPerp ( ) const
inline

Definition at line 75 of file G4ErrorFreeTrajParam.hh.

75 { return fYPerp; }
G4double G4ErrorFreeTrajParam::GetZPerp ( ) const
inline

Definition at line 76 of file G4ErrorFreeTrajParam.hh.

76 { return fZPerp; }
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
static constexpr double deg
Definition: G4SIunits.hh:152
BasicVector3D< T > cross(const BasicVector3D< T > &v) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ErrorFreeTrajParam::Update ( const G4Track aTrack)

Definition at line 79 of file G4ErrorFreeTrajParam.cc.

80 {
81  SetParameters( aTrack->GetPosition(), aTrack->GetMomentum() );
82 
83 }
const G4ThreeVector & GetPosition() const
void SetParameters(const G4Point3D &pos, const G4Vector3D &mom)
G4ThreeVector GetMomentum() const

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

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

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