PandaRoot
PndHoughTrackFinderTask.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 
14 // PndHoughTrackFinderTask
15 // Finds Track for one event
17 
28 #ifndef PndHoughTrackFinderTask_H_
29 #define PndHoughTrackFinderTask_H_
30 
31 #include "FairTask.h"
32 #include "PndGeoSttPar.h"
33 #include <vector>
34 #include "PndHoughTrackFinder.h"
35 
36 class PndHoughTrackFinderTask : public FairTask {
37  public:
38 
41 
43  virtual ~PndHoughTrackFinderTask();
44 
46  virtual void SetParContainers();
47 
49  virtual InitStatus Init();
50 
51  virtual void AddBranchName(TString name)
52  {
53  fBranchNames.push_back(name);
54  }
55  virtual void AddBranchName(TString name, TString mcName)
56  {
57  fBranchNames.push_back(name);
58  }
59 
61  virtual void SetBinningX(double bin) { fNbins1 = bin; };
63  virtual void SetBinningY(double bin) { fNbins2 = bin; };
65  virtual void SetNBinsSeg(Int_t n) { fNBinsSeg = n; };
67  virtual void SetCutMergeByHoughSpace(float cut) { fCutMergeByHoughSpace = cut; }
69  virtual void SetWithCuda(bool cuda) { fWithCuda = cuda; }
71  virtual void SetPreselectedTrackCandName(TString name) { fPreselectedTrackCandName = name; }
72 
78  virtual void SetWithGhostReduction(bool ghostred) { fWithGhostReduction = ghostred; }
79 
81  virtual void Exec(Option_t *opt);
82  bool CheckZInfo(PndTrackCand &cand);
83 
84  virtual void Finish();
85 
86  private:
87  FairRootManager *ioman = nullptr;
88 
89  float fCutMergeByHoughSpace;
90  Int_t fNbins1;
91  Int_t fNbins2;
92  Int_t fNBinsSeg;
93  bool fWithCuda;
94  bool fWithGhostReduction;
95  TString fPreselectedTrackCandName;
96  std::vector<TString> fBranchNames;
97  std::map<TString, TClonesArray *> fBranchMap;
98 
99  PndGeoSttPar *fSttParameters = nullptr; // needed for SttStrawMap
100  TClonesArray *fSttTubeArray = nullptr;
101 
102  PndHoughTrackFinder *fPndHoughTrackFinder = nullptr;
103 
105  TClonesArray *fPreselectedTrackArrayCand = nullptr;
106  TClonesArray *fApolloniusTrackArrayMerged = nullptr;
107  TClonesArray *fApolloniusTrackArrayMergedCand = nullptr;
108  TClonesArray *fCombinedSkewed = nullptr;
109 
110  ClassDef(PndHoughTrackFinderTask, 1);
111 };
112 
113 #endif /*PndHoughTrackFinderTask_H_*/
virtual void Finish()
virtual void AddBranchName(TString name, TString mcName)
Search for tracks only in given branches. If no BranchName is given all tracking detectors are taken...
virtual void SetWithGhostReduction(bool ghostred)
Sets a bool for deciding to use a ghost reduction. Per default a ghost reduction is performed...
virtual void SetBinningY(double bin)
Sets the number of bins used for the y direction of the Hough space.
virtual void AddBranchName(TString name)
Search for tracks only in given branches. If no BranchName is given all tracking detectors are taken...
bool CheckZInfo(PndTrackCand &cand)
virtual InitStatus Init()
Initializes and loads the data for the HoughTrackFinder.
virtual void Exec(Option_t *opt)
virtual void SetBinningX(double bin)
Sets the number of bins used for the x direction of the Hough space.
virtual void SetWithCuda(bool cuda)
Sets a bool for deciding to use cuda.
virtual void SetCutMergeByHoughSpace(float cut)
Sets the cut value for the distance of two maxima in the Hough space which have to be merged...
virtual void SetNBinsSeg(Int_t n)
Sets the number of bins used for the segmentation preselection algorithm.
virtual void SetPreselectedTrackCandName(TString name)
Sets a bool for deciding to use cuda.
virtual void SetParContainers()
virtual ~PndHoughTrackFinderTask()