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) 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 BDSTRAJECTORYPOINTHIT_H
19#define BDSTRAJECTORYPOINTHIT_H
20#include "BDSTrajectoryPoint.hh"
21#include "G4Types.hh"
22
23class BDSTrajectory;
24
35{
36public:
37 BDSTrajectoryPointHit() = delete;
38 BDSTrajectoryPointHit(const BDSTrajectoryPointHit& other) = delete;
39
40 BDSTrajectoryPointHit(const BDSTrajectory* trajectory,
41 const BDSTrajectoryPoint* pointIn);
42
43 BDSTrajectoryPointHit(G4int pdgIDIn,
44 G4int trackIDIn,
45 G4int parentIDIn,
46 const BDSTrajectoryPoint* pointIn);
47
48 ~BDSTrajectoryPointHit(){;} // point deleted elsewhere
49
50 // logic taken from BDSExtent - implement only one operator; rest come for free
52 inline G4bool operator< (const BDSTrajectoryPointHit& other) const;
53 inline G4bool operator> (const BDSTrajectoryPointHit& other) const {return other < (*this);}
54 inline G4bool operator<=(const BDSTrajectoryPointHit& other) const {return !((*this) > other);}
55 inline G4bool operator>=(const BDSTrajectoryPointHit& other) const {return !((*this) < other);}
57
58 G4int pdgID;
59 G4int trackID;
60 G4int parentID;
61 const BDSTrajectoryPoint* point;
62};
63
65{
66 return point->operator<(*other.point);
67}
68
69#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.