BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSLaserWire.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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#include "BDSBeamPipeInfo.hh"
20#include "BDSGlobalConstants.hh"
21#include "BDSLaserWire.hh"
22#include "BDSMaterials.hh"
23#include "BDSSDType.hh"
24
25#include "G4Box.hh"
26#include "G4LogicalVolume.hh"
27
28BDSLaserWire::BDSLaserWire(G4String nameIn,
29 G4double lengthIn,
30 G4double wavelengthIn,
31 G4ThreeVector directionIn):
32 BDSAcceleratorComponent(nameIn, lengthIn, 0, "laserwire"),
33 itsLaserDirection(directionIn),
34 itsLaserWavelength(wavelengthIn)
35{;}
36
37BDSLaserWire::~BDSLaserWire()
38{;}
39
41{
42 G4double beamPipeRadius = BDSGlobalConstants::Instance()->DefaultBeamPipeModel()->aper1;
43 containerSolid = new G4Box(name +"_container_solid",
44 beamPipeRadius,
45 beamPipeRadius,
46 chordLength*0.5);
47 containerLogicalVolume=new G4LogicalVolume(containerSolid,
48 BDSMaterials::Instance()->GetMaterial("LaserVac"),
49 name + "_container_lv");
51 {RegisterSensitiveVolume(containerLogicalVolume, BDSSDType::energydepvacuum);}
52 BDSGlobalConstants::Instance()->SetLaserwireWavelength(containerLogicalVolume->GetName(),itsLaserWavelength);
53 BDSGlobalConstants::Instance()->SetLaserwireDir(containerLogicalVolume->GetName(),itsLaserDirection);
54
55 SetAcceleratorVacuumLogicalVolume(containerLogicalVolume);
56}
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.
Definition: BDSLaserWire.cc:40
BDSLaserWire()=delete
Private default constructor to force the use of the supplied one.
static BDSMaterials * Instance()
Singleton pattern access.
Definition: BDSMaterials.cc:38