BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
physicsbiasing.h
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 PHYSICSBIASING_H
20#define PHYSICSBIASING_H
21
22#include <string>
23#include <list>
24#include <vector>
25
26namespace GMAD
27{
28 class Array;
29}
30
31namespace GMAD
32{
33 enum class PhysicsBiasingType {ALL=1,PRIMARY=2,SECONDARY=3};
34
41
42 public:
43 std::string name;
45 std::string particle;
47 std::string process;
48 std::vector<std::string> processList;
50 std::vector<double> factor;
52 std::vector<PhysicsBiasingType> flag;
53
57 void clear();
59 void print()const;
60
62 void set_value(const std::string& property, double value);
64 void set_value(const std::string& property, Array* value);
66 void set_value(const std::string& property, std::string value);
67 };
68
69}
70
71#endif
Representation of arrays used in tokens.
Definition: array.h:40
Physics biasing class for parser.
std::vector< double > factor
factors corresponding to process
void set_value(const std::string &property, double value)
set methods by property name, numeric values
PhysicsBiasing()
constructor
void print() const
print some properties
std::vector< PhysicsBiasingType > flag
flag which particles are biased
std::string particle
particle name
std::string process
geant4 process: single string, but can have multiple processes separated with a space
Parser namespace for GMAD language. Combination of Geant4 and MAD.