BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLaser.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
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#ifndef BDSLASER_H
20#define BDSLASER_H
21#include "G4String.hh"
22#include "G4Types.hh"
23#include "G4ThreeVector.hh"
24#include "G4StokesVector.hh"
25#include "CLHEP/Units/SystemOfUnits.h"
26
27#include <vector>
28
36{
37public:
38 BDSLaser(G4double wavelengthIn,
39 G4double m2In,
40 G4double pulseDurationIn,
41 G4double pulseEnergyIn,
42 G4double sigma0In,
43 G4double laserArrivalTimeIn,
44 G4double T0In,
45 const G4ThreeVector& polarizationIn,
46 G4bool ignoreRayleighRangeIn = false);
47 explicit BDSLaser(G4double wavelengthIn);
48 ~BDSLaser();
49
50 //this needs to be called based upon particle coordinates
51 G4double W(G4double z) const;
52 G4double Sigma(G4double z) const {return 0.5*W(z);}
53 G4double Intensity(G4double x,double y,double z) const;
54 G4double Intensity(const G4ThreeVector& xyz) const;
55 G4double Radius() const;
56 G4double TemporalProfileGaussian(G4double particleGlobalTime, G4double particleZCoord) const;
57 G4double PhotonEnergy(G4double particleGamma,
58 G4double overlapAngle,
59 G4double particleBeta) const;
60 G4double HyperbolicAngle() const;
61 G4String GetLaserColour() const;
62
64 inline G4double Wavelength() const {return wavelength;}
65 inline G4double M2() const {return m2;}
66 inline G4double PulseDuration() const {return pulseDuration;}
67 inline G4double PulseEnergy() const {return pulseEnergy;}
68 inline G4double Sigma0() const {return sigma0;}
69 inline G4double RayleighRange() const {return rayleighRange;}
70 inline G4double W0() const {return 2*sigma0;}
71 inline G4double LaserArrivalTime() const {return laserArrivalTime;}
72 inline G4ThreeVector Polarization() const {return polarization;}
73 inline void SetT0(G4double T0In) {T0=T0In;}
74 inline G4bool IgnoreRayleighRange() const {return ignoreRayleighRange;}
76
77protected:
78 BDSLaser() = delete;
79
80 G4double wavelength;
81 G4double m2;
82 G4double pulseDuration;
83 G4double pulseEnergy;
84 G4double sigma0;
85 G4double laserArrivalTime;
86 G4double T0;
87 G4ThreeVector polarization;
88 G4bool ignoreRayleighRange;
89
90 const static std::vector<G4double> wavelengths;
91 const static std::vector<G4String> colours;
92
94 G4double peakPower;
95 G4double rayleighRange;
97};
98
99#endif
Class to provide laser intensity at any point.
Definition BDSLaser.hh:36
G4bool IgnoreRayleighRange() const
Accessor.
Definition BDSLaser.hh:74
G4double M2() const
Accessor.
Definition BDSLaser.hh:65
G4double RayleighRange() const
Accessor.
Definition BDSLaser.hh:69
G4double rayleighRange
Calculated parameters.
Definition BDSLaser.hh:95
G4double Wavelength() const
Accessor.
Definition BDSLaser.hh:64
G4double LaserArrivalTime() const
Accessor.
Definition BDSLaser.hh:71
G4double peakPower
Calculated parameters.
Definition BDSLaser.hh:94
G4double Sigma0() const
Accessor.
Definition BDSLaser.hh:68
G4ThreeVector Polarization() const
Accessor.
Definition BDSLaser.hh:72
void SetT0(G4double T0In)
Accessor.
Definition BDSLaser.hh:73
G4double PulseDuration() const
Accessor.
Definition BDSLaser.hh:66
G4double PulseEnergy() const
Accessor.
Definition BDSLaser.hh:67
G4double W0() const
Accessor.
Definition BDSLaser.hh:70