BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSCollimatorCrystal.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 BDSCOLLIMATORCRYSTAL_H
19#define BDSCOLLIMATORCRYSTAL_H
20
21#include "globals.hh"
22
23#include "BDSAcceleratorComponent.hh"
24
25class BDSBeamPipeInfo;
26class BDSCrystal;
27class BDSCrystalInfo;
28
36{
37public:
38 BDSCollimatorCrystal(const G4String& name,
39 G4double length,
40 BDSBeamPipeInfo* beamPipeInfoIn,
41 BDSCrystalInfo* crystalInfoLeftIn,
42 BDSCrystalInfo* crystalInfoRightIn = nullptr,
43 G4double halfGapLeftIn = 0,
44 G4double halfGapRightIn = 0,
45 G4double angleYAxisLeftIn = 0,
46 G4double angleYAxisRightIn = 0);
47 virtual ~BDSCollimatorCrystal();
48
50 virtual G4String Material() const;
51
52protected:
54 virtual void Build();
55
56private:
59
62
65 void LongitudinalOverlap(const BDSExtent& extCrystal,
66 G4double crystalAngle,
67 const G4String& side) const;
68
70 void RegisterCrystalLVs(const BDSCrystal* crystal) const;
71
74 G4double TransverseOffsetToEdge(const BDSCrystal* crystal,
75 G4double placementAngle,
76 G4bool left) const;
77
80 const G4double halfGapLeft;
81 const G4double halfGapRight;
82 const G4double angleYAxisLeft;
83 const G4double angleYAxisRight;
84 BDSCrystal* crystalLeft;
85 BDSCrystal* crystalRight;
86};
87
88#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.
Holder class for all information required to describe a beam pipe model.
A piece of vacuum beam pipe with a crystal for channelling.
void RegisterCrystalLVs(const BDSCrystal *crystal) const
Register logical volumes in crystals and collimator sets in accelerator model.
virtual void BuildContainerLogicalVolume()
Void function to fulfill BDSAcceleratorComponent requirements.
BDSCrystalInfo * crystalInfoRight
Model associated with right crystal.
BDSCollimatorCrystal()=delete
No default constructor.
virtual G4String Material() const
Override base class version and return crystal material.
BDSCrystalInfo * crystalInfoLeft
Model associated with left crystal.
virtual void Build()
Construct geometry.
G4double TransverseOffsetToEdge(const BDSCrystal *crystal, G4double placementAngle, G4bool left) const
void LongitudinalOverlap(const BDSExtent &extCrystal, G4double crystalAngle, const G4String &side) const
Holder for all information required to create a crystal.
An object for both a crystal from a factory.
Definition BDSCrystal.hh:39
Holder for +- extents in 3 dimensions.
Definition BDSExtent.hh:38