PandaRoot
PndSttCellTrackFinderAnalysisTask.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  * PndSttCellTrackFinderAnalysisTask.h
15  *
16  * Created on: Jun 26, 2013
17  * Author: schumann
18  */
19 
20 #ifndef PndSttCellTrackFinderAnalysisTask_H_
21 #define PndSttCellTrackFinderAnalysisTask_H_
22 
23 #include "FairTask.h"
24 #include "TH1I.h"
25 #include "TCanvas.h"
26 #include "FairMultiLinkedData.h"
27 
28 #include <map>
29 #include <vector>
30 #include <fstream>
31 
32 class TClonesArray;
33 class PndMCMatch;
34 class PndGeoSttPar;
35 class PndMCResult;
36 
37 class PndSttCellTrackFinderAnalysisTask : public FairTask {
38  public:
39  PndSttCellTrackFinderAnalysisTask() : FairTask("Stt Cell TrackFinder Analysis Task"){};
41 
43  virtual void SetParContainers();
44  virtual InitStatus Init();
45 
47  virtual void Exec(Option_t *opt);
48  virtual void FinishEvent();
49  virtual void Finish();
50 
51  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
52 
53  private:
54  /*Method for testing functionality of Conformal Mapping (Circle Fit)*/
55  void CheckConformalMap();
56 
57  /*Method verifies the result of the first step of the trackfinding-algorithm*/
58  void CheckFirstTracklets();
59 
60  /*Method verifies the result of the second step of the trackfinding-algorithm*/
61  void CheckTrackletCombinations();
62 
63  /*Method for drawing STTHits + Circles of Riemann Fit for the first step of trackfinding*/
64  void DrawFirstRiemannPlots(int eventNumber);
65 
66  /*Method for drawing STTHits + Circles of Riemann Fit for the second step of trackfinding*/
67  void DrawCombiRiemannPlots(int eventNumber);
68 
69  int GetNumLinksOfHits(FairMultiLinkedData &hitLinks, PndMCResult &sttHitsToMCTrack, PndMCResult &sttHitToPoint);
70 
71  void TestRecoQualityFirstStep();
72 
73  void TestRecoQualityCombi();
74 
75  void CountMaxHitsFirstStep();
76 
77  void CountMaxHitsCombi();
78 
79  std::map<int, bool> fFoundMC;
80 
81  PndMCMatch *fMCMatch;
82 
83  TClonesArray *fMCTrack;
84 
85  TClonesArray *fFirstTrackCand;
86  TClonesArray *fFirstRiemannTrack;
87  TClonesArray *fCombiTrackCand;
88  TClonesArray *fCombiRiemannTrack;
89 
90  TClonesArray *fEventHeader;
91  TClonesArray *fSTTHits;
92 
93  std::map<int, std::vector<int>> fMapTubeIDToHits; // map<tube-id, vector<indices of SttHits in fSTTHits>>
94  std::map<int, int> fMapHitIndexToTubeID; // map<index of SttHit in fSTTHits, tube-id>
95 
96  PndGeoSttPar *fSttParameters; // for filling fTubeArray
97  TClonesArray *fTubeArray; // contains at index tube-id corresponding PndSttTube
98 
99  // histograms for first step of trackfinding
100  TH1I *fHistoNumberOfLinks1;
101  TH1I *fHistoNumberOfTracklets1;
102  TH1I *fHistoNumberOfAssignedHits1;
103  TH1I *fHistoNumberOfHits1;
104  TH1I *fHistoNumberOfErrors1;
105  TH1I *fHistoMaxHitsOfMCTrack1;
106  TH1I *fHistoNumberOfMissingHits1;
107 
108  TH1I *fHistoQualityFirstStep;
109 
110  // histograms for second step of trackfinding
111  TH1I *fHistoNumberOfLinks2;
112  TH1I *fHistoNumberOfTracklets2;
113  TH1I *fHistoNumberOfHits2;
114  TH1I *fHistoNumberOfErrors2;
115  TH1I *fHistoMaxHitsOfMCTrack2;
116  TH1I *fHistoNumberOfMissingHits2;
117 
118  TH1I *fHistoQualityCombi;
119  TH1I *fHistoNumberOfHitsMCTrack;
120 
121  TCanvas *fCanvas;
122 
124 };
125 
126 #endif /* PndSttCellTrackFinderAnalysisTask_H_ */
virtual void Exec(Option_t *opt)