diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/MuonChamberProjectionHelper.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/MuonChamberProjectionHelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..e97671e2202d4fdb05027e7b2d9e2d723088c331
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/MuonChamberProjectionHelper.h
@@ -0,0 +1,105 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class MuonChamberProjectionHelper         //
+//                                                            //
+//  Description: ...                                          //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: January 2008                             //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef MUONCHAMBERPROJECTIONHELPER_H
+#define MUONCHAMBERPROJECTIONHELPER_H
+
+#include "VP1Base/VP1HelperClassBase.h"
+#include "GeoModelKernel/GeoPVConstLink.h"
+
+//#include "CLHEP/Geometry/Point3D.h"
+//#include "CLHEP/Vector/ThreeVector.h"
+#include "GeoPrimitives/GeoPrimitives.h"
+#include "GeoPrimitives/GeoPrimitivesHelpers.h"
+#include "GeoPrimitives/CLHEPtoEigenConverter.h"
+
+
+class StoreGateSvc;
+class IVP1System;
+
+class MuonChamberProjectionHelper : public VP1HelperClassBase {
+public:
+
+  MuonChamberProjectionHelper( StoreGateSvc * detectorStore );//All messages to stdout
+  MuonChamberProjectionHelper( IVP1System * sys );//Use this constructor to get messages in gui
+  ~MuonChamberProjectionHelper();
+
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // To figure out if a given PV link is to an mdt chamber:
+  //
+  bool isKnownMDTChamber( const GeoPVConstLink& mdtChamber );
+
+
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // To figure out how long drift-circles one must construct in order to project them on the end of the chambers:
+  // * If radius is not 0.0, then the returned distances will be
+  //   increased, such as to be the maximum value that one would get if
+  //   calculating the distance of all the points on the circumference
+  //   of the drift-circle of the given radius, around "point".
+  // * Returns false in case of problems.
+  //
+  bool getDistancesToMDTChamberWallsAlongLine( const GeoPVConstLink& mdtChamber,
+					       const Amg::Vector3D & point, const Amg::Vector3D& lineDirection,
+					       double& distanceToFirstEndPlane, double& distanceToSecondEndPlane,
+					       const double& radius = 0.0 );
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  // To project tracks/segments (line segment from pointA to pointB)
+  // onto chamber ends.
+  // * Sets outsidechamber to true in case projection falls entirely
+  //   outside chamber (dont use returned points in that case).
+  // * Returns false in case of problems.
+  //
+  bool projectAndConstrainLineSegmentToMDTChamberEndWalls( const GeoPVConstLink& mdtChamber,
+							   const Amg::Vector3D & pointA, const Amg::Vector3D & pointB,
+							   Amg::Vector3D & firstEndWall_pointA, Amg::Vector3D & firstEndWall_pointB,
+							   Amg::Vector3D & secondEndWall_pointA, Amg::Vector3D & secondEndWall_pointB,
+							   bool& outsidechamber );
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // Clips the line segment from A to B to the volume of a given MDT chamber
+  // * "extradist" effectively extends the chamber dimensions in order to
+  //   let the resulting line segment extend slightly outside the
+  //   chamber ( negative values are allowed ).
+  // * Sets outsidechamber to true in case line segment falls entirely
+  //   outside chamber (dont use returned points in that case).
+  // * Returns false in case of problems.
+  //
+  bool clipLineSegmentToMDTChamber( const GeoPVConstLink& mdtChamber,
+		            Amg::Vector3D & pointA, Amg::Vector3D & pointB, bool& outsidechamber,
+				    const double & extradist = 0.0 );
+  //FIXME: Right now we do not clip in the y dimensions!!!
+  //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+  static Amg::Vector3D& applyTransformToVector( const Amg::Transform3D& m, Amg::Vector3D& v);//Fixme: Better place for this?
+
+private:
+
+  //It is illegal to copy/assign a MuonChamberProjectionHelper:
+  MuonChamberProjectionHelper(const MuonChamberProjectionHelper & );
+  MuonChamberProjectionHelper & operator= (const MuonChamberProjectionHelper & );
+
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandleBase.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandleBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..d7998daf89415c73abec49377f3a37ee3db0dc2d
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandleBase.h
@@ -0,0 +1,154 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLECTIONHANDLEBASE_H
+#define PRDCOLLECTIONHANDLEBASE_H
+
+#include "VP1Base/VP1StdCollection.h"
+#include "VP1PRDSystems/PRDDetTypes.h"
+#include <vector>
+
+class PRDSysCommonData;
+class PRDSystemController;
+class PRDHandleBase;
+class VP1ExtraSepLayerHelper;
+class SoSeparator;
+class SoMaterial;
+namespace Trk { class PrepRawData; }
+
+class PRDCollHandleBase : public VP1StdCollection {
+
+  Q_OBJECT
+
+public:
+
+  PRDCollHandleBase(PRDDetType::Type,PRDSysCommonData*,const QString& key) ;
+  virtual void init(VP1MaterialButtonBase* mat=0);//reimplementations must start with a call to this.
+  virtual ~PRDCollHandleBase();
+
+  //Called from init(). Should set current cut values and
+  //connections with controller to monitor future changes. Reimplement
+  //the ..Specific method to setup subsystem specific settings.
+  void setupSettingsFromController(PRDSystemController*);
+protected:
+  virtual void setupSettingsFromControllerSpecific(PRDSystemController*) {};
+public:
+
+  ///////////////////////////////////////////////////////////
+  //  For loading the data and resetting after each event: //
+  ///////////////////////////////////////////////////////////
+
+  virtual bool load();
+
+  PRDSysCommonData * common() const { return m_common; }
+
+  //For use by the handles:
+  VP1ExtraSepLayerHelper * sephelperDetailedNodes () const;
+  VP1ExtraSepLayerHelper * sephelperSimpleNodes() const;
+  SoMaterial * highLightMaterial() const;
+
+  //If highlight outliers is set, other highlight modes (TRT HT, ...) will be ignored.
+  //Other highlight modes are indicated by the return value of highLight() in the PRDHandleBase's
+  bool highLightOutliers() const;
+  double highLightWeight() const { return m_highlightweight; }
+
+  bool drawErrors() const;
+  bool drawRDOs() const;
+
+
+  //Detail level of shown prds:
+  enum DETAIL { SIMPLE, DETAILED, AUTO };//AUTO => Use Level of detail (SoLOD nodes) to switch between simple/detailed shapes.
+  static QString toString(const DETAIL&);
+
+  void getLODSeparators(int index, VP1ExtraSepLayerHelper*& sephelper_detail,VP1ExtraSepLayerHelper*& sephelper_simple);
+
+  enum COLOURMETHOD { ByTechOnly, BySegment, ByTrack, BySegmentAndTrack };
+  static QString toString(const COLOURMETHOD&);
+  COLOURMETHOD colourMethod() const { return m_colourmethod; }
+  bool colourByTracks() const { return m_colourmethod==ByTrack||m_colourmethod==BySegmentAndTrack; }
+  bool colourBySegments() const { return m_colourmethod==BySegment||m_colourmethod==BySegmentAndTrack; }
+
+  DETAIL detailLevel() const;
+  bool simpleDetailLevel() const { return detailLevel()==SIMPLE; }
+signals:
+  void detailLevelChanged();
+public slots:
+  void setGeneralPRDDetailLevel(DETAIL);
+  void setColourMethod(PRDCollHandleBase::COLOURMETHOD);
+  void setDrawErrors(bool);
+  void setDrawRDOs(bool);
+  void setHighLightOutliers(bool);
+  void setHighLightWeight(const double&);
+  void setAllowedEta(const VP1Interval&);
+  void setAllowedPhi(const QList<VP1Interval>&);
+
+private slots:
+  void detailComboBoxItemChanged();
+
+protected:
+  virtual PRDHandleBase* addPRD(Trk::PrepRawData*) = 0;//Return pointer to the handle. Base class (this) will own it.
+
+  virtual DETAIL defaultDetailLevel() const { return AUTO; }
+  //Use to loop over prds in derived classes:
+  void addHandle(PRDHandleBase*);//All handles must be added here (so they can be retrieved by the next methods).
+  std::vector<PRDHandleBase*>& getPrdHandles();
+  const std::vector<PRDHandleBase*>& getPrdHandles() const;
+
+  virtual void postLoadInitialisation() {}
+  virtual bool cut(PRDHandleBase*) = 0;//Return true if should be shown (based on various cuts), false otherwise.
+  virtual void eraseEventDataSpecific() {}
+
+  //Utility (fixme: put in utility class elsewhere).
+  template <class T> void cleanupPtrContainer(T&) const;//Delete pointers and calls .clear()
+  //   template <class T> void cleanupNodeContainer(T&) const;//unref's pointers and calls .clear()
+
+  virtual float lodArea() const { return 500.0f*500.0f; }//Reimplement Override to tune LOD shift for a given collection.
+
+  void recheckCutStatus(PRDHandleBase*);//Call in derived classes for handles that might be effected by a change in cuts.
+
+  //Convenience methods which can be called from derived classes (but specialised procedures might be more optimal)
+  void recheckCutStatusOfAllHandles();
+  void recheckCutStatusOfAllVisibleHandles();
+  void recheckCutStatusOfAllNotVisibleHandles();
+
+public:
+  int nShownHandles() { return m_nshownhandles; }
+
+  //For use only by PRDHandleBase::setVisible(..):
+  void incrementNShownHandles() { ++m_nshownhandles; }
+  void decrementNShownHandles() { --m_nshownhandles; }
+
+protected:
+  qint32 provideCollTypeID() const;
+  virtual QString provideText() const;
+  virtual void assignDefaultMaterial(SoMaterial*) const;
+  virtual QColor defaultColor() const = 0;//Will be used in assignDefaultMaterial
+  QString provideSection() const;
+  QString provideSectionToolTip() const;
+  QList<QWidget*> provideExtraWidgetsForGuiRow() const;
+  QByteArray extraWidgetsState() const;
+  void setExtraWidgetsState(const QByteArray&);
+private slots:
+  void collVisibilityChanged(bool);
+private:
+
+  class Imp;
+  Imp * d;
+
+  PRDSysCommonData * m_common;
+  int m_nshownhandles;
+  COLOURMETHOD m_colourmethod;
+  double m_highlightweight;
+};
+
+//Fixme: Move elsewhere (at least to our cxx!):
+template <class T> void PRDCollHandleBase::cleanupPtrContainer(T&t) const
+{
+  typename T::iterator it(t.begin()), itE(t.end());
+  for (;it!=itE;++it)
+    delete *it;
+  t.clear();
+}
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC.h
new file mode 100644
index 0000000000000000000000000000000000000000..adec3d7d39e94c52323fd5cd0cd00e79cfeb0741
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_CSC_H
+#define PRDCOLLHANDLE_CSC_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+
+class PRDCollHandle_CSC : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_CSC(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_CSC();
+
+  bool project() const { return m_project; }
+
+public slots:
+  void setProjectionMode( bool );
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*) { return true; }//accept all
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 800.0f*800.0f; }
+
+  QColor defaultColor() const;
+
+private:
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_project;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC_Strip.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC_Strip.h
new file mode 100644
index 0000000000000000000000000000000000000000..79b55be094918ba47b312e854c514e5d530ec810
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_CSC_Strip.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef VP1PRDSYSTEMS_PRDCOLLHANDLE_CSC_STRIP_H
+#define VP1PRDSYSTEMS_PRDCOLLHANDLE_CSC_STRIP_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+
+class PRDCollHandle_CSC_Strip : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_CSC_Strip(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_CSC_Strip();
+
+  bool project() const { return m_project; }
+
+public slots:
+  void setProjectionMode( bool );
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*) { return true; }//accept all
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 800.0f*800.0f; }
+
+  QColor defaultColor() const;
+
+private:
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_project;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MDT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MDT.h
new file mode 100644
index 0000000000000000000000000000000000000000..9d2520c37ee9a0bb42ef28875e0cb6d8f01f3be6
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MDT.h
@@ -0,0 +1,65 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_MDT_H
+#define PRDCOLLHANDLE_MDT_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1Base/VP1Interval.h"
+
+class PRDCollHandle_MDT : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_MDT(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_MDT();
+
+  bool highLightMasked() { return m_highLightMasked; }
+  int highLightADCBelow() { return m_highLightADCBelow; }
+  enum PROJECTION { NONE, TOTUBES, TOCHAMBERS };
+  PROJECTION projection() const { return m_projection; }
+
+
+public slots:
+  void setMinNHitsPerStation(unsigned);
+  void setAllowedADCValues(VP1Interval);
+  void setExcludeMaskedHits(bool);
+  void setStatus(QString);
+  void setHighLightByMask(bool);
+  void setHighLightByUpperADCBound(int);
+  void setEnableProjections( bool );
+  void setAppropriateProjection( int );//0: No projections, 1: Project to end of tubes, 2: Project to end of chamber volume.
+  void setLimitToActiveChambers(bool);
+  void muonChambersTouchedByTracksChanged(void);//!< Inform this handle that it might need to recheck cuts 
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+
+  virtual DETAIL defaultDetailLevel() const { return DETAILED; }
+
+  bool cut(PRDHandleBase*);
+
+  void eraseEventDataSpecific();
+  void postLoadInitialisation();
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 600.0f*600.0f; }
+  QColor defaultColor() const;
+
+private:
+
+  class Imp;
+  //  friend class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_highLightMasked;
+  int m_highLightADCBelow;
+  PROJECTION m_projection;
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MM.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MM.h
new file mode 100644
index 0000000000000000000000000000000000000000..156b1c281751a19ed6890fb2010122775f103ed6
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_MM.h
@@ -0,0 +1,65 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_MM_H
+#define PRDCOLLHANDLE_MM_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1Base/VP1Interval.h"
+
+class PRDCollHandle_MM : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_MM(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_MM();
+
+  // bool highLightMasked() { return m_highLightMasked; }
+  // int highLightADCBelow() { return m_highLightADCBelow; }
+  // enum PROJECTION { NONE, TOTUBES, TOCHAMBERS };
+  // PROJECTION projection() const { return m_projection; }
+
+
+public slots:
+  void setMinNHitsPerStation(unsigned);
+  // void setAllowedADCValues(VP1Interval);
+  //  void setExcludeMaskedHits(bool);
+  //  void setStatus(QString);
+  //  void setHighLightByMask(bool);
+  //  void setHighLightByUpperADCBound(int);
+  //  void setEnableProjections( bool );
+  //  void setAppropriateProjection( int );//0: No projections, 1: Project to end of tubes, 2: Project to end of chamber volume.
+   void setLimitToActiveChambers(bool);
+  void muonChambersTouchedByTracksChanged(void);//!< Inform this handle that it might need to recheck cuts 
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+
+  virtual DETAIL defaultDetailLevel() const { return DETAILED; }
+
+  bool cut(PRDHandleBase*);
+
+  void eraseEventDataSpecific();
+  void postLoadInitialisation();
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 600.0f*600.0f; }
+  QColor defaultColor() const;
+
+private:
+
+  class Imp;
+  //  friend class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  // bool m_highLightMasked;
+  // int m_highLightADCBelow;
+  // PROJECTION m_projection;
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_Pixel.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_Pixel.h
new file mode 100644
index 0000000000000000000000000000000000000000..fed80b454de65675fec72438f17b3ff4732e449b
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_Pixel.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_PIXEL_H
+#define PRDCOLLHANDLE_PIXEL_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDCommonFlags.h"
+
+class PRDCollHandle_Pixel : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_Pixel(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_Pixel();
+
+public slots:
+  void setPartsFlags(PRDCommonFlags::InDetPartsFlags);//BarrelA, BarrelC, EndcapA, EndcapC
+  void setMinNRDOPerCluster(unsigned);
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*);
+
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 800.0f*800.0f; }
+  QColor defaultColor() const;
+  virtual DETAIL defaultDetailLevel() const { return AUTO; }
+  //  virtual DETAIL defaultDetailLevel() const { return SIMPLE; }
+
+private:
+
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_RPC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_RPC.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f0ffc903b127dc85c5fef3a1eae2f0bac6b96ac
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_RPC.h
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_RPC_H
+#define PRDCOLLHANDLE_RPC_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+
+class PRDCollHandle_RPC : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_RPC(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_RPC();
+
+  bool project() const { return m_project; }
+
+public slots:
+  void setProjectionMode( bool );
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*) { return true; }//accept all
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 650.0f*650.0f; }
+  QColor defaultColor() const;
+
+private:
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_project;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SCT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SCT.h
new file mode 100644
index 0000000000000000000000000000000000000000..45ecb9ee538d7d0ae1f795fbf40a1f754b625bfb
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SCT.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_SCT_H
+#define PRDCOLLHANDLE_SCT_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDCommonFlags.h"
+
+class PRDCollHandle_SCT : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_SCT(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_SCT();
+
+public slots:
+  void setPartsFlags(PRDCommonFlags::InDetPartsFlags);//BarrelA, BarrelC, EndcapA, EndcapC
+  void setExcludeIsolatedClusters(bool);
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*);
+
+  void eraseEventDataSpecific();
+  void postLoadInitialisation();
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 800.0f*800.0f; }
+  QColor defaultColor() const;
+
+private:
+
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SpacePoints.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SpacePoints.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb2ccb6aa95616aec08bd82008e9d164f483dca5
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_SpacePoints.h
@@ -0,0 +1,56 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class PRDCollHandle_SpacePoints           //
+//                                                            //
+//  Description: Collection handles for space points.         //
+//               For historical reasons this inherits from    //
+//               the PRD class.                               //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: September 2008                           //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDCOLLHANDLE_SPACEPOINTS_H
+#define PRDCOLLHANDLE_SPACEPOINTS_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDCommonFlags.h"
+
+class PRDCollHandle_SpacePoints : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_SpacePoints(PRDSysCommonData*,const QString& key);
+  virtual ~PRDCollHandle_SpacePoints();
+
+protected:
+  PRDHandleBase* addPRD(Trk::PrepRawData*) { return 0; }
+  bool load();
+  bool cut(PRDHandleBase*);
+  void eraseEventDataSpecific();
+  void postLoadInitialisation();
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 800.0f*800.0f; }
+  QColor defaultColor() const;
+
+public slots:
+  void setPartsFlags(PRDCommonFlags::InDetPartsFlags);//BarrelA, BarrelC, EndcapA, EndcapC
+
+private:
+
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TGC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TGC.h
new file mode 100644
index 0000000000000000000000000000000000000000..29b36cb05cd7db6489ea38110fc02273b80ec8b2
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TGC.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_TGC_H
+#define PRDCOLLHANDLE_TGC_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+
+class PRDCollHandle_TGC : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_TGC(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_TGC();
+
+  bool project() const { return m_project; }
+
+public slots:
+  void setProjectionMode( bool );
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*) { return true; }//accept all
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 1000.0f*1000.0f; }
+  QColor defaultColor() const;
+
+private:
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_project;
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TRT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TRT.h
new file mode 100644
index 0000000000000000000000000000000000000000..b28c707709f49b7d07afc99dc068751b6ebdd860
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_TRT.h
@@ -0,0 +1,59 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_TRT_H
+#define PRDCOLLHANDLE_TRT_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDCommonFlags.h"
+#include "VP1Utils/InDetProjFlags.h"
+
+class PRDCollHandle_TRT : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_TRT(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_TRT();
+
+  bool highLightHighThreshold() { return m_highlightHT; }
+  bool project() const { return m_project; }
+  InDetProjFlags::InDetProjPartsFlags appropriateProjections() const { return m_appropriateProjections; }
+
+public slots:
+  void setHighLightHighThresholds(bool);
+  void setPartsFlags(PRDCommonFlags::InDetPartsFlags);//BarrelA, BarrelC, EndcapA, EndcapC
+  void setMinToT(unsigned);
+  void setMaxToT(unsigned);
+  void setMinLE(unsigned);
+  void setMaxLE(unsigned);
+  void setRequireHT(bool);
+  void setProject(bool);
+  void setAppropriateProjection(InDetProjFlags::InDetProjPartsFlags);
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*);
+
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 700.0f*700.0f; }
+  QColor defaultColor() const;
+
+private:
+
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_highlightHT;
+  bool m_project;
+  InDetProjFlags::InDetProjPartsFlags m_appropriateProjections;
+
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_sTGC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_sTGC.h
new file mode 100644
index 0000000000000000000000000000000000000000..2943ffeb2e3dec6e5e36b14d87ed6553e1f8d2ce
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCollHandle_sTGC.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDCOLLHANDLE_STGC_H
+#define PRDCOLLHANDLE_STGC_H
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+
+class PRDCollHandle_sTGC : public PRDCollHandleBase {
+
+  Q_OBJECT
+
+public:
+
+  static QStringList availableCollections(IVP1System*);//For the collection widget.
+
+  PRDCollHandle_sTGC(PRDSysCommonData *,const QString& key);
+  virtual ~PRDCollHandle_sTGC();
+
+  bool project() const { return m_project; }
+
+public slots:
+  void setProjectionMode( bool );
+
+protected:
+  PRDHandleBase * addPRD(Trk::PrepRawData*);
+  bool cut(PRDHandleBase*) { return true; }//accept all
+  void setupSettingsFromControllerSpecific(PRDSystemController*);
+  float lodArea() const { return 1000.0f*1000.0f; }
+  QColor defaultColor() const;
+
+private:
+  class Imp;
+  Imp * d;
+
+  //Here for inlines:
+  bool m_project;
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCommonFlags.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCommonFlags.h
new file mode 100644
index 0000000000000000000000000000000000000000..1193f5265a36653e8e49ee6526e44a38f1808b26
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDCommonFlags.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Common flags shared by several subsystems                 //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: November 2007                            //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDCOMMONFLAGS_H
+#define PRDCOMMONFLAGS_H
+
+#include <QtCore/QFlags>
+
+class PRDCommonFlags {
+public:
+
+  enum InDetPartsFlag {
+    None           = 0x000000,
+    BarrelPositive = 0x000001,
+    BarrelNegative = 0x000002,
+    EndCapPositive = 0x000004,
+    EndCapNegative = 0x000008,
+    AllBarrel      = 0x000003,
+    AllEndCap      = 0x00000C,
+    All            = 0x00000F
+  };
+  Q_DECLARE_FLAGS(InDetPartsFlags, InDetPartsFlag)
+
+private:
+  PRDCommonFlags();
+  ~PRDCommonFlags();
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(PRDCommonFlags::InDetPartsFlags)
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDDetTypes.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDDetTypes.h
new file mode 100644
index 0000000000000000000000000000000000000000..bed24f039a865a0308af257ee86ab6a2f43b439a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDDetTypes.h
@@ -0,0 +1,25 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDDETTYPES_H
+#define PRDDETTYPES_H
+
+#include <QtCore/QString>
+
+class PRDDetType {
+public:
+  enum Type {
+    Pixel, SCT, TRT, CSC, RPC, TGC, MDT, SpacePoints, CSCstrip, MM, sTGC
+  };
+  static QString typeToString(const Type&);
+  static Type stringToType(const QString&str, bool & status);
+  static qint32 typeToInt(const Type& t);
+  static Type intToType(const qint32&i, bool & status);
+
+private:
+  PRDDetType();
+};
+
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandleBase.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandleBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d35df91e3f8abde7c855e83224b2fa8a9adc5a2
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandleBase.h
@@ -0,0 +1,90 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLEBASE_H
+#define PRDHANDLEBASE_H
+
+//Fixme: check and doublecheck how to reduce memory used per prd (also includes maps in collhandle).
+
+#include "VP1PRDSystems/PRDSysCommonData.h"
+
+#include "GeoModelKernel/GeoPVConstLink.h"
+
+//#include "CLHEP/Geometry/Transform3D.h"
+#include "GeoPrimitives/GeoPrimitives.h"
+
+#include <QtCore/QFlags>
+#include <QtCore/QStringList>
+
+
+
+
+class PRDCollHandleBase;
+class SoMaterial;
+class SoNode;
+class SoTransform;
+class SoSeparator;
+
+namespace Trk {
+  class PrepRawData;
+}
+
+class TracksAndSegments;
+
+class PRDHandleBase {
+public:
+
+  PRDHandleBase(PRDCollHandleBase*);
+  virtual ~PRDHandleBase();
+
+  void setVisible(bool);//use by the collection handle.
+  bool visible() const { return m_visible; }
+  virtual void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed) = 0;
+  virtual int regionIndex() { return 0; }//prds near each other should return same index (used for optimal LOD usage in AUTO detail mode) (only called once/event)
+  virtual bool highLight() const { return false; }//Return true to get hit highlighted (for e.g. a TRT hits with HT).
+                                            //Outlier highlighting overrides this and is handled in the base classes.
+  virtual bool transformUsesSurfacePositionOnly() const { return false; }//Override and return true if should use just the surface position.
+
+  //Return current shapes (0 if not built at the moment):
+  SoSeparator* sepSimple() const;
+  SoSeparator* sepDetailed() const;
+
+  PRDSysCommonData * common() const { return m_common; }
+
+  virtual Amg::Vector3D center() const;//Default impl. returns positionPRD()
+  Amg::Vector3D positionPRD() const;// The center of the getPRD()
+  Amg::Vector3D positionSecondPRD() const;//The center of the getSecondPRD(). returns (0,0,0) if not available.
+
+  //For PRDCollHandleBase only:
+  Amg::Transform3D getTransform_CLHEP() const;
+  virtual SoTransform * createTransform() const;
+  void update3DObjects();//Call whenever some setting changes in a way which requires changes to the shape of the 3D representation of the prd.
+  void updateMaterial();
+
+  virtual QStringList clicked() const;//Called when user selects the node. The returned strings will be displayed in the textbox.
+  //Reimplement the next two for muon prds:
+  virtual bool inMuonChamber() const { return false; }
+  virtual GeoPVConstLink parentMuonChamberPV() const { return GeoPVConstLink(); }
+
+  PRDCollHandleBase * collHandle() const;
+
+  virtual const Trk::PrepRawData * getPRD() const = 0;//Reimplement to allow access to prd pointer in a generic way.
+  virtual const Trk::PrepRawData * getSecondPRD() const { return 0; }//For SCT spacepoints
+
+  virtual bool isSane() const {return true;} //!< Returns false if the PRD is not safe to draw
+private:
+
+  // Illegal to copy/assign a PRDHandleBase:
+  PRDHandleBase(const PRDHandleBase & );
+  PRDHandleBase & operator= (const PRDHandleBase & );
+
+  class Imp;
+  Imp * d;
+  PRDSysCommonData * m_common;
+//   inline void registerTransform(SoTransform*);
+  bool m_visible;//Here for inlining
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6d09586c0a6107f4a96071f5b17f84e78158d4e
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC.h
@@ -0,0 +1,37 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_CSC_H
+#define PRDHANDLE_CSC_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_CSC.h"
+#include "MuonPrepRawData/CscPrepData.h"
+#include <QtCore/QStringList>
+
+class PRDHandle_CSC : public PRDHandleBase {
+public:
+
+  PRDHandle_CSC(PRDCollHandle_CSC*,const Muon::CscPrepData*);
+  virtual ~PRDHandle_CSC() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  const Muon::CscPrepData * csc() const { return m_csc; }
+  const Trk::PrepRawData * getPRD() const { return m_csc; }
+
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_csc->detectorElement()->parentStationPV(); }
+
+  virtual QStringList clicked() const;//Called when user selects the node. The returned strings will be displayed in the textbox.
+
+
+private:
+  const Muon::CscPrepData* m_csc;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC_Strip.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC_Strip.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1d3b826b530c6b23c331619ce44f460a985cb7b
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_CSC_Strip.h
@@ -0,0 +1,37 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef VP1PRDSYSTEMS_PRDHANDLE_CSC_STRIP_H
+#define VP1PRDSYSTEMS_PRDHANDLE_CSC_STRIP_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_CSC_Strip.h"
+#include "MuonPrepRawData/CscStripPrepData.h"
+#include <QtCore/QStringList>
+
+class PRDHandle_CSC_Strip : public PRDHandleBase {
+public:
+
+  PRDHandle_CSC_Strip(PRDCollHandle_CSC_Strip*,const Muon::CscStripPrepData*);
+  virtual ~PRDHandle_CSC_Strip() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  const Muon::CscStripPrepData * csc() const { return m_csc; }
+  const Trk::PrepRawData * getPRD() const { return m_csc; }
+
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_csc->detectorElement()->parentStationPV(); }
+
+  virtual QStringList clicked() const;//Called when user selects the node. The returned strings will be displayed in the textbox.
+
+
+private:
+  const Muon::CscStripPrepData* m_csc;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MDT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MDT.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec2fb12e2e1e9aad605c05185381a589eb34065d
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MDT.h
@@ -0,0 +1,60 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_MDT_H
+#define PRDHANDLE_MDT_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_MDT.h"
+#include "MuonPrepRawData/MdtPrepData.h"
+
+class PRDHandle_MDT : public PRDHandleBase {
+public:
+
+  PRDHandle_MDT(PRDCollHandle_MDT*,const Muon::MdtPrepData*);
+  virtual ~PRDHandle_MDT() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+  QStringList clicked() const;
+
+  inline bool highLight() const;
+
+  bool transformUsesSurfacePositionOnly() const { return true; }
+  const Muon::MdtPrepData * driftCircle() const { return m_driftcircle; }
+  const Trk::PrepRawData * getPRD() const { return m_driftcircle; }
+
+  inline bool masked() const;
+  QString driftCircleStatus() const;
+  inline int ADC() const;
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_driftcircle->detectorElement()->parentStationPV(); }
+
+
+// protected:
+//   void visibleStateChanged(bool newstate);
+
+private:
+  const Muon::MdtPrepData* m_driftcircle;
+
+};
+
+inline bool PRDHandle_MDT::masked() const
+{
+  return m_driftcircle->status()==Muon::MdtStatusMasked;
+}
+
+inline int PRDHandle_MDT::ADC() const
+{
+  return m_driftcircle->adc();
+}
+
+inline bool PRDHandle_MDT::highLight() const
+{
+  PRDCollHandle_MDT* ch = static_cast<PRDCollHandle_MDT*>(collHandle());
+  return ( masked() && ch->highLightMasked() ) || ( ADC() <= ch->highLightADCBelow() );
+}
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MM.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MM.h
new file mode 100644
index 0000000000000000000000000000000000000000..327ce910684f87f9cf1c719fc0a256351dabdc1a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_MM.h
@@ -0,0 +1,44 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_MM_H
+#define PRDHANDLE_MM_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_MM.h"
+#include "MuonPrepRawData/MMPrepData.h"
+
+class PRDHandle_MM : public PRDHandleBase {
+public:
+
+  PRDHandle_MM(PRDCollHandle_MM*,const Muon::MMPrepData*);
+  virtual ~PRDHandle_MM() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+  QStringList clicked() const;
+
+  // inline bool highLight() const;
+
+  const Muon::MMPrepData * mm() const { return m_prd; }
+  const Trk::PrepRawData * getPRD() const { return m_prd; }
+
+  // inline bool masked() const;
+  // QString driftCircleStatus() const;
+  // inline int ADC() const;
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_prd->detectorElement()->parentStationPV(); }
+
+
+// protected:
+//   void visibleStateChanged(bool newstate);
+
+private:
+  const Muon::MMPrepData* m_prd;
+
+};
+
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_Pixel.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_Pixel.h
new file mode 100644
index 0000000000000000000000000000000000000000..794f9dcd65b52e61f429b6ed592edaf6dddb7385
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_Pixel.h
@@ -0,0 +1,38 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_PIXEL_H
+#define PRDHANDLE_PIXEL_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "InDetPrepRawData/PixelCluster.h"
+
+class PRDCollHandle_Pixel;
+class SoGroup;
+
+class PRDHandle_Pixel : public PRDHandleBase {
+public:
+
+  PRDHandle_Pixel(PRDCollHandle_Pixel*,const InDet::PixelCluster*);
+  virtual ~PRDHandle_Pixel() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  const InDet::PixelCluster * cluster() const { return m_cluster; }
+  const Trk::PrepRawData * getPRD() const { return m_cluster; }
+  bool isBarrel() const { return m_cluster->detectorElement()->isBarrel(); }
+  bool isPositiveZ() const { return m_cluster->detectorElement()->center().z() > 0.0; }
+  bool isSane() const; //!< returns false if anything seems weird about the Pixelcluster
+
+private:
+  const InDet::PixelCluster* m_cluster;
+
+  SoGroup* createErrorAtPixelCluster( const double& sigmaScale,
+				      const int& numPoints ) const;
+	
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_RPC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_RPC.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee274c6aaef68f5661f46ae22fa1df220767e34e
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_RPC.h
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_RPC_H
+#define PRDHANDLE_RPC_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_RPC.h"
+#include "MuonPrepRawData/RpcPrepData.h"
+
+class PRDHandle_RPC : public PRDHandleBase {
+public:
+
+  PRDHandle_RPC(PRDCollHandle_RPC*,const Muon::RpcPrepData*);
+  virtual ~PRDHandle_RPC() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+  QStringList clicked() const;
+
+  const Muon::RpcPrepData * rpc() const { return m_rpc; }
+  const Trk::PrepRawData * getPRD() const { return m_rpc; }
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_rpc->detectorElement()->parentStationPV(); }
+
+private:
+  const Muon::RpcPrepData* m_rpc;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SCT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SCT.h
new file mode 100644
index 0000000000000000000000000000000000000000..4267bafd25973bb31cdb53e01de0fc4e486bc3bc
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SCT.h
@@ -0,0 +1,32 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_SCT_H
+#define PRDHANDLE_SCT_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "InDetPrepRawData/SCT_Cluster.h"
+
+class PRDCollHandle_SCT;
+
+class PRDHandle_SCT : public PRDHandleBase {
+public:
+
+  PRDHandle_SCT(PRDCollHandle_SCT*,const InDet::SCT_Cluster*);
+  virtual ~PRDHandle_SCT() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  const InDet::SCT_Cluster * cluster() const { return m_cluster; }
+  const Trk::PrepRawData * getPRD() const { return m_cluster; }
+  bool isBarrel() const { return m_cluster->detectorElement()->isBarrel(); }
+  bool isPositiveZ() const { return m_cluster->detectorElement()->center().z() > 0.0; }
+
+private:
+  const InDet::SCT_Cluster* m_cluster;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SpacePoint.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SpacePoint.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b6280c8bcd4c2b64628b2e5eaed0c86e6fb5c51
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_SpacePoint.h
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class PRDHandle_SpacePoint                //
+//                                                            //
+//  Description: Handles for SpacePoints (not really "PRDs")  //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: September 2008                           //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDHANDLE_SPACEPOINT_H
+#define PRDHANDLE_SPACEPOINT_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "TrkSpacePoint/SpacePoint.h"
+#include "TrkPrepRawData/PrepRawData.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+
+
+namespace Trk { class SpacePoint; }
+class PRDCollHandle_SpacePoints;
+
+class PRDHandle_SpacePoint : public PRDHandleBase {
+public:
+
+  PRDHandle_SpacePoint(PRDCollHandle_SpacePoints*,const Trk::SpacePoint*);
+  virtual ~PRDHandle_SpacePoint();
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  Amg::Vector3D center() const { return m_sp->globalPosition(); }
+
+//SCT spacepoints have two clusters, Pixels one:
+  bool isSCT() { return getSecondPRD(); }
+  bool isPixel() { return !getSecondPRD(); }
+
+  const Trk::SpacePoint * spacePoint() const { return m_sp; }
+  const Trk::PrepRawData * getPRD() const { return m_sp->clusterList().first; }
+  const Trk::PrepRawData * getSecondPRD() const { return m_sp->clusterList().second; }
+  bool isBarrel() const
+  { return static_cast<const InDetDD::SiDetectorElement*>(getPRD()->detectorElement())->isBarrel(); }
+  bool isPositiveZ() const { return m_sp->globalPosition().z() > 0.0; }
+
+private:
+
+  // Uncomment to make it illegal to copy/assign a PRDHandle_SpacePoint:
+  // PRDHandle_SpacePoint( const PRDHandle_SpacePoint & );
+  // PRDHandle_SpacePoint & operator= ( const PRDHandle_SpacePoint & );
+
+  const Trk::SpacePoint* m_sp;
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TGC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TGC.h
new file mode 100644
index 0000000000000000000000000000000000000000..2bd9021f06d8efcd47cb3ea8b6b9528cb751b9d9
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TGC.h
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_TGC_H
+#define PRDHANDLE_TGC_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_TGC.h"
+#include "MuonPrepRawData/TgcPrepData.h"
+
+class PRDHandle_TGC : public PRDHandleBase {
+public:
+
+  PRDHandle_TGC(PRDCollHandle_TGC*,const Muon::TgcPrepData*);
+  virtual ~PRDHandle_TGC() {};
+
+  SoTransform * createTransform() const;
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+
+  const Muon::TgcPrepData * tgc() const { return m_tgc; }
+  const Trk::PrepRawData * getPRD() const { return m_tgc; }
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_tgc->detectorElement()->parentStationPV(); }
+
+private:
+  const Muon::TgcPrepData* m_tgc;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TRT.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TRT.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae65679271f9714edbcbfd49e32b6b523c87a604
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_TRT.h
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_TRT_H
+#define PRDHANDLE_TRT_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_TRT.h"
+#include "InDetPrepRawData/TRT_DriftCircle.h"
+
+class PRDHandle_TRT : public PRDHandleBase {
+public:
+
+  PRDHandle_TRT(PRDCollHandle_TRT*,const InDet::TRT_DriftCircle*);
+  virtual ~PRDHandle_TRT() {};
+
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed);
+  int regionIndex();
+  inline bool highLight() const;
+
+  bool transformUsesSurfacePositionOnly() const { return true; }
+
+  const InDet::TRT_DriftCircle * driftCircle() const { return m_driftcircle; }
+  const Trk::PrepRawData * getPRD() const { return m_driftcircle; }
+
+  bool isBarrel() const { return m_driftcircle->detectorElement()->type()==InDetDD::TRT_BaseElement::BARREL; }
+  bool isPositiveZ() const { return m_driftcircle->detectorElement()->center().z() > 0.0; }
+  bool highLevel() const { return m_driftcircle->highLevel(); }
+
+  virtual QStringList clicked() const;
+
+
+private:
+  const InDet::TRT_DriftCircle* m_driftcircle;
+
+};
+
+///////////////
+//  INLINES  //
+///////////////
+
+inline bool PRDHandle_TRT::highLight() const
+{
+  return highLevel() && static_cast<PRDCollHandle_TRT*>(collHandle())->highLightHighThreshold();
+}
+
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_sTGC.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_sTGC.h
new file mode 100644
index 0000000000000000000000000000000000000000..ddaefebd17c3f79d4677da9dceaf61c3a36204c0
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDHandle_sTGC.h
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PRDHANDLE_STGC_H
+#define PRDHANDLE_STGC_H
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDCollHandle_sTGC.h"
+#include "MuonPrepRawData/sTgcPrepData.h"
+
+class PRDHandle_sTGC : public PRDHandleBase {
+public:
+
+  PRDHandle_sTGC(PRDCollHandle_sTGC*,const Muon::sTgcPrepData*);
+  virtual ~PRDHandle_sTGC() {};
+
+  SoTransform * createTransform() const ; // FIXME! 
+  void buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed) ;
+
+  int regionIndex();
+
+  const Muon::sTgcPrepData * stgc() const { return m_stgc; }
+  const Trk::PrepRawData * getPRD() const { return m_stgc; }
+
+  bool inMuonChamber() const { return true; }
+  GeoPVConstLink parentMuonChamberPV() const { return m_stgc->detectorElement()->parentStationPV(); }
+
+private:
+  const Muon::sTgcPrepData* m_stgc;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSysCommonData.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSysCommonData.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e46f8e07741d447c9e0e2f29fd793ba65bf9d21
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSysCommonData.h
@@ -0,0 +1,89 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class PRDSysCommonData                    //
+//                                                            //
+//  Description: Common pointers, data, node-to-object maps   //
+//               etc. for the prd system                      //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: July 2008                                //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDSYSCOMMONDATA_H
+#define PRDSYSCOMMONDATA_H
+
+#include "VP1Base/VP1HelperClassBase.h"
+class IVP13DSystem;
+class HitsSoNodeManager;
+class PRDSystemController;
+class VP1SoMaterialMixer;
+class MuonChamberProjectionHelper;
+class InDetProjHelper;
+class TouchedMuonChamberHelper;
+class PRDTrackSegmentHelper;
+class SoTransform;
+class SoPath;
+class PRDHandleBase;
+namespace Trk { class PrepRawData; }
+
+class PRDSysCommonData : public VP1HelperClassBase {
+public:
+
+  PRDSysCommonData(IVP13DSystem *, PRDSystemController*);
+  virtual ~PRDSysCommonData();
+
+  IVP13DSystem * system() const;
+  HitsSoNodeManager * nodeManager() const;
+  PRDSystemController * controller() const;
+  VP1SoMaterialMixer * materialMixer() const;
+  MuonChamberProjectionHelper * muonChamberProjectionHelper() const;
+  InDetProjHelper * indetProjHelper_Pixel() const;
+  InDetProjHelper * indetProjHelper_SCT() const;
+  InDetProjHelper * indetProjHelper_TRT() const;
+  TouchedMuonChamberHelper * touchedMuonChamberHelper() const;
+  PRDTrackSegmentHelper * trackAndSegmentHelper() const;
+
+  void registerTransform2Handle(SoTransform*transform,PRDHandleBase*handle);
+  void registerPRD2Handle(const Trk::PrepRawData*prd,PRDHandleBase*handle);
+  //Access pick->handle association (and pop path):
+  PRDHandleBase * pickedPathToHandle( SoPath*pickedPath );
+
+  void clearEventData(); //Deletes AscObjSelectionManager
+
+private:
+
+  class Imp;
+  Imp * d;
+
+  IVP13DSystem * m_3dsystem;
+  HitsSoNodeManager * m_nodeManager;
+  PRDSystemController * m_controller;
+  VP1SoMaterialMixer * m_materialMixer;
+  MuonChamberProjectionHelper * m_muonChamberProjectionHelper;
+  InDetProjHelper * m_indetProjHelper_Pixel;
+  InDetProjHelper * m_indetProjHelper_SCT;
+  InDetProjHelper * m_indetProjHelper_TRT;
+  TouchedMuonChamberHelper * m_touchedMuonChamberHelper;
+
+  PRDTrackSegmentHelper * m_trackAndSegmentHelper;
+
+};
+
+inline IVP13DSystem* PRDSysCommonData::system() const { return m_3dsystem; }
+inline HitsSoNodeManager* PRDSysCommonData::nodeManager() const { return m_nodeManager; }
+inline PRDSystemController * PRDSysCommonData::controller() const { return m_controller; }
+inline VP1SoMaterialMixer * PRDSysCommonData::materialMixer() const { return m_materialMixer; }
+inline MuonChamberProjectionHelper * PRDSysCommonData::muonChamberProjectionHelper() const { return m_muonChamberProjectionHelper; }
+inline InDetProjHelper * PRDSysCommonData::indetProjHelper_Pixel() const { return m_indetProjHelper_Pixel; }
+inline InDetProjHelper * PRDSysCommonData::indetProjHelper_SCT() const { return m_indetProjHelper_SCT; }
+inline InDetProjHelper * PRDSysCommonData::indetProjHelper_TRT() const { return m_indetProjHelper_TRT; }
+inline TouchedMuonChamberHelper * PRDSysCommonData::touchedMuonChamberHelper() const { return m_touchedMuonChamberHelper; }
+inline PRDTrackSegmentHelper * PRDSysCommonData::trackAndSegmentHelper() const { return m_trackAndSegmentHelper; }
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSystemController.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSystemController.h
new file mode 100644
index 0000000000000000000000000000000000000000..607063aa9f853c6d40c702a5cca12c2757019425
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDSystemController.h
@@ -0,0 +1,215 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class PRDSystemController                 //
+//                                                            //
+//  Description: Controller widget for the PRD system.        //
+//               Keeps all nasty gui stuff internally, and    //
+//               only presents the actual interesting data    //
+//               with specialised access methods and signals. //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: November 2007                            //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDSYSTEMCONTROLLER_H
+#define PRDSYSTEMCONTROLLER_H
+
+#include "VP1Base/VP1Controller.h"
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDCommonFlags.h"
+#include "VP1PRDSystems/PRDDetTypes.h"
+#include "VP1Utils/InDetProjFlags.h"
+#include <QtCore/QByteArray>
+#include <set>
+class VP1CollectionWidget;
+class SoMaterial;
+class SoGroup;
+
+class PRDSystemController : public VP1Controller {
+
+  Q_OBJECT
+
+public:
+
+  PRDSystemController(IVP1System * sys);
+  virtual ~PRDSystemController();
+
+  void actualRestoreSettings(VP1Deserialise&);
+  int currentSettingsVersion() const;
+  void actualSaveSettings(VP1Serialise&) const;
+
+  //Use by the system to access the collection widget, which again is
+  //the main entry point for communication with the prd collections
+  //(loading/hiding/etc.).
+  VP1CollectionWidget * collWidget() const;
+
+  SoGroup * drawOptions(PRDDetType::Type) const;
+
+  SoMaterial * getHighLightMaterial();
+  double highLightMaterialWeight() const;//value indicates relative weight
+				   //of highlight material. 0.0
+				   //obviously means no high light
+				   //material, and values > 999.0
+				   //should be taken to mean infinite
+				   //weight
+
+  //Stateless on-click info:
+  bool printInfoOnClick() const;
+  bool zoomOnClick() const;
+  bool muonOrientToChambersOnClick() const;
+
+  //Access relevant information of controller:
+  PRDCollHandleBase::COLOURMETHOD colourMethod() const;
+
+  bool selectionModeMultiple() const;
+  bool showSelectionLine() const;
+  SoMaterial * getMultiSelectionLineMaterial() const;
+
+  bool highLightOutliers() const;
+  bool drawErrors() const;
+  bool drawRDOs() const;
+
+  bool highLightTRTHitsByHighThreshold();
+  bool highLightMDTHitsByMask();
+  int highLightMDTHitsByUpperADCBound();
+
+  bool projectPixelHits() const;
+  bool projectSCTHits() const;
+  bool projectTRTHits() const;
+  bool projectMDTHits() const;
+  bool projectRPCHits() const;
+  bool projectCSCHits() const;
+  bool projectTGCHits() const;
+  // bool projectSTGCHits() const;
+
+  //Cuts;
+  VP1Interval cutAllowedEta() const;
+  QList<VP1Interval> cutAllowedPhi() const;//All off: empty list. All on: list with one entry: ]-inf,inf[
+  PRDCommonFlags::InDetPartsFlags inDetPartsFlags() const;
+  unsigned pixelMinNRDOPerCluster() const;
+  bool sctExcludeIsolatedClusters() const;
+  unsigned trtMinToT() const;
+  unsigned trtMaxToT() const;
+  unsigned trtMinLE() const;
+  unsigned trtMaxLE() const;
+  bool trtRequireHT() const;
+  unsigned mdtMinNHitsPerStation() const;
+  VP1Interval mdtAllowedADCValues() const;
+  bool mdtExcludeMaskedHits() const;
+  QString mdt_cutMdtDriftCircleStatus() const;
+  bool limitToActiveChambers() const;
+  //Used ID parts:
+  InDetProjFlags::DetTypeFlags inDetPartsUsingProjections() const;
+
+  std::set<PRDDetType::Type> shownCollectionTypes() const;
+
+signals:
+  //The following signals are emitted when any of the relevant information in the controller changes value:
+
+  //Display modes and projections:
+  //  void generalPRDDetailLevelChanged(PRDCollHandleBase::DETAIL);
+  void colourMethodChanged(PRDCollHandleBase::COLOURMETHOD);
+  void selectionModeMultipleChanged(bool);
+  void showSelectionLineChanged(bool);
+  void clearSelection() const;//only signal
+  void highLightMaterialWeightChanged(const double&);
+  void highLightOutliersChanged(bool);
+  void drawErrorsChanged(bool);
+  void drawRDOsChanged(bool);
+  void highLightTRTHitsByHighThresholdChanged(bool);
+  void highLightMDTHitsByMaskChanged(bool);
+  void highLightMDTHitsByUpperADCBoundChanged(int);
+  void projectPixelHitsChanged(bool);
+  void projectSCTHitsChanged(bool);
+  void projectTRTHitsChanged(bool);
+  void projectMDTHitsChanged(bool);
+  void projectRPCHitsChanged(bool);
+  void projectCSCHitsChanged(bool);
+  void projectTGCHitsChanged(bool);
+  // void projectSTGCHitsChanged(bool);
+
+  //Cuts:
+  void cutAllowedEtaChanged(const VP1Interval&);
+  void cutAllowedPhiChanged(const QList<VP1Interval>&);
+  void inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags);
+  void pixelMinNRDOPerClusterChanged(unsigned);
+  void sctExcludeIsolatedClustersChanged(bool);
+  void trtMinToTChanged(unsigned);
+  void trtMaxToTChanged(unsigned);
+  void trtMinLEChanged(unsigned);
+  void trtMaxLEChanged(unsigned);
+  void trtRequireHTChanged(bool);
+  void mdtMinNHitsPerStationChanged(unsigned);
+  void mdtAllowedADCValuesChanged(VP1Interval);
+  void mdtExcludeMaskedHitsChanged(bool);
+  void mdt_cutMdtDriftCircleStatusChanged(QString);
+
+  void limitToActiveChambersChanged(bool);
+
+  //Used ID parts:
+  void inDetPartsUsingProjectionsChanged(InDetProjFlags::DetTypeFlags);
+  void shownCollectionTypesChanged(const std::set<PRDDetType::Type>&);
+  
+private:
+
+  class Imp;
+  Imp * d;
+
+  //For verbose output:
+  template <class T> static QString toString( const T& t ) { return VP1Controller::toString(t); }//unhide base methods
+
+  static QString toString( const PRDCollHandleBase::DETAIL& par ) { return PRDCollHandleBase::toString(par); }
+  static QString toString( const PRDCollHandleBase::COLOURMETHOD& par ) { return PRDCollHandleBase::toString(par); }
+  static QString toString( const std::set<PRDDetType::Type>& s ) { return "["+str(s.size())+" types]"; }
+
+
+private slots:
+  void emitClearSelection();
+  void updateHighlightGui();
+  void possibleChange_colourMethod();
+  void possibleChange_selectionModeMultiple();
+  void possibleChange_showSelectionLine();
+  void possibleChange_highLightMaterialWeight();
+  void possibleChange_highLightOutliers();
+  void possibleChange_drawErrors();
+  void possibleChange_drawRDOs();
+  void possibleChange_highLightTRTHitsByHighThreshold();
+  void possibleChange_highLightMDTHitsByMask();
+  void possibleChange_highLightMDTHitsByUpperADCBound();
+  void possibleChange_cutAllowedEta();
+  void possibleChange_cutAllowedPhi();
+  void possibleChange_inDetPartsFlags();
+  void possibleChange_pixelMinNRDOPerCluster();
+  void possibleChange_sctExcludeIsolatedClusters();
+  void possibleChange_trtMinToT();
+  void possibleChange_trtMaxToT();
+  void possibleChange_trtMinLE();
+  void possibleChange_trtMaxLE();
+  void possibleChange_trtRequireHT();
+  void possibleChange_mdtMinNHitsPerStation();
+  void possibleChange_mdtAllowedADCValues();
+  void possibleChange_mdtExcludeMaskedHits();
+  void possibleChange_mdt_cutMdtDriftCircleStatus();
+  
+  void possibleChange_limitToActiveChambers();
+
+  void possibleChange_projectPixelHits();
+  void possibleChange_projectSCTHits();
+  void possibleChange_projectTRTHits();
+  void possibleChange_projectMDTHits();
+  void possibleChange_projectRPCHits();
+  void possibleChange_projectCSCHits();
+  void possibleChange_projectTGCHits();
+  // void possibleChange_projectSTGCHits();
+  void possibleChange_inDetPartsUsingProjections();
+  void possibleChange_shownCollectionTypes();
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDTrackSegmentHelper.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDTrackSegmentHelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..7115bc91fd8aa90d7004ded8323bc3413012e7f6
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/PRDTrackSegmentHelper.h
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Header file for class PRDTrackSegmentHelper               //
+//                                                            //
+//  Description: Class for keeping track of visible tracks    //
+//               and segments and their materials, for        //
+//               colour-prd-by-XXX modes.                     //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: December 2007                            //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#ifndef PRDTRACKSEGMENTHELPER_H
+#define PRDTRACKSEGMENTHELPER_H
+
+#include "VP1Base/VP1HelperClassBase.h"
+#include <QtCore/QObject>
+#include <vector>
+#include <map>
+
+class SoMaterial;
+class PRDHandleBase;
+namespace Trk
+{
+  class Track;
+  class Segment;
+  class PrepRawData;
+}
+
+class PRDTrackSegmentHelper : public QObject, public VP1HelperClassBase {
+
+  Q_OBJECT
+
+public:
+
+  PRDTrackSegmentHelper( std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >* prd2handle,
+			 IVP1System* sys = 0, QObject * parent = 0);
+  virtual ~PRDTrackSegmentHelper();
+
+  //This is used to inform the class of changes in visible tracks and segments:
+  void visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >&);
+  void visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >&);
+
+  SoMaterial * trackMaterial(const Trk::Track*) const;
+  SoMaterial * segmentMaterial(const Trk::Segment*) const;
+  class TracksAndSegments {
+  public:
+    inline TracksAndSegments(const std::vector<const Trk::Track*>&,const std::vector<const Trk::Track*>&,const std::vector< const Trk::Segment* >& );
+    std::vector<const Trk::Track*> tracks;//tracks using the given prd in the fit
+    std::vector<const Trk::Track*> tracks_outliers;//tracks where the given prd is associated as 'outlier'
+    std::vector< const Trk::Segment* > segments;//segments using the given prd
+  };
+  const TracksAndSegments * tracksAndSegments(const Trk::PrepRawData*);//0 means no tracks/segments
+private:
+
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/TouchedMuonChamberHelper.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/TouchedMuonChamberHelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..d97dbaf81667cfac4ad27b411721213a6396e7a1
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/TouchedMuonChamberHelper.h
@@ -0,0 +1,56 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+/////////////////////////////////////////////////////////////////
+//                                                             //
+//  Header file for class TouchedMuonChamberHelper             //
+//                                                             //
+//  Description: For keeping track of muon chambers with       //
+//               (shown) objects in them, and for ensuring     //
+//               that systems emit signals as appropriate      //
+//                                                             //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)   //
+//  Initial version: January 2008                              //
+//                                                             //
+/////////////////////////////////////////////////////////////////
+
+#ifndef TOUCHEDMUONCHAMBERHELPER_H
+#define TOUCHEDMUONCHAMBERHELPER_H
+
+#include <QtCore/QObject>
+#include "GeoModelKernel/GeoPVConstLink.h"
+#include <set>
+
+class TouchedMuonChamberHelper : public QObject {
+
+  Q_OBJECT
+
+public:
+
+  TouchedMuonChamberHelper(QObject * parent = 0);
+  virtual ~TouchedMuonChamberHelper();
+
+  void incrementNumberOfObjectsForPV(const GeoPVConstLink& chamberPV);
+  void decrementNumberOfObjectsForPV(const GeoPVConstLink& chamberPV);
+
+  bool isTouchedByTrack(const GeoPVConstLink& chamberPV);//!< Returns true if the passed chamber link has a track or segment.
+  void eraseEventData();
+
+  void updateTouchedByTracks(const std::set<GeoPVConstLink>&);
+
+signals:
+  void touchedMuonChambersChanged(const std::set<GeoPVConstLink>&);
+  void muonChambersTouchedByTracksChanged(void);
+
+private slots:
+  void checkForChangeInTouchedChambers();
+
+private:
+  class Imp;
+  Imp * d;
+
+};
+
+#endif
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/VP1PrepRawDataSystem.h b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/VP1PrepRawDataSystem.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0434c5c0ba4a04bb6979315280ccce7944336b5
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/VP1PRDSystems/VP1PrepRawDataSystem.h
@@ -0,0 +1,76 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef VP1PREPRAWDATASYSTEM_H
+#define VP1PREPRAWDATASYSTEM_H
+
+#include "VP1Base/IVP13DSystemSimple.h"
+#include "GeoModelKernel/GeoPVConstLink.h"//It would be good to get rid of this.
+#include "VP1Utils/InDetProjFlags.h"
+#include <vector>
+#include <QtCore/QList>
+
+class SoMaterial;
+namespace Trk
+{
+  class Track;
+  class Segment;
+  class PrepRawData;
+}
+
+class VP1PrepRawDataSystem : public IVP13DSystemSimple {
+
+  Q_OBJECT
+
+public:
+  VP1PrepRawDataSystem();
+  virtual ~VP1PrepRawDataSystem();
+  void buildEventSceneGraph(StoreGateSvc* sg, SoSeparator *root);
+  void buildPermanentSceneGraph(StoreGateSvc* detstore, SoSeparator *root);//For TRT Projection surfaces
+  void systemcreate(StoreGateSvc* detstore);
+  void systemerase();
+  void systemuncreate();
+
+  void userPickedNode(SoNode* pickedNode, SoPath * pickedPath);
+  void userSelectedSingleNode(SoCooperativeSelection*, SoNode* , SoPath*);//SINGLE
+  void userDeselectedSingleNode(SoCooperativeSelection*, SoNode* , SoPath*);//SINGLE
+  void userChangedSelection(SoCooperativeSelection*, QSet<SoNode*>, QSet<SoPath*>);//TOGGLE/SHIFT
+  void userClickedOnBgd();
+
+  virtual void deselectAll(SoCooperativeSelection* exception_sel = 0);
+
+  virtual QWidget * buildController();
+
+  QByteArray saveState();
+  void restoreFromState(QByteArray);
+
+public slots:
+  void visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >&);
+  void visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >&);
+  void appropriateMDTProjectionsChanged(int);//0: No projections, 1: Project to end of tubes, 2: Project to end of chamber volume.
+  void setApplicableIDProjections( InDetProjFlags::InDetProjPartsFlags pixel,
+				   InDetProjFlags::InDetProjPartsFlags sct,
+				   InDetProjFlags::InDetProjPartsFlags trt );
+  void muonChambersWithTracksChanged(const std::set<GeoPVConstLink>&);
+
+signals:
+  void touchedMuonChambersChanged(const std::set<GeoPVConstLink>&);//Fixme: Remember to emit in e.g. systemerase (is that automatic?)
+  void prdInMuonChamberSelected(const GeoPVConstLink& chamberPV);
+  void usedIDProjectionsChanged( InDetProjFlags::DetTypeFlags );
+  void selectedPRDsChanged(const QList<const Trk::PrepRawData*>&);
+
+private slots:
+  void emitTouchedMuonChambersChanged(const std::set<GeoPVConstLink>&);//for TouchedMuonChamberHelper
+  void emitUsedIDProjectionsChanged(InDetProjFlags::DetTypeFlags);//for controller
+  void selectionModeChanged();
+  void selectionVisualsChanged();
+  void clearSelection();
+  void updateSelectionVisualsAndPossiblyEmitPRDList();
+private:
+  class Imp;
+  Imp * d;
+};
+
+#endif
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/cmt/requirements b/graphics/VP1/VP1Systems/VP1PRDSystems/cmt/requirements
new file mode 100644
index 0000000000000000000000000000000000000000..acb602b83f49446fd4c317a592b716dc91805679
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/cmt/requirements
@@ -0,0 +1,45 @@
+package VP1PRDSystems
+
+author Edward Moyse <Edward.Moyse@cern.ch>
+author Thomas Kittelmann <Thomas.Kittelmann@cern.ch>
+
+public
+use  AtlasPolicy                AtlasPolicy-*
+#use  AtlasCLHEP                 AtlasCLHEP-*                    External
+use  GeoModelKernel             GeoModelKernel-*                DetectorDescription/GeoModel
+use  InDetPrepRawData           InDetPrepRawData-*              InnerDetector/InDetRecEvent
+use  InDetReadoutGeometry       InDetReadoutGeometry-*          InnerDetector/InDetDetDescr
+use  MuonPrepRawData            MuonPrepRawData-*               MuonSpectrometer/MuonReconstruction/MuonRecEvent
+use  TrkPrepRawData             TrkPrepRawData-*                Tracking/TrkEvent
+use  TrkSpacePoint              TrkSpacePoint-*                 Tracking/TrkEvent
+use  VP1Base                    VP1Base-*                       graphics/VP1
+use  VP1Qt                      VP1Qt-*                         graphics/VP1
+use  VP1Utils                   VP1Utils-*                      graphics/VP1
+use  GeoPrimitives              GeoPrimitives-*                 DetectorDescription
+
+
+private
+use  AtlasCoinInventor          AtlasCoinInventor-*             External
+use  DataModel                  DataModel-*                     Control
+use  GeoModelUtilities          GeoModelUtilities-*             DetectorDescription/GeoModel
+use  InDetIdentifier            InDetIdentifier-*               InnerDetector/InDetDetDescr
+#use  MuonGeoModel               MuonGeoModel-*                  MuonSpectrometer
+use  MuonIdHelpers              MuonIdHelpers-*                 MuonSpectrometer
+use  MuonReadoutGeometry        MuonReadoutGeometry-*           MuonSpectrometer/MuonDetDescr
+#use  TrkEventPrimitives         TrkEventPrimitives-*            Tracking/TrkEvent
+use  TrkMeasurementBase         TrkMeasurementBase-*            Tracking/TrkEvent
+use  TrkRIO_OnTrack             TrkRIO_OnTrack-*                Tracking/TrkEvent
+use  TrkCompetingRIOsOnTrack  TrkCompetingRIOsOnTrack-*     Tracking/TrkEvent
+use  TrkSegment                 TrkSegment-*                    Tracking/TrkEvent
+use  TrkSurfaces                TrkSurfaces-*                   Tracking/TrkDetDescr
+use  TrkTrack                   TrkTrack-*                      Tracking/TrkEvent
+use  VP1GuideLineSystems        VP1GuideLineSystems-*           graphics/VP1/VP1Systems
+use  VP1HEPVis                  VP1HEPVis-*                     graphics/VP1
+use  EventPrimitives            EventPrimitives-*               Event
+
+
+public
+
+apply_pattern qt4based_library
+
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..1f052f843ea59eebab2f7e9a775f7e00a53dba1a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx
@@ -0,0 +1,554 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class MuonChamberProjectionHelper       //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: January 2008                             //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/MuonChamberProjectionHelper.h"
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGAccessHelper.h"
+#include "VP1Base/IVP1System.h"
+
+#include "GeoModelKernel/GeoVolumeCursor.h"
+#include "GeoModelKernel/GeoLogVol.h"
+#include "GeoModelKernel/GeoTrd.h"
+#include "GeoModelKernel/GeoShapeShift.h"
+#include "GeoModelKernel/GeoShapeUnion.h"
+#include "GeoModelKernel/GeoShapeIntersection.h"
+#include "GeoModelKernel/GeoShapeSubtraction.h"
+#include "GeoModelUtilities/GeoModelExperiment.h"
+
+#include <map>
+
+//____________________________________________________________________
+class MuonChamberProjectionHelper::Imp {
+public:
+  Imp( MuonChamberProjectionHelper* tc,
+       StoreGateSvc * ds ) : theclass(tc),
+			     detectorStore(ds),
+			     initattempted(false),
+			     initsucceeded(false) {}
+  MuonChamberProjectionHelper* theclass;
+  StoreGateSvc * detectorStore;
+  bool initattempted;
+  bool initsucceeded;
+  bool ensureInited();//Returns false if can't init.
+  bool init();//Returns false if can't init.
+
+  //MDT chambers:
+  class MDTChamberInfo {
+    public:
+    MDTChamberInfo(const Amg::Transform3D& l2g, const GeoTrd* t)
+      : localToGlobal(l2g), globalToLocal(0), trd(t) {}
+    Amg::Transform3D localToGlobal;
+    Amg::Transform3D * globalToLocal;//Only created on demand - saving ~100KB in a typical job.
+    const GeoTrd * trd;
+    void ensureInitGlobalToLocal() { if (!globalToLocal) globalToLocal = new Amg::Transform3D(localToGlobal.inverse()); }
+    ~MDTChamberInfo() { delete globalToLocal; }
+  };
+  std::map<GeoPVConstLink,MDTChamberInfo>::iterator itLastMDTChamberLookedUp;
+  std::map<GeoPVConstLink,MDTChamberInfo> mdtchambervolinfo;//Map typically has around 1124 entries.
+  typedef std::map<GeoPVConstLink,MDTChamberInfo>::iterator ChamberInfoMapItr;
+  inline bool nameIsMDTChamber( const std::string& n );
+  bool getMDTChamberVolInfo(const GeoPVConstLink& mdtChamber,ChamberInfoMapItr& itChamberInfo, bool silent = false );
+  void getMDTChamberXAndZ(ChamberInfoMapItr& itChamberInfo, double & trdX, double & trdZ );
+
+  //Todo: CSC and TGC chambers also.
+
+
+  //Utility:
+  inline double pointToPlaneDistAlongLine( const Amg::Vector3D& point, const Amg::Vector3D& lineDirection,
+						  const Amg::Vector3D& planePoint, const Amg::Vector3D& planeNormal );
+  void projectXZPointToTrdAlongYAxis( const double& x, const double& z,const GeoTrd* trd,
+		                  Amg::Vector3D & firstEndWall_point, Amg::Vector3D & secondEndWall_point );
+
+  static bool constrainPointToRectangleAlongLine( const double& trdX, const double& trdZ, const double& x0, const double& z0,
+						  double& x1, double& z1 );//Moves x1,z1 towards x0,z0 so (x1,z1) ends up on edge of
+                                                                           //rectangle defined by |x|<=trdX && |z|<=trdZ. Returns false if
+                                                                           //not possible (i.e. line segment doesn't cross rectangle edges).
+  bool clip2DLineSegmentToRectangle( const double& rectX, const double& rectY,
+					    double& x0, double& y0, double& x1, double& y1 );
+  //Given P0 = (x0,y0) and P1 = (x1,y1), we have to constrain the line
+  //segment P0-P1 to the rectangle R given by x<|rectX|, y<|rectY|.
+  //
+  //Returns false if length of clipped line segment is not positive
+  //(in that case, don't trust the returned values of the parameters).
+
+  const GeoTrd * findTRDInShape(const GeoShape * shape)
+  {
+    if (shape->typeID()==GeoTrd::getClassTypeID())
+      return static_cast<const GeoTrd*>(shape);
+    if (shape->typeID() == GeoShapeShift::getClassTypeID() ) {
+      const GeoShapeShift* theShift = static_cast<const GeoShapeShift*>(shape);
+      return findTRDInShape(theShift->getOp());
+    }
+    if (shape->typeID() == GeoShapeSubtraction::getClassTypeID() ) {
+      const GeoShapeSubtraction* theSubtraction = static_cast<const GeoShapeSubtraction*>(shape);
+      const GeoTrd * trd = findTRDInShape(theSubtraction->getOpA());
+      return trd ? trd : findTRDInShape(theSubtraction->getOpB());
+    }
+    if (shape->typeID() == GeoShapeUnion::getClassTypeID() ) {
+      const GeoShapeUnion* theUnion = static_cast<const GeoShapeUnion*>(shape);
+      const GeoTrd * trd = findTRDInShape(theUnion->getOpA());
+      return trd ? trd : findTRDInShape(theUnion->getOpB());
+    }
+    if (shape->typeID() == GeoShapeIntersection::getClassTypeID() ) {
+      const GeoShapeIntersection* theIntersection = static_cast<const GeoShapeIntersection*>(shape);
+      const GeoTrd * trd = findTRDInShape(theIntersection->getOpA());
+      return trd ? trd : findTRDInShape(theIntersection->getOpB());
+    }
+    return 0;
+  }
+
+};
+
+
+
+//____________________________________________________________________
+MuonChamberProjectionHelper::MuonChamberProjectionHelper( StoreGateSvc * detectorStore )
+ : VP1HelperClassBase(0,"MuonChamberProjectionHelper"), d(new Imp(this,detectorStore))
+{
+  if (!detectorStore)
+    message("ERROR: Received NULL detectorstore");
+}
+
+//____________________________________________________________________
+MuonChamberProjectionHelper::MuonChamberProjectionHelper( IVP1System * sys )
+  : VP1HelperClassBase(0,"MuonChamberProjectionHelper"), d(new Imp(this,(sys?sys->detectorStore():0)))
+{
+  if (!sys)
+    message("ERROR: Received NULL system pointer (and thus can't get detector store pointer");
+  else if (!d->detectorStore)
+    message("ERROR: Could not get detectorStore pointer from system pointer");
+}
+
+//____________________________________________________________________
+MuonChamberProjectionHelper::~MuonChamberProjectionHelper()
+{
+  Imp::ChamberInfoMapItr itMDT, itMDTE(d->mdtchambervolinfo.end());
+  for ( itMDT = d->mdtchambervolinfo.begin(); itMDT!=itMDTE; ++itMDT )
+    itMDT->second.trd->unref();
+  delete d;
+}
+
+//____________________________________________________________________
+Amg::Vector3D& MuonChamberProjectionHelper::applyTransformToVector( const Amg::Transform3D& m, Amg::Vector3D& v)
+{
+  //It is a vector, so we apply the rotation part only:
+  double vx = v.x(), vy = v.y(), vz = v.z();
+//  v.set(m.xx()*vx + m.xy()*vy + m.xz()*vz,
+//	m.yx()*vx + m.yy()*vy + m.yz()*vz,
+//	m.zx()*vx + m.zy()*vy + m.zz()*vz);
+  Amg::setVector3DCartesian( v,
+		  m(0,0)*vx + m(0,1)*vy + m(0,2)*vz,
+		  m(1,0)*vx + m(1,1)*vy + m(1,2)*vz,
+		  m(2,0)*vx + m(2,1)*vy + m(2,2)*vz);
+  return v;
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::Imp::ensureInited()
+{
+  if (initattempted)
+    return initsucceeded;
+  initattempted = true;
+  initsucceeded = init();
+  return initsucceeded;
+}
+
+//____________________________________________________________________
+inline bool MuonChamberProjectionHelper::Imp::nameIsMDTChamber( const std::string& n )
+{
+  //MDT chamber volumes starts with:
+  //    Endcap: EI, EM, EO or EE
+  //    Inner barrel: BI or BEE
+  //    Middle barrel: BM
+  //    Outer barrel:BO
+  if (n.size()<3)
+    return false;
+  if (n[0]=='E')
+    return n[1]=='I' || n[1]=='M' || n[1]=='O' || n[1]=='E';
+  if (n[0]=='B')
+    return n[1]=='I' || n[1]=='M' || n[1]=='O' || (n[1]=='E'&&n[2]=='E');
+  return false;
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::Imp::init()
+{
+  if (!VP1JobConfigInfo::hasMuonGeometry()) {
+    theclass->messageDebug("Warning: Can't init since muon geometry information is not present." );
+    return false;
+  }
+
+  VP1SGAccessHelper * sgaccess(0);
+  if (theclass->systemBase())
+    sgaccess = new VP1SGAccessHelper(theclass->systemBase());
+  else
+    sgaccess = new VP1SGAccessHelper(detectorStore);
+
+ //Locate the world volume if possible:
+  const GeoModelExperiment * theExpt;
+  if (!sgaccess->retrieve( theExpt, "ATLAS" )) {
+    theclass->message("MuonChamberProjectionHelper Error: Can't retrieve"
+		      " the ATLAS GeoModelExperiment from detector store.");
+    delete sgaccess;
+    return false;
+  }
+  delete sgaccess;
+
+  PVConstLink world(theExpt->getPhysVol());
+  GeoVolumeCursor av(world);
+  const GeoLogVol * logvol(0);
+  const GeoShape * shape(0);
+  while (!av.atEnd()) {
+
+    if (av.getName()!="Muon") {
+      av.next();
+      continue;
+    }
+    Amg::Transform3D toptransform = Amg::CLHEPTransformToEigen(av.getTransform());
+    GeoVolumeCursor av2(av.getVolume());
+    while (!av2.atEnd()) {
+      if (nameIsMDTChamber(av2.getName())) {
+	logvol = av2.getVolume()->getLogVol();
+	if (!logvol) {
+	  theclass->message("MuonChamberProjectionHelper Error: Chamber has null logvol");
+	  av2.next(); // increment volume cursor.
+	  continue;
+	}
+	shape = logvol->getShape();
+	if (!shape) {
+	  theclass->message("MuonChamberProjectionHelper Error: Chamber has null shape");
+	  av2.next(); // increment volume cursor.
+	  continue;
+	}
+	const GeoTrd * trd = findTRDInShape(shape);
+	if (trd) {
+	  //Fixme: Test for nan's and clearly crazy numbers (if more than 1km for instance).
+	  if ( trd->getZHalfLength()>0.0
+	       && trd->getXHalfLength1() > 0.0
+	       && trd->getXHalfLength2() > 0.0
+	       && trd->getYHalfLength1() > 0.0
+	       && trd->getYHalfLength2() > 0.0 ) {
+	    trd->ref();
+	    Amg::Transform3D geovolume_transf = Amg::CLHEPTransformToEigen(av2.getTransform());
+	    mdtchambervolinfo.insert(std::pair<const GeoPVConstLink,MDTChamberInfo>( av2.getVolume(), Imp::MDTChamberInfo(toptransform * geovolume_transf, trd) ));
+	  } else {
+	    theclass->message("MuonChamberProjectionHelper Error: Chamber trd has non-positive shape parameters!");
+	  }
+	} else {
+	  theclass->message("MuonChamberProjectionHelper Error: Chamber shape is not a GeoTrd, and is not a boolean with a Trd somewhere");
+	}
+      }
+      av2.next(); // increment volume cursor.
+    }
+    av.next(); // increment volume cursor.
+  }
+
+  if (mdtchambervolinfo.empty()) {
+    theclass->message("MuonChamberProjectionHelper Error: Found no MDT chambers");
+    return false;
+  }
+
+  itLastMDTChamberLookedUp = mdtchambervolinfo.begin();
+
+  return true;
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::isKnownMDTChamber( const GeoPVConstLink& mdtChamber )
+{
+  Imp::ChamberInfoMapItr itChamberInfo;
+  return d->getMDTChamberVolInfo( mdtChamber, itChamberInfo, true );
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::getDistancesToMDTChamberWallsAlongLine( const GeoPVConstLink& mdtChamber,
+									  const Amg::Vector3D & point, const Amg::Vector3D& lineDirection,
+									  double& distanceToFirstEndPlane, double& distanceToSecondEndPlane,
+									  const double& radius )
+{
+  Imp::ChamberInfoMapItr itChamberInfo;
+  if (!d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
+    return false;
+
+  const GeoTrd * trd = itChamberInfo->second.trd;
+  double y1(trd->getYHalfLength1()), y2(trd->getYHalfLength2()), z(trd->getZHalfLength());
+
+  //Normals and points on ends (transformed from local to global coords):
+
+  Amg::Vector3D n1(0,+2*z,-(y2-y1));
+  Amg::Vector3D n2(0,-2*z,-(y2-y1));
+  applyTransformToVector(itChamberInfo->second.localToGlobal,n1);
+  applyTransformToVector(itChamberInfo->second.localToGlobal,n2);
+  const Amg::Vector3D p1(itChamberInfo->second.localToGlobal * Amg::Vector3D(0,y1,-z) );
+  const Amg::Vector3D p2(itChamberInfo->second.localToGlobal * Amg::Vector3D(0,-y1,-z) );
+
+  distanceToFirstEndPlane = d->pointToPlaneDistAlongLine(point,lineDirection,p1,n1);
+  if (distanceToFirstEndPlane < 0.0 )
+    return false;
+
+  distanceToSecondEndPlane = d->pointToPlaneDistAlongLine(point,lineDirection,p2,n2);
+  if (distanceToSecondEndPlane < 0.0 )
+    return false;
+
+  if (radius!=0.0) {
+    double r(fabs(radius)); //Map negative radii to positive.
+    Amg::Vector3D unitdir(lineDirection.unit());
+    double costheta1 = unitdir.dot(n1.unit());
+    double costheta2 = unitdir.dot(n2.unit());
+    //remember that tan(theta) = sqrt((1-cos^2(theta))/cos(theta))
+    distanceToFirstEndPlane += r*sqrt(fabs((1-costheta1*costheta1)/costheta1));
+    distanceToSecondEndPlane += r*sqrt(fabs((1-costheta2*costheta2)/costheta2));
+  }
+
+  return true;
+}
+//____________________________________________________________________
+inline double MuonChamberProjectionHelper::Imp::pointToPlaneDistAlongLine( const Amg::Vector3D& point, const Amg::Vector3D& lineDirection,
+									   const Amg::Vector3D& planePoint, const Amg::Vector3D& planeNormal )
+{
+
+  double denominator(planeNormal.dot(lineDirection)*lineDirection.mag());
+  if (denominator==0.0) {
+    theclass->message("MuonChamberProjectionHelper Error: pointToPlaneDistAlongLine is undefined!");
+    return -1.0;
+  }
+  double numerator(planeNormal.x() * (planePoint.x() - point.x())
+		   + planeNormal.y() * (planePoint.y() - point.y())
+		   + planeNormal.z() * (planePoint.z() - point.z()));
+  return fabs(numerator/denominator);
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::Imp::getMDTChamberVolInfo( const GeoPVConstLink& mdtChamber,
+							     MuonChamberProjectionHelper::Imp::ChamberInfoMapItr& itChamberInfo,
+							     bool silent ) {
+
+  if (!ensureInited())
+    return false;
+
+  if (itLastMDTChamberLookedUp->first == mdtChamber) {
+    itChamberInfo = itLastMDTChamberLookedUp;
+    return true;
+  }
+
+  itChamberInfo = mdtchambervolinfo.find(mdtChamber);
+  if (itChamberInfo == mdtchambervolinfo.end()) {
+    if (!silent)
+      theclass->message("MuonChamberProjectionHelper Error: Can't find MDT chamber among the "
+			+QString::number(mdtchambervolinfo.size())+" registered");
+    return false;
+  }
+
+  itLastMDTChamberLookedUp = itChamberInfo;
+
+  return true;
+}
+
+//____________________________________________________________________
+void MuonChamberProjectionHelper::Imp::getMDTChamberXAndZ(ChamberInfoMapItr& itChamberInfo, double & trdX, double & trdZ )
+{
+  const GeoTrd * trd = itChamberInfo->second.trd;
+  trdX = trd->getXHalfLength1();
+  trdZ = trd->getZHalfLength();
+  if ( trdX != trd->getXHalfLength2() ) {
+    theclass->message("MuonChamberProjectionHelper Warning: x1!=x2 in GeoTrd shape. Clippings etc. will be to a too large surface.");
+    if ( trdX < trd->getXHalfLength2() )
+      trdX = trd->getXHalfLength2();
+  }
+
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::projectAndConstrainLineSegmentToMDTChamberEndWalls( const GeoPVConstLink& mdtChamber,
+										      const Amg::Vector3D & pointA, const Amg::Vector3D & pointB,
+										      Amg::Vector3D & firstEndWall_pointA, Amg::Vector3D & firstEndWall_pointB,
+										      Amg::Vector3D & secondEndWall_pointA, Amg::Vector3D & secondEndWall_pointB,
+										      bool& outsidechamber )
+{
+  Imp::ChamberInfoMapItr itChamberInfo;
+  if (!d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
+    return false;
+
+  double trdX, trdZ;
+  d->getMDTChamberXAndZ(itChamberInfo, trdX, trdZ );
+
+  //Get local chamber coordinates, A and B, of pointA and pointB:
+  itChamberInfo->second.ensureInitGlobalToLocal();
+  Amg::Vector3D A((*(itChamberInfo->second.globalToLocal))*pointA), B((*(itChamberInfo->second.globalToLocal))*pointB);
+  double ax(A.x()), az(A.z()), bx(B.x()), bz(B.z());
+
+  //We basically have to project the line segment AB to the
+  //(x,z)-plane, and then constrain it to the rectangle given by
+  //x_i<|trdX|, z_i<|trdZ|.
+
+  outsidechamber = !(d->clip2DLineSegmentToRectangle( trdX, trdZ, ax, az, bx, bz ));
+  if (outsidechamber)
+    return true;
+
+  //Project the points to the end of the Trd:
+  d->projectXZPointToTrdAlongYAxis( ax, az,itChamberInfo->second.trd, firstEndWall_pointA, secondEndWall_pointA );
+  d->projectXZPointToTrdAlongYAxis( bx, bz,itChamberInfo->second.trd, firstEndWall_pointB, secondEndWall_pointB );
+
+  //Put points in global coordinates:
+//  firstEndWall_pointA.transform(itChamberInfo->second.localToGlobal);
+//  secondEndWall_pointA.transform(itChamberInfo->second.localToGlobal);
+//  firstEndWall_pointB.transform(itChamberInfo->second.localToGlobal);
+//  secondEndWall_pointB.transform(itChamberInfo->second.localToGlobal);
+  Amg::transform(firstEndWall_pointA, itChamberInfo->second.localToGlobal);
+  Amg::transform(secondEndWall_pointA, itChamberInfo->second.localToGlobal);
+  Amg::transform(firstEndWall_pointB, itChamberInfo->second.localToGlobal);
+  Amg::transform(secondEndWall_pointB, itChamberInfo->second.localToGlobal);
+
+  outsidechamber = false;
+  return true;
+}
+
+//____________________________________________________________________
+void MuonChamberProjectionHelper::Imp::projectXZPointToTrdAlongYAxis(const double& x, const double& z,const GeoTrd* trd,
+								     Amg::Vector3D & firstEndWall_point, Amg::Vector3D & secondEndWall_point )
+{
+  const double epsilon(0.1);//100micron
+  const double trdY1(trd->getYHalfLength1()), trdY2(trd->getYHalfLength2());
+  const double y( trdY1 + 0.5*(1.0+z/trd->getZHalfLength())*(trdY2-trdY1) );
+  Amg::setVector3DCartesian(firstEndWall_point, x,y+epsilon,z);
+  Amg::setVector3DCartesian(secondEndWall_point, x,-y-epsilon,z);
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::Imp::constrainPointToRectangleAlongLine( const double& trdX, const double& trdZ,
+									   const double& x0, const double& z0,
+									   double& x1, double& z1 )
+{
+  //rectangle R : { (x,z) | abs(x)<=trdX && abs(z)<=trdZ }
+  //
+  //Returns false if segment from (x0,z0) to (x1,z1) doesn't cross R.
+
+  if ( x1 < -trdX ) {
+    if ( x0 < -trdX )
+      return false;
+    //Move (x1,z1) to x == -trdX line:
+    z1 += (-trdX-x1)*(z1-z0)/(x1-x0);
+    x1 = -trdX;
+    if (fabs(z1)>trdZ)
+      return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
+  }
+
+  if ( x1 > trdX ) {
+    if ( x0 > trdX )
+      return false;
+    //Move (x1,z1) to x == trdX line:
+    z1 += (trdX-x1)*(z1-z0)/(x1-x0);
+    x1 = trdX;
+    if (fabs(z1)>trdZ)
+      return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
+  }
+
+  if ( z1 < -trdZ ) {
+    if ( z0 < -trdZ )
+      return false;
+    //Move (x1,z1) to z == -trdZ line:
+    x1 += (-trdZ-z1)*(x1-x0)/(z1-z0);
+    z1 = -trdZ;
+    if (fabs(x1)>trdX)
+      return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
+  }
+
+  if ( z1 > trdZ ) {
+    if ( z0 > trdZ )
+      return false;
+    //Move (x1,z1) to z == trdZ line:
+    x1 += (trdZ-z1)*(x1-x0)/(z1-z0);
+    z1 = trdZ;
+    if (fabs(x1)>trdX)
+      return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
+  }
+
+  //We were actually inside all along:
+  return true;
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::clipLineSegmentToMDTChamber( const GeoPVConstLink& mdtChamber,
+							       Amg::Vector3D & pointA, Amg::Vector3D & pointB, bool& outsidechamber,
+							       const double & extradist )
+{
+  Imp::ChamberInfoMapItr itChamberInfo;
+  if (!d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
+    return false;
+
+  double trdX, trdZ;
+  d->getMDTChamberXAndZ(itChamberInfo, trdX, trdZ );
+
+  trdX += extradist;
+  trdZ += extradist;
+
+  if (trdX<=0.0||trdZ<=0.0)//Extradist must have been negative - and so much that effective chamber dimensions are collapsed.
+    return false;
+
+  //Get local chamber coordinates, A and B, of pointA and pointB:
+  itChamberInfo->second.ensureInitGlobalToLocal();
+  Amg::Vector3D A((*(itChamberInfo->second.globalToLocal))*pointA), B((*(itChamberInfo->second.globalToLocal))*pointB);
+  double ax(A.x()), az(A.z()), bx(B.x()), bz(B.z());
+
+  //Clip x and z dimensions:
+  outsidechamber = !(d->clip2DLineSegmentToRectangle( trdX, trdZ, ax, az, bx, bz ));
+  if (outsidechamber)
+    return true;
+
+  double ay(A.y()), by(B.y());
+  //Fixme: We must also clip y dimensions!!
+
+  //Put results back into points and in global coordinates:
+  Amg::setVector3DCartesian(pointA, ax,ay,az);
+  Amg::setVector3DCartesian(pointB, bx,by,bz);
+  Amg::transform(pointA, itChamberInfo->second.localToGlobal);
+  Amg::transform(pointB, itChamberInfo->second.localToGlobal);
+  outsidechamber = false;
+  return true;
+
+}
+
+//____________________________________________________________________
+bool MuonChamberProjectionHelper::Imp::clip2DLineSegmentToRectangle( const double& rectX, const double& rectY,
+								     double& x0, double& y0, double& x1, double& y1 )
+{
+  if ( fabs(x0)<=rectX && fabs(y0)<=rectY  ) {
+    if ( fabs(x1)>rectX || fabs(y1)>rectY  ) {
+      //P0 inside R, P1 outside R. We must change (x1,y1) so P0-P1 is inside R.
+      if (!constrainPointToRectangleAlongLine( rectX, rectY, x0, y0, x1, y1 ))
+	theclass->message("MuonChamberProjectionHelper Error: Should never happen (1)");
+    }
+  } else {
+    if ( fabs(x1)<=rectX && fabs(y1)<=rectY  ) {
+      //Point P1 inside R, P0 outside R. We must change (x0,y0) so P0-P1 is inside R.
+      if (!constrainPointToRectangleAlongLine( rectX, rectY, x1, y1, x0, y0 ))
+	theclass->message("MuonChamberProjectionHelper Error: Should never happen (2)");
+    } else {
+      //Both points outside - but the line might still R!
+
+      //First attempt to put (x1,y1) on edge of R, by sliding towards P0
+      if (!constrainPointToRectangleAlongLine( rectX, rectY, x0, y0, x1, y1 )) {
+	//failed - thus P0-P1 doesn't intersect target rectangle.
+	return false;
+      }
+
+      //Now change (x0,y0) so P0-P1 is inside the target rectangle.
+      if (!constrainPointToRectangleAlongLine( rectX, rectY, x1, y1, x0, y0 ))
+	theclass->message("MuonChamberProjectionHelper Error: Should never happen (3)");
+    }
+  }
+
+  return true;
+
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandleBase.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandleBase.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ee4fe8c989879dab590d1445f3b78544d47fa0be
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandleBase.cxx
@@ -0,0 +1,883 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDSysCommonData.h"
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/VP1PrepRawDataSystem.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGAccessHelper.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "VP1Base/VP1ExtraSepLayerHelper.h"
+#include "VP1Base/VP1Serialise.h"
+#include "VP1Base/VP1QtInventorUtils.h"
+#include "VP1Base/VP1Serialise.h"
+#include "VP1Base/VP1Deserialise.h"
+
+#include "InDetPrepRawData/PixelClusterContainer.h"
+#include "InDetPrepRawData/SCT_ClusterContainer.h"
+#include "InDetPrepRawData/TRT_DriftCircleContainer.h"
+#include "MuonPrepRawData/CscPrepDataContainer.h"
+#include "MuonPrepRawData/CscStripPrepDataContainer.h"
+#include "MuonPrepRawData/RpcPrepDataContainer.h"
+#include "MuonPrepRawData/TgcPrepDataContainer.h"
+#include "MuonPrepRawData/MdtPrepDataContainer.h"
+#include "MuonPrepRawData/MMPrepDataContainer.h"
+#include "MuonPrepRawData/sTgcPrepDataContainer.h"
+
+#include "EventPrimitives/EventPrimitives.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoLevelOfDetail.h>
+#include <Inventor/nodes/SoMaterial.h>
+
+#include <QtGui/QComboBox>
+
+//____________________________________________________________________
+class PRDCollHandleBase::Imp {
+public:
+  PRDCollHandleBase * theclass;
+
+  //Collection definition:
+  QString storegate_key;
+  PRDDetType::Type detType;
+
+  template <class T>
+  bool actualLoad();//Templated according to collection type.
+
+  VP1ExtraSepLayerHelper * sephelper_detail;
+  VP1ExtraSepLayerHelper * sephelper_simple;
+  SoSeparator * sep_lods;
+  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > > regionindex2lodhelpers;//idx->(sephelperdetailed,sephelpersimple)
+  DETAIL generalprddetaillevel;
+  void updateDetailSepAttachments();
+
+  SoMaterial * highlightmaterial;
+  bool highlightoutliers;
+  bool drawerrors;
+  bool drawrdos;
+
+  VP1Interval allowedEta;
+  QList<VP1Interval> allowedPhi;
+
+  bool ensureLoaded();//first call each event will attempt to load
+              //PRDs from storegate. Returns false in case of
+              //problems this events. (This is inexpensive to
+              //call)
+
+  //Vector of prd handles:
+  std::vector<PRDHandleBase*> prdhandles;
+
+  bool etaPhiCut(PRDHandleBase*);
+
+  //Extra widgets:
+  QComboBox * comboBox_detailLevel;
+};
+
+//____________________________________________________________________
+PRDCollHandleBase::PRDCollHandleBase(PRDDetType::Type type,PRDSysCommonData*cd,const QString& key)
+  : VP1StdCollection(cd->system(),"PRDCollHandle_"+PRDDetType::typeToString(type)+"_"+key), d(new Imp), m_common(cd),m_nshownhandles(0),
+  m_colourmethod(ByTechOnly), m_highlightweight(999999.0)
+{
+  d->theclass = this;
+  d->detType = type;
+  d->storegate_key = key;
+  d->highlightmaterial = 0;
+  d->highlightoutliers = false;
+  d->drawerrors = false;
+  d->drawrdos = false;
+  d->sephelper_detail = 0;
+  d->sephelper_simple = 0;
+  d->sep_lods = 0;
+  d->comboBox_detailLevel = new QComboBox;
+  d->comboBox_detailLevel->setToolTip("Level of realism in representation"
+    " (\"Auto\" switches mode based on distance to camera)");
+  d->comboBox_detailLevel->addItems(QStringList()<<"Low"<<"Auto"<<"High");//Low==simple, High==detailed. Don't change order.
+  d->generalprddetaillevel = SIMPLE;
+  d->comboBox_detailLevel->setCurrentIndex(0);//corresponds to simple.
+  connect(d->comboBox_detailLevel,SIGNAL(currentIndexChanged(int)),this,SLOT(detailComboBoxItemChanged()));
+  connect(this,SIGNAL(visibilityChanged(bool)),this,SLOT(collVisibilityChanged(bool)));
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::init(VP1MaterialButtonBase*)
+{
+  VP1StdCollection::init();//this call is required
+
+  SoSeparator * sep_detail = new SoSeparator;
+  sep_detail->setName("PRDColl_sep_detail");
+  SoSeparator * sep_simple = new SoSeparator;
+  sep_simple->setName("PRDColl_sep_simple");
+  d->sep_lods = new SoSeparator;
+  d->sep_lods->setName("PRDColl_sep_lods");
+  sep_detail->ref();
+  sep_simple->ref();
+  d->sep_lods->ref();
+
+  d->sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail,128);
+  d->sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple,128);
+
+  setupSettingsFromController(common()->controller());
+
+  //Setup detail level:
+  setGeneralPRDDetailLevel(defaultDetailLevel());
+  d->updateDetailSepAttachments();
+
+}
+
+
+//____________________________________________________________________
+PRDCollHandleBase::~PRDCollHandleBase()
+{
+  //Lod sep-helpers:
+  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it, itE = d->regionindex2lodhelpers.end();
+  for (it = d->regionindex2lodhelpers.begin();it!=itE;++it) {
+    delete it->second.second.first;
+    delete it->second.second.second;
+    it->second.first->unref();
+  }
+  d->regionindex2lodhelpers.clear();
+
+  //Cleanup separators:
+  if (d->sephelper_detail) {
+    SoSeparator * sep_detail = d->sephelper_detail->topSeparator();
+    delete d->sephelper_detail;
+    sep_detail->unref();
+  }
+  if (d->sephelper_simple) {
+    SoSeparator * sep_simple = d->sephelper_simple->topSeparator();
+    delete d->sephelper_simple;
+    sep_simple->unref();
+  }
+  if (d->sep_lods)
+    d->sep_lods->unref();
+
+  cleanupPtrContainer(d->prdhandles);
+
+  if (d->highlightmaterial)
+    d->highlightmaterial->unref();
+
+  delete d;
+}
+
+//____________________________________________________________________
+bool PRDCollHandleBase::load() {
+  bool safeToLoad(false);
+  switch (d->detType){
+    case PRDDetType::TRT:
+    safeToLoad = VP1JobConfigInfo::hasTRTGeometry();
+    break;
+    case PRDDetType::Pixel:
+    safeToLoad = VP1JobConfigInfo::hasPixelGeometry();
+    break;
+    case PRDDetType::SCT:
+    safeToLoad = VP1JobConfigInfo::hasSCTGeometry();
+    break;
+    case PRDDetType::CSC:
+    case PRDDetType::CSCstrip:
+    case PRDDetType::RPC:
+    case PRDDetType::TGC:
+    case PRDDetType::MDT:
+    case PRDDetType::MM:
+    case PRDDetType::sTGC:
+    safeToLoad = VP1JobConfigInfo::hasMuonGeometry();
+    break;
+    default:
+    safeToLoad = false;
+  }
+
+  if (!safeToLoad){
+    message("Required geometry not enabled in job.");
+    return false;
+  }
+
+  switch (d->detType){
+    case PRDDetType::TRT:   return d->actualLoad<InDet::TRT_DriftCircleContainer>();
+    case PRDDetType::Pixel: return d->actualLoad<InDet::PixelClusterContainer>();
+    case PRDDetType::SCT:   return d->actualLoad<InDet::SCT_ClusterContainer>();
+    case PRDDetType::CSC:   return d->actualLoad<Muon::CscPrepDataContainer>();
+    case PRDDetType::CSCstrip:   return d->actualLoad<Muon::CscStripPrepDataContainer>();
+    case PRDDetType::RPC:   return d->actualLoad<Muon::RpcPrepDataContainer>();
+    case PRDDetType::TGC:   return d->actualLoad<Muon::TgcPrepDataContainer>();
+    case PRDDetType::MDT:   return d->actualLoad<Muon::MdtPrepDataContainer>();
+    case PRDDetType::MM:    return d->actualLoad<Muon::MMPrepDataContainer>();
+    case PRDDetType::sTGC:  return d->actualLoad<Muon::sTgcPrepDataContainer>();
+    //SpacePoints implements their own load.
+    default:
+    return false;
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::collVisibilityChanged(bool vis)
+{
+  if (verbose())
+    messageVerbose("TrackCollHandleBase::collVisibilityChanged => "+str(vis));
+  if (vis)
+    recheckCutStatusOfAllNotVisibleHandles();//Fixme -> ofallhandles? All must be not visible anyway...
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+template <class T>
+bool PRDCollHandleBase::Imp::actualLoad()
+{
+  /////////////////////////////////////////////////////////////////////////
+  // Retrieve element container from event store:
+  const T* container;
+  VP1SGAccessHelper sg_access(theclass->systemBase());
+  if(!sg_access.retrieve(container,storegate_key))
+    return false;
+
+  typename T::const_iterator element, lastElement(container->end());
+
+  /////////////////////////////////////////////////////////////////////////
+  // Sanity check:
+  if ( container->size()==0 && container->begin()!=lastElement ) {
+    theclass->message("ERROR: container '"+storegate_key+"' has size()==0, but different begin() and end() iterators!");
+    return false;
+  }
+
+  /////////////////////////////////////////////////////////////////////////
+  // In case the container was created incorrectly we must fallback to a different method of getting the prds:
+  bool fallback(false);
+  const DataHandle<typename T::base_value_type> firstElementD, lastElementD;
+  if ( container->size()!=0 && container->begin()==lastElement ) {
+    //This is either an empty container, or it is a case of an incorrectly created container which we must get by datahandles.
+    theclass->messageDebug("Retrieved empty container. This might be misleading. Now going to attempt to load prds via datahandles instead.");
+    if (VP1SGContentsHelper(theclass->systemBase()).getKeys<T>().count()!=1) {
+      theclass->messageDebug("But seems that there is not exactly one collection of type "+QString(typeid(T).name())
+        +", so we won't attempt that anyway!! Thus we assume there there are simply no prd's.");
+    } else {
+      if(sg_access.retrieve(firstElementD, lastElementD,true)) {
+        if (firstElementD==lastElementD) {
+          theclass->messageDebug("No prd's found when accessed by datahandles either. It seems that there really are just no prds in this collection.");
+        } else {
+          fallback = true;
+        }
+      } else {
+        theclass->messageDebug("Failed retrieval by datahandles. We take that as a sign that there really are just no prds in this collection ");
+      }
+    }
+  }
+
+  theclass->messageVerbose("Loop over actual prd's and create handles");
+  //Retrieve prds and create handles:
+
+  int ignoredUnsafeHandle_NoPRD(0);
+  int ignoredUnsafeHandle_NoDetElem(0);
+  int ignoredUnsafeHandle_NotSane(0);
+  typename T::base_value_type::const_iterator prd, prdLast;
+  int iprds(0);
+  if (!fallback) {
+        // element = container->begin();
+        //         prd = (*element)->begin();
+        //         ++iprds;
+        //         PRDHandleBase * handle = theclass->addPRD(*prd);
+        //         theclass->addHandle(handle);
+        //         theclass->common()->registerPRD2Handle(*prd,handle);  
+        //               theclass->systemBase()->updateGUI();
+    for ( element = container->begin(); element!=lastElement ; ++element) {
+      prd = (*element)->begin(), prdLast = (*element)->end();
+      for ( ; prd!=prdLast ; ++prd) {
+        ++iprds;
+        if (!*prd) {
+          ++ignoredUnsafeHandle_NoPRD;
+          continue;
+        }
+        PRDHandleBase * handle = theclass->addPRD(*prd);
+        if (handle) {
+          if (!handle->isSane()) ignoredUnsafeHandle_NotSane++;
+          if (!handle->getPRD()->detectorElement()) {
+            ++ignoredUnsafeHandle_NoDetElem;
+            delete handle;
+          } else {
+            theclass->addHandle(handle);
+            theclass->common()->registerPRD2Handle(*prd,handle);
+          }
+        }
+      }
+      if (!(iprds%100))
+        theclass->systemBase()->updateGUI();
+    }
+
+  } else {
+
+    for ( const DataHandle<typename T::base_value_type> elementD(firstElementD); elementD!=lastElementD; ++elementD ) {
+      prd = (*elementD).begin(), prdLast = (*elementD).end();
+      for ( ; prd!=prdLast ; ++prd) {
+        ++iprds;
+        if (!*prd) {
+          ++ignoredUnsafeHandle_NoPRD;
+          continue;
+        }
+        PRDHandleBase * handle = theclass->addPRD(*prd);
+        if (handle) {
+          if (!handle->isSane()) ignoredUnsafeHandle_NotSane++;
+
+          if (!handle->getPRD()->detectorElement()) {
+            ++ignoredUnsafeHandle_NoDetElem;
+            delete handle;
+          } else {
+            theclass->addHandle(handle);
+            theclass->common()->registerPRD2Handle(*prd,handle);
+          }
+        }
+        if (!(iprds%100))
+          theclass->systemBase()->updateGUI();
+      }
+    }
+  }
+  theclass->systemBase()->updateGUI();
+  prdhandles.resize(prdhandles.size());
+
+  if (ignoredUnsafeHandle_NoPRD)
+    theclass->message("WARNING - ignoring "+str(ignoredUnsafeHandle_NoPRD)+" null prd pointer(s).");
+  if (ignoredUnsafeHandle_NoDetElem)
+    theclass->message("WARNING - ignoring "+str(ignoredUnsafeHandle_NoDetElem)+" prd pointer(s) with null detector elements.");
+  if (ignoredUnsafeHandle_NotSane)
+    theclass->message("WARNING - found "+str(ignoredUnsafeHandle_NotSane)+" prd pointer(s) which fail sanity checks (i.e. contain NaNs).");
+
+  //Perform initialisation needed for cuts (e.g. those of the "global" type, such as requiring a number of PRDs in the same detector module):
+  theclass->messageVerbose("postLoadInitialisation");
+  theclass->postLoadInitialisation();
+
+  theclass->systemBase()->updateGUI();
+
+  //Show the handles that need to be shown:
+  theclass->recheckCutStatusOfAllNotVisibleHandles();//Use this method to not get the deselectAll call
+
+  theclass->message("Found "+QString::number(iprds)+" ("+QString::number(theclass->nShownHandles())+" shown) PRDs in container '"+storegate_key+"'");
+
+  return true;
+
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::Imp::updateDetailSepAttachments()
+{
+  SoSeparator * collsep = theclass->collSep();
+  if (!collsep)
+    return;
+  bool save = collsep->enableNotify(false);
+  if (generalprddetaillevel==PRDCollHandleBase::DETAILED) {
+    //Detail
+    if (collsep->findChild(sephelper_detail->topSeparator())<0)
+      collsep->addChild(sephelper_detail->topSeparator());
+  } else {
+    //No detail
+    if (collsep->findChild(sephelper_detail->topSeparator())>-1)
+      collsep->removeChild(sephelper_detail->topSeparator());
+  }
+  if (generalprddetaillevel==PRDCollHandleBase::SIMPLE) {
+    //Simple
+    if (collsep->findChild(sephelper_simple->topSeparator())<0)
+      collsep->addChild(sephelper_simple->topSeparator());
+  } else {
+    //No simple
+    if (collsep->findChild(sephelper_simple->topSeparator())>-1)
+      collsep->removeChild(sephelper_simple->topSeparator());
+  }
+  if (generalprddetaillevel==PRDCollHandleBase::AUTO) {
+    //LOD
+    if (collsep->findChild(sep_lods)<0)
+      collsep->addChild(sep_lods);
+  } else {
+    //No LOD
+    if (collsep->findChild(sep_lods)>-1)
+      collsep->removeChild(sep_lods);
+  }
+  if (save) {
+    collsep->enableNotify(true);
+    collsep->touch();
+  }
+}
+
+//____________________________________________________________________
+VP1ExtraSepLayerHelper * PRDCollHandleBase::sephelperDetailedNodes() const
+{
+  return d->sephelper_detail;
+}
+
+//____________________________________________________________________
+VP1ExtraSepLayerHelper * PRDCollHandleBase::sephelperSimpleNodes() const
+{
+  return d->sephelper_simple;
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::detailComboBoxItemChanged()
+{
+  messageVerbose("Collection detail level combo box changed index");
+  switch(d->comboBox_detailLevel->currentIndex()) {
+    case 1:
+    setGeneralPRDDetailLevel(AUTO);
+    break;
+    case 2:
+    setGeneralPRDDetailLevel(DETAILED);
+    break;
+    default:
+    case 0:
+    setGeneralPRDDetailLevel(SIMPLE);
+    break;
+  }
+}
+
+//____________________________________________________________________
+PRDCollHandleBase::DETAIL PRDCollHandleBase::detailLevel() const
+{
+  return d->generalprddetaillevel;
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setGeneralPRDDetailLevel( DETAIL dm )
+{
+  if (d->generalprddetaillevel==dm)
+    return;
+  d->generalprddetaillevel = dm;
+  messageVerbose("Detail level changed");
+//   common()->system()->deselectAll();
+
+  //Update gui combobox:
+  int targetIndex(0);
+  switch(d->generalprddetaillevel) {
+    case AUTO:
+    targetIndex = 1;
+    break;
+    case DETAILED:
+    targetIndex = 2;
+    break;
+    default:
+    case SIMPLE:
+    targetIndex = 0;
+    break;
+  }
+  if (targetIndex!=d->comboBox_detailLevel->currentIndex()) {
+    bool save = d->comboBox_detailLevel->blockSignals(true);
+    d->comboBox_detailLevel->setCurrentIndex(targetIndex);
+    d->comboBox_detailLevel->blockSignals(save);
+  }
+
+  //Actual changes to 3D representation:
+  d->updateDetailSepAttachments();
+
+  detailLevelChanged();
+
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::getLODSeparators(int index, VP1ExtraSepLayerHelper*& sephelper_detail,VP1ExtraSepLayerHelper*& sephelper_simple)
+{
+  const float complexity = 0.3f;//Fixme: Hardcoded here.
+  std::map<int,std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> > >::iterator it = d->regionindex2lodhelpers.find(index);
+  if (it!=d->regionindex2lodhelpers.end()) {
+    sephelper_detail = it->second.second.first;
+    sephelper_simple = it->second.second.second;
+    //To try to scale somehow different regions to change at "the same time":
+    it->second.first->screenArea.setValue(lodArea()*(sephelper_detail->topSeparator()->getNumChildren()+1)/(complexity+0.5f));
+    return;
+  }
+  SoLevelOfDetail * lod = new SoLevelOfDetail;
+  SoSeparator * sep_detail = new SoSeparator;
+  SoSeparator * sep_simple = new SoSeparator;
+  lod->addChild(sep_detail);
+  lod->addChild(sep_simple);
+  lod->screenArea.setValue(lodArea()/(complexity+0.5f));
+  d->sep_lods->addChild(lod);
+  sephelper_detail = new VP1ExtraSepLayerHelper(sep_detail);
+  sephelper_simple = new VP1ExtraSepLayerHelper(sep_simple);
+
+  lod->ref();
+  d->regionindex2lodhelpers[index] =
+    std::pair<SoLevelOfDetail*,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*> >
+    (lod,std::pair<VP1ExtraSepLayerHelper*,VP1ExtraSepLayerHelper*>(sephelper_detail,sephelper_simple));
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::addHandle(PRDHandleBase*handle)
+{
+  if (handle)
+    d->prdhandles.push_back(handle);
+}
+
+//____________________________________________________________________
+std::vector<PRDHandleBase*>& PRDCollHandleBase::getPrdHandles()
+{
+  return d->prdhandles;
+}
+
+//____________________________________________________________________
+const std::vector<PRDHandleBase*>& PRDCollHandleBase::getPrdHandles() const
+{
+  return d->prdhandles;
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::recheckCutStatus(PRDHandleBase*handle)
+{
+  handle->setVisible( visible() && cut(handle) && d->etaPhiCut(handle) );
+}
+
+//Fixme: A few of the methods of this class should be inlined (requires a few more public data members)
+
+//____________________________________________________________________
+void PRDCollHandleBase::setupSettingsFromController(PRDSystemController*controller)
+{
+  assert(controller);
+  largeChangesBegin();
+
+  collSep()->addChild(controller->drawOptions(d->detType));
+
+  d->highlightmaterial = controller->getHighLightMaterial();
+  d->highlightmaterial->ref();
+
+  connect(controller,SIGNAL(highLightOutliersChanged(bool)),this,SLOT(setHighLightOutliers(bool)));
+  setHighLightOutliers(controller->highLightOutliers());
+
+  connect(controller,SIGNAL(colourMethodChanged(PRDCollHandleBase::COLOURMETHOD)),this,SLOT(setColourMethod(PRDCollHandleBase::COLOURMETHOD)));
+  setColourMethod(controller->colourMethod());
+
+  connect(controller,SIGNAL(drawErrorsChanged(bool)),this,SLOT(setDrawErrors(bool)));
+  setDrawErrors(controller->drawErrors());
+
+  connect(controller,SIGNAL(drawRDOsChanged(bool)),this,SLOT(setDrawRDOs(bool)));
+  setDrawRDOs(controller->drawRDOs());
+
+  connect(controller,SIGNAL(highLightMaterialWeightChanged(const double&)),this,SLOT(setHighLightWeight(const double&)));
+  setHighLightWeight(controller->highLightMaterialWeight());
+
+  connect(controller,SIGNAL(cutAllowedEtaChanged(const VP1Interval&)),
+    this,SLOT(setAllowedEta(const VP1Interval&)));
+  setAllowedEta(controller->cutAllowedEta());
+
+  connect(controller,SIGNAL(cutAllowedPhiChanged(const QList<VP1Interval>&)),
+    this,SLOT(setAllowedPhi(const QList<VP1Interval>&)));
+  setAllowedPhi(controller->cutAllowedPhi());
+
+  setupSettingsFromControllerSpecific(controller);
+  largeChangesEnd();
+}
+
+
+//____________________________________________________________________
+void PRDCollHandleBase::recheckCutStatusOfAllHandles()
+{
+  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllHandles");
+
+  common()->system()->deselectAll();
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  int i(0);
+  for (;it!=itE;++it) {
+    recheckCutStatus(*it);
+    if (!(i++%200))
+      systemBase()->updateGUI();//since called from ::actualLoad<..>(..)
+  }
+  largeChangesEnd();
+  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles()
+{
+  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles");
+  if (!visible()) return;
+  //This method is called when a cut is tightened - thus we better start by deselectAll to avoid weird highlighting issues.
+  common()->system()->deselectAll();
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    if ((*it)->visible())
+      recheckCutStatus(*it);
+  }
+  largeChangesEnd();
+  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");    
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles()
+{
+  messageVerbose("PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles");
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    if (!(*it)->visible())
+      recheckCutStatus(*it);
+  }
+  largeChangesEnd();
+  if (visible()) message("Have "+QString::number(getPrdHandles().size())+" ("+QString::number(nShownHandles())+" shown) PRDs");
+}
+
+
+//____________________________________________________________________
+bool PRDCollHandleBase::highLightOutliers() const
+{
+  return d->highlightoutliers;
+}
+
+//____________________________________________________________________
+bool PRDCollHandleBase::drawErrors() const
+{
+  return d->drawerrors;
+}
+
+//____________________________________________________________________
+bool PRDCollHandleBase::drawRDOs() const
+{
+  return d->drawrdos;
+}
+
+//____________________________________________________________________
+SoMaterial * PRDCollHandleBase::highLightMaterial() const
+{
+  return  d->highlightmaterial;
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setHighLightOutliers(bool b)
+{
+  if (d->highlightoutliers==b)
+    return;
+  d->highlightoutliers = b;
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    (*it)->updateMaterial();
+    //Fixme: Improve performance by only calling updateMaterial() on
+    //those that are outliers on at least one track.
+  }
+  largeChangesEnd();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setDrawErrors(bool b)
+{
+  if (d->drawerrors==b)
+    return;
+  d->drawerrors = b;
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    (*it)->update3DObjects();
+    //Fixme: Improve performance by only calling updateMaterial() on
+    //those that are outliers on at least one track.
+  }
+  largeChangesEnd();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setDrawRDOs(bool b)
+{
+  if (d->drawrdos==b)
+    return;
+  d->drawrdos = b;
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    (*it)->update3DObjects();
+    //Fixme: Improve performance by only calling updateMaterial() on
+    //those that are outliers on at least one track.
+  }
+  largeChangesEnd();
+}
+
+
+//____________________________________________________________________
+void PRDCollHandleBase::setHighLightWeight(const double& hlw)
+{
+  if (m_highlightweight == hlw)
+    return;
+  m_highlightweight = hlw;
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    if (d->highlightoutliers || (*it)->highLight())
+      (*it)->updateMaterial();
+    //Fixme: We can improve performance here by investigating whether
+    //the handle actually is an outlier for at least one track, or if
+    //highlighting is at all applicable for the collection (maybe it is turned off).
+  }
+  largeChangesEnd();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setColourMethod(PRDCollHandleBase::COLOURMETHOD cm)
+{
+  if (m_colourmethod==cm)
+    return;
+  m_colourmethod = cm;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(d->prdhandles.begin()),itE(d->prdhandles.end());
+  for (;it!=itE;++it) {
+    (*it)->updateMaterial();
+    //Fixme: Improve performance by only calling on those that are on tracks/segments as relevant.
+  }
+  largeChangesEnd();
+
+}
+
+//____________________________________________________________________
+QString PRDCollHandleBase::toString(const PRDCollHandleBase::DETAIL& d)
+{
+  switch (d) {
+    case SIMPLE: return "SIMPLE";
+    case DETAILED: return "DETAILED";
+    case AUTO: return "AUTO";
+    default: return "Unknown (ERROR)";
+  }
+}
+
+//____________________________________________________________________
+QString PRDCollHandleBase::toString(const COLOURMETHOD& cm)
+{
+  switch (cm) {
+    case ByTechOnly: return "ByTechOnly";
+    case BySegment: return "BySegment";
+    case ByTrack: return "ByTrack";
+    case BySegmentAndTrack: return "BySegmentAndTrack";
+    default: return "Unknown (ERROR)";
+  }
+}
+
+//____________________________________________________________________
+qint32 PRDCollHandleBase::provideCollTypeID() const
+{
+  return PRDDetType::typeToInt(d->detType);
+}
+
+//____________________________________________________________________
+QString PRDCollHandleBase::provideText() const
+{
+  return d->storegate_key;
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::assignDefaultMaterial(SoMaterial*m) const
+{
+  VP1QtInventorUtils::setMatColor( m, defaultColor(), 0.18/*brightness*/ );
+}
+
+//____________________________________________________________________
+QString PRDCollHandleBase::provideSection() const
+{
+  switch (d->detType) {
+    case PRDDetType::Pixel:
+    case PRDDetType::SCT:
+    case PRDDetType::TRT:
+    return "Inner Detector PRDs";
+    case PRDDetType::SpacePoints:
+    return "ID Space Points";
+    case PRDDetType::CSC:
+    case PRDDetType::CSCstrip:
+    case PRDDetType::RPC:
+    case PRDDetType::TGC:
+    case PRDDetType::MDT:
+    case PRDDetType::MM:
+    case PRDDetType::sTGC:
+    return "Muon Spectrometer PRDs";
+    default: return "Unknown Section";
+  }
+}
+
+//____________________________________________________________________
+QString PRDCollHandleBase::provideSectionToolTip() const
+{
+  switch (d->detType) {
+    case PRDDetType::Pixel:
+    case PRDDetType::SCT:
+    case PRDDetType::TRT:
+    return "Inner Detector PRD collections in event";
+    case PRDDetType::SpacePoints:
+    return "Space Point collections in event";
+    case PRDDetType::CSC:
+    case PRDDetType::CSCstrip:
+    case PRDDetType::RPC:
+    case PRDDetType::TGC:
+    case PRDDetType::MDT:
+    return "Muon Spectrometer PRD collections in event";
+    default: return "Error: PRDDetType not recognised.";
+  }
+}
+
+//____________________________________________________________________
+QList<QWidget*> PRDCollHandleBase::provideExtraWidgetsForGuiRow() const
+{
+  return QList<QWidget*>() << d->comboBox_detailLevel;
+}
+
+//____________________________________________________________________
+QByteArray PRDCollHandleBase::extraWidgetsState() const
+{
+  VP1Serialise serialise(0/*version*/,systemBase());
+  serialise.save(d->comboBox_detailLevel);
+  serialise.disableUnsavedChecks();
+  return serialise.result();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setExtraWidgetsState(const QByteArray& ba)
+{
+  VP1Deserialise state(ba, systemBase());
+  if (state.version()!=0)
+    return;//just ignore silently... i guess we ought to warn?
+  state.restore(d->comboBox_detailLevel);
+  state.disableUnrestoredChecks();
+  detailComboBoxItemChanged();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setAllowedEta(const VP1Interval& e)
+{
+  if (d->allowedEta==e)
+    return;
+  bool relaxed(e.contains(d->allowedEta));
+  bool tightened(d->allowedEta.contains(e));
+  d->allowedEta=e;
+  if (relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else if (tightened)
+    recheckCutStatusOfAllVisibleHandles();
+  else
+    recheckCutStatusOfAllHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandleBase::setAllowedPhi(const QList<VP1Interval>& l)
+{
+  if (d->allowedPhi==l)
+    return;
+  d->allowedPhi=l;
+  recheckCutStatusOfAllHandles();
+}
+
+//____________________________________________________________________
+bool PRDCollHandleBase::Imp::etaPhiCut(PRDHandleBase* handle)
+{
+  bool allPhiAllowed = allowedPhi.count()==1&&allowedPhi.at(0).isAllR();
+  bool allEtaAllowed = allowedEta.isAllR();
+  if (allEtaAllowed&&allPhiAllowed)
+    return true;
+  if (allowedPhi.isEmpty()||allowedEta.isEmpty())
+    return false;
+  Amg::Vector3D p = handle->center();
+  if (!allEtaAllowed) {
+    if (!allowedEta.contains(p.eta()))
+      return false;
+  }
+  if (!allPhiAllowed) {
+    double phi(p.phi());
+    foreach(VP1Interval i,allowedPhi) {
+      if (i.contains(phi)||i.contains(phi+2*M_PI)||i.contains(phi-2*M_PI))
+        return true;
+    }
+    return false;
+  }
+  return true;
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3cfbe490fe092a98a0a63c971730a00d4faf4df5
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC.cxx
@@ -0,0 +1,81 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_CSC.h"
+#include "VP1Base/IVP13DSystem.h"
+#include "VP1PRDSystems/PRDHandle_CSC.h"
+#include "MuonPrepRawData/CscPrepData.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/CscPrepDataContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_CSC::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::CscPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_CSC::Imp {
+public:
+  bool attempted_detmgrload;
+  //We only load these on demand!
+  const MuonGM::MuonDetectorManager* muondetmgr;
+  const CscIdHelper * idhelper;
+};
+
+//____________________________________________________________________
+PRDCollHandle_CSC::PRDCollHandle_CSC(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::CSC,cd,key), d(new Imp), m_project(false)
+{
+  d->muondetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_CSC::~PRDCollHandle_CSC()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_CSC::defaultColor() const
+{
+  return QColor::fromRgbF( 0.1, 0.5, 1.0);//blue
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_CSC::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(projectCSCHitsChanged(bool)),this,SLOT(setProjectionMode(bool)));
+  setProjectionMode(controller->projectCSCHits());
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_CSC::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::CscPrepData*>(prd));
+  return new PRDHandle_CSC(this,static_cast<Muon::CscPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_CSC::setProjectionMode( bool b )
+{
+  if (m_project==b)
+    return;
+  m_project=b;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    (*it)->update3DObjects();
+  largeChangesEnd();
+  common()->system()->deselectAll();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC_Strip.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC_Strip.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..10a71cea1a144833c0cdc56285efa5cdaa8624e9
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_CSC_Strip.cxx
@@ -0,0 +1,81 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_CSC_Strip.h"
+#include "VP1Base/IVP13DSystem.h"
+#include "VP1PRDSystems/PRDHandle_CSC_Strip.h"
+#include "MuonPrepRawData/CscStripPrepData.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/CscStripPrepDataContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_CSC_Strip::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::CscStripPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_CSC_Strip::Imp {
+public:
+  bool attempted_detmgrload;
+  //We only load these on demand!
+  const MuonGM::MuonDetectorManager* muondetmgr;
+  const CscIdHelper * idhelper;
+};
+
+//____________________________________________________________________
+PRDCollHandle_CSC_Strip::PRDCollHandle_CSC_Strip(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::CSCstrip,cd,key), d(new Imp), m_project(false)
+{
+  d->muondetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_CSC_Strip::~PRDCollHandle_CSC_Strip()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_CSC_Strip::defaultColor() const
+{
+  return QColor::fromRgbF( 0.1, 0.5, 1.0);//blue
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_CSC_Strip::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(projectCSCHitsChanged(bool)),this,SLOT(setProjectionMode(bool)));
+  setProjectionMode(controller->projectCSCHits());
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_CSC_Strip::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::CscStripPrepData*>(prd));
+  return new PRDHandle_CSC_Strip(this,static_cast<Muon::CscStripPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_CSC_Strip::setProjectionMode( bool b )
+{
+  if (m_project==b)
+    return;
+  m_project=b;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    (*it)->update3DObjects();
+  largeChangesEnd();
+  common()->system()->deselectAll();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MDT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MDT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e9af6f6ba7250b8561d6eaf4ca049f21b2bb7836
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MDT.cxx
@@ -0,0 +1,309 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_MDT.h"
+#include "VP1PRDSystems/PRDHandle_MDT.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+
+#include "VP1Base/IVP13DSystem.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/MdtPrepDataContainer.h"
+#include "MuonPrepRawData/MdtPrepData.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_MDT::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::MdtPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_MDT::Imp {
+public:
+  PRDCollHandle_MDT * theclass;
+  std::map<const MuonGM::MuonStation*,unsigned> mdt2stationcounter;
+  unsigned minHitsPerStation;
+  VP1Interval allowedADCValues;
+  bool excludeMaskedHits;
+  bool onlyShowActive;
+  QString status;
+  bool projectionsEnabled;
+  int appropriateprojection;
+  void updateProjectionFlag();
+};
+
+//____________________________________________________________________
+PRDCollHandle_MDT::PRDCollHandle_MDT(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::MDT,cd,key), d(new Imp),
+  m_highLightMasked(false), m_highLightADCBelow(-1), m_projection(PRDCollHandle_MDT::NONE)
+{
+  d->theclass = this;
+  d->minHitsPerStation = 0;//If the intention is no cut, then put to 0 instead of 1.
+  d->allowedADCValues = VP1Interval();
+  d->excludeMaskedHits = true;
+  d->onlyShowActive = true;
+  d->projectionsEnabled = false;
+  d->appropriateprojection = 0;//none
+}
+
+//____________________________________________________________________
+PRDCollHandle_MDT::~PRDCollHandle_MDT()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_MDT::defaultColor() const
+{
+  return QColor::fromRgbF( 1.0, 0.666667, 0.0);//orange
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_MDT::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::MdtPrepData*>(prd));
+  return new PRDHandle_MDT(this,static_cast<Muon::MdtPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::postLoadInitialisation()
+{
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  std::map<const MuonGM::MuonStation*,unsigned>::iterator itStation;
+  for (;it!=itE;++it) {
+    itStation = d->mdt2stationcounter.find(static_cast<PRDHandle_MDT*>(*it)->driftCircle()->detectorElement()->parentMuonStation());
+    if (itStation!=d->mdt2stationcounter.end())
+      ++(itStation->second);
+    else
+      d->mdt2stationcounter[static_cast<PRDHandle_MDT*>(*it)->driftCircle()->detectorElement()->parentMuonStation()]=1;
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::eraseEventDataSpecific()
+{
+  d->mdt2stationcounter.clear();
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_MDT::cut(PRDHandleBase*handlebase)
+{
+  
+  PRDHandle_MDT * handle = static_cast<PRDHandle_MDT*>(handlebase);
+  assert(handle);
+
+  if (d->excludeMaskedHits) {
+    // messageVerbose(QString("Handle status = ")+handle->driftCircleStatus()+QString(", GUI: ")+common()->controller()->mdt_cutMdtDriftCircleStatus() );
+    if(!(handle->driftCircleStatus()==common()->controller()->mdt_cutMdtDriftCircleStatus()))
+      return false;
+  }
+
+  if (!d->allowedADCValues.isAllR()) {
+    if (!d->allowedADCValues.contains(handle->ADC()))
+      return false;
+  }
+
+  if (d->minHitsPerStation) {
+    assert(d->mdt2stationcounter.find(handle->driftCircle()->detectorElement()->parentMuonStation())!=d->mdt2stationcounter.end());
+    if (d->mdt2stationcounter[handle->driftCircle()->detectorElement()->parentMuonStation()]<d->minHitsPerStation)
+      return false;
+  }
+
+  // messageVerbose("PRDCollHandle_MDT::cut: ");
+  if (d->onlyShowActive) {
+    if (!common()->touchedMuonChamberHelper()->isTouchedByTrack(handle->parentMuonChamberPV()))
+      return false;
+  }
+
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(mdtMinNHitsPerStationChanged(unsigned)),this,SLOT(setMinNHitsPerStation(unsigned)));
+  setMinNHitsPerStation(controller->mdtMinNHitsPerStation());
+
+  connect(controller,SIGNAL(highLightMDTHitsByMaskChanged(bool)),this,SLOT(setHighLightByMask(bool)));
+  setHighLightByMask(controller->highLightMDTHitsByMask());
+
+  connect(controller,SIGNAL(highLightMDTHitsByUpperADCBoundChanged(int)),this,SLOT(setHighLightByUpperADCBound(int)));
+  setHighLightByUpperADCBound(controller->highLightMDTHitsByUpperADCBound());
+
+  connect(controller,SIGNAL(mdtAllowedADCValuesChanged(VP1Interval)),this,SLOT(setAllowedADCValues(VP1Interval)));
+  setAllowedADCValues(controller->mdtAllowedADCValues());
+
+  connect(controller,SIGNAL(mdtExcludeMaskedHitsChanged(bool)),this,SLOT(setExcludeMaskedHits(bool)));
+  setExcludeMaskedHits(controller->mdtExcludeMaskedHits());
+
+  connect(controller,SIGNAL(mdt_cutMdtDriftCircleStatusChanged(QString)),this,SLOT(setStatus(QString)));
+  setStatus(controller->mdt_cutMdtDriftCircleStatus());
+
+  connect(controller,SIGNAL(projectMDTHitsChanged(bool)),this,SLOT(setEnableProjections(bool)));
+  setEnableProjections(controller->projectMDTHits());
+
+  connect(controller,SIGNAL(limitToActiveChambersChanged(bool)),this,SLOT(setLimitToActiveChambers(bool)));
+  setLimitToActiveChambers(controller->limitToActiveChambers());
+  
+  connect(common()->touchedMuonChamberHelper(),SIGNAL(muonChambersTouchedByTracksChanged(void)),this,SLOT(muonChambersTouchedByTracksChanged(void)));  
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setMinNHitsPerStation(unsigned minnhits)
+{
+  if (minnhits==1)
+    minnhits = 0;//Since 0 and 1 gives same result, we map all 1's to 0's to avoid unnecessary cut rechecks.
+  if (d->minHitsPerStation==minnhits)
+    return;
+  bool cut_relaxed = minnhits < d->minHitsPerStation;
+  d->minHitsPerStation=minnhits;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setAllowedADCValues(VP1Interval newinterval)
+{
+  if (d->allowedADCValues==newinterval)
+    return;
+  VP1Interval old(d->allowedADCValues);
+  d->allowedADCValues = newinterval;
+  if (newinterval.contains(old)) {
+    recheckCutStatusOfAllNotVisibleHandles();//cut relaxed
+  } else {
+    if (old.contains(newinterval))
+      recheckCutStatusOfAllVisibleHandles();//cut tightened
+    else
+      recheckCutStatusOfAllHandles();
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setExcludeMaskedHits(bool b)
+{
+  if (d->excludeMaskedHits==b)
+    return;
+  bool cut_relaxed = !b;
+  d->excludeMaskedHits=b;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setStatus(QString b)
+{
+  // messageVerbose(QString("SetStatus: ")+b);
+  if (d->status==b)
+    return;
+  d->status=b;
+  recheckCutStatusOfAllHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setHighLightByMask(bool b)
+{
+  if (m_highLightMasked==b)
+    return;
+  m_highLightMasked=b;
+
+  //Fixme: check PRDCollHandle::hasCustomHighlighting() before proceeding to loop here?.
+
+  //call updateMaterial on all handles which are masked.
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    if (static_cast<PRDHandle_MDT*>(*it)-> masked())
+      (*it)->updateMaterial();
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setHighLightByUpperADCBound(int bound)
+{
+  if (bound<-1)
+    bound = -1;//Since all negative gives same result, we map all those to -1 to avoid unnecessary rechecks.
+  if (m_highLightADCBelow==bound)
+    return;
+
+  int low=std::min(m_highLightADCBelow,bound);
+  int high=std::max(m_highLightADCBelow,bound);
+  m_highLightADCBelow=bound;
+
+  //Fixme: check PRDCollHandle::hasCustomHighlighting() before proceeding to loop here?.
+
+  //call updateMaterial on all handles which are between the former and present values of the bound.
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  int adc;
+  for (;it!=itE;++it) {
+    adc = static_cast<PRDHandle_MDT*>(*it)->ADC();
+    if (adc>=low&&adc<=high)
+      (*it)->updateMaterial();
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setEnableProjections( bool b )
+{
+  if (d->projectionsEnabled==b)
+    return;
+  d->projectionsEnabled=b;
+  d->updateProjectionFlag();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setAppropriateProjection( int i ) {
+  if (d->appropriateprojection==i)
+    return;
+  d->appropriateprojection=i;
+  d->updateProjectionFlag();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::setLimitToActiveChambers(bool l)
+{
+  messageVerbose("PRDCollHandle_MDT::setLimitToActiveChambers => "+str(l)+" current="+str(d->onlyShowActive));
+
+  if (d->onlyShowActive==l)
+    return;
+  bool cut_relaxed=(d->onlyShowActive);
+  d->onlyShowActive=l;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+void PRDCollHandle_MDT::muonChambersTouchedByTracksChanged(void)
+{
+  messageVerbose("PRDCollHandle_MDT::muonChambersTouchedByTracksChanged");
+  recheckCutStatusOfAllHandles();
+}
+
+
+//____________________________________________________________________
+void PRDCollHandle_MDT::Imp::updateProjectionFlag() {
+  PROJECTION projflag(PRDCollHandle_MDT::NONE);
+  if (projectionsEnabled) {
+    if (appropriateprojection==1)
+      projflag = PRDCollHandle_MDT::TOTUBES;
+    else if (appropriateprojection==2)
+      projflag = PRDCollHandle_MDT::TOCHAMBERS;
+  }
+
+  if (theclass->m_projection!=projflag) {
+    theclass->m_projection = projflag;
+    theclass->common()->system()->deselectAll();
+    theclass->largeChangesBegin();
+    std::vector<PRDHandleBase*>::iterator it(theclass->getPrdHandles().begin()),itE(theclass->getPrdHandles().end());
+    for (;it!=itE;++it)
+      (*it)->update3DObjects();
+    theclass->largeChangesEnd();
+  }
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MM.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MM.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c45369f4f8b8471d1888e93608b4df11bce65ca7
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_MM.cxx
@@ -0,0 +1,309 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_MM.h"
+#include "VP1PRDSystems/PRDHandle_MM.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+
+#include "VP1Base/IVP13DSystem.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/MMPrepDataContainer.h"
+#include "MuonPrepRawData/MMPrepData.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_MM::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::MMPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_MM::Imp {
+public:
+  PRDCollHandle_MM * theclass;
+  std::map<const MuonGM::MuonStation*,unsigned> mm2stationcounter;
+  unsigned minHitsPerStation;
+  VP1Interval allowedADCValues;
+  bool excludeMaskedHits;
+  bool onlyShowActive;
+  QString status;
+  bool projectionsEnabled;
+  int appropriateprojection;
+  void updateProjectionFlag();
+};
+
+//____________________________________________________________________
+PRDCollHandle_MM::PRDCollHandle_MM(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::MM,cd,key), d(new Imp) //,
+  // m_highLightMasked(false), m_highLightADCBelow(-1), m_projection(PRDCollHandle_MM::NONE)
+{
+  d->theclass = this;
+  d->minHitsPerStation = 0;//If the intention is no cut, then put to 0 instead of 1.
+  d->allowedADCValues = VP1Interval();
+  d->excludeMaskedHits = true;
+  d->onlyShowActive = true;
+  d->projectionsEnabled = false;
+  d->appropriateprojection = 0;//none
+}
+
+//____________________________________________________________________
+PRDCollHandle_MM::~PRDCollHandle_MM()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_MM::defaultColor() const
+{
+  return QColor::fromRgbF( 1.0, 0.666667, 0.0);//orange
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_MM::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::MMPrepData*>(prd));
+  return new PRDHandle_MM(this,static_cast<Muon::MMPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MM::postLoadInitialisation()
+{
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  std::map<const MuonGM::MuonStation*,unsigned>::iterator itStation;
+  for (;it!=itE;++it) {
+    itStation = d->mm2stationcounter.find(static_cast<PRDHandle_MM*>(*it)->mm()->detectorElement()->parentMuonStation());
+    if (itStation!=d->mm2stationcounter.end())
+      ++(itStation->second);
+    else
+      d->mm2stationcounter[static_cast<PRDHandle_MM*>(*it)->mm()->detectorElement()->parentMuonStation()]=1;
+  }
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MM::eraseEventDataSpecific()
+{
+  d->mm2stationcounter.clear();
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_MM::cut(PRDHandleBase*handlebase)
+{
+  
+  PRDHandle_MM * handle = static_cast<PRDHandle_MM*>(handlebase);
+  assert(handle);
+
+  // if (d->excludeMaskedHits) {
+  //   // messageVerbose(QString("Handle status = ")+handle->driftCircleStatus()+QString(", GUI: ")+common()->controller()->mdt_cutMdtDriftCircleStatus() );
+  //   if(!(handle->driftCircleStatus()==common()->controller()->mdt_cutMdtDriftCircleStatus()))
+  //     return false;
+  // }
+
+  // if (!d->allowedADCValues.isAllR()) {
+  //   if (!d->allowedADCValues.contains(handle->ADC()))
+  //     return false;
+  // }
+
+  if (d->minHitsPerStation) {
+    assert(d->mm2stationcounter.find(handle->mm()->detectorElement()->parentMuonStation())!=d->mm2stationcounter.end());
+    if (d->mm2stationcounter[handle->mm()->detectorElement()->parentMuonStation()]<d->minHitsPerStation)
+      return false;
+  }
+
+  // messageVerbose("PRDCollHandle_MM::cut: ");
+  if (d->onlyShowActive) {
+    if (!common()->touchedMuonChamberHelper()->isTouchedByTrack(handle->parentMuonChamberPV()))
+      return false;
+  }
+
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MM::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(mdtMinNHitsPerStationChanged(unsigned)),this,SLOT(setMinNHitsPerStation(unsigned)));
+  setMinNHitsPerStation(controller->mdtMinNHitsPerStation());
+
+  // connect(controller,SIGNAL(highLightMDTHitsByMaskChanged(bool)),this,SLOT(setHighLightByMask(bool)));
+  // setHighLightByMask(controller->highLightMDTHitsByMask());
+
+  // connect(controller,SIGNAL(highLightMDTHitsByUpperADCBoundChanged(int)),this,SLOT(setHighLightByUpperADCBound(int)));
+  // setHighLightByUpperADCBound(controller->highLightMDTHitsByUpperADCBound());
+  // 
+  // connect(controller,SIGNAL(mdtAllowedADCValuesChanged(VP1Interval)),this,SLOT(setAllowedADCValues(VP1Interval)));
+  // setAllowedADCValues(controller->mdtAllowedADCValues());
+
+  // connect(controller,SIGNAL(mdtExcludeMaskedHitsChanged(bool)),this,SLOT(setExcludeMaskedHits(bool)));
+  // setExcludeMaskedHits(controller->mdtExcludeMaskedHits());
+
+  // connect(controller,SIGNAL(mdt_cutMdtDriftCircleStatusChanged(QString)),this,SLOT(setStatus(QString)));
+  // setStatus(controller->mdt_cutMdtDriftCircleStatus());
+
+  // connect(controller,SIGNAL(projectMDTHitsChanged(bool)),this,SLOT(setEnableProjections(bool)));
+  // setEnableProjections(controller->projectMDTHits());
+
+  connect(controller,SIGNAL(limitToActiveChambersChanged(bool)),this,SLOT(setLimitToActiveChambers(bool)));
+  setLimitToActiveChambers(controller->limitToActiveChambers());
+  
+  connect(common()->touchedMuonChamberHelper(),SIGNAL(muonChambersTouchedByTracksChanged(void)),this,SLOT(muonChambersTouchedByTracksChanged(void)));  
+}
+
+//____________________________________________________________________
+void PRDCollHandle_MM::setMinNHitsPerStation(unsigned minnhits)
+{
+  if (minnhits==1)
+    minnhits = 0;//Since 0 and 1 gives same result, we map all 1's to 0's to avoid unnecessary cut rechecks.
+  if (d->minHitsPerStation==minnhits)
+    return;
+  bool cut_relaxed = minnhits < d->minHitsPerStation;
+  d->minHitsPerStation=minnhits;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setAllowedADCValues(VP1Interval newinterval)
+// {
+//   if (d->allowedADCValues==newinterval)
+//     return;
+//   VP1Interval old(d->allowedADCValues);
+//   d->allowedADCValues = newinterval;
+//   if (newinterval.contains(old)) {
+//     recheckCutStatusOfAllNotVisibleHandles();//cut relaxed
+//   } else {
+//     if (old.contains(newinterval))
+//       recheckCutStatusOfAllVisibleHandles();//cut tightened
+//     else
+//       recheckCutStatusOfAllHandles();
+//   }
+// }
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setExcludeMaskedHits(bool b)
+// {
+//   if (d->excludeMaskedHits==b)
+//     return;
+//   bool cut_relaxed = !b;
+//   d->excludeMaskedHits=b;
+//   if (cut_relaxed)
+//     recheckCutStatusOfAllNotVisibleHandles();
+//   else
+//     recheckCutStatusOfAllVisibleHandles();
+// }
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setStatus(QString b)
+// {
+//   // messageVerbose(QString("SetStatus: ")+b);
+//   if (d->status==b)
+//     return;
+//   d->status=b;
+//   recheckCutStatusOfAllHandles();
+// }
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setHighLightByMask(bool b)
+// {
+//   if (m_highLightMasked==b)
+//     return;
+//   m_highLightMasked=b;
+// 
+//   //Fixme: check PRDCollHandle::hasCustomHighlighting() before proceeding to loop here?.
+// 
+//   //call updateMaterial on all handles which are masked.
+//   std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+//   for (;it!=itE;++it) {
+//     if (static_cast<PRDHandle_MM*>(*it)-> masked())
+//       (*it)->updateMaterial();
+//   }
+// }
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setHighLightByUpperADCBound(int bound)
+// {
+//   if (bound<-1)
+//     bound = -1;//Since all negative gives same result, we map all those to -1 to avoid unnecessary rechecks.
+//   if (m_highLightADCBelow==bound)
+//     return;
+// 
+//   int low=std::min(m_highLightADCBelow,bound);
+//   int high=std::max(m_highLightADCBelow,bound);
+//   m_highLightADCBelow=bound;
+// 
+//   //Fixme: check PRDCollHandle::hasCustomHighlighting() before proceeding to loop here?.
+// 
+//   //call updateMaterial on all handles which are between the former and present values of the bound.
+//   std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+//   int adc;
+//   for (;it!=itE;++it) {
+//     adc = static_cast<PRDHandle_MM*>(*it)->ADC();
+//     if (adc>=low&&adc<=high)
+//       (*it)->updateMaterial();
+//   }
+// }
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setEnableProjections( bool b )
+// {
+//   if (d->projectionsEnabled==b)
+//     return;
+//   d->projectionsEnabled=b;
+//   d->updateProjectionFlag();
+// }
+// 
+// //____________________________________________________________________
+// void PRDCollHandle_MM::setAppropriateProjection( int i ) {
+//   if (d->appropriateprojection==i)
+//     return;
+//   d->appropriateprojection=i;
+//   d->updateProjectionFlag();
+// }
+
+//____________________________________________________________________
+void PRDCollHandle_MM::setLimitToActiveChambers(bool l)
+{
+  messageVerbose("PRDCollHandle_MM::setLimitToActiveChambers => "+str(l)+" current="+str(d->onlyShowActive));
+
+  if (d->onlyShowActive==l)
+    return;
+  bool cut_relaxed=(d->onlyShowActive);
+  d->onlyShowActive=l;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+void PRDCollHandle_MM::muonChambersTouchedByTracksChanged(void)
+{
+  messageVerbose("PRDCollHandle_MM::muonChambersTouchedByTracksChanged");
+  recheckCutStatusOfAllHandles();
+}
+
+
+// //____________________________________________________________________
+// void PRDCollHandle_MM::Imp::updateProjectionFlag() {
+//   PROJECTION projflag(PRDCollHandle_MM::NONE);
+//   if (projectionsEnabled) {
+//     if (appropriateprojection==1)
+//       projflag = PRDCollHandle_MM::TOTUBES;
+//     else if (appropriateprojection==2)
+//       projflag = PRDCollHandle_MM::TOCHAMBERS;
+//   }
+// 
+//   if (theclass->m_projection!=projflag) {
+//     theclass->m_projection = projflag;
+//     theclass->common()->system()->deselectAll();
+//     theclass->largeChangesBegin();
+//     std::vector<PRDHandleBase*>::iterator it(theclass->getPrdHandles().begin()),itE(theclass->getPrdHandles().end());
+//     for (;it!=itE;++it)
+//       (*it)->update3DObjects();
+//     theclass->largeChangesEnd();
+//   }
+// }
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_Pixel.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_Pixel.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ee0182252fe7ba1a3519273fe1b5abd60ce5856d
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_Pixel.cxx
@@ -0,0 +1,131 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_Pixel.h"
+#include "VP1PRDSystems/PRDHandle_Pixel.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "InDetPrepRawData/PixelCluster.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "InDetPrepRawData/PixelClusterContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_Pixel::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasPixelGeometry() ? VP1SGContentsHelper(sys).getKeys<InDet::PixelClusterContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_Pixel::Imp {
+public:
+  PRDCommonFlags::InDetPartsFlags indetpartsflags;
+  unsigned minNRDOPerCluster;
+};
+
+//____________________________________________________________________
+PRDCollHandle_Pixel::PRDCollHandle_Pixel(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::Pixel,cd,key), d(new Imp)
+{
+  d->indetpartsflags = (PRDCommonFlags::BarrelPositive | PRDCommonFlags::BarrelNegative | PRDCommonFlags::EndCapPositive | PRDCommonFlags::EndCapNegative);
+  d->minNRDOPerCluster = 2;
+}
+
+//____________________________________________________________________
+PRDCollHandle_Pixel::~PRDCollHandle_Pixel()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_Pixel::defaultColor() const
+{
+  return QColor::fromRgbF(1.0, 0.666667, 0.5 );//beige
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_Pixel::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<InDet::PixelCluster*>(prd));
+  return new PRDHandle_Pixel(this,static_cast<InDet::PixelCluster*>(prd));
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_Pixel::cut(PRDHandleBase*handlebase)
+{
+  PRDHandle_Pixel * handle = static_cast<PRDHandle_Pixel*>(handlebase);
+  assert(handle);
+
+  if (d->indetpartsflags!=PRDCommonFlags::All) {
+    if (handle->isBarrel()) {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::BarrelPositive):(d->indetpartsflags&PRDCommonFlags::BarrelNegative)))
+ 	return false;
+    } else {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::EndCapPositive):(d->indetpartsflags&PRDCommonFlags::EndCapNegative)))
+ 	return false;
+    }
+  }
+  if (d->minNRDOPerCluster&&handle->cluster()->rdoList().size()<d->minNRDOPerCluster)
+    return false;
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_Pixel::setPartsFlags(PRDCommonFlags::InDetPartsFlags flags ) {
+  //NB: The code is this method is very similar in PRDCollHandle_Pixel::setPartsFlags, PRDCollHandle_SCT::setPartsFlags,
+  //PRDCollHandle_TRT::setPartsFlags and and PRDCollHandle_SpacePoints::setPartsFlags
+  //Fixme: base decision to recheck on visibility also!
+
+  if (d->indetpartsflags==flags)
+    return;
+
+  bool barrelPosChanged = (d->indetpartsflags&PRDCommonFlags::BarrelPositive)!=(flags&PRDCommonFlags::BarrelPositive);
+  bool barrelNegChanged = (d->indetpartsflags&PRDCommonFlags::BarrelNegative)!=(flags&PRDCommonFlags::BarrelNegative);
+  bool endcapPosChanged = (d->indetpartsflags&PRDCommonFlags::EndCapPositive)!=(flags&PRDCommonFlags::EndCapPositive);
+  bool endcapNegChanged = (d->indetpartsflags&PRDCommonFlags::EndCapNegative)!=(flags&PRDCommonFlags::EndCapNegative);
+  bool barrelChanged = (barrelPosChanged || barrelNegChanged);
+  bool endcapChanged = (endcapPosChanged || endcapNegChanged);
+  d->indetpartsflags=flags;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    PRDHandle_Pixel* handle = static_cast<PRDHandle_Pixel*>(*it);
+
+    if (handle->isBarrel()) {
+      if (barrelChanged&&(handle->isPositiveZ()?barrelPosChanged:barrelNegChanged))
+ 	recheckCutStatus(handle);
+    } else {
+      if (endcapChanged&&(handle->isPositiveZ()?endcapPosChanged:endcapNegChanged))
+ 	recheckCutStatus(handle);
+    }
+
+  }
+  largeChangesEnd();
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_Pixel::setMinNRDOPerCluster(unsigned minnrdo)
+{
+  if (d->minNRDOPerCluster==minnrdo)
+    return;
+  bool cut_relaxed =  minnrdo<d->minNRDOPerCluster;
+  d->minNRDOPerCluster = minnrdo;
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_Pixel::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)),this,SLOT(setPartsFlags(PRDCommonFlags::InDetPartsFlags)));
+  setPartsFlags(controller->inDetPartsFlags());
+
+  connect(controller,SIGNAL(pixelMinNRDOPerClusterChanged(unsigned)),this,SLOT(setMinNRDOPerCluster(unsigned)));
+  setMinNRDOPerCluster(controller->pixelMinNRDOPerCluster());
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_RPC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_RPC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fd18e4bcd7f0c22aea7ad8c2e943c02a18f2008c
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_RPC.cxx
@@ -0,0 +1,79 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_RPC.h"
+#include "VP1Base/IVP13DSystem.h"//fixme: add deselectAll to common()...
+#include "VP1PRDSystems/PRDHandle_RPC.h"
+#include "MuonPrepRawData/RpcPrepData.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/RpcPrepDataContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_RPC::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::RpcPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_RPC::Imp {
+public:
+  bool attempted_detmgrload;
+  //We only load these on demand!
+  const MuonGM::MuonDetectorManager* muondetmgr;
+  const RpcIdHelper * idhelper;
+};
+
+//____________________________________________________________________
+PRDCollHandle_RPC::PRDCollHandle_RPC(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::RPC,cd,key), d(new Imp), m_project(false)
+{
+  d->muondetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_RPC::~PRDCollHandle_RPC()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_RPC::defaultColor() const
+{
+  return QColor::fromRgbF( 0.75, 0.39, 1.0);//light purple
+}
+
+//____________________________________________________________________
+void PRDCollHandle_RPC::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(projectRPCHitsChanged(bool)),this,SLOT(setProjectionMode(bool)));
+  setProjectionMode(controller->projectRPCHits());
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_RPC::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::RpcPrepData*>(prd));
+  return new PRDHandle_RPC(this,static_cast<Muon::RpcPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_RPC::setProjectionMode( bool b )
+{
+  if (m_project==b)
+    return;
+  m_project=b;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    (*it)->update3DObjects();
+  largeChangesEnd();
+  common()->system()->deselectAll();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SCT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SCT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c0806b553750496e43a743c7dedb15084d7ee77f
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SCT.cxx
@@ -0,0 +1,149 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_SCT.h"
+#include "VP1PRDSystems/PRDHandle_SCT.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "InDetPrepRawData/SCT_Cluster.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "InDetPrepRawData/SCT_ClusterContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_SCT::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasSCTGeometry() ? VP1SGContentsHelper(sys).getKeys<InDet::SCT_ClusterContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_SCT::Imp {
+public:
+  std::set<const InDetDD::SiDetectorElement*> touchedelements;
+
+  PRDCommonFlags::InDetPartsFlags indetpartsflags;
+  bool excludeisolatedclusters;
+};
+
+//____________________________________________________________________
+PRDCollHandle_SCT::PRDCollHandle_SCT(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::SCT,cd,key), d(new Imp)
+{
+  d->indetpartsflags = (PRDCommonFlags::BarrelPositive | PRDCommonFlags::BarrelNegative | PRDCommonFlags::EndCapPositive | PRDCommonFlags::EndCapNegative);
+  d->excludeisolatedclusters = true;
+}
+
+//____________________________________________________________________
+PRDCollHandle_SCT::~PRDCollHandle_SCT()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_SCT::defaultColor() const
+{
+  return QColor::fromRgbF(1.0, 1.0, 0.5 );//light yellow
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_SCT::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<InDet::SCT_Cluster*>(prd));
+  return new PRDHandle_SCT(this,static_cast<InDet::SCT_Cluster*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SCT::postLoadInitialisation()
+{
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    d->touchedelements.insert(static_cast<PRDHandle_SCT*>(*it)->cluster()->detectorElement());
+  d->touchedelements.insert(0);//To always show clusters whose elements have no otherSide() pointer.
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SCT::eraseEventDataSpecific()
+{
+  d->touchedelements.clear();
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_SCT::cut(PRDHandleBase*handlebase)
+{
+  PRDHandle_SCT * handle = static_cast<PRDHandle_SCT*>(handlebase);
+  assert(handle);
+
+  if (d->indetpartsflags!=PRDCommonFlags::All) {
+    if (handle->isBarrel()) {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::BarrelPositive):(d->indetpartsflags&PRDCommonFlags::BarrelNegative)))
+ 	return false;
+    } else {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::EndCapPositive):(d->indetpartsflags&PRDCommonFlags::EndCapNegative)))
+ 	return false;
+    }
+  }
+
+  if (d->excludeisolatedclusters) {
+    if (!d->touchedelements.count(handle->cluster()->detectorElement()->otherSide()))
+      return false;
+  }
+
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SCT::setPartsFlags(PRDCommonFlags::InDetPartsFlags flags ) {
+  //NB: The code is this method is very similar in PRDCollHandle_Pixel::setPartsFlags, PRDCollHandle_SCT::setPartsFlags,
+  //PRDCollHandle_TRT::setPartsFlags and and PRDCollHandle_SpacePoints::setPartsFlags
+  //Fixme: base decision to recheck on visibility also!
+
+  if (d->indetpartsflags==flags)
+    return;
+
+  bool barrelPosChanged = (d->indetpartsflags&PRDCommonFlags::BarrelPositive)!=(flags&PRDCommonFlags::BarrelPositive);
+  bool barrelNegChanged = (d->indetpartsflags&PRDCommonFlags::BarrelNegative)!=(flags&PRDCommonFlags::BarrelNegative);
+  bool endcapPosChanged = (d->indetpartsflags&PRDCommonFlags::EndCapPositive)!=(flags&PRDCommonFlags::EndCapPositive);
+  bool endcapNegChanged = (d->indetpartsflags&PRDCommonFlags::EndCapNegative)!=(flags&PRDCommonFlags::EndCapNegative);
+  bool barrelChanged = (barrelPosChanged || barrelNegChanged);
+  bool endcapChanged = (endcapPosChanged || endcapNegChanged);
+  d->indetpartsflags=flags;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    PRDHandle_SCT* handle = static_cast<PRDHandle_SCT*>(*it);
+    if (handle->isBarrel()) {
+      if (barrelChanged&&(handle->isPositiveZ()?barrelPosChanged:barrelNegChanged))
+ 	recheckCutStatus(handle);
+    } else {
+      if (endcapChanged&&(handle->isPositiveZ()?endcapPosChanged:endcapNegChanged))
+ 	recheckCutStatus(handle);
+    }
+  }
+  largeChangesEnd();
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SCT::setExcludeIsolatedClusters(bool excludeisolated)
+{
+  if (d->excludeisolatedclusters==excludeisolated)
+    return;
+  d->excludeisolatedclusters=excludeisolated;
+  if (excludeisolated)
+    recheckCutStatusOfAllVisibleHandles();
+  else
+    recheckCutStatusOfAllNotVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SCT::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)),this,SLOT(setPartsFlags(PRDCommonFlags::InDetPartsFlags)));
+  setPartsFlags(controller->inDetPartsFlags());
+
+  connect(controller,SIGNAL(sctExcludeIsolatedClustersChanged(bool)),this,SLOT(setExcludeIsolatedClusters(bool)));
+  setExcludeIsolatedClusters(controller->sctExcludeIsolatedClusters());
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SpacePoints.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SpacePoints.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..65ed923289a3965508d5c70fe765d036373dfcc9
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_SpacePoints.cxx
@@ -0,0 +1,184 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class PRDCollHandle_SpacePoints         //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: September 2008                           //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/PRDCollHandle_SpacePoints.h"
+#include "VP1PRDSystems/PRDHandle_SpacePoint.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1Base/IVP1System.h"
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "VP1Utils/VP1SGAccessHelper.h"
+#include "TrkSpacePoint/SpacePointContainer.h"
+#include <QtGui/QColor>
+
+//____________________________________________________________________
+QStringList PRDCollHandle_SpacePoints::availableCollections(IVP1System*sys)
+{
+  if (!VP1JobConfigInfo::hasSCTGeometry()&&!VP1JobConfigInfo::hasPixelGeometry())
+    return QStringList();
+  QStringList keys = VP1SGContentsHelper(sys).getKeys<SpacePointContainer>();
+  QStringList unsafekeys;
+  if (!VP1JobConfigInfo::hasSCTGeometry()) {
+    foreach (QString key,keys) {
+      if (key.contains("sct",Qt::CaseInsensitive))
+	unsafekeys << key;
+    }
+  }
+  if (!VP1JobConfigInfo::hasPixelGeometry()) {
+    foreach (QString key,keys) {
+      if (key.contains("pixel",Qt::CaseInsensitive))
+	unsafekeys << key;
+    }
+  }
+  foreach (QString unsafekey,unsafekeys)
+    keys.removeAll(unsafekey);
+  return keys;
+}
+
+//____________________________________________________________________
+class PRDCollHandle_SpacePoints::Imp {
+public:
+  PRDCommonFlags::InDetPartsFlags indetpartsflags;
+};
+
+
+//____________________________________________________________________
+PRDCollHandle_SpacePoints::PRDCollHandle_SpacePoints(PRDSysCommonData* common,const QString& key)
+  : PRDCollHandleBase(PRDDetType::SpacePoints,common,key), d(new Imp)
+{
+  d->indetpartsflags = (PRDCommonFlags::BarrelPositive | PRDCommonFlags::BarrelNegative | PRDCommonFlags::EndCapPositive | PRDCommonFlags::EndCapNegative);
+}
+
+//____________________________________________________________________
+PRDCollHandle_SpacePoints::~PRDCollHandle_SpacePoints()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_SpacePoints::defaultColor() const
+{
+  if (text().contains("pixel",Qt::CaseInsensitive))
+    return QColor::fromRgbF(1.0, 0.666667, 0.5 );//beige
+  else
+    return QColor::fromRgbF(1.0, 1.0, 0.5 );//light yellow
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_SpacePoints::load()
+{
+  /////////////////////////////////////////////////////////////////////////
+  // Retrieve element container from event store:
+  const SpacePointContainer* container;
+  if(!VP1SGAccessHelper(systemBase()).retrieve(container,text()))
+    return false;
+
+  int isp(0);
+  SpacePointContainer::const_iterator itElement, itElementE(container->end());
+  for (itElement=container->begin();itElement!=itElementE;++itElement) {
+    SpacePointContainer::base_value_type::const_iterator it, itE((*itElement)->end());
+    for (it=(*itElement)->begin();it!=itE;++it) {
+      const Trk::SpacePoint * sp = *it;
+      ++isp;
+      if (!sp) {
+	message("WARNING - ignoring null spacepoint pointer.");
+	continue;
+      }
+      if (!sp->clusterList().first) {
+	message("WARNING - ignoring spacepoint with null first cluster.");
+	continue;
+      }
+      PRDHandleBase * handle = new PRDHandle_SpacePoint(this,sp);
+      if (handle) {
+	addHandle(handle);
+	//We just register the first of the (possibly) two prds here (fixme: check that it works):
+	common()->registerPRD2Handle(handle->getPRD(),handle);
+      } else {
+	message("WARNING - ignoring null handle pointer.");
+      }
+      if (!(isp%100))
+	systemBase()->updateGUI();
+    }
+  }
+  return true;
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_SpacePoints::cut(PRDHandleBase*handlebase)
+{
+  PRDHandle_SpacePoint * handle = static_cast<PRDHandle_SpacePoint*>(handlebase);
+  assert(handle);
+
+  if (d->indetpartsflags!=PRDCommonFlags::All) {
+    if (handle->isBarrel()) {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::BarrelPositive):(d->indetpartsflags&PRDCommonFlags::BarrelNegative)))
+ 	return false;
+    } else {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::EndCapPositive):(d->indetpartsflags&PRDCommonFlags::EndCapNegative)))
+ 	return false;
+    }
+  }
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SpacePoints::eraseEventDataSpecific()
+{
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SpacePoints::postLoadInitialisation()
+{
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SpacePoints::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)),
+	  this,SLOT(setPartsFlags(PRDCommonFlags::InDetPartsFlags)));
+  setPartsFlags(controller->inDetPartsFlags());
+}
+
+//____________________________________________________________________
+void PRDCollHandle_SpacePoints::setPartsFlags(PRDCommonFlags::InDetPartsFlags flags)
+{
+  //NB: The code is this method is very similar in PRDCollHandle_Pixel::setPartsFlags, PRDCollHandle_SCT::setPartsFlags,
+  //PRDCollHandle_TRT::setPartsFlags and and PRDCollHandle_SpacePoints::setPartsFlags
+  //Fixme: base decision to recheck on visibility also!
+
+  if (d->indetpartsflags==flags)
+    return;
+
+  bool barrelPosChanged = (d->indetpartsflags&PRDCommonFlags::BarrelPositive)!=(flags&PRDCommonFlags::BarrelPositive);
+  bool barrelNegChanged = (d->indetpartsflags&PRDCommonFlags::BarrelNegative)!=(flags&PRDCommonFlags::BarrelNegative);
+  bool endcapPosChanged = (d->indetpartsflags&PRDCommonFlags::EndCapPositive)!=(flags&PRDCommonFlags::EndCapPositive);
+  bool endcapNegChanged = (d->indetpartsflags&PRDCommonFlags::EndCapNegative)!=(flags&PRDCommonFlags::EndCapNegative);
+  bool barrelChanged = (barrelPosChanged || barrelNegChanged);
+  bool endcapChanged = (endcapPosChanged || endcapNegChanged);
+  d->indetpartsflags=flags;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    PRDHandle_SpacePoint* handle = static_cast<PRDHandle_SpacePoint*>(*it);
+    if (handle->isBarrel()) {
+      if (barrelChanged&&(handle->isPositiveZ()?barrelPosChanged:barrelNegChanged))
+	recheckCutStatus(handle);
+    } else {
+      if (endcapChanged&&(handle->isPositiveZ()?endcapPosChanged:endcapNegChanged))
+	recheckCutStatus(handle);
+    }
+  }
+  largeChangesEnd();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TGC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TGC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fc80bd4cfca265c66cae7a43008ef643865da695
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TGC.cxx
@@ -0,0 +1,79 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_TGC.h"
+#include "VP1Base/IVP13DSystem.h"
+#include "VP1PRDSystems/PRDHandle_TGC.h"
+#include "MuonPrepRawData/TgcPrepData.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/TgcPrepDataContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_TGC::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::TgcPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_TGC::Imp {
+public:
+  bool attempted_detmgrload;
+  //We only load these on demand!
+  const MuonGM::MuonDetectorManager* muondetmgr;
+  const TgcIdHelper * idhelper;
+};
+
+//____________________________________________________________________
+PRDCollHandle_TGC::PRDCollHandle_TGC(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::TGC,cd,key), d(new Imp), m_project(false)
+{
+  d->muondetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_TGC::~PRDCollHandle_TGC()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_TGC::defaultColor() const
+{
+  return QColor::fromRgbF(0.42, 0.96, 0.16);//bright green
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TGC::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(projectTGCHitsChanged(bool)),this,SLOT(setProjectionMode(bool)));
+  setProjectionMode(controller->projectTGCHits());
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_TGC::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::TgcPrepData*>(prd));
+  return new PRDHandle_TGC(this,static_cast<Muon::TgcPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TGC::setProjectionMode( bool b )
+{
+  if (m_project==b)
+    return;
+  m_project=b;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    (*it)->update3DObjects();
+  largeChangesEnd();
+  common()->system()->deselectAll();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TRT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TRT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..126643aae1d5cb9b33d083cc61cb630e848aa545
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_TRT.cxx
@@ -0,0 +1,355 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_TRT.h"
+#include "VP1Base/IVP13DSystem.h"
+#include "VP1PRDSystems/PRDHandle_TRT.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include <QtGui/QColor>
+
+#include "InDetPrepRawData/TRT_DriftCircle.h"
+#include "InDetReadoutGeometry/TRT_DetectorManager.h"
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "InDetPrepRawData/TRT_DriftCircleContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_TRT::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasTRTGeometry() ? VP1SGContentsHelper(sys).getKeys<InDet::TRT_DriftCircleContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_TRT::Imp {
+public:
+  //Keep specific lists of handles here... i.e. those with a HT for instance
+  //   std::vector<PRDHandle_TRT*> prdhandles;
+  bool attempted_detmgrload;
+
+  //We only load these on demand!
+  const InDetDD::TRT_DetectorManager* trtdetmgr;
+  const TRT_ID * idhelper;
+
+  PRDCommonFlags::InDetPartsFlags indetpartsflags;
+  double minToT;
+  double maxToT;
+  int minLE;
+  int maxLE;
+  bool needToTCheck;
+  bool needLECheck;
+  bool requireHT;
+};
+
+//____________________________________________________________________
+PRDCollHandle_TRT::PRDCollHandle_TRT(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::TRT,cd,key), d(new Imp), m_highlightHT(false), m_project(false),m_appropriateProjections(InDetProjFlags::NoProjections)
+{
+  d->trtdetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+  d->indetpartsflags = (PRDCommonFlags::BarrelPositive | PRDCommonFlags::BarrelNegative | PRDCommonFlags::EndCapPositive | PRDCommonFlags::EndCapNegative);
+  d->minToT = -0.5*3.125;
+  d->maxToT = 24.5*3.125;
+  d->minLE  = 0;
+  d->maxLE  = 23;
+  d->needToTCheck = false;
+  d->needLECheck  = false;
+  d->requireHT = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_TRT::~PRDCollHandle_TRT()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_TRT::defaultColor() const
+{
+  return QColor::fromRgbF(1.0, 1.0, 1.0);//white
+
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_TRT::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<InDet::TRT_DriftCircle*>(prd));
+  return new PRDHandle_TRT(this,static_cast<InDet::TRT_DriftCircle*>(prd));
+}
+
+//____________________________________________________________________
+bool PRDCollHandle_TRT::cut(PRDHandleBase*handlebase)
+{
+  PRDHandle_TRT * handle = static_cast<PRDHandle_TRT*>(handlebase);
+  assert(handle);
+
+  if (d->needToTCheck) {
+    const double ToT = handle->driftCircle()->timeOverThreshold();
+    if (ToT<d->minToT)
+      return false;
+    if (ToT>d->maxToT)
+      return false;
+  }
+
+  if (d->needLECheck) {
+    const int LE = handle->driftCircle()->driftTimeBin();//returns 0..24. 24 means no LT bits.
+    if (LE>=0&&LE<24) {
+      if (LE<d->minLE)
+	return false;
+      if (LE>d->maxLE)
+	return false;
+    }
+  }
+
+
+  if (d->indetpartsflags!=PRDCommonFlags::All) {
+    if (handle->isBarrel()) {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::BarrelPositive):(d->indetpartsflags&PRDCommonFlags::BarrelNegative)))
+	return false;
+    } else {
+      if (!(handle->isPositiveZ()?(d->indetpartsflags&PRDCommonFlags::EndCapPositive):(d->indetpartsflags&PRDCommonFlags::EndCapNegative)))
+	return false;
+    }
+  }
+
+  if (d->requireHT&&!handle->highLevel())
+    return false;
+
+  return true;
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setPartsFlags(PRDCommonFlags::InDetPartsFlags flags ) {
+  //NB: The code is this method is very similar in PRDCollHandle_Pixel::setPartsFlags, PRDCollHandle_SCT::setPartsFlags,
+  //PRDCollHandle_TRT::setPartsFlags and and PRDCollHandle_SpacePoints::setPartsFlags
+  //Fixme: base decision to recheck on visibility also!
+
+  if (d->indetpartsflags==flags)
+    return;
+
+  bool barrelPosChanged = (d->indetpartsflags&PRDCommonFlags::BarrelPositive)!=(flags&PRDCommonFlags::BarrelPositive);
+  bool barrelNegChanged = (d->indetpartsflags&PRDCommonFlags::BarrelNegative)!=(flags&PRDCommonFlags::BarrelNegative);
+  bool endcapPosChanged = (d->indetpartsflags&PRDCommonFlags::EndCapPositive)!=(flags&PRDCommonFlags::EndCapPositive);
+  bool endcapNegChanged = (d->indetpartsflags&PRDCommonFlags::EndCapNegative)!=(flags&PRDCommonFlags::EndCapNegative);
+  bool barrelChanged = (barrelPosChanged || barrelNegChanged);
+  bool endcapChanged = (endcapPosChanged || endcapNegChanged);
+  d->indetpartsflags=flags;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    PRDHandle_TRT* handle = static_cast<PRDHandle_TRT*>(*it);
+    if (handle->isBarrel()) {
+      if (barrelChanged&&(handle->isPositiveZ()?barrelPosChanged:barrelNegChanged))
+	recheckCutStatus(handle);
+    } else {
+      if (endcapChanged&&(handle->isPositiveZ()?endcapPosChanged:endcapNegChanged))
+	recheckCutStatus(handle);
+    }
+  }
+  largeChangesEnd();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setMinToT(unsigned nbins)
+{
+  double newminToT = (nbins-0.5)*3.125;
+  if (d->minToT==newminToT)
+    return;
+  bool cut_relaxed = (newminToT<d->minToT);
+  d->minToT=newminToT;
+  d->needToTCheck = (d->minToT>0.0||d->maxToT<24*3.125);
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setMaxToT(unsigned nbins)
+{
+  double newmaxToT = (nbins+0.5)*3.125;
+  if (d->maxToT==newmaxToT)
+    return;
+  bool cut_relaxed = (newmaxToT>d->maxToT);
+  d->maxToT=newmaxToT;
+  d->needToTCheck = (d->minToT>0.0||d->maxToT<24*3.125);
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setMinLE(unsigned i)
+{
+  int newminLE = i-1;
+  if (d->minLE==newminLE)
+    return;
+  bool cut_relaxed = (newminLE<d->minLE);
+  d->minLE=newminLE;
+  d->needLECheck = (d->minLE>0||d->maxLE<23);
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setMaxLE(unsigned i)
+{
+  int newmaxLE = i-1;
+  if (d->maxLE==newmaxLE)
+    return;
+  bool cut_relaxed = (newmaxLE>d->maxLE);
+  d->maxLE=newmaxLE;
+  d->needLECheck = (d->minLE>0||d->maxLE<23);
+  if (cut_relaxed)
+    recheckCutStatusOfAllNotVisibleHandles();
+  else
+    recheckCutStatusOfAllVisibleHandles();
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setRequireHT(bool reqHT)
+{
+  if (d->requireHT==reqHT)
+    return;
+  d->requireHT=reqHT;
+  if (d->requireHT)
+    recheckCutStatusOfAllVisibleHandles();
+  else
+    recheckCutStatusOfAllNotVisibleHandles();
+  //NB: Since we assume the large majority are without HT, we do not
+  //    base decision to recheck on presence of HT.
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(projectTRTHitsChanged(bool)),this,SLOT(setProject(bool)));
+  setProject(controller->projectTRTHits());//Fixme: Do in pixel/sct as well!
+
+  connect(controller,SIGNAL(highLightTRTHitsByHighThresholdChanged(bool)),this,SLOT(setHighLightHighThresholds(bool)));
+  setHighLightHighThresholds(controller->highLightTRTHitsByHighThreshold());
+
+  connect(controller,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)),this,SLOT(setPartsFlags(PRDCommonFlags::InDetPartsFlags)));
+  setPartsFlags(controller->inDetPartsFlags());
+
+  connect(controller,SIGNAL(trtMinToTChanged(unsigned)),this,SLOT(setMinToT(unsigned)));
+  setMinToT(controller->trtMinToT());
+
+  connect(controller,SIGNAL(trtMaxToTChanged(unsigned)),this,SLOT(setMaxToT(unsigned)));
+  setMaxToT(controller->trtMaxToT());
+
+  connect(controller,SIGNAL(trtMinLEChanged(unsigned)),this,SLOT(setMinLE(unsigned)));
+  setMinLE(controller->trtMinLE());
+
+  connect(controller,SIGNAL(trtMaxLEChanged(unsigned)),this,SLOT(setMaxLE(unsigned)));
+  setMaxLE(controller->trtMaxLE());
+
+  connect(controller,SIGNAL(trtRequireHTChanged(bool)),this,SLOT(setRequireHT(bool)));
+  setRequireHT(controller->trtRequireHT());
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setHighLightHighThresholds(bool hl)
+{
+  if (m_highlightHT==hl)
+    return;
+  m_highlightHT=hl;
+
+  //Fixme: check PRDCollHandle::hasCustomHighlighting() before proceeding to loop here?.
+
+  //call updateMaterial on all handles which have a high threshold.
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    if (static_cast<PRDHandle_TRT*>(*it)->highLevel())
+      (*it)->updateMaterial();
+  }
+  largeChangesEnd();
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setAppropriateProjection( InDetProjFlags::InDetProjPartsFlags f )
+{
+  //Fixme: use message:
+  messageVerbose("setAppropriateProjection called.");
+  if (m_appropriateProjections==f)
+    return;
+  messageVerbose("setAppropriateProjection => update needed.");
+
+  InDetProjFlags::InDetProjPartsFlags changedparts = ( m_appropriateProjections ^ f );
+  m_appropriateProjections = f;
+
+  bool updateposbarrel = ( changedparts & InDetProjFlags::Barrel_AllPos );
+  bool updatenegbarrel = ( changedparts & InDetProjFlags::Barrel_AllNeg );
+  bool updateposendcap = ( changedparts & InDetProjFlags::EndCap_AllPos );
+  bool updatenegendcap = ( changedparts & InDetProjFlags::EndCap_AllNeg );
+  bool updatebarrel = updateposbarrel || updatenegbarrel;
+  bool updateendcap = updateposendcap || updatenegendcap;
+
+  messageVerbose("setAppropriateProjection updating (brlA,brlC,ecA,ecC) = ("+str(updateposbarrel)+","+str(updatenegbarrel)
+		 +","+str(updateposendcap)+","+str(updatenegendcap)+")");
+
+  if (!updatebarrel&&!updateendcap) {
+    message("setAppropriateProjection WARNING: Unexpected flag value.");
+    return;
+  }
+
+  common()->system()->deselectAll();
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it) {
+    PRDHandle_TRT* handle = static_cast<PRDHandle_TRT*>(*it);
+    if (handle->isBarrel()) {
+      if (updatebarrel) {
+	if (handle->isPositiveZ()) {
+	  if (updateposbarrel)
+	    handle->update3DObjects();
+	} else {
+	  if (updatenegbarrel)
+	    handle->update3DObjects();
+	}
+      }
+    } else {
+      if (updateendcap) {
+	if (handle->isPositiveZ()) {
+	  if (updateposendcap)
+	    handle->update3DObjects();
+	} else {
+	  if (updatenegendcap)
+	    handle->update3DObjects();
+	}
+      }
+    }
+  }
+  largeChangesEnd();
+
+}
+
+//____________________________________________________________________
+void PRDCollHandle_TRT::setProject( bool b)
+{
+  //Fixme: use message:
+  messageVerbose("setProject called with project = "+str(b));
+
+  if (m_project==b) {
+    messageVerbose("setProject ==> No change.");
+    return;
+  }
+  m_project=b;
+  messageVerbose("setProject ==> Setting changed.");
+
+  common()->system()->deselectAll();
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    static_cast<PRDHandle_TRT*>(*it)->update3DObjects();
+  largeChangesEnd();
+
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_sTGC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_sTGC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b05d6760d3d9a981fccd39ef44672bab5dcf2cfc
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDCollHandle_sTGC.cxx
@@ -0,0 +1,79 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDCollHandle_sTGC.h"
+#include "VP1Base/IVP13DSystem.h"
+#include "VP1PRDSystems/PRDHandle_sTGC.h"
+#include "MuonPrepRawData/sTgcPrepData.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include <QtGui/QColor>
+
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1SGContentsHelper.h"
+#include "MuonPrepRawData/sTgcPrepDataContainer.h"
+
+//____________________________________________________________________
+QStringList PRDCollHandle_sTGC::availableCollections(IVP1System*sys)
+{
+  return VP1JobConfigInfo::hasMuonGeometry() ? VP1SGContentsHelper(sys).getKeys<Muon::sTgcPrepDataContainer>() : QStringList();
+}
+
+//____________________________________________________________________
+class PRDCollHandle_sTGC::Imp {
+public:
+  bool attempted_detmgrload;
+  //We only load these on demand!
+  const MuonGM::MuonDetectorManager* muondetmgr;
+  const sTgcIdHelper * idhelper;
+};
+
+//____________________________________________________________________
+PRDCollHandle_sTGC::PRDCollHandle_sTGC(PRDSysCommonData * cd,const QString& key)
+  : PRDCollHandleBase(PRDDetType::sTGC,cd,key), d(new Imp), m_project(false)
+{
+  d->muondetmgr = 0;
+  d->idhelper = 0;
+  d->attempted_detmgrload = false;
+}
+
+//____________________________________________________________________
+PRDCollHandle_sTGC::~PRDCollHandle_sTGC()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+QColor PRDCollHandle_sTGC::defaultColor() const
+{
+  return QColor::fromRgbF(0.42, 0.96, 0.16);//bright green
+}
+
+//____________________________________________________________________
+void PRDCollHandle_sTGC::setupSettingsFromControllerSpecific(PRDSystemController*controller)
+{
+  connect(controller,SIGNAL(project_TGCHitsChanged(bool)),this,SLOT(setProjectionMode(bool)));
+  setProjectionMode(controller->projectTGCHits());
+}
+
+//____________________________________________________________________
+PRDHandleBase* PRDCollHandle_sTGC::addPRD( Trk::PrepRawData * prd )
+{
+  assert(dynamic_cast<Muon::sTgcPrepData*>(prd));
+  return new PRDHandle_sTGC(this,static_cast<Muon::sTgcPrepData*>(prd));
+}
+
+//____________________________________________________________________
+void PRDCollHandle_sTGC::setProjectionMode( bool b )
+{
+  if (m_project==b)
+    return;
+  m_project=b;
+
+  largeChangesBegin();
+  std::vector<PRDHandleBase*>::iterator it(getPrdHandles().begin()),itE(getPrdHandles().end());
+  for (;it!=itE;++it)
+    (*it)->update3DObjects();
+  largeChangesEnd();
+  common()->system()->deselectAll();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDDetTypes.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDDetTypes.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cf84bfc009b5bae3b779101314ee6838e4391a85
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDDetTypes.cxx
@@ -0,0 +1,85 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDDetTypes.h"
+
+//______________________________________________
+QString PRDDetType::typeToString(const Type& t)
+{
+  switch (t) {
+  case Pixel: return "Pixel";
+  case SCT: return "SCT";
+  case TRT: return "TRT";
+  case CSC: return "CSC";
+  case CSCstrip: return "CSCstrip";
+  case RPC: return "RPC";
+  case TGC: return "TGC";
+  case sTGC: return "sTGC";
+  case MDT: return "MDT";
+  case MM: return "MM";
+  case SpacePoints: return "SpacePoints";
+  default: return "UNKNOWN";
+  }
+}
+
+//______________________________________________
+PRDDetType::Type PRDDetType::stringToType(const QString&str, bool & status)
+{
+  status = true;
+  if (str=="Pixel") return Pixel;
+  if (str=="SCT") return SCT;
+  if (str=="TRT") return TRT;
+  if (str=="CSC") return CSC;
+  if (str=="CSCstrip") return CSCstrip;
+  if (str=="RPC") return RPC;
+  if (str=="TGC") return TGC;
+  if (str=="sTGC") return sTGC;
+  if (str=="MDT") return MDT;
+  if (str=="MM") return MM;
+  if (str=="SpacePoints") return SpacePoints;
+  status = false;
+  return Pixel;//***REMOVED*** - people better watch the return status!
+}
+
+
+//______________________________________________
+qint32 PRDDetType::typeToInt(const Type& t)
+{
+  switch (t) {
+  case Pixel: return 0;
+  case SCT: return 1;
+  case TRT: return 2;
+  case CSC: return 3;
+  case RPC: return 4;
+  case TGC: return 5;
+  case MDT: return 6;
+  case SpacePoints: return 7;
+  case CSCstrip: return 8;
+  case sTGC: return 9;
+  case MM: return 10;
+  default: return -1;
+  }
+}
+
+//______________________________________________
+PRDDetType::Type PRDDetType::intToType(const qint32&i, bool & status)
+{
+  status = true;
+  switch (i) {
+  case 0: return Pixel;
+  case 1: return SCT;
+  case 2: return TRT;
+  case 3: return CSC;
+  case 4: return RPC;
+  case 5: return TGC;
+  case 6: return MDT;
+  case 7: return SpacePoints;
+  case 8: return CSCstrip;
+  case 9: return sTGC;
+  case 10: return MM;
+  default:
+    status = false;
+    return Pixel;//***REMOVED*** - people better watch the return status!
+  }
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandleBase.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandleBase.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..80fba23cdf32088d475292647f5d30a4b437971e
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandleBase.cxx
@@ -0,0 +1,483 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/VP1PrepRawDataSystem.h"
+#include "VP1PRDSystems/PRDTrackSegmentHelper.h"
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+
+#include "VP1Base/VP1ExtraSepLayerHelper.h"
+#include "VP1Base/VP1SoMaterialMixer.h"
+#include "VP1Base/VP1Msg.h"
+
+#include "VP1Utils/VP1LinAlgUtils.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTransform.h>
+#include <Inventor/nodes/SoMaterial.h>
+
+#include "TrkSurfaces/Surface.h"
+#include "TrkPrepRawData/PrepRawData.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+#include "GeoPrimitives/GeoPrimitivesHelpers.h"
+
+#include <vector>
+#include <algorithm>
+#include <sstream>
+
+//____________________________________________________________________
+class PRDHandleBase::Imp {
+public:
+  PRDCollHandleBase* colhandle;
+  void rebuild3DObjects(PRDHandleBase*);
+  void attach3DObjects(PRDHandleBase*);
+  void detach3DObjects();
+
+  static Amg::Vector3D positionPRD(const Trk::PrepRawData* prd);
+
+  //Child 0 is the transform, then follows the node representing the shapes.
+  SoSeparator * sepDetailed;
+  SoSeparator * sepSimple;
+  SoMaterial * currentmaterial;
+  VP1ExtraSepLayerHelper* sephelper_lod_detail;
+  VP1ExtraSepLayerHelper* sephelper_lod_simple;
+
+  SoMaterial * determineMaterial(PRDHandleBase*);
+};
+
+//____________________________________________________________________
+SoSeparator* PRDHandleBase::sepSimple() const
+{
+  return d->sepSimple;
+}
+
+//____________________________________________________________________
+SoSeparator* PRDHandleBase::sepDetailed() const
+{
+  return d->sepDetailed;
+}
+
+//____________________________________________________________________
+PRDHandleBase::PRDHandleBase(PRDCollHandleBase*colhandle)
+  : d(new Imp), m_common(colhandle->common()),m_visible(false)
+{
+  d->colhandle = colhandle;
+  d->sepDetailed = 0;
+  d->sepSimple = 0;
+  d->currentmaterial = 0;
+  d->sephelper_lod_detail = 0;
+  d->sephelper_lod_simple = 0;
+}
+
+
+//____________________________________________________________________
+PRDHandleBase::~PRDHandleBase()
+{
+  if (d->sepDetailed)
+    d->sepDetailed->unref();
+  if (d->sepSimple)
+    d->sepSimple->unref();
+  if (d->currentmaterial)
+    d->currentmaterial->unref();
+
+  delete d;
+}
+
+//____________________________________________________________________
+void PRDHandleBase::Imp::rebuild3DObjects(PRDHandleBase*theclass)
+{  
+  //Fixme:
+  SoTransform * transform(0);
+  //If visible and already build: Detach separators (and ensure we got the sephelpers):
+  if (theclass->m_visible) {
+    if (!sephelper_lod_detail) {
+      int idx = theclass->regionIndex();
+      colhandle->getLODSeparators(idx, sephelper_lod_detail,sephelper_lod_simple);
+    }
+    detach3DObjects();
+  }
+
+  //Ensure separators are built and with no children:
+  if (sepDetailed) {
+    //We might get transform from this one:
+    if (sepDetailed->getNumChildren()>0) {      
+      transform = static_cast<SoTransform*>(sepDetailed->getChild(0));
+      transform->ref();
+    }
+    sepDetailed->removeAllChildren();
+  } else {
+    sepDetailed = new SoSeparator;
+    sepDetailed->ref();
+    //     sepDetailed->renderCaching.setValue(SoSeparator::ON);
+    //     sepDetailed->boundingBoxCaching.setValue(SoSeparator::ON);
+  }
+  if (sepSimple) {
+    sepSimple->removeAllChildren();
+  } else {
+    sepSimple = new SoSeparator;
+    //     sepSimple->renderCaching.setValue(SoSeparator::ON);
+    //     sepSimple->boundingBoxCaching.setValue(SoSeparator::ON);
+    sepSimple->ref();
+  }
+  //Attach transforms:
+  if (!transform) {    
+    transform = theclass->createTransform();
+    transform->ref();
+    theclass->common()->registerTransform2Handle(transform,theclass);
+  }
+  sepDetailed->addChild(transform);//For efficiency it is important that this happens BEFORE buildShapes(..) is called.
+  sepSimple->addChild(transform);
+  transform->unref();
+
+  SoNode* shape_simple(0), * shape_detailed(0);
+  theclass->buildShapes(shape_simple, shape_detailed);
+  if (!shape_simple)
+    shape_simple = theclass->common()->nodeManager()->getShapeNode_Point();//Add single point as a stop-gap measure.
+  if (!shape_detailed)
+    shape_detailed = shape_simple;//Could not create detailed shape for some reason. Use simple shape instead.
+
+  sepSimple->addChild(shape_simple);
+  sepDetailed->addChild(shape_detailed);
+
+  //Attach if visible:
+  if (theclass->m_visible)
+    attach3DObjects(theclass);
+}
+
+// //____________________________________________________________________
+// inline void PRDHandleBase::registerTransform(SoTransform*transform)//FIXME: Pass-through not needed
+// {
+//   //Use this pass-through method to get around a friend-problem
+//   //FIXME  common()->system()->registerTransform2Handle(transform,this);
+// }
+
+//____________________________________________________________________
+void PRDHandleBase::updateMaterial()
+{
+  //We need to change the current material. This means we need to
+  //clear the cache. Only if we are visible do we need to do a
+  //detach->clear material->attach cycle to trigger attachment under new material.
+
+  if (!d->currentmaterial)
+    return;//We have no material cached and is thus not attached either.
+  if (m_visible) {
+    //See if the material changed. If it did, detach, update the material, attach again.
+    SoMaterial * newmat = d->determineMaterial(this);
+    newmat->ref();
+    if (newmat!=d->currentmaterial) {
+      d->detach3DObjects();
+      d->currentmaterial->unref();
+      d->currentmaterial = newmat;
+      d->attach3DObjects(this);
+    } else {
+      newmat->unref();
+    }
+  } else {
+    //Just clear material.
+    d->currentmaterial->unref();
+    d->currentmaterial = 0;
+  }
+}
+
+//____________________________________________________________________
+void PRDHandleBase::Imp::attach3DObjects(PRDHandleBase*theclass)
+{
+  if (!currentmaterial) {
+    currentmaterial = determineMaterial(theclass);
+    currentmaterial->ref();
+  }
+  if (sepDetailed) {
+    if (colhandle->sephelperDetailedNodes())
+      colhandle->sephelperDetailedNodes()->addNodeUnderMaterial(sepDetailed,currentmaterial);
+    if (sephelper_lod_detail)
+      sephelper_lod_detail->addNodeUnderMaterial(sepDetailed,currentmaterial);
+  }
+  if (sepSimple) {
+    if (colhandle->sephelperSimpleNodes())
+      colhandle->sephelperSimpleNodes()->addNodeUnderMaterial(sepSimple,currentmaterial);
+    if (sephelper_lod_simple)
+      sephelper_lod_simple->addNodeUnderMaterial(sepSimple,currentmaterial);
+  }
+}
+
+//____________________________________________________________________
+void PRDHandleBase::Imp::detach3DObjects()
+{
+  if (!currentmaterial)
+    return;//Can never have been attached!
+  if (sepDetailed) {
+    if (colhandle->sephelperDetailedNodes())
+      colhandle->sephelperDetailedNodes()->removeNodeUnderMaterial(sepDetailed,currentmaterial);
+    if (sephelper_lod_detail)
+      sephelper_lod_detail->removeNodeUnderMaterial(sepDetailed,currentmaterial);
+  }
+  if (sepSimple) {
+    if (colhandle->sephelperSimpleNodes())
+      colhandle->sephelperSimpleNodes()->removeNodeUnderMaterial(sepSimple,currentmaterial);
+    if (sephelper_lod_simple)
+      sephelper_lod_simple->removeNodeUnderMaterial(sepSimple,currentmaterial);
+  }
+}
+
+//____________________________________________________________________
+PRDCollHandleBase * PRDHandleBase::collHandle() const
+{
+  return d->colhandle;
+}
+
+//____________________________________________________________________
+void PRDHandleBase::setVisible(bool vis)
+{
+  if (vis==m_visible)
+    return;
+  //std::cout<<"Changing visible status from "<<m_visible<<" to "<<vis<<" for: "<<*getPRD()<<std::endl;
+  m_visible=vis;
+  if (vis) {
+    d->colhandle->incrementNShownHandles();
+    if (inMuonChamber())
+      common()->touchedMuonChamberHelper()->incrementNumberOfObjectsForPV(parentMuonChamberPV());
+    if (!d->sepSimple||!d->sepDetailed)
+      d->rebuild3DObjects(this);//The call to rebuild also fixes attached state.
+    else
+      d->attach3DObjects(this);
+  } else {
+    d->colhandle->decrementNShownHandles();
+    if (inMuonChamber())
+      common()->touchedMuonChamberHelper()->decrementNumberOfObjectsForPV(parentMuonChamberPV());
+    d->detach3DObjects();
+  }
+}
+
+//____________________________________________________________________
+void PRDHandleBase::update3DObjects() {
+  //Fixme: If selected we really need to redo selection updates!!!
+  if (m_visible) {
+    d->rebuild3DObjects(this);
+  } else {
+    //Simply clear the present 3D objects. They will only be recreated if/when the prd becomes visible again.
+    if (d->sepDetailed) {
+      d->sepDetailed->unref();
+      d->sepDetailed = 0;
+    }
+    if (d->sepSimple) {
+      d->sepSimple->unref();
+      d->sepSimple = 0;
+    }
+  }
+
+}
+
+//____________________________________________________________________
+QStringList PRDHandleBase::clicked() const
+{
+  const Trk::PrepRawData * prd = getPRD();
+  if (!prd)
+    return QStringList("Null PRD");
+  std::ostringstream os;
+  os << *(prd);
+  return QString(os.str().c_str()).split("\n");
+}
+
+
+//____________________________________________________________________
+Amg::Vector3D PRDHandleBase::Imp::positionPRD(const Trk::PrepRawData* prd)
+{
+  if (!prd)
+    return Amg::Vector3D(0,0,0);
+  if (!prd||!prd->detectorElement())
+    return Amg::Vector3D(0.0,0.0,0.0);
+  const Trk::Surface& theSurface = prd->detectorElement()->surface(prd->identify());
+  if (!&theSurface)
+    return Amg::Vector3D(0.0,0.0,0.0);
+
+  const Amg::Vector3D* hitpos = theSurface.localToGlobal(prd->localPosition());
+  if (!hitpos)
+    return Amg::Vector3D(0.0,0.0,0.0);
+
+  const Amg::Vector3D pos(*hitpos);
+  delete hitpos;
+  return pos;
+}
+
+//____________________________________________________________________
+Amg::Vector3D PRDHandleBase::positionPRD() const
+{
+  return Imp::positionPRD(getPRD());
+}
+
+//____________________________________________________________________
+Amg::Vector3D PRDHandleBase::positionSecondPRD() const
+{
+  return Imp::positionPRD(getSecondPRD());
+}
+
+
+//____________________________________________________________________
+Amg::Vector3D PRDHandleBase::center() const
+{
+  return positionPRD();
+}
+
+//____________________________________________________________________
+Amg::Transform3D PRDHandleBase::getTransform_CLHEP() const
+{  
+  if (d->sepDetailed&&d->sepDetailed->getNumChildren()>0) {
+    //For efficiency/consistency we simply copy the transform from the
+    //inventor transformation (only loose slight precision in the
+    //double->float->double conversions):
+    SoTransform * transform = static_cast<SoTransform*>(d->sepDetailed->getChild(0));
+    const SbVec3f so_translation(transform->translation.getValue());
+    float tx, ty, tz;
+    transform->translation.getValue().getValue(tx,ty,tz);
+    SbVec3f so_rotaxis;
+    float so_rotangle;
+    transform->rotation.getValue().getValue(so_rotaxis, so_rotangle);
+    float rx, ry, rz;
+    so_rotaxis.getValue(rx,ry,rz);
+    Amg::Vector3D axis(rx,ry,rz);
+//    Amg::AngleAxis3D angleAxis = Amg::getRotation3DfromAngleAxis( so_rotangle, axis );
+//    Amg::Rotation3D rot;
+//    rot = angleAxis;
+    Amg::Rotation3D rot = Amg::getRotation3DfromAngleAxis( so_rotangle, axis );
+    return Amg::Translation3D(tx,ty,tz) * rot;
+  }
+  std::cout<<"VP1 PRDHandleBase Warning: getTransform_CLHEP called at inopportune moment!!"<<std::endl;
+
+  //NB: Some code duplicated here and in the createTransform() method.
+
+  const Trk::PrepRawData * prd = getPRD();
+  if (!prd) {
+    return Amg::Transform3D::Identity();
+  }
+  const Trk::Surface& theSurface = prd->detectorElement()->surface(prd->identify());
+  const Amg::Vector3D* theHitGPos;
+  if ( transformUsesSurfacePositionOnly() ) {
+    // for tubes, should use position of center of tube (if drawing full tube)
+    theHitGPos= new Amg::Vector3D (theSurface.center());
+  } else {
+    // for clusters or short tubes, use position of hit.
+    theHitGPos = theSurface.localToGlobal(prd->localPosition());
+  }
+
+//  CLHEP::Hep3Vector t(theSurface.transform().getTranslation());
+//  return HepGeom::Transform3D( HepGeom::Translate3D(theHitGPos->x()-t.x(),theHitGPos->y()-t.y(),theHitGPos->z()-t.z()) * (theSurface.transform()) );
+  Amg::Vector3D t;
+  t = Amg::getTranslationVectorFromTransform(theSurface.transform());
+  Amg::Translation3D transl = Amg::Translation3D(theHitGPos->x()-t.x(), theHitGPos->y()-t.y(), theHitGPos->z()-t.z());
+  Amg::Transform3D transf = transl * (theSurface.transform());
+
+  return transf;
+}
+
+//____________________________________________________________________
+SoTransform * PRDHandleBase::createTransform() const
+{  
+  //NB: Some code duplicated here and in the getTransform_CLHEP() method.
+  const Trk::PrepRawData * prd = getPRD();
+  if (!prd) {
+    std::cerr<<"PRDHandleBase::createTransform() No prd!"<<std::endl;
+    return new SoTransform;
+  }
+  const Trk::Surface& theSurface = prd->detectorElement()->surface(prd->identify());
+  SoTransform * theHitTransform = VP1LinAlgUtils::toSoTransform(theSurface.transform());
+
+  const Amg::Vector3D* theHitGPos;
+  if ( transformUsesSurfacePositionOnly() ) {
+    // for tubes, should use position of center of tube (if drawing full tube)
+    theHitGPos= new Amg::Vector3D (theSurface.center());
+  } else {
+    // for strips, clusters or short tubes, use position of hit.
+    theHitGPos = theSurface.localToGlobal(prd->localPosition());
+  }
+  if ((*theHitGPos)[0]!=(*theHitGPos)[0] || (*theHitGPos)[1]!=(*theHitGPos)[1] || (*theHitGPos)[2]!=(*theHitGPos)[2]){
+    std::cerr<<"PRDHandleBase::createTransform() NaN in globalposition"<<std::endl;
+  }
+  theHitTransform->translation.setValue((*theHitGPos)[0], (*theHitGPos)[1], (*theHitGPos)[2]);
+  delete theHitGPos;
+  return theHitTransform;
+}
+
+//____________________________________________________________________
+SoMaterial * PRDHandleBase::Imp::determineMaterial(PRDHandleBase*theclass)
+{
+  double hlw = colhandle->highLightWeight();
+  //Get most frequent special case (i.e. no highlighting ) out of the
+  //way first for efficiency:
+  if (colhandle->colourMethod()!=PRDCollHandleBase::ByTechOnly) {
+    std::map<SoMaterial*,double> materials;
+      //-> Retrieve tracks/segments.
+      const PRDTrackSegmentHelper::TracksAndSegments * ts = theclass->common()->trackAndSegmentHelper()->tracksAndSegments(theclass->getPRD());
+      if (ts) {
+	//-> Add all materials from tracks as appropriate
+	if (colhandle->colourByTracks()) {
+	  for (unsigned i = 0; i < ts->tracks.size(); ++i) {
+	    SoMaterial * mat = theclass->common()->trackAndSegmentHelper()->trackMaterial(ts->tracks[i]);
+	    if (mat)
+	      materials[mat]=1.0;
+	    else
+	      std::cout<< "PRDHandleBase ERROR: Did not find track material!"<<std::endl;
+	  }
+	}
+	//-> Add all materials from segments as appropriate
+	if (colhandle->colourBySegments()) {
+	  for (unsigned i = 0; i < ts->segments.size(); ++i) {
+	    SoMaterial * mat = theclass->common()->trackAndSegmentHelper()->segmentMaterial(ts->segments[i]);
+	    if (mat)
+	      materials[mat]=1.0;
+	    else
+	      std::cout<< "PRDHandleBase ERROR: Did not find segment material (2)!"<<std::endl;
+	  }
+	}
+	if (hlw>0.0&&colhandle->highLightOutliers()) {
+	  //Add outliers (if colourbytracks) + a highlightmaterial, all with appropriate weights.
+	  if (colhandle->colourByTracks()&&!ts->tracks_outliers.empty()) {
+	    if (hlw>999.0) {
+	      materials[colhandle->highLightMaterial()] = ts->tracks_outliers.size();
+	    } else {
+	      for (unsigned i = 0; i < ts->tracks_outliers.size(); ++i) {
+		SoMaterial * mat = theclass->common()->trackAndSegmentHelper()->trackMaterial(ts->tracks_outliers[i]);
+		if (mat)
+		  materials[mat]=1.0/(hlw+1.0);
+		else
+		  std::cout<< "PRDHandleBase ERROR: Did not find track material (3)!"<<std::endl;
+	      }
+ 	      materials[colhandle->highLightMaterial()] = ts->tracks_outliers.size()*hlw/(hlw+1.0);
+	    }
+	  }
+	} else {
+	  //Just add materials from outliers - and see if we need highlighting also.
+	  if (colhandle->colourByTracks()) {
+	    for (unsigned i = 0; i < ts->tracks_outliers.size(); ++i) {
+	      SoMaterial * mat = theclass->common()->trackAndSegmentHelper()->trackMaterial(ts->tracks_outliers[i]);
+	      if (mat)
+		materials[mat]=1.0;
+		else
+		  std::cout<< "PRDHandleBase ERROR: Did not find track material (4)!"<<std::endl;
+	    }
+	  }
+	  if (hlw>0.0&&!colhandle->highLightOutliers()&&theclass->highLight()) {
+	    unsigned ntrackssegments= (colhandle->colourByTracks()?ts->tracks.size()+ts->tracks_outliers.size():0)
+                                      +(colhandle->colourBySegments()?ts->segments.size():0);
+	    if (ntrackssegments)
+	      materials[colhandle->highLightMaterial()] = hlw*ntrackssegments;
+	  }
+	}
+	if (!materials.empty())
+	  return theclass->common()->materialMixer()->getMixedMaterial(materials);
+      }
+  }
+
+
+  //OK, just use the tech colour - and possibly some non-outlier-highlighting.
+  if (hlw>0.0&&!colhandle->highLightOutliers()&&theclass->highLight()) {
+    if (hlw>999.0)
+      return colhandle->highLightMaterial();
+    return theclass->common()->materialMixer()->getMixedMaterial(colhandle->highLightMaterial(),hlw,colhandle->material(),1.0);
+  } else {
+    return colhandle->material();
+  }
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..918e37dae4604ed6f3e5a7fb93822ab83acc2efb
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC.cxx
@@ -0,0 +1,173 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_CSC.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1DetInfo.h"
+
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonIdHelpers/CscIdHelper.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoMaterial.h>
+
+#include <sstream>
+
+//____________________________________________________________________
+PRDHandle_CSC::PRDHandle_CSC(PRDCollHandle_CSC*collhandle, const Muon::CscPrepData*csc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_csc(csc)
+{
+    SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+void PRDHandle_CSC::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const CscIdHelper * idhelper = VP1DetInfo::cscIDHelper();
+  if (!idhelper)
+    return;
+
+  Identifier id = m_csc->identify();
+
+  SoSeparator * errDetailed  = new SoSeparator;
+
+  double striplength = m_csc->detectorElement()->stripLength( id );
+  if (static_cast<PRDCollHandle_CSC*>(collHandle())->project())
+    striplength += 300.0;//Fixme: Rough extension for now
+  shape_simple = common()->nodeManager()->getShapeNode_Strip(striplength);
+
+  // Translation from objects local position to the strip position
+  const Amg::Vector2D& localpos = m_csc->localPosition();
+  const Amg::Vector3D& globalposHIT = m_csc->detectorElement()->stripPos( id );
+  // get local position on wire plane, here we have to use a tolarance as the wire plane is located 2.5 CLHEP::mm
+  // from the strip plane
+  double tolerance = 3.;
+//  const Amg::Vector2D * localposHIT = m_csc->detectorElement()->surface( id ).globalToLocal(globalposHIT,tolerance);
+  const Amg::Vector2D * localposHIT = m_csc->detectorElement()->surface( id ).Trk::Surface::globalToLocal(globalposHIT,tolerance); // TODO: this is a workaround because of missing function in Trak::PlaneSurface.h
+
+  if( !localposHIT )
+  {
+    localposHIT = new Amg::Vector2D;
+    VP1Msg::message("Warning: Local wire position is NULL");
+  }
+  SoTranslation * localtrans0 = new SoTranslation;
+  localtrans0->translation.setValue((*localposHIT)[Trk::locX]-localpos[Trk::locX],(*localposHIT)[Trk::locY]-localpos[Trk::locY],0);
+
+  const double maxCharge = 1e7;
+  //Thickness of highlighed strip
+  //FIXME: the maxCharge/3 is just a quick fix to get a nice presentation
+  //       maybe this should go like sqrt(charge/maxCharge) so that it
+  //       is clear for small charges.
+  //const double stripHeight = (1 + 4*sqrt(m_csc->charge()/maxCharge))*CLHEP::mm; // [1,5]
+  //
+  //       The minimum is chosen equal to the neighbouring strips, such
+  //       that a zero charge will give the same stirp height
+  const double stripHeight = (1 + 4*m_csc->charge()/(maxCharge/3))*CLHEP::mm; // [1,5]
+  //Thickness of additional strips (from rdoList())
+  const double stripHeightRDOs = 1*CLHEP::mm;
+
+  const std::vector<Identifier> rdolist = m_csc->rdoList();
+  if (rdolist.size() == 1 || !collHandle()->drawRDOs())
+  {
+    errDetailed->addChild(localtrans0);
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+						  m_csc->detectorElement()->cathodeReadoutPitch(idhelper->chamberLayer( id ),
+							idhelper->measuresPhi( id )), stripHeight));
+
+    //Translate back so errDetailed is left sane (eg. when drawing errors later)
+    SoTranslation * localtransBack = new SoTranslation;
+    localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
+    errDetailed->addChild(localtransBack);
+  } else
+  {
+    SoSeparator * rdos = new SoSeparator;
+    rdos->addChild(localtrans0);
+
+    rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+						  m_csc->detectorElement()->cathodeReadoutPitch(idhelper->chamberLayer( id ),
+							idhelper->measuresPhi( id )), stripHeight));
+
+    SoTransparency * transparent = new SoTransparency;
+    transparent->transparency.setValue(0.5);
+    rdos->addChild( transparent );
+    Amg::Vector2D localposOLD = *localposHIT;
+    std::vector<Identifier>::const_iterator st = rdolist.begin();
+    std::vector<Identifier>::const_iterator en = rdolist.end();
+    for( std::vector<Identifier>::const_iterator it = st; it!=en; it++)
+    {
+      if (*it == id )
+        continue;
+      const Amg::Vector3D& globalposRDO = m_csc->detectorElement()->stripPos( *it );
+
+      //      const Amg::Vector2D * localposRDO = m_csc->detectorElement()->surface( *it ).globalToLocal(globalposRDO,tolerance);
+      const Amg::Vector2D * localposRDO = m_csc->detectorElement()->surface( *it ).Trk::Surface::globalToLocal(globalposRDO,tolerance);// TODO: this is a workaround because of missing function in Trak::PlaneSurface.h
+
+      if (!localposRDO)
+      {
+        VP1Msg::message("Warning: Local wire position is NULL");
+        continue;
+      }
+
+      SoTranslation * localtrans = new SoTranslation;
+      localtrans->translation.setValue((*localposRDO)[Trk::locX]-localposOLD[Trk::locX],(*localposRDO)[Trk::locY]-localposOLD[Trk::locY],0);
+      rdos->addChild(localtrans);
+      double striplengthRDO = m_csc->detectorElement()->stripLength( *it );
+
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplengthRDO,
+                     m_csc->detectorElement()->cathodeReadoutPitch(idhelper->chamberLayer( *it ),
+                     idhelper->measuresPhi( *it )), stripHeightRDOs));
+
+      localposOLD = *localposRDO;
+      delete localposRDO;
+    }
+    errDetailed->addChild(rdos);
+  }
+  delete localposHIT;
+  
+  SoMaterial * mat = new SoMaterial;
+  mat->diffuseColor.setValue(1.0,0,0);
+  errDetailed->addChild(mat);
+  errDetailed->addChild(common()->nodeManager()->getShapeNode_Cross(10));
+
+  shape_detailed = errDetailed;
+}
+
+//____________________________________________________________________
+int PRDHandle_CSC::regionIndex()
+{
+  //Unique for each station.
+  const MuonGM::MuonStation* station = m_csc->detectorElement()->parentMuonStation();
+  return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+}
+
+//____________________________________________________________________
+QStringList PRDHandle_CSC::clicked() const
+{
+
+  if (!m_csc)
+    return QStringList("Null PRD");
+  const CscIdHelper * idhelper = VP1DetInfo::cscIDHelper();
+  if (!idhelper)
+    return QStringList("Null PRD");
+
+  Identifier id = m_csc->identify();
+  std::ostringstream os;
+  os << "CscPrepData with Identifier ["<<id.get_compact()  ;
+  os << "] = [" << (idhelper->print_to_string(id)).c_str()  ;
+  os << "]\n at global position = [" << m_csc->globalPosition()<<"], local position = ["<<m_csc->localPosition()<<"].";
+  os << ". Charge="<<m_csc->charge()<<", time="<< m_csc->time()<<", status="<<Muon::toString(m_csc->status());
+  os << ". RDO list= [";
+  for( unsigned int i=0;i<m_csc->rdoList().size();++i) os << m_csc->rdoList()[i] << " , ";
+  os << "].";
+  // os << *(m_csc);
+  return QString(os.str().c_str()).split("\n");
+}
+
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC_Strip.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC_Strip.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..aaf74c3e3cc90515f4dcb7d7180846af31a32eb1
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_CSC_Strip.cxx
@@ -0,0 +1,145 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_CSC_Strip.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonIdHelpers/CscIdHelper.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoMaterial.h>
+
+#include <sstream>
+#include <algorithm>
+
+
+//____________________________________________________________________
+PRDHandle_CSC_Strip::PRDHandle_CSC_Strip(PRDCollHandle_CSC_Strip*collhandle, const Muon::CscStripPrepData*csc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_csc(csc)
+{
+  SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+void PRDHandle_CSC_Strip::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const CscIdHelper * idhelper = VP1DetInfo::cscIDHelper();
+  if (!idhelper)
+    return;
+
+  Identifier id = m_csc->identify();
+
+  SoSeparator * errDetailed  = new SoSeparator;
+  SoSeparator * errSimple  = new SoSeparator;
+  shape_simple  = errSimple;
+
+  double striplength = m_csc->detectorElement()->stripLength( id );
+  if (static_cast<PRDCollHandle_CSC_Strip*>(collHandle())->project())
+    striplength += 300.0;//Fixme: Rough extension for now
+  SoNode* line = common()->nodeManager()->getShapeNode_Strip(striplength);
+  errSimple->addChild(line);
+  errSimple->addChild(common()->nodeManager()->getShapeNode_Cross(10));
+  const double maxCharge = 1e5;
+  //Thickness of highlighed strip
+  //FIXME: the maxCharge/3 is just a quick fix to get a nice presentation
+  //       maybe this should go like sqrt(charge/maxCharge) so that it
+  //       is clear for small charges.
+  //const double stripHeight = (1 + 4*sqrt(m_csc->charge()/maxCharge))*CLHEP::mm; // [1,5]
+  //
+  //       The minimum is chosen equal to the neighbouring strips, such
+  //       that a zero charge will give the same stirp height
+  const double stripHeight = 1*CLHEP::mm; // [1,5]
+
+  const std::vector< float > charges = m_csc->sampleCharges();
+  if (charges.size() == 0 )
+  {
+        // Add arbitrary strip height & draw entire length of strip.
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+      m_csc->detectorElement()->cathodeReadoutPitch(idhelper->chamberLayer( id ),
+      idhelper->measuresPhi( id )), stripHeight));
+  } else {
+    SoSeparator * rdos = new SoSeparator;
+
+    Amg::Vector2D localposCharge;
+
+        // SoTransparency * transparent = new SoTransparency;
+        // transparent->transparency.setValue(0.5);
+        // rdos->addChild( transparent );
+    double chargeLength=striplength/static_cast<double>(charges.size()); // size of one charge cell
+        // std::cout<<"Number of charges="<<charges.size()<<", chargeLength="<<chargeLength<<" striplength="<<striplength<<std::endl;
+    unsigned int i=0;
+    double ypos=(chargeLength-striplength)/2.0;
+    std::vector<float>::const_iterator st = charges.begin();
+    std::vector<float>::const_iterator en = charges.end();
+    double stripPitch=m_csc->detectorElement()->cathodeReadoutPitch(idhelper->chamberLayer( id ),idhelper->measuresPhi( id ));
+    SoTranslation * localtrans = new SoTranslation;
+    localtrans->translation.setValue(0.0,ypos,0.0);
+    rdos->addChild(localtrans);
+
+    for( std::vector<float>::const_iterator it = st; it!=en; it++, i++){
+            // std::cout<<"Charge: "<<i<<" \ty="<<ypos<<" has charge=:"<<*it<<std::endl;  
+      float charge = std::max(1.0f,(*it)); // keep charges positive until I understand if it is okay to be -ve
+      const double stripHeightCharge = (1.0 + 4*sqrt(charge/maxCharge))*CLHEP::mm;
+            // std::cout<<"stripHeightCharge: "<<stripHeightCharge<<std::endl;
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(chargeLength, stripPitch, stripHeightCharge));
+            // ypos+=chargeLength;
+      SoTranslation * localtrans2 = new SoTranslation;
+      localtrans2->translation.setValue(0.0,chargeLength,0.0);
+      rdos->addChild(localtrans2);
+
+    }
+    errDetailed->addChild(rdos);
+  }
+  SoMaterial * mat = new SoMaterial;
+  mat->diffuseColor.setValue(1.0,0,0);
+  errDetailed->addChild(mat);
+  errDetailed->addChild(common()->nodeManager()->getShapeNode_Cross(10));
+
+  shape_detailed = errDetailed;
+}
+
+//____________________________________________________________________
+int PRDHandle_CSC_Strip::regionIndex()
+{
+  //Unique for each station.
+  const MuonGM::MuonStation* station = m_csc->detectorElement()->parentMuonStation();
+  return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+}
+
+//____________________________________________________________________
+QStringList PRDHandle_CSC_Strip::clicked() const
+{
+
+  if (!m_csc)
+    return QStringList("Null PRD");
+  const CscIdHelper * idhelper = VP1DetInfo::cscIDHelper();
+  if (!idhelper)
+    return QStringList("Null PRD");
+
+  Identifier id = m_csc->identify();
+  std::ostringstream os;
+  os << "CscStripPrepData with Identifier ["<<id<<"] = ["<<idhelper->print_to_string(id)
+    <<"] at global position = "<<m_csc->globalPosition()<<", local position = "<<m_csc->localPosition();
+  os << ". Samples = [";
+  for( unsigned int i=0;i<m_csc->sampleCharges().size();++i) os << m_csc->sampleCharges()[i] << " , ";
+
+  os << "]. Time of first sample= "<<m_csc->timeOfFirstSample() << ", sampling time (CLHEP::ns) " 
+    << m_csc->samplingTime() << ", sampling phase " << m_csc->samplingPhase();
+  os << ". RDO list= [";
+  for( unsigned int i=0;i<m_csc->rdoList().size();++i) os << m_csc->rdoList()[i] << " , ";
+  os << "].";
+      // os <<"\n Dump follows:";
+      // os <<"\n--------------";
+    //os << *(m_csc);
+  return QString(os.str().c_str()).split("\n");
+}
+
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MDT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MDT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7d8cdbfebcbe79fe5b38f305dd54c3c19d436ba8
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MDT.cxx
@@ -0,0 +1,128 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_MDT.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/MuonChamberProjectionHelper.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1DetInfo.h"
+
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "TrkSurfaces/CylinderBounds.h"
+#include "TrkSurfaces/Surface.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+
+//____________________________________________________________________
+PRDHandle_MDT::PRDHandle_MDT(PRDCollHandle_MDT*collhandle, const Muon::MdtPrepData*dc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_driftcircle(dc)
+{
+}
+
+//____________________________________________________________________
+void PRDHandle_MDT::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const Trk::CylinderBounds* ccbo = dynamic_cast<const Trk::CylinderBounds*>(&(m_driftcircle->detectorElement()->surface(m_driftcircle->identify()).bounds()));
+  assert(ccbo!=0);
+
+  double radius = m_driftcircle->localPosition()[0];
+  if (radius<0.15)
+    radius = 0.0;//radius is so small it is better to collapse to line
+  double halflength(ccbo->halflengthZ());
+  PRDCollHandle_MDT::PROJECTION projection(static_cast<PRDCollHandle_MDT*>(collHandle())->projection());
+  if (projection!=PRDCollHandle_MDT::NONE) {
+    const double epsilon = 0.15;
+    if (projection==PRDCollHandle_MDT::TOCHAMBERS) {
+      double distanceToFirstEndPlane, distanceToSecondEndPlane;
+      Amg::Transform3D transform(getTransform_CLHEP());
+      Amg::Vector3D tubedir(0.0,0.0,1.0);
+      MuonChamberProjectionHelper::applyTransformToVector( transform, tubedir);
+      if (common()->muonChamberProjectionHelper()
+        ->getDistancesToMDTChamberWallsAlongLine( parentMuonChamberPV(),
+        transform * Amg::Vector3D(0.0,0.0,0.0), tubedir,
+      distanceToFirstEndPlane, distanceToSecondEndPlane, radius )) {
+        if (fabs(distanceToFirstEndPlane-distanceToSecondEndPlane)>0.1*epsilon)
+          std::cout <<"PRDHandle_MDT: Warning tube is not centered in chamber! We should translate the prd object appropriately (todo)."<<std::endl;
+        halflength = std::max(distanceToFirstEndPlane,distanceToSecondEndPlane)+epsilon;
+      } else {
+        std::cout <<"PRDHandle_MDT: Couldn't retrieve data for projections to chamber end planes."<<std::endl;
+        halflength += 500.0;
+      }
+    } else {
+      assert(projection==PRDCollHandle_MDT::TOTUBES);
+      //To end of tubes.
+      halflength += 56.0 + epsilon;
+    }
+  }
+
+  shape_simple = common()->nodeManager()->getShapeNode_DriftTube( halflength, 0.0 );
+  //Detailed shape uses tube (unless negligible radius):
+  if (radius==0.0)
+    shape_detailed = shape_simple;
+  else
+    shape_detailed = common()->nodeManager()->getShapeNode_DriftTube( halflength, radius );
+
+  if ( m_driftcircle->rdoList().size() > 1)
+    VP1Msg::message("Warning: MDT has additional elements in rdoList: NOT IMPLEMENTED");
+}
+
+//____________________________________________________________________
+int PRDHandle_MDT::regionIndex()
+{
+  //Unique for each station.
+  const MuonGM::MuonStation* station = m_driftcircle->detectorElement()->parentMuonStation();
+  return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+}
+
+//____________________________________________________________________
+QStringList PRDHandle_MDT::clicked() const
+{
+    
+    if (!m_driftcircle)
+      return QStringList("Null PRD");
+    const MdtIdHelper * idhelper = VP1DetInfo::mdtIDHelper();
+    if (!idhelper)
+      return QStringList("Null PRD");
+
+    std::ostringstream os;
+    Identifier id = m_driftcircle->identify();
+
+    os << "MdtPrepData with Identifier ["<<id.get_compact()  ;
+    os << "] = [" << (idhelper->print_to_string(id)).c_str()  ;
+    os << "]\n at global position = [" << m_driftcircle->globalPosition()<<"], local position = ["<<m_driftcircle->localPosition()<<"].";
+    os <<"\nDrift radius = "<<m_driftcircle->localPosition()[0]<<" CLHEP::mm. ";
+    os <<"ADC: "<<m_driftcircle->adc();
+    os <<", TDC: "<<m_driftcircle->tdc();
+    std::string status("Status: ");
+    os<<status;
+        
+    QStringList l(QString(os.str().c_str())+driftCircleStatus());
+
+    return l;
+}
+
+//____________________________________________________________________
+QString PRDHandle_MDT::driftCircleStatus() const
+{
+  QString status;
+  switch (m_driftcircle->status()){
+    case  Muon::MdtStatusMasked:
+      status+="Masked"; 
+      break;
+    case Muon::MdtStatusDriftTime:
+      status+="Drift Time";
+      break;
+    case Muon::MdtStatusBeforeSpectrum:
+      status+="Before Spectrum";
+      break;    
+    case Muon::MdtStatusAfterSpectrum:
+      status+="After Spectrum";
+      break;
+    default:
+      status+=" Unknown with value = "+m_driftcircle->status();
+  }
+  return status;
+}
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MM.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MM.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..59a1c0ed881d2a99fed12d1eaa55c222fe9fdf9b
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_MM.cxx
@@ -0,0 +1,147 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/*
+ * update:
+ *
+ * - added MM and sTGC strip lenght from readout geometry
+ *   06.05.2013 - Riccardo BIANCHI <rbianchi@cern.ch>
+ *
+ */
+
+
+#include "VP1PRDSystems/PRDHandle_MM.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/MuonChamberProjectionHelper.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1DetInfo.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+
+#include "TrkSurfaces/CylinderBounds.h"
+#include "TrkSurfaces/Surface.h"
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonReadoutGeometry/MuonChannelDesign.h"
+#include "MuonReadoutGeometry/MMReadoutElement.h"
+#include "MuonReadoutGeometry/sTgcReadoutElement.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+
+//____________________________________________________________________
+PRDHandle_MM::PRDHandle_MM(PRDCollHandle_MM*collhandle, const Muon::MMPrepData*dc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_prd(dc)
+{
+}
+
+//____________________________________________________________________
+void PRDHandle_MM::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  // std::cout<<"m_prd->detectorElement()->surface(m_prd->identify())"<<m_prd->detectorElement()->surface(m_prd->identify())<<std::endl;
+  //const Trk::CylinderBounds* ccbo = dynamic_cast<const Trk::CylinderBounds*>(&(m_prd->detectorElement()->surface(m_prd->identify()).bounds()));
+  //assert(ccbo!=0);
+
+  // const Trk::LocalPosition& localpos = m_prd->localPosition();
+  
+
+  const MmIdHelper * idhelper = VP1DetInfo::mmIDHelper();
+  
+  if (!idhelper) {
+    VP1Msg::messageDebug("idhelper is null. Returning without building the shape...");
+    return;
+  }
+
+  const Muon::MMPrepData * prd = mm();
+
+  if (!prd) {
+    VP1Msg::messageDebug("prd is null. Returning without building the shape...");
+    return;
+  }
+  
+  Identifier id = prd->identify();
+
+  const MuonGM::MMReadoutElement* detEl = prd->detectorElement();
+
+  VP1Msg::messageDebug("Building MM strip...");
+  const MuonGM::MuonChannelDesign* design = detEl->getDesign( id );
+  
+  // using point shape for simple view
+  shape_simple = common()->nodeManager()->getShapeNode_Strip(0.);
+  
+  // local position of the strip
+  Amg::Vector2D locPos;
+  if (!detEl->stripPosition(id,locPos) ) return;
+  if (!design) return;
+    
+  double striplength=design->channelLength(idhelper->channel(id));
+  double stripWidth=design->inputWidth;
+
+  // use rectangular shape for detailed view
+  SoSeparator * errDetailed  = new SoSeparator;
+  errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,std::min(10.0,stripWidth),0.01));
+  
+  shape_detailed = errDetailed;
+
+}
+
+
+//____________________________________________________________________
+int PRDHandle_MM::regionIndex()
+{
+  //Unique for each station.
+  const MuonGM::MuonStation* station = m_prd->detectorElement()->parentMuonStation();
+  if (!station) {VP1Msg::message("Warning - MM station gives null parent. Something is wrong with the geometry!"); return 0;}
+  return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+}
+
+//____________________________________________________________________
+QStringList PRDHandle_MM::clicked() const
+{
+    
+    if (!m_prd)
+      return QStringList("Null PRD");
+    const MdtIdHelper * idhelper = VP1DetInfo::mdtIDHelper();
+    if (!idhelper)
+      return QStringList("Null PRD");
+
+    std::ostringstream os;
+    Identifier id = m_prd->identify();
+
+    os << "MMPrepData with Identifier ["<<id.get_compact()  ;
+    os << "] = [" << (idhelper->print_to_string(id)).c_str()  ;
+    os << "]\n at global position = [" << m_prd->globalPosition()<<"], local position = ["<<m_prd->localPosition()<<"].";
+    // os <<"ADC: "<<m_prd->adc();
+    // os <<", TDC: "<<m_prd->tdc();
+    // std::string status("Status: ");
+    // os<<status;
+        
+    //QStringList l(QString(os.str().c_str())+driftCircleStatus());
+    QStringList l(QString(os.str().c_str()));
+
+    return l;
+}
+
+// //____________________________________________________________________
+// QString PRDHandle_MM::driftCircleStatus() const
+// {
+//   QString status;
+//   switch (m_prd->status()){
+//     case  Muon::MdtStatusMasked:
+//       status+="Masked"; 
+//       break;
+//     case Muon::MdtStatusDriftTime:
+//       status+="Drift Time";
+//       break;
+//     case Muon::MdtStatusBeforeSpectrum:
+//       status+="Before Spectrum";
+//       break;    
+//     case Muon::MdtStatusAfterSpectrum:
+//       status+="After Spectrum";
+//       break;
+//     default:
+//       status+=" Unknown with value = "+m_prd->status();
+//   }
+//   return status;
+// }
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7ff552bb7cec811f5687d75208a5a36cdefa4199
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_Pixel.cxx
@@ -0,0 +1,176 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_Pixel.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/PRDCollHandle_Pixel.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+#include "VP1Utils/VP1ErrorUtils.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoMaterial.h>
+#include <Inventor/nodes/SoLineSet.h>
+
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+
+
+//____________________________________________________________________
+PRDHandle_Pixel::PRDHandle_Pixel(PRDCollHandle_Pixel*collhandle, const InDet::PixelCluster*clus)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_cluster(clus)
+{
+    SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+void PRDHandle_Pixel::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  SoSeparator * errSimple  = new SoSeparator;
+  SoSeparator * errDetailed  = new SoSeparator;
+  
+  if (!isSane()) {
+    std::cerr<<"isSane check failed for PRD: "<<*m_cluster<<std::endl;
+    return;
+  }  
+  errSimple->addChild(common()->nodeManager()->getShapeNode_Point());
+
+  Amg::Vector2D localpos = m_cluster->localPosition();
+  Amg::Vector2D localposHIT = m_cluster->detectorElement()->localPositionOfCell( m_cluster->identify() );
+  SoTranslation * localtrans0 = new SoTranslation;
+
+  double xdiff = localposHIT[Trk::locX]-localpos[Trk::locX];
+  double ydiff = localposHIT[Trk::locY]-localpos[Trk::locY];
+  
+  if (xdiff!=xdiff || ydiff!=ydiff) {
+    std::cerr<<"NaN is in local pos calc"<<std::endl;
+    if (xdiff!=xdiff) std::cerr<<"X diff"<<std::endl;
+    if (ydiff!=ydiff) std::cerr<<"Y diff"<<std::endl;
+    std::cerr<<"localposHIT:"<<localposHIT<<std::endl;
+    std::cerr<<"localpos:"<<localpos<<std::endl;
+    std::cerr<<"localposHIT[Trk::locX]-localpos[Trk::locX]:"<<xdiff<<std::endl;
+    std::cerr<<"localposHIT[Trk::locY]-localpos[Trk::locY]:"<<ydiff<<std::endl;
+    localtrans0->unref();
+    return;
+  } else {
+    localtrans0->translation.setValue(localposHIT[Trk::locX]-localpos[Trk::locX],localposHIT[Trk::locY]-localpos[Trk::locY],0);
+  }
+
+  const std::vector<Identifier> rdolist = m_cluster->rdoList();
+  if (rdolist.size() == 1 || !collHandle()->drawRDOs())
+  {
+    errDetailed->addChild(localtrans0);
+    //FIXME: dont hardcode thickness
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(m_cluster->detectorElement()->etaPitch(),m_cluster->detectorElement()->etaPitch(),m_cluster->detectorElement()->thickness()/10.0));
+
+    //Translate back so errDetailed is left sane (eg. when drawing errors later)
+    SoTranslation * localtransBack = new SoTranslation;
+    localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
+    errDetailed->addChild(localtransBack);
+  } else {
+    SoSeparator * rdos = new SoSeparator;
+    rdos->addChild(localtrans0);
+
+    rdos->addChild(common()->nodeManager()->getShapeNode_Strip(m_cluster->detectorElement()->etaPitch(),m_cluster->detectorElement()->phiPitch( m_cluster->localPosition() ),m_cluster->detectorElement()->thickness()/10.0));
+
+    SoTransparency * transparent = new SoTransparency;
+    transparent->transparency.setValue(0.5);
+    rdos->addChild( transparent );
+    Amg::Vector2D localposOLD = localposHIT;
+    std::vector<Identifier>::const_iterator st = rdolist.begin();
+    std::vector<Identifier>::const_iterator en = rdolist.end();
+    for( std::vector<Identifier>::const_iterator it = st; it!=en; it++)
+    {
+      if (*it == m_cluster->identify() )
+        continue;
+
+      const Amg::Vector2D localposRDO = m_cluster->detectorElement()->localPositionOfCell(*it);
+
+      SoTranslation * localtrans = new SoTranslation;
+      localtrans->translation.setValue(localposRDO[Trk::locX]-localposOLD[Trk::locX],
+                                       localposRDO[Trk::locY]-localposOLD[Trk::locY],
+                                       0);
+      rdos->addChild(localtrans);
+
+      //FIXME: dont hardcode thickness
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(m_cluster->detectorElement()->etaPitch(),
+                     m_cluster->detectorElement()->phiPitch( m_cluster->localPosition() ),
+                     m_cluster->detectorElement()->thickness()/10.0));
+
+      localposOLD = localposRDO;
+    }
+    errDetailed->addChild(rdos);
+  }
+
+  const double settingsSIGMASCALE=3.0;
+  if (collHandle()->drawErrors())
+  {
+    SoGroup * gr = createErrorAtPixelCluster( settingsSIGMASCALE, 36);
+    if (gr->getNumChildren()==0) {
+      gr->unref();
+      std::cerr<<"Something seems to have gone wrong: no error added. Dumping PRD: "<<*m_cluster<<std::endl;
+    } else {
+      errSimple->addChild( gr );
+      errDetailed->addChild( gr );
+    }
+  }
+
+  //FIXME: hardcoded colour  
+  SoMaterial * mat = new SoMaterial;
+  mat->diffuseColor.setValue(1.0,0,0);
+  errDetailed->addChild(mat);
+  errDetailed->addChild(common()->nodeManager()->getShapeNode_Cross(0.1));
+
+  shape_simple = errSimple;
+  shape_detailed = errDetailed;
+}
+
+//____________________________________________________________________
+int PRDHandle_Pixel::regionIndex() { //instead of identifier juggling, we simply discretize by center coordinate.
+  static const double l=200.0;//CLHEP::mm
+  return       static_cast<int>(m_cluster->detectorElement()->center().z()/l)
+         +1000*static_cast<int>(m_cluster->detectorElement()->center().y()/l)
+      +1000000*static_cast<int>(m_cluster->detectorElement()->center().x()/l);
+  //Fixme: Use identifiers instead for more intuitive regions.
+}
+
+
+//____________________________________________________________________
+SoGroup * PRDHandle_Pixel::createErrorAtPixelCluster( const double& sigmaScale,
+						      const int& numPoints ) const
+{
+  SoGroup * ellipseGrp = new SoSeparator;
+
+  //FIXME: Try to automatically use the pixel height as in PRDHandle_Pixel.cxx (this is just copy paste)
+  // change the last true to false above to get rid of one of the error ellipses
+//  VP1ErrorUtils::addRotatedErrorEllipse(ellipseGrp, m_cluster->localErrorMatrix().covariance(), sigmaScale, numPoints,m_cluster->detectorElement()->thickness()/20.0 + 0.001, true);
+  VP1ErrorUtils::addRotatedErrorEllipse(ellipseGrp, m_cluster->localCovariance(), sigmaScale, numPoints,m_cluster->detectorElement()->thickness()/20.0 + 0.001, true);
+
+  return ellipseGrp;
+}
+
+bool PRDHandle_Pixel::isSane() const {
+  // check for NaNs
+  bool isSane=true;
+  const InDet::PixelCluster * prd =cluster();
+  if (!prd) return false;
+  if (prd->localPosition()[0]!=prd->localPosition()[0] || prd->localPosition()[1]!=prd->localPosition()[1]){
+    isSane=false;
+    std::cerr<<"For pixel cluster with Id="<<prd->identify()<<", localposition is not sane:"<<(prd->localPosition())<<std::endl;
+  }
+  bool etaNan = std::isnan(m_cluster->detectorElement()->etaPitch());
+  bool phiNan = std::isnan(m_cluster->detectorElement()->phiPitch( m_cluster->localPosition()));
+  bool thickNan = std::isnan(m_cluster->detectorElement()->thickness());
+
+  if ( etaNan || phiNan || thickNan){
+    std::cerr<<"For pixel cluster with Id="<<prd->identify()<<", NaN is in detectorElement pitches "<<std::endl;
+    if (etaNan) std::cerr<<" - eta (which is returning "<<m_cluster->detectorElement()->etaPitch()<<")"<<std::endl;
+    if (phiNan) std::cerr<<" - phi (which is returning "<<m_cluster->detectorElement()->phiPitch(m_cluster->localPosition())<<")"<<std::endl;
+    if (thickNan) std::cerr<<" - thickness (which is returning "<<m_cluster->detectorElement()->thickness()<<")"<<std::endl;
+  }
+  
+  return isSane;
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_RPC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_RPC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b778378377f579685ceacb88de26a07dfc330832
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_RPC.cxx
@@ -0,0 +1,149 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_RPC.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+
+#include "MuonReadoutGeometry/MuonStation.h"
+#include "MuonIdHelpers/RpcIdHelper.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+#include <sstream>
+
+//____________________________________________________________________
+PRDHandle_RPC::PRDHandle_RPC(PRDCollHandle_RPC*collhandle, const Muon::RpcPrepData*rpc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_rpc(rpc)
+{
+    SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+void PRDHandle_RPC::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const RpcIdHelper * idhelper = VP1DetInfo::rpcIDHelper();
+  if (!idhelper)
+    return;
+
+  Identifier id = m_rpc->identify();
+  SoSeparator * errDetailed  = new SoSeparator;
+
+  int measPhi = idhelper->measuresPhi( id );
+  double striplength = m_rpc->detectorElement()->StripLength(measPhi);
+  shape_simple = common()->nodeManager()->getShapeNode_Strip(striplength);
+
+
+  // Translation from objects local position to the strip position
+  const Amg::Vector2D& localpos = m_rpc->localPosition();
+  const Amg::Vector3D& globalposHIT = m_rpc->detectorElement()->stripPos( id );
+  // get local position on wire plane, here we have to use a tolarance as the wire plane is located 2.5 CLHEP::mm
+  // from the strip plane
+  double tolerance = 3.;
+//  const Amg::Vector2D * localposHIT = m_rpc->detectorElement()->surface( id ).globalToLocal(globalposHIT,tolerance);
+  const Amg::Vector2D * localposHIT = m_rpc->detectorElement()->surface( id ).Trk::Surface::globalToLocal(globalposHIT,tolerance); // TODO: this is a workaround because of missing function in Trak::PlaneSurface.h
+  if( !localposHIT )
+  {
+    localposHIT = new Amg::Vector2D;
+    VP1Msg::message("Warning: Local wire position is NULL");
+  }
+  SoTranslation * localtrans0 = new SoTranslation;
+  localtrans0->translation.setValue((*localposHIT)[Trk::locX]-localpos[Trk::locX],(*localposHIT)[Trk::locY]-localpos[Trk::locY],0);
+
+  bool project(static_cast<PRDCollHandle_RPC*>(collHandle())->project());
+
+  const std::vector<Identifier> rdolist = m_rpc->rdoList();
+  if (rdolist.size() == 1 || !collHandle()->drawRDOs())
+  {
+    errDetailed->addChild(localtrans0);
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(project ? striplength+0.2 : striplength,
+							       m_rpc->detectorElement()->StripWidth(measPhi),//strip width
+							       project ? 2*(6.85+0.1) : 0.8));//strip thickness - hardcoded to something (hopefully) reasonable.
+    //Translate back so errDetailed is left sane (eg. when drawing errors later)
+    SoTranslation * localtransBack = new SoTranslation;
+    localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
+    errDetailed->addChild(localtransBack);
+  } else {
+    VP1Msg::message("Warning: RPC has additional elements in rdoList: THIS HAS NEVER BEEN TESTED");
+    SoSeparator * rdos = new SoSeparator;
+    rdos->addChild(localtrans0);
+
+    rdos->addChild(common()->nodeManager()->getShapeNode_Strip(project ? striplength+0.2 : striplength,
+							       m_rpc->detectorElement()->StripWidth(measPhi),//strip width
+							       project ? 2*(6.85+0.1) : 0.8));//strip thickness - hardcoded to something (hopefully) reasonable.
+
+    SoTransparency * transparent = new SoTransparency;
+    transparent->transparency.setValue(0.5);
+    rdos->addChild( transparent );
+    Amg::Vector2D localposOLD = *localposHIT;
+    std::vector<Identifier>::const_iterator st = rdolist.begin();
+    std::vector<Identifier>::const_iterator en = rdolist.end();
+    for( std::vector<Identifier>::const_iterator it = st; it!=en; it++)
+    {
+      if (*it == id )
+        continue;
+      const Amg::Vector3D& globalposRDO = m_rpc->detectorElement()->stripPos( *it );
+//      const Amg::Vector2D * localposRDO = m_rpc->detectorElement()->surface( *it ).globalToLocal(globalposRDO,tolerance);
+      const Amg::Vector2D * localposRDO = m_rpc->detectorElement()->surface( *it ).Trk::Surface::globalToLocal(globalposRDO,tolerance); // TODO: this is a workaround because of missing function in Trak::PlaneSurface.h
+      if (!localposRDO)
+      {
+        VP1Msg::message("Warning: Local wire position is NULL");
+        continue;
+      }
+
+      SoTranslation * localtrans = new SoTranslation;
+      localtrans->translation.setValue((*localposRDO)[Trk::locX]-localposOLD[Trk::locX],(*localposRDO)[Trk::locY]-localposOLD[Trk::locY],0);
+      rdos->addChild(localtrans);
+
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(project ? striplength+0.2 : striplength,
+							       m_rpc->detectorElement()->StripWidth(measPhi),//strip width
+							       project ? 2*(6.85+0.1) : 0.8));
+
+      localposOLD = *localposRDO;
+      delete localposRDO;
+    }
+    errDetailed->addChild(rdos);
+  }
+  delete localposHIT;
+  shape_detailed = errDetailed;
+}
+
+//____________________________________________________________________
+int PRDHandle_RPC::regionIndex()
+{
+  //Unique for each station.
+  const MuonGM::MuonStation* station = m_rpc->detectorElement()->parentMuonStation();
+  return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+}
+
+//____________________________________________________________________
+QStringList PRDHandle_RPC::clicked() const
+{
+    if (!m_rpc)
+      return QStringList("Null PRD");
+    const RpcIdHelper * idhelper = VP1DetInfo::rpcIDHelper();
+    if (!idhelper)
+      return QStringList("Null PRD");
+      std::ostringstream os;
+      Identifier id = m_rpc->identify();
+
+      os << "RpcPrepData with Identifier ["<<id.get_compact()  ;
+      os << "] = [" << (idhelper->print_to_string(id)).c_str()  ;
+      os << "]\n at global position = [" << m_rpc->globalPosition()<<"], local position = ["<<m_rpc->localPosition()<<"].";
+      os <<"\nTime: "<<m_rpc->time();
+      os <<", Trigger info: "<<m_rpc->triggerInfo();
+      os <<", Ambiguity Flag: 0x"<<std::hex<<m_rpc->ambiguityFlag()<<std::dec;
+      os << ". Rdo list= [";
+      for( unsigned int i=0;i<m_rpc->rdoList().size();++i) os << m_rpc->rdoList()[i] << " , ";
+      os << "].";
+      QStringList l(QString(os.str().c_str()));
+      //    if (detailed) l << PRDHandleBase::clicked() ;
+
+      return l;
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7deae89e94c278a395798381464e7bfe601a0842
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SCT.cxx
@@ -0,0 +1,106 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_SCT.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/PRDCollHandle_SCT.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoMaterial.h>
+
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+
+//____________________________________________________________________
+PRDHandle_SCT::PRDHandle_SCT(PRDCollHandle_SCT*collhandle, const InDet::SCT_Cluster*clus)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_cluster(clus)
+{
+    SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+void PRDHandle_SCT::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  double striplength = m_cluster->detectorElement()->etaPitch();
+
+  //SoSeparator * errSimple  = new SoSeparator;
+  SoSeparator * errDetailed  = new SoSeparator;
+
+  //errSimple->addChild(common()->nodeManager()->getShapeNode_Strip(striplength));
+  shape_simple=common()->nodeManager()->getShapeNode_Strip(striplength);
+
+  const Amg::Vector2D& localpos = m_cluster->localPosition();
+  const Amg::Vector2D& localposHIT = m_cluster->detectorElement()->localPositionOfCell( m_cluster->identify() );
+  SoTranslation * localtrans0 = new SoTranslation;
+  localtrans0->translation.setValue(localposHIT[Trk::locX]-localpos[Trk::locX],localposHIT[Trk::locY]-localpos[Trk::locY],0);
+
+  const std::vector<Identifier> rdolist = m_cluster->rdoList();
+  if (rdolist.size() == 1 || !collHandle()->drawRDOs())
+  {
+    errDetailed->addChild(localtrans0);
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+					     m_cluster->detectorElement()->phiPitch( m_cluster->localPosition() ),//strip width
+					     m_cluster->detectorElement()->thickness()*3.0));
+    //strip thickness - scaled up by factor of 3 (looks better)
+    //Fixme: Should we drop this upscaling of thickness?
+
+    //Translate back so errDetailed is left sane (eg. when drawing errors later)
+    SoTranslation * localtransBack = new SoTranslation;
+    localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
+    errDetailed->addChild(localtransBack);
+  } else
+  {
+    SoSeparator * rdos = new SoSeparator;
+    rdos->addChild(localtrans0);
+
+    rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+					     m_cluster->detectorElement()->phiPitch( m_cluster->localPosition() ),//strip width
+					     m_cluster->detectorElement()->thickness()*3.0));
+    //strip thickness - scaled up by factor of 3 (looks better)
+    //Fixme: Should we drop this upscaling of thickness?
+
+    SoTransparency * transparent = new SoTransparency;
+    transparent->transparency.setValue(0.5);
+    rdos->addChild( transparent );
+    Amg::Vector2D localposOLD = localposHIT;
+    std::vector<Identifier>::const_iterator st = rdolist.begin();
+    std::vector<Identifier>::const_iterator en = rdolist.end();
+    for( std::vector<Identifier>::const_iterator it = st; it!=en; it++)
+    {
+      if (*it == m_cluster->identify() )
+        continue;
+
+      const Amg::Vector2D& localposRDO = m_cluster->detectorElement()->localPositionOfCell(*it);
+
+      SoTranslation * localtrans = new SoTranslation;
+      localtrans->translation.setValue(localposRDO[Trk::locX]-localposOLD[Trk::locX],localposRDO[Trk::locY]-localposOLD[Trk::locY],0);
+      rdos->addChild(localtrans);
+
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+					     m_cluster->detectorElement()->phiPitch( m_cluster->localPosition() ),//strip width
+					     m_cluster->detectorElement()->thickness()*3.0));
+
+      localposOLD = localposRDO;
+    }
+    errDetailed->addChild(rdos);
+  }
+
+//  shape_simple = errSimple;
+  shape_detailed = errDetailed;
+}
+
+//____________________________________________________________________
+int PRDHandle_SCT::regionIndex()
+{
+  //instead of identifier juggling, we simply discretize by center coordinate.
+  static const double l=100.0;//CLHEP::mm
+  return       static_cast<int>(m_cluster->detectorElement()->center().z()/l)
+         +1000*static_cast<int>(m_cluster->detectorElement()->center().y()/l)
+      +1000000*static_cast<int>(m_cluster->detectorElement()->center().x()/l);
+  //Fixme: Use identifiers instead for more intuitive regions.
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SpacePoint.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SpacePoint.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ef1264f840cbdd293353c25915648a337e1fdc28
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_SpacePoint.cxx
@@ -0,0 +1,68 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class PRDHandle_SpacePoint              //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: September 2008                           //
+//                                                            //
+//           update: March 2014 Riccardo.Maria.Bianchi@cern.ch//
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/PRDHandle_SpacePoint.h"
+#include "VP1PRDSystems/PRDCollHandle_SpacePoints.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+
+#include <Inventor/nodes/SoPointSet.h>
+#include <Inventor/nodes/SoVertexProperty.h>
+
+//____________________________________________________________________
+class PRDHandle_SpacePoint::Imp {
+public:
+};
+
+
+//____________________________________________________________________
+PRDHandle_SpacePoint::PRDHandle_SpacePoint(PRDCollHandle_SpacePoints* ch,const Trk::SpacePoint* sp)
+  : PRDHandleBase(ch), m_sp(sp), d(new Imp)
+{
+}
+
+//____________________________________________________________________
+PRDHandle_SpacePoint::~PRDHandle_SpacePoint()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+int PRDHandle_SpacePoint::regionIndex() {
+  static const double l=isSCT() ? 100.0 : 200.0;//CLHEP::mm
+  Amg::Vector3D c(center());
+  return       static_cast<int>(c.z()/l)
+         +1000*static_cast<int>(c.y()/l)
+      +1000000*static_cast<int>(c.x()/l);
+  //Fixme: Use identifiers instead for more intuitive regions.
+}
+
+//____________________________________________________________________
+void PRDHandle_SpacePoint::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  if (getSecondPRD()) {
+    Amg::Transform3D prdtransform(getTransform_CLHEP());
+    Amg::Vector3D p((prdtransform.inverse())*(m_sp->globalPosition()));
+    SoPointSet       * points    = new SoPointSet;
+    SoVertexProperty * vertices = new SoVertexProperty;
+    vertices->vertex.set1Value(0,p.x(),p.y(),p.z());
+    points->numPoints=1;
+    points->vertexProperty.setValue(vertices);
+    shape_simple = points;
+  } else {
+    shape_simple = common()->nodeManager()->getShapeNode_Point();
+  }
+  shape_detailed = shape_simple;
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f4e30fd42dfb97265dcec96ef2f881d7a27da983
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx
@@ -0,0 +1,218 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_TGC.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1LinAlgUtils.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoTransform.h>
+
+#include "MuonReadoutGeometry/MuonStation.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+#include "GeoPrimitives/CLHEPtoEigenConverter.h"
+#include "GeoPrimitives/EulerAnglesHelpers.h"
+
+
+//____________________________________________________________________
+PRDHandle_TGC::PRDHandle_TGC(PRDCollHandle_TGC*collhandle, const Muon::TgcPrepData*tgc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_tgc(tgc)
+{
+  SoTransparency::initClass();
+}
+
+//____________________________________________________________________
+SoTransform * PRDHandle_TGC::createTransform() const
+{
+  const TgcIdHelper * idhelper = VP1DetInfo::tgcIDHelper();
+  const Muon::TgcPrepData * prd = tgc();
+  if (!prd || !idhelper) {
+    return new SoTransform;
+  }
+
+  const Trk::Surface& theSurface = prd->detectorElement()->surface(prd->identify());
+  SoTransform * theHitTransform =0;
+   if (idhelper->isStrip( prd->identify() )){
+    
+    int stripNo = idhelper->channel(prd->identify()); 
+    int gasGap  = idhelper->gasGap(prd->identify()); 
+    
+    const MuonGM::TgcReadoutElement* detEl = prd->detectorElement(); 
+    
+    // calculate two points along the tgc phi strip in the local tgc reference frame 
+    Amg::Vector3D lposTGC = detEl->localChannelPos(prd->identify());
+    double z_shift = lposTGC.z()+10; 
+    double locy_shift = detEl->stripCtrX(gasGap, stripNo, z_shift ); 
+    if (0 < detEl->getStationEta()) { 
+    locy_shift *= -1.; // Needed because the coord system for  stripCtrX is flipped compared to localChannelPos (!)
+    } 
+    Amg::Vector3D lpos_shift(lposTGC.x(),locy_shift,z_shift);
+    
+    const Amg::Transform3D tgcTrans = Amg::CLHEPTransformToEigen(detEl->getMaterialGeom()->getAbsoluteTransform());
+    Amg::Vector3D gpos = tgcTrans*lposTGC;
+    Amg::Vector3D gpos_shift = tgcTrans*lpos_shift;
+    
+    const Amg::Vector2D* locPos1 =  theSurface.globalToLocal(gpos,100);
+    const Amg::Vector2D* locPos2 = theSurface.globalToLocal(gpos_shift,100);
+    
+    if (!locPos1 || !locPos2) {
+      VP1Msg::message("PRDHandle_TGC::createTransform() Warning: global to local failed - cannot make transform!");
+      delete locPos1; delete locPos2;
+      return 0;
+    }
+    
+    Amg::Vector2D difPos = (*locPos2) - (*locPos1);
+    // std::cout << " Strip pos " << *locPos1 << " shifted " << *locPos2 << " dif " << difPos << std::endl;
+    double tmp= difPos[Trk::locY] / sqrt(pow(difPos[Trk::locX],2)+pow(difPos[Trk::locY],2));
+    delete locPos1; delete locPos2;
+    
+    tmp = (tmp>1.0) ? 1.0 : tmp;
+    tmp = (tmp<-1.0) ? -1.0 : tmp;
+    double angle = atan2( difPos[Trk::locX],  difPos[Trk::locY]);
+     // for phi strips, use sinstereo to get correct orientation
+     Amg::RotationMatrix3D localRot;
+     localRot.setIdentity();
+
+     // std::ostream os;
+     // std::cout<<localRot.print(os)<<std::endl;
+     //double angle  = M_PI/2.0 - asin(prd->detectorElement()->sinStereo(prd->identify())) ;
+     // double angle  = asin(prd->detectorElement()->sinStereo(prd->identify())) ;
+     // trying by trial and error to set right component of matrix!
+     // setting theta=PI/4 rotated strips 45deg around z axis, but also a bit around x and y too! So clearly not working as expected.
+      
+    // localRot.setPhi (M_PI/4); 
+    
+     if (0 < detEl->getStationEta()) { 
+       Amg::setPhi (localRot, angle);
+     } else {
+       Amg::setPhi (localRot, -angle);
+     }
+     // std::cout<<localRot.print(os)<<std::endl;
+       // localRot.setPhi (angle); 
+     
+     // VP1Msg::message(QString::number(prd->identify().get_compact())+": angle="+QString::number(angle));
+     localRot*=theSurface.transform().rotation ();
+
+     Amg::Transform3D trans (localRot, theSurface.transform().translation());
+     // Trk::GlobalDirection difPosGlobal = gpos_shift-gpos;
+     // HepTransform3D toLocal = trans.inverse();
+     // Trk::GlobalDirection difPosLocal = toLocal*difPosGlobal;
+     // Trk::GlobalDirection difPosLocal2 = trans*difPosGlobal;
+     
+     // std::cout << " global strip direction " << difPosGlobal << " local " << difPosLocal << " local2 " << difPosLocal2 << std::endl;
+     theHitTransform = VP1LinAlgUtils::toSoTransform(trans);
+   } else {
+     // eta strips just use surface orientiation
+     theHitTransform = VP1LinAlgUtils::toSoTransform(theSurface.transform());
+   }
+
+   const Amg::Vector3D* theHitGPos= theSurface.localToGlobal(prd->localPosition());
+   theHitTransform->translation.setValue((*theHitGPos)[0], (*theHitGPos)[1], (*theHitGPos)[2]);
+   delete theHitGPos;
+   return theHitTransform;
+}
+
+//____________________________________________________________________
+void PRDHandle_TGC::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const TgcIdHelper * idhelper = VP1DetInfo::tgcIDHelper();
+  if (!idhelper)
+    return;
+
+  Identifier id = m_tgc->identify();
+
+  int plane = idhelper->gasGap( id );
+  int strip = idhelper->channel( id );
+  int isStrip = idhelper->isStrip( id );
+
+  double striplength =0.0, stripWidth = 0.0;
+
+  if (isStrip){
+    striplength = m_tgc->detectorElement()->stripLength(plane, strip);
+    stripWidth = m_tgc->detectorElement()->stripWidth(plane, strip);
+  } else {    
+    striplength = m_tgc->detectorElement()->gangShortWidth(plane, strip);
+    stripWidth = m_tgc->detectorElement()->gangLength(plane, strip);
+  }
+
+  if (static_cast<PRDCollHandle_TGC*>(collHandle())->project())
+    striplength += 300.0;//Fixme: Rough extension for now
+
+  shape_simple = common()->nodeManager()->getShapeNode_Strip(striplength);
+
+  const bool settingsShowRDOs = true; //FIXME: get from controller
+  SoSeparator * errDetailed  = new SoSeparator;
+  const std::vector<Identifier> rdolist = m_tgc->rdoList();
+  if (rdolist.size() == 1 || !settingsShowRDOs)
+  {
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+      std::max(10.0,stripWidth), //strip width -> fixme: std::max hack for now since stripWidth returns 0.0
+      3*0.8)); //strip thickness - hardcoded to be ~= the gas gap
+    } else
+    {
+      VP1Msg::message("Warning: TGC has additional elements in rdoList: THIS HAS NEVER BEEN TESTED");
+      SoSeparator * rdos = new SoSeparator;
+
+      const Amg::Vector3D& globalposHIT = m_tgc->detectorElement()->channelPos( id );
+    // get local position on wire plane, here we have to use a tolarance as the wire plane is located 2.5 CLHEP::mm
+    // from the strip plane
+      double tolerance = 3.;
+      const Amg::Vector2D * localposHIT = m_tgc->detectorElement()->surface( id ).Trk::Surface::globalToLocal(globalposHIT,tolerance);
+      if( !localposHIT )
+      {
+        localposHIT = new Amg::Vector2D;
+        VP1Msg::message("Warning: Local wire position is NULL");
+      }
+
+      rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+        std::max(10.0,stripWidth), //strip width -> fixme: std::max hack for now since stripWidth returns 0.0
+        3*0.8)); //strip thickness - hardcoded to be ~= the gas gap
+
+      SoTransparency * transparent = new SoTransparency;
+      transparent->transparency.setValue(0.5);
+      rdos->addChild( transparent );
+      Amg::Vector2D localposOLD = *localposHIT;
+      std::vector<Identifier>::const_iterator st = rdolist.begin();
+      std::vector<Identifier>::const_iterator en = rdolist.end();
+      for( std::vector<Identifier>::const_iterator it = st; it!=en; it++)
+      {
+        if (*it == id )
+          continue;
+        const Amg::Vector3D& globalposRDO = m_tgc->detectorElement()->channelPos( *it );
+        const Amg::Vector2D * localposRDO = m_tgc->detectorElement()->surface( *it ).Trk::Surface::globalToLocal(globalposRDO,tolerance);
+        if (!localposRDO)
+        {
+          VP1Msg::message("Warning: Local wire position is NULL");
+          continue;
+        }
+
+        SoTranslation * localtrans = new SoTranslation;
+        localtrans->translation.setValue((*localposRDO)[Trk::locX]-localposOLD[Trk::locX],(*localposRDO)[Trk::locY]-localposOLD[Trk::locY],0);
+        rdos->addChild(localtrans);
+
+        rdos->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,
+          std::max(10.0,stripWidth), //strip width -> fixme: std::max hack for now since stripWidth returns 0.0
+          3*0.8)); //strip thickness - hardcoded to be ~= the gas gap
+
+        localposOLD = *localposRDO;
+        delete localposRDO;
+      }
+      errDetailed->addChild(rdos);
+      delete localposHIT;
+    }
+    shape_detailed = errDetailed;
+  }
+
+//____________________________________________________________________
+  int PRDHandle_TGC::regionIndex()
+  {
+  //Unique for each station.
+    const MuonGM::MuonStation* station = m_tgc->detectorElement()->parentMuonStation();
+    return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+  }
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TRT.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TRT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d6f5c916914736b0db95ca7bdc0e552b74158a3f
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TRT.cxx
@@ -0,0 +1,217 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_TRT.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Utils/VP1LinAlgUtils.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1GuideLineSystems/InDetProjHelper.h"
+#include "VP1GuideLineSystems/InDetProjParams.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTransform.h>
+#include <Inventor/nodes/SoTranslation.h>
+
+#include "InDetIdentifier/TRT_ID.h"
+#include "TrkSurfaces/CylinderBounds.h"
+#include "TrkSurfaces/Surface.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+//____________________________________________________________________
+PRDHandle_TRT::PRDHandle_TRT(PRDCollHandle_TRT*collhandle, const InDet::TRT_DriftCircle*dc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_driftcircle(dc)
+{
+}
+
+//____________________________________________________________________
+void PRDHandle_TRT::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+  const Trk::CylinderBounds* ccbo = dynamic_cast<const Trk::CylinderBounds*>(&(m_driftcircle->detectorElement()->surface(m_driftcircle->identify()).bounds()));
+  assert(ccbo!=0);
+  const double radius = m_driftcircle->localPosition()[0];
+  const double halflength = ccbo->halflengthZ();
+  const double mintuberadius = 0.1;
+
+  if ( m_driftcircle->rdoList().size() > 1)
+    VP1Msg::message("Warning: TRT has additional elements in rdoList: NOT IMPLEMENTED");
+
+  const PRDCollHandle_TRT* trtcollhandle(static_cast<PRDCollHandle_TRT*>(collHandle()));
+
+  if (trtcollhandle->project()) {
+
+    ////////////////////
+    //  Projections:  //
+    ////////////////////
+
+    const InDetProjFlags::InDetProjPartsFlags projparts(trtcollhandle->appropriateProjections());
+    bool inner,outer;
+    if (isBarrel()) {
+      inner = (projparts&InDetProjFlags::BarrelCentral);
+      outer = (projparts&(isPositiveZ()?InDetProjFlags::BarrelPositive:InDetProjFlags::BarrelNegative));
+    } else {
+      const bool posz(isPositiveZ());
+      if ( (projparts&InDetProjFlags::TRT_EndCapZToRCentral)
+	   || (projparts&(posz?InDetProjFlags::TRT_EndCapZToRPositive:InDetProjFlags::TRT_EndCapZToRNegative)) ) {
+	//Special TRT EndCap Z->R projections.
+
+	//Find center of tube:
+	Amg::Transform3D prdtransform(getTransform_CLHEP());
+	Amg::Vector3D center(prdtransform*Amg::Vector3D(0,0,0));
+
+	// --> Get points for special projections
+	const double eps = InDetProjParams::trt_data_disttosurface_epsilon();
+	std::vector<Amg::Vector3D > points;
+
+	if (posz) {
+	  if ( projparts & InDetProjFlags::TRT_EndCapZToRPositive ) {
+	    Amg::Vector3D p = center;
+	    InDetProjHelper::transformECPointToZPlane_specialZtoR(p,
+								  InDetProjParams::trt_barrel_posneg_z()-0.5* InDetProjParams::surfacethickness() - eps,
+								  InDetProjParams::trt_endcap_zasr_innerradius(),
+								  InDetProjParams::trt_endcap_zasr_endcapz_begin(),
+								  InDetProjParams::trt_endcap_zasr_squeezefact());
+	    points.push_back(p);
+	  }
+	  if ( projparts & InDetProjFlags::TRT_EndCapZToRCentral ) {
+	    Amg::Vector3D p = center;
+	    //Fixme: Use same parameters here as in InDetProjHelper!!
+	    InDetProjHelper::transformECPointToZPlane_specialZtoR(p,
+								  0.5* InDetProjParams::surfacethickness() + eps,
+								  InDetProjParams::trt_endcap_zasr_innerradius(),
+								  InDetProjParams::trt_endcap_zasr_endcapz_begin(),
+								  InDetProjParams::trt_endcap_zasr_squeezefact() );
+	    points.push_back(p);
+	  }
+	} else {
+	  if ( projparts & InDetProjFlags::TRT_EndCapZToRNegative ) {
+	    Amg::Vector3D p = center;
+	    InDetProjHelper::transformECPointToZPlane_specialZtoR(p,
+								  - InDetProjParams::trt_barrel_posneg_z()+0.5* InDetProjParams::surfacethickness() + eps,
+								  InDetProjParams::trt_endcap_zasr_innerradius(),
+								  InDetProjParams::trt_endcap_zasr_endcapz_begin(),
+								  InDetProjParams::trt_endcap_zasr_squeezefact());
+	    points.push_back(p);
+	  }
+	  if ( projparts & InDetProjFlags::TRT_EndCapZToRCentral ) {
+	    Amg::Vector3D p = center;
+	    InDetProjHelper::transformECPointToZPlane_specialZtoR(p,
+								  -0.5* InDetProjParams::surfacethickness() - eps,
+								  InDetProjParams::trt_endcap_zasr_innerradius(),
+								  InDetProjParams::trt_endcap_zasr_endcapz_begin(),
+								  InDetProjParams::trt_endcap_zasr_squeezefact());
+	    points.push_back(p);
+	  }
+	}
+	// --> Build scene objects for special projections
+
+	const unsigned npoints = points.size();
+	if (npoints<1||npoints>2) {
+	  collHandle()->message("PRDHandle_TRT::buildShapes ERROR: Unexpected number of points in special endcap projections!!");
+	} else {
+	  SoSeparator * sepsimple = new SoSeparator;
+	  SoTransform * transf1(VP1LinAlgUtils::toSoTransform((prdtransform.inverse())
+							      * Amg::Translation3D(points.at(0).x(),points.at(0).y(),points.at(0).z())));
+	  SoNode* point = common()->nodeManager()->getShapeNode_Point();
+	  sepsimple->addChild(transf1);
+	  sepsimple->addChild(point);
+	  SoTranslation * transf2(0);
+	  if (npoints==2) {
+ 	    transf2 = new SoTranslation;
+	    transf2->translation.setValue(points[1].x()-points[0].x(),points[1].y()-points[0].y(),points[1].z()-points[0].z());
+	    sepsimple->addChild(transf2);
+	    sepsimple->addChild(point);
+	  }
+	  shape_simple = sepsimple;
+
+	  if (radius<mintuberadius) {
+	    shape_detailed = shape_simple;
+	    return;
+	  }
+	  SoSeparator * sepdetailed = new SoSeparator;
+	  SoNode* disc = common()->nodeManager()->getShapeNode_DriftDisc(radius);
+	  sepdetailed->addChild(transf1);
+	  sepdetailed->addChild(disc);
+	  if (npoints==2) {
+	    sepdetailed->addChild(transf2);
+	    sepdetailed->addChild(disc);
+	  }
+	  shape_detailed = sepdetailed;
+	  return;
+	}
+	inner = false;outer = false;
+	//end special projections
+      } else {
+	inner = (projparts&(posz?InDetProjFlags::EndCapInnerPositive:InDetProjFlags::EndCapInnerNegative));
+	outer = (projparts&(posz?InDetProjFlags::EndCapOuterPositive:InDetProjFlags::EndCapOuterNegative));
+      }
+    }//end endcap
+    if (!inner&&!outer) {
+      collHandle()->message("PRDHandle_TRT::buildShapes ERROR: Inconsistent projection settings! Won't project!");
+    } else {
+      //Perform projections
+      shape_simple = common()->nodeManager()->getShapeNode_ProjectedDriftTube( halflength, 0.0, inner, outer );
+      if (radius<mintuberadius)
+	shape_detailed = shape_simple;
+      else
+	shape_detailed = common()->nodeManager()->getShapeNode_ProjectedDriftTube( halflength, radius, inner, outer );
+      return;
+    }
+  }//endif projections
+
+  ///////////////////////
+  //  No projections:  //
+  ///////////////////////
+
+  shape_simple = common()->nodeManager()->getShapeNode_DriftTube( halflength, 0.0 );
+  if (radius<mintuberadius)
+    shape_detailed = shape_simple;
+  else
+    shape_detailed = common()->nodeManager()->getShapeNode_DriftTube( halflength, radius );
+
+}
+
+//____________________________________________________________________
+int PRDHandle_TRT::regionIndex()
+{
+  const TRT_ID * id_helper = VP1DetInfo::trtIDHelper();
+  if (!id_helper)
+    return 0;
+  Identifier id = m_driftcircle->identify();
+  return id_helper->barrel_ec(id)*10000+id_helper->layer_or_wheel(id)*100+(id_helper->phi_module(id)%4);
+}
+// MuonGM::MuonDetectorManager::getMdtReadoutElement ()
+
+//____________________________________________________________________
+QStringList PRDHandle_TRT::clicked() const
+{
+  QStringList l;
+  l << PRDHandleBase::clicked();
+  const unsigned int data = m_driftcircle->getWord();
+
+  QString s;
+  int i;
+  for (i = 26; i >=0; i--)
+  {
+    if (i!=26&&(i+1)%9==0)
+      s+=" ";
+    s += ( data & (0x1<<i) ? "1" : "0");
+    if ((i+1)%9==0)
+      s+=" ";
+  }
+  l << "Raw data bits: "+s;
+
+
+  std::ostringstream os;
+  os << std::hex<<data;
+  l << QString(os.str().c_str());
+
+
+//   l << "Drift radius: "+QString::number(m_driftcircle->localPosition()[0]/CLHEP::mm)+" CLHEP::mm";
+//   const Trk::CylinderBounds* ccbo = dynamic_cast<const Trk::CylinderBounds*>(&(m_driftcircle->detectorElement()->surface(m_driftcircle->identify()).bounds()));
+//   if (ccbo)
+//     l << "Straw length: "+QString::number(ccbo->halflengthZ()*2/CLHEP::cm)+" CLHEP::cm";
+
+  return l;
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_sTGC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_sTGC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5b629381109d89fd9970ecea59b133bde838361f
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_sTGC.cxx
@@ -0,0 +1,171 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "VP1PRDSystems/PRDHandle_sTGC.h"
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1Base/VP1Msg.h"
+#include "VP1Utils/VP1LinAlgUtils.h"
+#include "VP1HEPVis/nodes/SoTransparency.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTranslation.h>
+#include <Inventor/nodes/SoTransform.h>
+
+#include "MuonReadoutGeometry/MuonStation.h"
+
+#include "GeoPrimitives/GeoPrimitives.h"
+
+//____________________________________________________________________
+PRDHandle_sTGC::PRDHandle_sTGC(PRDCollHandle_sTGC*collhandle, const Muon::sTgcPrepData*stgc)
+  : PRDHandleBase(static_cast<PRDCollHandleBase*>(collhandle)), m_stgc(stgc)
+{
+  SoTransparency::initClass();
+}
+
+// fixme: uncomment and update
+////____________________________________________________________________
+SoTransform * PRDHandle_sTGC::createTransform() const
+{
+  std::cout<<"creating sTGC transform:"<< std::endl;
+
+  const sTgcIdHelper * idhelper = VP1DetInfo::stgcIDHelper();
+  const Muon::sTgcPrepData * prd = stgc();
+  if (!prd || !idhelper) return new SoTransform;
+
+  Identifier id = prd->identify();
+
+  const MuonGM::sTgcReadoutElement* detEl = prd->detectorElement();
+  if (!detEl)  return new SoTransform;
+
+  const Amg::Transform3D& transf = detEl->transform(id);
+
+  SoTransform * theHitTransform = VP1LinAlgUtils::toSoTransform(transf);
+  
+  // return the channel position
+  Amg::Vector2D locPos;
+
+  if (!detEl->stripPosition(id,locPos) ) {
+    return theHitTransform;
+  }
+
+  theHitTransform = VP1LinAlgUtils::toSoTransform(transf*Amg::Translation3D(locPos.x(),locPos.y(),0.));
+    
+  return theHitTransform;
+} 
+
+
+//____________________________________________________________________
+void PRDHandle_sTGC::buildShapes(SoNode*&shape_simple, SoNode*&shape_detailed)
+{
+
+  VP1Msg::messageDebug("buildShapes()");
+
+  const sTgcIdHelper * idhelper = VP1DetInfo::stgcIDHelper();
+  
+  if (!idhelper) {
+    VP1Msg::messageDebug("idhelper is null. Returning without building the shape...");
+    return;
+  }
+  const Muon::sTgcPrepData * prd = stgc();
+
+  if (!prd) {
+    VP1Msg::messageDebug("prd is null. Returning without building the shape...");
+    return;
+  }
+  
+  Identifier id = prd->identify();
+
+  const MuonGM::sTgcReadoutElement* detEl = prd->detectorElement();
+
+  if (idhelper->channelType(id)==0) {     // pads
+    VP1Msg::messageDebug("Building sTgc pad...");
+    const MuonGM::MuonPadDesign* pad_design = detEl->getPadDesign( id );
+    
+    // use point shape for simple view
+//    shape_simple = common()->nodeManager()->getShapeNode_Strip(0.); // FIXME: ORIGINAL FROM SHARKA. Works perfectly but the STGC elements are point-like until very very very close...
+    
+    // local position of the pad 
+    Amg::Vector2D locPad;
+    if (!detEl->stripPosition(id,locPad) ) return;
+    if (!pad_design) return;
+    
+    double etaWidth=pad_design->inputRowWidth;
+    double phiMinWidth=pad_design->channelWidth(Amg::Vector2D(locPad.x(),locPad.y()-0.5*etaWidth),true);
+    double phiMaxWidth=pad_design->channelWidth(Amg::Vector2D(locPad.x(),locPad.y()+0.5*etaWidth),true);
+    
+    shape_simple = common()->nodeManager()->getShapeNode_Pad(etaWidth,phiMinWidth,phiMaxWidth,0.01); // fixme: now shape_simple == shape_detailed
+
+    // use trapezoid shape for detailed view
+    SoSeparator * errDetailed  = new SoSeparator;
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Pad(etaWidth,phiMinWidth,phiMaxWidth,0.01));
+    
+    shape_detailed = errDetailed;
+
+    return;
+  } else if (idhelper->channelType(id)==2) {     // wire gangs
+    VP1Msg::messageDebug("Building sTgc wire gang...");
+    const MuonGM::MuonChannelDesign* design = detEl->getDesign( id );
+    
+    // use point shape for simple view
+//    shape_simple = common()->nodeManager()->getShapeNode_Strip(0.); // FIXME: ORIGINAL FROM SHARKA. Works perfectly but the STGC elements are point-like until very very very close...
+
+    // local position of the wire gang 
+    Amg::Vector2D locWire;
+    if (!detEl->stripPosition(id,locWire) ) return;
+    if (!design) return;
+    
+    double etaWidth=design->channelLength(idhelper->channel(id));
+    double phiMaxWidth=design->maxYSize/design->nch;
+    double phiMinWidth=design->minYSize/design->nch;
+    
+
+    shape_simple = common()->nodeManager()->getShapeNode_Wire(etaWidth,phiMinWidth,phiMaxWidth,0.01); // fixme: now shape_simple == shape_detailed
+
+    // use trapezoid shape for detailed view
+    SoSeparator * errDetailed  = new SoSeparator;
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Wire(etaWidth,phiMinWidth,phiMaxWidth,0.01));
+   
+    shape_detailed = errDetailed;
+    
+    return;
+  } else if (idhelper->channelType(id)==1) {     // strips
+    VP1Msg::messageDebug("Building sTgc strip...");
+    const MuonGM::MuonChannelDesign* design = detEl->getDesign( id );
+    
+    // use point shape for simple view
+//    shape_simple = common()->nodeManager()->getShapeNode_Strip(0.); // FIXME: ORIGINAL FROM SHARKA. Works perfectly but the STGC elements are point-like until very very very close...
+
+    // local position of the wire gang 
+    Amg::Vector2D locPos;
+    if (!detEl->stripPosition(id,locPos) ) return;
+    if (!design) return;
+    
+    double striplength=design->channelLength(idhelper->channel(id));
+    double stripWidth=design->inputWidth;
+
+    shape_simple = common()->nodeManager()->getShapeNode_Strip(striplength,std::min(10.0,stripWidth),0.01); // fixme: now shape_simple == shape_detailed
+
+    // use rectangular shape for detailed view
+    SoSeparator * errDetailed  = new SoSeparator;
+    errDetailed->addChild(common()->nodeManager()->getShapeNode_Strip(striplength,std::min(10.0,stripWidth),0.01));
+
+    shape_detailed = errDetailed;
+    
+    return;
+  }
+
+ return; 
+
+ }
+
+//____________________________________________________________________
+  int PRDHandle_sTGC::regionIndex()
+  {
+  //Unique for each station.
+    const MuonGM::MuonStation* station = m_stgc->detectorElement()->parentMuonStation();
+    if (!station) {VP1Msg::message("Warning - sTGC station gives null parent. Something is wrong with the geometry!"); return 0;}
+    
+    return station->getPhiIndex()-99999*station->getEtaIndex();//hopefully unique.
+  }
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSysCommonData.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSysCommonData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..41117785e262d78af360e58f3813db015b0f8ecd
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSysCommonData.cxx
@@ -0,0 +1,124 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class PRDSysCommonData                  //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: July 2008                                //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/PRDSysCommonData.h"
+#include "VP1Base/IVP13DSystem.h"
+
+#include "VP1Utils/HitsSoNodeManager.h"
+#include "VP1PRDSystems/MuonChamberProjectionHelper.h"
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1PRDSystems/PRDTrackSegmentHelper.h"
+
+#include "VP1GuideLineSystems/InDetProjHelper.h"
+#include "VP1Base/VP1SoMaterialMixer.h"
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoTransform.h>
+#include <Inventor/SoPath.h>
+
+
+//____________________________________________________________________
+class PRDSysCommonData::Imp {
+public:
+  //The following map is used to figure out which handle a clicked node corresponds to.
+  //We use the SoTransform node to uniquely identify this association.
+  std::map<SoNode*,PRDHandleBase*> sotransform2prdhandle;
+  PRDHandleBase * pickedPathToHandle( SoPath*pickedPath );
+
+  //The following map is used to find handles for a given prd pointer:
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> > prd2handles;
+};
+
+
+//____________________________________________________________________
+PRDSysCommonData::PRDSysCommonData(IVP13DSystem *sys, PRDSystemController*controller)
+  : VP1HelperClassBase(sys,"PRDSysCommonData"), d(new Imp),
+    m_controller(controller)
+{
+  m_3dsystem = sys;
+  m_nodeManager = new HitsSoNodeManager(sys);
+  m_materialMixer = new VP1SoMaterialMixer;
+  m_muonChamberProjectionHelper = new MuonChamberProjectionHelper(sys);
+  m_indetProjHelper_Pixel = InDetProjHelper::createPixelHelper(sys);
+  m_indetProjHelper_SCT = InDetProjHelper::createSCTHelper(sys);
+  m_indetProjHelper_TRT = InDetProjHelper::createTRTHelper(sys);
+  m_touchedMuonChamberHelper = new TouchedMuonChamberHelper;
+
+  QObject::connect(m_touchedMuonChamberHelper,SIGNAL(touchedMuonChambersChanged(const std::set<GeoPVConstLink>&)),
+		   sys,SLOT(emitTouchedMuonChambersChanged(const std::set<GeoPVConstLink>&)));//Fixme: need track sys!!
+
+  m_trackAndSegmentHelper = new PRDTrackSegmentHelper(&(d->prd2handles),sys);
+}
+
+//____________________________________________________________________
+PRDSysCommonData::~PRDSysCommonData()
+{
+  delete m_nodeManager;
+  delete m_materialMixer;
+  delete m_muonChamberProjectionHelper;
+  delete m_indetProjHelper_Pixel;
+  delete m_indetProjHelper_SCT;
+  delete m_indetProjHelper_TRT;
+  delete m_touchedMuonChamberHelper;
+  delete m_trackAndSegmentHelper;
+  delete d;
+}
+
+//____________________________________________________________________
+void PRDSysCommonData::clearEventData()
+{
+  m_touchedMuonChamberHelper->eraseEventData();
+  d->sotransform2prdhandle.clear();
+  d->prd2handles.clear();
+}
+
+
+//_____________________________________________________________________________________
+void PRDSysCommonData::registerTransform2Handle(SoTransform*transform,PRDHandleBase*handle)
+{
+  assert(d->sotransform2prdhandle.find(transform)==d->sotransform2prdhandle.end());
+  d->sotransform2prdhandle[transform] = handle;
+}
+
+//_____________________________________________________________________________________
+void PRDSysCommonData::registerPRD2Handle(const Trk::PrepRawData*prd,PRDHandleBase*handle)
+{
+  if (d->prd2handles.find(prd)==d->prd2handles.end()) {
+    QList<PRDHandleBase*> l;
+    l<<handle;
+    d->prd2handles[prd] = l;
+  } else {
+    d->prd2handles[prd] << handle;
+  }
+}
+
+//_____________________________________________________________________________________
+PRDHandleBase * PRDSysCommonData::pickedPathToHandle( SoPath*pickedPath )
+{
+  while (pickedPath->getLength()>4) {//4 is a bit arbitrary...
+    if (pickedPath->getNodeFromTail(0)->getTypeId()==SoSeparator::getClassTypeId()) {
+      //If at least two children and the first is an SoTransform, then it might be what we are looking for.
+      SoSeparator * sep = static_cast<SoSeparator*>(pickedPath->getNodeFromTail(0));
+      if (sep->getNumChildren()>1&&sep->getChild(0)->getTypeId()==SoTransform::getClassTypeId()) {
+	std::map<SoNode*,PRDHandleBase*>::iterator it = d->sotransform2prdhandle.find(sep->getChild(0));
+	if ( it!=d->sotransform2prdhandle.end())
+	  return it->second;
+      }
+    }
+    pickedPath->pop();//FIXME:  NO NEED TO DO ANYTHING ELSE THAN FIND THE HANDLE!!
+  }
+  return 0;
+}
+
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSystemController.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSystemController.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2d94d6790a8a8185a0361f55beae56c33668de6a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDSystemController.cxx
@@ -0,0 +1,826 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class PRDSystemController               //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: November 2007                            //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "ui_vp1prdcontrollerform.h"
+#include "ui_prd_settings_cuts_form.h"
+#include "ui_prd_settings_display_form.h"
+#include "ui_prd_settings_interactions_form.h"
+#include "VP1Base/VP1QtInventorUtils.h"
+#include "VP1Base/VP1Serialise.h"
+#include "VP1Base/VP1Deserialise.h"
+#include "VP1Base/VP1QtUtils.h"
+#include "VP1Base/VP1CollectionWidget.h"
+#include <Inventor/nodes/SoMaterial.h>
+#include <QtCore/QBuffer>
+#include <QtCore/QTimer>
+#include <QtCore/QSet>
+
+//____________________________________________________________________
+class PRDSystemController::Imp {
+public:
+  PRDSystemController * theclass;
+  Ui::VP1PrdControllerForm ui;
+  Ui::PRDSysSettingsInteractionsForm ui_int;
+  Ui::PRDSysSettingsDisplayForm ui_disp;
+  Ui::PRDSysSettingsCutsForm ui_cuts;
+  VP1CollectionWidget * collWidget;
+
+  SoMaterial * highlightmaterial;
+
+  PRDCollHandleBase::COLOURMETHOD last_colourMethod;
+  bool last_drawErrors;
+  bool last_drawRDOs;
+  bool last_highLightOutliers;
+  double last_highLightMaterialWeight;
+  bool last_highLightTRTHitsByHighThreshold;
+  bool last_highLightMDTHitsByMask;
+  int last_highLightMDTHitsByUpperADCBound;
+  bool last_projectPixelHits;
+  bool last_projectSCTHits;
+  bool last_projectTRTHits;
+  bool last_projectMDTHits;
+  bool last_projectRPCHits;
+  bool last_projectCSCHits;
+  bool last_projectTGCHits;
+  // bool last_projectSTGCHits;
+  //Cuts:
+  VP1Interval last_cutAllowedEta;
+  QList<VP1Interval> last_cutAllowedPhi;//All off: empty list. All on: list with one entry: ]-inf,inf[
+  PRDCommonFlags::InDetPartsFlags last_inDetPartsFlags;
+  unsigned last_pixelMinNRDOPerCluster;
+  bool last_sctExcludeIsolatedClusters;
+  unsigned last_trtMinToT;
+  unsigned last_trtMaxToT;
+  unsigned last_trtMinLE;
+  unsigned last_trtMaxLE;
+  bool last_trtRequireHT;
+  unsigned last_mdtMinNHitsPerStation;
+  VP1Interval last_mdtAllowedADCValues;
+  bool last_mdtExcludeMaskedHits;
+  QString last_mdt_cutMdtDriftCircleStatus;
+  std::set<PRDDetType::Type> last_shownCollectionTypes;
+  bool last_limitToActiveChambers;
+  bool last_selectionModeMultiple;
+  bool last_showSelectionLine;
+  //Used ID parts:
+  InDetProjFlags::DetTypeFlags last_inDetPartsUsingProjections;
+
+  QSet<PRDDetType::Type> shownCollectionTypes() const;
+};
+
+//____________________________________________________________________
+PRDSystemController::PRDSystemController(IVP1System * sys)
+  : VP1Controller(sys,"PRDSystemController"),d(new Imp)
+{
+  d->theclass = this;
+  d->ui.setupUi(this);
+
+  //FIXME: Dialogs and collwidget!
+  d->collWidget = new VP1CollectionWidget;
+  //   d->trackcollwidget = new TrackCollWidget;
+  setupCollWidgetInScrollArea(d->ui.collWidgetScrollArea,d->collWidget);
+  initDialog(d->ui_cuts, d->ui.pushButton_settings_cuts);
+  initDialog(d->ui_disp, d->ui.pushButton_settings_display);
+  initDialog(d->ui_int, d->ui.pushButton_settings_interactions);
+
+  d->highlightmaterial = 0;
+
+  d->ui_int.matButton_multiselline->setMaterial(VP1MaterialButton::createMaterial(1,1,0));;
+
+  d->ui_cuts.groupBox_cuts_tracksegmentassociation->setVisible(false);//Since it is not used at the moment!
+  if (!VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_ENABLEREFIT"))
+    d->ui_int.groupBox_selectionMode->setVisible(false);
+
+  d->ui_disp.widget_drawOptions_PixelSCT->setComplexityDisabled();
+  d->ui_disp.widget_drawOptions_Muons->setPointSizesDisabled();
+  d->ui_disp.widget_drawOptions_PixelSCT->setPointSizes(3.0);
+  d->ui_disp.widget_drawOptions_TRT->setPointSizes(2.0);
+
+  d->ui_cuts.etaPhiCutWidget->setEtaCutEnabled(false);
+
+  /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+  //  Setup connections which monitor changes in the controller so that we may emit signals as appropriate:  //
+  /////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+  addUpdateSlot(SLOT(possibleChange_colourMethod()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourByTrack);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourBySegment);
+  
+  addUpdateSlot(SLOT(possibleChange_drawErrors()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_drawErrors);
+  
+  addUpdateSlot(SLOT(possibleChange_drawRDOs()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_drawRDOs);
+  
+  addUpdateSlot(SLOT(possibleChange_highLightOutliers()));
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightTRTHitsByHighThreshold()));
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightMDTHitsByMask()));
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightMDTHitsByUpperADCBound()));
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightMaterialWeight()));
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightOutliers()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_trackoutliers);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourByTrack);
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightTRTHitsByHighThreshold()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_trackoutliers);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_trtht);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourByTrack);
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightMDTHitsByMask()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_trackoutliers);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_maskedmdts);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourByTrack);
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+
+  addUpdateSlot(SLOT(possibleChange_highLightMDTHitsByUpperADCBound()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_trackoutliers);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_colourByTrack);
+  connectToLastUpdateSlot(d->ui_disp.horizontalSlider_highlights_intensity);
+  connectToLastUpdateSlot(d->ui_disp.checkBox_highlight_mdt_ADC_below);
+  connectToLastUpdateSlot(d->ui_disp.spinBox_highlight_mdt_ADC_below);
+
+  addUpdateSlot(SLOT(possibleChange_projectPixelHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showpixel_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectSCTHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showsct_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectTRTHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showtrt_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectMDTHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showmdt_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectRPCHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showrpc_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectCSCHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showcsc_projected);
+
+  addUpdateSlot(SLOT(possibleChange_projectTGCHits()));
+  connectToLastUpdateSlot(d->ui_disp.checkBox_showtgc_projected);
+
+  // addUpdateSlot(SLOT(possibleChange_projectSTGCHits()));
+  // connectToLastUpdateSlot(d->ui_disp.checkBox_showstgc_projected);
+
+  addUpdateSlot(SLOT(possibleChange_cutAllowedEta()));
+  connectToLastUpdateSlot(d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)));
+
+  addUpdateSlot(SLOT(possibleChange_cutAllowedPhi()));
+  connectToLastUpdateSlot(d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)));
+
+  addUpdateSlot(SLOT(possibleChange_inDetPartsFlags()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_indet_barrelA);
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_indet_barrelC);
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_indet_endcapA);
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_indet_endcapC);
+
+  addUpdateSlot(SLOT(possibleChange_pixelMinNRDOPerCluster()));
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_pixel_minnrdo);
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_pixel_minnrdo);
+
+  addUpdateSlot(SLOT(possibleChange_sctExcludeIsolatedClusters()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_sct_excludeisolatedclusters);
+
+  addUpdateSlot(SLOT(possibleChange_trtRequireHT()));
+  connectToLastUpdateSlot(d->ui_cuts.checkbox_cut_trt_needHT);
+
+  addUpdateSlot(SLOT(possibleChange_trtMinToT()));
+  connectToLastUpdateSlot(d->ui_cuts.checkbox_cut_trt_TotMin);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_trt_ToTMin);
+
+  addUpdateSlot(SLOT(possibleChange_trtMaxToT()));
+  connectToLastUpdateSlot(d->ui_cuts.checkbox_cut_trt_TotMax);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_trt_ToTMax);
+
+  addUpdateSlot(SLOT(possibleChange_trtMinLE()));
+  connectToLastUpdateSlot(d->ui_cuts.checkbox_cut_trt_LeMin);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_trt_LEMin);
+
+  addUpdateSlot(SLOT(possibleChange_trtMaxLE()));
+  connectToLastUpdateSlot(d->ui_cuts.checkbox_cut_trt_LeMax);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_trt_LEMax);
+
+  addUpdateSlot(SLOT(possibleChange_mdtMinNHitsPerStation()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_mdt_excludeisolateddrifttubes);
+
+  addUpdateSlot(SLOT(possibleChange_mdtAllowedADCValues()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_mdt_ADClowerbound);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_mdt_ADClowerbound);
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_mdt_ADCupperbound);
+  connectToLastUpdateSlot(d->ui_cuts.spinBox_cut_mdt_ADCupperbound);
+
+  addUpdateSlot(SLOT(possibleChange_mdtExcludeMaskedHits()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_mdt_excludemaskedhits);
+  
+  addUpdateSlot(SLOT(possibleChange_mdt_cutMdtDriftCircleStatus()));
+  connectToLastUpdateSlot(d->ui_cuts.comboBox_mdt_cutMdtDriftCircleStatus);
+  
+  addUpdateSlot(SLOT(possibleChange_limitToActiveChambers()));
+  connectToLastUpdateSlot(d->ui_cuts.checkBox_cut_mdt_limitToActiveChambers);
+
+  addUpdateSlot(SLOT(possibleChange_inDetPartsUsingProjections()));
+  connectToLastUpdateSlot(this,SIGNAL(projectPixelHitsChanged(bool)));
+  connectToLastUpdateSlot(this,SIGNAL(projectSCTHitsChanged(bool)));
+  connectToLastUpdateSlot(this,SIGNAL(projectTRTHitsChanged(bool)));
+  connectToLastUpdateSlot(this,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)));
+  connectToLastUpdateSlot(collWidget(),SIGNAL(visibleStdCollectionTypesChanged(const QList<qint32>&)));
+
+  addUpdateSlot(SLOT(possibleChange_selectionModeMultiple()));
+  connectToLastUpdateSlot(d->ui_int.checkBox_selModeMultiple);
+
+  addUpdateSlot(SLOT(possibleChange_showSelectionLine()));
+  connectToLastUpdateSlot(d->ui_int.checkBox_showSelectionLine);
+
+  addUpdateSlot(SLOT(possibleChange_shownCollectionTypes()));
+  connectToLastUpdateSlot(collWidget(),SIGNAL(visibleStdCollectionTypesChanged(const QList<qint32>&)));
+
+  addUpdateSlot(SLOT(updateHighlightGui()));
+  connectToLastUpdateSlot(this,SIGNAL(highLightOutliersChanged(bool)));
+
+  //Stateless:
+  connect(d->ui_int.pushButton_clearSelection,SIGNAL(clicked()),this,SLOT(emitClearSelection()));
+
+  initLastVars();
+
+}
+
+//____________________________________________________________________
+PRDSystemController::~PRDSystemController()
+{
+  if (d->highlightmaterial)
+    d->highlightmaterial->unref();
+  delete d;
+}
+
+//____________________________________________________________________
+VP1CollectionWidget * PRDSystemController::collWidget() const
+{
+  return d->collWidget;
+}
+
+//____________________________________________________________________
+SoGroup * PRDSystemController::drawOptions(PRDDetType::Type t) const
+{
+  //FIXME: SET APPROPRIATE DEFAULTS!!!!
+  switch (t) {
+  case PRDDetType::TRT:
+    return d->ui_disp.widget_drawOptions_TRT->drawOptionsGroup();
+  case PRDDetType::Pixel:
+  case PRDDetType::SCT:
+  case PRDDetType::SpacePoints:
+    return d->ui_disp.widget_drawOptions_PixelSCT->drawOptionsGroup();
+  default:
+    return d->ui_disp.widget_drawOptions_Muons->drawOptionsGroup();
+  }
+}
+
+//____________________________________________________________________
+QSet<PRDDetType::Type> PRDSystemController::Imp::shownCollectionTypes() const
+{
+  QSet<PRDDetType::Type> s;
+  foreach (qint32 i,collWidget->visibleStdCollectionTypes()) {
+    bool ok;
+    PRDDetType::Type t = PRDDetType::intToType(i,ok);
+    if (ok)
+      s.insert(t);
+  }
+  return s;
+}
+
+//____________________________________________________________________
+SoMaterial * PRDSystemController::getMultiSelectionLineMaterial() const
+{
+  QList<SoMaterial*> mats = d->ui_int.matButton_multiselline->handledMaterials();
+  if (mats.count()!=1) {
+    message("ERROR: No material in button!");
+    return 0;//probably giving a crash...
+  }
+  return mats.at(0);
+}
+
+//____________________________________________________________________
+void PRDSystemController::emitClearSelection()
+{
+  messageVerbose("Emitting clearSelection()");
+  emit clearSelection();
+}
+
+//____________________________________________________________________
+SoMaterial * PRDSystemController::getHighLightMaterial()
+{
+  if (!d->highlightmaterial) {
+    d->highlightmaterial = new SoMaterial;
+    d->highlightmaterial->ref();
+    d->highlightmaterial->diffuseColor.setValue( 1.0f, 0.0f, 0.0f );
+    d->ui_disp.materialbutton_highlights_material->copyValuesFromMaterial(d->highlightmaterial);
+    d->ui_disp.materialbutton_highlights_material->handleMaterial(d->highlightmaterial);
+  }
+  return d->highlightmaterial;
+}
+
+//____________________________________________________________________
+bool PRDSystemController::printInfoOnClick() const
+{
+  return d->ui_int.checkBox_printinfo->isChecked();
+}
+
+//____________________________________________________________________
+bool PRDSystemController::zoomOnClick() const
+{
+  return d->ui_int.checkBox_zoom->isChecked();
+}
+
+//____________________________________________________________________
+bool PRDSystemController::muonOrientToChambersOnClick() const
+{
+  return zoomOnClick() && d->ui_int.checkBox_zoom_orientToMuonChamber->isChecked();
+}
+
+//____________________________________________________________________
+VP1Interval PRDSystemController::cutAllowedEta() const
+{
+  return d->ui_cuts.etaPhiCutWidget->allowedEta();
+}
+
+//____________________________________________________________________
+QList<VP1Interval> PRDSystemController::cutAllowedPhi() const
+{
+  return d->ui_cuts.etaPhiCutWidget->allowedPhi();
+}
+
+//____________________________________________________________________
+PRDCommonFlags::InDetPartsFlags PRDSystemController::inDetPartsFlags() const
+{
+  PRDCommonFlags::InDetPartsFlags flag = PRDCommonFlags::None;
+  if (d->ui_cuts.checkBox_cut_indet_barrelA->isChecked()) flag |= PRDCommonFlags::BarrelPositive;
+  if (d->ui_cuts.checkBox_cut_indet_barrelC->isChecked()) flag |= PRDCommonFlags::BarrelNegative;
+  if (d->ui_cuts.checkBox_cut_indet_endcapA->isChecked()) flag |= PRDCommonFlags::EndCapPositive;
+  if (d->ui_cuts.checkBox_cut_indet_endcapC->isChecked()) flag |= PRDCommonFlags::EndCapNegative;
+  return flag;
+}
+
+//____________________________________________________________________
+unsigned PRDSystemController::trtMinToT() const
+{
+  return d->ui_cuts.checkbox_cut_trt_TotMin->isChecked() ? d->ui_cuts.spinBox_cut_trt_ToTMin->value() : 0;
+}
+
+//____________________________________________________________________
+unsigned PRDSystemController::trtMaxToT() const
+{
+  return d->ui_cuts.checkbox_cut_trt_TotMax->isChecked() ? d->ui_cuts.spinBox_cut_trt_ToTMax->value() : 24;
+}
+
+//____________________________________________________________________
+unsigned PRDSystemController::trtMinLE() const
+{
+  return d->ui_cuts.checkbox_cut_trt_LeMin->isChecked() ? d->ui_cuts.spinBox_cut_trt_LEMin->value() : 0;
+}
+
+//____________________________________________________________________
+unsigned PRDSystemController::trtMaxLE() const
+{
+  return d->ui_cuts.checkbox_cut_trt_LeMax->isChecked() ? d->ui_cuts.spinBox_cut_trt_LEMax->value() : 24;
+}
+
+//____________________________________________________________________
+bool PRDSystemController::trtRequireHT() const
+{
+  return d->ui_cuts.checkbox_cut_trt_needHT->isChecked();
+}
+
+
+//____________________________________________________________________
+unsigned PRDSystemController::pixelMinNRDOPerCluster() const
+{
+  return d->ui_cuts.checkBox_cut_pixel_minnrdo->isChecked() ? d->ui_cuts.spinBox_cut_pixel_minnrdo->value() : 0;
+}
+
+
+
+//____________________________________________________________________
+bool PRDSystemController::sctExcludeIsolatedClusters() const
+{
+  return d->ui_cuts.checkBox_cut_sct_excludeisolatedclusters->isChecked();
+}
+
+//____________________________________________________________________
+unsigned PRDSystemController::mdtMinNHitsPerStation() const
+{
+  return d->ui_cuts.checkBox_cut_mdt_excludeisolateddrifttubes->isChecked() ? 2 : 0;
+}
+
+//____________________________________________________________________
+VP1Interval PRDSystemController::mdtAllowedADCValues() const
+{
+  double lower = d->ui_cuts.checkBox_cut_mdt_ADClowerbound->isChecked() ?
+    d->ui_cuts.spinBox_cut_mdt_ADClowerbound->value()+0.5 : - VP1Interval::inf();
+  double upper = d->ui_cuts.checkBox_cut_mdt_ADCupperbound->isChecked() ?
+    d->ui_cuts.spinBox_cut_mdt_ADCupperbound->value()-0.5 : VP1Interval::inf();
+  return upper>lower? VP1Interval(lower,upper) : VP1Interval();
+}
+
+
+//____________________________________________________________________
+bool PRDSystemController::mdtExcludeMaskedHits() const
+{
+  return d->ui_cuts.checkBox_cut_mdt_excludemaskedhits->isChecked();
+}
+
+//____________________________________________________________________
+QString PRDSystemController::mdt_cutMdtDriftCircleStatus() const
+{
+  return d->ui_cuts.comboBox_mdt_cutMdtDriftCircleStatus->currentText();
+}
+                
+//____________________________________________________________________
+bool PRDSystemController::limitToActiveChambers() const
+{
+  return d->ui_cuts.checkBox_cut_mdt_limitToActiveChambers->isChecked();
+}
+
+//____________________________________________________________________
+PRDCollHandleBase::COLOURMETHOD PRDSystemController::colourMethod() const
+{
+  if (d->ui_disp.checkBox_colourByTrack->isChecked()) {
+    if (d->ui_disp.checkBox_colourBySegment->isChecked())
+      return PRDCollHandleBase::BySegmentAndTrack;
+    else
+      return PRDCollHandleBase::ByTrack;
+  } else {
+    if (d->ui_disp.checkBox_colourBySegment->isChecked())
+      return PRDCollHandleBase::BySegment;
+    else
+      return PRDCollHandleBase::ByTechOnly;
+  }
+}
+
+//____________________________________________________________________
+bool PRDSystemController::drawErrors() const
+{
+  if (d->ui_disp.checkBox_drawErrors->isChecked()) return true;
+  return false;
+}
+
+//____________________________________________________________________
+bool PRDSystemController::drawRDOs() const
+{
+  if (d->ui_disp.checkBox_drawRDOs->isChecked()) return true;
+  return false;
+}
+
+
+//____________________________________________________________________
+bool PRDSystemController::highLightOutliers() const
+{
+  return highLightMaterialWeight() != 0.0
+    && d->ui_disp.checkBox_highlight_trackoutliers->isChecked() && d->ui_disp.checkBox_colourByTrack->isChecked();
+}
+
+//____________________________________________________________________
+void PRDSystemController::updateHighlightGui()
+{
+  const bool outlierHLEnabledInGui(d->ui_disp.checkBox_highlight_trackoutliers->isChecked() && d->ui_disp.checkBox_colourByTrack->isChecked());
+  d->ui_disp.checkBox_highlight_trtht->setEnabled(!outlierHLEnabledInGui);
+  d->ui_disp.checkBox_highlight_maskedmdts->setEnabled(!outlierHLEnabledInGui);
+  d->ui_disp.checkBox_highlight_mdt_ADC_below->setEnabled(!outlierHLEnabledInGui);
+  d->ui_disp.spinBox_highlight_mdt_ADC_below->setEnabled(!outlierHLEnabledInGui);
+}
+
+//____________________________________________________________________
+bool PRDSystemController::highLightTRTHitsByHighThreshold()
+{
+  return highLightMaterialWeight() != 0.0
+    && !highLightOutliers() && d->ui_disp.checkBox_highlight_trtht->isChecked();
+}
+
+
+//____________________________________________________________________
+bool PRDSystemController::highLightMDTHitsByMask()
+{
+  return highLightMaterialWeight() != 0.0
+    && !highLightOutliers() && d->ui_disp.checkBox_highlight_maskedmdts->isChecked();
+}
+
+
+//____________________________________________________________________
+int PRDSystemController::highLightMDTHitsByUpperADCBound()
+{
+  return (highLightMaterialWeight() > 0.0
+	  && !highLightOutliers() && d->ui_disp.checkBox_highlight_mdt_ADC_below->isChecked() )
+    ? d->ui_disp.spinBox_highlight_mdt_ADC_below->value() : -1;
+}
+
+
+//____________________________________________________________________
+double PRDSystemController::highLightMaterialWeight() const
+{
+  int val = d->ui_disp.horizontalSlider_highlights_intensity->value();
+  if (val<=1) return 0.0;
+  if (val==2) return 1.0;
+  if (val==3) return 1.9;
+  if (val==4) return 2.8;
+  if (val==5) return 5.0;
+  return 99999.0;
+}
+
+//____________________________________________________________________
+bool PRDSystemController::projectPixelHits() const { return d->ui_disp.checkBox_showpixel_projected->isChecked(); }
+bool PRDSystemController::projectSCTHits() const { return d->ui_disp.checkBox_showsct_projected->isChecked(); }
+bool PRDSystemController::projectTRTHits() const { return d->ui_disp.checkBox_showtrt_projected->isChecked(); }
+bool PRDSystemController::projectMDTHits() const { return d->ui_disp.checkBox_showmdt_projected->isChecked(); }
+bool PRDSystemController::projectRPCHits() const { return d->ui_disp.checkBox_showrpc_projected->isChecked(); }
+bool PRDSystemController::projectCSCHits() const { return d->ui_disp.checkBox_showcsc_projected->isChecked(); }
+bool PRDSystemController::projectTGCHits() const { return d->ui_disp.checkBox_showtgc_projected->isChecked(); }
+// bool PRDSystemController::projectSTGCHits() const { return d->ui_disp.checkBox_showstgc_projected->isChecked(); }
+
+//____________________________________________________________________
+InDetProjFlags::DetTypeFlags PRDSystemController::inDetPartsUsingProjections() const
+{
+  std::set<PRDDetType::Type> showncolltypes =  shownCollectionTypes();
+  PRDCommonFlags::InDetPartsFlags indetparts = inDetPartsFlags();
+
+  InDetProjFlags::DetTypeFlags flag = InDetProjFlags::NoDet;
+
+  if ( projectPixelHits() && showncolltypes.find(PRDDetType::Pixel)!=showncolltypes.end() ) {
+    if (indetparts & PRDCommonFlags::BarrelPositive)
+      flag |= InDetProjFlags::Pixel_brlpos;
+    if (indetparts & PRDCommonFlags::BarrelNegative)
+      flag |= InDetProjFlags::Pixel_brlneg;
+    if (indetparts & PRDCommonFlags::EndCapPositive)
+      flag |= InDetProjFlags::Pixel_ecpos;
+    if (indetparts & PRDCommonFlags::EndCapNegative)
+      flag |= InDetProjFlags::Pixel_ecneg;
+  }
+
+  if ( projectSCTHits() && showncolltypes.find(PRDDetType::SCT)!=showncolltypes.end() ) {
+    if (indetparts & PRDCommonFlags::BarrelPositive)
+      flag |= InDetProjFlags::SCT_brlpos;
+    if (indetparts & PRDCommonFlags::BarrelNegative)
+      flag |= InDetProjFlags::SCT_brlneg;
+    if (indetparts & PRDCommonFlags::EndCapPositive)
+      flag |= InDetProjFlags::SCT_ecpos;
+    if (indetparts & PRDCommonFlags::EndCapNegative)
+      flag |= InDetProjFlags::SCT_ecneg;
+  }
+
+  if ( projectTRTHits() && showncolltypes.find(PRDDetType::TRT)!=showncolltypes.end() ) {
+     if (indetparts & PRDCommonFlags::BarrelPositive)
+      flag |= InDetProjFlags::TRT_brlpos;
+    if (indetparts & PRDCommonFlags::BarrelNegative)
+      flag |= InDetProjFlags::TRT_brlneg;
+    if (indetparts & PRDCommonFlags::EndCapPositive)
+      flag |= InDetProjFlags::TRT_ecpos;
+    if (indetparts & PRDCommonFlags::EndCapNegative)
+      flag |= InDetProjFlags::TRT_ecneg;
+  }
+
+  return flag;
+}
+
+//____________________________________________________________________
+bool PRDSystemController::selectionModeMultiple() const
+{
+  return d->ui_int.checkBox_selModeMultiple->isChecked();
+}
+
+//____________________________________________________________________
+bool PRDSystemController::showSelectionLine() const
+{
+  return d->ui_int.checkBox_showSelectionLine->isChecked();
+}
+
+//____________________________________________________________________
+std::set<PRDDetType::Type> PRDSystemController::shownCollectionTypes() const
+{
+  std::set<PRDDetType::Type> s;
+  foreach(qint32 i, collWidget()->visibleStdCollectionTypes()) {
+    bool ok;
+    PRDDetType::Type t = PRDDetType::intToType(i, ok);
+    if (ok)
+      s.insert(t);
+    else
+      message("shownCollectionTypes ERROR: Could not decode collection type");
+  }
+  return s;
+}
+
+
+//____________________________________________________________________
+int PRDSystemController::currentSettingsVersion() const
+{
+  return 3;
+}
+
+//____________________________________________________________________
+void PRDSystemController::actualSaveSettings(VP1Serialise&s) const
+{
+  s.save(d->ui_disp.checkBox_colourByTrack);
+  s.save(d->ui_disp.checkBox_colourBySegment);
+  s.save(d->ui_disp.checkBox_highlight_trackoutliers);
+  s.save(d->ui_disp.checkBox_highlight_trtht);
+  s.save(d->ui_disp.checkBox_highlight_maskedmdts);
+  s.save(d->ui_cuts.checkBox_cut_indet_barrelA);
+  s.save(d->ui_cuts.checkBox_cut_indet_barrelC);
+  s.save(d->ui_cuts.checkBox_cut_indet_endcapA);
+  s.save(d->ui_cuts.checkBox_cut_indet_endcapC);
+  s.save(d->ui_cuts.checkBox_cut_pixel_minnrdo);
+  s.save(d->ui_cuts.checkBox_cut_sct_excludeisolatedclusters);
+  s.save(d->ui_cuts.checkbox_cut_trt_needHT);
+  s.save(d->ui_cuts.checkbox_cut_trt_TotMin);
+  s.save(d->ui_cuts.checkbox_cut_trt_TotMax);
+  s.save(d->ui_cuts.checkBox_cut_mdt_excludeisolateddrifttubes);
+  s.save(d->ui_disp.checkBox_highlight_mdt_ADC_below);
+  s.save(d->ui_cuts.checkBox_cut_mdt_excludemaskedhits);
+  s.save(d->ui_cuts.checkBox_cut_mdt_ADClowerbound);
+  s.save(d->ui_cuts.checkBox_cut_mdt_ADCupperbound);
+  s.save(d->ui_disp.checkBox_showpixel_projected);
+  s.save(d->ui_disp.checkBox_showsct_projected);
+  s.save(d->ui_disp.checkBox_showtrt_projected);
+  s.save(d->ui_disp.checkBox_showmdt_projected);
+  s.save(d->ui_disp.checkBox_showrpc_projected);
+  s.save(d->ui_disp.checkBox_showcsc_projected);
+  s.save(d->ui_disp.checkBox_showtgc_projected);
+  // s.save(d->ui_disp.checkBox_showstgc_projected);
+  s.save(d->ui_disp.horizontalSlider_highlights_intensity);
+  s.save(d->ui_cuts.spinBox_cut_pixel_minnrdo);
+  s.save(d->ui_cuts.spinBox_cut_trt_ToTMin);
+  s.save(d->ui_cuts.spinBox_cut_trt_ToTMax);
+  s.save(d->ui_disp.spinBox_highlight_mdt_ADC_below);
+  s.save(d->ui_cuts.spinBox_cut_mdt_ADClowerbound);
+  s.save(d->ui_cuts.spinBox_cut_mdt_ADCupperbound);
+  s.save(d->ui_disp.materialbutton_highlights_material);
+  s.save(d->ui_int.checkBox_selModeMultiple);
+  s.save(d->ui_int.checkBox_showSelectionLine);
+  s.save(d->ui_int.matButton_multiselline);
+  s.save(d->ui_cuts.etaPhiCutWidget);
+  s.save(d->ui_disp.widget_drawOptions_PixelSCT);
+  s.save(d->ui_disp.widget_drawOptions_TRT);
+  s.save(d->ui_disp.widget_drawOptions_Muons);
+  s.save(d->ui_int.checkBox_printinfo);
+  s.save(d->ui_int.checkBox_zoom);
+  s.save(d->ui_int.checkBox_zoom_orientToMuonChamber);
+
+  s.save(d->ui_cuts.spinBox_cut_trt_LEMin);//Version 1+
+  s.save(d->ui_cuts.spinBox_cut_trt_LEMax);//Version 1+
+  s.save(d->ui_cuts.checkbox_cut_trt_LeMin);//Version 1+
+  s.save(d->ui_cuts.checkbox_cut_trt_LeMax);//Version 1+
+
+  s.save(d->ui_disp.checkBox_drawErrors);//Version 2+
+  s.save(d->ui_disp.checkBox_drawRDOs);//Version 2+
+
+  s.save(d->ui_cuts.comboBox_mdt_cutMdtDriftCircleStatus);//Version 3+
+  s.save(d->ui_cuts.checkBox_cut_mdt_limitToActiveChambers);//Version 3+
+
+  //Not used yet:
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_on_track);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_not_on_track);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_on_segments);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_not_on_segments);
+
+}
+
+
+//____________________________________________________________________
+void PRDSystemController::actualRestoreSettings(VP1Deserialise& s)
+{
+  if (s.version()<0||s.version()>3) {
+    message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
+    return;
+  }
+  s.restore(d->ui_disp.checkBox_colourByTrack);
+  s.restore(d->ui_disp.checkBox_colourBySegment);
+  s.restore(d->ui_disp.checkBox_highlight_trackoutliers);
+  s.restore(d->ui_disp.checkBox_highlight_trtht);
+  s.restore(d->ui_disp.checkBox_highlight_maskedmdts);
+  s.restore(d->ui_cuts.checkBox_cut_indet_barrelA);
+  s.restore(d->ui_cuts.checkBox_cut_indet_barrelC);
+  s.restore(d->ui_cuts.checkBox_cut_indet_endcapA);
+  s.restore(d->ui_cuts.checkBox_cut_indet_endcapC);
+  s.restore(d->ui_cuts.checkBox_cut_pixel_minnrdo);
+  s.restore(d->ui_cuts.checkBox_cut_sct_excludeisolatedclusters);
+  s.restore(d->ui_cuts.checkbox_cut_trt_needHT);
+  s.restore(d->ui_cuts.checkbox_cut_trt_TotMin);
+  s.restore(d->ui_cuts.checkbox_cut_trt_TotMax);
+  s.restore(d->ui_cuts.checkBox_cut_mdt_excludeisolateddrifttubes);
+  s.restore(d->ui_disp.checkBox_highlight_mdt_ADC_below);
+  s.restore(d->ui_cuts.checkBox_cut_mdt_excludemaskedhits);
+  s.restore(d->ui_cuts.checkBox_cut_mdt_ADClowerbound);
+  s.restore(d->ui_cuts.checkBox_cut_mdt_ADCupperbound);
+  s.restore(d->ui_disp.checkBox_showpixel_projected);
+  s.restore(d->ui_disp.checkBox_showsct_projected);
+  s.restore(d->ui_disp.checkBox_showtrt_projected);
+  s.restore(d->ui_disp.checkBox_showmdt_projected);
+  s.restore(d->ui_disp.checkBox_showrpc_projected);
+  s.restore(d->ui_disp.checkBox_showcsc_projected);
+  s.restore(d->ui_disp.checkBox_showtgc_projected);
+  // s.restore(d->ui_disp.checkBox_showstgc_projected);
+  s.restore(d->ui_disp.horizontalSlider_highlights_intensity);
+  s.restore(d->ui_cuts.spinBox_cut_pixel_minnrdo);
+  s.restore(d->ui_cuts.spinBox_cut_trt_ToTMin);
+  s.restore(d->ui_cuts.spinBox_cut_trt_ToTMax);
+  s.restore(d->ui_disp.spinBox_highlight_mdt_ADC_below);
+  s.restore(d->ui_cuts.spinBox_cut_mdt_ADClowerbound);
+  s.restore(d->ui_cuts.spinBox_cut_mdt_ADCupperbound);
+  s.restore(d->ui_disp.materialbutton_highlights_material);
+  s.restore(d->ui_int.checkBox_selModeMultiple);
+  s.restore(d->ui_int.checkBox_showSelectionLine);
+  s.restore(d->ui_int.matButton_multiselline);
+  s.restore(d->ui_cuts.etaPhiCutWidget);
+  s.restore(d->ui_disp.widget_drawOptions_PixelSCT);
+  s.restore(d->ui_disp.widget_drawOptions_TRT);
+  s.restore(d->ui_disp.widget_drawOptions_Muons);
+  s.restore(d->ui_int.checkBox_printinfo);
+  s.restore(d->ui_int.checkBox_zoom);
+  s.restore(d->ui_int.checkBox_zoom_orientToMuonChamber);
+
+  if (s.version()>=1) {
+    s.restore(d->ui_cuts.spinBox_cut_trt_LEMin);
+    s.restore(d->ui_cuts.spinBox_cut_trt_LEMax);
+    s.restore(d->ui_cuts.checkbox_cut_trt_LeMin);
+    s.restore(d->ui_cuts.checkbox_cut_trt_LeMax);
+  }
+
+  if (s.version()>=2) {
+    s.restore(d->ui_disp.checkBox_drawErrors);
+    s.restore(d->ui_disp.checkBox_drawRDOs);
+  }
+  
+  if (s.version()>=3) {
+    s.restore(d->ui_cuts.comboBox_mdt_cutMdtDriftCircleStatus);
+    s.restore(d->ui_cuts.checkBox_cut_mdt_limitToActiveChambers);
+  }
+  
+  //Not used yet:
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_on_track);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_not_on_track);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_hits_on_segments);
+  s.ignoreWidget(d->ui_cuts.checkBox_cuts_ts_exclude_not_on_segments);
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Test for possible changes in values and emit signals as appropriate:
+// (possibleChange_XXX() slots code provided by macros)
+#define VP1CONTROLLERCLASSNAME PRDSystemController
+#include "VP1Base/VP1ControllerMacros.h"
+
+//The actual code for each variable:
+POSSIBLECHANGE_IMP(projectPixelHits)
+POSSIBLECHANGE_IMP(projectSCTHits)
+POSSIBLECHANGE_IMP(projectTRTHits)
+POSSIBLECHANGE_IMP(projectMDTHits)
+POSSIBLECHANGE_IMP(projectRPCHits)
+POSSIBLECHANGE_IMP(projectCSCHits)
+POSSIBLECHANGE_IMP(projectTGCHits)
+// POSSIBLECHANGE_IMP(projectSTGCHits)
+POSSIBLECHANGE_IMP(highLightMaterialWeight)
+POSSIBLECHANGE_IMP(inDetPartsUsingProjections)
+POSSIBLECHANGE_IMP(cutAllowedEta)
+POSSIBLECHANGE_IMP(cutAllowedPhi)
+POSSIBLECHANGE_IMP(inDetPartsFlags)
+POSSIBLECHANGE_IMP(trtMinToT)
+POSSIBLECHANGE_IMP(trtMaxToT)
+POSSIBLECHANGE_IMP(trtMinLE)
+POSSIBLECHANGE_IMP(trtMaxLE)
+POSSIBLECHANGE_IMP(trtRequireHT)
+POSSIBLECHANGE_IMP(pixelMinNRDOPerCluster)
+POSSIBLECHANGE_IMP(sctExcludeIsolatedClusters)
+POSSIBLECHANGE_IMP(mdtMinNHitsPerStation)
+POSSIBLECHANGE_IMP(mdtAllowedADCValues)
+POSSIBLECHANGE_IMP(mdtExcludeMaskedHits)
+POSSIBLECHANGE_IMP(mdt_cutMdtDriftCircleStatus)
+POSSIBLECHANGE_IMP(shownCollectionTypes)
+POSSIBLECHANGE_IMP(limitToActiveChambers)
+POSSIBLECHANGE_IMP(selectionModeMultiple)
+POSSIBLECHANGE_IMP(showSelectionLine)
+POSSIBLECHANGE_IMP(colourMethod)
+POSSIBLECHANGE_IMP(highLightOutliers)
+POSSIBLECHANGE_IMP(drawErrors)
+POSSIBLECHANGE_IMP(drawRDOs)
+POSSIBLECHANGE_IMP(highLightTRTHitsByHighThreshold)
+POSSIBLECHANGE_IMP(highLightMDTHitsByMask)
+POSSIBLECHANGE_IMP(highLightMDTHitsByUpperADCBound)
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDTrackSegmentHelper.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDTrackSegmentHelper.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3050e54d9177685d50a004b2bcda3b56213e1b95
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDTrackSegmentHelper.cxx
@@ -0,0 +1,532 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class PRDTrackSegmentHelper             //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: December 2007                            //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/PRDTrackSegmentHelper.h"
+#include "VP1PRDSystems/PRDCollHandleBase.h"
+#include "VP1PRDSystems/PRDHandleBase.h"
+
+#include "TrkMeasurementBase/MeasurementBase.h"
+#include "TrkRIO_OnTrack/RIO_OnTrack.h"
+#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h"
+#include "DataModel/DataVector.h"
+#include "TrkTrack/Track.h"
+#include "TrkSegment/Segment.h"
+
+#include <set>
+
+//____________________________________________________________________
+class PRDTrackSegmentHelper::Imp {
+public:
+  PRDTrackSegmentHelper * theclass;
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >* prd2handles;
+
+  std::map< const Trk::Track*, const SoMaterial* > tracks2mat;
+  std::map< const Trk::Segment*, const SoMaterial* > segments2mat;
+
+
+  void addTrackToPRDs(const Trk::Track *, bool outliers );
+  void removeTrackFromPRDs(const Trk::Track *, bool outliers);
+  void updateMaterialOfPRDs(const Trk::Track *, bool outliers );
+
+  void addSegmentToPRDs(const Trk::Segment * );
+  void removeSegmentFromPRDs(const Trk::Segment *);
+  void updateMaterialOfPRDs(const Trk::Segment * );
+
+  template <class T>
+  void removeEntryFromVector(std::vector<T*>&v,T*t);//Removes first occurrence of t from v (does nothing if not found).
+                                                    //Element order is not preserved. FIXME: To utility class.
+
+  //static inline const Trk::PrepRawData* measurementToPRD(const Trk::MeasurementBase*);//Might return null.
+  static inline std::vector<const Trk::PrepRawData*> measurementToPRDs(const Trk::MeasurementBase*);//Might return empty vector.
+
+  //We keep this map around in order to give track associations for
+  //prds (in particular those whose handles are created after the
+  //change in visible tracks):
+  //
+  //NB (TK): I guess a track association tool could do this too - but
+  //why add that dependency for something which is dead simple?
+  std::map< const Trk::PrepRawData*,TracksAndSegments > prdsOnTracksAndSegments;
+
+};
+
+//____________________________________________________________________
+template <class T>
+void PRDTrackSegmentHelper::Imp::removeEntryFromVector(std::vector<T*>&v,T*t)
+{
+  const unsigned n(v.size());
+  for (unsigned i(0); i<n;++i) {
+    if (v[i]==t) {
+      if (i==n-1) {
+	v.resize(n-1);
+	return;
+      } else {
+	v[i]=v[n-1];
+	v.resize(n-1);
+	return;
+      }
+    }
+  }
+}
+
+//____________________________________________________________________
+PRDTrackSegmentHelper::PRDTrackSegmentHelper(std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >* prd2handles,
+					     IVP1System* sys, QObject * parent)
+  : QObject(parent), VP1HelperClassBase(sys,"PRDTrackSegmentHelper"), d(new Imp)
+{
+  d->theclass = this;
+  d->prd2handles = prd2handles;
+}
+
+//____________________________________________________________________
+PRDTrackSegmentHelper::~PRDTrackSegmentHelper()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >& tracks)
+{
+  //NB: Code here is very similar to code in visibleSegmentsChanged!!
+  messageVerbose("visibleTracksChanged start (old ntracks = "+QString::number(d->tracks2mat.size())
+		 +", new ntracks = "+QString::number(tracks.size())+")");
+
+  if (tracks.empty()) {
+    //Special case #1 - loop over previous track's, remove their pointers from the relevant prd handles + update their materials.
+    messageVerbose("special case #1 - new track list is empty");
+    std::map< const Trk::Track*, const SoMaterial* >::iterator it, itE = d->tracks2mat.end();
+    for (it=d->tracks2mat.begin();it!=itE;++it) {
+      d->removeTrackFromPRDs(it->first,false);//measurements
+      d->removeTrackFromPRDs(it->first,true);//outliers
+    }
+    d->tracks2mat.clear();
+    messageVerbose("visibleTracksChanged end");
+    return;
+  }
+
+  if (d->tracks2mat.empty()) {
+    //special case #2 - no previous tracks, so just loop over incoming
+    //tracks, and add their pointers to the relevant prd handles + update their materials.
+    messageVerbose("special case #2 - old track list is empty");
+    std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator it(tracks.begin()), itE(tracks.end());
+    for (;it!=itE;++it) {
+      d->tracks2mat.insert(*it);
+      d->addTrackToPRDs(it->first, false );//measurements
+      d->addTrackToPRDs(it->first, true );//outliers
+    }
+    messageVerbose("visibleTracksChanged end");
+    return;
+  }
+
+  //Normal case - need to remove some trackpointers, add some, and for others possibly just update their materials.
+  messageVerbose("normal case - neither old, nor new, track lists are empty");
+
+  //First check if any previously visible tracks simply disappeared.
+  // --> Create std::set for faster searches.
+  std::set<const Trk::Track*> newtracksset;
+    std::vector< std::pair<const Trk::Track*, const SoMaterial*> >::const_iterator it(tracks.begin()), itE(tracks.end());
+    for (;it!=itE;++it)
+      newtracksset.insert(it->first);
+  std::set<const Trk::Track*>::const_iterator newtrackssetEnd(newtracksset.end());
+
+  // --> Check old tracks versus this set - remove if no match:
+  std::map< const Trk::Track*, const SoMaterial* >::iterator it2, it2E = d->tracks2mat.end();
+  for (it2=d->tracks2mat.begin();it2!=it2E;) {
+    if (newtracksset.find(it2->first)==newtrackssetEnd) {
+      d->removeTrackFromPRDs(it2->first,false);//measurements
+      d->removeTrackFromPRDs(it2->first,true);//outliers
+      d->tracks2mat.erase(it2++);//postfix ++ operator must be used as here (due to the erase call)
+    } else {
+      it2++;
+    }
+  }
+
+  // Next, check all tracks that are now visible - if not previously
+  // visible we add their pointers to the relevant handles. If just
+  // the material changed, we make sure the prd handle updates its
+  // material.
+  it2E=d->tracks2mat.end();
+  for (it=tracks.begin();it!=itE;++it) {
+    it2 = d->tracks2mat.find(it->first);
+    if (it2==it2E) {
+      d->tracks2mat[it->first] = it->second;
+      d->addTrackToPRDs(it->first, false );//measurements
+      d->addTrackToPRDs(it->first, true );//outliers
+    } else {
+      //we need to update the track material - but only if it changed of course.
+      if (it->second!=it2->second) {
+	d->tracks2mat[it->first] = it->second;
+	d->updateMaterialOfPRDs(it->first, false );//measurements
+	d->updateMaterialOfPRDs(it->first, true );//outliers
+      }
+    }
+  }
+  messageVerbose("visibleTracksChanged end");
+
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >& segments)
+{
+  //NB: Code here is very similar to code in visibleTracksChanged!!
+  messageVerbose("visibleSegmentsChanged start (old nsegments = "+QString::number(d->segments2mat.size())
+		 +", new nsegments = "+QString::number(segments.size())+")");
+
+  if (segments.empty()) {
+    //Special case #1 - loop over previous segment's, remove their pointers from the relevant prd handles + update their materials.
+    messageVerbose("special case #1 - new segment list is empty");
+    std::map< const Trk::Segment*, const SoMaterial* >::iterator it, itE = d->segments2mat.end();
+    for (it=d->segments2mat.begin();it!=itE;++it) {
+      d->removeSegmentFromPRDs(it->first);
+    }
+    d->segments2mat.clear();
+    messageVerbose("visibleSegmentsChanged end");
+    return;
+  }
+
+  if (d->segments2mat.empty()) {
+    //special case #2 - no previous segments, so just loop over incoming
+    //segments, and add their pointers to the relevant prd handles + update their materials.
+    messageVerbose("special case #2 - old segment list is empty");
+    std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator it(segments.begin()), itE(segments.end());
+    for (;it!=itE;++it) {
+      d->segments2mat.insert(*it);
+      d->addSegmentToPRDs(it->first );
+    }
+    messageVerbose("visibleSegmentsChanged end");
+    return;
+  }
+
+  //Normal case - need to remove some segmentpointers, add some, and for others possibly just update their materials.
+  messageVerbose("normal case - neither old, nor new, segment lists are empty");
+
+  //First check if any previously visible segments simply disappeared.
+  // --> Create std::set for faster searches.
+  std::set<const Trk::Segment*> newsegmentsset;
+    std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >::const_iterator it(segments.begin()), itE(segments.end());
+    for (;it!=itE;++it)
+      newsegmentsset.insert(it->first);
+  std::set<const Trk::Segment*>::const_iterator newsegmentssetEnd(newsegmentsset.end());
+
+  // --> Check old segments versus this set - remove if no match:
+  std::map< const Trk::Segment*, const SoMaterial* >::iterator it2, it2E = d->segments2mat.end();
+  for (it2=d->segments2mat.begin();it2!=it2E;) {
+    if (newsegmentsset.find(it2->first)==newsegmentssetEnd) {
+      d->removeSegmentFromPRDs(it2->first);
+      d->segments2mat.erase(it2++);//postfix ++ operator must be used as here (due to the erase call)
+    } else {
+      it2++;
+    }
+  }
+
+  // Next, check all segments that are now visible - if not previously
+  // visible we add their pointers to the relevant handles. If just
+  // the material changed, we make sure the prd handle updates its
+  // material.
+  it2E=d->segments2mat.end();
+  for (it=segments.begin();it!=itE;++it) {
+    it2 = d->segments2mat.find(it->first);
+    if (it2==it2E) {
+      d->segments2mat[it->first] = it->second;
+      d->addSegmentToPRDs(it->first);
+    } else {
+      //we need to update the segment material - but only if it changed of course.
+      if (it->second!=it2->second) {
+	d->segments2mat[it->first] = it->second;
+	d->updateMaterialOfPRDs(it->first);
+      }
+    }
+  }
+  messageVerbose("visibleSegmentsChanged end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::addSegmentToPRDs(const Trk::Segment * seg)
+{
+  // if (verbose())
+  //   theclass->messageVerbose("addSegmentToPRDs start");
+  if (!seg) {
+    theclass->message("ERROR: Received null segment pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData*,TracksAndSegments >::iterator itInfo;
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  std::vector<const Trk::MeasurementBase*>::const_iterator
+    it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      itInfo = prdsOnTracksAndSegments.find(prd);
+      if (itInfo==prdsOnTracksAndSegments.end()) {
+        prdsOnTracksAndSegments.insert(std::pair<const Trk::PrepRawData*,TracksAndSegments>(prd,
+          TracksAndSegments(std::vector<const Trk::Track*>(),
+          std::vector<const Trk::Track*>(),
+          std::vector< const Trk::Segment* >(1,seg))));
+
+      } else {
+        itInfo->second.segments.push_back(seg);
+      }
+      itHandle = prd2handles->find(prd);
+      if (itHandle!=itHandleEnd) {
+        QList<PRDHandleBase*> handles = itHandle->second;
+        foreach (PRDHandleBase*handle,handles)
+          if (handle->collHandle()->colourBySegments())
+          handle->updateMaterial();
+      }
+
+    }
+  }
+  // theclass->messageVerbose("addSegmentToPRDs end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::removeSegmentFromPRDs(const Trk::Segment * seg)
+{
+  // if (verbose())
+  //   theclass->messageVerbose("removeSegmentFromPRDs start");
+  if (!seg) {
+    theclass->message("ERROR: Received null segment pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData*,TracksAndSegments >::iterator itInfo;
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  std::vector<const Trk::MeasurementBase*>::const_iterator
+    it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      itInfo = prdsOnTracksAndSegments.find(prd);
+      if (itInfo!=prdsOnTracksAndSegments.end()) {
+        removeEntryFromVector(itInfo->second.segments,seg);
+        itHandle = prd2handles->find(prd);
+        if (itHandle!=itHandleEnd) {
+          QList<PRDHandleBase*> handles = itHandle->second;
+          foreach (PRDHandleBase*handle,handles)
+            if (handle->collHandle()->colourBySegments())
+            handle->updateMaterial();
+        }
+      }
+    }
+  }
+
+  // if (verbose())
+  //   theclass->messageVerbose("removeSegmentToPRDs end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::updateMaterialOfPRDs(const Trk::Segment * seg)
+{
+  // if (verbose())
+  //   theclass->messageVerbose("updateMaterialOfPRDs(segment) start");
+  if (!seg) {
+    theclass->message("ERROR: Received null segment pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  std::vector<const Trk::MeasurementBase*>::const_iterator
+    it (seg->containedMeasurements().begin()), itE(seg->containedMeasurements().end());
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      itHandle = prd2handles->find(prd);
+      if (itHandle!=itHandleEnd) {
+        QList<PRDHandleBase*> handles = itHandle->second;
+        foreach (PRDHandleBase*handle,handles)
+          if (handle->collHandle()->colourByTracks())
+          handle->updateMaterial();
+      }
+    }
+  }
+
+  // if (verbose())
+  //   theclass->messageVerbose("updateMaterialOfPRDs(segment) end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::addTrackToPRDs(const Trk::Track * trk, bool outliers )
+{
+  // if (verbose())
+  //   theclass->messageVerbose("addTrackToPRDs start");
+  if (!trk) {
+    theclass->message("ERROR: Received null track pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData*,TracksAndSegments >::iterator itInfo;
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  DataVector<const Trk::MeasurementBase>::const_iterator
+    it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
+    itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      if (prd) {
+        itInfo = prdsOnTracksAndSegments.find(prd);
+        if (itInfo==prdsOnTracksAndSegments.end()) {
+          prdsOnTracksAndSegments.insert(std::pair<const Trk::PrepRawData*,TracksAndSegments>(prd,
+            TracksAndSegments((outliers?std::vector<const Trk::Track*>():std::vector<const Trk::Track*>(1,trk)),
+            (outliers?std::vector<const Trk::Track*>(1,trk):std::vector<const Trk::Track*>()),
+            std::vector< const Trk::Segment* >())));
+        } else {
+          if (outliers)
+            itInfo->second.tracks_outliers.push_back(trk);
+          else
+            itInfo->second.tracks.push_back(trk);
+        }
+        itHandle = prd2handles->find(prd);
+        if (itHandle!=itHandleEnd) {
+          QList<PRDHandleBase*> handles = itHandle->second;
+          foreach (PRDHandleBase*handle,handles)
+            if (handle->collHandle()->colourByTracks())
+            handle->updateMaterial();
+        }
+      }
+    }
+  }
+  // if (verbose())
+  //   theclass->messageVerbose("addTrackToPRDs end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::removeTrackFromPRDs(const Trk::Track * trk, bool outliers)
+{
+  // if (verbose())
+  //   theclass->messageVerbose("removeTrackFromPRDs start");
+  if (!trk) {
+    theclass->message("ERROR: Received null track pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData*,TracksAndSegments >::iterator itInfo;
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  DataVector<const Trk::MeasurementBase>::const_iterator
+    it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
+    itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      itInfo = prdsOnTracksAndSegments.find(prd);
+      if (itInfo!=prdsOnTracksAndSegments.end()) {
+        removeEntryFromVector((outliers?itInfo->second.tracks_outliers:itInfo->second.tracks),trk);
+        itHandle = prd2handles->find(prd);
+        if (itHandle!=itHandleEnd) {
+          QList<PRDHandleBase*> handles = itHandle->second;
+          foreach (PRDHandleBase*handle,handles)
+            if (handle->collHandle()->colourByTracks())
+            handle->updateMaterial();
+        }
+      }
+    }
+  }
+
+  // if (verbose())
+  //   theclass->messageVerbose("removeTrackToPRDs end");
+}
+
+//____________________________________________________________________
+void PRDTrackSegmentHelper::Imp::updateMaterialOfPRDs(const Trk::Track * trk, bool outliers )
+{
+  // if (verbose())
+  //   theclass->messageVerbose("updateMaterialOfPRDs(track) start");
+  if (!trk) {
+    theclass->message("ERROR: Received null track pointer!");
+    return;
+  }
+  std::map< const Trk::PrepRawData *, QList<PRDHandleBase *> >::const_iterator itHandle, itHandleEnd(prd2handles->end());
+  DataVector<const Trk::MeasurementBase>::const_iterator
+    it ( outliers ? trk->outliersOnTrack()->begin() : trk->measurementsOnTrack()->begin() ),
+    itE( outliers ? trk->outliersOnTrack()->end() : trk->measurementsOnTrack()->end() );
+  const Trk::PrepRawData * prd;
+  for (;it!=itE;++it) {
+    std::vector<const Trk::PrepRawData*> prds = Imp::measurementToPRDs(*it); // need to handle compound measurements too.
+    std::vector<const Trk::PrepRawData*>::const_iterator itPrd = prds.begin(), itEnd=prds.end();
+    for (;itPrd!=itEnd;itPrd++){
+      prd = *itPrd;
+      itHandle = prd2handles->find(prd);
+      if (itHandle!=itHandleEnd) {
+        QList<PRDHandleBase*> handles = itHandle->second;
+        foreach (PRDHandleBase*handle,handles)
+          if (handle->collHandle()->colourByTracks())
+          handle->updateMaterial();
+      }
+    }
+  }
+
+  // if (verbose())
+  //   theclass->messageVerbose("updateMaterialOfPRDs(track) end");
+}
+
+//____________________________________________________________________
+const PRDTrackSegmentHelper::TracksAndSegments * PRDTrackSegmentHelper::tracksAndSegments(const Trk::PrepRawData* prd)
+{
+  std::map< const Trk::PrepRawData*,TracksAndSegments >::iterator itInfo = d->prdsOnTracksAndSegments.find(prd);
+  return itInfo == d->prdsOnTracksAndSegments.end() ? 0 : &(itInfo->second);
+}
+
+
+//____________________________________________________________________
+inline  std::vector<const Trk::PrepRawData *> PRDTrackSegmentHelper::Imp::measurementToPRDs(const Trk::MeasurementBase* measbase)
+{
+  std::vector<const Trk::PrepRawData *>prds;
+  const Trk::RIO_OnTrack * rio = dynamic_cast<const Trk::RIO_OnTrack *>(measbase);
+  if (rio) prds.push_back( rio ? rio->prepRawData() : 0 );
+  const Trk::CompetingRIOsOnTrack * crot = dynamic_cast<const Trk::CompetingRIOsOnTrack *>(measbase);
+  if (crot) {
+
+	//    for (unsigned int i=0; i< crot->numberOfContainedROTs (); ++i) prds.push_back( crot->rioOnTrack(i) ? crot->rioOnTrack(i)->prepRawData() : 0 );
+    for (unsigned int i=0; i< crot->numberOfContainedROTs (); ++i) {
+    	if (crot->rioOnTrack(i).identify().getString() != "") { // FIXME: search for a better way to see if the rioOnTrack is present
+    		prds.push_back(crot->rioOnTrack(i).prepRawData());
+    	}
+    	else {
+    		prds.push_back(0);
+    	}
+    }
+  }
+  return prds;
+}
+
+//____________________________________________________________________
+inline PRDTrackSegmentHelper::TracksAndSegments::TracksAndSegments(const std::vector<const Trk::Track*>& t,
+								   const std::vector<const Trk::Track*>& to,
+								   const std::vector< const Trk::Segment* >& s )
+  : tracks(t), tracks_outliers(to), segments(s)
+{
+}
+
+//____________________________________________________________________
+SoMaterial * PRDTrackSegmentHelper::trackMaterial(const Trk::Track* t) const
+{
+  std::map< const Trk::Track*, const SoMaterial* >::const_iterator it = d->tracks2mat.find(t);
+  return it == d->tracks2mat.end() ? 0 : const_cast<SoMaterial *>(it->second);//fixme; const_cast is temporary hack. Remove const from materials!
+}
+
+//____________________________________________________________________
+SoMaterial * PRDTrackSegmentHelper::segmentMaterial(const Trk::Segment* s) const
+{
+  std::map< const Trk::Segment*, const SoMaterial* >::const_iterator it = d->segments2mat.find(s);
+  return it == d->segments2mat.end() ? 0 : const_cast<SoMaterial *>(it->second);//fixme; const_cast is temporary hack. Remove const from materials!
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/TouchedMuonChamberHelper.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/TouchedMuonChamberHelper.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c4d276a3f08f4241d854840b31573fcf73bf6e6a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/TouchedMuonChamberHelper.cxx
@@ -0,0 +1,121 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+////////////////////////////////////////////////////////////////
+//                                                            //
+//  Implementation of class TouchedMuonChamberHelper          //
+//                                                            //
+//  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)  //
+//  Initial version: January 2008                             //
+//                                                            //
+////////////////////////////////////////////////////////////////
+
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+#include <QtCore/QTimer>
+#include <map>
+#include <set>
+#include <iostream>
+
+//____________________________________________________________________
+class TouchedMuonChamberHelper::Imp {
+public:
+  TouchedMuonChamberHelper * theclass;
+  bool updatesnotcheduled;//true if a timer has already been fired to check status after
+  inline void ensureScheduleUpdate();
+  std::set<GeoPVConstLink> lastEmittedSet;
+  std::map<GeoPVConstLink,unsigned> pv2count;//For keeping track of the number
+		                             //of shown objects's within a given
+                                             //chamber at any given time.
+  std::set<GeoPVConstLink> touchedByTracksSet; // Filled by signal emitted by TrackSystem
+};
+
+
+//____________________________________________________________________
+TouchedMuonChamberHelper::TouchedMuonChamberHelper( QObject * parent )
+  : QObject(parent), d(new Imp)
+{
+  d->theclass = this;
+  d->updatesnotcheduled = true;
+}
+
+//____________________________________________________________________
+TouchedMuonChamberHelper::~TouchedMuonChamberHelper()
+{
+  delete d;
+}
+
+//____________________________________________________________________
+inline void TouchedMuonChamberHelper::Imp::ensureScheduleUpdate()
+{
+  if (updatesnotcheduled) {
+    updatesnotcheduled = false;
+    QTimer::singleShot(0, theclass, SLOT(checkForChangeInTouchedChambers()));
+  }
+}
+
+//____________________________________________________________________
+void TouchedMuonChamberHelper::incrementNumberOfObjectsForPV(const GeoPVConstLink& chamberPV)
+{
+  std::map<GeoPVConstLink,unsigned>::iterator it(d->pv2count.find(chamberPV));
+  if (it==d->pv2count.end()) {
+    d->pv2count[chamberPV] = 1;
+    d->ensureScheduleUpdate();//First object in chamber
+    return;
+  }
+  ++(it->second);
+  if (d->updatesnotcheduled&&it->second==1)
+    d->ensureScheduleUpdate();//First object in chamber
+}
+
+//____________________________________________________________________
+void TouchedMuonChamberHelper::decrementNumberOfObjectsForPV(const GeoPVConstLink& chamberPV)
+{
+  std::map<GeoPVConstLink,unsigned>::iterator it(d->pv2count.find(chamberPV));
+  if (it==d->pv2count.end()||it->second==0) {
+    std::cout<<" TouchedMuonChamberHelper::decrementNumberOfObjectsForPV Error: Asked to decrement to negative values!"<<std::endl;
+    return;
+  }
+  --(it->second);
+  if (d->updatesnotcheduled&&it->second==0)
+    d->ensureScheduleUpdate();//Last object in chamber
+}
+
+//____________________________________________________________________
+bool TouchedMuonChamberHelper::isTouchedByTrack(const GeoPVConstLink& chamberPV)
+{
+  return (d->touchedByTracksSet.find(chamberPV)!=d->touchedByTracksSet.end());
+}
+
+//____________________________________________________________________
+void TouchedMuonChamberHelper::checkForChangeInTouchedChambers()
+{
+  d->updatesnotcheduled = true;
+
+  std::set<GeoPVConstLink> touchedchambers;
+  std::map<GeoPVConstLink,unsigned>::const_iterator it(d->pv2count.begin()),itE(d->pv2count.end());
+  for (;it!=itE;++it) {
+    if (it->second>0)
+      touchedchambers.insert(it->first);
+  }
+
+  if (d->lastEmittedSet!=touchedchambers) {
+    d->lastEmittedSet = touchedchambers;
+    emit touchedMuonChambersChanged(touchedchambers);
+  }
+}
+
+void TouchedMuonChamberHelper::updateTouchedByTracks(const std::set<GeoPVConstLink>& set){
+  // std::cout<<"TouchedMuonChamberHelper::updateTouchedByTracks - set is this big: "<<set.size()<<std::endl;
+  d->touchedByTracksSet=set;
+  emit muonChambersTouchedByTracksChanged();
+}
+
+//____________________________________________________________________
+void TouchedMuonChamberHelper::eraseEventData()
+{
+  d->pv2count.clear();
+  d->touchedByTracksSet.clear();
+  checkForChangeInTouchedChambers();
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/VP1PrepRawDataSystem.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/VP1PrepRawDataSystem.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..28b713a34d73da67c26794f73896b671ee6b3162
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/VP1PrepRawDataSystem.cxx
@@ -0,0 +1,612 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+//Fixme: cleanup includes.
+#include "VP1Utils/VP1JobConfigInfo.h"
+#include "VP1Utils/VP1DetInfo.h"
+#include "VP1PRDSystems/VP1PrepRawDataSystem.h"
+#include "VP1PRDSystems/PRDSystemController.h"
+#include "VP1PRDSystems/PRDSysCommonData.h"
+#include "VP1PRDSystems/PRDHandleBase.h"
+#include "VP1PRDSystems/PRDTrackSegmentHelper.h"
+#include "VP1PRDSystems/PRDCollHandle_CSC.h"
+#include "VP1PRDSystems/PRDCollHandle_CSC_Strip.h"
+#include "VP1PRDSystems/PRDCollHandle_MDT.h"
+#include "VP1PRDSystems/PRDCollHandle_MM.h"
+#include "VP1PRDSystems/PRDCollHandle_Pixel.h"
+#include "VP1PRDSystems/PRDCollHandle_RPC.h"
+#include "VP1PRDSystems/PRDCollHandle_SCT.h"
+#include "VP1PRDSystems/PRDCollHandle_TGC.h"
+#include "VP1PRDSystems/PRDCollHandle_sTGC.h"
+#include "VP1PRDSystems/PRDCollHandle_TRT.h"
+#include "VP1PRDSystems/PRDCollHandle_SpacePoints.h"
+#include "VP1PRDSystems/TouchedMuonChamberHelper.h"
+
+#include "VP1Base/VP1Serialise.h"
+#include "VP1Base/VP1Deserialise.h"
+#include "VP1Base/VP1CollectionWidget.h"
+#include "VP1Base/SoCooperativeSelection.h"
+#include "VP1Base/VP1QtInventorUtils.h"
+#include "VP1Base/VP1CameraHelper.h"
+
+#include <QtCore/QBuffer>
+#include <QtCore/QByteArray>
+
+#include <Inventor/nodes/SoSeparator.h>
+#include <Inventor/nodes/SoComplexity.h>
+#include <Inventor/nodes/SoTransform.h>
+#include <Inventor/nodes/SoMaterial.h>
+#include <Inventor/nodes/SoDrawStyle.h>
+#include <Inventor/nodes/SoSwitch.h>
+#include <Inventor/nodes/SoLineSet.h>
+#include <Inventor/nodes/SoPickStyle.h>
+#include <Inventor/nodes/SoVertexProperty.h>
+#include <Inventor/SoPath.h>
+
+#include <map>
+
+//Fixme: Update visuals if any detail level changes!
+
+//____________________________________________________________________
+class VP1PrepRawDataSystem::Imp {
+public:
+  VP1PrepRawDataSystem * theclass;
+  PRDSysCommonData * common;
+  PRDSystemController * controller;
+  SoCooperativeSelection * selNode_click;
+  SoCooperativeSelection * selNode_highlight;
+  
+  InDetProjFlags::InDetProjPartsFlags idprojflags_pixel;
+  InDetProjFlags::InDetProjPartsFlags idprojflags_sct;
+  InDetProjFlags::InDetProjPartsFlags idprojflags_trt;
+  int appropriatemdtprojection;
+  
+  SoSeparator * multisel_sep;
+  void clearMultiSelLine() {
+    while (multisel_sep&&multisel_sep->getNumChildren()>2)
+      multisel_sep->removeChild(2);
+  }
+  
+  QList<PRDHandleBase*> currentlySelectedHandles;
+  QList<const Trk::PrepRawData*> lastEmittedPRDList;
+  void selectionChanged() {
+    currentlySelectedHandles.removeAll(0);//just to be sure
+    clearMultiSelLine();
+    
+    //Proper highlighting:
+    if (selNode_highlight) {
+      selNode_highlight->deselectAll();
+      foreach(PRDHandleBase*handle,currentlySelectedHandles) {
+        // 	theclass->messageDebug("Highlighting handle...");
+        SoSeparator* target = handle->collHandle()->simpleDetailLevel() ? handle->sepSimple() : handle->sepDetailed();
+        SoPath * path = new SoPath(selNode_highlight);
+        path->ref();
+        // 	theclass->messageDebug("Attempting to highlight sep="+str(target));
+        if (!VP1QtInventorUtils::changePathTail(path,selNode_highlight,target)) {
+          theclass->message("ERROR: Failed to relocate picked node.");
+          path->unref();
+          continue;
+        }
+        selNode_highlight->select(path);
+        path->unref();
+      }
+      selNode_highlight->touch();
+      if (multisel_sep&&currentlySelectedHandles.count()>1&&controller->showSelectionLine()) {
+        SoLineSet * line = new SoLineSet;
+        SoVertexProperty * vertices = new SoVertexProperty;
+        line->vertexProperty = vertices;
+        line->numVertices.set1Value(0,currentlySelectedHandles.count());
+        int i(0);
+        foreach(PRDHandleBase*handle,currentlySelectedHandles) {
+          Amg::Vector3D pos(handle->center());
+          vertices->vertex.set1Value(i++,pos.x(),pos.y(),pos.z());
+        }
+        multisel_sep->addChild(line);
+        //Fixme: make this unpickable!!
+        
+      }
+    }
+    
+    //emit signal if appropriate:
+    QList<const Trk::PrepRawData*> currentPRDs;
+    for(int i = 0; i < currentlySelectedHandles.count(); ++i) {
+      PRDHandleBase*handle = currentlySelectedHandles.at(i);
+      const Trk::PrepRawData* prd1 = handle->getPRD();
+      const Trk::PrepRawData* prd2 = handle->getSecondPRD();
+      if (prd1&&currentPRDs.contains(prd1)) prd1 = 0;
+      if (prd2&&currentPRDs.contains(prd2)) prd2 = 0;
+      if (!prd2) {
+        if (!prd1)
+          continue;
+        currentPRDs << prd1;
+      } else {
+        //both prd1 and prd2 are non-zero and not in the list
+        //already. Which should be first? We order them by distance to
+        //the preceding or following prd.
+        
+        Amg::Vector3D p1(handle->positionPRD());
+        Amg::Vector3D p2(handle->positionSecondPRD());
+        
+        if (i>0) {
+          Amg::Vector3D prevpos = currentlySelectedHandles.at(i-1)->center();
+          if ((p1-prevpos).mag2()>(p2-prevpos).mag2()) {
+            //prd2 before prd1
+            currentPRDs << prd2;
+            currentPRDs << prd1;
+          } else {
+            //prd1 before prd2
+            currentPRDs << prd1;
+            currentPRDs << prd2;
+          }
+        } else {
+          if (i+1<currentlySelectedHandles.count()) {
+            Amg::Vector3D nextpos = currentlySelectedHandles.at(i+1)->center();
+            if ((p1-nextpos).mag2()>(p2-nextpos).mag2()) {
+              //prd1 before prd2
+              currentPRDs << prd1;
+              currentPRDs << prd2;
+            } else {
+              //prd2 before prd1
+              currentPRDs << prd2;
+              currentPRDs << prd1;
+            }
+          } else {
+            //Only this one. Just add them:
+            currentPRDs << prd1;
+            currentPRDs << prd2;
+          }
+        }
+      }
+    }
+    if (currentPRDs!=lastEmittedPRDList) {
+      lastEmittedPRDList = currentPRDs;
+      theclass->messageVerbose("Emitting list of "+str(lastEmittedPRDList.count())+" selected PRDs");
+      emit theclass->selectedPRDsChanged(lastEmittedPRDList);
+    }
+  }
+  
+  template <class T>
+  QList<PRDCollHandleBase*> createSpecificCollections() {
+    QList<PRDCollHandleBase*> l;
+    foreach (QString name, T::availableCollections(theclass)) {
+      T * col = new T(common,name);
+      col->init();
+      l << col;
+    }
+    return l;
+  }
+  QList<PRDCollHandleBase*> createCollections() {
+    QList<PRDCollHandleBase*> l;
+    l << createSpecificCollections<PRDCollHandle_Pixel>();
+    l << createSpecificCollections<PRDCollHandle_SCT>();
+    l << createSpecificCollections<PRDCollHandle_TRT>();
+    l << createSpecificCollections<PRDCollHandle_SpacePoints>();
+    l << createSpecificCollections<PRDCollHandle_CSC>();
+    l << createSpecificCollections<PRDCollHandle_CSC_Strip>();
+    l << createSpecificCollections<PRDCollHandle_MDT>();
+    l << createSpecificCollections<PRDCollHandle_MM>();
+    l << createSpecificCollections<PRDCollHandle_RPC>();
+    l << createSpecificCollections<PRDCollHandle_TGC>();
+    l << createSpecificCollections<PRDCollHandle_sTGC>();
+    return l;
+  }
+  
+  void ensureInitCommonData() {
+    if (!common) {
+      theclass->ensureBuildController();
+      common = new PRDSysCommonData(theclass,controller);
+    }
+  }
+};
+
+//_____________________________________________________________________________________
+VP1PrepRawDataSystem::VP1PrepRawDataSystem()
+: IVP13DSystemSimple("Hits",
+                     "System showing tracking hits (PRD's)",
+                     "Edward.Moyse@cern.ch, Thomas.Kittelmann@cern.ch"), d(new Imp)
+{
+  d->theclass = this;
+  d->common = 0;
+  d->controller = 0;
+  d->idprojflags_pixel = InDetProjFlags::NoProjections;
+  d->idprojflags_sct = InDetProjFlags::NoProjections;
+  d->idprojflags_trt = InDetProjFlags::NoProjections;
+  d->appropriatemdtprojection = 0;
+  d->selNode_click = 0;
+  d->selNode_highlight = 0;
+  d->multisel_sep = 0;
+  
+}
+
+//_____________________________________________________________________________________
+VP1PrepRawDataSystem::~VP1PrepRawDataSystem()
+{
+  delete d;
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::systemcreate(StoreGateSvc* /*detstore*/)
+{
+  messageVerbose("systemcreate");
+  if (VP1JobConfigInfo::hasMuonGeometry()&&!VP1DetInfo::muonDetMgr())
+    message("Error: Can't retrieve MuonDetectorManager. Expect reduced performance and functionality.");//Fixme: Only if any muon collections are present!
+  d->ensureInitCommonData();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::systemuncreate()
+{
+  if (d->multisel_sep) {
+    d->multisel_sep->unref();
+    d->multisel_sep=0;
+  }
+  
+  delete d->common; d->common = 0;
+  d->controller = 0;
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::systemerase()
+{
+  messageVerbose("systemerase");
+  
+  deselectAll();
+  
+  d->common->controller()->collWidget()->clear();
+  
+  d->common->clearEventData();
+  
+  if (d->selNode_click) {
+    unregisterSelectionNode(d->selNode_click);
+    unregisterSelectionNode(d->selNode_highlight);
+    d->selNode_click->unref();
+    d->selNode_click=0;
+    d->selNode_highlight->unref();
+    d->selNode_highlight=0;
+  }
+  
+  d->clearMultiSelLine();
+  
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::buildPermanentSceneGraph(StoreGateSvc* /*detstore*/, SoSeparator * /*root*/)
+{
+  messageVerbose("buildPermanentSceneGraph (does not do anything)");
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::buildEventSceneGraph(StoreGateSvc*, SoSeparator *root)
+{
+  messageVerbose("buildEventSceneGraph");
+  
+  // set complexity to a lower value, so that e.g. the straws are manageable
+  SoComplexity * complexity = new SoComplexity;
+  complexity->value.setValue(0.3f);//Fixme: Hardcoded here and elsewhere
+  root->addChild(complexity);
+  
+  //   //Point sizes and line widths:
+  //   root->addChild(d->controller->prdDrawStyle());
+  
+  //Create collection list based on contents of event store, inform
+  //about projections, populate gui and apply states:
+  QList<PRDCollHandleBase*> cols = d->createCollections();
+  
+  //Inform about appropriate projects:
+  foreach (PRDCollHandleBase* col,cols) {
+    
+    connect(col,SIGNAL(detailLevelChanged()),this,SLOT(updateSelectionVisualsAndPossiblyEmitPRDList()));
+    
+    PRDCollHandle_MDT* mdtcol = dynamic_cast<PRDCollHandle_MDT*>(col);
+    if (mdtcol) {
+      mdtcol->setAppropriateProjection( d->appropriatemdtprojection );
+      continue;
+    }
+    
+    PRDCollHandle_TRT* trtcol = dynamic_cast<PRDCollHandle_TRT*>(col);
+    if (trtcol) {
+      trtcol->setAppropriateProjection(d->idprojflags_trt);//NB: Add for pixel/sct as well once supported!
+      continue;
+    }
+    
+  }
+  
+  d->controller->collWidget()->setCollections(cols);
+  
+  
+  //Add collections to event scenegraph:
+  d->selNode_click = new SoCooperativeSelection;
+  d->selNode_click->ref();
+  d->selNode_highlight = new SoCooperativeSelection;
+  d->selNode_highlight->ref();
+  d->selNode_click->activePolicy = SoCooperativeSelection::ACTIVE;
+  d->selNode_highlight->activePolicy = SoCooperativeSelection::INERT;
+  d->selNode_click->policy = SoCooperativeSelection::SINGLE;
+  d->selNode_highlight->policy = SoCooperativeSelection::SINGLE;
+  
+  foreach (VP1StdCollection* col,d->controller->collWidget()->collections<VP1StdCollection>())
+  d->selNode_click->addChild(col->collSwitch());
+  d->selNode_highlight->addChild(d->selNode_click);
+  root->addChild(d->selNode_highlight);
+  
+  registerSelectionNode(d->selNode_click);
+  registerSelectionNode(d->selNode_highlight);
+  
+  if (!d->multisel_sep) {
+    d->multisel_sep = new SoSeparator;
+    d->multisel_sep->ref();
+    SoPickStyle * ps = new SoPickStyle;
+    ps->style= SoPickStyle::UNPICKABLE;
+    d->multisel_sep->addChild(ps);
+    d->multisel_sep->addChild(d->controller->getMultiSelectionLineMaterial());
+  }
+  root->addChild(d->multisel_sep);
+  
+  
+  messageVerbose("buildEventSceneGraph done");
+  
+}
+
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::deselectAll(SoCooperativeSelection* exception_sel)
+{
+  if (exception_sel)
+    message("WARNING: The PRD system always deselects all registered nodes/");
+  IVP13DSystemSimple::deselectAll(0);
+  d->currentlySelectedHandles.clear();
+  d->selectionChanged();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::selectionVisualsChanged()
+{
+  d->selectionChanged();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::clearSelection()
+{
+  messageVerbose("clearSelection");
+  deselectAll();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::selectionModeChanged()
+{
+  messageVerbose("selectionModeChanged");
+  deselectAll();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::updateSelectionVisualsAndPossiblyEmitPRDList()
+{
+  messageVerbose("updateSelectionVisualsAndPossiblyEmitPRDList");
+  d->selectionChanged();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::userPickedNode(SoNode*, SoPath *)
+{
+  messageVerbose("userPickedNode");
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::userSelectedSingleNode(SoCooperativeSelection* sel, SoNode*, SoPath*pickedPath)
+{
+  if (d->selNode_highlight==sel)
+    return;
+  messageVerbose("userSelectedSingleNode");
+  PRDHandleBase * handle = d->common->pickedPathToHandle(pickedPath);//This also pops the path, so that all shape nodes
+  //making up the whole shape will be highlighted
+  sel->deselectAll();
+  
+  if (!handle) {
+    deselectAll();
+    message("Error: Could not identify picked node");
+    return;
+  }
+  
+  if (!d->controller->selectionModeMultiple()) {
+    if (d->currentlySelectedHandles.count()==1&&*(d->currentlySelectedHandles.begin())==handle)
+      return;
+    d->currentlySelectedHandles.clear();
+    d->currentlySelectedHandles<<handle;
+    if (handle->inMuonChamber()&&d->controller->muonOrientToChambersOnClick()) {
+      messageVerbose("emits prdInMuonChamberSelected");
+      emit prdInMuonChamberSelected(handle->parentMuonChamberPV());
+    } else if (d->controller->zoomOnClick()) {
+      std::set<SoCamera*> cameras(getCameraList());
+      std::set<SoCamera*>::iterator it,itE = cameras.end();
+      for (it=cameras.begin();it!=itE;++it)
+        VP1CameraHelper::animatedZoomToPath(*it,handle->collHandle()->collSep(),pickedPath,2.0,1.0);
+    }
+    if (d->controller->printInfoOnClick()) {
+      foreach (QString line, handle->clicked())
+      message(line);
+    }
+  } else {
+    if (d->currentlySelectedHandles.contains(handle)) {
+      d->currentlySelectedHandles.removeAll(handle);
+    } else {
+      d->currentlySelectedHandles << handle;
+    }
+  }
+  
+  d->selectionChanged();
+  
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::userDeselectedSingleNode(SoCooperativeSelection* sel, SoNode*, SoPath*)
+{
+  if (d->selNode_highlight==sel)
+    return;
+  //  messageVerbose("userDeselectedSingleNode");
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::userChangedSelection(SoCooperativeSelection*sel , QSet<SoNode*>, QSet<SoPath*>)
+{
+  if (d->selNode_highlight==sel)
+    return;
+  messageVerbose("userChangedSelection");
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::userClickedOnBgd()
+{
+  messageVerbose("userClickedOnBgd");
+  if (!d->controller->selectionModeMultiple()) {
+    d->currentlySelectedHandles.clear();
+    d->selectionChanged();
+  }
+}
+
+
+//_____________________________________________________________________________________
+QWidget * VP1PrepRawDataSystem::buildController()
+{
+  messageVerbose("buildController");
+  d->controller = new PRDSystemController(this);
+  
+  messageVerbose("Passing ID projection settings on to collWidget");
+  
+  connect(d->controller,SIGNAL(selectionModeMultipleChanged(bool)),this,SLOT(selectionModeChanged()));
+  connect(d->controller,SIGNAL(showSelectionLineChanged(bool)),this,SLOT(selectionVisualsChanged()));
+  connect(d->controller,SIGNAL(clearSelection()),this,SLOT(clearSelection()));
+  
+  connect(d->controller,SIGNAL(inDetPartsUsingProjectionsChanged(InDetProjFlags::DetTypeFlags)),
+          this,SLOT(emitUsedIDProjectionsChanged(InDetProjFlags::DetTypeFlags)));
+  InDetProjFlags::DetTypeFlags f = d->controller->inDetPartsUsingProjections();
+  if ( f != InDetProjFlags::NoDet)
+    emitUsedIDProjectionsChanged(f);//Fixme: Check that this is actually sufficiently late for the guideline sys!!!
+  
+  return d->controller;
+}
+
+//_____________________________________________________________________________________
+QByteArray VP1PrepRawDataSystem::saveState() {
+  
+  VP1Serialise serialise(0/*version*/,this);
+  serialise.save(IVP13DSystemSimple::saveState());
+  
+  ensureBuildController();
+  
+  serialise.save(d->controller->saveSettings());
+  serialise.save(d->controller->collWidget());
+  
+  serialise.disableUnsavedChecks();//We do the testing in the controller
+  return serialise.result();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::restoreFromState(QByteArray ba) {
+  //Version & base state:
+  VP1Deserialise state(ba,this);
+  if (state.version()!=0) {
+    message("Warning: State data in .vp1 file is in wrong format - ignoring!");
+    return;
+  }
+  ensureBuildController();
+  
+  IVP13DSystemSimple::restoreFromState(state.restoreByteArray());
+  
+  d->controller->restoreSettings(state.restoreByteArray());
+  state.restore(d->controller->collWidget());//We do the testing in the controller
+  
+  state.disableUnrestoredChecks();//We do the testing in the controller
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::visibleTracksChanged(const std::vector< std::pair<const Trk::Track*, const SoMaterial*> >& tracks)
+{
+  d->ensureInitCommonData();
+  if (!d->common)
+    return;//for signals received after uncreate
+  d->common->trackAndSegmentHelper()->visibleTracksChanged(tracks);
+  selectionVisualsChanged();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::visibleSegmentsChanged(const std::vector< std::pair<const Trk::Segment*, const SoMaterial*> >& segments)
+{
+  d->ensureInitCommonData();
+  if (!d->common)
+    return;//for signals received after uncreate
+  d->common->trackAndSegmentHelper()->visibleSegmentsChanged(segments);
+  selectionVisualsChanged();
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::emitTouchedMuonChambersChanged(const std::set<GeoPVConstLink>& s)
+{
+  messageVerbose("emits touchedMuonChambersChanged (ntouchedchambers="+QString::number(s.size())+")");
+  emit touchedMuonChambersChanged(s);
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::emitUsedIDProjectionsChanged(InDetProjFlags::DetTypeFlags f)
+{
+  messageVerbose("emits usedIDProjectionsChanged");
+  emit usedIDProjectionsChanged(f);
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::appropriateMDTProjectionsChanged(int iproj)
+{
+  if (d->appropriatemdtprojection==iproj)
+    return;
+  d->appropriatemdtprojection = iproj;
+  if (!d->controller)
+    return;//applied upon creation of collections instead
+  foreach (PRDCollHandle_MDT* mdtcol,d->controller->collWidget()->collections<PRDCollHandle_MDT>())
+  mdtcol->setAppropriateProjection( d->appropriatemdtprojection );
+  
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::setApplicableIDProjections( InDetProjFlags::InDetProjPartsFlags pixel,
+                                                      InDetProjFlags::InDetProjPartsFlags sct,
+                                                      InDetProjFlags::InDetProjPartsFlags trt )
+{
+  messageVerbose("Signal received in setApplicableProjections (from "
+                 +QString(sender()?sender()->objectName():"NULL sender")+")");
+  if (d->idprojflags_pixel==pixel&&d->idprojflags_sct==sct&&d->idprojflags_trt==trt) {
+    return;
+  }
+  
+  d->idprojflags_pixel = pixel;
+  d->idprojflags_trt = trt;
+  d->idprojflags_sct = sct;
+  
+  if (!d->controller)
+    return;//applied upon creation of collections instead
+  
+  foreach (PRDCollHandle_TRT* trtcol,d->controller->collWidget()->collections<PRDCollHandle_TRT>())
+  trtcol->setAppropriateProjection(d->idprojflags_trt);
+  
+  //NB: Add for pixel/sct as well once supported!
+  
+}
+
+//_____________________________________________________________________________________
+void VP1PrepRawDataSystem::muonChambersWithTracksChanged(const std::set<GeoPVConstLink>& chambers)
+{
+  messageVerbose("muonChambersWithTracksChanged : received "+str(chambers.size())+" chambers.");
+  
+  // //Update map of touched chamber lists:
+  // bool listChanged(d->sender2ChamberList.find(sender())!=d->sender2ChamberList.end()?
+  //                  (chambers != d->sender2ChamberList[sender()]):true);
+  // d->sender2ChamberList[sender()] = chambers;
+  
+  //Trigger update if list changed and in auto mode:
+  // if ( listChanged && d->controller->limitToActiveChambers() )
+  //   message("Limittoactivechambers - not yet implemented");
+  d->ensureInitCommonData();
+  if (d->common && d->common->touchedMuonChamberHelper())
+    d->common->touchedMuonChamberHelper()->updateTouchedByTracks(chambers);
+  else 
+    message("muonChambersWithTracksChanged - helpers not yet created!");
+}
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_cuts_form.ui b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_cuts_form.ui
new file mode 100644
index 0000000000000000000000000000000000000000..42f4acd44f01ee35aec9981605a364193854b1f1
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_cuts_form.ui
@@ -0,0 +1,567 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PRDSysSettingsCutsForm</class>
+ <widget class="QWidget" name="PRDSysSettingsCutsForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>528</width>
+    <height>536</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Direction</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_4">
+      <item>
+       <widget class="VP1EtaPhiCutWidget" name="etaPhiCutWidget" native="true"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="0" column="1">
+    <widget class="QGroupBox" name="groupBox_cuts_mdt">
+     <property name="title">
+      <string>MDT</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3">
+      <item row="0" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBox_cut_mdt_excludeisolateddrifttubes">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Require the station to have at least one other drift tube.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="text">
+         <string>Exclude isolated drift tubes</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QCheckBox" name="checkBox_cut_mdt_excludemaskedhits">
+        <property name="toolTip">
+         <string>Limit PRDs to the specified MdtDriftCircleStatus</string>
+        </property>
+        <property name="text">
+         <string>Only show</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QComboBox" name="comboBox_mdt_cutMdtDriftCircleStatus">
+        <item>
+         <property name="text">
+          <string>Drift Time</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Masked</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>Before Spectrum</string>
+         </property>
+        </item>
+        <item>
+         <property name="text">
+          <string>After Spectrum</string>
+         </property>
+        </item>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBox_cut_mdt_limitToActiveChambers">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="toolTip">
+         <string notr="true">Only show PRDs which are in a chamber with a track/segment</string>
+        </property>
+        <property name="text">
+         <string>Limit to 'active' chambers</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QCheckBox" name="checkBox_cut_mdt_ADClowerbound">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Require the station to have at least one other drift tube.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="text">
+           <string>Require ADC &gt;</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinBox_cut_mdt_ADClowerbound">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string/>
+          </property>
+          <property name="maximum">
+           <number>9999</number>
+          </property>
+          <property name="singleStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>50</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="4" column="0" colspan="2">
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QCheckBox" name="checkBox_cut_mdt_ADCupperbound">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Require the station to have at least one other drift tube.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="text">
+           <string>Require ADC &lt;</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinBox_cut_mdt_ADCupperbound">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string/>
+          </property>
+          <property name="maximum">
+           <number>9999</number>
+          </property>
+          <property name="singleStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>300</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="groupBox_cuts_idgeneral">
+     <property name="title">
+      <string>Inner Detector General</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_4">
+      <item>
+       <layout class="QGridLayout" name="_3">
+        <property name="horizontalSpacing">
+         <number>6</number>
+        </property>
+        <property name="verticalSpacing">
+         <number>0</number>
+        </property>
+        <item row="0" column="0" colspan="2">
+         <widget class="QLabel" name="label_9">
+          <property name="text">
+           <string>Show data from parts:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QCheckBox" name="checkBox_cut_indet_barrelA">
+          <property name="text">
+           <string>Barrel A</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QCheckBox" name="checkBox_cut_indet_barrelC">
+          <property name="text">
+           <string>Barrel C</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0">
+         <widget class="QCheckBox" name="checkBox_cut_indet_endcapA">
+          <property name="text">
+           <string>Endcap A</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="QCheckBox" name="checkBox_cut_indet_endcapC">
+          <property name="text">
+           <string>Endcap C</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>1</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="1" rowspan="2">
+    <widget class="QGroupBox" name="groupBox_cuts_trt">
+     <property name="title">
+      <string>TRT</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QGridLayout" name="gridLayout">
+        <item row="0" column="0" colspan="2">
+         <widget class="QCheckBox" name="checkbox_cut_trt_needHT">
+          <property name="toolTip">
+           <string>If set, do not show TRT PRD which have the 'isNoise' flag set.</string>
+          </property>
+          <property name="text">
+           <string>Require High Threshold</string>
+          </property>
+          <property name="checked">
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QCheckBox" name="checkbox_cut_trt_TotMin">
+          <property name="toolTip">
+           <string>If set, do not show TRT hits with time over threshold below cut</string>
+          </property>
+          <property name="text">
+           <string>ToT min:</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QSpinBox" name="spinBox_cut_trt_ToTMin">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string> x 3.125ns</string>
+          </property>
+          <property name="maximum">
+           <number>24</number>
+          </property>
+          <property name="singleStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>4</number>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0">
+         <widget class="QCheckBox" name="checkbox_cut_trt_TotMax">
+          <property name="toolTip">
+           <string>If set, do not show TRT hits with time over threshold above cut</string>
+          </property>
+          <property name="text">
+           <string>ToT max:</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="QSpinBox" name="spinBox_cut_trt_ToTMax">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string> x 3.125ns</string>
+          </property>
+          <property name="maximum">
+           <number>24</number>
+          </property>
+          <property name="singleStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>23</number>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0">
+         <widget class="QCheckBox" name="checkbox_cut_trt_LeMin">
+          <property name="toolTip">
+           <string>If set, do not show TRT hits with leading edge time below cut</string>
+          </property>
+          <property name="text">
+           <string>LE min:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1">
+         <widget class="QSpinBox" name="spinBox_cut_trt_LEMin">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string> x 3.125ns</string>
+          </property>
+          <property name="maximum">
+           <number>24</number>
+          </property>
+          <property name="value">
+           <number>2</number>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0">
+         <widget class="QCheckBox" name="checkbox_cut_trt_LeMax">
+          <property name="toolTip">
+           <string>If set, do not show TRT hits with leading edge time above cut</string>
+          </property>
+          <property name="text">
+           <string>LE max:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1">
+         <widget class="QSpinBox" name="spinBox_cut_trt_LEMax">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string> x 3.125ns</string>
+          </property>
+          <property name="maximum">
+           <number>24</number>
+          </property>
+          <property name="value">
+           <number>23</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>5</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="groupBox_cuts_pixel">
+     <property name="title">
+      <string>Pixel/SCT</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QCheckBox" name="checkBox_cut_pixel_minnrdo">
+          <property name="text">
+           <string>Min #RDOs/pixel cluster:</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinBox_cut_pixel_minnrdo">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="minimum">
+           <number>1</number>
+          </property>
+          <property name="maximum">
+           <number>9</number>
+          </property>
+          <property name="value">
+           <number>2</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_cut_sct_excludeisolatedclusters">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Require the neighbouring wafer to have at least one cluster.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="text">
+         <string>Exclude isolated SCT clusters</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QGroupBox" name="groupBox_cuts_tracksegmentassociation">
+     <property name="title">
+      <string>Track/Segment association cuts</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_5">
+      <item>
+       <layout class="QVBoxLayout" name="_9">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <item>
+         <widget class="QCheckBox" name="checkBox_cuts_ts_exclude_hits_on_track">
+          <property name="text">
+           <string>Exclude hits on tracks</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="checkBox_cuts_ts_exclude_hits_not_on_track">
+          <property name="text">
+           <string>Exclude hits not on tracks</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="checkBox_cuts_ts_exclude_hits_on_segments">
+          <property name="text">
+           <string>Exclude hits on segments</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="checkBox_cuts_ts_exclude_not_on_segments">
+          <property name="text">
+           <string>Exclude hits not on segments</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <spacer>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>1</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="2">
+    <layout class="QHBoxLayout" name="horizontalLayout_6">
+     <property name="spacing">
+      <number>0</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_close">
+       <property name="text">
+        <string>&amp;Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>VP1EtaPhiCutWidget</class>
+   <extends>QWidget</extends>
+   <header>VP1Base/VP1EtaPhiCutWidget.h</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_display_form.ui b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_display_form.ui
new file mode 100644
index 0000000000000000000000000000000000000000..72d7656055912fef7b223c9480e0c69f28ea8a00
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_display_form.ui
@@ -0,0 +1,405 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PRDSysSettingsDisplayForm</class>
+ <widget class="QWidget" name="PRDSysSettingsDisplayForm">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>470</width>
+    <height>437</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_3">
+   <item row="4" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>0</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_close">
+       <property name="text">
+        <string>&amp;Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="1" rowspan="4">
+    <layout class="QVBoxLayout" name="verticalLayout_4">
+     <item>
+      <widget class="QGroupBox" name="groupBox_2">
+       <property name="title">
+        <string>Draw style - Pixel/SCT</string>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <widget class="VP1DrawOptionsWidget" name="widget_drawOptions_PixelSCT" native="true"/>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_3">
+       <property name="title">
+        <string>Draw style - TRT</string>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <widget class="VP1DrawOptionsWidget" name="widget_drawOptions_TRT" native="true"/>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_4">
+       <property name="title">
+        <string>Draw style - Muons</string>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="VP1DrawOptionsWidget" name="widget_drawOptions_Muons" native="true"/>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Association Colouring</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Colour by:</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_colourByTrack">
+        <property name="toolTip">
+         <string>If selected, PrepRawData which are assigned to a track will take the colour of that track.</string>
+        </property>
+        <property name="text">
+         <string>Tracks</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_colourBySegment">
+        <property name="toolTip">
+         <string>If selected, PrepRawData which are assigned to a segment will take the colour of that segment.</string>
+        </property>
+        <property name="text">
+         <string>Segments</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QGroupBox" name="groupBox_highlights">
+     <property name="title">
+      <string>Highlights</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <item row="4" column="0" colspan="2">
+       <layout class="QHBoxLayout" name="_5">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <item>
+         <widget class="QCheckBox" name="checkBox_highlight_mdt_ADC_below">
+          <property name="text">
+           <string>MDT hits with ADC &lt;=</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSpinBox" name="spinBox_highlight_mdt_ADC_below">
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="suffix">
+           <string/>
+          </property>
+          <property name="maximum">
+           <number>1000</number>
+          </property>
+          <property name="singleStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>75</number>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="0" column="0">
+       <layout class="QHBoxLayout" name="_7">
+        <item>
+         <widget class="QLabel" name="label_highlights_material">
+          <property name="text">
+           <string>Colour:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="VP1MaterialButton" name="materialbutton_highlights_material">
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="0" column="1">
+       <layout class="QHBoxLayout" name="_8">
+        <property name="spacing">
+         <number>5</number>
+        </property>
+        <item>
+         <widget class="QLabel" name="label_highlights_intensity">
+          <property name="text">
+           <string>Intensity:</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QSlider" name="horizontalSlider_highlights_intensity">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimum">
+           <number>1</number>
+          </property>
+          <property name="maximum">
+           <number>6</number>
+          </property>
+          <property name="pageStep">
+           <number>1</number>
+          </property>
+          <property name="value">
+           <number>3</number>
+          </property>
+          <property name="orientation">
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="tickPosition">
+           <enum>QSlider::TicksBelow</enum>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBox_highlight_trackoutliers">
+        <property name="text">
+         <string>Track Outliers</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBox_highlight_trtht">
+        <property name="text">
+         <string>TRT High Threshold hits</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkBox_highlight_maskedmdts">
+        <property name="text">
+         <string>Masked MDT hits</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="groupBox_idproj">
+     <property name="title">
+      <string>Projections</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="checkBox_showpixel_projected">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="toolTip">
+         <string>Not implemented</string>
+        </property>
+        <property name="text">
+         <string>Pixel</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1">
+       <widget class="QCheckBox" name="checkBox_showsct_projected">
+        <property name="enabled">
+         <bool>false</bool>
+        </property>
+        <property name="toolTip">
+         <string>Not implemented</string>
+        </property>
+        <property name="text">
+         <string>SCT</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2">
+       <widget class="QCheckBox" name="checkBox_showtrt_projected">
+        <property name="toolTip">
+         <string>Whether to project the TRT drift tubes to 2D planes (configure those in the Guides system)</string>
+        </property>
+        <property name="text">
+         <string>TRT</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QCheckBox" name="checkBox_showmdt_projected">
+        <property name="toolTip">
+         <string>Whether make the MDT drift tubes longer, so they stick out of the tube/chamber geometry (configure the show geometry in the Geo system)</string>
+        </property>
+        <property name="text">
+         <string>MDT</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QCheckBox" name="checkBox_showrpc_projected">
+        <property name="toolTip">
+         <string>This projection is for now just a crude and fixed addition to the strip length which makes it stick out of the chamber,</string>
+        </property>
+        <property name="text">
+         <string>RPC</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="2">
+       <widget class="QCheckBox" name="checkBox_showcsc_projected">
+        <property name="toolTip">
+         <string>This projection is for now just a crude and fixed addition to the strip length which makes it stick out of the chamber,</string>
+        </property>
+        <property name="text">
+         <string>CSC</string>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="3">
+       <widget class="QCheckBox" name="checkBox_showtgc_projected">
+        <property name="toolTip">
+         <string>This projection is for now just a crude and fixed addition to the strip length which makes it stick out of the chamber,</string>
+        </property>
+        <property name="text">
+         <string>TGC</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="groupBox_5">
+     <property name="title">
+      <string>Details</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Draw</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_drawErrors">
+        <property name="toolTip">
+         <string>If selected, PrepRawData which are assigned to a track will take the colour of that track.</string>
+        </property>
+        <property name="text">
+         <string>Errors</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="checkBox_drawRDOs">
+        <property name="toolTip">
+         <string>If selected, PrepRawData which are assigned to a track will take the colour of that track.</string>
+        </property>
+        <property name="text">
+         <string>RDOs</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>VP1MaterialButton</class>
+   <extends>QPushButton</extends>
+   <header>VP1Base/VP1MaterialButton.h</header>
+  </customwidget>
+  <customwidget>
+   <class>VP1DrawOptionsWidget</class>
+   <extends>QWidget</extends>
+   <header>VP1Base/VP1DrawOptionsWidget.h</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_interactions_form.ui b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_interactions_form.ui
new file mode 100644
index 0000000000000000000000000000000000000000..8495c42506dd07efb9f045f01e7db45afdb3f90a
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/prd_settings_interactions_form.ui
@@ -0,0 +1,185 @@
+<ui version="4.0" >
+ <class>PRDSysSettingsInteractionsForm</class>
+ <widget class="QWidget" name="PRDSysSettingsInteractionsForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>256</width>
+    <height>260</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_4" >
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="title" >
+      <string>Action on PRD selection</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2" >
+      <item>
+       <layout class="QVBoxLayout" >
+        <property name="spacing" >
+         <number>-1</number>
+        </property>
+        <item>
+         <widget class="QCheckBox" name="checkBox_printinfo" >
+          <property name="text" >
+           <string>Print information (a dump)</string>
+          </property>
+          <property name="checked" >
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout" >
+        <item>
+         <widget class="QCheckBox" name="checkBox_zoom" >
+          <property name="text" >
+           <string>Zoom</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="_2" >
+          <item>
+           <spacer>
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType" >
+             <enum>QSizePolicy::Fixed</enum>
+            </property>
+            <property name="sizeHint" stdset="0" >
+             <size>
+              <width>20</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="checkBox_zoom_orientToMuonChamber" >
+            <property name="text" >
+             <string>Orient to chamber if Muon hit</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_selectionMode" >
+     <property name="title" >
+      <string>Selection mode</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3" >
+      <property name="margin" >
+       <number>4</number>
+      </property>
+      <item>
+       <widget class="QCheckBox" name="checkBox_selModeMultiple" >
+        <property name="text" >
+         <string>Select multiple (for interactive track fits)</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <layout class="QHBoxLayout" name="horizontalLayout_2" >
+        <item>
+         <spacer name="horizontalSpacer" >
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeType" >
+           <enum>QSizePolicy::Fixed</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>10</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+        <item>
+         <widget class="QPushButton" name="pushButton_clearSelection" >
+          <property name="text" >
+           <string>Clear</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout" >
+          <item>
+           <widget class="QCheckBox" name="checkBox_showSelectionLine" >
+            <property name="text" >
+             <string>Line</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="VP1MaterialButton" name="matButton_multiselline" >
+            <property name="text" >
+             <string/>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="spacing" >
+      <number>0</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_close" >
+       <property name="text" >
+        <string>&amp;Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>VP1MaterialButton</class>
+   <extends>QPushButton</extends>
+   <header>VP1Base/VP1MaterialButton.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/rdocontrollerform.ui b/graphics/VP1/VP1Systems/VP1PRDSystems/src/rdocontrollerform.ui
new file mode 100644
index 0000000000000000000000000000000000000000..67b3ee5cafce865f5c1e362d2a7439ef2c2f75cb
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/rdocontrollerform.ui
@@ -0,0 +1,397 @@
+<ui version="4.0" >
+ <class>RDOControllerForm</class>
+ <widget class="QWidget" name="RDOControllerForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>299</width>
+    <height>347</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <layout class="QVBoxLayout" >
+     <property name="spacing" >
+      <number>2</number>
+     </property>
+     <item>
+      <widget class="QGroupBox" name="groupBox_collections" >
+       <property name="title" >
+        <string>Shown RDO Collections</string>
+       </property>
+       <layout class="QHBoxLayout" >
+        <property name="leftMargin" >
+         <number>6</number>
+        </property>
+        <property name="topMargin" >
+         <number>6</number>
+        </property>
+        <property name="rightMargin" >
+         <number>6</number>
+        </property>
+        <property name="bottomMargin" >
+         <number>6</number>
+        </property>
+        <item>
+         <layout class="QGridLayout" >
+          <item row="0" column="0" >
+           <layout class="QHBoxLayout" >
+            <item>
+             <widget class="QCheckBox" name="checkBox_pixel" >
+              <property name="text" >
+               <string>Pixel</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="VP1MaterialButton" name="matButton_pixel" >
+              <property name="text" >
+               <string/>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="0" column="1" >
+           <layout class="QHBoxLayout" >
+            <property name="leftMargin" >
+             <number>9</number>
+            </property>
+            <item>
+             <widget class="QCheckBox" name="checkBox_sct" >
+              <property name="text" >
+               <string>SCT</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="VP1MaterialButton" name="matButton_sct" >
+              <property name="text" >
+               <string/>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item row="1" column="0" colspan="2" >
+           <layout class="QHBoxLayout" >
+            <item>
+             <widget class="QCheckBox" name="checkBox_trt" >
+              <property name="text" >
+               <string>TRT </string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="VP1MaterialButton" name="matButton_trt" >
+              <property name="text" >
+               <string/>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="VP1MaterialButton" name="matButton_trtht" >
+              <property name="text" >
+               <string/>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label" >
+              <property name="text" >
+               <string>(NoHT/HT)</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <spacer>
+              <property name="orientation" >
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" >
+               <size>
+                <width>1</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" >
+           <size>
+            <width>1</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_cuts_idgeneral" >
+       <property name="title" >
+        <string>Cuts: Inner Detector General</string>
+       </property>
+       <layout class="QHBoxLayout" >
+        <property name="spacing" >
+         <number>0</number>
+        </property>
+        <property name="leftMargin" >
+         <number>6</number>
+        </property>
+        <property name="topMargin" >
+         <number>6</number>
+        </property>
+        <property name="rightMargin" >
+         <number>6</number>
+        </property>
+        <property name="bottomMargin" >
+         <number>6</number>
+        </property>
+        <item>
+         <layout class="QGridLayout" >
+          <property name="horizontalSpacing" >
+           <number>-1</number>
+          </property>
+          <property name="verticalSpacing" >
+           <number>0</number>
+          </property>
+          <item row="0" column="0" colspan="2" >
+           <widget class="QLabel" name="label_9" >
+            <property name="text" >
+             <string>Show data from parts:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QCheckBox" name="checkBox_cut_indet_barrelA" >
+            <property name="text" >
+             <string>Barrel A</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1" >
+           <widget class="QCheckBox" name="checkBox_cut_indet_barrelC" >
+            <property name="text" >
+             <string>Barrel C</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" >
+           <widget class="QCheckBox" name="checkBox_cut_indet_endcapA" >
+            <property name="text" >
+             <string>Endcap A</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1" >
+           <widget class="QCheckBox" name="checkBox_cut_indet_endcapC" >
+            <property name="text" >
+             <string>Endcap C</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" >
+           <size>
+            <width>1</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_cuts_trt" >
+       <property name="title" >
+        <string>Cuts: TRT</string>
+       </property>
+       <layout class="QHBoxLayout" >
+        <property name="leftMargin" >
+         <number>6</number>
+        </property>
+        <property name="topMargin" >
+         <number>6</number>
+        </property>
+        <property name="rightMargin" >
+         <number>6</number>
+        </property>
+        <property name="bottomMargin" >
+         <number>6</number>
+        </property>
+        <item>
+         <layout class="QGridLayout" >
+          <property name="horizontalSpacing" >
+           <number>-1</number>
+          </property>
+          <property name="verticalSpacing" >
+           <number>0</number>
+          </property>
+          <item row="0" column="0" colspan="2" >
+           <widget class="QCheckBox" name="checkbox_cut_trt_needHT" >
+            <property name="toolTip" >
+             <string>If set, do not show TRT PRD which have the 'isNoise' flag set.</string>
+            </property>
+            <property name="text" >
+             <string>Require High Threshold</string>
+            </property>
+            <property name="checked" >
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QCheckBox" name="checkbox_cut_trt_TotMin" >
+            <property name="toolTip" >
+             <string>If set, do not show TRT PRD which have the 'isNoise' flag set.</string>
+            </property>
+            <property name="text" >
+             <string>ToT min:</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1" >
+           <widget class="QSpinBox" name="spinBox_cut_trt_ToTMin" >
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+            <property name="suffix" >
+             <string> x 3.125ns</string>
+            </property>
+            <property name="maximum" >
+             <number>24</number>
+            </property>
+            <property name="singleStep" >
+             <number>1</number>
+            </property>
+            <property name="value" >
+             <number>4</number>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" >
+           <widget class="QCheckBox" name="checkbox_cut_trt_TotMax" >
+            <property name="toolTip" >
+             <string>If set, do not show TRT PRD which have the 'isNoise' flag set.</string>
+            </property>
+            <property name="text" >
+             <string>ToT max:</string>
+            </property>
+            <property name="checked" >
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1" >
+           <widget class="QSpinBox" name="spinBox_cut_trt_ToTMax" >
+            <property name="alignment" >
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+            <property name="suffix" >
+             <string> x 3.125ns</string>
+            </property>
+            <property name="maximum" >
+             <number>24</number>
+            </property>
+            <property name="singleStep" >
+             <number>1</number>
+            </property>
+            <property name="value" >
+             <number>23</number>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation" >
+           <enum>Qt::Horizontal</enum>
+          </property>
+          <property name="sizeHint" >
+           <size>
+            <width>1</width>
+            <height>20</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>1</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>1</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>VP1MaterialButton</class>
+   <extends>QPushButton</extends>
+   <header>VP1Base/VP1MaterialButton.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/vp1prdcontrollerform.ui b/graphics/VP1/VP1Systems/VP1PRDSystems/src/vp1prdcontrollerform.ui
new file mode 100644
index 0000000000000000000000000000000000000000..a380fad4163f26b55837e480bdab137209d98ca4
--- /dev/null
+++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/vp1prdcontrollerform.ui
@@ -0,0 +1,102 @@
+<ui version="4.0" >
+ <class>VP1PrdControllerForm</class>
+ <widget class="QWidget" name="VP1PrdControllerForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>234</width>
+    <height>135</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>6</number>
+   </property>
+   <property name="topMargin" >
+    <number>6</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>4</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QWidget" native="1" name="widget_settingsButtonsPlaceholder" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <layout class="QGridLayout" >
+      <property name="margin" >
+       <number>0</number>
+      </property>
+      <property name="spacing" >
+       <number>0</number>
+      </property>
+      <item row="0" column="0" >
+       <widget class="QPushButton" name="pushButton_settings_cuts" >
+        <property name="toolTip" >
+         <string>Configure track cuts on quantities such as eta, phi and momentum</string>
+        </property>
+        <property name="text" >
+         <string>Cuts</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="pushButton_settings_display" >
+        <property name="toolTip" >
+         <string>Configure track colours</string>
+        </property>
+        <property name="text" >
+         <string>Display</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QPushButton" name="pushButton_settings_interactions" >
+        <property name="toolTip" >
+         <string>Settings for what happens in response to selections (printout, zooms, ...)</string>
+        </property>
+        <property name="text" >
+         <string>Interactions</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Preferred</enum>
+     </property>
+     <property name="sizeHint" stdset="0" >
+      <size>
+       <width>1</width>
+       <height>3</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" colspan="2" >
+    <widget class="QScrollArea" name="collWidgetScrollArea" />
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>