BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTrajectoryPointHit.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 BDSTRAJECTORYPOINTHIT_H
20#define BDSTRAJECTORYPOINTHIT_H
21#include "BDSTrajectoryPoint.hh"
22#include "G4Types.hh"
23
24class BDSTrajectory;
25
36{
37public:
38 BDSTrajectoryPointHit() = delete;
39 BDSTrajectoryPointHit(const BDSTrajectoryPointHit& other) = delete;
40
41 BDSTrajectoryPointHit(const BDSTrajectory* trajectory,
42 const BDSTrajectoryPoint* pointIn);
43
44 BDSTrajectoryPointHit(G4int pdgIDIn,
45 G4int trackIDIn,
46 G4int parentIDIn,
47 const BDSTrajectoryPoint* pointIn);
48
49 ~BDSTrajectoryPointHit(){;} // point deleted elsewhere
50
51 // logic taken from BDSExtent - implement only one operator; rest come for free
53 inline G4bool operator< (const BDSTrajectoryPointHit& other) const;
54 inline G4bool operator> (const BDSTrajectoryPointHit& other) const {return other < (*this);}
55 inline G4bool operator<=(const BDSTrajectoryPointHit& other) const {return !((*this) > other);}
56 inline G4bool operator>=(const BDSTrajectoryPointHit& other) const {return !((*this) < other);}
58
59 G4int pdgID;
60 G4int trackID;
61 G4int parentID;
62 const BDSTrajectoryPoint* point;
63};
64
66{
67 return point->operator<(*other.point);
68}
69
70#endif
A summary trajectory object of a loss point.
G4bool operator>=(const BDSTrajectoryPointHit &other) const
Comparison operator.
G4bool operator>(const BDSTrajectoryPointHit &other) const
Comparison operator.
G4bool operator<=(const BDSTrajectoryPointHit &other) const
Comparison operator.
G4bool operator<(const BDSTrajectoryPointHit &other) const
Comparison operator.
A Point in a trajectory with extra information.
Trajectory information from track including last scatter etc.