BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSCollimatorJaw.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 BDSCOLLIMATORJAW_H
19#define BDSCOLLIMATORJAW_H
20
21#include "BDSCollimator.hh"
22
23#include "globals.hh" // geant4 types / globals
24#include "G4Material.hh"
25
26class G4Colour;
27class G4LogicalVolume;
28class G4VSolid;
29
37{
38public:
39 BDSCollimatorJaw(const G4String& nameIn,
40 G4double lengthIn,
41 G4double horizontalWidthIn,
42 G4double xHalfGapIn,
43 G4double yHalfHeightIn,
44 G4double xsizeLeftIn,
45 G4double xsizeRightIn,
46 G4double leftJawTiltIn,
47 G4double rightJawTiltIn,
48 G4bool buildLeftJawIn,
49 G4bool buildRightJawIn,
50 G4Material* collimatorMaterialIn,
51 G4Material* vacuumMaterialIn,
52 G4Colour* colourIn = nullptr,
53 const G4String& objectType = "jcol");
54 virtual ~BDSCollimatorJaw();
55
56 inline G4double GetJawTiltLeft() const {return jawTiltLeft;}
57 inline G4double GetJawTiltRight() const {return jawTiltRight;}
58
59protected:
60 void Calculations();
61
64 virtual void CheckParameters() override;
65
67 virtual void Build() override;
68
70 virtual void BuildContainerLogicalVolume() override;
71
73 virtual void BuildInnerCollimator() final {;}
74
75 G4double xSizeLeft;
76 G4double xSizeRight;
77 G4double xHalfGap;
78 G4double jawTiltLeft;
79 G4double jawTiltRight;
80 G4double yHalfHeight;
81 G4bool buildLeftJaw;
84
85 G4double leftJawHalfGap;
86 G4double rightJawHalfGap;
87 G4double leftJawWidth;
88 G4double rightJawWidth;
89 G4double vacuumWidth;
90 G4ThreeVector leftJawPos;
91 G4ThreeVector rightJawPos;
92 G4ThreeVector vacuumOffset;
93 G4LogicalVolume* collimatorLV;
94
95private:
97 BDSCollimatorJaw() = delete;
98
103};
104
105#endif
Collimator with only two jaw and no top bit.
G4bool buildAperture
Build aperture or not.
virtual void Build() override
Override function in BDSCollimator for totally different construction.
G4double xSizeRight
Offset of jaw 2.
virtual void BuildContainerLogicalVolume() override
Override function in BDSCollimator for different size based container.
G4double xSizeLeft
Offset of jaw 1.
BDSCollimatorJaw(BDSCollimatorJaw &)=delete
Assignment and copy constructor not implemented nor used.
BDSCollimatorJaw & operator=(const BDSCollimatorJaw &)=delete
Assignment and copy constructor not implemented nor used.
G4double jawTiltLeft
Tilt of jaw 1 (angle in x-z plane)
G4double jawTiltRight
Tilt of jaw 2 (angle in x-z plane)
void Calculations()
Calculate offsets and sizes.
G4double yHalfHeight
Half height of each jaw.
G4bool buildRightJaw
Build right jaw or not.
virtual void BuildInnerCollimator() final
To fulfill inheritance but unused.
virtual void CheckParameters() override
G4double xHalfGap
Half gap separation between jaws.
G4bool buildLeftJaw
Build left jaw or not.
BDSCollimatorJaw()=delete
Private default constructor to force the use of the supplied one.
G4LogicalVolume * collimatorLV
In case of no aperture, cache this volume for derived classes to place inside.
Base class for collimators with common construction.