00001
00002
00003
00004
00005
00006 #include "BDSGlobalConstants.hh"
00007 #include "BDSLaserWire.hh"
00008 #include "BDSMaterials.hh"
00009
00010 #include "G4Box.hh"
00011 #include "G4VisAttributes.hh"
00012 #include "G4LogicalVolume.hh"
00013
00014 class BDSTiltOffset;
00015
00016 BDSLaserWire::BDSLaserWire(G4String name,
00017 G4double length,
00018 G4double wavelength,
00019 G4ThreeVector direction,
00020 BDSTiltOffset tiltOffset):
00021 BDSAcceleratorComponent(name, length, 0, "laserwire", tiltOffset),
00022 itsLaserCompton(NULL),
00023 itsLaserDirection(direction),
00024 itsLaserWavelength(wavelength)
00025 {;}
00026
00027 void BDSLaserWire::BuildContainerLogicalVolume()
00028 {
00029 G4double beamPipeRadius = BDSGlobalConstants::Instance()->GetBeamPipeRadius();
00030 containerSolid = new G4Box(name +"_container_solid",
00031 beamPipeRadius,
00032 beamPipeRadius,
00033 chordLength*0.5);
00034 containerLogicalVolume=new G4LogicalVolume(containerSolid,
00035 BDSMaterials::Instance()->GetMaterial("LaserVac"),
00036 name + "_container_lv");
00037 BDSGlobalConstants::Instance()->
00038 SetLaserwireWavelength(containerLogicalVolume->GetName(),itsLaserWavelength);
00039 BDSGlobalConstants::Instance()->
00040 SetLaserwireDir(containerLogicalVolume->GetName(),itsLaserDirection);
00041 }
00042
00043 BDSLaserWire::~BDSLaserWire()
00044 {
00045 delete itsLaserCompton;
00046 }