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
+29 -37
View File
@@ -37,67 +37,59 @@
#ifndef G4TrajectoryPoint_hh
#define G4TrajectoryPoint_hh 1
#include "trkgdefs.hh"
#include "G4Allocator.hh" // Include from 'particle+matter'
#include "G4ThreeVector.hh" // Include from 'geometry'
#include "G4VTrajectoryPoint.hh"
#include "globals.hh" // Include from 'global'
#include "G4ThreeVector.hh" // Include from 'geometry'
#include "G4Allocator.hh" // Include from 'particle+matter'
#include "globals.hh" // Include from 'global'
#include "trkgdefs.hh"
class G4TrajectoryPoint : public G4VTrajectoryPoint
{
public:
public:
// Constructors/Destructor
// Constructors/Destructor
G4TrajectoryPoint() = default;
G4TrajectoryPoint(G4ThreeVector pos);
G4TrajectoryPoint(const G4TrajectoryPoint& right);
~G4TrajectoryPoint() override;
G4TrajectoryPoint();
G4TrajectoryPoint(G4ThreeVector pos);
G4TrajectoryPoint(const G4TrajectoryPoint& right);
virtual ~G4TrajectoryPoint();
// Operators
// Operators
inline void* operator new(size_t);
inline void operator delete(void* aTrajectoryPoint);
inline G4bool operator==(const G4TrajectoryPoint& right) const;
inline void *operator new(size_t);
inline void operator delete(void *aTrajectoryPoint);
inline G4bool operator==(const G4TrajectoryPoint& right) const;
// Get/Set functions
// Get/Set functions
inline const G4ThreeVector GetPosition() const override { return fPosition; }
inline const G4ThreeVector GetPosition() const
{ return fPosition; }
// 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:
G4ThreeVector fPosition;
private:
G4ThreeVector fPosition{0., 0., 0.};
};
extern G4TRACKING_DLL
G4Allocator<G4TrajectoryPoint>*& aTrajectoryPointAllocator();
extern G4TRACKING_DLL G4Allocator<G4TrajectoryPoint>*& aTrajectoryPointAllocator();
inline void* G4TrajectoryPoint::operator new(size_t)
{
if (aTrajectoryPointAllocator() == nullptr)
{
if (aTrajectoryPointAllocator() == nullptr) {
aTrajectoryPointAllocator() = new G4Allocator<G4TrajectoryPoint>;
}
return (void *) aTrajectoryPointAllocator()->MallocSingle();
return (void*)aTrajectoryPointAllocator()->MallocSingle();
}
inline void G4TrajectoryPoint::operator delete(void *aTrajectoryPoint)
inline void G4TrajectoryPoint::operator delete(void* aTrajectoryPoint)
{
aTrajectoryPointAllocator()
->FreeSingle((G4TrajectoryPoint *) aTrajectoryPoint);
aTrajectoryPointAllocator()->FreeSingle((G4TrajectoryPoint*)aTrajectoryPoint);
}
inline G4bool
G4TrajectoryPoint::operator==(const G4TrajectoryPoint& right) const
inline G4bool G4TrajectoryPoint::operator==(const G4TrajectoryPoint& right) const
{
return (this==&right);
return (this == &right);
}
#endif