ATLAS Offline Software
Loading...
Searching...
No Matches
LooperKiller.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4USERACTIONS_G4UA_LOOPERKILLER_H
6#define G4USERACTIONS_G4UA_LOOPERKILLER_H
7
8#include "GaudiKernel/ServiceHandle.h"
9
10// Infrastructure includes
11#include "G4UserSteppingAction.hh"
13
14class StoreGateSvc;
15
16namespace G4UA
17{
18
22 class LooperKiller final : public G4UserSteppingAction, public AthMessaging
23 {
24
25 public:
26
27 struct Config
28 {
29 int MaxSteps=1000000;
30 int PrintSteps=100;
32 bool AbortEvent=true;
33 bool SetError=false;
34 bool BSM_Only=false;
35 };
36
37 struct Report
38 {
40 void merge(const Report& rep){
41 killed_tracks+=rep.killed_tracks;
42 }
43 };
44
46
47 virtual void UserSteppingAction(const G4Step*) override;
49 const Report& getReport() const
50 { return m_report; }
51
52 private:
53
59
64
65 }; // class LooperKiller
66
67}
68
69#endif
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Config m_config
My configuration options.
const Report & getReport() const
Retrieve results.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
LooperKiller(const Config &config)
virtual void UserSteppingAction(const G4Step *) override
ServiceHandle< StoreGateSvc > StoreGateSvc_t
The Athena Transient Store API.
void merge(const Report &rep)