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 } // namespace ROOT
29 
30 class PndLmdLinFitTask : public FairTask {
31  public:
32  // Constructors/Destructors ---------
34  PndLmdLinFitTask(TString tTCandBranchName, TString tRecoBranchName, TString tOutputBranchName = "LMDPndTrack", TString tOutputFolder = "PndLmd");
35 
36  virtual ~PndLmdLinFitTask();
37 
38  virtual InitStatus Init();
39 
40  virtual void Exec(Option_t *opt);
41 
42  virtual void Finish();
43 
44  void SetRadLen(double x) { ftotRadLen = 1e-2 * x; } // rad.length X/X0 [%]
45 
46  protected:
47  double FCN_MS(const double *vars);
48  static double distance_MS(double x, double y, double z, double errx, double erry, const double *p, double *zpr);
49  double ScatteredAngle(double radLen); // calculate uncertainty for kink angle
50  double line3DfitMS(TGraph2DErrors *gr, const TVector3 &posSeed, const TVector3 &dirSeed, std::vector<double> &fitpar,
51  TMatrixDSym *covmatrix); // fit with kink angle
52  double GetSigmaMS(int side)
53  {
54  if (side < 1)
55  return fsigmaMSa;
56  else
57  return fsigmaMSb;
58  }
59 
60  // Input Data------------
61  TClonesArray *fTCandArray;
62  TClonesArray *fRecoArray;
63 
65  TString fRecoBranchName;
67  TString fOutputFolder;
68  // Output Data----------
69  TClonesArray *fTrackArray;
70 
71  double fPbeam;
72  double fsigmaMSa; // single hit before CVD diamond
73  double fsigmaMSb; // single hit after CVD diamond
74 
75  bool hitMergedfl[4];
76  double fPDGCode;
77  int fCharge;
79 
80  ROOT::Math::Minimizer *fmin;
81  TGraph2DErrors *fGraph2D;
82 
83  double ftotRadLen; // X/X0
84 
85  ClassDef(PndLmdLinFitTask, 2);
86 };
87 
88 #endif
TGraph2DErrors * fGraph2D
const TString vars[13]
void SetRadLen(double x)
TClonesArray * fTCandArray
Class to access the naming information of the MVD.
TClonesArray * fRecoArray
double GetSigmaMS(int side)
PndGeoHandling * fGeoH
ROOT::Math::Minimizer * fmin
TClonesArray * fTrackArray