PandaRoot
PndSttSkewStrawPzFinderAnalysisTask.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  * PndSttSkewStrawPzFinderAnalysisTask.h
15  *
16  * Created on: Apr 6, 2016
17  * Author: walan603
18  */
19 
20 #ifndef PNDSTTSKEWSTRAWPZFINDERANALYSISTASK_H_
21 #define PNDSTTSKEWSTRAWPZFINDERANALYSISTASK_H_
22 
23 #include <FairTask.h>
24 #include <FairMCPoint.h>
26 
27 class TClonesArray;
28 class TCanvas;
29 class PndGeoSttPar;
30 class PndSttHit;
31 class PndTrack;
32 class PndTrackCand;
33 
34 // class PndMCMatch;
35 // class PndMCResult;
36 
37 using namespace std;
38 
39 class PndSttSkewStrawPzFinderAnalysisTask : public FairTask {
40  public:
42 
44 
46  void setDraw(bool input) { fDraw = input; }
47 
48  void AddHitsBranchName(TString name) { fBranchNames.push_back(name); }
49  void setIdealTrackBranch(TString input) { IdealTrackBranchName = input; }
50  void setIdealTrackCandBranch(TString input) { IdealTrackCandBranchName = input; }
51  void setTrackBranch(TString input) { TrackBranchName = input; }
52  void setTrackCandBranch(TString input) { TrackCandBranchName = input; }
53  void setPzDataBranch(TString input) { PzDataBranchName = input; }
54 
55  virtual InitStatus Init();
56 
57  virtual void Exec(Option_t *opt);
58 
59  virtual void Finish();
60 
61  private:
62  Int_t fVerbose;
63  bool fDraw;
64  TString IdealTrackBranchName;
65  TString IdealTrackCandBranchName;
66  TString TrackBranchName;
67  TString TrackCandBranchName;
68  TString PzDataBranchName;
69 
70  std::vector<TString> fBranchNames;
71  std::map<TString, TString> fPointBranchMap;
72 
73  TClonesArray *fEventHeader;
74  TCanvas *SttXYproj;
75  TCanvas *SZCanvas;
76 
77  vector<PndSttHit *> fSkewedHits;
78  PndGeoSttPar *fSttParameters; // for filling fTubeArray
79  TClonesArray *fTubeArray;
80 
81  TClonesArray *fMCTrack;
82 
83  TClonesArray *fIdealTrackCand;
84  TClonesArray *fIdealTrack;
85 
86  TClonesArray *fFinalTrackCand;
87  TClonesArray *fFinalTrack;
88  // TClonesArray *fFinalRiemannTrack;
89 
90  TClonesArray *fPzData;
91 
92  // QA histograms
93  TH1F *hSttSZErr;
94  TH1F *hSttSZErrAbs;
95  TH1F *hSttSZmct;
96  TH1F *hSttSZErrTrue;
97  TH1F *hSttSZErrAbsTrue;
98  TH1F *hSttSZmctTrue;
99 
100  void GetCenterOfTrack(PndTrack *temp, TVector2 &center, double &radius);
101 
102  void DrawSkewTubeLines(PndSttHit *hit);
103 
104  void DrawStt(bool isskew);
105 
106  void DrawHitIsochrone(PndSttHit *hit, Color_t color);
107 
108  void DrawHitSkewedIsochrone(PndSttHit *hit, Color_t color, Double_t beta, Double_t a, Double_t b);
109 
110  void DrawTrackParams(PndTrack *track);
111 
112  void DrawCombiLines(vector<vector<TVector2>> SZPairVector);
113 
114  // void DrawCombiLinesResult(vector<vector<TVector2>> TrueSZ);
115 
116  void DrawSZBase(PndSttSkewStrawPzFinderData *data);
117 
118  void DrawTrack(PndTrack *temp);
119 };
120 
121 #endif /* PNDSTTSKEWSTRAWPZFINDERANALYSISTASK_H_ */
STL namespace.