PandaRoot
PndLmdKalmanTask.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 
13 //-----------------------------------------------------------
14 // File and Version Information:
15 // $Id$
16 //
17 // Description:
18 // Kalman Filter Task
19 //
20 // Environment:
21 // Software developed for the PANDA Detector at FAIR.
22 //
23 // Author List:
24 // Sebastian Neubert TUM (original author)
25 // Ralf Kliemt, TU Dresden (Copied for MVD use)
26 // Anastasia Karavdina, Uni Mainz (Copied for Lmd use)
27 //-----------------------------------------------------------
28 
29 #ifndef PNDLMDKALMANTASK_H
30 #define PNDLMDKALMANTASK_H
31 
32 // Base Class Headers ----------------
33 #include "FairTask.h"
34 
35 // Collaborating Class Headers -------
36 #include <map>
37 #include "FairGeanePro.h"
38 #include "GFFieldManager.h"
39 #include "GFTrack.h"
40 #include "PndGeoHandling.h"
41 #include "PndLinTrack.h"
42 #include "TMatrixD.h"
43 #include "TString.h"
44 
45 // Collaborating Class Declarations --
46 class TClonesArray;
47 class GFRecoHitFactory;
48 class TH1D;
49 class TGeoManager;
50 
51 class PndLmdKalmanTask : public FairTask {
52  public:
53  // Constructors/Destructors ---------
55  PndLmdKalmanTask(TString HitBranch, TString TrackBranch);
56  virtual ~PndLmdKalmanTask();
57 
58  // Operators
59 
60  // Accessors -----------------------
61 
62  // Modifiers -----------------------
63  void SetTrackBranchName(const TString &name) { fTrackBranchName = name; }
64  void SetPersistence(Bool_t opt = kTRUE) { fPersistence = opt; }
65 
66  void SetGeaneTrkRep(Bool_t val = kTRUE) { flGEANE = val; }
67  void SetRKTrkRep(Bool_t val = kTRUE) { flRK = val; }
68 
69  void SetScalePError(double sc) { fscaleP = sc; }
70  void SetScaleMError(double sc) { fscaleM = sc; }
71  // Operations ----------------------
72 
73  virtual InitStatus Init();
74 
75  virtual void Exec(Option_t *opt);
76  virtual void SetFilterFlag(bool val) { flagFilter = val; };
77  // void WriteHistograms(const TString& filename);
78 
79  private:
80  bool flGEANE; // if true use GEANE representation
81  bool flRK; // if true use Runge-Kutta representation
82 
83  double fscaleP; // scale factor for test initial Position errors
84  double fscaleM; // scale factor for test initial Momentum errors
85  /* TH1D *hxpull; */
86  /* TH1D *hypull; */
87  /* TH1D *hzpull; */
88  /* TH1D *hpxpull; */
89  /* TH1D *hpypull; */
90  /* TH1D *hpzpull; */
91 
92  // Private Data Members ------------
93  TClonesArray *fTrackArray;
94  // TClonesArray* fGFTrackArray;
95  TClonesArray *fTrackTmpArray;
96  TClonesArray *fTrkOutArray;
97  TClonesArray *fTrackParFinal;
98  TClonesArray *fSdsHitsArray;
99  TString fTrackBranchName;
100  TString fSdsHitBranchName;
101  Bool_t fPersistence;
102 
103  GFRecoHitFactory *fTheRecoHitFactory;
104  PndGeoHandling *fGeoH;
105 
106  /* TH1D* fPH; // momentum histo; */
107  /* TH1D* fChi2H; // chi2 histo; */
108  /* TH1D* fMassV0; // chi2 histo; */
109  /* TH1D* fMassETAC; // chi2 histo; */
110  /* TH1D* fMasses; // all particle histo; */
111 
112  Int_t fTrackcount;
113 
114  Int_t fEvent;
115  TGeant3 *gMC3;
116  FairGeanePro *fPro;
117  int fsensType; // 0=strips sensors, 1=Pixel sensors
118  Double_t fPbeam; // beam momentum
119  Int_t fPDGCode;
120  Double_t fCharge;
121  // PndLinTrack* GenfitTrack2PndLinTrack(const GFTrack* tr);
122  GFFieldManager *gfMagField;
123  bool flagFilter;
124 
125  // public:
126  ClassDef(PndLmdKalmanTask, 1);
127 };
128 
129 #endif
130 
131 //--------------------------------------------------------------
132 // $Log$
133 //--------------------------------------------------------------
virtual void Exec(Option_t *opt)
void SetTrackBranchName(const TString &name)
void SetGeaneTrkRep(Bool_t val=kTRUE)
virtual InitStatus Init()
Class to access the naming information of the MVD.
Factory object to create RecoHits from digitized and clustered data.
void SetRKTrkRep(Bool_t val=kTRUE)
void SetScalePError(double sc)
virtual void SetFilterFlag(bool val)
void SetScaleMError(double sc)
virtual ~PndLmdKalmanTask()
void SetPersistence(Bool_t opt=kTRUE)
Singleton which provides access to magnetic field for track representations.