Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -29,65 +29,75 @@
//
#ifndef ExGflashHit_h
#define ExGflashHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4THitsCollection.hh"
#include "G4ThreeVector.hh"
#include "G4VHit.hh"
class G4LogicalVolume;
class ExGflashHit : public G4VHit
{
public:
public:
ExGflashHit();
~ExGflashHit();
ExGflashHit(const ExGflashHit &right);
const ExGflashHit& operator=(const ExGflashHit &right);
G4bool operator==(const ExGflashHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void *operator new(size_t,void*p){return p;}
~ExGflashHit() override;
ExGflashHit(const ExGflashHit& right);
ExGflashHit& operator=(const ExGflashHit& right);
G4bool operator==(const ExGflashHit& right) const;
inline void* operator new(size_t);
inline void operator delete(void* aHit);
void* operator new(size_t, void* p) { return p; }
#ifndef G4NOT_ISO_DELETES
void operator delete(void *,void*){}
void operator delete(void*, void*) {}
#endif
virtual void Draw();
virtual void Print();
private:
void Draw() override;
void Print() override;
private:
G4double fEdep;
G4ThreeVector fPos;
public:
inline void SetEdep(G4double de)
{ fEdep = de; };
inline void AddEdep(G4double de)
{ fEdep += de; };
inline G4double GetEdep()
{ return fEdep; };
inline void SetPos(G4ThreeVector xyz)
{ fPos = xyz; };
inline G4ThreeVector GetPos()
{ return fPos; };
public:
void SetEdep(G4double de)
{
fEdep = de;
};
void AddEdep(G4double de)
{
fEdep += de;
};
G4double GetEdep()
{
return fEdep;
};
void SetPos(G4ThreeVector xyz)
{
fPos = xyz;
};
G4ThreeVector GetPos()
{
return fPos;
};
};
typedef G4THitsCollection<ExGflashHit> ExGflashHitsCollection;
using ExGflashHitsCollection = G4THitsCollection<ExGflashHit>;
extern G4ThreadLocal G4Allocator<ExGflashHit>* ExGflashHitAllocator;
inline void* ExGflashHit::operator new(size_t)
{
if(!ExGflashHitAllocator) ExGflashHitAllocator = new G4Allocator<ExGflashHit>;
return (void *) ExGflashHitAllocator->MallocSingle();
if ( ExGflashHitAllocator == nullptr )
ExGflashHitAllocator = new G4Allocator<ExGflashHit>;
return (void*)ExGflashHitAllocator->MallocSingle();
}
inline void ExGflashHit::operator delete(void *aHit)
inline void ExGflashHit::operator delete(void* aHit)
{
ExGflashHitAllocator->FreeSingle((ExGflashHit*) aHit);
ExGflashHitAllocator->FreeSingle((ExGflashHit*)aHit);
}
#endif