HybridGeometryFinderWG/HybridGeometryFinder.h
Go to the documentation of this file.
1 
9 #ifndef _HybridGeometryFinderWG_HybridGeometryFinder_h_
10 #define _HybridGeometryFinderWG_HybridGeometryFinder_h_
11 
12 #include <fwk/VModule.h>
13 
14 #include <utl/AxialVector.h>
15 #include <utl/NumericalErrorPropagation.h>
16 #include <utl/Point.h>
17 #include <utl/Vector.h>
18 
19 #include <map>
20 #include <vector>
21 
22 
23 namespace fevt {
24  class Eye;
25 }
26 
27 namespace sevt {
28  class Station;
29 }
30 
31 namespace HybridGeometryFinderWG {
32 
43 
44  public:
45 
49 
50  private:
51 
60 
67 
78  static std::vector<double> CalculateAxisForTel(const utl::Point, utl::Vector, const double, const int);
79 
93  void SelectPixels();
94 
100  bool SelectHybridStation(const int);
101 
110  bool FitAxis();
111 
125  static void MinuitFitFuncAxis(int&, double*, double&, double*, int);
126 
134  void RecalculateChiSquare();
135 
145  bool ReadmitPixel();
146 
156  bool RemovePixel();
157 
167  void StoreData();
168 
169  private:
170 
172  static int fgVerbosity;
173 
175  static double fgCoreHeight;
176 
178  static double fgSDPError;
179 
182 
184  unsigned int fAxisMinPixel;
185 
187  double fMaxSDPDist;
188 
190  static double fgVerticalCurvature;
191 
194 
197 
199  static int fgLaserShots;
200 
202  int fFdOnly;
203 
206 
209 
212 
214  unsigned int fCurTelId;
215 
216  // The SDP stuff
218  //double fSDPThetaError; // unused. LN.
219  //double fSDPPhiError; // unused. LN.
220  //double fSDPCorrThetaPhi; // unused. LN.
221  double fChiSqSDP;
222  unsigned int fNDofSDP;
223  std::map<int, double> fChiSqSDPPerTel;
224  std::map<int, unsigned int> fNDofSDPPerTel;
225 
226  // The axis stuff
227  double fChiZero;
228  double fRp;
229  double fTZero;
232  double fAxisTheta;
234  double fAxisPhi;
236  double fNorthing;
238  double fEasting;
240  double fTCore;
241  double fTCoreError;
242  double fCovMatrixAxis[5][5];
243  double fChiSqTime;
244  unsigned int fNDofTime;
245  std::map<int, double> fChiSqTimePerTel;
246  std::map<int, unsigned int> fNDofTimePerTel;
247  double fChiSqAxis;
248  static unsigned int fgNDofAxis;
249  std::map<int, double> fChiSqAxisPerTel;
250  std::map<int, unsigned int> fNDofAxisPerTel;
251 
252  // The SD stuff
253  static std::vector<unsigned short int> fgStationList;
257  static int fgHybridFitMode;
258 
259  std::map<int, std::vector<double> > fTelParameters;
260 
261  REGISTER_MODULE("HybridGeometryFinderWG", HybridGeometryFinder);
262 
264  };
265 
266 
268 
269  public:
270 
279  AxisParameterCalculator(const HybridGeometryFinder* hybridFinder) {fHybridFinder = hybridFinder;}
280 
288  std::vector<double> operator() (const std::vector<double>&) const;
289 
290  private:
291 
293 
294  };
295 
296 } // HybridGeometryFinderWG
297 
298 
299 #endif // _HybridGeometryFinderWG_HybridGeometryFinder_h_
300 
301 // Configure (x)emacs for this file ...
302 // Local Variables:
303 // mode:c++
304 // compile-command: "make -C .. -k"
305 // End:
double fMaxTimeResidue
The maximal time residual for a pixel to be not removed.
static double fgSDPError
There error assumed in the SDP fit part.
Point object.
Definition: Point.h:32
static void MinuitFitFuncAxis(int &, double *, double &, double *, int)
The Minuit fit function for the axis fit.
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Module to reconstruct the shower axis for virtual eyes.
int fPassThrough
Should the reconstruction continue if no axis is found.
REGISTER_MODULE("HybridGeometryFinderWG", HybridGeometryFinder)
static double fgVerticalCurvature
The curvature assumed for the shower front.
void CalculateGeometryForTels()
Calculate the geometry for all telescopes in this eye.
static double fgCoreHeight
The UTM height used for the core.
int GetDataFromPreviousFit()
Take the data from previous fits as first guess.
class to hold data at Station level
AxisParameterCalculator(const HybridGeometryFinder *hybridFinder)
The constructor.
double fMaxStationToSDPDist
The maximal distance for the station to the axis.
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
bool SelectHybridStation(const int)
Select the hottest station for the fit.
Module interface.
Definition: VModule.h:53
unsigned int fAxisMinPixel
The minimum number of pixels needed for the axis fit.
static int fgVerbosity
The level of verbosity: -1 no, 0 med, 1 full, 2 debug output.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
int fFdOnly
Should the reconstruction continue if no SD station is found.
double fMaxSDPDist
Maximum difference in Chi_i for a pixel to be considered in the axis fit.
Vector object.
Definition: Vector.h:30
AxialVector object.
Definition: AxialVector.h:30
void RecalculateChiSquare()
Calculate the ChiSquare for the fitted parameters.
static std::vector< double > CalculateAxisForTel(const utl::Point, utl::Vector, const double, const int)
Calculate the axis parameters for a given telescope.
std::vector< double > operator()(const std::vector< double > &) const
Calculate the axis parameters for the error propagation.
bool RemovePixel()
Remove a pixel from the fit if the time residue is too high.
Definition: XbArray.h:7
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)

, generated on Tue Sep 26 2023.