PandaRoot
PndCurlingTrackFinder.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  * PndCurlingTrackFinder.h
15  *
16  * Created on: 06.07.2021
17  * Author: tstockmanns
18  */
19 
20 #pragma once
21 
22 #include "TClonesArray.h"
23 #include "TVector3.h"
24 #include <vector>
25 #include <iostream>
26 
27 #include "PndSttStrawMap.h"
28 #include "PndSttGeometryMap.h"
29 #include "PndSttHit.h"
30 
31 #include "PndPreselectSttHits.h"
32 #include "PndSttCA.h"
33 #include "PndApolloniusTriplet.h"
34 using namespace PndApollonius;
35 
37  public:
38  PndCurlingTrackFinder(TClonesArray *tubeArray);
39  // PndCurlingTrackFinder(){ }
40  virtual ~PndCurlingTrackFinder();
41 
42  void Reset();
43  void FindTracks();
44  std::vector<TripletSolution> GetSolutions() const { return fSolutions; }
45 
46  virtual void SetWithTubeReduction(bool reduction) { fWithTubeReduction = reduction; };
47  virtual void SetCATrackFinder(PndSttCA *CAFinder) { fCATrackFinder = CAFinder; };
48  virtual void SetUnassignedSttHits(std::vector<PndSttHit *> &hits) { fUnassignedSttHits = hits; };
49  virtual void SetSttHits(std::vector<PndSttHit *> &hits) { fSttHits = hits; };
50  virtual void SetBranchMap(std::map<TString, TClonesArray *> &map) { fBranchMap = map; };
51 
52  std::vector<TripletSolution> GetTripletTracks() const { return fTripletTracks; }
53  std::vector<TripletSolution> GetContinuousTripletTracks() const { return fContinuousTripletTracks; }
54  std::vector<TripletSolution> GetTripletTracksAfterAdding() const { return fTripletTracksAfterAdding; }
55 
56  protected:
57  TripletValues GetTripletsCurledTracks(std::map<int, std::vector<std::vector<PndSttHit *>>> &tubeStructure);
58  TripletValues GetTripletsCurledTracks2();
59 
60  // std::map<int, std::vector<std::vector<PndSttHit *>>> DeleteFromCurlingPool(std::vector<TripletSolution> &combinedSolutions, std::map<int, std::vector<std::vector<PndSttHit
61  // *>>> &CombinedTubeStructure);
62  int GetMidIndex(int firstIndex, int lastIndex);
63 
64  private:
66  std::vector<TripletSolution> fSolutions;
67  std::vector<TripletSolution> fTripletTracks;
68  std::vector<TripletSolution> fContinuousTripletTracks;
69  std::vector<TripletSolution> fTripletTracksAfterAdding;
70 
71  std::vector<PndSttHit *> fUnassignedSttHits;
72  std::vector<PndSttHit *> fSttHits;
73  int fAllHitsCounter;
74  bool fIsStrongCurling;
75  bool fWithTubeReduction;
76  bool fWithCombiReduction = false;
77  PndSttCA *fCATrackFinder = nullptr;
78  PndSttGeometryMap *fGeometryMap = nullptr;
79  PndSttStrawMap *fStrawMap = nullptr;
80  std::map<TString, TClonesArray *> fBranchMap;
81  std::map<FairLink, int> fMapHitstoCATracklet;
82  int fBeforeSkewedRowNumber = 7;
83  int fAfterSkewedRowNumber = 16;
84 };
std::vector< TripletSolution > GetSolutions() const
A structure that defines all functions used for the Apollonius Triplet track finder.
virtual void SetCATrackFinder(PndSttCA *CAFinder)
std::vector< TripletSolution > GetContinuousTripletTracks() const
virtual void SetWithTubeReduction(bool reduction)
std::vector< TripletSolution > GetTripletTracksAfterAdding() const
virtual void SetSttHits(std::vector< PndSttHit *> &hits)
virtual void SetBranchMap(std::map< TString, TClonesArray *> &map)
virtual void SetUnassignedSttHits(std::vector< PndSttHit *> &hits)
std::vector< TripletSolution > GetTripletTracks() const
A structure that defines the three sets of STT hits (inner, mid, outer STT set), that are used to com...