remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGVolumeDistanceStacker.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_VOLUME_DISTANCE_STACKER_HH_
17#define _RMG_VOLUME_DISTANCE_STACKER_HH_
18
19#include <memory>
20#include <optional>
21#include <string>
22
23#include "G4GenericMessenger.hh"
24
25#include "RMGVOutputScheme.hh"
26
28class RMGVolumeDistanceStacker : public RMGVOutputScheme {
29
30 public:
31
32 RMGVolumeDistanceStacker();
33
37 std::optional<G4ClassificationOfNewTrack> StackingActionClassify(const G4Track*, int) override;
38
40 void SetVolumeSafety(double safety) { fVolumeSafety = safety; }
41
43 void SetVolumeName(std::string volume) { fVolumeName = volume; }
44
45 private:
46
47 std::unique_ptr<G4GenericMessenger> fMessenger;
48 void DefineCommands();
49
50 double fVolumeSafety = -1;
51 std::string fVolumeName;
52};
53
54#endif
55
56// vim: tabstop=2 shiftwidth=2 expandtab
void SetVolumeName(std::string volume)
Set the volume name in which to stack e-/e+ tracks.
Definition RMGVolumeDistanceStacker.hh:43
void SetVolumeSafety(double safety)
Set the minimum distance to any other volume for this track to be stacked.
Definition RMGVolumeDistanceStacker.hh:40
std::optional< G4ClassificationOfNewTrack > StackingActionClassify(const G4Track *, int) override
Wraps G4UserStackingAction::StackingActionClassify.
Definition RMGVolumeDistanceStacker.cc:29