GENFIT Rev: NoNumberAvailable
Loading...
Searching...
No Matches
GblFitter.h
Go to the documentation of this file.
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 */
22
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
44namespace genfit {
45
47
53 class GblFitter : public AbsFitter {
54
55 private:
58
63 unsigned int m_recalcJacobians;
64
65 // Minimum scattering sigma (will be squared and inverted...)
68
69 public:
70
75
79 virtual ~GblFitter();
80
100 void setOptions(const 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 */
228
229#endif // GblFitter_H
230
GBL trajectory.
Abstract base class for a track representation.
Definition AbsTrackRep.h:66
Generic GBL implementation.
Definition GblFitter.h:53
unsigned int m_recalcJacobians
Definition GblFitter.h:63
bool m_enableScatterers
Definition GblFitter.h:60
unsigned int m_externalIterations
Definition GblFitter.h:62
void updateGblInfo(gbl::GblTrajectory &traj, genfit::Track *trk, const genfit::AbsTrackRep *rep)
Populate all fitter infos in track for rep with results of trajectory fit.
Definition GblFitter.cc:289
void cleanGblInfo(Track *trk, const AbsTrackRep *rep) const
Remove all previous gbl fitter data from track Also removes trackpoints without measurement.
Definition GblFitter.cc:233
GblFitter & operator=(GblFitter const &)
GblFitter(const GblFitter &)
void processTrackWithRep(Track *trk, const AbsTrackRep *rep, bool resortHits=false) override
Definition GblFitter.cc:106
virtual ~GblFitter()
Definition GblFitter.cc:90
double constructGblInfo(Track *trk, const AbsTrackRep *rep)
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set.
Definition GblFitter.cc:376
std::string m_gblInternalIterations
Definition GblFitter.h:59
void getScattererFromMatList(double &length, double &theta, double &s, double &ds, const double p, const double mass, const double charge, const std::vector< genfit::MatStep > &steps) const
Evaluates moments of radiation length distribution from list of material steps and computes parameter...
Definition GblFitter.cc:315
GblTrackSegmentController * m_segmentController
Definition GblFitter.h:67
void setOptions(const std::string &internalIterations="", bool enableScatterers=true, bool enableIntermediateScatterer=true, unsigned int externalIterations=1, unsigned int recalcJacobians=1)
Set options of the fitter/GBL.
Definition GblFitter.h:100
void setTrackSegmentController(GblTrackSegmentController *controler)
Definition GblFitter.cc:97
void sortHits(Track *trk, const AbsTrackRep *rep) const
Sort hits in track by arc-len using extrapolation.
Definition GblFitter.cc:244
void setMSOptions(bool enableScatterers=true, bool enableIntermediateScatterer=true)
Set multiple scattering options of the fitter/GBL.
Definition GblFitter.h:119
std::vector< gbl::GblPoint > collectGblPoints(genfit::Track *trk, const genfit::AbsTrackRep *rep)
Constructs all GBL points and returns them in vector for trajectory construction.
Definition GblFitter.cc:274
bool m_enableIntermediateScatterer
Definition GblFitter.h:61
TrackSegmentController for use with GblFitter.
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition Track.h:71
Defines for I/O streams used for error and debug printing.