#include <TEvePointSet.h>
#include <map>
+class TEveTrackList;
+
class TGraphErrors;
class TGraph;
class TGraph2DErrors;
class TGraph2D;
class TLinearFitter;
-class TVirtualFitter;
-class TEveElement;
class AliEveCosmicRayFitter : public TEvePointSet
{
public:
AliEveCosmicRayFitter(const Text_t* name = "CosmicRayFitter", Int_t n_points=0);
virtual ~AliEveCosmicRayFitter();
-
+
void AddFitPoint(Int_t); // slot for PointSelected() signal
virtual void Start();
virtual void Stop();
virtual void FitTrack();
- virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
+ virtual void Reset(Int_t n_points=0, Int_t n_int_ids=0);
- Bool_t GetConnected() { return fConnected; }
+ Bool_t GetConnected() { return fConnected; }
- void DrawDebugGraph();
+ void DrawDebugGraph();
- virtual void DestroyElements(); // *MENU*
+ virtual void DestroyElements(); // *MENU*
+ static Double_t Distance3D(Double_t x, Double_t y, Double_t z, Double_t *p);
+ static void SumDistance3D(Int_t &, Double_t *, Double_t & sum, Double_t * par, Int_t );
private:
AliEveCosmicRayFitter(const AliEveCosmicRayFitter&); // Not implemented
AliEveCosmicRayFitter& operator=(const AliEveCosmicRayFitter&); // Not implemented
- TVirtualFitter* GetLine3DFitter(){ return fLine3DFitter; }
-
- TGraph* GetGraphSelected1() { return fGraphPicked1; }
- TGraph* GetGraphSelected2() { return fGraphPicked2; }
- TGraph2D* GetGraphSelected3() { return fGraphPicked3; }
- TGraphErrors* GetGraphFitted1() { return fGraphLinear1; }
- TGraphErrors* GetGraphFitted2() { return fGraphLinear2; }
- TGraph2DErrors* GetGraphFitted3() { return fGraphLinear3; }
-
protected:
struct Point_t
{
TEvePointSet *fPS; // selected pointset
Int_t fIdx; // location in the point set array
- Point_t(TEvePointSet* ps=0, Int_t i=0): fPS(ps), fIdx(i){}
+ Point_t(TEvePointSet* ps=0, Int_t i=0): fPS(ps), fIdx(i){}
Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx) {}
Point_t& operator=(const Point_t& p) {
typedef std::map<Point_t, Int_t> PointMap_t; // Map of registered points.
- TVirtualFitter* fLine3DFitter; // 3D straight line fitter
TLinearFitter* fLineFitter1; // 2D straight line fitter
TLinearFitter* fLineFitter2; // 2D straight line fitter
Bool_t fConnected; // object connected to pointset Ctrl-shift signal
-
- PointMap_t fSPMap; // map of selected points from different PointSet
- TEveElementList* fTrackList; // list of tracks removed in the destructor
+ PointMap_t fSPMap; // map of selected points from different PointSet
- Float_t fStartingPointX; // starting point (in X direction)
- // to plot the fitted line
+ TEveTrackList* fTrackList; // list of tracks removed in the destructor
TGraph *fGraphPicked1; // graph of selected points debug info
TGraphErrors *fGraphLinear1; // graph of fitted points for debug info
TGraph *fGraphPicked2; // graph of selected points debug info
TGraphErrors *fGraphLinear2; // graph of fitted points for debug info
- TGraph2D *fGraphPicked3; // graph of selected points debug info
- TGraph2DErrors *fGraphLinear3; // graph of fitted points for debug info
ClassDef(AliEveCosmicRayFitter, 0); // Interface to TEvePointSet allowing 3D straight linear fit.
};