Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4ErrorSurfaceTrajParam.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 //
0029 // Class Description:
0030 //
0031 // Holds the 5 independent variables of the trajectory for a
0032 // G4ErrorSurfaceTrajState object. It is not used for anything but for
0033 // printing, but anyhow it is updated everytime the position and momentum
0034 // are updated
0035 
0036 // History:
0037 // - Created:  P. Arce
0038 // --------------------------------------------------------------------
0039 
0040 #ifndef G4ErrorSurfaceTrajParam_hh
0041 #define G4ErrorSurfaceTrajParam_hh
0042 
0043 #include "G4Point3D.hh"
0044 #include "G4Vector3D.hh"
0045 #include "G4Plane3D.hh"
0046 #include "G4ThreeVector.hh"
0047 
0048 #include "globals.hh"
0049 #include "G4Track.hh"
0050 
0051 class G4ErrorSurfaceTrajParam
0052 {
0053  public:  // with description
0054   G4ErrorSurfaceTrajParam()
0055     : fInvP(0.)
0056     , fPV(0.)
0057     , fPW(0.)
0058     , fV(0.)
0059     , fW(0.)
0060   {}
0061   G4ErrorSurfaceTrajParam(const G4Point3D& pos, const G4Vector3D& mom,
0062                           const G4Vector3D& vecV, const G4Vector3D& vecW);
0063   G4ErrorSurfaceTrajParam(const G4Point3D& pos, const G4Vector3D& mom,
0064                           const G4Plane3D& plane);
0065 
0066   G4ErrorSurfaceTrajParam(const G4ErrorSurfaceTrajParam&) = default;
0067   G4ErrorSurfaceTrajParam(G4ErrorSurfaceTrajParam&&)      = default;
0068   // The copy and move constructors
0069 
0070   virtual ~G4ErrorSurfaceTrajParam() {}
0071 
0072   G4ErrorSurfaceTrajParam& operator=(const G4ErrorSurfaceTrajParam&) = default;
0073   G4ErrorSurfaceTrajParam& operator=(G4ErrorSurfaceTrajParam&&) = default;
0074   // The copy and move assignment operators
0075 
0076   friend std::ostream& operator<<(std::ostream&,
0077                                   const G4ErrorSurfaceTrajParam& ts);
0078 
0079   // Get and Set methods
0080 
0081   void SetParameters(const G4Point3D& pos, const G4Vector3D& mom,
0082                      const G4Vector3D& vecV, const G4Vector3D& vecW);
0083   void SetParameters(const G4Point3D& pos, const G4Vector3D& mom,
0084                      const G4Plane3D& plane);
0085 
0086   G4Vector3D GetDirection() const { return fDir; }
0087   G4Vector3D GetPlaneNormal() const { return fVectorV.cross(fVectorW); }
0088   G4Vector3D GetVectorV() const { return fVectorV; }
0089   G4Vector3D GetVectorW() const { return fVectorW; }
0090   G4double GetPV() const { return fPV; }
0091   G4double GetPW() const { return fPW; }
0092   G4double GetV() const { return fV; }
0093   G4double GetW() const { return fW; }
0094   G4double GetInvP() const { return fInvP; }
0095 
0096  private:
0097   G4ThreeVector fDir;
0098   G4Vector3D fVectorV;  // one of the vectors defining the plane
0099   G4Vector3D fVectorW;  // one of the vectors defining the plane
0100   G4double fInvP;       // inverse of momentum
0101   G4double fPV;         // projection of momentum in one direction
0102   G4double fPW;         // projection of momentum in one direction
0103   G4double fV;          // projection of position in one direction
0104   G4double fW;          // projection of position in one direction
0105 };
0106 
0107 #endif