remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGScintillatorDetector.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_SCINTILLATOR_DETECTOR_HH_
17#define _RMG_SCINTILLATOR_DETECTOR_HH_
18
19#include <memory>
20#include <string>
21
22#include "G4Allocator.hh"
23#include "G4THitsCollection.hh"
24#include "G4ThreeVector.hh"
25#include "G4VHit.hh"
26#include "G4VSensitiveDetector.hh"
27
28#include "RMGDetectorHit.hh"
29
30
31class G4Step;
32class G4HCofThisEvent;
40class RMGScintillatorDetector : public G4VSensitiveDetector {
41
42 public:
43
44 RMGScintillatorDetector();
45 ~RMGScintillatorDetector() = default;
46
47 RMGScintillatorDetector(RMGScintillatorDetector const&) = delete;
48 RMGScintillatorDetector& operator=(RMGScintillatorDetector const&) = delete;
49 RMGScintillatorDetector(RMGScintillatorDetector&&) = delete;
50 RMGScintillatorDetector& operator=(RMGScintillatorDetector&&) = delete;
51
53 void Initialize(G4HCofThisEvent* hit_coll) override;
55 bool ProcessHits(G4Step* step, G4TouchableHistory* history) override;
56 void EndOfEvent(G4HCofThisEvent* hit_coll) override;
57
58 private:
59
60 RMGDetectorHitsCollection* fHitsCollection = nullptr;
61};
62
63
64#endif
65
66// vim: tabstop=2 shiftwidth=2 expandtab
bool ProcessHits(G4Step *step, G4TouchableHistory *history) override
Build an RMGDetectorHit from step and add it to the hits collection.
Definition RMGScintillatorDetector.cc:55
void Initialize(G4HCofThisEvent *hit_coll) override
Allocate and register the hit collection for the current event.
Definition RMGScintillatorDetector.cc:39