Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+79 -67
View File
@@ -25,17 +25,22 @@
//
// G4SmoothTrajectory
//
// class description:
// 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) Auxiliary points will be associated to G4SmoothTrajectoryPoint
// to assist drawing smoothly curved trajectory.
// 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 generates the
// trajectory,
// 3) trackID and parent particle ID of the trajectory,
// 4) Auxiliary points will be associated to G4SmoothTrajectoryPoint
// to assist drawing smoothly curved trajectory.
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Makoto Asai (e-mail: asai@slac.stanford.edu)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
// --------------------------------------------------------------------
#ifndef G4SmoothTrajectory_hh
#define G4SmoothTrajectory_hh 1
@@ -57,78 +62,80 @@ class G4Polyline;
class G4SmoothTrajectory : public G4VTrajectory
{
using G4TrajectoryPointContainer = std::vector<G4VTrajectoryPoint*>;
using TrajectoryPointContainer = std::vector<G4VTrajectoryPoint*>;
public:
//--------
public: // with description
//--------
// Constructors/Destructor
//
G4SmoothTrajectory();
G4SmoothTrajectory(const G4Track* aTrack);
G4SmoothTrajectory(G4SmoothTrajectory &);
virtual ~G4SmoothTrajectory();
// Constructor/Destructor
// Operators
//
G4SmoothTrajectory& operator= (const G4SmoothTrajectory&) = delete;
inline G4int operator == (const G4SmoothTrajectory& r) const;
inline void* operator new(size_t);
inline void operator delete(void*);
G4SmoothTrajectory();
G4SmoothTrajectory(const G4Track* aTrack);
G4SmoothTrajectory(G4SmoothTrajectory &);
virtual ~G4SmoothTrajectory();
// Get/Set functions
//
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; }
// Operators
// Other member functions
//
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
virtual void DrawTrajectory() const;
virtual void AppendStep(const G4Step* aStep);
virtual G4int GetPointEntries() const
{ return positionRecord->size(); }
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
{ return (*positionRecord)[i]; }
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
G4SmoothTrajectory& operator= (const G4SmoothTrajectory&) = delete;
G4int operator == (const G4SmoothTrajectory& r) const {return (this==&r);}
G4ParticleDefinition* GetParticleDefinition();
inline void* operator new(size_t);
inline void operator delete(void*);
// Get method for HEPRep style attributes
//
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
// Get/Set functions
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; }
private:
// Other member functions
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
virtual void DrawTrajectory() const;
virtual void AppendStep(const G4Step* aStep);
virtual int GetPointEntries() const { return positionRecord->size(); }
virtual G4VTrajectoryPoint* GetPoint(G4int i) const { return (*positionRecord)[i]; }
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
G4ParticleDefinition* GetParticleDefinition();
// Get method for HEPRep style attributes
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
virtual std::vector<G4AttValue>* CreateAttValues() const;
//---------
private:
//---------
TrajectoryPointContainer* positionRecord;
G4int fTrackID;
G4int fParentID;
G4int PDGEncoding;
G4double PDGCharge;
G4String ParticleName;
G4double initialKineticEnergy;
G4ThreeVector initialMomentum;
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<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator();
extern G4TRACKING_DLL
G4Allocator<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator();
inline void* G4SmoothTrajectory::operator new(size_t)
{
if (!aSmoothTrajectoryAllocator())
{ aSmoothTrajectoryAllocator() = new G4Allocator<G4SmoothTrajectory>; }
if (aSmoothTrajectoryAllocator() == nullptr)
{
aSmoothTrajectoryAllocator() = new G4Allocator<G4SmoothTrajectory>;
}
return (void*)aSmoothTrajectoryAllocator()->MallocSingle();
}
@@ -137,4 +144,9 @@ inline void G4SmoothTrajectory::operator delete(void* aTrajectory)
aSmoothTrajectoryAllocator()->FreeSingle((G4SmoothTrajectory*)aTrajectory);
}
inline G4int G4SmoothTrajectory::operator== (const G4SmoothTrajectory& r) const
{
return (this==&r);
}
#endif