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