~ajdobbs/maus/patrec-helix-fit

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/SciFi/RootFitter.hh

  • Committer: Adam Dobbs
  • Date: 2017-08-18 15:55:31 UTC
  • Revision ID: phuccj@gmail.com-20170818155531-66y8y0pinnh9di5p
Code reorganisation for patrec minuit fit - global minimum scan now a separate function

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
// C++ headers
22
22
#include <vector>
 
23
#include <functional>
23
24
 
24
25
// ROOT headers
25
26
#include "TMatrixD.h"
78
79
bool FitHelixMinuit(const std::vector<double>& x, const std::vector<double>& y,
79
80
                    const std::vector<double>& z, const double* pStart,
80
81
                    MAUS::SimpleHelix& helix, int handedness = 0, double cut = -1.0);
 
82
 
 
83
/** Scan the chisq function to find the rough location of the global minimum to seed MINUIT
 
84
  * (otherwise it gets stuck in local minima).
 
85
  * It will take minimum chisq value, unless we have an expected handedness (i.e. dsdz sign)
 
86
  * supplied in which case we will use that to exclude wrong sign candidates.
 
87
  *
 
88
  * @param[in] pStart 4D double array holding xc, yx, radius, dsdz_initial_seed
 
89
  * @param[in] handedness Particle rotation direction
 
90
  * @param[in] cut The chisq per dof cut from pattern recognition
 
91
  * @param[in] Chi2Function std::function used to calculate the chisq
 
92
  * @return The optimised dsdz_seed (hopefully for the rough global minimum of the chisq func)
 
93
  */
 
94
double LocateGlobalChiSqMinimum(const double* pStart, int handedness, double cut,
 
95
                                std::function<double(const double*)> Chi2Function); //NOLINT(*)
81
96
}
82
97
 
83
98
#endif