BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLinkEventAction.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSLINKEVENTACTION_H
19#define BDSLINKEVENTACTION_H
20
21#include "G4Types.hh"
22#include "G4UserEventAction.hh"
23
25class BDSOutput;
26class G4Event;
27
34class BDSLinkEventAction: public G4UserEventAction
35{
36public:
37 BDSLinkEventAction() = delete;
39 BDSLinkRunAction* runActionIn,
40 G4bool debugIn = false);
41 virtual ~BDSLinkEventAction();
42
43 virtual void BeginOfEventAction(const G4Event* evt);
44 virtual void EndOfEventAction(const G4Event* evt);
45
46 G4int CurrentEventIndex() const {return currentEventIndex;}
47
49 void SetPrimaryAbsorbedInCollimator(G4bool stoppedIn) {primaryAbsorbedInCollimator = stoppedIn;}
50
51private:
53 BDSLinkRunAction* runAction;
54 G4bool debug;
55 G4bool verboseEventBDSIM;
56 G4int verboseEventStart;
57 G4int verboseEventStop;
58 G4int printModulo;
59
60 G4int collIDSamplerLink;
61 G4int collIDSampler;
62 G4int currentEventIndex;
63 G4bool primaryAbsorbedInCollimator;
64};
65
66#endif
67
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:72