PandaRoot
PndGFRecoFit.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
21 #pragma once
22 
23 #include "PndTrack.h"
25 
26 #include "AbsKalmanFitter.h"
27 #include "MeasurementFactory.h"
28 
30 
31 #include "FairGeanePro.h"
32 
33 class PndGFRecoFit {
34  public:
35  PndGFRecoFit();
36  virtual ~PndGFRecoFit();
37 
42  void Init();
43 
50  PndTrack *Fit(PndTrack *prefit, int pdgcode);
51 
57  void SetFitter(genfit::AbsKalmanFitter *fitter) { fFitter = fitter; }
58 
66  void SetPropagateToIP(bool val = true) { fPropagateToIP = val; }
67 
71  void SetPropagateDistance(double val) { fPropagateDistance = val; }
72 
74 
75  protected:
76  void SetDefaultFitter();
77 
78  private:
80  genfit::AbsKalmanFitter *fFitter = nullptr;
81  bool fPropagateToIP = false;
82  float fPropagateDistance = 2.0;
83  // bool fPerpPlane = false;
84  FairGeanePro *fPro0 = nullptr; // todo: replace Geane propagator with genfit propagator
85  genfit::EventDisplay* fGFdisplay = nullptr;
86 
87  int fVerbose = 0;
88 };
Event display designed to run with Genfit.
Definition: EventDisplay.h:65
void SetPropagateDistance(double val)
Sets the distance the initial parameters are propagated backward along the track. ...
Definition: PndGFRecoFit.h:71
PndTrack * Fit(PndTrack *prefit, int pdgcode)
Method to perform the fit of a track.
Abstract base class for Kalman fitter and derived fitting algorithms.
void UseEventDisplay()
Definition: PndGFRecoFit.h:73
Class to perform a kalman fit via genfit2 within PandaRoot.
Definition: PndGFRecoFit.h:33
virtual ~PndGFRecoFit()
void Init()
Initialization of the fitter Has to be called in the Init() call of a task to initialize the TClones...
void SetDefaultFitter()
void SetPropagateToIP(bool val=true)
Toggle between initial propagation to primary vertex or to a given length The start values for the k...
Definition: PndGFRecoFit.h:66
static EventDisplay * getInstance()
void SetFitter(genfit::AbsKalmanFitter *fitter)
Set different genfit2 fitters If no external fitter is set a default fitter is generated.
Definition: PndGFRecoFit.h:57