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 -20
View File
@@ -30,11 +30,11 @@
#ifndef B2TrackerHit_h
#define B2TrackerHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4THitsCollection.hh"
#include "G4Threading.hh"
#include "G4ThreeVector.hh"
#include "tls.hh"
#include "G4VHit.hh"
namespace B2
{
@@ -57,28 +57,28 @@ class TrackerHit : public G4VHit
G4bool operator==(const TrackerHit&) 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 Print() override;
// Set methods
void SetTrackID (G4int track) { fTrackID = track; };
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
void SetEdep (G4double de) { fEdep = de; };
void SetPos (G4ThreeVector xyz){ fPos = xyz; };
void SetTrackID(G4int track) { fTrackID = track; };
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
void SetEdep(G4double de) { fEdep = de; };
void SetPos(G4ThreeVector xyz) { fPos = xyz; };
// Get methods
G4int GetTrackID() const { return fTrackID; };
G4int GetChamberNb() const { return fChamberNb; };
G4double GetEdep() const { return fEdep; };
G4int GetTrackID() const { return fTrackID; };
G4int GetChamberNb() const { return fChamberNb; };
G4double GetEdep() const { return fEdep; };
G4ThreeVector GetPos() const { return fPos; };
private:
G4int fTrackID = -1;
G4int fChamberNb = -1;
G4double fEdep = 0.;
G4int fTrackID = -1;
G4int fChamberNb = -1;
G4double fEdep = 0.;
G4ThreeVector fPos;
};
@@ -92,20 +92,19 @@ extern G4ThreadLocal G4Allocator<TrackerHit>* TrackerHitAllocator;
inline void* TrackerHit::operator new(size_t)
{
if(!TrackerHitAllocator)
TrackerHitAllocator = new G4Allocator<TrackerHit>;
return (void *) TrackerHitAllocator->MallocSingle();
if (!TrackerHitAllocator) TrackerHitAllocator = new G4Allocator<TrackerHit>;
return (void*)TrackerHitAllocator->MallocSingle();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline void TrackerHit::operator delete(void *hit)
inline void TrackerHit::operator delete(void* hit)
{
TrackerHitAllocator->FreeSingle((TrackerHit*) hit);
TrackerHitAllocator->FreeSingle((TrackerHit*)hit);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
}
} // namespace B2
#endif