RdBeamFormer/RdWaveModel.cc
Go to the documentation of this file.
1 #include "RdWaveModel.h"
2 
3 #include <evt/Event.h>
4 #include <revt/REvent.h>
5 #include <revt/Header.h>
6 #include <revt/Station.h>
7 #include <revt/StationRecData.h>
8 
9 #include <det/Detector.h>
10 #include <rdet/RDetector.h>
11 
12 #include <utl/Trace.h>
13 #include <utl/TraceAlgorithm.h>
14 #include <utl/ErrorLogger.h>
15 #include <utl/Reader.h>
16 #include <utl/config.h>
17 #include <utl/AugerUnits.h>
18 #include <utl/PhysicalConstants.h>
19 
20 #include <fwk/CoordinateSystemRegistry.h>
21 
22 #include <cmath>
23 
24 using namespace std;
25 using namespace revt;
26 using namespace utl;
27 using namespace fwk;
28 
29 namespace RdBeamFormer {
30 
31  RdWaveModel::RdWaveModel()
32  {
33  }
34 
35  RdWaveModel::~RdWaveModel()
36  {
37  }
38 
39  inline double norm (utl::Vector x) {
40  return sqrt(x*x);
41  }
42 
43  void RdWaveModel::setOrigin (utl::Point origin) {
44  this->origin = origin;
45  }
46 
47  void RdWaveModel::setSkyPos(utl::Point skyPos) {
48  this->skyPos = skyPos;
49  }
50 
51  double RdPlaneWaveModel::delay(const utl::Point antennaPos, const evt::ShowerRRecData& rrec) const {
52  const utl::Vector rho = skyPos - origin;
53  const utl::Vector x = antennaPos - origin;
54  return -(rho * x) / norm (rho) / kSpeedOfLight;
55  }
56 
57  double RdSphericalWaveModel::delay (const utl::Point antennaPos, const evt::ShowerRRecData& rrec) const {
58  const utl::Vector rho = skyPos - origin;
59  const utl::Vector diff = skyPos - antennaPos;
60  return (norm(diff) - norm(rho)) / kSpeedOfLight;
61  }
62 
63  double RdSphericalWaveModel::curvature(utl::Vector skyVec, const utl::CoordinateSystemPtr cs) const {
64  return 1.0 / skyVec.GetR(cs);
65  }
66 
67  //calculations for conical and hyperbolic wavefronts are based on formulas from:
68  //The wavefront of the radio signal emitted by cosmic ray air showers
69  //Apel, W.D. et al. - LOPES collaboration 2014, Journal of Cosmology and Astroparticle Physics,
70  //JCAP09(2014)025 doi:10.1088/1475-7516/2014/09/025
71 
72  double RdConicalWaveModel::delay (const utl::Point antennaPos, const evt::ShowerRRecData& rrec) const {
73  const utl::Vector rho = skyPos - origin;
74  const utl::Vector x = antennaPos - origin;
75  double xOrtogonal = norm(Cross(rho,x))/norm(rho);
76  double xParallel = (rho*x)/norm(rho);
77  const double Rho = rrec.GetParameter(eRho);
78  return (xOrtogonal*sin(Rho) - xParallel*cos(Rho))/kSpeedOfLight;
79  }
80 
81  double RdHyperbolicWaveModel::delay (const utl::Point antennaPos, const evt::ShowerRRecData& rrec) const {
82  const utl::Vector rho = skyPos - origin;
83  const utl::Vector x = antennaPos - origin;
84  double xOrtogonal = norm(Cross(rho,x))/norm(rho);
85  double xParallel = (rho*x)/norm(rho);
86  const double Rho = rrec.GetParameter(eRho);
87  const double b = rrec.GetParameter(eB);
88  return sqrt((xOrtogonal*sin(Rho)/kSpeedOfLight)*(xOrtogonal*sin(Rho)/kSpeedOfLight) + b*b) -
89  xParallel*cos(Rho)/kSpeedOfLight + b;
90  }
91 }
AxialVector Cross(const Vector &l, const Vector &r)
Definition: OperationsAV.h:25
Point object.
Definition: Point.h:32
double GetR(const CoordinateSystemPtr &coordinateSystem) const
radius r in spherical coordinates coordinates (distance to origin)
Definition: BasicVector.h:257
Interface class to access to the RD Reconstruction of a Shower.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
static int delay
Definition: XbAlgo.cc:20
constexpr double kSpeedOfLight
double norm(utl::Vector x)
Vector object.
Definition: Vector.h:30
double GetParameter(const Parameter i) const
The main module for the beam-forming calculations. This means obtaining power, cross-correlation and ...

, generated on Tue Sep 26 2023.