25void EarthModelBase::SetDetectorCoordinates(
double rad,
double lat,
double lon)
29 cerr <<
"WARNING: Negative radius detected. Setting to absolute value."
36 lat -= floor((lat + 90.0) / 360.0) * 360.0;
37 if (lat > 90) { lat = 180.0 - lat; }
41 lon -= floor(lon / 360.0) * 360.0;
79 if (fabs(cosT) > 1)
return 0;
81 double sinsqrT = 1 - cosT * cosT;
124 vector<NuPath> mergedPath;
133 for (
int i = 1; i <
fNuPath.size(); i++) {
138 mergedPath.push_back(path);
155 mergedPath.push_back(path);
163 while (k + 1 < mergedPath.size()) {
165 if (mergedPath[k].length < 0.01 * totL) {
167 mergedPath =
MergePaths(mergedPath, k, k + 1);
virtual double GetTotalL(double cosT)
Get the total baseline for a given cosTheta.
double fRadiusMax
Maximum radius in Earth model (in km)
bool fRemoveSmallPaths
Tag whether to merge small paths.
double fDetLat
The latitude (in rad) where the detector sits.
virtual std::vector< NuPath > GetMergedPaths(double prec=0.25)
Get merged path sequence in a vector.
virtual double GetCosT(double L)
Get the cosTheta for a given total baseline.
double fDetLon
The longitude (in rad) where the detector sits.
virtual std::vector< NuPath > GetNuPath()
virtual void SetRemoveSmallPaths(bool rp=true)
Set tag to remove small paths.
virtual void AddPathSegment(double length, double density, double zoa, int index)
Add a path segment to the sequence.
std::vector< NuPath > fNuPath
The current neutrino path sequence.
double fDetRadius
The radius where the detector sits (in km)
Some useful general definitions.
std::vector< NuPath > MergePaths(std::vector< NuPath > &inputPath, int j, int k)
Merge paths j and k in vector.
NuPath AvgPath(NuPath &p1, NuPath &p2)
Get the average of two paths.
A struct representing a neutrino path segment.
double density
The density of the path segment in g/cm^3.
double zoa
The effective Z/A value of the path segment.