00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef CHEEZYDISPLAY_H
00013 #define CHEEZYDISPLAY_H
00014
00015
00016 #include <vector>
00017
00018 #include "TNamed.h"
00019
00020 class TCanvas;
00021 class TPad;
00022 class TPolyMarker;
00023 class TH2F;
00024
00025 #include "Plex/PlexSEIdAltL.h"
00026 #include "Validity/VldContext.h"
00027
00028 class CheezyDisplay : public TNamed {
00029
00030 public:
00031
00032 CheezyDisplay();
00033 CheezyDisplay(const char *name, const char *title,
00034 TCanvas* canvas=0);
00035 virtual ~CheezyDisplay();
00036
00037 void SetVldContext(VldContext& vldc);
00038 void ClearLists();
00039 void AddStripEndId(const PlexStripEndId seid, const Bool_t truth);
00040 void AddSEIdAltL(const PlexSEIdAltL altl, const Bool_t truth);
00041 void Draw(Option_t* option="");
00042
00043
00044 void SetMarkerStyle(const Int_t iside,
00045 const Int_t color,
00046 const Int_t mtype,
00047 const Float_t size);
00048
00049 inline void SetDrawTruth(const Bool_t drawtruth)
00050 {fDrawTruth = drawtruth;}
00051 inline void SetDrawOnlyBest(const Bool_t onlybest)
00052 {fDrawOnlyBest = onlybest;}
00053 inline void SetWgtThresh(const Float_t threshold)
00054 {fWgtThresh = threshold;}
00055
00056 inline Bool_t IsSideDrawn(const Int_t iside) const
00057 {return fDrawSide[iside];}
00058 inline Int_t GetMarkerColor(const Int_t iside) const
00059 {return fMarkerColor[iside];}
00060 inline Int_t GetMarkerType(const Int_t iside) const
00061 {return fMarkerType[iside];}
00062 inline Float_t GetMarkerSize(const Int_t iside) const
00063 {return fMarkerSize[iside];}
00064
00065
00066 private:
00067
00068 void SetupDisplay();
00069 TPolyMarker* BuildPolyMarker( std::vector<PlexSEIdAltL>& altl_list,
00070 Float_t yoff, Int_t iside, Bool_t truth );
00071
00072 void PlaneStripToXY( PlexStripEndId seid, Float_t xoff,
00073 Float_t &x, Float_t &y );
00074
00075
00076 VldContext fVldContext;
00077
00078 TCanvas *fCanvas;
00079 TPad *fUpad;
00080 TPad *fVpad;
00081
00082 TH2F *fUview;
00083 TH2F *fVview;
00084
00085 std::vector<PlexSEIdAltL> fTrueSEIdUview;
00086 std::vector<PlexSEIdAltL> fTrueSEIdVview;
00087 std::vector<PlexSEIdAltL> fMuxSEIdUEast;
00088 std::vector<PlexSEIdAltL> fMuxSEIdVEast;
00089 std::vector<PlexSEIdAltL> fMuxSEIdUWest;
00090 std::vector<PlexSEIdAltL> fMuxSEIdVWest;
00091
00092 Bool_t fDrawSide[3];
00093 Int_t fMarkerColor[3];
00094 Int_t fMarkerType[3];
00095 Float_t fMarkerSize[3];
00096
00097 TPolyMarker *fPM_TU;
00098 TPolyMarker *fPM_TV;
00099 TPolyMarker *fPM_UE;
00100 TPolyMarker *fPM_VE;
00101 TPolyMarker *fPM_UW;
00102 TPolyMarker *fPM_VW;
00103
00104 Bool_t fDrawTruth;
00105 Bool_t fDrawOnlyBest;
00106 Float_t fWgtThresh;
00107
00108 ClassDef(CheezyDisplay,0)
00109 };
00110
00111 #endif // CHEEZYDISPLAY_H