Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -23,30 +23,19 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4TrajectoryPoint
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
//
|
||||
// G4TrajectoryPoint.hh
|
||||
//
|
||||
// class description:
|
||||
// This class represents the trajectory of a particle tracked.
|
||||
// It includes information of
|
||||
// 1) List of trajectory points which compose the trajectory,
|
||||
// 2) static information of particle which generated the
|
||||
// trajectory,
|
||||
// 3) trackID and parent particle ID of the trajectory,
|
||||
// 4) termination condition of the trajectory.
|
||||
//
|
||||
// This class represents the trajectory point of a particle being tracked.
|
||||
|
||||
// Contact:
|
||||
// Questions and comments to this code should be sent to
|
||||
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
||||
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
||||
//
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
#ifndef G4TrajectoryPoint_h
|
||||
#define G4TrajectoryPoint_h 1
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4TrajectoryPoint_hh
|
||||
#define G4TrajectoryPoint_hh 1
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
@@ -54,43 +43,37 @@
|
||||
#include "G4ThreeVector.hh" // Include from 'geometry'
|
||||
#include "G4Allocator.hh" // Include from 'particle+matter'
|
||||
|
||||
|
||||
////////////////////////
|
||||
class G4TrajectoryPoint : public G4VTrajectoryPoint
|
||||
////////////////////////
|
||||
{
|
||||
public:
|
||||
|
||||
//--------
|
||||
public: // without description
|
||||
//--------
|
||||
// Constructors/Destructor
|
||||
|
||||
// Constructor/Destructor
|
||||
G4TrajectoryPoint();
|
||||
G4TrajectoryPoint(G4ThreeVector pos);
|
||||
G4TrajectoryPoint(const G4TrajectoryPoint &right);
|
||||
virtual ~G4TrajectoryPoint();
|
||||
G4TrajectoryPoint();
|
||||
G4TrajectoryPoint(G4ThreeVector pos);
|
||||
G4TrajectoryPoint(const G4TrajectoryPoint& right);
|
||||
virtual ~G4TrajectoryPoint();
|
||||
|
||||
// Operators
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrajectoryPoint);
|
||||
inline G4bool operator==(const G4TrajectoryPoint& right) const
|
||||
{ return (this==&right); };
|
||||
// Operators
|
||||
|
||||
// Get/Set functions
|
||||
inline const G4ThreeVector GetPosition() const
|
||||
{ return fPosition; };
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrajectoryPoint);
|
||||
inline G4bool operator==(const G4TrajectoryPoint& right) const;
|
||||
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
// Get/Set functions
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
inline const G4ThreeVector GetPosition() const
|
||||
{ return fPosition; }
|
||||
|
||||
// Get method for HEPRep style attributes
|
||||
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Member data
|
||||
G4ThreeVector fPosition;
|
||||
|
||||
};
|
||||
|
||||
extern G4TRACKING_DLL
|
||||
@@ -98,14 +81,23 @@ G4Allocator<G4TrajectoryPoint>*& aTrajectoryPointAllocator();
|
||||
|
||||
inline void* G4TrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
if (!aTrajectoryPointAllocator())
|
||||
{ aTrajectoryPointAllocator() = new G4Allocator<G4TrajectoryPoint>; }
|
||||
if (aTrajectoryPointAllocator() == nullptr)
|
||||
{
|
||||
aTrajectoryPointAllocator() = new G4Allocator<G4TrajectoryPoint>;
|
||||
}
|
||||
return (void *) aTrajectoryPointAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline void G4TrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
{
|
||||
aTrajectoryPointAllocator()->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
|
||||
aTrajectoryPointAllocator()
|
||||
->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
|
||||
}
|
||||
|
||||
inline G4bool
|
||||
G4TrajectoryPoint::operator==(const G4TrajectoryPoint& right) const
|
||||
{
|
||||
return (this==&right);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user