]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVPainter.cxx
- update track cuts
[u/mrichter/AliRoot.git] / MUON / AliMUONVPainter.cxx
index cdfe4c0fde959493f0dce5cff5be90bc8c451986..11b2d595d8f9cc71d653a24097318abc579f62e6 100644 (file)
 
 #include "AliMUONVPainter.h"
 
-#include "AliCodeTimer.h"
 #include "AliLog.h"
 #include "AliMUON2DMap.h"
 #include "AliMUONCalibParamND.h"
-#include "AliMUONPainterRegistry.h"
-#include "AliMpManuUID.h"
+#include "AliMUONContour.h"
+#include "AliMUONContourPainter.h"
 #include "AliMUONObjectPair.h"
-#include "AliMUONPainterContour.h"
 #include "AliMUONPainterGroup.h"
 #include "AliMUONPainterHelper.h"
+#include "AliMUONPainterDataRegistry.h"
 #include "AliMUONTrackerDataHistogrammer.h"
 #include "AliMUONVTrackerData.h"
+#include "AliMpManuUID.h"
 #include <Riostream.h>
 #include <TCanvas.h>
 #include <TClass.h>
@@ -92,6 +92,8 @@
 ///
 /// \author Laurent Aphecetche, Subatech
 
+using std::cout;
+using std::endl;
 ///\cond CLASSIMP
 ClassImp(AliMUONVPainter)
 ///\endcond
@@ -100,15 +102,15 @@ ClassImp(AliMUONVPainter)
 AliMUONVPainter::AliMUONVPainter(TRootIOCtor*) : TObject(), 
 TQObject(),
 fHistogram(0x0),
+fPainterGroups(0x0),
+fResponderGroup(0x0),
 fName(""),
 fPathName(""),
 fType(""),
 fMother(0x0),
 fGroup(0x0),
 fContour(0x0),
-fPainterGroups(0x0),
 fChildren(0x0),
-fResponderGroup(0x0),
 fPlotterGroup(0x0),
 fBorderFactor(1.1),
 fPad(0x0),
@@ -118,6 +120,7 @@ fLineWidth(1),
 fIsValid(kTRUE)
 {
   /// streamer ctor
+  SetID(-1,-1);
 }
 
 //_____________________________________________________________________________
@@ -125,15 +128,15 @@ AliMUONVPainter::AliMUONVPainter(const char* type)
 : TObject(), 
   TQObject(),
   fHistogram(0x0),
+  fPainterGroups(0x0),
+  fResponderGroup(0x0),
   fName(""),
   fPathName(""),
   fType(type),
   fMother(0x0),
   fGroup(0x0),
   fContour(0x0),
-  fPainterGroups(0x0),
   fChildren(0x0),
-  fResponderGroup(0x0),
   fPlotterGroup(0x0),
   fBorderFactor(1.1),
   fPad(0x0),
@@ -151,15 +154,15 @@ AliMUONVPainter::AliMUONVPainter(const AliMUONVPainter& rhs)
 : TObject(rhs),
 TQObject(),
 fHistogram(0x0),
+fPainterGroups(0x0),
+fResponderGroup(0x0),
 fName(""),
 fPathName(""),
 fType(""),
 fMother(0x0),
 fGroup(0x0),
 fContour(0x0),
-fPainterGroups(0x0),
 fChildren(0x0),
-fResponderGroup(0x0),
 fPlotterGroup(0x0),
 fBorderFactor(1.0),
 fPad(0x0),
@@ -566,7 +569,10 @@ AliMUONVPainter::GetBoundingBox(Double_t& x1, Double_t& y1,
                                 Double_t& x2, Double_t& y2) const
 {
   /// Get the bounding box = our area
-  AliMpArea area(Area().Position(),Area().Dimensions()*fBorderFactor);
+  AliMpArea area(Area().GetPositionX(),
+                 Area().GetPositionY(),
+                 Area().GetDimensionX()*fBorderFactor,
+                 Area().GetDimensionY()*fBorderFactor);
 
   x1 = area.LeftBorder();
   y1 = area.DownBorder();
@@ -750,8 +756,7 @@ AliMUONVPainter::Paint(Option_t*)
   
   if ( IsExcluded() )
   {
-    fContour->PaintArea(2);
-    fContour->PaintOutline(1,1);
+    AliMUONContourPainter::Paint(*fContour,1,1,2); // red fill with black thin outline
   }
 }
 
@@ -782,7 +787,7 @@ AliMUONVPainter::PaintOutline(Int_t color, Int_t width, Double_t /*x*/, Double_t
   Int_t c = color >= 0 ? color : GetLineColor();
   Int_t w = width >= 0 ? width : GetLineWidth();
   
-  fContour->PaintOutline(c,w);
+  AliMUONContourPainter::Paint(*fContour,c,w);
 }
 
 //_____________________________________________________________________________
@@ -869,7 +874,7 @@ AliMUONVPainter::SetAttributes(const AliMUONAttPainter& attributes)
 
 //_____________________________________________________________________________
 void 
-AliMUONVPainter::SetContour(AliMUONPainterContour* contour)
+AliMUONVPainter::SetContour(AliMUONContour* contour)
 {
   /// Set out contour
   if (!contour)
@@ -1324,7 +1329,7 @@ AliMUONVTrackerData*
 AliMUONVPainter::InteractiveReadOutConfig() const
 {
   /// get the interactive readout config object
-  return AliMUONPainterRegistry::Instance()->InteractiveReadOutConfig();
+  return AliMUONPainterDataRegistry::Instance()->InteractiveReadOutConfig();
 }
 
 //_____________________________________________________________________________
@@ -1388,3 +1393,10 @@ AliMUONVPainter::CreatePainter(const char* className,
   return rv;
 }
 
+//_____________________________________________________________________________
+void
+AliMUONVPainter::PaintArea(Int_t fillColor)
+{
+  /// Draw a filled area
+  AliMUONContourPainter::Paint(*(Contour()),-1,-1,fillColor);
+}