BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
bdsim
include
BDSHitSamplerCylinder.hh
1
/*
2
Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3
University of London 2001 - 2023.
4
5
This file is part of BDSIM.
6
7
BDSIM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published
9
by the Free Software Foundation version 3 of the License.
10
11
BDSIM is distributed in the hope that it will be useful, but
12
WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef BDSHITSAMPLERCYLINDER_H
20
#define BDSHITSAMPLERCYLINDER_H
21
#include "BDSParticleCoordsCylindrical.hh"
22
23
#include "globals.hh"
24
#include "G4VHit.hh"
25
#include "G4THitsCollection.hh"
26
#include "G4Allocator.hh"
27
34
class
BDSHitSamplerCylinder
:
public
G4VHit
35
{
36
public
:
37
BDSHitSamplerCylinder
() =
delete
;
38
BDSHitSamplerCylinder
(G4int samplerIDIn,
39
const
BDSParticleCoordsCylindrical
& coordsIn,
40
G4double totalEnergyIn,
41
G4double weightIn,
42
G4double SIn,
43
G4double momentumIn,
44
G4double massIn,
45
G4double chargeIn,
46
G4double rigidityIn,
47
G4int pdgIDIn,
48
G4int parentIDIn,
49
G4int trackIDIn,
50
G4int turnsTakenIn,
51
G4int beamlineIndexIn,
52
G4int nElectronsIn = 0);
53
55
virtual
~BDSHitSamplerCylinder
();
56
57
inline
void
*
operator
new
(size_t);
58
inline
void
operator
delete
(
void
*aHit);
59
60
G4int samplerID;
61
BDSParticleCoordsCylindrical
coords;
62
G4double totalEnergy;
63
G4double weight;
64
G4double S;
65
G4double momentum;
66
G4double mass;
67
G4double
charge
;
68
G4double rigidity;
69
G4int pdgID;
70
G4int parentID;
71
G4int trackID;
72
G4int turnsTaken;
73
G4int beamlineIndex;
74
G4int
nElectrons
;
75
};
76
77
typedef
G4THitsCollection<BDSHitSamplerCylinder>
BDSHitsCollectionSamplerCylinder
;
78
extern
G4Allocator<BDSHitSamplerCylinder> BDSAllocatorSamplerCylinder;
79
80
inline
void
* BDSHitSamplerCylinder::operator
new
(size_t)
81
{
82
void
* aHit;
83
aHit=(
void
*) BDSAllocatorSamplerCylinder.MallocSingle();
84
return
aHit;
85
}
86
87
inline
void
BDSHitSamplerCylinder::operator
delete
(
void
*aHit)
88
{
89
BDSAllocatorSamplerCylinder.FreeSingle((
BDSHitSamplerCylinder
*) aHit);
90
}
91
92
#endif
BDSHitSamplerCylinder
The information recorded from a particle impacting a sampler.
Definition:
BDSHitSamplerCylinder.hh:35
BDSHitSamplerCylinder::nElectrons
G4int nElectrons
Can only get this at inspection time so include here.
Definition:
BDSHitSamplerCylinder.hh:74
BDSHitSamplerCylinder::BDSHitSamplerCylinder
BDSHitSamplerCylinder()=delete
No default constructor.
BDSHitSamplerCylinder::charge
G4double charge
Double as g4 uses charge as a double.
Definition:
BDSHitSamplerCylinder.hh:67
BDSHitSamplerCylinder::~BDSHitSamplerCylinder
virtual ~BDSHitSamplerCylinder()
Note this should not be inline when we use a G4Allocator.
Definition:
BDSHitSamplerCylinder.cc:59
BDSParticleCoordsCylindrical
A set of cylindrical particle coordinates.
Definition:
BDSParticleCoordsCylindrical.hh:35
G4THitsCollection
Definition:
BDSOutput.hh:35
Generated on Mon Aug 14 2023 13:49:30 for BDSIM by
1.9.6