RdScintPlaneFit.cc
Go to the documentation of this file.
1 #include "RdScintPlaneFit.h"
2 
3 #include <cmath>
4 
5 #include <fwk/CentralConfig.h>
6 #include <fwk/LocalCoordinateSystem.h>
7 #include <fwk/CoordinateSystemRegistry.h>
8 
9 #include <det/Detector.h>
10 #include <rdet/RDetector.h>
11 
12 #include <utl/ErrorLogger.h>
13 #include <utl/Reader.h>
14 #include <utl/config.h>
15 #include <utl/PhysicalConstants.h>
16 #include <utl/AxialVector.h>
17 #include <utl/Math.h>
18 #include <utl/ErrorLogger.h>
19 
20 #include <evt/Event.h>
21 #include <evt/ShowerRecData.h>
22 #include <evt/ShowerRRecData.h>
23 #include <evt/ShowerRRecDataQuantities.h>
24 
25 #include <revt/REvent.h>
26 #include <revt/Station.h>
27 #include <revt/Header.h>
28 #include <revt/StationRecData.h>
29 #include <revt/StationRRecDataQuantities.h>
30 
31 #include <CLHEP/Matrix/Matrix.h>
32 #include <CLHEP/Matrix/Vector.h>
33 
34 #include <TMinuit.h>
35 
36 using namespace std;
37 using namespace revt;
38 using namespace evt;
39 using namespace fwk;
40 using namespace utl;
41 
42 #define OUT(x) if ((x) <= fInfoLevel) cerr << " "
43 #define NL "\n "
44 
45 using CLHEP::HepMatrix;
46 using CLHEP::HepVector;
47 
48 namespace RdScintPlaneFit {
49  // global variables
50  REvent* RdScintPlaneFit::fgCurrentREvent;
51  Point RdScintPlaneFit::fgBarycenter;
52  TimeStamp RdScintPlaneFit::fgBaryTime;
53  CoordinateSystemPtr RdScintPlaneFit::fgLocalCS;
54  Point RdScintPlaneFit::fgCoordinateOrigin;
55  double RdScintPlaneFit::fgMeanEventTime(0);
56 
57  template<typename G>
58  inline string ToString(const G& g, const CoordinateSystemPtr cs)
59  {
60  ostringstream os;
61  os << '(' << g.GetX(cs) / meter << ", " << g.GetY(cs) / meter << ", " << g.GetZ(cs) / meter << ") [m]";
62  return os.str();
63  }
64 
66  {
67  // Initialize your module here. This method
68  // is called once at the beginning of the run.
69  // The eSuccess flag indicates the method ended
70  // successfully. For other possible return types,
71  // see the VModule documentation.
72 
73  INFO("RdScintPlaneFit::Init()");
74 
75  // Read in the configurations of the xml file
76  Branch topBranch = CentralConfig::GetInstance()->GetTopBranch("RdScintPlaneFit");
77 
78  topBranch.GetChild("InfoLevel").GetData(fInfoLevel);
79 
80  fMinuitOutput = (fInfoLevel >= eMinuit) ? true : false;
81 
82  topBranch.GetChild("minNumberOfStations").GetData(fMinNumberOfStations);
83  topBranch.GetChild("allowUnphysicalCosines").GetData(fAllowUnphysicalCosines);
84 
85  return eSuccess;
86  }
87 
88 // analytic linear fit in local CS; approximation by neglecting
89 // z-coordinate, since z ~ 0 in local bary coordinate system,
90 // therefore loosing the w component of the axis. it is funny
91 // though, that stations living on a plane can not distinguish
92 // between upwards or downwards-going showers.
94  {
95 
96  const Vector approx_axis = (reuseFit ? Vector(fit.u, fit.v, fit.w, fgLocalCS) : Vector());
97 
98  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
99 
100  double s1(0);
101  double sx(0);
102  double sy(0);
103  double st(0);
104  double sxx(0);
105  double sxy(0);
106  double syy(0);
107  double sxt(0);
108  double syt(0);
109  //double stt(0);
110 
111  //loop over all stations
112 
113  int loop(0);
114 
115  for(REvent::StationIterator sIt = fgCurrentREvent->StationsBegin(); sIt != fgCurrentREvent->StationsEnd(); ++sIt) {
116 
117 
118  const Vector sPos = rDetector.GetStation(*sIt).GetPosition() - fgBarycenter;
119 
120  const double x = sPos.GetX(fgLocalCS);
121 
122  const double y = sPos.GetY(fgLocalCS);
123 
124  const StationRecData& sRec = sIt->GetRecData();
125 
126  if(sRec.HasParameter(eAERAScintStationSignalTime)) {
127  const double t = sRec.GetParameter(eAERAScintStationSignalTime) - fgMeanEventTime;
128  const double invSigma2 = 1. / (5 * 5);
129  s1 += invSigma2;
130  const double x_s = x * invSigma2;
131  sx += x_s;
132  sxx += x * x_s;
133  sxy += y * x_s;
134  sxt += t * x_s;
135  const double y_s = y * invSigma2;
136  sy += y_s;
137  syy += y * y_s;
138  syt += t * y_s;
139  st += t * invSigma2;
140  }
141  ++loop;
142  }
143 
144  st *= kSpeedOfLight;
145  sxt *= kSpeedOfLight;
146  syt *= kSpeedOfLight;
147 
148  HepMatrix mat(3, 3);
149 
150  mat[0][0] = sxx;
151  mat[0][1] = sxy;
152  mat[0][2] = -sx;
153  mat[1][0] = sxy;
154  mat[1][1] = syy;
155  mat[1][2] = -sy;
156  mat[2][0] = -sx;
157  mat[2][1] = -sy;
158  mat[2][2] = s1;
159 
160  int ierr(0);
161  mat.invert(ierr);
162 
163  if(ierr) {
164  INFO("Matrix inversion failed.");
165  return eFailure;
166  }
167 
168  HepVector k(3);
169 
170  k[0] = -sxt;
171  k[1] = -syt;
172  k[2] = st;
173 
174  const HepVector p = mat * k;
175  double w2 = 1 - Sqr(p[0]) - Sqr(p[1]);
176 
177  if(w2 < 0) {
178  WARNING("Unphysical direction cosines");
179  if(fAllowUnphysicalCosines) {
180  WARNING("Setting z-compenent of the shower axis to 0");
181  w2 = 0;
182  } else {
183  return eFailure;
184  }
185  }
186 
187  fit.u = p[0];
188  fit.v = p[1];
189  fit.w = sqrt(w2);
190  fit.ct0 = p[2];
191 
192  fit.sigmaU2 = mat[0][0];
193  fit.sigmaV2 = mat[1][1];
194  fit.sigmaUV = mat[0][1];
195  fit.sigmact02 = mat[2][2];
196 
197 
198 
199  return eSuccess;
200  }
201 
202  VModule::ResultFlag RdScintPlaneFit::Run(evt::Event& event)
203  {
204  INFO("Plane fit");
205 
206  // nothing to do if there is no REvent
207  if(!event.HasREvent()) {
208  OUT(eIntermediate)
209  << "eContinueLoop: No REvent, so no reconstruction"
210  << endl;
211  return eContinueLoop;
212  }
213 
214  fgCurrentREvent = &event.GetREvent();
215  //const REvent& rEvent = *fgCurrentREvent;
216 
217  const det::Detector& detector = det::Detector::GetInstance();
218  //const rdet::RDetector& rDetector = detector.GetRDetector();
219  const CoordinateSystemPtr siteCS = detector.GetSiteCoordinateSystem();
220 
221  evt::ShowerRecData& shower = event.GetRecShower();
222  evt::ShowerRRecData& rShower = shower.GetRRecShower();
223 
224  int nStations = rShower.GetParameter(eNumberOfAERAScintStationWithPulseFound);
225 
226  // not worth it
227  if(nStations < fMinNumberOfStations) {
228  OUT(eFinal) << "eContinueLoop: Not enough stations."
229  << endl;
230 
231  return eContinueLoop;
232  }
233 
234  //ShowerRRecData& showerrrec = event.GetRecShower().GetRRecShower();
235  //const TimeStamp& eventTime = rEvent.GetHeader().GetTime();
236 
237  //weighted sums
238  TimeInterval timeSum(0);
239  double weightSum(0);
240  for(REvent::StationIterator sIt = fgCurrentREvent->StationsBegin(); sIt != fgCurrentREvent->StationsEnd(); ++sIt) {
241 
242  //const rdet::Station& dStation = rDetector.GetStation(*sIt);
243  const StationRecData& sRec = sIt->GetRecData();
244  if(sRec.HasParameter(eAERAScintStationSignalTime)) {
245 
246  const double weight = sqrt(sRec.GetParameter(eAERAScintStationSignalHeight));
247 
248  weightSum += weight;
249  timeSum += weight * sRec.GetParameter(eAERAScintStationSignalTime);
250 
251  }
252  } //station loop
253 
254  timeSum /= weightSum;
255 
256  fgMeanEventTime= rShower.GetParameter(eBaryTimeAERAScint);
257  fgBaryTime = rShower.GetParameter(eBaryTimeAERAScint) + timeSum;
258 
259  const CoordinateSystemPtr referenceCS = detector.GetReferenceCoordinateSystem();
260 
261  const Point bary(rShower.GetParameter(eBaryCenterAERAScintX),rShower.GetParameter(eBaryCenterAERAScintY),rShower.GetParameter(eBaryCenterAERAScintZ),referenceCS);
262 
263  fgBarycenter = bary;
264  fgLocalCS = LocalCoordinateSystem::Create(fgBarycenter);
265 
266  OUT(eIntermediate) << "# candidate stations = "
267  << nStations << endl;
268 
269 
270  if(!rShower.HasParameter(eBaryCenterAERAScintX) || !rShower.HasParameter(eBaryTimeAERAScint)){
271  OUT(eFinal) << "eContinueLoop: Not Bary Data available!."
272  << endl;
273 
274  return eContinueLoop;
275  }
276 
277  //site coordinate system, only you used for terminal output
278  OUT(eIntermediate) << "barycenter = "
279  << ToString(fgBarycenter, siteCS) << " (site)" << NL
280  << "bary time = "
281  << timeSum / nanosecond << " [ns] (to event time)" << endl;
282 
283  OUT(eObscure) << "local/site zenith angle diff. = "
284  << acos(Vector(0, 0, 1, fgLocalCS) * Vector(0, 0, 1, siteCS)) / degree << " [deg]" << endl;
285 
286  // this will point to the final result
287  FitParameters finalFitResult;
288 
289  // first approximation
290  FitParameters fitLin;
291 
292  if(LinearFit(fitLin) != eSuccess) {
293  OUT(eIntermediate)
294  << "eContinueLoop: Linear fit was not succesfull"
295  << endl;
296  return eContinueLoop;
297  }
298 
299  // try again with previous values as approxiamtions for sigma
300  LinearFit(fitLin, true);
301 
302  // with first approximation on u and v, the nonlinear fit is attempted
303  FitParameters fitNonlin = fitLin;
304  bool useNonLinearFit(false);
305 
306  if(PlaneFit3DDriver(fitNonlin) == eSuccess) {
307  OUT(eIntermediate) << "Stage "
308  << fitLin.stage << ": linear plane fit" << NL
309  << " axis = ("
310  << fitLin.u << ", " << fitLin.v << ", " << fitLin.w << ") (bary)" << NL
311  << " theta = "
312  << acos(fitLin.w) / degree << NL
313  << " phi = "
314  << atan2(fitLin.v, fitLin.u) / degree << NL
315  << " ct0 = "
316  << fitLin.ct0 / meter << " [m]" << endl;
317  useNonLinearFit = true;
318  finalFitResult = fitNonlin;
319 
320  } else {
321  OUT(eIntermediate)
322  << " Nonlinear fit failed, using linear approximation."
323  << endl;
324  finalFitResult = fitLin;
325 
326  }
327  // Fill the event
328  const Vector axis(finalFitResult.u, finalFitResult.v, finalFitResult.w, fgLocalCS);
329 
330  rShower.SetParameter(eAERAScintShowerAxisX, axis.GetX(fgLocalCS));
331  rShower.SetParameter(eAERAScintShowerAxisY, axis.GetY(fgLocalCS));
332  rShower.SetParameter(eAERAScintShowerAxisZ, axis.GetZ(fgLocalCS));
333 
334  double chi2(0);
335  //calculates residuals and fill them in station rec
336  CalculateTimeResidual(axis, finalFitResult.ct0, chi2);
337 
338  const int angleNDOF = nStations - 3;
339  rShower.SetParameter(eAERAScintPlaneFitNDF, angleNDOF);
340  rShower.SetParameter(eAERAScintPlaneFitChi2, chi2);
341 
342  OUT(eFinal) << "Stage "
343  << finalFitResult.stage << ": " << (useNonLinearFit ? "3d" : "linear") << " plane fit" << NL
344  << " axis = ("
345  << finalFitResult.u << ", " << finalFitResult.v << ", " << finalFitResult.w << ") (bary)" << NL
346  << " theta = "
347  << acos(finalFitResult.w) / degree << " +/- " << NL
348  << " phi = " << atan2(finalFitResult.v, finalFitResult.u) / degree << " +/- " << NL
349  << " ct0 = " << finalFitResult.ct0 / meter << " [m]" << NL
350  << endl;
351 
352  return eSuccess;
353  }
354 
355  VModule::ResultFlag RdScintPlaneFit::PlaneFit3DDriver(FitParameters& fit) const
356  {
357  TMinuit minuit(3);
358  int errFlag(0);
359  double argList[10];
360  argList[0] = -1;
361  if(!fMinuitOutput) {
362  minuit.mnexcm("SET PRINTOUT", argList, 1, errFlag);
363  minuit.mnexcm("SET NOWARNINGS", argList, 0, errFlag);
364  minuit.SetPrintLevel(-1);
365  }
366 
367  if(fAllowUnphysicalCosines) {
368  minuit.SetFCN(RdScintPlaneFit::PlaneFit3DHorizonFnc);
369  argList[0] = 1; // chi2
370  minuit.mnexcm("SET ERRORDEF", argList, 1, errFlag);
371  minuit.mnparm(0, "theta", acos(fit.w), 0.01, 0, 0, errFlag);
372  minuit.mnparm(1, "phi", atan2(fit.v, fit.u), 0.01, 0, 0, errFlag);
373  minuit.mnparm(2, "ct0", fit.ct0, 10 * meter, 0, 0, errFlag);
374  } else {
375  minuit.SetFCN(RdScintPlaneFit::PlaneFit3DFnc);
376  argList[0] = 1; // chi2
377  minuit.mnexcm("SET ERRORDEF", argList, 1, errFlag);
378  minuit.mnparm(0, "u", fit.u, 0.01, 0, 0, errFlag);
379  minuit.mnparm(1, "v", fit.v, 0.01, 0, 0, errFlag);
380  minuit.mnparm(2, "ct0", fit.ct0, 10 * meter, 0, 0, errFlag);
381  }
382 
383  // init fnc
384  argList[0] = 1;
385  minuit.mnexcm("CALI", argList, 1, errFlag);
386 
387  argList[0] = 500;
388  minuit.mnexcm("MINIMIZE", argList, 1, errFlag);
389  if(errFlag) {
390  OUT(eObscure)
391  << " minuit minimize error: "
392  << errFlag << '\n';
393  minuit.mnexcm("MINOS", argList, 0, errFlag);
394  if(errFlag) {
395  OUT(eObscure)
396  << " minuit minos error: "
397  << errFlag << '\n';
398  return eFailure;
399  }
400  }
401 
402  // Get results
403  double foo(0);
404  double par1(0);
405  double par2(0);
406 
407  minuit.GetParameter(0, par1, foo);
408  minuit.GetParameter(1, par2, foo);
409 
410  if(fAllowUnphysicalCosines) {
411  fit.u = sin(par1) * cos(par2);
412  fit.v = sin(par1) * sin(par2);
413  fit.w = cos(par1);
414  } else {
415  fit.u = par1;
416  fit.v = par2;
417  double w2 = 1 - Sqr(fit.u) - Sqr(fit.v);
418  if(w2 < 0) {
419  OUT(eIntermediate) << " eFailure: Fit failed due to unphysical angle cosines."
420  << endl;
421  return eFailure;
422  }
423  fit.w = sqrt(w2);
424  }
425 
426  minuit.GetParameter(2, fit.ct0, foo);
427 
428  // error matrix
429  double emat[3][3];
430  minuit.mnemat(&emat[0][0], 3);
431  fit.sigmaU2 = emat[0][0];
432  fit.sigmaV2 = emat[1][1];
433  fit.sigmaUV = emat[0][1];
434  fit.sigmact02 = emat[2][2];
435 
436  return eSuccess;
437  }
438 
439  VModule::ResultFlag RdScintPlaneFit::Finish()
440  {
441  // Put any termination or cleanup code here.
442  // This method is called once at the end of the run.
443  INFO("RdPlaneFit::Finish()");
444  return eSuccess;
445  }
446 
447  void RdScintPlaneFit::PlaneFit3DFnc(int& /*nPar*/, double* const /*grad*/, double& value, double* const par, const int flag)
448  {
449  const double& u = par[0];
450  const double& v = par[1];
451  const double& ct0 = par[2];
452  static int nStations = 0;
453  static vector<double> sTiming; //station timing
454  static vector<double> sSignal; //station signal
455  static vector<Vector> sPosition; //station position
456  static vector<double> sTimeSigma2; //Uncurtainty on the pulse timing
457 
458  if(flag == 1) { // fnc init
459 
460  sTiming.clear();
461  sSignal.clear();
462  sPosition.clear();
463  sTimeSigma2.clear();
464 
465  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
466 
467  for(REvent::StationIterator sIt = fgCurrentREvent->StationsBegin(); sIt != fgCurrentREvent->StationsEnd(); ++sIt) { //loop over stations
468 
469  const StationRecData& sRec = sIt->GetRecData();
470 
471  if(!sRec.HasParameter(eAERAScintStationSignalTime)){
472  continue;
473  }
474 
475  sTiming.push_back(kSpeedOfLight * (sRec.GetParameter(eAERAScintStationSignalTime) - fgMeanEventTime));
476  sSignal.push_back(sRec.GetParameter(eAERAScintStationSignalHeight));
477  sPosition.push_back(rDetector.GetStation(*sIt).GetPosition() - fgBarycenter);
478  sTimeSigma2.push_back(sRec.GetParameterError(eAERAScintStationSignalTime) * sRec.GetParameterError(eAERAScintStationSignalTime));
479 
480  }
481 
482  nStations = sTiming.size();
483 
484  } // fnc init
485 
486  const double w2 = 1 - Sqr(u) - Sqr(v);
487 
488  if(w2 < 0) {
489  value = 1e30;
490  return;
491  }
492 
493  const double w = sqrt(w2);
494 
495  const Vector axis(u, v, w, fgLocalCS);
496 
497  double chi2(0);
498 
499  for(int i = 0; i < nStations; ++i)
500  chi2 += Sqr(sTiming[i] - ct0 + axis * sPosition[i]) / sTimeSigma2[i];
501 
502  value = chi2 / kSpeedOfLight2;
503  }
504 
505  void RdScintPlaneFit::PlaneFit3DHorizonFnc(int& /*nPar*/, double* const /*grad*/, double& value, double* const par, const int flag)
506  {
507  const double& theta = par[0];
508  const double& phi = par[1];
509  const double& ct0 = par[2];
510  static int nStations = 0;
511  static vector<double> sTiming; //station timing
512  static vector<double> sSignal; //station signal
513  static vector<Vector> sPosition; //station position
514  static vector<double> sTimeSigma2; //Uncurtainty on the pulse timing
515 // static const sdet::STimeVariance* timeVariance = 0;
516 
517  if(flag == 1) { // fnc init
518 
519  sTiming.clear();
520  sSignal.clear();
521  sPosition.clear();
522  sTimeSigma2.clear();
523 
524  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
525 
526  for(REvent::StationIterator sIt = fgCurrentREvent->StationsBegin(); sIt != fgCurrentREvent->StationsEnd(); ++sIt) { //loop over stations
527 
528  const StationRecData& sRec = sIt->GetRecData();
529  if(sRec.HasParameter(eAERAScintStationSignalHeight)) {
530  sTiming.push_back(kSpeedOfLight * (sRec.GetParameter(eAERAScintStationSignalTime) - fgMeanEventTime));
531  sSignal.push_back(sRec.GetParameter(eAERAScintStationSignalHeight));
532  sPosition.push_back(rDetector.GetStation(*sIt).GetPosition() - fgBarycenter);
533  sTimeSigma2.push_back((sRec.GetParameterError(eAERAScintStationSignalTime) * sRec.GetParameterError(eAERAScintStationSignalTime)));
534  }
535  }
536 
537  nStations = sTiming.size();
538 
539  } // fnc init
540 
541  const Vector axis(cos(phi) * sin(theta), sin(phi) * sin(theta), cos(theta), fgLocalCS);
542 
543  double chi2(0);
544 
545  for(int i = 0; i < nStations; ++i)
546  chi2 += Sqr(sTiming[i] - ct0 + axis * sPosition[i]) / sTimeSigma2[i];
547 
548  value = chi2 / kSpeedOfLight2;
549  }
550 
551  void
552  RdScintPlaneFit::CalculateTimeResidual(const utl::Vector& axis, const double ct0, double& chi2) const
553  {
554 
555  const double t0 = ct0 / kSpeedOfLight;
556  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
557  chi2 = 0;
558  for(REvent::StationIterator sIt = fgCurrentREvent->StationsBegin(); sIt != fgCurrentREvent->StationsEnd(); ++sIt) { //loop over stations
559  StationRecData& sRec = sIt->GetRecData();
560  if(sRec.HasParameter(eAERAScintStationSignalHeight)) {
561  const Vector stLoc_c = (rDetector.GetStation(*sIt).GetPosition() - fgBarycenter) / kSpeedOfLight;
562  const double t = (sRec.GetParameter(eAERAScintStationSignalTime) - fgMeanEventTime);
563  double sigma_t =sRec.GetParameterError(eAERAScintStationSignalTime);
564  double timeResidual = t - t0 + (stLoc_c * axis);
565  sRec.SetParameter(eAERAScintStationTimeResidual, timeResidual);
566  sRec.SetParameterError(eAERAScintStationTimeResidual, sigma_t);
567  chi2 += pow(timeResidual / sigma_t,2);
568 
569  }
570  }
571  }
572 
573 }
Branch GetTopBranch() const
Definition: Branch.cc:63
Class to access station level reconstructed data.
void SetParameter(Parameter i, double value, bool lock=true)
bool HasParameter(const Parameter i) const
void SetParameterError(Parameter i, double value, bool lock=true)
const double degree
constexpr T Sqr(const T &x)
Point object.
Definition: Point.h:32
Interface class to access Shower Reconstructed parameters.
Definition: ShowerRecData.h:33
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
Interface class to access to the RD Reconstruction of a Shower.
double GetParameterError(const Parameter i) const
const double meter
Definition: GalacticUnits.h:29
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
#define NL
string ToString(const G &g, const CoordinateSystemPtr cs)
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
utl::CoordinateSystemPtr GetSiteCoordinateSystem() const
Get the coordinate system for the site.
Definition: Detector.h:137
double pow(const double x, const unsigned int i)
boost::filter_iterator< StationFilter, AllStationIterator > StationIterator
Iterator over all (non-exculded) stations.
Definition: REvent.h:125
bool HasREvent() const
ShowerRRecData & GetRRecShower()
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
Detector description interface for RDetector-related data.
Definition: RDetector.h:46
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
Definition: Branch.h:107
#define OUT(x)
double GetX(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:206
constexpr double nanosecond
Definition: AugerUnits.h:143
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
constexpr double g
Definition: AugerUnits.h:200
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
double GetParameter(const Parameter i) const
double GetY(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:209
constexpr double kSpeedOfLight
A TimeInterval is used to represent time elapsed between two events.
Definition: TimeInterval.h:43
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
bool HasParameter(const Parameter i) const
utl::CoordinateSystemPtr GetReferenceCoordinateSystem() const
Get the reference coordinate system used for analysis (usually PampaAmarilla for Auger) ...
Definition: Detector.h:141
void SetParameter(Parameter i, double value, bool lock=true)
Vector object.
Definition: Vector.h:30
double GetParameter(const Parameter i) const
constexpr double kSpeedOfLight2
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:212
void LinearFit(const vector< double > &x, const vector< double > &y, const vector< double > &ey, double &a0, double &a1, double &chi2)
Do a linear fit and return coefficients and chi2.
utl::Point GetPosition() const
Tank position in Site Cartesian Coordinates.
const Station & GetStation(const int stationId) const
Get station by Station Id.
Definition: RDetector.cc:141

, generated on Tue Sep 26 2023.