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) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSSDCOLLIMATOR_H
20#define BDSSDCOLLIMATOR_H
21
22#include "BDSHitCollimator.hh"
23#include "BDSSensitiveDetector.hh"
24
25#include "globals.hh" // geant4 types / globals
26#include "G4String.hh"
27
28#include <map>
29#include <vector>
30
33
34class G4Step;
35class G4HCofThisEvent;
36class G4TouchableHistory;
37class G4VHit;
38
52{
53public:
55 explicit BDSSDCollimator(G4String name);
56
61
62 virtual ~BDSSDCollimator();
63
66 virtual void Initialize(G4HCofThisEvent* HCE) override;
67
70 virtual G4bool ProcessHits(G4Step* aStep,
71 G4TouchableHistory* rOHist) override;
72
75 virtual G4bool ProcessHitsOrdered(G4Step* step,
76 G4TouchableHistory* rOHist,
77 const std::vector<G4VHit*>& hits) override;
78
80 virtual G4VHit* last() const override;
81
82private:
83 inline bool IsIon(const int& pdgID) const {return pdgID > 1000000000;}
84
87
90
94 G4int itsHCID;
95
98
102 std::map<BDSBeamline*, std::map<G4int, G4int> > mapping;
103};
104
105#endif
106
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.