ATLAS Offline Software
Loading...
Searching...
No Matches
FastIDKiller.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4UserActions_FastIDKiller_H
6#define G4UserActions_FastIDKiller_H
7
8
9#include "G4UserRunAction.hh"
10#include "G4UserSteppingAction.hh"
12
13namespace G4UA
14{
15
17 class FastIDKiller : public G4UserRunAction,
18 public G4UserSteppingAction,
19 public AthMessaging
20 {
21
22 public:
23
25 struct Config
26 {
27 float R=1150.; // ID outer radius by default.
28 float Z=3490.; // ID maximum Z coordiate by default.
29 float energyCut=100000000.; // default energy threshold
30 bool isDalek=false; // Use FastIDKiller as DALEK (Domain Actuated Low Energy Killer)
31 };
32
35
37 struct Report
38 {
39 int killCount=0;
40 void merge(const Report& rep){
41 killCount+=rep.killCount;
42 }
43 };
44
45 const Report& getReport() const
46 { return m_report; }
47
48 virtual void BeginOfRunAction(const G4Run*) override;
49 virtual void UserSteppingAction(const G4Step*) override;
50
51 private:
52
53 void KillParticle(const G4Step* aStep);
54
57 bool m_init;
58
59 }; // class FastIDKiller
60
61} // namespace G4UA
62
63#endif
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
FastIDKiller(const Config &config)
Constructor.
virtual void UserSteppingAction(const G4Step *) override
void KillParticle(const G4Step *aStep)
virtual void BeginOfRunAction(const G4Run *) override
const Report & getReport() const
Configuration parameters.
Per-thread results for merging at end of run.
void merge(const Report &rep)