Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
+19 -15
View File
@@ -30,11 +30,12 @@
#ifndef B4cCalorHit_h
#define B4cCalorHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4THitsCollection.hh"
#include "G4Threading.hh"
#include "G4ThreeVector.hh"
#include "G4VHit.hh"
#include "globals.hh"
namespace B4c
{
@@ -57,10 +58,10 @@ class CalorHit : public G4VHit
G4bool operator==(const CalorHit&) const;
inline void* operator new(size_t);
inline void operator delete(void*);
inline void operator delete(void*);
// methods from base class
void Draw() override{}
void Draw() override {}
void Print() override;
// methods to handle data
@@ -71,8 +72,8 @@ class CalorHit : public G4VHit
G4double GetTrackLength() const;
private:
G4double fEdep = 0.; ///< Energy deposit in the sensitive volume
G4double fTrackLength = 0.; ///< Track length in the sensitive volume
G4double fEdep = 0.; ///< Energy deposit in the sensitive volume
G4double fTrackLength = 0.; ///< Track length in the sensitive volume
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -88,33 +89,36 @@ inline void* CalorHit::operator new(size_t)
if (!CalorHitAllocator) {
CalorHitAllocator = new G4Allocator<CalorHit>;
}
void *hit;
hit = (void *) CalorHitAllocator->MallocSingle();
void* hit;
hit = (void*)CalorHitAllocator->MallocSingle();
return hit;
}
inline void CalorHit::operator delete(void *hit)
inline void CalorHit::operator delete(void* hit)
{
if (!CalorHitAllocator) {
CalorHitAllocator = new G4Allocator<CalorHit>;
}
CalorHitAllocator->FreeSingle((CalorHit*) hit);
CalorHitAllocator->FreeSingle((CalorHit*)hit);
}
inline void CalorHit::Add(G4double de, G4double dl) {
inline void CalorHit::Add(G4double de, G4double dl)
{
fEdep += de;
fTrackLength += dl;
}
inline G4double CalorHit::GetEdep() const {
inline G4double CalorHit::GetEdep() const
{
return fEdep;
}
inline G4double CalorHit::GetTrackLength() const {
inline G4double CalorHit::GetTrackLength() const
{
return fTrackLength;
}
}
} // namespace B4c
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......