BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSSDCollimator.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSSDCOLLIMATOR_H
19#define BDSSDCOLLIMATOR_H
20
21#include "BDSHitCollimator.hh"
22#include "BDSSensitiveDetector.hh"
23
24#include "globals.hh" // geant4 types / globals
25#include "G4String.hh"
26
27#include <map>
28#include <vector>
29
32
33class G4Step;
34class G4HCofThisEvent;
35class G4TouchableHistory;
36class G4VHit;
37
51{
52public:
54 explicit BDSSDCollimator(G4String name);
55
60
61 virtual ~BDSSDCollimator();
62
65 virtual void Initialize(G4HCofThisEvent* HCE) override;
66
69 virtual G4bool ProcessHits(G4Step* aStep,
70 G4TouchableHistory* rOHist) override;
71
74 virtual G4bool ProcessHitsOrdered(G4Step* step,
75 G4TouchableHistory* rOHist,
76 const std::vector<G4VHit*>& hits) override;
77
79 virtual G4VHit* last() const override;
80
81private:
82 inline bool IsIon(const int& pdgID) const {return pdgID > 1000000000;}
83
86
89
93 G4int itsHCID;
94
97
101 std::map<BDSBeamline*, std::map<G4int, G4int> > mapping;
102};
103
104#endif
105
Extra G4Navigator to get coordinate transforms.
Information recorded for a single piece of energy deposition.
The sensitive detector class that provides sensitivity to collimators instances.
BDSHitsCollectionCollimator * collimatorCollection
The hits collection for this sensitive detector class that's owned by each instance.
virtual void Initialize(G4HCofThisEvent *HCE) override
BDSSDCollimator(BDSSDCollimator &)=delete
Assignment and copy constructor not implemented nor used.
virtual G4VHit * last() const override
Return the last collimator hit.
virtual G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *rOHist) override
BDSAuxiliaryNavigator * auxNavigator
An auxiliary navigator object for coordinate transforms.
virtual G4bool ProcessHitsOrdered(G4Step *step, G4TouchableHistory *rOHist, const std::vector< G4VHit * > &hits) override
BDSSDCollimator & operator=(const BDSSDCollimator &)=delete
Assignment and copy constructor not implemented nor used.
G4String itsCollectionName
The name of the hits collection that's created and registered.
std::map< BDSBeamline *, std::map< G4int, G4int > > mapping
Virtual class to define interface for ordered multi-sensitive detector.