Created basic ActionInitialization class
This commit is contained in:
parent
6443897b90
commit
92aa2e0199
|
@ -0,0 +1,29 @@
|
||||||
|
//
|
||||||
|
// MedtechActionInitialization.hh
|
||||||
|
// medtech
|
||||||
|
//
|
||||||
|
// Created by Baranyai David on 2018. 04. 01..
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef MedtechActionInitialization_hh
|
||||||
|
#define MedtechActionInitialization_hh
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "G4VUserActionInitialization.hh"
|
||||||
|
#include "MedtechPrimaryGeneratorAction.hh"
|
||||||
|
#include "MedtechRunAction.hh"
|
||||||
|
#include "MedtechEventAction.hh"
|
||||||
|
#include "MedtechSteppingAction.hh"
|
||||||
|
|
||||||
|
|
||||||
|
class MedtechActionInitialization : public G4VUserActionInitialization
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MedtechActionInitialization();
|
||||||
|
virtual ~MedtechActionInitialization();
|
||||||
|
|
||||||
|
virtual void BuildForMaster() const;
|
||||||
|
virtual void Build() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MedtechActionInitialization_hh */
|
|
@ -0,0 +1,37 @@
|
||||||
|
//
|
||||||
|
// MedtechActionInitialization.cc
|
||||||
|
// medtech
|
||||||
|
//
|
||||||
|
// Created by Baranyai David on 2018. 04. 01..
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "MedtechActionInitialization.hh"
|
||||||
|
|
||||||
|
MedtechActionInitialization::MedtechActionInitialization() : G4VUserActionInitialization()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MedtechActionInitialization::~MedtechActionInitialization()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MedtechActionInitialization::BuildForMaster() const
|
||||||
|
{
|
||||||
|
MedtechRunAction* runAction = new MedtechRunAction;
|
||||||
|
SetUserAction(runAction);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MedtechActionInitialization::Build() const
|
||||||
|
{
|
||||||
|
SetUserAction(new MedtechPrimaryGeneratorAction);
|
||||||
|
|
||||||
|
MedtechRunAction* runAction = new MedtechRunAction;
|
||||||
|
SetUserAction(runAction);
|
||||||
|
|
||||||
|
MedtechEventAction* eventAction = new MedtechEventAction(runAction);
|
||||||
|
SetUserAction(eventAction);
|
||||||
|
|
||||||
|
SetUserAction(new MedtechSteppingAction(eventAction));
|
||||||
|
}
|
Loading…
Reference in New Issue