8
static const double stepSizePlot = 10.0;
10
static const char* lattice_locale = "lattices";
12
static std::string lattice_filepath(const char* name) {return std::string(lattice_locale) + std::string("/") + std::string(name) + std::string("/StepPi.") + std::string(name) + std::string(".dat");}
13
static const int numberOfParticles = 96;
15
static const double stepSize = 2.0;
16
static const double posScale = 0.001;
17
static const double momScale = 0.001;
19
static const double lengthScale = 1.0/299.792; //One millimeter in terms of base units ns ie 1/c in ns mm^-1
20
static const double lightSpeed = 299792458.;
21
static const double kiloTeslaScale = 89856.7; // One kilotesla. Energy is in MeV. Base units are 1ns and 1Mev. 1kT = 10e3 kg A^-1 s^-2 = kiloTeslaScale * MeV ns^-1
22
static const double sigma = 2000.; //a convenient length scale, in mm
23
static const double muonMass = 105.65837;
24
static const double refMomentum = 200.;
25
static const double refEnergy = std::sqrt(refMomentum*refMomentum + muonMass*muonMass);
9
extern const double stepSizePlot;
11
extern const char* lattice_locale;
13
std::string lattice_filepath(const char* name);
14
extern const int numberOfParticles;
16
extern const double stepSize;
17
extern const double posScale;
18
extern const double momScale;
20
extern const double lengthScale; //One millimeter in terms of base units ns ie 1/c in ns mm^-1
21
extern const double lightSpeed;
22
extern const double kiloTeslaScale; // One kilotesla. Energy is in MeV. Base units are 1ns and 1Mev. 1kT = 10e3 kg A^-1 s^-2 = kiloTeslaScale * MeV ns^-1
23
extern const double sigma; //a convenient length scale, in mm
24
extern const double muonMass;
25
extern const double refMomentum;
26
extern const double refEnergy;
27
28
//Constants for tabulating Bfield data
28
static const double stepSizeFieldPlot = 0.03125;
29
static const double zRoundingValueB = 64.0; //Rounds z to the nearest 1/<value>. Ensure <val> > 1.0/stepSizeFieldPlot
30
static const double reducedStep = 0.25;
31
static const double zRoundingValue2 = 8.0;
29
extern const double stepSizeFieldPlot;
30
extern const double zRoundingValueB; //Rounds z to the nearest 1/<value>. Ensure <val> > 1.0/stepSizeFieldPlot
31
extern const double reducedStep;
32
extern const double zRoundingValue2;
33
extern const double muonCharge;
33
35
//equation parameters
34
static const double peakB = 0.002;
35
static const double bumpLength = 3000.0;
36
extern const double peakB;
37
extern const double bumpLength;
37
static const int numberOfEmittanceParticles = 10000;
38
static const double defaultPosMomRation = std::sqrt(sigma/refMomentum);
39
static const int inOutValues = 40;
40
static const double maxEmittanceIn = 1200.0;
39
extern const int numberOfEmittanceParticles;
40
extern const double defaultPosMomRation;
41
extern const int inOutValues;
42
extern const double maxEmittanceIn;
42
44
//Encoded index values for the non-zero coefficients of the H4 expression
43
static const int hamiltonianCoefficientCodes[19] = {256, 1152, 2048, 641, 200, 1537, 1096, 130, 1040, 1026, 144, 585, 515, 74, 529, 88, 4, 18, 32};
45
static bool streaming = true;
47
static void turnOffStream() {streaming = false;}
48
static void turnOnStream() {streaming = true;}
50
static std::ostream& getCurrentStream() {
51
//if (streaming) return std::cout;
45
extern const std::vector<std::vector<int> > hamiltonianCoefficientCodes;
47
extern bool streaming;
49
extern void turnOffStream();
50
extern void turnOnStream();
52
extern std::ostream& getCurrentStream();