SdPlaneFit.h
Go to the documentation of this file.
1 #ifndef _SdPlaneFitOG_SdPlaneFit_h_
2 #define _SdPlaneFitOG_SdPlaneFit_h_
3 
4 #include <fwk/VModule.h>
5 #include <utl/Vector.h>
6 #include <utl/Point.h>
7 #include <utl/TimeStamp.h>
8 #include <utl/CoordinateSystem.h>
9 
10 
11 namespace sevt {
12  class SEvent;
13 }
14 
15 namespace SdPlaneFitOG {
16 
17  struct FitParameters {
18  double u = 0;
19  double v = 0;
20  double w = 0;
21  double ct0 = 0;
22  double sigmaU2 = 0;
23  double sigmaV2 = 0;
24  double sigmaUV = 0;
25  double sigmact02 = 0;
26  double stage = 0;
27  };
28 
29 
42  class SdPlaneFit : public fwk::VModule {
43 
44  public:
45  fwk::VModule::ResultFlag Init() override;
46  fwk::VModule::ResultFlag Run(evt::Event& event) override;
47  fwk::VModule::ResultFlag Finish() override { return eSuccess; }
48 
49  private:
51  const bool reuseFit = false) const;
53  void CalculateTimeResidual3D(const utl::Vector& axis, const double ct0,
54  double& mean, double& spread, double& chi2) const;
55 
56  static void PlaneFit3DFnc(int& nPar, double* const grad, double& value,
57  double* const par, const int flag);
58 
59  enum InfoLevel {
60  eNone = 0,
61  eFinal = 1,
63  eObscure = 3,
64  eMinuit = 4
65  };
66 
67  // xml settings
68  int fInfoLevel = 0;
69  bool fMinuitOutput = false;
71 
72  // minuit globals
77 
78  REGISTER_MODULE("SdPlaneFitOG", SdPlaneFit);
79  };
80 
81 }
82 
83 
84 #endif
REGISTER_MODULE("SdPlaneFitOG", SdPlaneFit)
Point object.
Definition: Point.h:32
Report success to RunController.
Definition: VModule.h:62
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
static void PlaneFit3DFnc(int &nPar, double *const grad, double &value, double *const par, const int flag)
Definition: SdPlaneFit.cc:471
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
static utl::CoordinateSystemPtr fgBarycenterCS
Definition: SdPlaneFit.h:76
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
static utl::TimeStamp fgBaryTime
Definition: SdPlaneFit.h:75
fwk::VModule::ResultFlag LinearFit(FitParameters &fit, const bool reuseFit=false) const
Definition: SdPlaneFit.cc:99
void CalculateTimeResidual3D(const utl::Vector &axis, const double ct0, double &mean, double &spread, double &chi2) const
Definition: SdPlaneFit.cc:368
Module interface.
Definition: VModule.h:53
static utl::Point fgBarycenter
Definition: SdPlaneFit.h:74
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
Definition: SdPlaneFit.cc:194
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
fwk::VModule::ResultFlag PlaneFit3DDriver(FitParameters &fit) const
Definition: SdPlaneFit.cc:405
Vector object.
Definition: Vector.h:30
static sevt::SEvent * fgCurrentSEvent
Definition: SdPlaneFit.h:73
const int nPar
Definition: GeomAsym.h:37
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
Definition: SdPlaneFit.h:47
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Definition: SdPlaneFit.cc:71

, generated on Tue Sep 26 2023.