EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GblFitter.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GblFitter.h
1 /* Copyright 2013
2  * Authors: Sergey Yashchenko and Tadeas Bilka
3  *
4  * This file is part of GENFIT.
5  *
6  * GENFIT is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published
8  * by the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GENFIT is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18  */
23 #ifndef GblFitter_H
24 #define GblFitter_H
25 
26 #include "GblTrajectory.h"
27 #include "AbsFitter.h"
28 #include "AbsTrackRep.h"
29 #include "GblFitterInfo.h"
30 #include "GblFitStatus.h"
32 
33 #include <map>
34 #include <iostream>
35 
36 #include <TMatrixD.h>
37 #include <assert.h>
38 #include <sstream>
39 
40 #include <TMath.h>
41 #include <TVector3.h>
42 
43 
44 namespace genfit {
45 
46  class GblTrackSegmentController;
47 
53  class GblFitter : public AbsFitter {
54 
55  private:
56  GblFitter(const GblFitter&);
57  GblFitter& operator=(GblFitter const&);
58 
62  unsigned int m_externalIterations;
63  unsigned int m_recalcJacobians;
64 
65  // Minimum scattering sigma (will be squared and inverted...)
66  double scatEpsilon;
68 
69  public:
70 
75 
79  virtual ~GblFitter();
80 
100  void setOptions(std::string internalIterations = "", bool enableScatterers = true, bool enableIntermediateScatterer = true, unsigned int externalIterations = 1, unsigned int recalcJacobians = 1) {
101  m_externalIterations = externalIterations;
102  m_gblInternalIterations = internalIterations;
103  m_recalcJacobians = recalcJacobians;
104  if (!enableScatterers)
105  enableIntermediateScatterer = false;
106  m_enableScatterers = enableScatterers;
107  m_enableIntermediateScatterer = enableIntermediateScatterer;
108  }
109 
110 
119  void setMSOptions(bool enableScatterers = true, bool enableIntermediateScatterer = true) {
120  if (!enableScatterers)
121  enableIntermediateScatterer = false;
122  m_enableScatterers = enableScatterers;
123  m_enableIntermediateScatterer = enableIntermediateScatterer;
124  }
125 
145  void getScattererFromMatList(double& length,
146  double& theta, double& s, double& ds,
147  const double p, const double mass, const double charge,
148  const std::vector<genfit::MatStep>& steps) const;
149 
155  void processTrackWithRep(Track* trk, const AbsTrackRep* rep, bool resortHits = false) override;
156 
165  double constructGblInfo(Track* trk, const AbsTrackRep* rep);
166 
189 
196  std::vector<gbl::GblPoint> collectGblPoints(genfit::Track* trk, const genfit::AbsTrackRep* rep);
197 
206  void cleanGblInfo(Track* trk, const AbsTrackRep* rep) const;
207 
215  void sortHits(Track* trk, const AbsTrackRep* rep) const;
216 
218 
219 
220  public:
221 
222  ClassDef(GblFitter, 2)
223 
224  };
225 
226 } /* End of namespace genfit */
229 #endif // GblFitter_H
230