BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLaserWire.cc
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#include "BDSBeamPipeInfo.hh"
19#include "BDSGlobalConstants.hh"
20#include "BDSLaserWire.hh"
21#include "BDSMaterials.hh"
22#include "BDSSDType.hh"
23
24#include "G4Box.hh"
25#include "G4LogicalVolume.hh"
26
27BDSLaserWire::BDSLaserWire(G4String nameIn,
28 G4double lengthIn,
29 G4double wavelengthIn,
30 G4ThreeVector directionIn):
31 BDSAcceleratorComponent(nameIn, lengthIn, 0, "laserwire"),
32 itsLaserDirection(directionIn),
33 itsLaserWavelength(wavelengthIn)
34{;}
35
36BDSLaserWire::~BDSLaserWire()
37{;}
38
40{
41 G4double beamPipeRadius = BDSGlobalConstants::Instance()->DefaultBeamPipeModel()->aper1;
42 containerSolid = new G4Box(name +"_container_solid",
43 beamPipeRadius,
44 beamPipeRadius,
45 chordLength*0.5);
46 containerLogicalVolume=new G4LogicalVolume(containerSolid,
47 BDSMaterials::Instance()->GetMaterial("LaserVac"),
48 name + "_container_lv");
50 {RegisterSensitiveVolume(containerLogicalVolume, BDSSDType::energydepvacuum);}
51 BDSGlobalConstants::Instance()->SetLaserwireWavelength(containerLogicalVolume->GetName(),itsLaserWavelength);
52 BDSGlobalConstants::Instance()->SetLaserwireDir(containerLogicalVolume->GetName(),itsLaserDirection);
53
54 SetAcceleratorVacuumLogicalVolume(containerLogicalVolume);
55}
Abstract class that represents a component of an accelerator.
void SetAcceleratorVacuumLogicalVolume(G4LogicalVolume *accVacLVIn)
const G4String name
Const protected member variable that may not be changed by derived classes.
G4double chordLength
Protected member variable that can be modified by derived classes.
static G4bool sensitiveVacuum
Useful variable often used in construction.
G4double aper1
Public member for direct access.
void RegisterSensitiveVolume(G4LogicalVolume *sensitiveVolume, BDSSDType sensitivityType)
static BDSGlobalConstants * Instance()
Access method.
virtual void BuildContainerLogicalVolume()
Construct geometry and assign with special "LaserVac" material.
BDSLaserWire()=delete
Private default constructor to force the use of the supplied one.
static BDSMaterials * Instance()
Singleton pattern access.