BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSScreenLayer.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 BDSSCREENLAYER_H
19#define BDSSCREENLAYER_H
20
21#include "globals.hh"
22#include "G4Colour.hh"
23#include "G4ThreeVector.hh"
24
25class G4LogicalVolume;
26class G4PVPlacement;
27class G4VSolid;
28
36{
37public:
38 BDSScreenLayer(G4ThreeVector size, // full widths in each dimension
39 G4String name,
40 G4String material,
41 G4double grooveWidth,
42 G4double grooveSpatialFrequency);
43 virtual ~BDSScreenLayer(){;}
45 inline G4LogicalVolume* GetLog() const {return log;}
46 inline G4String GetName() const {return name;}
47 inline G4ThreeVector GetSize() const {return size;}
48 inline G4PVPlacement* GetPhys() const {return phys;}
50 void SetPhys(G4PVPlacement* phys);
51 void SetColour(G4Colour col);
52 /*
53 void backInternalMirror();
54 void frontInternalMirror();
55 */
57 void AssignSampler();
58
59 //Get the AssignSampler ID.
60 G4int GetSamplerID() const {return samplerID;}
61
62protected:
65 G4ThreeVector size;
66 G4String name;
67 G4LogicalVolume* log = nullptr;
68 G4PVPlacement* phys = nullptr;
69 G4VSolid* solid = nullptr;
70
71private:
72 /*
73 class InternalMirror
74 {
75 public:
76 InternalMirror(G4int varside,
77 G4ThreeVector size,
78 G4String material,
79 G4LogicalVolume* motherLog,
80 G4PVPlacement* motherPhys);
81 ~InternalMirror();
82 void geom();
83 void compute();
84 void place();
85 void optical();
86 enum sides{BACK, FRONT};
87
88 private:
89 InternalMirror();
90 G4int side;
91 G4VSolid* solid;
92 G4LogicalVolume* log;
93 G4PVPlacement* phys;
94 G4ThreeVector motherSize;
95 G4String motherMaterial;
96 G4LogicalVolume* motherLog;
97 G4PVPlacement* motherPhys;
98 G4double thickness;
99 G4double pos;
100 };
101
102 InternalMirror* internalMirror = nullptr;
103 */
104 virtual void Build();
105 void BuildGroove();
106 virtual void BuildScreen();
107 void SetVisAttributes();
108 void CutGroove(G4double xPos);
109 void CutGrooves();
110 G4String material;
111 G4String logName;
112 G4String solidName;
113 // Geometrical objects:
114 G4LogicalVolume* grooveLog = nullptr;
115 G4VSolid* grooveSolid = nullptr;
116 G4double grooveWidth = 0.0;
117 G4double grooveSpatialFrequency = 0.0;
119 G4int nGrooves = 0;
120 G4Colour colour;
121 G4int samplerID = 0;
122};
123
124#endif
An individual screen layer for a multilayer screen.
G4LogicalVolume * GetLog() const
Accessor.
void AssignSampler()
Make this plane a sampling plane.
G4int nGrooves
Counter for the number of grooves etched into the screen.
G4String GetName() const
Accessor.
BDSScreenLayer()
Used in modules/AWAKE/include/BDSMultiFacetLayer.hh.
G4ThreeVector GetSize() const
Accessor.
G4PVPlacement * GetPhys() const
Accessor.