BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSHitEnergyDepositionGlobal.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSHITENERGYDEPOSITIONGLOBAL_H
20#define BDSHITENERGYDEPOSITIONGLOBAL_H
21
22#include "globals.hh"
23#include "G4VHit.hh"
24#include "G4THitsCollection.hh"
25
32class BDSHitEnergyDepositionGlobal: public G4VHit
33{
34public:
38 BDSHitEnergyDepositionGlobal(G4double totalEnergyIn,
39 G4double preStepKineticEnergyIn,
40 G4double postStepKineticEnergyIn,
41 G4double stepLengthIn,
42 G4double XIn,
43 G4double YIn,
44 G4double ZIn,
45 G4double TIn,
46 G4int pdgIDIn,
47 G4int trackIDIn,
48 G4int parentIDIn,
49 G4double weightIn,
50 G4int turnsTakenIn);
51
54
55 inline G4double TotalEnergyWeighted() const {return weight * totalEnergy;}
56 inline G4double KineticEnergyWeighted() const {return weight * postStepKineticEnergy;}
57
58 G4double totalEnergy;
59 G4double preStepKineticEnergy;
60
65 G4double stepLength;
66
68 G4double X;
69 G4double Y;
70 G4double Z;
71 G4double T;
73
74 G4int pdgID;
75 G4int trackID;
76 G4int parentID;
77 G4double weight;
78 G4int turnsTaken;
79
80private:
83};
84
86
87#endif
Information recorded for a step leaving a volume.
BDSHitEnergyDepositionGlobal()=delete
Private default constructor (not implemented) as the constructor.
virtual ~BDSHitEnergyDepositionGlobal()
Note this should not be inline when we use a G4Allocator.