PandaRoot
PndMQStraightLineTrackFinder.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 // ----- PndMQStraightLineTrackFinder -----
15 // ----- Created 22/10/09 by M. Michel -----
16 // -------------------------------------------------------------------------
17 
18 #ifndef PndMQStraightLineTrackFinder_H
19 #define PndMQStraightLineTrackFinder_H
20 
21 #include "FairTask.h"
22 #include "PndMCTrack.h"
23 #include "PndSdsGeoPar.h"
24 #include "PndSdsHit.h"
25 #include "PndSdsMCPoint.h"
26 #include "PndSdsClusterStrip.h"
27 #include "PndTrackCand.h"
28 #include "PndTrack.h"
29 
30 #include <string>
31 #include <vector>
32 #include <utility>
33 
35  TVector3 origin;
36  TVector3 direction;
37 };
38 
40  public:
45 
46  void SetVerbose(Int_t verbose) { fVerbose = verbose; };
47  void SetSearchRadius(Double_t accu) { dXY = accu; };
48  std::vector<PndTrackCand> FindTracks(std::vector<PndSdsHit> hits);
49 
50  protected:
51  Double_t GetTrackDip(PndMCTrack *myTrack);
52  Double_t GetTrackCurvature(PndMCTrack *myTrack);
53  void SortHitsToLayers(std::vector<PndSdsHit> hits);
54  std::vector<std::vector<int>> GetStartCombination(int firstLayer, int secondLayer);
55  PndTrackCand FindTrack(std::vector<int> startCombi) StraightLineParams GetLineParameters(std::vector<int> startCombi);
56  TVector3 PropagateToXYPlane(StraightLineParams line, Double z);
57  double DistanceOfPoints(TVector3 first, TVector3 second);
58 
59  private:
60  Double_t fdXY;
61  Int_t fNLayers;
62  std::vector<std::vector<std::pair<PndSdsHit, bool>>> fHitsPerLayer;
63 };
64 
65 #endif /* PndMQStraightLineTrackFinder_H */