PandaRoot
PndLmdLineTask.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 //
15 // Description:
16 // 3D Straight Line fitter
17 //
18 // Author List:
19 // Mathias Michel
20 //
21 //-----------------------------------------------------------
22 
23 #ifndef PNDLMDLINETASK_H
24 #define PNDLMDLINETASK_H
25 
26 // Base Class Headers ----------------
27 #include <TGraph2D.h>
28 #include <TGraph2DErrors.h>
29 #include "FairTask.h"
30 
31 // Collaborating Class Headers -------
32 #include <map>
33 #include "TMatrixDSym.h"
34 #include "TMatrixTSym.h"
35 #include "TString.h"
36 #include "TVector3.h"
37 // Collaborating Class Declarations --
38 class TClonesArray;
39 class TGeoManager;
40 
41 class PndLmdLineTask : public FairTask {
42  public:
43  // Constructors/Destructors ---------
44  PndLmdLineTask(TString hitBranch = "LMDHitsStrip");
45 #ifndef __CINT__
46  PndLmdLineTask(const PndLmdLineTask &) = delete;
47  PndLmdLineTask &operator=(const PndLmdLineTask &) = delete;
48 #endif
49  virtual ~PndLmdLineTask();
50 
51  virtual InitStatus Init();
52 
53  virtual void Exec(Option_t *opt);
54 
55  protected:
56  // static void SumDistance2(int &, double *, double & sum, double * par, int
57  // ); //for Fitter
58  // static void LocalFCN(int &, double *, double & sum, double * par, int );
59  // //for Fitter in local coordinates
60  /* //minimization distance in 3D */
61  // static double distance2(double x,double y,double z, double *p);
62  // minimization distance in 2D in local coordinates
63  // static double distance_l(double x, double y, double z, double errx, double
64  // erry, double errz, double *p);
65  // minimization perpendicular distance between point and 3D line
66  // static double distance_perp(double x,double y,double z, double errx,double
67  // erry,double errz, double *p);
68 
69  // Input Data------------
70  TClonesArray *fTCandArray;
71  TClonesArray *fRecoArray;
72  TClonesArray *fTruePointArray;
73 
75  TString fRecoBranchName;
77  // Output Data----------
78  TClonesArray *fTrackArray;
79 
80  // Bool_t firstIt;
81 
82  Int_t fTrackcount;
83 
84  Int_t fEvent;
85 
86  // Fitting ------------
87  // void line(double t, double *p, double &x, double &y, double &z);
88  double line3Dfit(Int_t nd, TGraph2DErrors *gr, Double_t *fitpar, Double_t *fitparErr);
89  double line3Dfit(Int_t nd, TGraph2DErrors *gr, TVector3 posSeed, TVector3 dirSeed, Double_t *fitpar, TMatrixDSym *covmatrix);
90  // double line3Dfit(Int_t nd, TGraph2DErrors* gr, TVector3 posSeed, TVector3
91  // dirSeed, Double_t* fitpar);
92 
94 };
95 
96 #endif
virtual InitStatus Init()
PndLmdLineTask(TString hitBranch="LMDHitsStrip")
ClassDef(PndLmdLineTask, 1)
TClonesArray * fTrackArray
TClonesArray * fRecoArray
TString fTCandBranchName
TString fTruePointBranch
TString fRecoBranchName
TClonesArray * fTruePointArray
virtual ~PndLmdLineTask()
TClonesArray * fTCandArray
virtual void Exec(Option_t *opt)
double line3Dfit(Int_t nd, TGraph2DErrors *gr, Double_t *fitpar, Double_t *fitparErr)
PndLmdLineTask & operator=(const PndLmdLineTask &)=delete