BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTipCollimator.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
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 BDSTIPCOLLIMATOR_H
20#define BDSTIPCOLLIMATOR_H
21
22#include "BDSAcceleratorComponent.hh"
23#include "globals.hh" // geant4 types / globals
24
25class G4Colour;
26class G4Material;
27class G4UserLimits;
28class G4VSolid;
29
37{
38public:
39 BDSTipCollimator(const G4String& name,
40 G4double length,
41 G4double horizontalWidth,
42 const G4String& type,
43 G4Material* collimatorMaterial,
44 G4Material* collimatorTipMaterial,
45 G4Material* vacuumMaterial,
46 G4double xApertureIn = 0,
47 G4double yApertureIn = 0,
48 G4double xApertureOutIn = 0,
49 G4double yApertureOutIn = 0,
50 G4Colour* colourIn = nullptr,
51 G4Colour* tipColourIn = nullptr,
52 G4double tipThicknessIn = 0,
53 G4bool circularOuterIn = false);
54 virtual ~BDSTipCollimator();
55
57 virtual G4String Material() const;
58 virtual G4double XApertureIn() const {return xAperture;}
59 virtual G4double XApertureOut() const {return xApertureOut;}
60 virtual G4double YApertureIn() const {return yAperture;}
61 virtual G4double YApertureOut() const {return yApertureOut;}
63
64 virtual void SetMinimumKineticEnergy(G4double minimimumKineticEnergyIn) {minKineticEnergy = minimimumKineticEnergyIn;}
65
66protected:
69 virtual void CheckParameters();
70
71 virtual void Build();
72
73 virtual void BuildContainerLogicalVolume();
74
78 virtual void BuildInnerCollimator() = 0;
79
81 G4UserLimits* CollimatorUserLimits();
82
84 G4VSolid* collimatorSolid;
85 G4VSolid* innerSolid;
86 G4VSolid* vacuumSolid;
88 G4double horizontalWidth;
89 G4Material* collimatorMaterial;
91 G4Material* vacuumMaterial;
92 G4double xAperture;
93 G4double yAperture;
94 G4double xApertureOut;
95 G4double yApertureOut;
96 G4bool tapered;
97 G4Colour* colour;
98 G4Colour* tipColour;
99 G4double tipThickness;
102private:
105
110};
111
112#endif
Abstract class that represents a component of an accelerator.
const G4String name
Const protected member variable that may not be changed by derived classes.
const G4String type
Const protected member variable that may not be changed by derived classes.
Base class for collimators with a bulk material and a tip of a different material.
G4double xApertureOut
Aperture at exit in x dimension.
G4double yAperture
Aperture at entrance in y dimension.
virtual void CheckParameters()
virtual G4double YApertureOut() const
Accessor.
G4VSolid * innerSolid
Geometrical objects:
BDSTipCollimator(BDSTipCollimator &)=delete
Assignment and copy constructor not implemented nor used.
G4double minKineticEnergy
Optional minimum kinetic energy for collimator materials.
G4double horizontalWidth
Horizontal width.
G4Colour * tipColour
Colour of collimator tip.
BDSTipCollimator & operator=(const BDSTipCollimator &)=delete
Assignment and copy constructor not implemented nor used.
G4VSolid * collimatorSolid
Geometrical objects:
virtual void Build()
virtual G4String Material() const
Accessor.
G4double yApertureOut
Aperture at exit in y dimension.
G4Material * collimatorTipMaterial
Tip material.
G4Material * vacuumMaterial
Vacuum material.
G4Colour * colour
Colour of collimator.
virtual G4double XApertureOut() const
Accessor.
G4Material * collimatorMaterial
Material.
virtual G4double XApertureIn() const
Accessor.
BDSTipCollimator()=delete
Private default constructor to force the use of the supplied one.
G4double tipThickness
Thickness of the collimator tip.
virtual void BuildContainerLogicalVolume()
G4UserLimits * CollimatorUserLimits()
Return either default user limits or custom ones based on optional minimumKineticEnergy.
virtual void SetMinimumKineticEnergy(G4double minimimumKineticEnergyIn)
G4double xAperture
Aperture at entrance in x dimension.
virtual G4double YApertureIn() const
Accessor.
virtual void BuildInnerCollimator()=0
G4bool tapered
Flag for tapered collimator.
G4VSolid * vacuumSolid
Geometrical objects:
G4bool circularOuter
Aperture type of the collimator.