BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSHitEnergyDeposition.cc
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#include "BDSHitEnergyDeposition.hh"
19#include "BDSHitEnergyDepositionExtra.hh"
20
21#include "globals.hh" // geant4 types / globals
22#include "G4Allocator.hh"
23
24G4Allocator<BDSHitEnergyDeposition> BDSAllocatorEnergyDeposition;
25
27 G4double sHitIn,
28 G4double weightIn,
29 G4bool storeExtras,
30 G4double preStepKineticEnergy,
31 G4double X,
32 G4double Y,
33 G4double Z,
34 G4double x,
35 G4double y,
36 G4double z,
37 G4double globalTime,
38 G4int partID,
39 G4int trackID,
40 G4int parentID,
41 G4int turnsTaken,
42 G4double stepLength,
43 G4int beamlineIndex,
44 G4int postStepProcessType,
45 G4int postStepProcessSubType):
46 energy(energyIn),
47 sHit(sHitIn),
48 weight(weightIn),
49 extra(nullptr)
50{
51 if (storeExtras)
52 {
53 extra = new BDSHitEnergyDepositionExtra(preStepKineticEnergy,
54 X, Y, Z, x, y, z, globalTime,
55 partID, trackID, parentID,
56 turnsTaken, stepLength,
57 beamlineIndex, postStepProcessType, postStepProcessSubType);
58 }
59}
60
Extra information recorded for a single piece of energy deposition.
virtual ~BDSHitEnergyDeposition()
Note this should not be inline when we use a G4Allocator.