BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
laser.cc
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#include "laser.h"
20
21using namespace GMAD;
22
24{
25 clear();
27}
28
30{
31 name = "";
32 wavelength = 0;
33 m2 = 0;
34 pulseEnergy = 0;
35 pulseDuration = 0;
36 w0 = 0;
37 sigma0 = 0;
38 laserArrivalTime = 0;
39 laserPolarization1 = 0;
40 laserPolarization2 = 0;
41 laserPolarization3 = 0;
42 ignoreRayleighRange = false;
43}
44
46{
47 publish("name", &Laser::name);
48 publish("wavelength", &Laser::wavelength);
49 publish("m2", &Laser::m2);
50 publish("pulseEnergy", &Laser::pulseEnergy);
51 publish("pulseDuration", &Laser::pulseDuration);
52 publish("w0", &Laser::w0);
53 publish("sigma0", &Laser::sigma0);
54 publish("laserArrivalTime", &Laser::laserArrivalTime);
55 publish("laserPolarization1", &Laser::laserPolarization1);
56 publish("laserPolarization2", &Laser::laserPolarization2);
57 publish("laserPolarization3", &Laser::laserPolarization3);
58 publish("ignoreRayleighRange",&Laser::ignoreRayleighRange);
59}
60
61void Laser::print()const
62{
63 std::cout << "Laser: "
64 << "name " << name << std::endl
65 << "wavelength " << wavelength << std::endl
66 << "m2 " << m2 << std::endl
67 << "pulse energy " << pulseEnergy << std::endl
68 << "pulse duration " << pulseDuration << std::endl
69 << "w0 " << w0 << std::endl
70 << "sigma0 " << sigma0 << std::endl
71 << "laserArrivalTime " << laserArrivalTime << std::endl
72 << "laserPolarization1 " << laserPolarization1 << std::endl
73 << "laserPolarization2 " << laserPolarization2 << std::endl
74 << "laserPolarization3 " << laserPolarization3 << std::endl
75 << "ignoreRayleighRange " << ignoreRayleighRange << std::endl;
76}
void print() const
print some properties
Definition laser.cc:61
std::string name
Name of this laser.
Definition laser.h:38
Laser()
constructor
Definition laser.cc:23
void PublishMembers()
publish members
Definition laser.cc:45
void clear()
reset
Definition laser.cc:29
void publish(const std::string &name, T C::*mp)
Make pointer to member from class C and type T with accessible with a name.
Definition published.h:94
Parser namespace for GMAD language. Combination of Geant4 and MAD.