Created PhysicsList. Not used yet.

This commit is contained in:
Gitea 2018-04-02 23:17:49 +02:00
parent f5a9c031af
commit d159c826e8
2 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,32 @@
//
// MedtechPhysicsList.hh
// medtech
//
// Created by Baranyai David on 2018. 04. 01..
//
#ifndef MedtechPhysicsList_hh
#define MedtechPhysicsList_hh
#include <stdio.h>
#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 */

42
src/MedtechPhysicsList.cc Normal file
View File

@ -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+");
}