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) 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#include "laser.h"
19
20using namespace GMAD;
21
23{
24 clear();
26}
27
29{
30 name = "";
31 wavelength = 0;
32 m2 = 0;
33 pulseEnergy = 0;
34 pulseDuration = 0;
35 w0 = 0;
36 sigma0 = 0;
37 laserArrivalTime = 0;
38 laserPolarization1 = 0;
39 laserPolarization2 = 0;
40 laserPolarization3 = 0;
41 ignoreRayleighRange = false;
42}
43
45{
46 publish("name", &Laser::name);
47 publish("wavelength", &Laser::wavelength);
48 publish("m2", &Laser::m2);
49 publish("pulseEnergy", &Laser::pulseEnergy);
50 publish("pulseDuration", &Laser::pulseDuration);
51 publish("w0", &Laser::w0);
52 publish("sigma0", &Laser::sigma0);
53 publish("laserArrivalTime", &Laser::laserArrivalTime);
54 publish("laserPolarization1", &Laser::laserPolarization1);
55 publish("laserPolarization2", &Laser::laserPolarization2);
56 publish("laserPolarization3", &Laser::laserPolarization3);
57 publish("ignoreRayleighRange",&Laser::ignoreRayleighRange);
58}
59
60void Laser::print()const
61{
62 std::cout << "Laser: "
63 << "name " << name << std::endl
64 << "wavelength " << wavelength << std::endl
65 << "m2 " << m2 << std::endl
66 << "pulse energy " << pulseEnergy << std::endl
67 << "pulse duration " << pulseDuration << std::endl
68 << "w0 " << w0 << std::endl
69 << "sigma0 " << sigma0 << std::endl
70 << "laserArrivalTime " << laserArrivalTime << std::endl
71 << "laserPolarization1 " << laserPolarization1 << std::endl
72 << "laserPolarization2 " << laserPolarization2 << std::endl
73 << "laserPolarization3 " << laserPolarization3 << std::endl
74 << "ignoreRayleighRange " << ignoreRayleighRange << std::endl;
75}
void print() const
print some properties
Definition laser.cc:60
std::string name
Name of this laser.
Definition laser.h:37
Laser()
constructor
Definition laser.cc:22
void PublishMembers()
publish members
Definition laser.cc:44
void clear()
reset
Definition laser.cc:28
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:93
Parser namespace for GMAD language. Combination of Geant4 and MAD.