remage
Simulation framework for HPGe-based experiments
Toggle main menu visibility
Loading...
Searching...
No Matches
RMGGeometryCheckOutputScheme.hh
1
// Copyright (C) 2025 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_GEOMETRY_CHECK_OUTPUT_SCHEME_HH_
17
#define _RMG_GEOMETRY_CHECK_OUTPUT_SCHEME_HH_
18
19
#include <vector>
20
21
#include "G4VPhysicalVolume.hh"
22
#include "G4VUserTrackInformation.hh"
23
24
#include "RMGVOutputScheme.hh"
25
26
class
G4Event
;
35
class
RMGGeometryCheckOutputScheme :
public
RMGVOutputScheme {
36
37
public
:
38
39
RMGGeometryCheckOutputScheme() =
default
;
40
42
void
SteppingAction
(
const
G4Step
*)
override
;
44
void
TrackingActionPre
(
const
G4Track
* aTrack)
override
;
46
void
TrackingActionPost
(
const
G4Track
* aTrack)
override
;
47
48
private
:
49
50
[[nodiscard]] std::string VolString(
const
std::vector<G4VPhysicalVolume*> vols)
const
{
51
std::string text;
52
for
(
const
auto
& s : vols) { text += VolName(s) +
' '
; }
53
return
text;
54
};
55
[[nodiscard]] std::string VolName(
G4VPhysicalVolume
* vol)
const
{
56
return
vol ? vol->GetName() :
"(null)"
;
57
}
58
59
class
GeantinoUserTrackInformation :
public
G4VUserTrackInformation
{
60
61
public
:
62
63
std::vector<G4VPhysicalVolume*> fVolumeStack;
64
std::vector<G4VPhysicalVolume*> fSteps;
65
bool
fIsOutside =
false
;
66
};
67
};
68
69
#endif
70
71
// vim: tabstop=2 shiftwidth=2 expandtab
G4Event
G4Step
G4Track
G4VPhysicalVolume
G4VUserTrackInformation
RMGGeometryCheckOutputScheme::TrackingActionPost
void TrackingActionPost(const G4Track *aTrack) override
Log the volume sequence traversed by the geantino and flag overlaps.
Definition
RMGGeometryCheckOutputScheme.cc:111
RMGGeometryCheckOutputScheme::TrackingActionPre
void TrackingActionPre(const G4Track *aTrack) override
Attach a fresh GeantinoUserTrackInformation to the geantino track.
Definition
RMGGeometryCheckOutputScheme.cc:100
RMGGeometryCheckOutputScheme::SteppingAction
void SteppingAction(const G4Step *) override
Record the physical volume traversed by the geantino in this step.
Definition
RMGGeometryCheckOutputScheme.cc:31
include
RMGGeometryCheckOutputScheme.hh
Generated by
1.17.0