From d159c826e8308fcd6b2a977506a8f2d200d5d49a Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 2 Apr 2018 23:17:49 +0200 Subject: [PATCH] Created PhysicsList. Not used yet. --- include/MedtechPhysicsList.hh | 32 ++++++++++++++++++++++++++ src/MedtechPhysicsList.cc | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 include/MedtechPhysicsList.hh create mode 100644 src/MedtechPhysicsList.cc diff --git a/include/MedtechPhysicsList.hh b/include/MedtechPhysicsList.hh new file mode 100644 index 0000000..168357d --- /dev/null +++ b/include/MedtechPhysicsList.hh @@ -0,0 +1,32 @@ +// +// MedtechPhysicsList.hh +// medtech +// +// Created by Baranyai David on 2018. 04. 01.. +// + +#ifndef MedtechPhysicsList_hh +#define MedtechPhysicsList_hh + +#include +#include "G4VUserPhysicsList.hh" +#include "G4SystemOfUnits.hh" +#include "G4Electron.hh" +#include "G4Positron.hh" +#include "G4Gamma.hh" + +class MedtechPhysicsList : public G4VUserPhysicsList +{ +private: + G4double cutForGamma = 1.0*cm; + G4double cutForElectron = 1.*mm; + G4double cutForPositron = 0.1*mm; +public: + MedtechPhysicsList(); + virtual ~MedtechPhysicsList(); + virtual void ConstructProcess(); + virtual void ConstructParticle(); + virtual void SetCuts(); +}; + +#endif /* MedtechPhysicsList_hpp */ diff --git a/src/MedtechPhysicsList.cc b/src/MedtechPhysicsList.cc new file mode 100644 index 0000000..f34505c --- /dev/null +++ b/src/MedtechPhysicsList.cc @@ -0,0 +1,42 @@ +// +// MedtechPhysicsList.cc +// medtech +// +// Created by Baranyai David on 2018. 04. 01.. +// + +#include "MedtechPhysicsList.hh" +#include "G4DecayPhysics.hh" +#include "G4EmStandardPhysics.hh" + +MedtechPhysicsList::MedtechPhysicsList() : G4VUserPhysicsList() +{ + defaultCutValue = 1.0*cm; //define production thresholds (the same for all particles) +} + +MedtechPhysicsList::~MedtechPhysicsList() +{ + +} + +void MedtechPhysicsList::ConstructProcess() +{ + +} + +void MedtechPhysicsList::ConstructParticle() +{ + //define the particles involved in the simulation + G4Electron::ElectronDefinition(); + G4Positron::PositronDefinition(); + G4Gamma::GammaDefinition(); +} + +void MedtechPhysicsList::SetCuts() +{ + //SetCutsWithDefault(); //set the production threshold + //the user can define different cuts for different particles or different regions + SetCutValue(cutForGamma, "gamma"); + SetCutValue(cutForElectron, "e-"); + SetCutValue(cutForPositron, "e+"); +}