PandaRoot
PndFtsHoughTracklet.h
Go to the documentation of this file.
1 
14 #ifndef PNDFTSHOUGHTRACKLET_H
15 #define PNDFTSHOUGHTRACKLET_H
16 
17 #include "PndFtsHoughTrackerTask.h"
18 
19 // Root Class Headers ----------------
20 #include "PndTrackCand.h"
21 #include "Rtypes.h" // for Double_t, Int_t, etc
22 #include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
23 
24 // For error reporting
25 #include "TString.h"
26 #include <stdexcept>
27 
28 class PndFtsHit;
29 class PndTrack;
30 class TClonesArray;
31 
33  public:
34  // Constructors/Destructors ---------
35  PndFtsHoughTracklet(Double_t zRefLabSys = 0.,
36  PndFtsHoughTrackerTask *trackerTask = nullptr);
38 
39  // Accessors -----------------------
40  void Print() const;
41 
42  Bool_t isSet() const { return fIsSet; }; // returns kTRUE iif data from the 2d Hough transforms have been entered
43 
44  // add results from Hough transforms
45  void SetHoughTransformResults(const Double_t thetaVal, const Double_t secondVal, const Double_t peakHeight, const Double_t thetaHw, const Double_t secondHw);
46 
47  // getters for Hough space peak info
48  Double_t getPeakHeightFromPeakFinder() const { return fPeakHeightFromPeakFinder; };
49  Double_t getThetaRadVal() const { return fThetaRadVal; }; // theta value for peak (in rad)
50  Double_t getThetaRadHw() const { return fThetaRadHw; }; // hw = half width = half length of Hough space bin
51  Double_t getSecondVal() const { return fSecondVal; }; // second value for peak, see below for explanation
52 
53  Double_t getSecondHw() const { return fSecondHw; }; // hw = half width = half length of Hough space bin
54  Double_t getZRefLabSys() const { return fZRefLabSys; }; // in cm
55 
56  // hits
57  UInt_t getNSharedHits(const PndFtsHoughTracklet &rhs); // gives the number of hits that are contained both in rhs and *this
58 
59  private:
60  // Private Data Members ------------
61  // for PandaRoot input/output
62  PndFtsHoughTrackerTask *fTrackerTask;
63 
65  void throwError(const TString s) const { throw std::runtime_error(s.Data()); };
66 
67  Int_t fVerbose;
68 
69  Bool_t fIsSet; // kTRUE if values have already been filled
70 
71  Double_t fPeakHeightFromPeakFinder;
72  // height of peak in Hough transform
73  // (as determined by peakFinder -- does not need to be == fHitId.size()
74  // as the peak finder might add a weight to the hits depending on how close they have been to the actual peak)
75 
76  // saving peak position in a 2d Hough transform as well as the half width of the histogram
77  Double_t fThetaRadVal; // theta angle
78  Double_t fThetaRadHw; // error on angle
79 
80  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
81  Double_t fSecondHw; // error on second value
82 
83  // at which z value in lab sys the values have to be interpreted
84  Double_t fZRefLabSys;
85 
86  // void addPeakHits(); // check which hits have contributed to the peak and add them to the hitId vector
87 
88  ClassDef(PndFtsHoughTracklet, 1);
89 };
90 
91 #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