RdPlaneFit.h
Go to the documentation of this file.
1 #ifndef _RdPlaneFit_RdPlaneFit_h_
2 #define _RdPlaneFit_RdPlaneFit_h_
3 
4 #include <fwk/VModule.h>
5 #include <revt/Channel.h>
6 #include <utl/Vector.h>
7 #include <utl/Point.h>
8 #include <utl/TimeStamp.h>
9 #include <utl/CoordinateSystem.h>
10 
11 /*namespace evt {
12  class Event;
13  }*/
14 
15 namespace revt {
16  class REvent;
17 }
18 
19 // you should assign your module to a namespace
20 
21 namespace RdPlaneFit {
22 
31  struct FitParameters {
32  double u;
33  double v;
34  double w;
35  double ct0;
36  double sigmaU2;
37  double sigmaV2;
38  double sigmaUV;
39  double sigmact02;
40  double stage;
41 
43  u(0), v(0), w(0), ct0(0), sigmaU2(0), sigmaV2(0), sigmaUV(0), sigmact02(0), stage(0)
44  {
45  }
46  };
47 
48  class RdPlaneFit: public fwk::VModule {
49 
50  public:
51 
52  fwk::VModule::ResultFlag Init() override;
53  fwk::VModule::ResultFlag Run(evt::Event& event) override;
55 
56  private:
58  fwk::VModule::ResultFlag LinearFit(FitParameters& fit, const bool reuseFit = false) const;
59 
62 
64  static void PlaneFit3DFnc(int& nPar, double* const grad, double& value, double* const par,
65  const int flag);
66 
69  static void PlaneFit3DHorizonFnc(int& nPar, double* const grad, double& value,
70  double* const par, const int flag);
71 
74  void CalculateTimeResidual(const utl::Vector& axis, const double ct0, double& chi2) const;
75 
76  // xml settings
81 
82  // minuit globals
88  static double fgMeanEventTime; // this is the weighted mean of the station signal times with respect to the event time
89 
90  REGISTER_MODULE("RdPlaneFit", RdPlaneFit);
91 
92  };
93 
94 }
95 
96 #endif
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
Definition: RdPlaneFit.cc:194
static revt::REvent * fgCurrentREvent
Definition: RdPlaneFit.h:83
fwk::VModule::ResultFlag LinearFit(FitParameters &fit, const bool reuseFit=false) const
performs a Linear fit, approximation that z= equal for all stations
Definition: RdPlaneFit.cc:93
Point object.
Definition: Point.h:32
fwk::VModule::ResultFlag PlaneFit3DDriver(FitParameters &fit) const
Setting up / Executing the minimalization routines.
Definition: RdPlaneFit.cc:417
static void PlaneFit3DHorizonFnc(int &nPar, double *const grad, double &value, double *const par, const int flag)
Definition: RdPlaneFit.cc:576
static utl::CoordinateSystemPtr fgLocalCS
Definition: RdPlaneFit.h:87
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Definition: RdPlaneFit.cc:68
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
Definition: RdPlaneFit.cc:510
static double fgMeanEventTime
Definition: RdPlaneFit.h:88
static utl::Point fgCoordinateOrigin
Definition: RdPlaneFit.h:86
Module interface.
Definition: VModule.h:53
void CalculateTimeResidual(const utl::Vector &axis, const double ct0, double &chi2) const
Definition: RdPlaneFit.cc:625
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
Vector object.
Definition: Vector.h:30
static void PlaneFit3DFnc(int &nPar, double *const grad, double &value, double *const par, const int flag)
Function to minimize the plane fit, z != equal for all stations.
Definition: RdPlaneFit.cc:518
static utl::Point fgBarycenter
Definition: RdPlaneFit.h:84
REGISTER_MODULE("RdPlaneFit", RdPlaneFit)
const int nPar
Definition: GeomAsym.h:37
static utl::TimeStamp fgBaryTime
Definition: RdPlaneFit.h:85

, generated on Tue Sep 26 2023.