Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MaGeTrajectoryPoint.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * DISCLAIMER                                                       *
00004 // *                                                                  *
00005 // * The following disclaimer summarizes all the specific disclaimers *
00006 // * of contributors to this software. The specific disclaimers,which *
00007 // * govern, are listed with their locations in:                      *
00008 // *   http://cern.ch/geant4/license                                  *
00009 // *                                                                  *
00010 // * Neither the authors of this software system, nor their employing *
00011 // * institutes,nor the agencies providing financial support for this *
00012 // * work  make  any representation or  warranty, express or implied, *
00013 // * regarding  this  software system or assume any liability for its *
00014 // * use.                                                             *
00015 // *                                                                  *
00016 // * This  code  implementation is the  intellectual property  of the *
00017 // * GEANT4 collaboration.                                            *
00018 // * By copying,  distributing  or modifying the Program (or any work *
00019 // * based  on  the Program)  you indicate  your  acceptance of  this *
00020 // * statement, and all its terms.                                    *
00021 // ********************************************************************
00022 //
00023 //
00024 // $Id: MaGeTrajectoryPoint.hh,v 1.1.1.1 2004/11/08 17:53:42 gast Exp $
00025 // GEANT4 tag $Name:  $
00026 //
00027 //
00028 //---------------------------------------------------------------
00029 //
00030 // MaGeTrajectoryPoint.hh
00031 //
00032 // class description:
00033 //   This class represents the trajectory of a particle tracked.
00034 //   It includes information of 
00035 //     1) List of trajectory points which compose the trajectory,
00036 //     2) static information of particle which generated the 
00037 //        trajectory, 
00038 //     3) trackID and parent particle ID of the trajectory,
00039 //     4) termination condition of the trajectory.
00040 //
00041 // Contact:
00042 //   Questions and comments to this code should be sent to
00043 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
00044 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
00045 //
00046 // ---------------------------------------------------------------
00047 
00048 #ifndef MaGeTrajectoryPoint_h
00049 #define MaGeTrajectoryPoint_h 1
00050 
00051 #include "G4VTrajectoryPoint.hh"
00052 #include "globals.hh"                // Include from 'global'
00053 #include "G4ThreeVector.hh"          // Include from 'geometry'
00054 #include "G4Allocator.hh"            // Include from 'particle+matter'
00055 
00056 
00058 class MaGeTrajectoryPoint : public G4VTrajectoryPoint
00060 {
00061 
00062 //--------
00063 public: // without description
00064 //--------
00065 
00066 // Constructor/Destructor
00067    MaGeTrajectoryPoint();
00068    MaGeTrajectoryPoint(G4ThreeVector pos, G4String volname);
00069    MaGeTrajectoryPoint(G4ThreeVector pos);
00070    MaGeTrajectoryPoint(const MaGeTrajectoryPoint &right);
00071    virtual ~MaGeTrajectoryPoint();
00072 
00073 // Operators
00074    inline void *operator new(size_t);
00075    inline void operator delete(void *aTrajectoryPoint);
00076    inline int operator==(const MaGeTrajectoryPoint& right) const
00077    { return (this==&right); };
00078 
00079 // Get/Set functions
00080    inline const G4ThreeVector GetPosition() const { return fPosition; };
00081    inline void SetPosition(G4ThreeVector pos) { fPosition=pos; };
00082 
00083    inline const G4double GetEnergyLost() const { return fELost; };
00084    inline void SetEnergyLost(G4double e){fELost=e; };
00085 
00086    inline const G4double GetStepLength() const { return fStepLength; };
00087    inline void SetStepLength(G4double l){fStepLength=l; };
00088 
00089    inline const G4double GetTrackLength() const { return fTrackLength; };
00090    inline void SetTrackLength(G4double l){fTrackLength=l; };
00091 
00092    inline const G4String GetVolumeName() const { return fVolumeName; };
00093    inline void SetVolumeName(G4String s) {fVolumeName=s;};
00094 
00095    inline const G4String GetProcessName() const { return fProcessName; };
00096    inline void SetProcessName(G4String s) {fProcessName=s;};
00097 
00098 // Get method for HEPRep style attributes
00099    const std::map<G4String,G4AttDef>* GetAttDefs() const;
00100    std::vector<G4AttValue>* CreateAttValues() const;
00101 
00102 //---------
00103    private:
00104 //---------
00105 
00106 // Member data
00107    G4ThreeVector fPosition;
00108    G4double      fELost;
00109    G4double      fStepLength;
00110    G4double      fTrackLength;
00111    G4String      fVolumeName;
00112    G4String      fProcessName;
00113 };
00114 
00115 
00116 extern G4Allocator<MaGeTrajectoryPoint> MaGeTrajectoryPointAllocator;
00117 
00118 inline void* MaGeTrajectoryPoint::operator new(size_t)
00119 {
00120    void *aTrajectoryPoint;
00121    aTrajectoryPoint = (void *) MaGeTrajectoryPointAllocator.MallocSingle();
00122    return aTrajectoryPoint;
00123 }
00124 
00125 inline void MaGeTrajectoryPoint::operator delete(void *aTrajectoryPoint)
00126 {
00127    MaGeTrajectoryPointAllocator.FreeSingle((MaGeTrajectoryPoint *) aTrajectoryPoint);
00128 }
00129 
00130 #endif
00131 

Generated on Mon Nov 29 16:58:52 2004 for Majorana Simulation by  doxygen 1.3.9.1