12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tracking and PhysicsG4ErrorSurfaceTrajState( const G4String& partType,const G4Point3D& pos,const G4Vector3D& mom,const G4Vector3D& vecV,const G4Vector3D& vecW,const G4ErrorTrajErr& errmat = G4ErrorTrajErr(5,0) );or by providing a planeG4ErrorSurfaceTrajState( const G4String& partType,const G4Point3D& pos,const G4Vector3D& mom,const G4Plane3D& plane,const G4ErrorTrajErr& errmat = G4ErrorTrajErr(5,0) );In this second case the vector V is calculated as the vector in the plane perpendicular to the global vector X (if theplane normal is equal to X, Z is used instead) and W is calculated as the vector in the plane perpendicular to V.5.8.3. Trajectory state errorThe 5X5 error matrix should also be provided at the creation of the trajectory state as a G4ErrorTrajErrobject. If it is not provided a default object will be created filled with null values.Currently the G4ErrorTrajErr is a G4ErrorSymMatrix, a simplified version of CLHEP HepSymMatrix.The error matrix is given in units of GeV and cm. There<strong>for</strong>e you should do the conversion if your code is usingother units.5.8.4. TargetsThe user has to define up to where the propagation must be done: the target. The target can be a surfaceG4ErrorSurfaceTarget, which is not part of the GEANT4 geometry. It can also be the surface of aGEANT4 volume G4ErrorGeomVolumeTarget, so that the particle will be stopped when it enters thisvolume. Or it can be that the particle is stopped when a certain track length is reached, by implementing aG4ErrorTrackLengthTarget.5.8.4.1. Surface targetWhen the user chooses a G4ErrorSurfaceTarget as target, the track is propagated until the surface isreached. This surface is not part of GEANT4 geometry, but usually traverses many GEANT4 volumes. The classG4ErrorNavigator takes care of the double navigation: <strong>for</strong> each step the step length is calculated as the minimumof the step length in the full geometry (up to a GEANT4 volume surface) and the distance to the user-definedsurface. To do it, G4ErrorNavigator inherits from G4Navigator and overwrites the methods ComputeStep()and ComputeSafety(). Two types of surface are currently supported (more types could beeasily implemented at user request): plane and cylindrical.5.8.4.1.1. Plane surface targetG4ErrorPlaneSurfaceTarget implements an infinite plane surface. The surface can be given as the fourcoefficients of the plane equation ax+by+cz+d = 0:G4ErrorPlaneSurfaceTarget(G4double a=0,G4double b=0,G4double c=0,G4double d=0);or as the normal to the plane and a point contained in it:G4ErrorPlaneSurfaceTarget(const G4Normal3D &n,const G4Point3D &p);191

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!