remage
Simulation framework for HPGe-based experiments
Toggle main menu visibility
Loading...
Searching...
No Matches
RMGVertexOutputScheme.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_VERTEX_OUTPUT_SCHEME_HH_
17
#define _RMG_VERTEX_OUTPUT_SCHEME_HH_
18
19
#include <vector>
20
21
#include "G4AnalysisManager.hh"
22
#include "G4GenericMessenger.hh"
23
24
#include "RMGVOutputScheme.hh"
25
26
class
G4Event
;
34
class
RMGVertexOutputScheme :
public
RMGVOutputScheme {
35
36
public
:
37
38
RMGVertexOutputScheme();
39
41
void
AssignOutputNames
(G4AnalysisManager*)
override
;
43
void
StoreEvent
(
const
G4Event
*)
override
;
44
45
// always store vertex data, so that results are not skewed if events are discarded.
46
[[nodiscard]]
bool
StoreAlways
()
const override
{
return
true
; }
47
48
protected
:
49
50
[[nodiscard]] std::string GetNtupleName(
RMGDetectorMetadata
)
const override
{
51
throw
std::logic_error(
"vertex output scheme has no detectors"
);
52
}
53
54
private
:
55
56
std::unique_ptr<G4GenericMessenger> fMessenger;
57
void
DefineCommands();
58
59
bool
fStorePrimaryParticleInformation =
false
;
60
bool
fStoreSinglePrecisionEnergy =
false
;
61
bool
fStoreSinglePrecisionPosition =
false
;
62
bool
fSkipPrimaryVertexOutput =
false
;
63
};
64
65
#endif
66
67
// vim: tabstop=2 shiftwidth=2 expandtab
G4Event
RMGVertexOutputScheme::StoreAlways
bool StoreAlways() const override
Indicates whether the output scheme always stores event data.
Definition
RMGVertexOutputScheme.hh:46
RMGVertexOutputScheme::AssignOutputNames
void AssignOutputNames(G4AnalysisManager *) override
Register vertex (and, if enabled, primary-particle) ntuple columns.
Definition
RMGVertexOutputScheme.cc:29
RMGVertexOutputScheme::StoreEvent
void StoreEvent(const G4Event *) override
Fill one row per primary vertex of the event.
Definition
RMGVertexOutputScheme.cc:62
RMGDetectorMetadata
Metadata describing one detector instance registered with RMGHardware.
Definition
RMGDetectorMetadata.hh:32
include
RMGVertexOutputScheme.hh
Generated by
1.17.0