initial working version: 80 scintillators in 8 layers, root output, mono-energetic muon on -Z direction
This commit is contained in:
23
include/ActionInitialization.hh
Normal file
23
include/ActionInitialization.hh
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef ActionInitialization_h
|
||||
#define ActionInitialization_h 1
|
||||
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
|
||||
/// Action initialization class.
|
||||
|
||||
class ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
ActionInitialization();
|
||||
virtual ~ActionInitialization();
|
||||
|
||||
virtual void BuildForMaster() const;
|
||||
virtual void Build() const;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
6
include/Analysis.hh
Normal file
6
include/Analysis.hh
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef Analysis_h
|
||||
#define Analysis_h
|
||||
|
||||
#include "g4root.hh"
|
||||
|
||||
#endif /* end of include guard */
|
||||
30
include/DetectorConstruction.hh
Normal file
30
include/DetectorConstruction.hh
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#ifndef DetectorConstruction_h
|
||||
#define DetectorConstruction_h 1
|
||||
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
|
||||
/// Detector construction class to define materials and geometry.
|
||||
|
||||
class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
DetectorConstruction();
|
||||
virtual ~DetectorConstruction();
|
||||
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
protected:
|
||||
// void DefineMaterials();
|
||||
G4bool fCheckOverlaps;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
32
include/EventAction.hh
Normal file
32
include/EventAction.hh
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
#ifndef EventAction_h
|
||||
#define EventAction_h 1
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RunAction;
|
||||
|
||||
/// Event action class
|
||||
///
|
||||
|
||||
class EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
EventAction(RunAction* runAction);
|
||||
virtual ~EventAction();
|
||||
|
||||
virtual void BeginOfEventAction(const G4Event* event);
|
||||
virtual void EndOfEventAction(const G4Event* event);
|
||||
|
||||
private:
|
||||
// RunAction *fRunAction;
|
||||
G4int fCollID_detX;
|
||||
G4int fCollID_detY;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
37
include/PrimaryGeneratorAction.hh
Normal file
37
include/PrimaryGeneratorAction.hh
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
#ifndef PrimaryGeneratorAction_h
|
||||
#define PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
class G4Box;
|
||||
|
||||
/// The primary generator action class with particle gun.
|
||||
///
|
||||
/// The default kinematic is a 6 MeV gamma, randomly distribued
|
||||
/// in front of the phantom across 80% of the (X,Y) phantom size.
|
||||
|
||||
class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
PrimaryGeneratorAction();
|
||||
virtual ~PrimaryGeneratorAction();
|
||||
|
||||
// method from the base class
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
// method to access particle gun
|
||||
const G4ParticleGun* GetParticleGun() const { return fParticleGun; }
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun; // pointer a to G4 gun class
|
||||
G4Box* fEnvelopeBox;
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
31
include/RunAction.hh
Normal file
31
include/RunAction.hh
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef RunAction_h
|
||||
#define RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "G4Accumulable.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
|
||||
/// Run action class
|
||||
///
|
||||
/// In EndOfRunAction(), it calculates the dose in the selected volume
|
||||
/// from the energy deposit accumulated via stepping and event actions.
|
||||
/// The computed dose is then printed on the screen.
|
||||
|
||||
class RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RunAction();
|
||||
virtual ~RunAction();
|
||||
|
||||
// virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user