PandaRoot
PndFtsTrackFinderTask.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 
20 #pragma once
21 
22 #include "TClonesArray.h"
23 
24 #include "FairTask.h"
25 
26 #include "PndTrackCand.h"
27 #include "PndFtsContext.h"
28 #include "PndFtsReconRunner.h"
29 #include "FairTask.h"
30 #include "FairRootManager.h"
31 #include "PndPersistencyTask.h"
32 
34 
35 #include "tool/PndFtsSimpleHit.h"
36 
38  public:
43  explicit PndFtsTrackFinderTask(const TString &name = "PndFtsTrackFinder");
44 
46 
48 
50 
52 
53  ~PndFtsTrackFinderTask() override;
54 
59  void Exec(Option_t *option) override;
60 
67  void SetOutputBranchName(const TString &name);
68 
75 
76  protected:
81  InitStatus Init() override;
82 
86  void Finish() override;
87 
88  private:
89  void PrintTmpTracks() const;
90 
91  [[nodiscard]] static PndFtsTrackFinder::PndFtsGeom ReadRootGeom(std::string_view filename);
92 
93  FairRootManager *ioman;
94 
95  int32_t fInBranchId;
96  TString fInBranchName;
97  TString fOutBranchName;
98  TString fOutCandBranchName;
99  TString fOutAnalyticBranchName;
101 
102  TClonesArray *fInHits;
103 
104  TClonesArray fOutTrackCands;
105  TClonesArray fOutTracks;
106  TClonesArray fOutAnalyticTracks;
107 
108  std::vector<PndFtsTrackFinder::PndFtsSimpleHit> fTmpHits;
109  std::vector<PndFtsTrackFinder::PndFtsFullTrack> fTmpTracks;
110 
111  // Those are unique_ptr for the sake of lazy initialization of the task ( Init() method ).
112  std::unique_ptr<PndFtsTrackFinder::PndFtsContext> fReconContext;
113  std::unique_ptr<PndFtsTrackFinder::PndFtsReconRunner> fReconRunner;
114  std::unique_ptr<PndFtsTrackFinderPndTrackProducer> fPndTrackProducer;
115 
116  ClassDef(PndFtsTrackFinderTask, 1);
117 };
PndFtsTrackFinderTask operator=(const PndFtsTrackFinderTask &)=delete
PndFtsTrackFinderTask(const TString &name="PndFtsTrackFinder")
InitStatus Init() override
PandaRoot task providing PndFtsTrackFinder functionality.
~PndFtsTrackFinderTask() override
void SetMomentumEstimationMethod(PndFtsTrackFinder::PndFtsMomEstMethod momEstMethod)
void Finish() override
void Exec(Option_t *option) override
void SetOutputBranchName(const TString &name)