remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGStackingAction.hh
1// Copyright (C) 2024 Manuel Huber <https://orcid.org/0009-0000-5212-2999>
2//
3// This program is free software: you can redistribute it and/or modify it under
4// the terms of the GNU Lesser General Public License as published by the Free
5// Software Foundation, either version 3 of the License, or (at your option) any
6// later version.
7//
8// This program is distributed in the hope that it will be useful, but WITHOUT
9// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11// details.
12//
13// You should have received a copy of the GNU Lesser General Public License
14// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16#ifndef _RMG_STACKING_ACTION_HH_
17#define _RMG_STACKING_ACTION_HH_
18
19#include "G4UserStackingAction.hh"
20
21class G4Track;
22class RMGRunAction;
29class RMGStackingAction : public G4UserStackingAction {
30
31 public:
32
33 RMGStackingAction(RMGRunAction*);
34 ~RMGStackingAction() = default;
35
36 RMGStackingAction(RMGStackingAction const&) = delete;
37 RMGStackingAction& operator=(RMGStackingAction const&) = delete;
38 RMGStackingAction(RMGStackingAction&&) = delete;
39 RMGStackingAction& operator=(RMGStackingAction&&) = delete;
40
46 G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack) override;
48 void NewStage() override;
50 void PrepareNewEvent() override;
51
52 private:
53
54 int fStage = 0;
55 RMGRunAction* fRunAction = nullptr;
56};
57
58#endif
59
60// vim: tabstop=2 shiftwidth=2 expandtab
Per-thread run action managing output files, ntuples and output schemes.
Definition RMGRunAction.hh:40
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack) override
Classify a newly created track by consulting the registered output schemes.
Definition RMGStackingAction.cc:29
void PrepareNewEvent() override
Reset the stage counter before tracking a new event.
Definition RMGStackingAction.cc:67
void NewStage() override
Advance to the next stacking stage; called when the current stack is empty.
Definition RMGStackingAction.cc:46