2020-11-16 13:38:39 -05:00
|
|
|
/*
|
|
|
|
|
|
|
|
LayeredTarget.h
|
2021-09-06 16:18:49 -04:00
|
|
|
Functional unit for targets in the Mask environment. Contains a
|
2020-11-16 13:38:39 -05:00
|
|
|
set (read: vector) of Targets for use in reaction calculations. In this
|
|
|
|
way handles situations such as carbon backed targets
|
|
|
|
|
|
|
|
Based on code by D.W. Visser written at Yale for the original SPANC
|
|
|
|
|
|
|
|
Written by G.W. McCann Aug. 2020
|
|
|
|
|
|
|
|
*/
|
|
|
|
#ifndef LAYEREDTARGET_H
|
|
|
|
#define LAYEREDTARGET_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
2021-09-23 11:42:14 -04:00
|
|
|
#include <random>
|
|
|
|
#include "RandomGenerator.h"
|
2020-11-16 13:38:39 -05:00
|
|
|
#include "Target.h"
|
|
|
|
|
2021-09-06 16:18:49 -04:00
|
|
|
namespace Mask {
|
|
|
|
|
|
|
|
class LayeredTarget {
|
|
|
|
|
|
|
|
public:
|
|
|
|
LayeredTarget();
|
|
|
|
~LayeredTarget();
|
|
|
|
void AddLayer(std::vector<int>& Z, std::vector<int>& A, std::vector<int>& stoich, double thickness);
|
|
|
|
double GetProjectileEnergyLoss(int zp, int ap, double startEnergy, int rxnLayer, double angle);
|
|
|
|
double GetEjectileEnergyLoss(int ze, int ae, double startEnergy, int rxnLayer, double angle);
|
|
|
|
double GetEjectileReverseEnergyLoss(int ze, int ae, double startEnergy, int rxnLayer, double angle);
|
|
|
|
int FindLayerContaining(int Z, int A);
|
|
|
|
inline int GetNumberOfLayers() { return layers.size(); }
|
|
|
|
inline void SetName(std::string& n) { name = n; }
|
|
|
|
inline const Target& GetLayerInfo(int index) { return layers[index]; }
|
|
|
|
inline const std::string& GetName() { return name; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<Target> layers;
|
|
|
|
std::string name;
|
2021-09-23 11:42:14 -04:00
|
|
|
std::uniform_real_distribution<double> m_fractional_depth_dist;
|
2021-09-06 16:18:49 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2020-11-16 13:38:39 -05:00
|
|
|
|
|
|
|
#endif
|