BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSHitEnergyDepositionExtra.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 BDSHITENERGYDEPOSITIONEXTRA_H
20#define BDSHITENERGYDEPOSITIONEXTRA_H
21
22#include "globals.hh"
23#include "G4THitsCollection.hh"
24#include "G4Allocator.hh"
25
33{
34public:
38 BDSHitEnergyDepositionExtra(G4double preStepKineticEnergy, // pre step point kinetic energy
39 G4double XIn, // global x
40 G4double YIn, // global y
41 G4double ZIn, // global x
42 G4double xIn, // local x
43 G4double yIn, // local y
44 G4double zIn, // local z
45 G4double globalTimeIn, // global time
46 G4int partIDIn, // PDG id - particle type
47 G4int trackID, // Track ID
48 G4int parentID, // Parent ID
49 G4int turnsTakenIn, // turns taken if circular
50 G4double stepLengthIn,
51 G4int beamlineIndexIn = -1,
52 G4int postProcessTypeIn = -1,
53 G4int postProcessSubTypeIn = -1);
54
57
58 inline void* operator new(size_t) ;
59 inline void operator delete(void *aHit);
60
61
62 G4double preStepKineticEnergy;
63
65 G4double X;
66 G4double Y;
67 G4double Z;
69
71 G4double x;
72 G4double y;
73 G4double z;
75
76 G4double globalTime;
77 G4int partID;
78 G4int trackID;
79 G4int parentID;
80 G4int turnsTaken;
81 G4double stepLength;
82 G4int beamlineIndex;
83
86
87private:
90};
91
93extern G4Allocator<BDSHitEnergyDepositionExtra> BDSAllocatorEnergyDepositionExtra;
94
95inline void* BDSHitEnergyDepositionExtra::operator new(size_t)
96{
97 void* aHit;
98 aHit=(void*) BDSAllocatorEnergyDepositionExtra.MallocSingle();
99 return aHit;
100}
101
102inline void BDSHitEnergyDepositionExtra::operator delete(void *aHit)
103{
104 BDSAllocatorEnergyDepositionExtra.FreeSingle((BDSHitEnergyDepositionExtra*) aHit);
105}
106
107#endif
Extra information recorded for a single piece of energy deposition.
G4int postStepProcessType
Process type of post step point.
~BDSHitEnergyDepositionExtra()
Note this should not be inline when we use a G4Allocator.
G4int postStepProcessSubType
Process sub type of post step point.
G4double globalTime
Time since start of event.
BDSHitEnergyDepositionExtra()=delete
Private default constructor.