Belle II Software  release-08-01-10
GFGbl.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 GFGBL_H
24 #define GFGBL_H
25 
26 #include "GblTrajectory.h"
27 #include "AbsFitter.h"
28 
29 #include <map>
30 #include <iostream>
31 
32 #include <TMatrixD.h>
33 #include <assert.h>
34 #include <sstream>
35 
36 #include <TMath.h>
37 #include <TVector3.h>
38 
39 
40 namespace genfit {
41 
42 
48  class GFGbl : public AbsFitter {
49 
50  private:
51  GFGbl(const GFGbl&);
52  GFGbl& operator=(GFGbl const&);
53 
54  std::string m_milleFileName;
55  std::string m_gblInternalIterations;
56  double m_pValueCut;
57  int m_minNdf;
58  double m_chi2Cut;
59  bool m_enableScatterers;
60  bool m_enableIntermediateScatterer;
61 
62 
63  public:
64 
68  GFGbl();
69 
73  virtual ~GFGbl() {;}
74 
79  void beginRun();
80 
86  void endRun();
87 
88 
94  void setGBLOptions(std::string internalIterations = "THC", bool enableScatterers = true, bool enableIntermediateScatterer = true) {
95  m_gblInternalIterations = internalIterations;
96  if (!enableScatterers)
97  enableIntermediateScatterer = false;
98  m_enableScatterers = enableScatterers;
99  m_enableIntermediateScatterer = enableIntermediateScatterer;
100  }
101 
109  void setMP2Options(double pValueCut = 0., unsigned int minNdf = 1, std::string mille_file_name = "millefile.dat", double chi2Cut = 0.) {
110  m_pValueCut = pValueCut;
111  m_minNdf = minNdf;
112  m_milleFileName = mille_file_name;
113  m_chi2Cut = chi2Cut;
114  }
115 
120  void processTrackWithRep(Track* trk, const AbsTrackRep* rep, bool resortHits = false) override;
121 
122 
123  public:
124 
125  ClassDef(GFGbl, 1)
126 
127  };
128 
129 } /* End of namespace genfit */
132 #endif // GFGBL_H
133 
GblTrajectory definition.
Abstract base class for fitters.
Definition: AbsFitter.h:35
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
Generic GBL implementation.
Definition: GFGbl.h:48
virtual ~GFGbl()
Destructor.
Definition: GFGbl.h:73
GFGbl()
Constructor.
Definition: GFGbl.cc:175
void beginRun()
Creates the mille binary file for output of data for Millepede II alignment, can be set by setMP2Opti...
Definition: GFGbl.cc:184
void endRun()
Required to write and close ROOT file with debug output.
Definition: GFGbl.cc:231
void setMP2Options(double pValueCut=0., unsigned int minNdf=1, std::string mille_file_name="millefile.dat", double chi2Cut=0.)
Sets GBL & Millepede settings.
Definition: GFGbl.h:109
void processTrackWithRep(Track *trk, const AbsTrackRep *rep, bool resortHits=false) override
Performs fit on a Track.
Definition: GFGbl.cc:327
void setGBLOptions(std::string internalIterations="THC", bool enableScatterers=true, bool enableIntermediateScatterer=true)
Sets internal GBL down-weighting.
Definition: GFGbl.h:94
Collection of TrackPoint objects, AbsTrackRep objects and FitStatus objects.
Definition: Track.h:71
Defines for I/O streams used for error and debug printing.