OscProb
|
Implements an earth model with spherical shells. More...
#include <PremModel.h>
Public Member Functions | |
PremModel (std::string filename="") | |
Constructor. More... | |
virtual | ~PremModel () |
Destructor. More... | |
void | SetDetPos (double rad, double lat=0, double lon=0) |
int | FillPath (double cosT, double phi=0) |
Fill the path sequence in a vector. More... | |
virtual void | LoadModel (std::string filename) |
Load an earth model from a file. More... | |
virtual std::vector< PremLayer > | GetPremLayers () |
virtual void | SetLayerZoA (int layer, double zoa) |
Set Z/A of all layers of a given type. More... | |
virtual double | GetLayerZoA (int layer) |
Get Z/A of all layers of a given type. More... | |
virtual void | SetTopLayerSize (double thick) |
Set the outermost layer thickness in km. More... | |
virtual std::vector< NuPath > | GetNuPath () |
virtual std::vector< NuPath > | GetMergedPaths (double prec=0.25) |
Get merged path sequence in a vector. More... | |
virtual double | GetTotalL (double cosT) |
Get the total baseline for a given cosTheta. More... | |
virtual double | GetCosT (double L) |
Get the cosTheta for a given total baseline. More... | |
virtual void | SetRemoveSmallPaths (bool rp=true) |
Set tag to remove small paths. More... | |
Protected Member Functions | |
virtual void | ClearModel () |
Clear the earth model information. More... | |
virtual void | AddLayer (double radius, double density, double zoa, double layer) |
Add a layer to the model. More... | |
virtual void | AddPath (double length, PremLayer pl) |
Add a path segment to the sequence. More... | |
virtual void | AddDetLayer () |
Add the detector layer. More... | |
virtual void | CleanIdentical () |
Clear identical consecutive layers. More... | |
ClassDef (PremModel, 1) | |
virtual void | SetDetectorCoordinates (double rad, double lat, double lon) |
virtual void | AddPathSegment (double length, double density, double zoa, int index) |
Add a path segment to the sequence. More... | |
ClassDef (EarthModelBase, 1) | |
Protected Attributes | |
std::vector< PremLayer > | fPremLayers |
The layers in the earth model. More... | |
int | fDetLayer |
The layer index of the detector. More... | |
std::string | fFilename |
The input filename. More... | |
std::vector< NuPath > | fNuPath |
The current neutrino path sequence. More... | |
double | fRadiusMax |
Maximum radius in Earth model (in km) More... | |
double | fDetRadius |
The radius where the detector sits (in km) More... | |
double | fDetLat |
The latitude (in rad) where the detector sits. More... | |
double | fDetLon |
The longitude (in rad) where the detector sits. More... | |
bool | fRemoveSmallPaths |
Tag whether to merge small paths. More... | |
Static Protected Attributes | |
static const double | DET_TOL = 0.2 |
The detector position tolerance near boundaries. More... | |
This class implements a spherically symmetric model of the earth using PremLayer's to store spherical shells with different properties.
The class is then able to produce path sequences through the different earth layers as a function of the cosine of the zenith angle with respect to the detector.
The detector can be positioned at any radius within the model and the path sequences will take into account the fact that some layers are above the detector.
By default this implements the model stored in PremTables/prem_default.txt with the detector at the bottom of the ocean layer (radius = 6368 km).
This class inherits from EarthModelBase and can be saved in ROOT files.
Definition at line 33 of file PremModel.h.
PremModel::PremModel | ( | std::string | filename = "" | ) |
Constructor.
By default this implements the model stored in PremTables/prem_default.txt with the detector at the bottom of the ocean layer (radius = 6368 km).
filename | - The txt file containing a table of earth layers |
Definition at line 35 of file PremModel.cxx.
References LoadModel(), SetDetPos(), and OscProb::EarthModelBase::SetRemoveSmallPaths().
|
virtual |
|
protectedvirtual |
Add a detector layer at the detector position if needed. If not, set the detector layer to an existing boundary.
Definition at line 73 of file PremModel.cxx.
References CleanIdentical(), DET_TOL, fDetLayer, OscProb::EarthModelBase::fDetRadius, fPremLayers, and OscProb::PremLayer::radius.
Referenced by LoadModel(), and SetDetPos().
|
protectedvirtual |
Add a layer to the earth model.
radius | - The outer radius of the layer in km |
density | - The density of the layer in g/cm^3 |
zoa | - The effective Z/A value of the layer |
layer | - An index to identify the matter type (e.g. earth inner core) |
Definition at line 167 of file PremModel.cxx.
References fPremLayers.
Referenced by LoadModel().
|
protectedvirtual |
Add a path segment to the sequence.
For a given PremLayer, adds a path of a given length in that material
length | - The length of the path segment in km |
pl | - The layer we are crossing |
Definition at line 325 of file PremModel.cxx.
References OscProb::EarthModelBase::AddPathSegment(), OscProb::PremLayer::density, OscProb::PremLayer::layer, and OscProb::PremLayer::zoa.
Referenced by FillPath().
|
protectedvirtualinherited |
Add a path segment to the sequence.
For a given EarthBin, adds a path of a given length in that material
length | - The length of the path segment in km |
density | - The density along the path segment |
zoa | - Z/A along the path segment |
index | - Index for the matter along the path segment |
Definition at line 65 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fNuPath.
Referenced by OscProb::EarthModelBinned::AddPath(), and AddPath().
|
protectedinherited |
|
protected |
|
protectedvirtual |
Clean identical consecutive layers. This is used in particular to remove previously added detector layers.
Definition at line 54 of file PremModel.cxx.
References fPremLayers.
Referenced by AddDetLayer().
|
protectedvirtual |
Clear the earth model information.
Definition at line 151 of file PremModel.cxx.
References fDetLayer, and fPremLayers.
Referenced by LoadModel().
|
virtual |
Fill the path sequence in a vector.
This will start at the upper-most layer and find straight paths to the boundary of the next layer down. When reaching the inner-most layer in the given direction, the paths move back to outer layers until hitting the detector.
The path sequence is stored as an attribute and can be retrieved with the function GetNuPath.
cosT | - The cosine of the zenith angle of the neutrino direction |
phi | - The azimuthal angle of the neutrino direction (default = 0; not used) |
Implements OscProb::EarthModelBase.
Definition at line 347 of file PremModel.cxx.
References AddPath(), fDetLayer, OscProb::EarthModelBase::fDetRadius, OscProb::EarthModelBase::fNuPath, and fPremLayers.
|
virtualinherited |
Get the cosTheta for a given total baseline.
Given a baseline, find the direction of the neutrino. This could be useful for experiments with fixed baselines for example.
The baseline must be within the range of possible values in this earth model. Will return vertical neutrinos otherwise.
L | - The total baseline of the neutrino |
Definition at line 99 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fDetRadius, and OscProb::EarthModelBase::fRadiusMax.
|
virtual |
Get the effective Z/A value for all layers of a given type, e.g. all outer-core layers.
layer | - The index of the layer type |
Definition at line 256 of file PremModel.cxx.
References fPremLayers.
|
virtualinherited |
Merge similar paths to reduce number of steps
This method will merge consecutive paths and take their averages until it finds a large enough gap to start a new merged path.
The merged paths will be returned, and the original detailed path will not be changed and will stay stored as an attribute.
prec | - The precision to merge paths in g/cm^3 |
Definition at line 121 of file EarthModelBase.cxx.
References OscProb::AvgPath(), OscProb::NuPath::density, OscProb::EarthModelBase::fNuPath, OscProb::EarthModelBase::fRemoveSmallPaths, OscProb::MergePaths(), and OscProb::NuPath::zoa.
|
virtualinherited |
Get the current neutrino path sequence
Get the current neutrino path sequence
The path needs to be filled for a given cosTheta before calling this function.
Definition at line 52 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fNuPath.
|
virtual |
Get the set of earth layers
Get the set of earth layers
This returns the set of PremLayer's for this earth model and detector position.
Definition at line 145 of file PremModel.cxx.
References fPremLayers.
|
virtualinherited |
Get the total baseline for a given cosTheta.
cosT | - The cosine of the neutrino direction |
Definition at line 77 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fDetRadius, and OscProb::EarthModelBase::fRadiusMax.
|
virtual |
Load an earth model from a file.
By default it loads the model stored in PremTables/prem_default.txt
filename | - The txt file containing a table of earth layers |
Definition at line 181 of file PremModel.cxx.
References AddDetLayer(), AddLayer(), ClearModel(), fPremLayers, and OscProb::EarthModelBase::fRadiusMax.
Referenced by PremModel().
|
protectedvirtualinherited |
Set the coordinates of the detector (rad = radius in km, lat/lon in deg)
Set the coordinates of the detector: radius in km, latitude in degrees, longitude in degrees
rad | - The distance from the detector to the Earth's center in km |
lat | - The latitude of the detector in deg N (between -90 and 90) |
lon | - The longitude of the detector in deg E (between 0 and 360) |
Definition at line 25 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fDetLat, OscProb::EarthModelBase::fDetLon, and OscProb::EarthModelBase::fDetRadius.
Referenced by OscProb::EarthModelBinned::SetDetPos(), and SetDetPos().
|
virtual |
Set the detector position (rad = radius in km, lat/lon in deg)
Set the coordinates of the detector: radius in km, latitude in degrees, longitude in degrees The latitude and longitude are not actually used in PremModel functions.
If the position is within 200m of a layer boundary, the detector is considered to be on the boundary. If not, an extra boundary is inserted in the detector position to distinguish what parts of the earth are above and below the detector.
rad | - The distance from the detector to the Earth's center in km |
lat | - The latitude of the detector in deg N (between -90 and 90) |
lon | - The longitude of the detector in deg E (between 0 and 360) |
Implements OscProb::EarthModelBase.
Definition at line 131 of file PremModel.cxx.
References AddDetLayer(), fPremLayers, and OscProb::EarthModelBase::SetDetectorCoordinates().
Referenced by PremModel().
|
virtual |
Set the effective Z/A value for all layers of a given type.
Use this to change the Z/A of indexed layer, e.g. all outer-core layers
layer | - The index of the layer type |
zoa | - The effective Z/A value to use |
Definition at line 235 of file PremModel.cxx.
References fPremLayers.
|
virtualinherited |
Set the boolean to tag whether to remove small paths when merging Small is defined as <1% of the total baseline
rp | - Boolean value to set |
Definition at line 188 of file EarthModelBase.cxx.
References OscProb::EarthModelBase::fRemoveSmallPaths.
Referenced by OscProb::EarthModelBinned::EarthModelBinned(), and PremModel().
|
virtual |
Set the radius of the outermost layer of the model.
This usually corresponds to the atmosphere and is useful for computing oscillations with variable neutrino production height.
thick | - The thickness of the outer layer in km |
Definition at line 288 of file PremModel.cxx.
References fPremLayers, and OscProb::EarthModelBase::fRadiusMax.
|
staticprotected |
Define the tolerance of the detector around a boundary when considering whether to add a new layer for the detector position.
Definition at line 78 of file PremModel.h.
Referenced by AddDetLayer().
|
protectedinherited |
Definition at line 78 of file EarthModelBase.h.
Referenced by OscProb::EarthModelBinned::FillPath(), OscProb::EarthModelBase::SetDetectorCoordinates(), and OscProb::EarthModelBinned::SetDetPos().
|
protected |
Definition at line 73 of file PremModel.h.
Referenced by AddDetLayer(), ClearModel(), and FillPath().
|
protectedinherited |
Definition at line 79 of file EarthModelBase.h.
Referenced by OscProb::EarthModelBinned::FillPath(), OscProb::EarthModelBase::SetDetectorCoordinates(), and OscProb::EarthModelBinned::SetDetPos().
|
protectedinherited |
Definition at line 77 of file EarthModelBase.h.
Referenced by AddDetLayer(), OscProb::EarthModelBinned::FillPath(), FillPath(), OscProb::EarthModelBase::GetCosT(), OscProb::EarthModelBase::GetTotalL(), OscProb::EarthModelBase::SetDetectorCoordinates(), and OscProb::EarthModelBinned::SetDetPos().
|
protected |
Definition at line 75 of file PremModel.h.
|
protectedinherited |
Definition at line 74 of file EarthModelBase.h.
Referenced by OscProb::EarthModelBase::AddPathSegment(), OscProb::EarthModelBinned::FillPath(), FillPath(), OscProb::EarthModelBase::GetMergedPaths(), and OscProb::EarthModelBase::GetNuPath().
|
protected |
Definition at line 71 of file PremModel.h.
Referenced by AddDetLayer(), AddLayer(), CleanIdentical(), ClearModel(), FillPath(), GetLayerZoA(), GetPremLayers(), LoadModel(), SetDetPos(), SetLayerZoA(), and SetTopLayerSize().
|
protectedinherited |
Definition at line 76 of file EarthModelBase.h.
Referenced by OscProb::EarthModelBinned::FillPath(), OscProb::EarthModelBase::GetCosT(), OscProb::EarthModelBase::GetTotalL(), OscProb::EarthModelBinned::LoadModel(), LoadModel(), and SetTopLayerSize().
|
protectedinherited |
Definition at line 81 of file EarthModelBase.h.
Referenced by OscProb::EarthModelBase::GetMergedPaths(), and OscProb::EarthModelBase::SetRemoveSmallPaths().