Created basic ActionInitialization class

This commit is contained in:
Gitea 2018-04-02 23:03:35 +02:00
parent 6443897b90
commit 92aa2e0199
2 changed files with 66 additions and 0 deletions

View File

@ -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 */

View File

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