00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id: G4ErrorFreeTrajParam.hh 69766 2013-05-14 14:33:55Z gcosmo $ 00028 // 00029 // Class Description: 00030 // 00031 // Holds the 5 independent variables of the trajectory for a 00032 // G4ErrorFreeTrajState object. It is not used for anything but for 00033 // printing, but anyhow it is updated everytime the position and 00034 // momentum are updated. 00035 00036 // History: 00037 // - Created: Pedro Arce, September 2004 00038 // -------------------------------------------------------------------- 00039 00040 #ifndef G4ErrorFreeTrajParam_hh 00041 #define G4ErrorFreeTrajParam_hh 00042 00043 #include "G4Point3D.hh" 00044 #include "G4Vector3D.hh" 00045 00046 #include "globals.hh" 00047 #include "G4Track.hh" 00048 00049 class G4ErrorFreeTrajParam 00050 { 00051 public: // with description 00052 00053 G4ErrorFreeTrajParam() 00054 : fInvP(0.), fLambda(0.), fPhi(0.), fYPerp(0.), fZPerp(0.){} 00055 G4ErrorFreeTrajParam( const G4Point3D& pos, const G4Vector3D& mom ); 00056 // build parameters from position and momentum 00057 00058 virtual ~G4ErrorFreeTrajParam(){} 00059 00060 void Update( const G4Track* aTrack ); 00061 // update parameters from G4Track 00062 00063 friend 00064 std::ostream& operator<<(std::ostream&, const G4ErrorFreeTrajParam& ts); 00065 00066 // Set and Get methods 00067 00068 void SetParameters( const G4Point3D& pos, const G4Vector3D& mom ); 00069 00070 G4Vector3D GetDirection() const { return fDir;} 00071 00072 G4double GetInvP() const { return fInvP; } 00073 G4double GetLambda() const { return fLambda; } 00074 G4double GetPhi() const { return fPhi; } 00075 G4double GetYPerp() const { return fYPerp; } 00076 G4double GetZPerp() const { return fZPerp; } 00077 00078 private: 00079 00080 G4Vector3D fDir; //direction to which YPerp, ZPerp refer 00081 G4double fInvP; // inverse of momentum 00082 G4double fLambda; // 90 - theta angle of direction 00083 G4double fPhi; // phi angle of direction 00084 G4double fYPerp; // Y coordinate 00085 G4double fZPerp; // Z coordinate 00086 }; 00087 00088 #endif