BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTrajectoryPointLocal.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 BDSTRAJECTORYPOINTLOCAL_H
19#define BDSTRAJECTORYPOINTLOCAL_H
20#include "G4Allocator.hh"
21#include "G4ThreeVector.hh"
22
30{
31public:
35 BDSTrajectoryPointLocal(G4ThreeVector positionLocalIn,
36 G4ThreeVector momentumLocalIn);
37
39
40 inline void* operator new(size_t) ;
41 inline void operator delete(void *aHit);
42
43 G4ThreeVector positionLocal;
44 G4ThreeVector momentumLocal;
45
46private:
49};
50
51extern G4Allocator<BDSTrajectoryPointLocal> BDSAllocatorTrajectoryPointLocal;
52
53inline void* BDSTrajectoryPointLocal::operator new(size_t)
54{
55 void* aHit;
56 aHit=(void*) BDSAllocatorTrajectoryPointLocal.MallocSingle();
57 return aHit;
58}
59
60inline void BDSTrajectoryPointLocal::operator delete(void *aHit)
61{
62 BDSAllocatorTrajectoryPointLocal.FreeSingle((BDSTrajectoryPointLocal*) aHit);
63}
64
65#endif
Extra information recorded for a single piece of energy deposition.
BDSTrajectoryPointLocal()=delete
Private default constructor.