G4TrajectoryPoint.hh

Go to the documentation of this file.
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: G4TrajectoryPoint.hh 67009 2013-01-29 16:00:21Z gcosmo $
00028 //
00029 //---------------------------------------------------------------
00030 //
00031 // G4TrajectoryPoint.hh
00032 //
00033 // class description:
00034 //   This class represents the trajectory of a particle tracked.
00035 //   It includes information of 
00036 //     1) List of trajectory points which compose the trajectory,
00037 //     2) static information of particle which generated the 
00038 //        trajectory, 
00039 //     3) trackID and parent particle ID of the trajectory,
00040 //     4) termination condition of the trajectory.
00041 //
00042 // Contact:
00043 //   Questions and comments to this code should be sent to
00044 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
00045 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
00046 //
00047 // ---------------------------------------------------------------
00048 
00049 #ifndef G4TrajectoryPoint_h
00050 #define G4TrajectoryPoint_h 1
00051 
00052 #include "G4VTrajectoryPoint.hh"
00053 #include "globals.hh"                // Include from 'global'
00054 #include "G4ThreeVector.hh"          // Include from 'geometry'
00055 #include "G4Allocator.hh"            // Include from 'particle+matter'
00056 
00057 
00059 class G4TrajectoryPoint : public G4VTrajectoryPoint
00061 {
00062 
00063 //--------
00064 public: // without description
00065 //--------
00066 
00067 // Constructor/Destructor
00068    G4TrajectoryPoint();
00069    G4TrajectoryPoint(G4ThreeVector pos);
00070    G4TrajectoryPoint(const G4TrajectoryPoint &right);
00071    virtual ~G4TrajectoryPoint();
00072 
00073 // Operators
00074    inline void *operator new(size_t);
00075    inline void operator delete(void *aTrajectoryPoint);
00076    inline int operator==(const G4TrajectoryPoint& right) const
00077    { return (this==&right); };
00078 
00079 // Get/Set functions
00080    inline const G4ThreeVector GetPosition() const
00081    { return fPosition; };
00082 
00083 // Get method for HEPRep style attributes
00084    virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
00085    virtual std::vector<G4AttValue>* CreateAttValues() const;
00086 
00087 //---------
00088    private:
00089 //---------
00090 
00091 // Member data
00092    G4ThreeVector fPosition;
00093 
00094 };
00095 
00096 #if defined G4TRACKING_ALLOC_EXPORT
00097   extern G4DLLEXPORT G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
00098 #else
00099   extern G4DLLIMPORT G4Allocator<G4TrajectoryPoint> aTrajectoryPointAllocator;
00100 #endif
00101 
00102 inline void* G4TrajectoryPoint::operator new(size_t)
00103 {
00104    void *aTrajectoryPoint;
00105    aTrajectoryPoint = (void *) aTrajectoryPointAllocator.MallocSingle();
00106    return aTrajectoryPoint;
00107 }
00108 
00109 inline void G4TrajectoryPoint::operator delete(void *aTrajectoryPoint)
00110 {
00111    aTrajectoryPointAllocator.FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
00112 }
00113 
00114 #endif
00115 

Generated on Mon May 27 17:50:02 2013 for Geant4 by  doxygen 1.4.7