OscProb
PremModel.h
Go to the documentation of this file.
1
24
25#ifndef PREMMODEL_H
26#define PREMMODEL_H
27
28#include "Definitions.h"
29#include "EarthModelBase.h"
30
31namespace OscProb {
32
33 class PremModel : public EarthModelBase {
34 public:
35 PremModel(std::string filename = "");
36 virtual ~PremModel();
37
38 void SetDetPos(double rad, double lat = 0,
39 double lon = 0);
41
42 int FillPath(double cosT,
43 double phi = 0);
44
45 virtual void LoadModel(
46 std::string filename);
47
48 virtual std::vector<PremLayer> GetPremLayers();
50
51 virtual void SetLayerZoA(
52 int layer, double zoa);
53 virtual double GetLayerZoA(
54 int layer);
55
56 virtual void SetTopLayerSize(
57 double thick);
58
59 protected:
60 virtual void ClearModel();
61
62 virtual void AddLayer(double radius, double density, double zoa,
63 double layer);
64
65 virtual void AddPath(
66 double length, PremLayer pl);
67
68 virtual void AddDetLayer();
69 virtual void CleanIdentical();
70
71 std::vector<PremLayer> fPremLayers;
72
74
75 std::string fFilename;
76
77 static const double
79
80 // Required for saving in ROOT files
82 };
83
84} // namespace OscProb
85
86#endif
Base class for implementing an earth model.
Implements an earth model with spherical shells.
Definition: PremModel.h:33
virtual void AddLayer(double radius, double density, double zoa, double layer)
Add a layer to the model.
Definition: PremModel.cxx:167
virtual void SetTopLayerSize(double thick)
Set the outermost layer thickness in km.
Definition: PremModel.cxx:288
virtual void CleanIdentical()
Clear identical consecutive layers.
Definition: PremModel.cxx:54
int fDetLayer
The layer index of the detector.
Definition: PremModel.h:73
virtual void AddDetLayer()
Add the detector layer.
Definition: PremModel.cxx:73
virtual void LoadModel(std::string filename)
Load an earth model from a file.
Definition: PremModel.cxx:181
void SetDetPos(double rad, double lat=0, double lon=0)
Definition: PremModel.cxx:131
int FillPath(double cosT, double phi=0)
Fill the path sequence in a vector.
Definition: PremModel.cxx:347
static const double DET_TOL
The detector position tolerance near boundaries.
Definition: PremModel.h:78
PremModel(std::string filename="")
Constructor.
Definition: PremModel.cxx:35
ClassDef(PremModel, 1)
std::vector< PremLayer > fPremLayers
The layers in the earth model.
Definition: PremModel.h:71
virtual ~PremModel()
Destructor.
Definition: PremModel.cxx:46
virtual void ClearModel()
Clear the earth model information.
Definition: PremModel.cxx:151
virtual void SetLayerZoA(int layer, double zoa)
Set Z/A of all layers of a given type.
Definition: PremModel.cxx:235
virtual void AddPath(double length, PremLayer pl)
Add a path segment to the sequence.
Definition: PremModel.cxx:325
std::string fFilename
The input filename.
Definition: PremModel.h:75
virtual std::vector< PremLayer > GetPremLayers()
Definition: PremModel.cxx:145
virtual double GetLayerZoA(int layer)
Get Z/A of all layers of a given type.
Definition: PremModel.cxx:256
Some useful general definitions.
Definition: Absorption.h:6
A struct representing a spherical shell of matter for earth models.
Definition: NuPath.h:84