Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -38,37 +38,37 @@
|
||||
#ifndef G4PrimaryVertex_hh
|
||||
#define G4PrimaryVertex_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "pwdefs.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "pwdefs.hh"
|
||||
|
||||
class G4VUserPrimaryVertexInformation;
|
||||
|
||||
class G4PrimaryVertex
|
||||
class G4PrimaryVertex
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
G4PrimaryVertex() = default;
|
||||
G4PrimaryVertex(G4double x0,G4double y0,G4double z0,G4double t0);
|
||||
G4PrimaryVertex(G4double x0, G4double y0, G4double z0, G4double t0);
|
||||
G4PrimaryVertex(G4ThreeVector xyz0, G4double t0);
|
||||
// Constructors
|
||||
|
||||
// Destructor
|
||||
virtual ~G4PrimaryVertex();
|
||||
// Destructor
|
||||
|
||||
// Copy constructor & assignment operator
|
||||
G4PrimaryVertex(const G4PrimaryVertex& right);
|
||||
G4PrimaryVertex& operator=(const G4PrimaryVertex& right);
|
||||
// Copy constructor & assignment operator
|
||||
|
||||
// Equality operators
|
||||
G4bool operator==(const G4PrimaryVertex& right) const;
|
||||
G4bool operator!=(const G4PrimaryVertex& right) const;
|
||||
// Equality operators
|
||||
|
||||
// Overloaded new/delete operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aPrimaryVertex);
|
||||
// Overloaded new/delete operators
|
||||
|
||||
// Accessors & modifiers
|
||||
|
||||
@@ -81,7 +81,7 @@ class G4PrimaryVertex
|
||||
inline void SetT0(G4double t0);
|
||||
inline G4int GetNumberOfParticle() const;
|
||||
inline void SetPrimary(G4PrimaryParticle* pp);
|
||||
G4PrimaryParticle* GetPrimary(G4int i=0) const;
|
||||
G4PrimaryParticle* GetPrimary(G4int i = 0) const;
|
||||
inline void SetNext(G4PrimaryVertex* nv);
|
||||
inline void ClearNext();
|
||||
inline G4PrimaryVertex* GetNext() const;
|
||||
@@ -91,9 +91,8 @@ class G4PrimaryVertex
|
||||
inline G4VUserPrimaryVertexInformation* GetUserInformation() const;
|
||||
|
||||
void Print() const;
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
G4double X0 = 0.0;
|
||||
G4double Y0 = 0.0;
|
||||
G4double Z0 = 0.0;
|
||||
@@ -113,123 +112,113 @@ extern G4PART_DLL G4Allocator<G4PrimaryVertex>*& aPrimaryVertexAllocator();
|
||||
// Inline methods
|
||||
// ------------------------
|
||||
|
||||
inline
|
||||
void* G4PrimaryVertex::operator new(std::size_t)
|
||||
inline void* G4PrimaryVertex::operator new(std::size_t)
|
||||
{
|
||||
if (aPrimaryVertexAllocator() == nullptr)
|
||||
{
|
||||
if (aPrimaryVertexAllocator() == nullptr) {
|
||||
aPrimaryVertexAllocator() = new G4Allocator<G4PrimaryVertex>;
|
||||
}
|
||||
return (void*) aPrimaryVertexAllocator()->MallocSingle();
|
||||
return (void*)aPrimaryVertexAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::operator delete(void* aPrimaryVertex)
|
||||
inline void G4PrimaryVertex::operator delete(void* aPrimaryVertex)
|
||||
{
|
||||
aPrimaryVertexAllocator()->FreeSingle((G4PrimaryVertex*) aPrimaryVertex);
|
||||
aPrimaryVertexAllocator()->FreeSingle((G4PrimaryVertex*)aPrimaryVertex);
|
||||
}
|
||||
|
||||
inline
|
||||
G4ThreeVector G4PrimaryVertex::GetPosition() const
|
||||
inline G4ThreeVector G4PrimaryVertex::GetPosition() const
|
||||
{
|
||||
return G4ThreeVector(X0,Y0,Z0);
|
||||
return G4ThreeVector(X0, Y0, Z0);
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetPosition(G4double x0,G4double y0,G4double z0)
|
||||
inline void G4PrimaryVertex::SetPosition(G4double x0, G4double y0, G4double z0)
|
||||
{
|
||||
X0 = x0; Y0 = y0; Z0 = z0;
|
||||
X0 = x0;
|
||||
Y0 = y0;
|
||||
Z0 = z0;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PrimaryVertex::GetX0() const
|
||||
inline G4double G4PrimaryVertex::GetX0() const
|
||||
{
|
||||
return X0;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PrimaryVertex::GetY0() const
|
||||
inline G4double G4PrimaryVertex::GetY0() const
|
||||
{
|
||||
return Y0;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PrimaryVertex::GetZ0() const
|
||||
inline G4double G4PrimaryVertex::GetZ0() const
|
||||
{
|
||||
return Z0;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PrimaryVertex::GetT0() const
|
||||
inline G4double G4PrimaryVertex::GetT0() const
|
||||
{
|
||||
return T0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetT0(G4double t0)
|
||||
inline void G4PrimaryVertex::SetT0(G4double t0)
|
||||
{
|
||||
T0 = t0;
|
||||
}
|
||||
|
||||
inline
|
||||
G4int G4PrimaryVertex::GetNumberOfParticle() const
|
||||
inline G4int G4PrimaryVertex::GetNumberOfParticle() const
|
||||
{
|
||||
return numberOfParticle;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetPrimary(G4PrimaryParticle* pp)
|
||||
{
|
||||
if(theParticle == nullptr) { theParticle = pp; }
|
||||
else { theTail->SetNext(pp); }
|
||||
inline void G4PrimaryVertex::SetPrimary(G4PrimaryParticle* pp)
|
||||
{
|
||||
if (theParticle == nullptr) {
|
||||
theParticle = pp;
|
||||
}
|
||||
else {
|
||||
theTail->SetNext(pp);
|
||||
}
|
||||
theTail = pp;
|
||||
++numberOfParticle;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetNext(G4PrimaryVertex* nv)
|
||||
{
|
||||
if(nextVertex == nullptr) { nextVertex = nv; }
|
||||
else { tailVertex->SetNext(nv); }
|
||||
inline void G4PrimaryVertex::SetNext(G4PrimaryVertex* nv)
|
||||
{
|
||||
if (nextVertex == nullptr) {
|
||||
nextVertex = nv;
|
||||
}
|
||||
else {
|
||||
tailVertex->SetNext(nv);
|
||||
}
|
||||
tailVertex = nv;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::ClearNext()
|
||||
inline void G4PrimaryVertex::ClearNext()
|
||||
{
|
||||
nextVertex = nullptr;
|
||||
tailVertex = nullptr;
|
||||
}
|
||||
|
||||
inline
|
||||
G4PrimaryVertex* G4PrimaryVertex::GetNext() const
|
||||
inline G4PrimaryVertex* G4PrimaryVertex::GetNext() const
|
||||
{
|
||||
return nextVertex;
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PrimaryVertex::GetWeight() const
|
||||
inline G4double G4PrimaryVertex::GetWeight() const
|
||||
{
|
||||
return Weight0;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetWeight(G4double w)
|
||||
inline void G4PrimaryVertex::SetWeight(G4double w)
|
||||
{
|
||||
Weight0 = w;
|
||||
}
|
||||
|
||||
inline
|
||||
void G4PrimaryVertex::SetUserInformation(G4VUserPrimaryVertexInformation* info)
|
||||
inline void G4PrimaryVertex::SetUserInformation(G4VUserPrimaryVertexInformation* info)
|
||||
{
|
||||
userInfo = info;
|
||||
}
|
||||
|
||||
inline
|
||||
G4VUserPrimaryVertexInformation* G4PrimaryVertex::GetUserInformation() const
|
||||
inline G4VUserPrimaryVertexInformation* G4PrimaryVertex::GetUserInformation() const
|
||||
{
|
||||
return userInfo;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user