BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTrajectoryPointIon.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 BDSTRAJECTORYPOINTION_H
19#define BDSTRAJECTORYPOINTION_H
20#include "globals.hh"
21#include "G4Allocator.hh"
22
30{
31public:
35 BDSTrajectoryPointIon(G4bool isIonIn,
36 G4int ionAIn,
37 G4int ionZIn,
38 G4int nElectronsIn);
39
41
42 inline void* operator new(size_t) ;
43 inline void operator delete(void *aHit);
44
45 G4bool isIon;
46 G4int ionA;
47 G4int ionZ;
48 G4int nElectrons;
49
50private:
53};
54
55extern G4Allocator<BDSTrajectoryPointIon> BDSAllocatorTrajectoryPointIon;
56
57inline void* BDSTrajectoryPointIon::operator new(size_t)
58{
59 void* aHit;
60 aHit=(void*) BDSAllocatorTrajectoryPointIon.MallocSingle();
61 return aHit;
62}
63
64inline void BDSTrajectoryPointIon::operator delete(void *aHit)
65{
66 BDSAllocatorTrajectoryPointIon.FreeSingle((BDSTrajectoryPointIon*) aHit);
67}
68
69#endif
Extra information recorded for a single piece of energy deposition.
BDSTrajectoryPointIon()=delete
Private default constructor.