SciFiMatG4_1layer1mm/SciFiSim/include/#SteppingAction.hh#
Blake Leverington c6150aab97 moved to pi git
2021-12-01 16:25:41 +01:00

63 lines
1.1 KiB
Plaintext
Executable File

// Written by Peter Stromberger
// based on work of Mirco Deckenhoff
#ifndef SteppingAction_H
#define SteppingAction_H 1
#include "globals.hh"
#include "G4UserSteppingAction.hh"
#include "G4OpBoundaryProcess.hh"
#include "EventAction.hh"
#include "G4ParticleDefinition.hh"
#include "PrimaryGeneratorAction.hh"
#include "TFile.h"
#include "TH2F.h"
#include "TH1F.h"
#include "TTree.h"
#include "TObject.h"
class SteppingAction : public G4UserSteppingAction
{
public:
SteppingAction(EventAction* eventAction, PrimaryGeneratorAction* pGA);
virtual ~SteppingAction();
virtual void UserSteppingAction( const G4Step* );
TFile * doseFile;
TH2F * dosehist50invfb;
Float_t dose;
private:
const char* primParticle;
G4ParticleDefinition* primDefinition;
PrimaryGeneratorAction* pGA;
EventAction* fEventAction;
G4int creatorProcess;
G4OpBoundaryProcess* opBoundaryProcess;
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("dose.root");
TH2F * dosehist50invfb = (TH2F*)doseFile->Get("dosehist50invfb");
if (dosehist50invfb){
dosehist50invfb->SetDirectory(0);
}
};
#endif