/* * PndFtsLineApproximator.h * * Created on: Jun 2, 2016 * Author: kibellus */ #include #include "PndLine.h" #include "TMatrix.h" #include "TMath.h" #include "PndTrackCand.h" #include "PndFtsHit.h" #include "PndFtsExpandedTrackCand.h" //#include "PndLineApproximation.h" #include "PndFtsLineComparator.h" #include "Tuple.h" using namespace std; #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDFTSLINEAPPROXIMATOR_H_ #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDFTSLINEAPPROXIMATOR_H_ /* * This class can be used to create line approximations with the isochrones of a track candidate. * You shold use the extern method createExpandedTrackCand to create the track candidates. * Look at the method documentation of createExpandedTrackCand to find out which results you will * get for different cases of hits in the track candidate. */ class PndFtsLineApproximator { public: static Double_t compDist; //distance limit for the comparator static Double_t compAngle; //angle limit for the comparator PndFtsLineApproximator() : fComparator(compDist,compAngle){} virtual ~PndFtsLineApproximator(); //creates line approximations PndFtsExpandedTrackCand createExpandedTrackCand(PndTrackCand &cand); private: //methods to create the lines vector approxLines(PndFtsHit* h1 ,PndFtsHit* h2); vector approxInnerLine(PndFtsHit* h1 ,PndFtsHit* h2); vector approxOuterLine(PndFtsHit* h1 ,PndFtsHit* h2); //adds a line to a collection of lines void addLine(vector> &lines, PndLineApproximation &l); //PndLineApproximation createLine(vector lines); //mehtods which are used for a coordinate transformation PndFtsHit* copyHitWithNewPosition(PndFtsHit *h, Double_t x, Double_t z); void transform(Bool_t transToNewSystem, PndFtsHit* hit); TMatrix getRotationMatrix(Double_t angle); //used to compare lines (find out whether they are similar) PndFtsLineComparator fComparator; }; #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDFTSLINEAPPROXIMATOR_H_ */