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) 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 BDSHITENERGYDEPOSITIONEXTRA_H
19#define BDSHITENERGYDEPOSITIONEXTRA_H
20
21#include "globals.hh"
22#include "G4THitsCollection.hh"
23#include "G4Allocator.hh"
24
32{
33public:
37 BDSHitEnergyDepositionExtra(G4double preStepKineticEnergy, // pre step point kinetic energy
38 G4double XIn, // global x
39 G4double YIn, // global y
40 G4double ZIn, // global x
41 G4double xIn, // local x
42 G4double yIn, // local y
43 G4double zIn, // local z
44 G4double globalTimeIn, // global time
45 G4int partIDIn, // PDG id - particle type
46 G4int trackID, // Track ID
47 G4int parentID, // Parent ID
48 G4int turnsTakenIn, // turns taken if circular
49 G4double stepLengthIn,
50 G4int beamlineIndexIn = -1,
51 G4int postProcessTypeIn = -1,
52 G4int postProcessSubTypeIn = -1);
53
56
57 inline void* operator new(size_t) ;
58 inline void operator delete(void *aHit);
59
60
61 G4double preStepKineticEnergy;
62
64 G4double X;
65 G4double Y;
66 G4double Z;
68
70 G4double x;
71 G4double y;
72 G4double z;
74
75 G4double globalTime;
76 G4int partID;
77 G4int trackID;
78 G4int parentID;
79 G4int turnsTaken;
80 G4double stepLength;
81 G4int beamlineIndex;
82
85
86private:
89};
90
92extern G4Allocator<BDSHitEnergyDepositionExtra> BDSAllocatorEnergyDepositionExtra;
93
94inline void* BDSHitEnergyDepositionExtra::operator new(size_t)
95{
96 void* aHit;
97 aHit=(void*) BDSAllocatorEnergyDepositionExtra.MallocSingle();
98 return aHit;
99}
100
101inline void BDSHitEnergyDepositionExtra::operator delete(void *aHit)
102{
103 BDSAllocatorEnergyDepositionExtra.FreeSingle((BDSHitEnergyDepositionExtra*) aHit);
104}
105
106#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.