PandaRoot
PndHoughTrackCorrection.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 // PndHoughTrackCorrection
15 // A class to correct a PndTrack: only hits which are close enough to the track are added to the track
17 
28 #ifndef PndHoughTrackCorrection_H_
29 #define PndHoughTrackCorrection_H_
30 
31 #include "PndHoughUtilities.h"
32 #include "PndHoughData.h"
33 
34 #include <vector>
35 
37 
38  public:
40  {
41  ioman = FairRootManager::Instance();
42  fMapFairLinktoFairHit = fData->GetMapFairLinktoFairHit();
43  fMapFairLinktoIsochrone = fData->GetMapFairLinktoIsochrone();
44  };
45 
46  virtual ~PndHoughTrackCorrection() { delete ioman; };
47  virtual void SetUtilities(PndHoughUtilities *utilities) { fPndHoughUtilities = utilities; };
49  TVector3 FindMinimumHit(PndTrackCand &trackCand, std::vector<double> &circle);
51  double calc_rho(TVector3 &Hit, TVector3 &Track, TVector3 &Hitmin);
53  PndTrackCand calcCorrectTrackCand(PndTrackCand &trackCand, TVector3 &Track, PndTrackCand &trackCandTot);
55  PndTrackCand GetApolloniusTrackCand() { return fApolloniusTrackCand; };
57  PndTrackCand changeHitOrder(PndTrackCand &trackCand, TVector3 &Track, TVector3 &Hitmin);
58 
59  private:
60  PndHoughUtilities *fPndHoughUtilities = nullptr;
61  FairRootManager *ioman = nullptr;
62  std::map<FairLink, FairHit *> fMapFairLinktoFairHit;
63  std::map<FairLink, Double_t> fMapFairLinktoIsochrone;
64  PndTrackCand fApolloniusTrackCand;
65 
66  ClassDef(PndHoughTrackCorrection, 1);
67 };
68 
69 #endif /*PndHoughTrackCorrection_H_*/
double calc_rho(TVector3 &Hit, TVector3 &Track, TVector3 &Hitmin)
Calculates rho for a hit. It is calculated as the path length of the particle track.
PndTrackCand calcCorrectTrackCand(PndTrackCand &trackCand, TVector3 &Track, PndTrackCand &trackCandTot)
Corrects the track candidate: only hits are used that are close to the calculated track (d < 0...
std::map< FairLink, FairHit * > GetMapFairLinktoFairHit() const
Returns the map linking FairLinks to FairHits.
Definition: PndHoughData.h:104
virtual void SetUtilities(PndHoughUtilities *utilities)
PndTrackCand GetApolloniusTrackCand()
Returns the corrected track candidate.
PndHoughTrackCorrection(PndHoughData *fData)
PndTrackCand changeHitOrder(PndTrackCand &trackCand, TVector3 &Track, TVector3 &Hitmin)
Sorts a trackCand based on the Rho value.
std::map< FairLink, Double_t > GetMapFairLinktoIsochrone() const
Returns the map linking FairLinks to isochrone radii.
Definition: PndHoughData.h:106
TVector3 FindMinimumHit(PndTrackCand &trackCand, std::vector< double > &circle)
Determines the first hit of a track as the one closest to the interaction point.