Import Geant4 11.2.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2023-06-30 09:09:57 +02:00
parent aef78ca386
commit dd1f179cda
3780 changed files with 212808 additions and 142780 deletions
+62 -74
View File
@@ -28,10 +28,10 @@
// Class description:
//
// This class represents the trajectory of a particle tracked.
// It includes information of
// It includes information of
// 1) List of trajectory points which compose the trajectory,
// 2) static information of particle which generates 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.
@@ -45,18 +45,19 @@
#ifndef G4SmoothTrajectory_hh
#define G4SmoothTrajectory_hh 1
#include <stdlib.h> // Include from 'system'
#include <vector>
#include "G4Allocator.hh"
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
#include "G4SmoothTrajectoryPoint.hh" // Include from 'tracking'
#include "G4Step.hh"
#include "G4Track.hh"
#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 "G4SmoothTrajectoryPoint.hh" // Include from 'tracking'
#include "G4Track.hh"
#include "G4Step.hh"
#include <stdlib.h> // Include from 'system'
#include <vector>
class G4Polyline;
@@ -64,76 +65,63 @@ class G4SmoothTrajectory : public G4VTrajectory
{
using G4TrajectoryPointContainer = std::vector<G4VTrajectoryPoint*>;
public:
public:
// Constructors/Destructor
//
G4SmoothTrajectory() = default;
G4SmoothTrajectory(const G4Track* aTrack);
~G4SmoothTrajectory() override;
G4SmoothTrajectory(G4SmoothTrajectory&);
G4SmoothTrajectory& operator=(const G4SmoothTrajectory&) = delete;
// Constructors/Destructor
//
G4SmoothTrajectory();
G4SmoothTrajectory(const G4Track* aTrack);
G4SmoothTrajectory(G4SmoothTrajectory &);
virtual ~G4SmoothTrajectory();
// Operators
//
inline G4bool operator==(const G4SmoothTrajectory& r) const;
inline void* operator new(size_t);
inline void operator delete(void*);
// Operators
//
G4SmoothTrajectory& operator= (const G4SmoothTrajectory&) = delete;
inline G4int operator == (const G4SmoothTrajectory& r) const;
inline void* operator new(size_t);
inline void operator delete(void*);
// 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; }
// 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; }
// 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;
// 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 (G4int)positionRecord->size(); }
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
{ return (*positionRecord)[i]; }
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
G4ParticleDefinition* GetParticleDefinition();
G4ParticleDefinition* GetParticleDefinition();
// Get method for HEPRep style attributes
//
const std::map<G4String, G4AttDef>* GetAttDefs() const override;
std::vector<G4AttValue>* CreateAttValues() const override;
// Get method for HEPRep style attributes
//
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<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator();
extern G4TRACKING_DLL G4Allocator<G4SmoothTrajectory>*& aSmoothTrajectoryAllocator();
inline void* G4SmoothTrajectory::operator new(size_t)
{
if (aSmoothTrajectoryAllocator() == nullptr)
{
if (aSmoothTrajectoryAllocator() == nullptr) {
aSmoothTrajectoryAllocator() = new G4Allocator<G4SmoothTrajectory>;
}
return (void*)aSmoothTrajectoryAllocator()->MallocSingle();
@@ -144,9 +132,9 @@ inline void G4SmoothTrajectory::operator delete(void* aTrajectory)
aSmoothTrajectoryAllocator()->FreeSingle((G4SmoothTrajectory*)aTrajectory);
}
inline G4int G4SmoothTrajectory::operator== (const G4SmoothTrajectory& r) const
inline G4bool G4SmoothTrajectory::operator==(const G4SmoothTrajectory& r) const
{
return (this==&r);
return (this == &r);
}
#endif