#include "PndFtsHoughTracklet.h" #include "PndFtsHoughTrackerTask.h" #include #include "math.h" #include "TClonesArray.h" #include "FairRootManager.h" #include "PndFtsHit.h" #include "PndTrack.h" ClassImp(PndFtsHoughTracklet); PndFtsHoughTracklet::PndFtsHoughTracklet(Double_t zRefLabSys, PndFtsHoughTrackerTask *trackerTask) : fTrackerTask(trackerTask), fVerbose(0), // fFtsHitArray(0), // fFtsBranchId(0), fIsSet(kFALSE), fZRefLabSys(zRefLabSys), fPeakHeightFromPeakFinder(0.), fThetaRadVal(0.), fThetaRadHw(0.), fSecondVal(0.), fSecondHw(0.) { if (0==fTrackerTask){ std::cout << "PndFtsHoughTracklet FATAL ERROR Tracker task pointer not set in constructor.\n"; } else { fVerbose = fTrackerTask->GetVerbose(); if(3getFtsHitArrayPtr(); // fFtsBranchId = fTrackerTask->getFtsBranchId(); } } PndFtsHoughTracklet::~PndFtsHoughTracklet() { } void PndFtsHoughTracklet::SetHoughTransformResults( const Double_t thetaRadVal, const Double_t secondVal, const Double_t peakHeight, const Double_t thetaRadHw, const Double_t secondHw ){ fPeakHeightFromPeakFinder = peakHeight; // set values from Hough space peak fThetaRadVal = thetaRadVal; fSecondVal = secondVal; fThetaRadHw = thetaRadHw; fSecondHw = secondHw; // addPeakHits(); fIsSet = kTRUE; } //void PndFtsHoughTracklet::addPeakHits(){ // // check which hits are within the peak region and add the hits // // functionality is not implemented here, because I don't know how to pass the equation into this class without copy pasting it // //} UInt_t PndFtsHoughTracklet::getNSharedHits(const PndFtsHoughTracklet& rhs) { UInt_t nSharedHits = 0; // go through all hits in *this and check if they are also in rhs, if yes, increase numberOfSharedHits by 1 (per shared hit) for (UInt_t iHit = 0; iHit < GetNHits(); ++iHit){ PndTrackCandHit thisHit = GetSortedHit(iHit); Int_t thisHitId = thisHit.GetHitId(); Int_t thisDetId = thisHit.GetDetId(); // if hit is NOT in track -1 is returned by HitInTrack, otherwise the index (>=0) in the HitId vector is returned if (-1