remage
Simulation framework for HPGe-based experiments
Toggle main menu visibility
Loading...
Searching...
No Matches
RMGTrackingAction.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_TRACKING_ACTION_HH_
17
#define _RMG_TRACKING_ACTION_HH_
18
19
#include <memory>
20
21
#include "G4GenericMessenger.hh"
22
#include "G4UserTrackingAction.hh"
23
24
class
RMGRunAction
;
33
class
RMGTrackingAction :
public
G4UserTrackingAction
{
34
35
public
:
36
37
RMGTrackingAction(
RMGRunAction
*);
38
~RMGTrackingAction() =
default
;
39
40
RMGTrackingAction(RMGTrackingAction
const
&) =
delete
;
41
RMGTrackingAction& operator=(RMGTrackingAction
const
&) =
delete
;
42
RMGTrackingAction(RMGTrackingAction&&) =
delete
;
43
RMGTrackingAction& operator=(RMGTrackingAction&&) =
delete
;
44
46
void
PreUserTrackingAction
(
const
G4Track
*)
override
;
51
void
PostUserTrackingAction
(
const
G4Track
*)
override
;
53
G4TrackingManager
*
GetTrackingManager
() {
return
G4UserTrackingAction::fpTrackingManager; };
54
55
private
:
56
57
RMGRunAction
* fRunAction =
nullptr
;
58
bool
fResetInitialDecayTime =
true
;
59
bool
fHadLongTimeWarning =
false
;
60
double
fMaxRepresentableGlobalTime = -1;
61
62
bool
ResetInitialDecayTime(
const
G4Track
*);
63
64
void
SetLongGlobalTimeUncertaintyWarning(
double
);
65
66
std::unique_ptr<G4GenericMessenger> fMessenger;
67
void
DefineCommands();
68
};
69
70
#endif
71
72
// vim: tabstop=2 shiftwidth=2 expandtab
G4Track
G4TrackingManager
G4UserTrackingAction
RMGRunAction
Per-thread run action managing output files, ntuples and output schemes.
Definition
RMGRunAction.hh:40
RMGTrackingAction::PreUserTrackingAction
void PreUserTrackingAction(const G4Track *) override
Forward the track to all output schemes for pre-tracking bookkeeping.
Definition
RMGTrackingAction.cc:34
RMGTrackingAction::GetTrackingManager
G4TrackingManager * GetTrackingManager()
Access the underlying Geant4 tracking manager (for output-scheme integration).
Definition
RMGTrackingAction.hh:53
RMGTrackingAction::PostUserTrackingAction
void PostUserTrackingAction(const G4Track *) override
Run post-tracking output bookkeeping, reset initial-decay times and emit a one-shot warning when glob...
Definition
RMGTrackingAction.cc:39
include
RMGTrackingAction.hh
Generated by
1.17.0