Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4FieldTrack.cc File Reference
#include "G4FieldTrack.hh"
Include dependency graph for G4FieldTrack.cc:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4FieldTrack &SixVec)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4FieldTrack SixVec 
)

Definition at line 33 of file G4FieldTrack.cc.

34 {
35  const G4double *SixV = SixVec.SixVector;
36  const int precPos= 9; // For position
37  const int precEp= 9; // For Energy / momentum
38  const int precLen= 12; // For Length along track
39  const int precSpin= 9; // For polarisation
40  const int precTime= 6; // For time of flight
41  const int oldpr= os.precision(precPos);
42  os << " ( ";
43  os << " X= " << SixV[0] << " " << SixV[1] << " "
44  << SixV[2] << " "; // Position
45  os.precision(precEp);
46  os << " P= " << SixV[3] << " " << SixV[4] << " "
47  << SixV[5] << " "; // Momentum
48  os << " Pmag= "
49  << G4ThreeVector(SixV[3], SixV[4], SixV[5]).mag(); // mom magnitude
50  os << " Ekin= " << SixVec.fKineticEnergy ;
51  os.precision(precLen);
52  os << " l= " << SixVec.GetCurveLength();
53  os.precision(6);
54  os << " m0= " << SixVec.fRestMass_c2;
55  os << " (Pdir-1)= " << SixVec.fMomentumDir.mag()-1.0;
56  if( SixVec.fLabTimeOfFlight > 0.0 ) os.precision(precTime);
57  else os.precision(3);
58  os << " t_lab= " << SixVec.fLabTimeOfFlight;
59  os << " t_proper= " << SixVec.fProperTimeOfFlight ;
60  G4ThreeVector pol= SixVec.GetPolarization();
61  if( pol.mag2() > 0.0 ){
62  os.precision(precSpin);
63  os << " PolV= " << pol; // SixVec.GetPolarization();
64  }else{
65  os << " PolV= (0,0,0) ";
66  }
67  os << " ) ";
68  os.precision(oldpr);
69  return os;
70 }
G4double GetCurveLength() const
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetPolarization() const
double mag2() const
double G4double
Definition: G4Types.hh:76
double mag() const

Here is the call graph for this function: