Import Geant4 11.2.0.beta source tree
This commit is contained in:
+17
-40
@@ -44,47 +44,24 @@ class GFlashParticleBounds;
|
||||
|
||||
class ExGflash1DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
ExGflash1DetectorConstruction();
|
||||
~ExGflash1DetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
|
||||
const G4VPhysicalVolume* GetCristal(int aNumCrystal)
|
||||
{return fCrystalPhys[aNumCrystal];};
|
||||
|
||||
|
||||
private:
|
||||
G4LogicalVolume* fCrystalLog;
|
||||
G4VPhysicalVolume* fCrystalPhys[100];
|
||||
G4Region* fRegion;
|
||||
public:
|
||||
ExGflash1DetectorConstruction();
|
||||
~ExGflash1DetectorConstruction() override;
|
||||
|
||||
static G4ThreadLocal GFlashShowerModel* fFastShowerModel;
|
||||
static G4ThreadLocal GFlashHomoShowerParameterisation* fParameterisation;
|
||||
static G4ThreadLocal GFlashParticleBounds* fParticleBounds;
|
||||
static G4ThreadLocal GFlashHitMaker* fHitMaker;
|
||||
G4VPhysicalVolume* Construct() override;
|
||||
void ConstructSDandField() override;
|
||||
|
||||
const G4VPhysicalVolume* GetCristal(int aNumCrystal) { return fCrystalPhys[aNumCrystal]; };
|
||||
|
||||
private:
|
||||
G4LogicalVolume* fCrystalLog{nullptr};
|
||||
G4VPhysicalVolume* fCrystalPhys[100]{};
|
||||
G4Region* fRegion{nullptr};
|
||||
|
||||
inline static G4ThreadLocal GFlashShowerModel* fFastShowerModel = nullptr;
|
||||
inline static G4ThreadLocal GFlashHomoShowerParameterisation* fParameterisation = nullptr;
|
||||
inline static G4ThreadLocal GFlashParticleBounds* fParticleBounds = nullptr;
|
||||
inline static G4ThreadLocal GFlashHitMaker* fHitMaker = nullptr;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+17
-16
@@ -30,9 +30,10 @@
|
||||
#ifndef EXGFLASH1SENSITIVEDETECTOR_H
|
||||
#define EXGFLASH1SENSITIVEDETECTOR_H
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4VGFlashSensitiveDetector.hh"
|
||||
#include "ExGflashHitsCollection.hh"
|
||||
|
||||
#include "G4VGFlashSensitiveDetector.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4GFlashSpot;
|
||||
@@ -42,21 +43,21 @@ class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
class ExGflash1SensitiveDetector: public G4VSensitiveDetector,
|
||||
public G4VGFlashSensitiveDetector {
|
||||
public:
|
||||
ExGflash1SensitiveDetector(G4String, ExGflash1DetectorConstruction* det);
|
||||
~ExGflash1SensitiveDetector();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*);
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*);
|
||||
virtual G4bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*);
|
||||
class ExGflash1SensitiveDetector : public G4VSensitiveDetector, public G4VGFlashSensitiveDetector
|
||||
{
|
||||
public:
|
||||
ExGflash1SensitiveDetector(G4String, ExGflash1DetectorConstruction* det);
|
||||
~ExGflash1SensitiveDetector() override;
|
||||
|
||||
private:
|
||||
ExGflashHitsCollection* fCaloHitsCollection;
|
||||
ExGflash1DetectorConstruction* fDetector;
|
||||
G4int fHCID;
|
||||
void Initialize(G4HCofThisEvent*) override;
|
||||
G4bool ProcessHits(G4Step*, G4TouchableHistory*) override;
|
||||
G4bool ProcessHits(G4GFlashSpot* aSpot, G4TouchableHistory*) override;
|
||||
void EndOfEvent(G4HCofThisEvent*) override;
|
||||
|
||||
private:
|
||||
ExGflashHitsCollection* fCaloHitsCollection;
|
||||
ExGflash1DetectorConstruction* fDetector;
|
||||
G4int fHCID{-1};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+3
-5
@@ -39,12 +39,10 @@ class ExGflashActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ExGflashActionInitialization();
|
||||
virtual ~ExGflashActionInitialization();
|
||||
~ExGflashActionInitialization() override;
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
void BuildForMaster() const override;
|
||||
void Build() const override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -30,22 +30,23 @@
|
||||
#ifndef ExGflashEventAction_h
|
||||
#define ExGflashEventAction_h
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "G4Timer.hh"
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class ExGflashEventAction: public G4UserEventAction {
|
||||
public:
|
||||
ExGflashEventAction();
|
||||
~ExGflashEventAction();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int fNevent;
|
||||
G4double fDtime;
|
||||
G4int fCalorimeterCollectionId;
|
||||
G4Timer fTimerIntern;
|
||||
class ExGflashEventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
ExGflashEventAction();
|
||||
~ExGflashEventAction() override;
|
||||
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
|
||||
private:
|
||||
G4int fNevent{0};
|
||||
G4double fDtime{0.0};
|
||||
G4int fCalorimeterCollectionId{-1};
|
||||
G4Timer fTimerIntern;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -29,90 +29,72 @@
|
||||
//
|
||||
#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:
|
||||
ExGflashHit();
|
||||
ExGflashHit(G4LogicalVolume* logVol);
|
||||
~ExGflashHit() override;
|
||||
ExGflashHit(const ExGflashHit& right);
|
||||
const ExGflashHit& operator=(const ExGflashHit& right);
|
||||
G4bool operator==(const ExGflashHit& right) const;
|
||||
|
||||
ExGflashHit();
|
||||
ExGflashHit(G4LogicalVolume* logVol);
|
||||
~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;}
|
||||
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();
|
||||
void Draw() override;
|
||||
void Print() override;
|
||||
|
||||
private:
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4int fCrystalNumber;
|
||||
G4ThreeVector fStart;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fLogV;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4int fCrystalNumber;
|
||||
G4ThreeVector fStart;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fLogV;
|
||||
|
||||
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 G4int GetCrystalNum()
|
||||
{ return fCrystalNumber; };
|
||||
inline void SetCrystalNum(G4int num)
|
||||
{ fCrystalNumber=num; };
|
||||
inline G4ThreeVector GetPos()
|
||||
{ return fPos; };
|
||||
inline void SetStart(G4ThreeVector xyz)
|
||||
{ fStart = xyz; };
|
||||
inline G4ThreeVector GetStart()
|
||||
{ return fStart; };
|
||||
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 G4int GetCrystalNum() { return fCrystalNumber; };
|
||||
inline void SetCrystalNum(G4int num) { fCrystalNumber = num; };
|
||||
inline G4ThreeVector GetPos() { return fPos; };
|
||||
inline void SetStart(G4ThreeVector xyz) { fStart = xyz; };
|
||||
inline G4ThreeVector GetStart() { return fStart; };
|
||||
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{ fRot = rmat; };
|
||||
inline G4RotationMatrix GetRot()
|
||||
{ return fRot; };
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{ return fLogV; };
|
||||
inline void SetRot(G4RotationMatrix rmat) { fRot = rmat; };
|
||||
inline G4RotationMatrix GetRot() { return fRot; };
|
||||
inline const G4LogicalVolume* GetLogV() { return fLogV; };
|
||||
};
|
||||
|
||||
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) 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -31,5 +31,5 @@
|
||||
#define ExGflashHitsCollection_h
|
||||
#include "G4THitsCollection.hh"
|
||||
class ExGflashHit;
|
||||
typedef G4THitsCollection<ExGflashHit> ExGflashHitsCollection;
|
||||
using ExGflashHitsCollection = G4THitsCollection<ExGflashHit>;
|
||||
#endif
|
||||
|
||||
+4
-6
@@ -35,18 +35,16 @@
|
||||
class G4Event;
|
||||
class G4GeneralParticleSource;
|
||||
|
||||
class ExGflashPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
class ExGflashPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
ExGflashPrimaryGeneratorAction();
|
||||
~ExGflashPrimaryGeneratorAction();
|
||||
~ExGflashPrimaryGeneratorAction() override;
|
||||
|
||||
virtual void GeneratePrimaries(G4Event* anEvent);
|
||||
void GeneratePrimaries(G4Event* anEvent) override;
|
||||
|
||||
private:
|
||||
G4GeneralParticleSource* fParticleGun;
|
||||
G4GeneralParticleSource* fParticleGun{nullptr};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ class G4Run;
|
||||
|
||||
class ExGflashRunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
ExGflashRunAction();
|
||||
~ExGflashRunAction();
|
||||
public:
|
||||
ExGflashRunAction();
|
||||
~ExGflashRunAction() override;
|
||||
|
||||
virtual void BeginOfRunAction(const G4Run* aRun);
|
||||
virtual void EndOfRunAction(const G4Run* aRun);
|
||||
void BeginOfRunAction(const G4Run* aRun) override;
|
||||
void EndOfRunAction(const G4Run* aRun) override;
|
||||
|
||||
private:
|
||||
G4int fRunID;
|
||||
private:
|
||||
G4int fRunID{0};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user