Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
// This class represents the trajectory of a particle being tracked.
|
||||
// It includes information of:
|
||||
// 1) List of trajectory points which compose the trajectory;
|
||||
// 2) Static information of the particle which generated the
|
||||
// 2) Static information of the particle which generated the
|
||||
// trajectory;
|
||||
// 3) Track ID and parent particle ID of the trajectory.
|
||||
|
||||
@@ -43,92 +43,80 @@
|
||||
#ifndef G4Trajectory_hh
|
||||
#define G4Trajectory_hh 1
|
||||
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include <vector>
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
|
||||
#include "trkgdefs.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "G4TrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4Polyline;
|
||||
|
||||
class G4Trajectory : public G4VTrajectory
|
||||
{
|
||||
|
||||
using G4TrajectoryPointContainer = std::vector<G4VTrajectoryPoint*>;
|
||||
|
||||
public:
|
||||
public:
|
||||
// Constructors/Destructor
|
||||
|
||||
// Constructors/Destructor
|
||||
G4Trajectory() = default;
|
||||
G4Trajectory(const G4Track* aTrack);
|
||||
G4Trajectory(G4Trajectory&);
|
||||
~G4Trajectory() override;
|
||||
|
||||
G4Trajectory();
|
||||
G4Trajectory(const G4Track* aTrack);
|
||||
G4Trajectory(G4Trajectory &);
|
||||
virtual ~G4Trajectory();
|
||||
// Operators
|
||||
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline G4bool operator==(const G4Trajectory& r) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline G4int operator == (const G4Trajectory& r) const;
|
||||
// Get/Set functions
|
||||
|
||||
// Get/Set functions
|
||||
inline G4int GetTrackID() const override { return fTrackID; }
|
||||
inline G4int GetParentID() const override { return fParentID; }
|
||||
inline G4String GetParticleName() const override { return ParticleName; }
|
||||
inline G4double GetCharge() const override { return PDGCharge; }
|
||||
inline G4int GetPDGEncoding() const override { return PDGEncoding; }
|
||||
inline G4double GetInitialKineticEnergy() const { return initialKineticEnergy; }
|
||||
inline G4ThreeVector GetInitialMomentum() const override { return initialMomentum; }
|
||||
|
||||
inline G4int GetTrackID() const
|
||||
{ return fTrackID; }
|
||||
inline G4int GetParentID() const
|
||||
{ return fParentID; }
|
||||
inline G4String GetParticleName() const
|
||||
{ return ParticleName; }
|
||||
inline G4double GetCharge() const
|
||||
{ return PDGCharge; }
|
||||
inline G4int GetPDGEncoding() const
|
||||
{ return PDGEncoding; }
|
||||
inline G4double GetInitialKineticEnergy() const
|
||||
{ return initialKineticEnergy; }
|
||||
inline G4ThreeVector GetInitialMomentum() const
|
||||
{ return initialMomentum; }
|
||||
// Other member functions
|
||||
|
||||
// Other member functions
|
||||
void ShowTrajectory(std::ostream& os = G4cout) const override;
|
||||
void DrawTrajectory() const override;
|
||||
void AppendStep(const G4Step* aStep) override;
|
||||
G4int GetPointEntries() const override { return G4int(positionRecord->size()); }
|
||||
G4VTrajectoryPoint* GetPoint(G4int i) const override { return (*positionRecord)[i]; }
|
||||
void MergeTrajectory(G4VTrajectory* secondTrajectory) override;
|
||||
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual G4int GetPointEntries() const
|
||||
{ return G4int(positionRecord->size()); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*positionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
const std::map<G4String, G4AttDef>* GetAttDefs() const override;
|
||||
std::vector<G4AttValue>* CreateAttValues() const override;
|
||||
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
private:
|
||||
|
||||
G4TrajectoryPointContainer* positionRecord = nullptr;
|
||||
G4int fTrackID = 0;
|
||||
G4int fParentID = 0;
|
||||
G4int PDGEncoding = 0;
|
||||
G4double PDGCharge = 0.0;
|
||||
G4String ParticleName = "";
|
||||
G4double initialKineticEnergy = 0.0;
|
||||
G4ThreeVector initialMomentum;
|
||||
private:
|
||||
G4TrajectoryPointContainer* positionRecord = nullptr;
|
||||
G4int fTrackID = 0;
|
||||
G4int fParentID = 0;
|
||||
G4int PDGEncoding = 0;
|
||||
G4double PDGCharge = 0.0;
|
||||
G4String ParticleName = "";
|
||||
G4double initialKineticEnergy = 0.0;
|
||||
G4ThreeVector initialMomentum;
|
||||
};
|
||||
|
||||
extern G4TRACKING_DLL G4Allocator<G4Trajectory>*& aTrajectoryAllocator();
|
||||
|
||||
inline void* G4Trajectory::operator new(size_t)
|
||||
{
|
||||
if (aTrajectoryAllocator() == nullptr)
|
||||
{
|
||||
if (aTrajectoryAllocator() == nullptr) {
|
||||
aTrajectoryAllocator() = new G4Allocator<G4Trajectory>;
|
||||
}
|
||||
return (void*)aTrajectoryAllocator()->MallocSingle();
|
||||
@@ -139,9 +127,6 @@ inline void G4Trajectory::operator delete(void* aTrajectory)
|
||||
aTrajectoryAllocator()->FreeSingle((G4Trajectory*)aTrajectory);
|
||||
}
|
||||
|
||||
inline G4int G4Trajectory::operator == (const G4Trajectory& r) const
|
||||
{
|
||||
return (this==&r);
|
||||
}
|
||||
inline G4bool G4Trajectory::operator==(const G4Trajectory& r) const { return (this == &r); }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user