BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSLinkEventAction.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSLINKEVENTACTION_H
20#define BDSLINKEVENTACTION_H
21
22#include "G4Types.hh"
23#include "G4UserEventAction.hh"
24
26class BDSOutput;
27class G4Event;
28
35class BDSLinkEventAction: public G4UserEventAction
36{
37public:
38 BDSLinkEventAction() = delete;
40 BDSLinkRunAction* runActionIn,
41 G4bool debugIn = false);
42 virtual ~BDSLinkEventAction();
43
44 virtual void BeginOfEventAction(const G4Event* evt);
45 virtual void EndOfEventAction(const G4Event* evt);
46
47 G4int CurrentEventIndex() const {return currentEventIndex;}
48
50 void SetPrimaryAbsorbedInCollimator(G4bool stoppedIn) {primaryAbsorbedInCollimator = stoppedIn;}
51
52private:
54 BDSLinkRunAction* runAction;
55 G4bool debug;
56 G4bool verboseEventBDSIM;
57 G4int verboseEventStart;
58 G4int verboseEventStop;
59 G4int printModulo;
60
61 G4int collIDSamplerLink;
62 G4int collIDSampler;
63 G4int currentEventIndex;
64 G4bool primaryAbsorbedInCollimator;
65};
66
67#endif
68
Process information at the event level for Link to trackers.
BDSOutput * output
Cache of output instance. Not owned by this class.
void SetPrimaryAbsorbedInCollimator(G4bool stoppedIn)
Flag that the primary was absorbed in a collimator - can be done externally to this class.
Simplified run action to hold link hits.
Output base class that defines interface for all output types.
Definition: BDSOutput.hh:73