PandaRoot
PndFtsHoughTracklet.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 
26 #ifndef PNDFTSHOUGHTRACKLET_H
27 #define PNDFTSHOUGHTRACKLET_H
28 
29 #include "PndFtsHoughTrackerTask.h"
30 
31 // Root Class Headers ----------------
32 #include "PndTrackCand.h"
33 #include "Rtypes.h" // for Double_t, Int_t, etc
34 #include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
35 
36 // For error reporting
37 #include "TString.h"
38 #include <stdexcept>
39 
40 class PndFtsHit;
41 class PndTrack;
42 class TClonesArray;
43 
45  public:
46  // Constructors/Destructors ---------
47  PndFtsHoughTracklet(Double_t zRefLabSys = 0.,
48  PndFtsHoughTrackerTask *trackerTask = nullptr);
50 
51  // Accessors -----------------------
52  void Print() const;
53 
54  Bool_t isSet() const { return fIsSet; }; // returns kTRUE iif data from the 2d Hough transforms have been entered
55 
56  // add results from Hough transforms
57  void SetHoughTransformResults(const Double_t thetaVal, const Double_t secondVal, const Double_t peakHeight, const Double_t thetaHw, const Double_t secondHw);
58 
59  // getters for Hough space peak info
60  Double_t getPeakHeightFromPeakFinder() const { return fPeakHeightFromPeakFinder; };
61  Double_t getThetaRadVal() const { return fThetaRadVal; }; // theta value for peak (in rad)
62  Double_t getThetaRadHw() const { return fThetaRadHw; }; // hw = half width = half length of Hough space bin
63  Double_t getSecondVal() const { return fSecondVal; }; // second value for peak, see below for explanation
64 
65  Double_t getSecondHw() const { return fSecondHw; }; // hw = half width = half length of Hough space bin
66  Double_t getZRefLabSys() const { return fZRefLabSys; }; // in cm
67 
68  // hits
69  UInt_t getNSharedHits(const PndFtsHoughTracklet &rhs); // gives the number of hits that are contained both in rhs and *this
70 
71  private:
72  // Private Data Members ------------
73  // for PandaRoot input/output
74  PndFtsHoughTrackerTask *fTrackerTask;
75 
77  void throwError(const TString s) const { throw std::runtime_error(s.Data()); };
78 
79  Int_t fVerbose;
80 
81  Bool_t fIsSet; // kTRUE if values have already been filled
82 
83  Double_t fPeakHeightFromPeakFinder;
84  // height of peak in Hough transform
85  // (as determined by peakFinder -- does not need to be == fHitId.size()
86  // as the peak finder might add a weight to the hits depending on how close they have been to the actual peak)
87 
88  // saving peak position in a 2d Hough transform as well as the half width of the histogram
89  Double_t fThetaRadVal; // theta angle
90  Double_t fThetaRadHw; // error on angle
91 
92  Double_t fSecondVal; // second value is x or y intercept for line in zx or zy plane and Q/pZx for parabola in zx plane
93  Double_t fSecondHw; // error on second value
94 
95  // at which z value in lab sys the values have to be interpreted
96  Double_t fZRefLabSys;
97 
98  // void addPeakHits(); // check which hits have contributed to the peak and add them to the hitId vector
99 
100  ClassDef(PndFtsHoughTracklet, 1);
101 };
102 
103 #endif
Interface between PandaRoot (data input and output) and PndFtsHoughTrackFinder (implementation of PR ...
Double_t getZRefLabSys() const
Double_t getSecondHw() const
Double_t getPeakHeightFromPeakFinder() const
Class for saving the result of one Hough transform for FTS PR.
void SetHoughTransformResults(const Double_t thetaVal, const Double_t secondVal, const Double_t peakHeight, const Double_t thetaHw, const Double_t secondHw)
PndFtsHoughTracklet(Double_t zRefLabSys=0., PndFtsHoughTrackerTask *trackerTask=nullptr)
Set pointer to tracker task (super important as it provides an I/O interface to PandaRoot) ...
Double_t getThetaRadVal() const
UInt_t getNSharedHits(const PndFtsHoughTracklet &rhs)
void Print() const
Double_t getSecondVal() const
Double_t getThetaRadHw() const