//-*- Mode: C++ -*- // @(#) $Id: AliHLTTPCCADisplay.h,v 1.2 2010/08/16 14:32:23 ikulakov Exp $ // ************************************************************************* // This file is property of and copyright by the ALICE HLT Project * // ALICE Experiment at CERN, All rights reserved. * // See cxx source for full Copyright notice * // * // AliHLTTPCCADisplay class is a debug utility. * // It is not used in the normal data processing. * // * //*************************************************************************** #ifndef ALIHLTTPCCADISPLAY_H #define ALIHLTTPCCADISPLAY_H #include "AliHLTTPCCAParameters.h" #include "AliHLTTPCPerformanceBase.h" #include "AliHLTArray.h" class AliHLTTPCCAGBTracker; class AliHLTTPCCATracker; class AliHLTTPCCATrack; class AliHLTTPCCATrackParam; class AliHLTTPCCAParam; class AliHLTTPCCAPerformance; class AliHLTTPCCAMCTrack; class AliHLTTPCCALocalMCPoint; class TCanvas; class TPad; class ITSCAHit; class ITSCAHitV; class ITSCAHitsV; class ITSCASingletsV; class ITSCADoubletsV; class ITSCATripletsV; class ITSCATracks; #include "TArc.h" #include "TLine.h" #include "TPolyLine.h" #include "TArrow.h" #include "TBox.h" #include "TCrown.h" #include "TMarker.h" #include "TLatex.h" #include using std::vector; /** * @class AliHLTTPCCADisplay */ class AliHLTTPCCADisplay { public: class AliHLTTPCCADisplayTmpHit; static AliHLTTPCCADisplay &Instance(); AliHLTTPCCADisplay(); virtual ~AliHLTTPCCADisplay(); void Init(); void Update(); void ClearView(); void Ask(); void SetTPCView(); void SetTPC( const AliHLTTPCCAParam& tpcParam); // iklm void SetGB( const AliHLTTPCCAGBTracker * GBTracker ); const AliHLTTPCCAGBTracker * GetGB(){return fGB;}; int GetColor( int i ) const; int GetColorZ( double z ) const ; int GetColorY( double y ) const ; int GetColorK( double k ) const ; int GetTrackMC( const AliHLTTPCCADisplayTmpHit *vHits, int NHits ); void DrawTPC(); void DrawSlice( AliHLTTPCCATracker *slice, bool DrawRows = 0, bool DrawGrid = 1 ); void DrawArc(float x, float y, float r, int Start = 1, Size_t width = 1 ); void DrawPoint(float x, float y, float z, int Start = 1, Size_t width = 1 ); void DrawGBPoint(float x, float y, float z, int Start = 1, Size_t width = 1 ); void DrawGBPoint(float x, float y, float z, float angle = 0, int Start = 1, Size_t width = 1 ); void DrawSliceOutTrackParam( int itr, int color, Size_t width ); void DrawSliceOutTrack1( int itr, int color, Size_t width ); void DrawHelix(float p0, float c, float z, float zStart, float z0, float xc, float yc, float r, float b, int color, Size_t width); void DrawGBLine(float x, float y, float z, float x2, float y2, float z2, int Start=1, Size_t width=1 ); bool DrawTrack( AliHLTTPCCATrackParam t, double Alpha, const AliHLTTPCCADisplayTmpHit *vHits, int NHits, int color = -1, Size_t width = -1, bool pPoint = 0 ); void DrawGBTrack( int itr, int color = -1, int width = -1 ); void DrawRecoTrack( int itr, int color = -1, int width = -1 ); void DrawMCTrack( int itr, int color = -1, int width = -1 ); void HitToGlobal( const ITSCAHit& hit, float& x, float& y, float &z ); void HitToGlobal( const ITSCAHitV& hit, int iV, float& x, float& y, float &z ); void DrawGBHits (const ITSCAHitsV& all); void DrawGBSinglets(const ITSCASingletsV& all); void DrawGBDoublets(const ITSCADoubletsV& all); void DrawGBTriplets(const ITSCATripletsV& all); void DrawGBTracks (const ITSCATracks& all); void DrawGBTrackFast( const AliHLTTPCCAGBTracker &tracker, int itr, int color = -1 ); bool DrawTracklet( AliHLTTPCCATrackParam &track, const int *hitstore, int color = -1, int width = -1, bool pPoint = 0 ); // void DrawGBLinks( const AliHLTTPCCAGBTracker &tracker, int color = -1, Size_t width = -1 ); void DrawGBHit( const AliHLTTPCCAGBTracker &tracker, int iHit, int color = -1, Size_t width = -1 ); void DrawGBHits( const AliHLTTPCCAGBTracker &tracker, int color = -1, Size_t width = -1, int hitsType = -1 ); void DrawTrackParam( AliHLTTPCCATrackParam t, int color = 1 ); void SaveCanvasToFile( TString fileName); TPad *CanvasYX() { return fYX; } TPad *CanvasZX() { return fZX; } protected: TCanvas *fCanvas; // the canvas TPad *fYX, *fZX; // two views bool fAsk; // flag to ask for the pressing key const AliHLTTPCCAGBTracker *fGB; // the Aliglobal tracker AliHLTTPCCAPerformance *fPerf; // Performance class (mc labels etc) double fZMin, fZMax, fYMin, fYMax;// view parameters double fRInnerMin, fRInnerMax, fROuterMin, fROuterMax, fTPCZMin, fTPCZMax; // view parameters TArc fArc; // parameters of drawing objects are copied from this members TLine fLine; //! TPolyLine fPLine;//! TMarker fMarker; //! TBox fBox; //! TCrown fCrown; //! TLatex fLatex; //! TArrow fArrow; bool fDrawOnlyRef; // draw only clusters from ref. mc tracks private: AliHLTTPCCADisplay( const AliHLTTPCCADisplay& ); AliHLTTPCCADisplay& operator=( const AliHLTTPCCADisplay& ); }; #endif