FairRoot/PandaRoot
PndLmdLinFitTask.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //
3 // Description:
4 // 3D Straight Line fitter
5 //
6 // Author List:
7 // Mathias Michel
8 // Anastasia Karavdina
9 //-----------------------------------------------------------
10 
11 #ifndef PNDLMDLINFITTASK_H
12 #define PNDLMDLINFITTASK_H
13 
14 #include "FairTask.h"
15 
16 #include "TMatrixDSym.h"
17 #include "TString.h"
18 
19 class PndGeoHandling;
20 class TGraph2DErrors;
21 class TClonesArray;
22 class TGeoManager;
23 class TVector3;
24 namespace ROOT {
25 namespace Math {
26 class Minimizer;
27 }
28 }
29 
30 class PndLmdLinFitTask : public FairTask {
31  public:
32  // Constructors/Destructors ---------
34  PndLmdLinFitTask(TString tTCandBranchName, TString tRecoBranchName,
35  TString tOutputBranchName = "LMDPndTrack",
36  TString tOutputFolder = "PndLmd");
37 
38  virtual ~PndLmdLinFitTask();
39 
40  virtual InitStatus Init();
41 
42  virtual void Exec(Option_t* opt);
43 
44  virtual void Finish();
45 
46  void SetRadLen(double x) { ftotRadLen = 1e-2 * x; } // rad.length X/X0 [%]
47 
48  protected:
49  double FCN_MS(const double* vars);
50  static double distance_MS(double x, double y, double z, double errx,
51  double erry, const double* p, double* zpr);
52  double ScatteredAngle(double radLen); // calculate uncertainty for kink angle
53  double line3DfitMS(TGraph2DErrors* gr, const TVector3& posSeed,
54  const TVector3& dirSeed, std::vector<double>& fitpar,
55  TMatrixDSym* covmatrix); // fit with kink angle
56  double GetSigmaMS(int side) {
57  if (side < 1)
58  return fsigmaMSa;
59  else
60  return fsigmaMSb;
61  }
62 
63  // Input Data------------
64  TClonesArray* fTCandArray;
65  TClonesArray* fRecoArray;
66 
71  // Output Data----------
72  TClonesArray* fTrackArray;
73 
74  double fPbeam;
75  double fsigmaMSa; // single hit before CVD diamond
76  double fsigmaMSb; // single hit after CVD diamond
77 
78  bool hitMergedfl[4];
79  double fPDGCode;
80  int fCharge;
82 
83  ROOT::Math::Minimizer* fmin;
84  TGraph2DErrors* fGraph2D;
85 
86  double ftotRadLen; // X/X0
87 
89 };
90 
91 #endif
Double_t p
Definition: anasim.C:58
TGraph2DErrors * fGraph2D
static double distance_MS(double x, double y, double z, double errx, double erry, const double *p, double *zpr)
void SetRadLen(double x)
TClonesArray * fTCandArray
double ScatteredAngle(double radLen)
Class to access the naming information of the MVD.
TClonesArray * fRecoArray
TString vars[MAX]
Definition: autocutx.C:34
Double_t z
double GetSigmaMS(int side)
virtual void Finish()
Double_t x
PndGeoHandling * fGeoH
ROOT::Math::Minimizer * fmin
double FCN_MS(const double *vars)
TClonesArray * fTrackArray
Double_t y
virtual void Exec(Option_t *opt)
double line3DfitMS(TGraph2DErrors *gr, const TVector3 &posSeed, const TVector3 &dirSeed, std::vector< double > &fitpar, TMatrixDSym *covmatrix)
ClassDef(PndLmdLinFitTask, 2)
virtual InitStatus Init()