BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTrajectoryPointLink.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 BDSTRAJECTORYPOINTLINK_H
19#define BDSTRAJECTORYPOINTLINK_H
20#include "globals.hh"
21#include "G4Allocator.hh"
22
30{
31public:
35 BDSTrajectoryPointLink(G4int chargeIn,
36 G4int turnsTakenIn,
37 G4double massIn,
38 G4double rigidityIn);
39
41
42 inline void* operator new(size_t) ;
43 inline void operator delete(void *aHit);
44
45 G4int charge;
46 G4int turnsTaken;
47 G4double mass;
48 G4double rigidity;
49
50private:
53};
54
55extern G4Allocator<BDSTrajectoryPointLink> BDSAllocatorTrajectoryPointLink;
56
57inline void* BDSTrajectoryPointLink::operator new(size_t)
58{
59 void* aHit;
60 aHit=(void*) BDSAllocatorTrajectoryPointLink.MallocSingle();
61 return aHit;
62}
63
64inline void BDSTrajectoryPointLink::operator delete(void *aHit)
65{
66 BDSAllocatorTrajectoryPointLink.FreeSingle((BDSTrajectoryPointLink*) aHit);
67}
68
69#endif