SimpleEMComponent.cc
Go to the documentation of this file.
1 
9 #include "SimpleEMComponent.h"
10 
11 #include <cmath>
12 
13 #include <utl/AugerUnits.h>
14 
15 using namespace tls;
16 using namespace utl;
17 using namespace std;
18 
20 {
21 }
22 
24 {
25 }
26 
27 double
28 SimpleEMComponent::SignalRatio(double x, double y, double, double theta, double phi)
29 {
30  if (theta < GetThetaMin()) theta = GetThetaMin();
31  else if (theta > GetThetaMax()) theta = GetThetaMax();
32 
33  //Ines parameterization. 7/11/2005
34  //Modified access by Victor. 3/3/2006
35  double xp, yp, zp;
36  double xShower, yShower/*, zShower*/;
37 
38  xp = cos(phi)*x + sin(phi)*y;
39  yp =-sin(phi)*x + cos(phi)*y;
40  zp = 0.;
41 
42  xShower = cos(theta)*xp - sin(theta)*zp;
43  yShower = yp;
44  //zShower = sin(theta)*xp + cos(theta)*zp;
45 
46  double r = sqrt(xShower*xShower + yShower*yShower);
47 
48  if (r>4000*m) r = 4000*m;
49 
50  double thetaDeg = theta/deg;
51 
52  double p0 = -28.6294;
53  double p1 = 1.13353;
54  double p2 = -0.0149130;
55  double p3 = 6.53067e-05;
56 
57  double B = p0 + p1*thetaDeg + p2*pow(thetaDeg,2) + p3*pow(thetaDeg,3.);
58  double C = 0.204301 + 3.17347*B;
59 
60  double q0 = 2.40906e+01;
61  double q1 = -3.13028e-01;
62  double q2 = -4.95571e+02;
63  double q3 = 1.15072e+01;
64  double q4 = -6.42068e-02;
65 
66  double Rp=exp(q0 + thetaDeg*q1) + q2 + thetaDeg*q3+ pow(thetaDeg,2.)*q4;
67 
68  double ratio = Rp/r + C - B*log10(r);
69 
70  return ratio;
71 }
72 
73 
74 // Configure (x)emacs for this file ...
75 // Local Variables:
76 // mode:c++
77 // compile-command: "make -C .. -k"
78 // End:
double pow(const double x, const unsigned int i)
constexpr double deg
Definition: AugerUnits.h:140
Class representing a document branch.
Definition: Branch.h:107
SimpleEMComponent(utl::Branch branch)
virtual double SignalRatio(double x, double y, double rmu, double theta, double phi)
constexpr double m
Definition: AugerUnits.h:121

, generated on Tue Sep 26 2023.