BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSHitApertureImpact.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 BDSHITAPERTUREIMPACT_H
19#define BDSHITAPERTUREIMPACT_H
20
21#include "globals.hh"
22#include "G4VHit.hh"
23#include "G4ThreeVector.hh"
24#include "G4THitsCollection.hh"
25#include "G4Allocator.hh"
26
35class BDSHitApertureImpact: public G4VHit
36{
37public:
39 BDSHitApertureImpact(G4double totalEnergyIn,
40 G4double preStepKineticEnergyIn,
41 G4double SIn,
42 G4double xIn,
43 G4double yIn,
44 G4double pxIn,
45 G4double pyIn,
46 G4double weightIn,
47 G4double globalTimeIn,
48 G4int partIDIn,
49 G4int trackIDIn,
50 G4int parentIDIn,
51 G4int turnsTakenIn,
52 G4int beamlineIndexIn,
53 G4int nElectronsIn);
54
56 virtual ~BDSHitApertureImpact();
57
58 inline void* operator new(size_t);
59 inline void operator delete(void *aHit);
60
61 G4double totalEnergy;
62 G4double preStepKineticEnergy;
63 G4double S;
64 G4double x;
65 G4double y;
66 G4double xp;
67 G4double yp;
68 G4double weight;
69 G4double globalTime;
70 G4int partID;
71 G4int trackID;
72 G4int parentID;
73 G4int turnsTaken;
74 G4int beamlineIndex;
75 G4int nElectrons;
76};
77
79extern G4Allocator<BDSHitApertureImpact> BDSAllocatorApertureImpacts;
80
81inline void* BDSHitApertureImpact::operator new(size_t)
82{
83 void* aHit;
84 aHit=(void*) BDSAllocatorApertureImpacts.MallocSingle();
85 return aHit;
86}
87
88inline void BDSHitApertureImpact::operator delete(void *aHit)
89{
90 BDSAllocatorApertureImpacts.FreeSingle((BDSHitApertureImpact*) aHit);
91}
92
93#endif
Snapshot of information for particle passing through a collimator.
virtual ~BDSHitApertureImpact()
Note this should not be inline when we use a G4Allocator.