remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGSteppingAction.hh
1// Copyright (C) 2022 Luigi Pertoldi <https://orcid.org/0000-0002-0467-2571>
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_STEPPING_ACTION_HH_
17#define _RMG_STEPPING_ACTION_HH_
18
19#include <memory>
20
21#include "G4GenericMessenger.hh"
22#include "G4UserSteppingAction.hh"
23
24class G4Step;
25class RMGRunAction;
34class RMGSteppingAction : public G4UserSteppingAction {
35
36 public:
37
38 RMGSteppingAction(RMGRunAction*);
39 ~RMGSteppingAction() = default;
40
41 RMGSteppingAction(RMGSteppingAction const&) = delete;
42 RMGSteppingAction& operator=(RMGSteppingAction const&) = delete;
43 RMGSteppingAction(RMGSteppingAction&&) = delete;
44 RMGSteppingAction& operator=(RMGSteppingAction&&) = delete;
45
49 void UserSteppingAction(const G4Step*) override;
50
58 void SetDaughterKillLifetime(double max_lifetime);
59
60 private:
61
62 RMGRunAction* fRunAction;
63
64 bool fSkipTracking = false;
65 bool fKillSecondaries = false;
66 double fDaughterKillLifetime = -1;
67
68 std::unique_ptr<G4GenericMessenger> fMessenger;
69 void DefineCommands();
70};
71
72#endif
73
74// vim: tabstop=2 shiftwidth=2 expandtab
Per-thread run action managing output files, ntuples and output schemes.
Definition RMGRunAction.hh:40
void SetDaughterKillLifetime(double max_lifetime)
Kill daughter nuclei whose PDG lifetime exceeds max_lifetime.
Definition RMGSteppingAction.cc:73
void UserSteppingAction(const G4Step *) override
Forward the step to all output schemes and apply tracking-control of long-lived isotopes.
Definition RMGSteppingAction.cc:33