From 501e6313edd974d82d17f8236132c3c35f27ea7f Mon Sep 17 00:00:00 2001
From: Matthew Henry Klein <matthew.henry.klein@cern.ch>
Date: Sun, 18 May 2014 21:51:19 +0200
Subject: [PATCH] Update to IBL clustering (SiClusterOnTrackTool-03-00-04)

---
 .../InDetRecTools/SiClusterOnTrackTool/README |   20 +
 .../PixelClusterOnTrackTool.h                 |  184 +++
 .../SCT_ClusterOnTrackTool.h                  |  107 ++
 .../SiClusterOnTrackTool/cmt/requirements     |   34 +
 .../SiClusterOnTrackTool/doc/mainpage.h       |  123 ++
 .../share/PixelSurveyDistorsions.txt          | 1456 +++++++++++++++++
 .../src/IBL_calibration.h                     |   76 +
 .../src/PixelClusterOnTrackTool.cxx           |  953 +++++++++++
 .../src/SCT_ClusterOnTrackTool.cxx            |  343 ++++
 .../SiClusterOnTrackTool_entries.cxx          |   14 +
 .../components/SiClusterOnTrackTool_load.cxx  |    4 +
 11 files changed, 3314 insertions(+)
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/README
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/cmt/requirements
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/mainpage.h
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/share/PixelSurveyDistorsions.txt
 create mode 100644 InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/IBL_calibration.h
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_entries.cxx
 create mode 100755 InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_load.cxx

diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/README b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/README
new file mode 100755
index 00000000000..7045324b2bd
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/README
@@ -0,0 +1,20 @@
+Package:       InnerDetector/InDetRecAlgs/SiClusterOnTrackTool
+responsible:   Tommaso Lari (Tommaso.Lari@cern.ch)
+content:       Silicon Clustering algorithms
+Inputs:        Silicon Clusters, Track parameters
+Outputs:       Recalibrated Silicon clusters
+Dependencies:  Control/AthenaKernel
+               Control/StoreGate
+               DetectorDescription/DetectorDescrCond/DetectorDescrConditions
+               DetectorDescription/Identifier
+               InnerDetector/InDetConditions/SCT_ConditionsAlgs
+               InnerDetector/InDetRecEvent/InDetRIO_OnTrack
+               InnerDetector/InDetRecEvent/InDetPrepRawData
+               InnerDetector/InDetDetDescr/InDetIdentifier
+               InnerDetector/InDetDetDescr/InDetReadoutGeometry
+               Tools/PathResolver 
+               Tracking/TrkEvent/TrkEventPrimitives
+               Tracking/TrkEvent/TrkParameters
+               Tracking/TrkEvent/TrkPrepRawData
+               Tracking/TrkTools/TrkToolInterfaces
+JobOptions:    
\ No newline at end of file
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h
new file mode 100755
index 00000000000..01fb8460031
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/PixelClusterOnTrackTool.h
@@ -0,0 +1,184 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+//  Header file for class  PixelClusterOnTrackTool
+///////////////////////////////////////////////////////////////////
+// (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+// Interface for PixelClusterOnTrack production
+///////////////////////////////////////////////////////////////////
+// started 1/05/2004 I.Gavrilenko - see ChangeLog for details
+///////////////////////////////////////////////////////////////////
+#ifndef PixelClusterOnTrackTool_H
+#define PixelClusterOnTrackTool_H
+
+#include "GaudiKernel/ToolHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/IIncidentListener.h"
+
+#include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
+#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h"
+#include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
+
+#include "InDetPrepRawData/PixelGangedClusterAmbiguities.h"
+#include "TrkParameters/TrackParameters.h"
+//#include "InDetIdentifier/PixelID.h"
+#include "GeoPrimitives/GeoPrimitives.h"
+
+//#include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
+//#include "PixelConditionsTools/IModuleDistortionsTool.h"
+
+class PixelID;
+class IPixelOfflineCalibSvc;
+class IModuleDistortionsTool;
+class IIncidentSvc;
+class StoreGateSvc;
+class IBLParameterSvc;
+
+namespace InDet {
+
+  /** @brief creates PixelClusterOnTrack objects allowing to
+      calibrate cluster position and error using a given track hypothesis. 
+
+      See doxygen of Trk::RIO_OnTrackCreator for details.
+      Different strategies to calibrate the cluster error can be chosen
+      by job Option. Also the handle to the general hit-error scaling
+      is implemented.
+
+      Special strategies for correction can be invoked by calling the
+      correct method with an additional argument from the 
+      PixelClusterStrategy enumeration
+
+  */
+
+  class NnClusterizationFactory;
+
+  enum PixelClusterStrategy {
+    PIXELCLUSTER_DEFAULT=0,
+    PIXELCLUSTER_OUTLIER=1,
+    PIXELCLUSTER_SHARED =2,
+    PIXELCLUSTER_SPLIT  =3
+  };
+
+
+  class PixelClusterOnTrackTool: 
+        public AthAlgTool, virtual public Trk::IRIO_OnTrackCreator,  virtual public IIncidentListener
+{
+  ///////////////////////////////////////////////////////////////////
+  // Public methods:
+  ///////////////////////////////////////////////////////////////////
+
+public:
+
+  //! AlgTool constructor 
+  PixelClusterOnTrackTool(const std::string&,const std::string&,
+                          const IInterface*);
+  virtual ~PixelClusterOnTrackTool ();
+  //! AlgTool initialisation
+  virtual StatusCode initialize();
+  //! AlgTool termination
+  virtual StatusCode finalize  ();
+  
+  /** handle for incident service */
+  void handle(const Incident& inc) ;
+ 
+  void correctBow(const Identifier&, Amg::Vector2D& locpos, const double tanphi, const double taneta) const;
+
+  /** @brief produces a PixelClusterOnTrack (object factory!).
+
+      Depending on job options it changes the pixel cluster position
+      and error according to the parameters (in particular, the angle)
+      of the intersecting track.
+  */
+  virtual const InDet::PixelClusterOnTrack* correct(const Trk::PrepRawData&,
+                                                    const Trk::TrackParameters&) const;
+
+  virtual const InDet::PixelClusterOnTrack* correctDefault(const Trk::PrepRawData&, 
+                                                           const Trk::TrackParameters&) const;
+
+  virtual const InDet::PixelClusterOnTrack* correctNN(const Trk::PrepRawData&, const Trk::TrackParameters&) const;
+
+  virtual const InDet::PixelClusterOnTrack* correct
+    (const Trk::PrepRawData&, const Trk::TrackParameters&, 
+     const InDet::PixelClusterStrategy) const;
+     
+
+  ///////////////////////////////////////////////////////////////////
+  // Private methods:
+  ///////////////////////////////////////////////////////////////////
+  
+ private:
+
+  /** @brief parametrizes the pixel cluster position error as a function of 
+      the track angle alpha and the cluster width (number of rows) deltax */
+  //  double getBarrelPhiError(double& alpha, int& deltax) const;
+  //  double getBarrelEtaError(double eta, int deltax, int deltay) const;
+  // double getEndcapPhiError(int etasize, int phisize) const;
+  // double getEndcapEtaError(int etasize, int phisize) const;
+  
+
+  ///////////////////////////////////////////////////////////////////
+  // Private data:
+  ///////////////////////////////////////////////////////////////////
+
+  ToolHandle<IModuleDistortionsTool>            m_pixDistoTool    ;
+  ToolHandle<Trk::IRIO_OnTrackErrorScalingTool> m_errorScalingTool;
+  ServiceHandle<IPixelOfflineCalibSvc>          m_calibSvc        ;
+
+  /* ME: Test histos have nothing to do with production code, use a flag
+    IHistogram1D* m_h_Resx;
+    IHistogram1D* m_h_Resy;
+    IHistogram1D* m_h_Locx;
+    IHistogram1D* m_h_Locy;
+    IHistogram1D* m_h_PhiTrack;
+    IHistogram1D* m_h_ThetaTrack;
+    IHistogram1D* m_h_Rad; 
+    IHistogram1D* m_h_Slope;
+  */
+
+  //! toolhandle for central error scaling
+  //! flag storing if errors need scaling or should be kept nominal
+  bool                               m_scalePixelCov     ;
+  bool                               m_disableDistortions;
+  bool                               m_rel13like         ;
+  int                                m_positionStrategy  ;
+  mutable int                        m_errorStrategy     ;
+  
+  
+  /** @brief Flag controlling how module distortions are taken into account:
+      
+  case 0 -----> No distorsions implemented;
+  
+  case 1 -----> Set curvature (in 1/meter) and twist (in radiant) equal for all modules;
+  
+  case 2 -----> Read curvatures and twists from textfile containing Survey data;
+  
+  case 3 -----> Set curvature and twist from Gaussian random generator with mean and RMS coming from Survey data;
+  
+  case 4 -----> Read curvatures and twists from database (not ready yet);
+  */
+  //! identifier-helper
+  const PixelID*                     m_pixelid;
+  
+  /** Enable NN based calibration (do only if NN calibration is applied) **/
+  mutable bool                      m_applyNNcorrection;
+  bool				    m_NNIBLcorrection;
+  bool				    m_IBLAbsent;
+  
+  /** NN clusterizationi factory for NN based positions and errors **/
+  ToolHandle<NnClusterizationFactory>                   m_NnClusterizationFactory;
+  ServiceHandle<StoreGateSvc>                           m_storeGate;            //!< Event store
+  ServiceHandle<IIncidentSvc>                           m_incidentSvc;          //!< IncidentSvc to catch begin of event and end of envent
+  ServiceHandle<IBLParameterSvc>                        m_IBLParameterSvc;
+  mutable const InDet::PixelGangedClusterAmbiguities*   m_splitClusterMap;      //!< the actual split map         
+  std::string                                           m_splitClusterMapName;  //!< split cluster ambiguity map
+  bool                                                  m_doNotRecalibrateNN;
+  bool                                                  m_noNNandBroadErrors;
+
+};
+
+} // end of namespace InDet
+
+#endif // PixelClusterOnTrackTool_H
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
new file mode 100755
index 00000000000..43f885c2bfd
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h
@@ -0,0 +1,107 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+//  Header file for class  SCT_ClusterOnTrackTool
+///////////////////////////////////////////////////////////////////
+// (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+// Interface for SCT_ClusterOnTrack production
+///////////////////////////////////////////////////////////////////
+// started 1/05/2004 I.Gavrilenko - see ChangeLog for details
+///////////////////////////////////////////////////////////////////
+
+#ifndef SCT_ClusterOnTrackTool_H
+#define SCT_ClusterOnTrackTool_H
+
+#include "GaudiKernel/ToolHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
+#include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h"
+#include "TrkParameters/TrackParameters.h"
+#include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h"
+#include "SCT_ModuleDistortions/ISCT_ModuleDistortionsTool.h"
+
+namespace InDet {
+
+
+/** @brief creates SCT_ClusterOnTrack objects allowing to
+    calibrate cluster position and error using a given track hypothesis. 
+
+    See doxygen of Trk::RIO_OnTrackCreator for details.
+    Different strategies to calibrate the cluster error can be chosen
+    by job Option. Also the handle to the general hit-error scaling
+    is implemented.
+*/
+  class SCT_ClusterOnTrackTool: 
+    public AthAlgTool,virtual public Trk::IRIO_OnTrackCreator
+{
+  ///////////////////////////////////////////////////////////////////
+  // Public methods:
+  ///////////////////////////////////////////////////////////////////
+
+public:
+
+  //! AlgTool constructor 
+  SCT_ClusterOnTrackTool(const std::string&,const std::string&,const IInterface*);
+  virtual ~SCT_ClusterOnTrackTool ();
+  //! AlgTool initialisation
+  virtual StatusCode initialize();
+  //! AlgTool termination
+  virtual StatusCode finalize  ();
+
+  
+/** @brief produces an SCT_ClusterOnTrack using the measured
+    SCT_Cluster and the track prediction. 
+
+    This method is a factory, so the client has to take care
+     of management/deletion of the  SCT_ClusterOnTrack.
+ */
+  virtual const InDet::SCT_ClusterOnTrack* correct
+    (const Trk::PrepRawData&, const Trk::TrackParameters&) const; 
+
+  
+/** @brief Returns a correction to be applied to the SCT cluster local x position
+    in simulated events to remove a position bias introduced by the SCT digitisation.
+
+      @param [in] phi     angle of track relative to Lorentz drift direction, in transverse plane
+      @param [in] nstrip  SCT cluster size (number of strips)
+ */
+  double getCorrection(double phi, int nstrip) const;
+  
+
+/** @brief Returns the resolution on the reconstructed position (local x) of SCT clusters
+    in simulated events.
+
+      @param [in] phi     angle of track relative to Lorentz drift direction, in transverse plane
+      @param [in] nstrip  SCT cluster size (number of strips)
+
+    The parameterisation of the resolution contained in getError() was derived from SCT
+    barrel clusters (80 micron pitch).  It can be applied also to endcap clusters, after
+    rescaling to the appropriate pitch.
+ */
+  double getError(double phi, int nstrip) const;
+
+ private:
+
+  ///////////////////////////////////////////////////////////////////
+  // Private data:
+  ///////////////////////////////////////////////////////////////////
+
+   //! toolhandle for central error scaling
+   ToolHandle< Trk::IRIO_OnTrackErrorScalingTool > m_errorScalingTool;
+   ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool;
+   //! flag storing if errors need scaling or should be kept nominal
+   bool                               m_scaleSctCov;
+
+   //! job options
+   bool                               m_option_make2dimBarrelClusters;
+   bool                               m_doDistortions ;//!< Flag to set Distortions
+   int                                m_option_errorStrategy;
+   int                                m_option_correctionStrategy;
+};
+
+} // end of namespace InDet
+
+#endif // SCT_ClusterOnTrackTool_H
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/cmt/requirements b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/cmt/requirements
new file mode 100755
index 00000000000..f4549ac6e0e
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/cmt/requirements
@@ -0,0 +1,34 @@
+package SiClusterOnTrackTool
+
+manager Igor Gavrilenko <Igor.Gavrilenko@cern.ch>
+
+private
+
+use StoreGate               StoreGate-*               Control
+use TrkSurfaces             TrkSurfaces-*             Tracking/TrkDetDescr
+use InDetIdentifier         InDetIdentifier-*         InnerDetector/InDetDetDescr
+use InDetReadoutGeometry    InDetReadoutGeometry-*    InnerDetector/InDetDetDescr
+use PixelConditionsTools    PixelConditionsTools-*    InnerDetector/InDetConditions
+use PixelConditionsServices PixelConditionsServices-* InnerDetector/InDetConditions
+use SiClusterizationTool    SiClusterizationTool-*    InnerDetector/InDetRecTools
+use EventPrimitives         EventPrimitives-*         Event
+use PixelGeoModel                       PixelGeoModel-*                 InnerDetector/InDetDetDescr
+
+public
+
+use AtlasPolicy             AtlasPolicy-*
+use GaudiInterface          GaudiInterface-*          External 
+use AthenaBaseComps         AthenaBaseComps-*         Control
+use TrkParameters           TrkParameters-*           Tracking/TrkEvent
+use TrkToolInterfaces       TrkToolInterfaces-*       Tracking/TrkTools
+use InDetRIO_OnTrack        InDetRIO_OnTrack-*        InnerDetector/InDetRecEvent
+use SCT_ModuleDistortions   SCT_ModuleDistortions-*   InnerDetector/InDetDetDescr
+use InDetPrepRawData        InDetPrepRawData-*        InnerDetector/InDetRecEvent
+use GeoPrimitives           GeoPrimitives-*           DetectorDescription
+
+library SiClusterOnTrackTool *.cxx components/*.cxx
+apply_pattern component_library 	
+
+private
+#macro cppdebugflags '$(cppdebugflags_s)'
+#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/mainpage.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/mainpage.h
new file mode 100755
index 00000000000..fb1320ed307
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/mainpage.h
@@ -0,0 +1,123 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+
+@mainpage
+
+@section SiClusterOnTrackToolDocIntro Overview
+
+This package provides two tools, PixelClusterOnTrackTool and
+SCT_ClusterOnTrackTool, which turn PixelClusters
+and SCT_Clusters into RIO_OnTrack-based objects, i.e.
+InDet::PixelClusterOnTrack and InDet::SCT_ClusterOnTrack.
+
+The calibration corrections which are applied to
+the new objects are described below. For more information
+on the concept, design and use of the <nop>RIO_OnTrack creation,
+please look at the Trk::RIO_OnTrackCreator documentation.
+
+@section SiClusterOnTrackToolDocCorr  Corrections
+For <b>PixelClusters</b> the information they contain is passed to 
+the RIO_OnTrack object, after applying three kinds of corrections:
+<ul>
+<li> A charge interpolation algorithm is applied to compute the 
+pixel cluster position, provided that the cluster contains more 
+than one pixel and that the flag "PositionStrategy" is greater 
+than zero (see job option flags description). 
+   The charge interpolation may already have been used in building 
+the PixelCluster objects when raw data objects are processed.
+However, the knowledge of the track candidate parameters allow the 
+parameters of the charge interpolation to be better optimized.
+   Since the PixelCluster position information may already take into     
+account the information related to the charge, the starting point
+for the charge interpolation must be recalculated from the pixel 
+cells of the cluster, and it is taken as the average between the 
+positions of the first and last rows (columns) for the local x (y)
+direction.
+   To this position, a correction dependent on the cluster size and 
+the track incident angle is applied, using the variables "omegax" 
+and "omegay" of the cluster, which are the charge balance between the
+first and last row and columns respectively, and are numbers 
+between 0 and 1. 
+   The correction is Delta*(omega-0.5), where Delta is to be tuned 
+according to the dimensions of the clusters and the track parameters.
+In the barrel, Delta is parametrized as function of track incidence 
+angle and number of rows for the local x direction, and as a function 
+of pseudorapidity and the number of columns for the local y direction. 
+Because of the beam spread in z, the latter parametrization is not 
+ideal and should be replaced with a parametrization taking into account 
+the track theta angle.
+    In the pixel endcap, the correction delta is a fixed number as most 
+track arrives with an incidence angle close to the normal to the silicon 
+sensor, and the charge sharing only occurs in a region of limited size 
+near the border between two pixel cells; Delta represents the size of this
+charge sharing region, determined by diffusion of charges inside the 
+silicon. It is set to 10 micrometer for collision data; for SR1 cosmics 
+data, where some spread in the track incidence angle existed, a large 
+value is used. 
+     If PositionStrategy is set to 0, no position correction is made.
+</li><br>
+<li> The error associated to the position of the cluster is also 
+re-computed, provided that the joboption flag "ErrorStrategy" is set 
+to 2. The errors are parametrized as a function of the same 
+quantities used in the parametrization of the charge interpolation 
+parameters, described above.
+    If ErrorStrategy is set to 1, a slightly conservative error
+equal to the pixel pitch divided the square root of 12 is used. 
+    If ErrorStrategy is set to 0, a very conservative error 
+equal to the cluster total width divided the square root of 12 is
+used. For example, this is appropriate for large clusters produced by 
+an energetic secondary (ionization) electron, an hadronic interaction 
+in the Pixel layer, .... 
+</li><br>
+<li> [In the code is also avalaible the evaluation of the effect of the distortions on the modules of the barrel.
+These distortions are parametrized with the 2 curvatures (in m-1) of the module measured along the FE chip lines and a twist angle (in radians) between the 2 long sides of the modules, where the FE chip lie.
+The final calculation essentially gives a function z(xloc,yloc) in the local module frame that calculate the z coordinate in the new module plane as a function of the coordinates xloc and yloc of the cluster in the nominal flat module plane (i.e. where z = 0 everywhere). This z value are finally shifted by an offset that allow to have the mean value of this z coordinate along the whole surface of the module equal to zero. This procedure avoids that alignment algorithms could correct these distortions by a rotation or a traslation of the module plane modifying the effects of these distortions.
+The procedure to take into account these distortions consists then in the correction of the clusters' coordinates according with the phi and eta angles of the incident tracks w.r.t. the nominal flat module plane and with the position of the cluster in the local module frame following the function z(xloc,yloc) mentioned above.
+These new clusters' coordinates are then avalaible and returned as arguments of the InDet::PixelClusterOnTrack that is the output of this class.
+In the JobOptions, the user can choose between 5 options, following the value of the flag CorrectBow:
+-- CorrectBow==0 means that no corrections will be applied;
+-- CorrectBow==1 means that the values of the 2 curvatures R1 and R2 and the twist angle are the same for all the modules in the barrel. In particular R1=R2=0.1 m-1 and a twist angle of 0.5 mrad are the value choosen, corresponding to a sagitta of  50 microns.
+-- CorrectBow==2 means that for each module R1, R2 and twist angles come from the text file PixelSurveyDistorsions.txt that contain the identifiers of each module and its values for the curvatures and twist directly coming from Survey Data . This file is avalaible in the /share directory.
+-- CorrectBow==3 means that R1,R2 and twist angle are fixed, different for each module of the barrel, starting from a random gaussian generator. The mean values and RMS have been choosen from Survey Data, with the introduction of a correlation between R1 and R2 of the same module.
+R1 is a random number coming from a gaussian distribution with Mean R1 = 0.12 m-1 and RMS R1 = 0.08 m-1;
+R2 is the same but with Mean R2=R1 and RMS R2=0.008 m-1;
+twist angle is the same with Mean Twist = 0.5 mrad and RMS Twist = 0.8 mrad.
+-- CorrectBow==4 means that for each module R1, R2 and twist angles come from the Database. This options is not yet avalaible and tested. ]
+</li>
+</ul>
+
+For <b>SCT_Clusters</b> error calibration is applied, too - currently
+it can be set to copy the previous cluster error, define the error as
+function of the strip pitch or use a tuned cluster error.
+
+For clusters from end-cap modules the measurement is defined in the
+sensor frame (already the PRD formation rotates it from strip frame
+to sensor frame). However, modifications to the error affect the
+<i>error in the strip frame</i>, so the code rotates internally
+between the two frames.
+
+The two-dimensional barrel SCT_Clusters are reduced to one-dimensional
+measurements, i.e. the additional constraint of the hit being compatible
+with the strip center at an uncertainty level of strip length/sqrt(12)
+is removed. This behaviour can be restored by setting the job option
+MakeTwoDimBarrelClusters=True.
+
+
+@section ExtrasSiClusterOnTrackTool Extra Pages
+
+ - @ref UsedSiClusterOnTrackTool
+ - @ref RequirementsSiClusterOnTrackTool
+*/
+
+/**
+@page UsedSiClusterOnTrackTool Used Packages
+@htmlinclude used_packages.html
+*/
+
+/**
+@page RequirementsSiClusterOnTrackTool Requirements
+@include requirements
+*/
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/share/PixelSurveyDistorsions.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/share/PixelSurveyDistorsions.txt
new file mode 100755
index 00000000000..d3268ebcfc6
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/share/PixelSurveyDistorsions.txt
@@ -0,0 +1,1456 @@
+0x2000000 0.0354 0.0435 0.0088
+0x2002000 0.0442 0.0718 -0.0172
+0x2004000 0.115 0.0863 -0.0134
+0x2006000 0.0135 0.0136 -0.0015
+0x2008000 0.0674 0.0538 0.0023
+0x200a000 0.0304 0.0461 0.0044
+0x200c000 0.0302 0.0119 -0.0322
+0x200e000 0.0671 0.0679 0.002
+0x2010000 0.0479 0.0065 0.023
+0x2012000 0.0546 0.1047 0.0175
+0x2014000 0.0038 0.0121 -0.0206
+0x2016000 0.0239 0.0541 0.0299
+0x2018000 0.0189 0.0687 -0.0095
+0x2020000 0.039 0.0203 0.0013
+0x2022000 0.0584 0.0483 -0.01
+0x2024000 0.0153 0.0176 0.0017
+0x2026000 0.0108 0.009 0.0064
+0x2028000 0.0828 0.0914 -0.0095
+0x202a000 0.132 0.1112 -1e-04
+0x202c000 0.0513 0.0098 -0.0032
+0x202e000 0.0035 0.0079 0.0022
+0x2030000 0.072 0.0916 -0.0277
+0x2032000 0.005 0.0057 -0.0055
+0x2034000 0.0135 0.0085 -0.0135
+0x2036000 0.0366 0.0349 -0.0012
+0x2038000 0.0347 0.0225 0.0155
+0x2040000 0.0813 0.1017 0.0207
+0x2042000 0.2273 0.2143 0.0002
+0x2044000 0.1009 0.0328 -0.0048
+0x2046000 0.2936 0.2433 0.0152
+0x2048000 0.0947 0.1384 -0.0101
+0x204a000 0.1169 0.0813 0.0041
+0x204c000 0.0593 0.0362 -0.0148
+0x204e000 0.0723 0.0568 -0.0219
+0x2050000 0.1943 0.1671 -0.0281
+0x2052000 0.0691 0.0606 -0.1062
+0x2054000 0.0083 0.0465 0.0656
+0x2056000 0.0507 0.0447 0.0155
+0x2058000 0.1987 0.0485 0.1334
+0x2060000 0.1194 0.0904 -0.27
+0x2062000 0.1267 0.1331 -0.1825
+0x2064000 0.3143 0.3082 -0.007
+0x2066000 0.1125 0.0786 -0.1769
+0x2068000 0.0527 0.0645 -0.1815
+0x206a000 0.2031 0.1834 -0.0898
+0x206c000 0.179 0.1601 -0.0695
+0x206e000 0.2016 0.1875 -0.0912
+0x2070000 0.1626 0.1227 -0.0677
+0x2072000 0.2003 0.1775 -0.0893
+0x2074000 0.3061 0.2687 -0.094
+0x2076000 0.1476 0.1214 -0.1078
+0x2078000 0.1829 0.1787 -0.0694
+0x2080000 0.0679 0.0012 0.0032
+0x2082000 0.0358 0.0361 0.0123
+0x2084000 0.0199 0.0088 0.0179
+0x2086000 0.1196 0.0673 -0.0171
+0x2088000 0.0509 0.0489 0.0117
+0x208a000 0.0154 0.004 0.0127
+0x208c000 0.0436 0.0602 0.0222
+0x208e000 0.0853 0.064 0.0105
+0x2090000 0.0003 0.0265 -0.0153
+0x2092000 0.0508 0.0806 -0.0291
+0x2094000 0.0459 0.0237 0.0097
+0x2096000 0.0048 0.019 0.0195
+0x2098000 0.0547 0.041 -0.0355
+0x20a0000 0.2297 0.1467 -0.0017
+0x20a2000 0.178 0.1401 -0.0178
+0x20a4000 0.2671 0.1685 -0.0435
+0x20a6000 0.181 0.0652 -0.1442
+0x20a8000 0.1504 0.1095 -0.0928
+0x20aa000 0.1556 0.107 -0.1267
+0x20ac000 0.1053 0.0271 -0.0502
+0x20ae000 0.0777 0.0478 -0.0643
+0x20b0000 0.0696 0.0294 -0.0466
+0x20b2000 0.1401 0.1491 -0.1012
+0x20b4000 0.2206 0.1857 -0.0888
+0x20b6000 0.208 0.1791 -0.0609
+0x20b8000 0.1625 0.1208 -0.0694
+0x20c0000 0.031 0.0337 0.0223
+0x20c2000 0.1055 0.1113 0.0444
+0x20c4000 0.1371 0.1217 0.0269
+0x20c6000 0.1822 0.1637 0.0328
+0x20c8000 0.0103 0.0076 0.0044
+0x20ca000 0.1632 0.1438 0.0257
+0x20cc000 0.0331 0.0017 0.0102
+0x20ce000 0.0662 0.0249 0.0119
+0x20d0000 0.0358 0.0204 -0.0161
+0x20d2000 0.112 0.0831 -0.0737
+0x20d4000 0.198 0.1969 0.0269
+0x20d6000 0.1442 0.1286 0.0057
+0x20d8000 0.4165 0.2027 0.012
+0x20e0000 0.1057 0.0872 0.0072
+0x20e2000 0.0585 0.0431 0.0155
+0x20e4000 0.4918 0.0164 0.2758
+0x20e6000 0.0467 0.0664 0.0025
+0x20e8000 0.0577 0.0632 -1e-04
+0x20ea000 0.0311 0.0279 0.0054
+0x20ec000 0.0236 0.0308 -1e-04
+0x20ee000 0.0304 0.041 0.003
+0x20f0000 0.0236 0.0401 -0.01
+0x20f2000 0.0925 0.1113 -0.0524
+0x20f4000 0.0138 0.035 0.0066
+0x20f6000 0.0036 0.0178 0.0058
+0x20f8000 0.3044 0.001 0.0204
+0x2100000 0.1609 0.1522 -0.0476
+0x2102000 0.0482 0.0263 -0.0348
+0x2104000 0.2256 0.1177 -0.0819
+0x2106000 0.0533 0.0028 -0.047
+0x2108000 0.1075 0.055 -0.038
+0x210a000 0.0887 0.0487 -0.0347
+0x210c000 0.1285 0.0643 -0.0952
+0x210e000 0.104 0.1066 -0.0935
+0x2110000 0.1308 0.0025 -0.1082
+0x2112000 0.1791 0.1831 -0.096
+0x2114000 0.1423 0.0663 -0.1624
+0x2116000 0.1257 0.0624 -0.1012
+0x2118000 0.1497 0.1327 -0.1139
+0x2120000 0.0085 0.015 -0.007
+0x2122000 0.0128 0.0398 0.0152
+0x2124000 0.0225 0.0388 -0.0157
+0x2126000 0.0524 0.0232 0.0002
+0x2128000 0.0464 0.0066 -0.0104
+0x212a000 0.0239 0.0127 -0.0198
+0x212c000 0.0895 0.0711 0.0123
+0x212e000 0.0045 0.008 0.0155
+0x2130000 0.075 0.1015 -0.0145
+0x2132000 0.0415 0.0216 0.0224
+0x2134000 0.0064 0.014 0.0213
+0x2136000 0.0014 0.0311 0.0284
+0x2138000 0.0852 0.0578 -0.0149
+0x2140000 0.0592 0.0463 -0.0234
+0x2142000 0.0246 0.0325 0.0064
+0x2144000 0.0438 0.035 0.0152
+0x2146000 0.1067 0.0626 0.0199
+0x2148000 0.0407 0.0198 0.0104
+0x214a000 0.0173 0.0025 0.011
+0x214c000 0.0167 0.0179 -0.0097
+0x214e000 0.011 0.001 -0.0224
+0x2150000 0.0019 0.0273 0.0003
+0x2152000 0.0189 0.0499 -0.0231
+0x2154000 0.0123 0.0031 -0.001
+0x2156000 0.0202 0.008 -0.0194
+0x2158000 0.004 0.0063 -0.0075
+0x2160000 0.0417 0.0379 -0.0272
+0x2162000 0.0497 0.0408 -0.0031
+0x2164000 0.0083 0.032 0.015
+0x2166000 0.0034 0.0201 -0.0059
+0x2168000 0.0976 0.0855 -0.0174
+0x216a000 0.0033 0.0016 0.0093
+0x216c000 0.0521 0.0734 0.0037
+0x216e000 0.0491 0.0337 -0.0073
+0x2170000 0.1378 0.0987 0.0035
+0x2172000 0.0059 0.0047 0.0104
+0x2174000 0.0061 0.0076 0.0241
+0x2176000 0.0325 0.0496 -0.0039
+0x2178000 0.0119 0.0053 -0.0069
+0x2180000 0.1193 0.1222 -0.0077
+0x2182000 0.0731 0.0691 -0.025
+0x2184000 0.0836 0.0599 0.0043
+0x2186000 0.1299 0.1098 -0.0007
+0x2188000 0.2393 0.1863 -0.0402
+0x218a000 0.1446 0.0918 -0.026
+0x218c000 0.1825 0.1251 -0.0897
+0x218e000 0.0431 0.0414 -0.0113
+0x2190000 0.0093 0.0139 -0.0307
+0x2192000 0.0369 0.0334 -0.0561
+0x2194000 0.1134 0.1223 -0.0252
+0x2196000 0.0658 0.0503 -0.0187
+0x2198000 0.1533 0.0194 0.0591
+0x21a0000 0.2769 0.1567 -0.0187
+0x21a2000 0.2246 0.1421 0.002
+0x21a4000 0.1858 0.0981 0.0012
+0x21a6000 0.1448 0.0867 -0.0468
+0x21a8000 0.1634 0.0141 -0.0518
+0x21aa000 0.1378 0.0821 -0.0418
+0x21ac000 0.0889 0.0366 -0.0387
+0x21ae000 0.0596 0.0351 -0.0663
+0x21b0000 0.0722 0.0087 -0.0525
+0x21b2000 0.1057 0.0287 -0.0487
+0x21b4000 0.1112 0.1011 -0.0614
+0x21b6000 0.0863 0.0343 -0.0506
+0x21b8000 0.1349 0.0857 -0.1175
+0x21c0000 0.1744 0.1196 -0.0543
+0x21c2000 0.1812 0.0973 -0.1575
+0x21c4000 0.2336 0.1286 -0.1068
+0x21c6000 0.2392 0.1148 -0.0661
+0x21c8000 0.1539 0.0157 -0.0498
+0x21ca000 0.1774 0.1278 -0.0405
+0x21cc000 0.1251 0.0262 -0.0781
+0x21ce000 0.1766 0.0842 -0.1513
+0x21d0000 0.2616 0.1324 -0.1429
+0x21d2000 0.1262 0.0766 -0.0355
+0x21d4000 0.1431 0.041 -0.146
+0x21d6000 0.1992 0.1156 -0.1525
+0x21d8000 0.2065 0.1034 -0.0793
+0x21e0000 0.0451 0.0487 -0.0101
+0x21e2000 0.0274 0.0026 0.0074
+0x21e4000 0.0837 0.0772 0.0025
+0x21e6000 0.0464 0.0323 0.0051
+0x21e8000 0.0066 0.001 -0.0142
+0x21ea000 0.0837 0.0714 0.0253
+0x21ec000 0.0441 0.0628 0.0003
+0x21ee000 0.0155 0.026 0.0056
+0x21f0000 0.0575 0.0619 -0.0108
+0x21f2000 0.0621 0.0647 -0.0207
+0x21f4000 0.0013 0.0353 -0.0048
+0x21f6000 0.0716 0.0582 -0.0094
+0x21f8000 0.1902 0.1157 0.0838
+0x2200000 0.0512 0.057 0.0029
+0x2202000 0.0094 0.0064 0.0231
+0x2204000 0.1031 0.0967 -0.0015
+0x2206000 0.0391 0.0205 0.0322
+0x2208000 0.0672 0.0505 0.0012
+0x220a000 0.08 0.0879 -0.0247
+0x220c000 0.0053 0.0138 -0.0158
+0x220e000 0.0004 0.0169 0.0113
+0x2210000 0.0593 0.0514 0.0017
+0x2212000 0.0468 0.0378 0.0006
+0x2214000 0.0062 0.033 0.0005
+0x2216000 0.0019 0.0138 0.0176
+0x2218000 0.029 0.0139 0.0153
+0x2220000 0.1509 0.1516 -0.0202
+0x2222000 0.0233 0.0477 0.0259
+0x2224000 0.0687 0.0572 0.0127
+0x2226000 0.0576 0.0436 -0.0068
+0x2228000 0.0189 0.0327 0.0071
+0x222a000 0.0337 0.0209 0.0303
+0x222c000 0.0146 0.0231 0.0099
+0x222e000 0.015 0.0011 0.0106
+0x2230000 0.0744 0.0731 -0.0016
+0x2232000 0.0796 0.077 -0.0038
+0x2234000 0.0741 0.0712 -0.0114
+0x2236000 0.0137 0.0172 -0.0004
+0x2238000 0.096 0.089 0.0027
+0x2240000 0.0844 0.0786 0.0157
+0x2242000 0.1542 0.1429 0.0056
+0x2244000 0.3252 0.2651 0.0034
+0x2246000 0.2974 0.2711 -0.016
+0x2248000 0.0691 0.0822 -0.0171
+0x224a000 0.1268 0.1201 -0.02
+0x224c000 0.3415 0.2973 -0.0237
+0x224e000 0.0191 0.0186 -0.0155
+0x2250000 0.0404 0.0137 -0.0128
+0x2252000 0.0246 0.0101 -0.0439
+0x2254000 0.0471 0.0573 -0.0079
+0x2256000 0.1223 0.0834 -0.0205
+0x2258000 0.3518 0.1948 0.0259
+0x2260000 0.0278 0.016 0.0016
+0x2262000 0.0637 0.043 -0.0049
+0x2264000 0.0456 0.059 0.0139
+0x2266000 0.0036 0.0044 -0.0042
+0x2268000 0.0583 0.0596 0.0058
+0x226a000 0.0258 0.0296 -0.007
+0x226c000 0.0037 0.0051 -0.0009
+0x226e000 0.0222 0.0138 0.0042
+0x2270000 0.0811 0.0659 -0.0154
+0x2272000 0.0713 0.054 -0.0077
+0x2274000 0.1063 0.097 -0.0115
+0x2276000 0.1128 0.1033 -0.0029
+0x2278000 0.0929 0.0853 0.0012
+0x2280000 0.0978 0.1072 0.0163
+0x2282000 0.1443 0.1402 -0.0096
+0x2284000 0.107 0.1117 -0.0186
+0x2286000 0.0827 0.0584 -0.0162
+0x2288000 0.0885 0.0809 -0.0234
+0x228a000 0.1056 0.1 -0.0338
+0x228c000 0.1124 0.1114 -0.0017
+0x228e000 0.0756 0.0874 -0.0361
+0x2290000 0.0864 0.0953 -0.0287
+0x2292000 0.0858 0.0772 -0.0343
+0x2294000 0.0248 0.0377 -0.0176
+0x2296000 0.0673 0.0733 -0.0222
+0x2298000 0.074 0.0096 0.017
+0x22a0000 0.0967 0.1255 -0.0025
+0x22a2000 0.0472 0.0617 0.0174
+0x22a4000 0.089 0.0729 -0.0041
+0x22a6000 0.0455 0.0979 0.0545
+0x22a8000 0.0467 0.015 0.0007
+0x22aa000 0.0797 0.0661 -0.0487
+0x22ac000 0.045 0.0514 0.0108
+0x22ae000 0.0578 0.0689 -0.0326
+0x22b0000 0.0597 0.0731 -0.0287
+0x22b2000 0.0276 0.0324 0.0053
+0x22b4000 0.0686 0.0657 0.0094
+0x22b6000 0.0436 0.0426 -0.0354
+0x22b8000 0.0337 0.0283 -0.0214
+0x2800000 0.1978 0.189 -0.005
+0x2802000 0.2111 0.2687 -0.0318
+0x2804000 0.0304 0.0042 -0.0481
+0x2806000 0.1348 0.1442 -0.1104
+0x2808000 0.1081 0.046 -0.0743
+0x280a000 0.0862 0.2745 0.0095
+0x280c000 0.1832 0.1988 -0.0836
+0x280e000 0.1859 0.1535 0.0943
+0x2810000 0.027 0.0447 0.0389
+0x2812000 0.1641 0.1613 0.0154
+0x2814000 0.1131 0.0991 -0.0313
+0x2816000 0.1814 0.1487 -0.0303
+0x2818000 0.2235 0.1572 0.0749
+0x2820000 0.0228 0.0207 -0.0275
+0x2822000 0.0664 0.04 -0.0125
+0x2824000 0.1057 0.1112 -0.024
+0x2826000 0.1167 0.1159 0.0038
+0x2828000 0.0586 0.0331 -0.0219
+0x282a000 0.0744 0.08 -0.0041
+0x282c000 0.0501 0.0917 0.1194
+0x282e000 0.0182 0.0005 -0.0079
+0x2830000 0.0033 0.0337 -0.0061
+0x2832000 0.033 0.0464 0.0096
+0x2834000 0.0275 0.0989 -0.0715
+0x2836000 0.0416 0.0737 -0.003
+0x2838000 0.1573 0.2114 -0.1091
+0x2840000 0.0807 0.1061 -0.006
+0x2842000 0.0059 0.0225 -0.0082
+0x2844000 0.0641 0.0479 -0.0128
+0x2846000 0.0543 0.0483 0.0055
+0x2848000 0.0534 0.0676 -0.0263
+0x284a000 0.1053 0.0934 -0.001
+0x284c000 0.0591 0.052 -0.0064
+0x284e000 0.0632 0.0591 -0.017
+0x2850000 0.1167 0.0675 -0.0329
+0x2852000 0.0999 0.0888 -0.0837
+0x2854000 0.025 0.005 0.0231
+0x2856000 0.0301 0.02 -0.0007
+0x2858000 0.1868 0.0171 0.0721
+0x2860000 0.2778 0.1977 -0.0682
+0x2862000 0.1669 0.1185 -0.0068
+0x2864000 0.2047 0.1486 -0.041
+0x2866000 0.0726 0.1315 -0.1455
+0x2868000 0.0894 0.0375 -0.11
+0x286a000 0.2352 0.0718 -0.0548
+0x286c000 0.2799 0.1973 -0.0345
+0x286e000 0.1067 0.0088 -0.0334
+0x2870000 0.1443 0.087 -0.0825
+0x2872000 0.1598 0.1099 -0.0909
+0x2874000 0.2671 0.1984 -0.1113
+0x2876000 0.2127 0.1615 -0.0514
+0x2878000 0.1651 0.125 -0.0789
+0x2880000 0.1532 0.0677 -0.077
+0x2882000 0.196 0.1067 -0.1923
+0x2884000 0.2053 0.1027 -0.2322
+0x2886000 0.241 0.1867 -0.0108
+0x2888000 0.1184 0.0206 -0.1032
+0x288a000 0.1093 0.1315 -0.082
+0x288c000 0.1295 0.0494 -0.1221
+0x288e000 0.259 0.1402 -0.063
+0x2890000 0.163 0.1639 -0.057
+0x2892000 0.2683 0.1603 -0.1419
+0x2894000 0.2095 0.1324 -0.0799
+0x2896000 0.1577 0.1393 -0.0921
+0x2898000 0.196 0.1203 -0.0887
+0x28a0000 0.0501 0.079 0.0226
+0x28a2000 0.0358 0.0443 0.0333
+0x28a4000 0.0796 0.0502 -0.0106
+0x28a6000 0.0371 0.0373 -0.0022
+0x28a8000 0.0737 0.0826 -0.0034
+0x28aa000 0.0671 0.0478 0.0023
+0x28ac000 0.0086 0.0092 0.0042
+0x28ae000 0.0094 0.0157 -0.0145
+0x28b0000 0.0129 0.0058 -0.0024
+0x28b2000 0.1118 0.1161 0.003
+0x28b4000 0.0135 0.0009 -0.0255
+0x28b6000 0.0757 0.0544 -0.0384
+0x28b8000 0.0033 0.0464 0.0422
+0x28c0000 0.2211 0.1753 -0.0695
+0x28c2000 0.2294 0.1593 -0.0438
+0x28c4000 0.1701 0.14 -0.061
+0x28c6000 0.2447 0.1787 -0.0881
+0x28c8000 0.1116 0.0755 -0.0627
+0x28ca000 0.0699 0.0688 -0.1033
+0x28cc000 0.1405 0.0494 -0.0049
+0x28ce000 0.1974 0.0857 -0.088
+0x28d0000 0.1007 0.1359 -0.1146
+0x28d2000 0.079 0.0303 -0.0527
+0x28d4000 0.1705 0.1512 -0.1075
+0x28d6000 0.1376 0.1413 -0.0558
+0x28d8000 0.069 0.0009 -0.1293
+0x28e0000 0.1367 0.0481 -0.0384
+0x28e2000 0.1365 0.0679 -0.0509
+0x28e4000 0.1676 0.0608 -0.0712
+0x28e6000 0.1668 0.0589 -0.0941
+0x28e8000 0.073 0.0824 -0.0799
+0x28ea000 0.2529 0.0824 0.0118
+0x28ec000 0.1748 0.0383 -0.0759
+0x28ee000 0.1286 0.0203 -0.031
+0x28f0000 0.2309 0.1377 -0.0987
+0x28f2000 0.1773 0.1147 -0.1767
+0x28f4000 0.2051 0.0572 -0.116
+0x28f6000 0.1288 0.079 -0.0434
+0x28f8000 0.3157 0.13 -0.0868
+0x2900000 0.0515 0.0669 0.0027
+0x2902000 0.1546 0.1384 0.0052
+0x2904000 0.3791 0.4303 -0.0612
+0x2906000 0.0539 0.0483 0.0491
+0x2908000 0.2085 0.1987 0.0163
+0x290a000 0.075 0.0665 0.0076
+0x290c000 0.2052 0.2082 -0.0032
+0x290e000 0.1512 0.147 -0.0006
+0x2910000 0.1285 0.1246 -0.0202
+0x2912000 0.1478 0.1502 -0.0338
+0x2914000 0.0873 0.1068 -0.0018
+0x2916000 0.1504 0.1484 0.0299
+0x2918000 0.3333 0.225 0.0641
+0x2920000 0.0805 0.1029 0.0144
+0x2922000 0.0948 0.0912 0.0122
+0x2924000 0.0974 0.0758 -0.0355
+0x2926000 0.0412 0.0476 -0.0175
+0x2928000 0.0672 0.0692 -0.048
+0x292a000 0.0195 0.0126 -0.0179
+0x292c000 0.0735 0.0301 -0.0367
+0x292e000 0.0324 0.0107 -0.0124
+0x2930000 0.0758 0.0361 -0.0713
+0x2932000 0.0157 0.0104 -0.0652
+0x2934000 0.0238 0.0218 0.0428
+0x2936000 0.0952 0.0985 -0.0178
+0x2938000 0.1259 0.0746 0.092
+0x2940000 0.0585 0.0879 -0.0267
+0x2942000 0.0354 0.0934 0.0631
+0x2944000 0.0525 0.0306 -0.0078
+0x2946000 0.113 0.1209 -0.0155
+0x2948000 0.0498 0.0535 0.0202
+0x294a000 0.0646 0.0528 -0.006
+0x294c000 0.0067 0.0297 0.0229
+0x294e000 0.0718 0.0784 0.0092
+0x2950000 0.1005 0.09 -0.0112
+0x2952000 0.073 0.0525 0.0084
+0x2954000 0.0438 0.0296 0.0066
+0x2956000 0.1141 0.1009 -0.0288
+0x2958000 0.1896 0.2072 -0.0061
+0x2960000 0.009 0.0139 0.0049
+0x2962000 0.0032 0.0245 -0.0397
+0x2964000 0.0321 0.01 0.0222
+0x2966000 0.0027 0.0086 0.0075
+0x2968000 0.0106 0.0146 0.0103
+0x296a000 0.0118 0.0054 -0.0076
+0x296c000 0.0589 0.0105 -0.0101
+0x296e000 0.0256 0.05 -0.0002
+0x2970000 0.0327 0.0291 0.0034
+0x2972000 0.0346 0.0035 0.0076
+0x2974000 0.0096 0.0224 -0.044
+0x2976000 0.0191 0.0177 -0.0205
+0x2978000 0.1292 0.0745 -0.035
+0x2980000 0.0103 0.0109 0
+0x2982000 0.0316 0.0465 0.0088
+0x2984000 0.0445 0.0439 0.0008
+0x2986000 0.0274 0.0263 0.026
+0x2988000 0.0371 0.0056 0.0076
+0x298a000 0.0397 0.0236 0.0153
+0x298c000 0.0037 0.0732 0.0389
+0x298e000 0.0533 0.0203 -0.0132
+0x2990000 0.0097 0.0199 0.0018
+0x2992000 0.0564 0.025 -0.0119
+0x2994000 0.0243 0.0436 -0.0289
+0x2996000 0.0932 0.0442 -0.0215
+0x2998000 0.0689 0.0469 0.0068
+0x29a0000 0.2271 0.1327 0.0562
+0x29a2000 0.1517 0.0627 -0.0946
+0x29a4000 0.1378 0.0775 -0.1249
+0x29a6000 0.1975 0.1137 -0.1252
+0x29a8000 0.1634 0.11 -0.029
+0x29aa000 0.0946 0.0799 -0.0923
+0x29ac000 0.0681 0.0039 -0.087
+0x29ae000 0.1521 0.0808 -0.0976
+0x29b0000 0.1925 0.1426 -0.1717
+0x29b2000 0.1734 0.089 -0.0716
+0x29b4000 0.1726 0.0571 -0.0709
+0x29b6000 0.2029 0.1023 -0.1144
+0x29b8000 0.2676 0.1924 -0.0364
+0x29c0000 0.1986 0.1854 0.0041
+0x29c2000 0.1967 0.2282 0.04
+0x29c4000 0.1501 0.1459 0.003
+0x29c6000 0.1759 0.1675 0.0173
+0x29c8000 0.1599 0.1524 0.0139
+0x29ca000 0.0164 0.025 0.0116
+0x29cc000 0.2155 0.2109 0.02
+0x29ce000 0.0933 0.0778 -1e-04
+0x29d0000 0.2854 0.2789 -0.0223
+0x29d2000 0.2473 0.2555 0.0148
+0x29d4000 0.0773 0.1042 0.0207
+0x29d6000 0.1868 0.1667 -0.0016
+0x29d8000 0.2456 0.1643 0.0531
+0x29e0000 0.138 0.101 -0.0719
+0x29e2000 0.1877 0.1348 -0.0645
+0x29e4000 0.1856 0.0821 0.0066
+0x29e6000 0.4445 0.1008 -0.0551
+0x29e8000 0.1872 0.1234 -0.0687
+0x29ea000 0.1927 0.0869 -0.0744
+0x29ec000 0.116 0.0413 -0.0713
+0x29ee000 0.2477 0.1467 -0.0828
+0x29f0000 0.2539 0.1507 0.0208
+0x29f2000 0.1493 0.0791 -0.1573
+0x29f4000 0.1332 0.0544 -0.0755
+0x29f6000 0.1695 0.1266 -0.1665
+0x29f8000 0.15 0.0942 -0.0795
+0x2a00000 0.1292 0.1625 -0.003
+0x2a02000 0.1285 0.1213 0
+0x2a04000 0.1372 0.1086 -0.021
+0x2a06000 0.1194 0.0882 0.0125
+0x2a08000 0.1194 0.1318 -0.0151
+0x2a0a000 0.1854 0.1653 0.0042
+0x2a0c000 0.1051 0.0749 -0.0287
+0x2a0e000 0.1762 0.1757 -0.0755
+0x2a10000 0.1975 0.1893 -0.0714
+0x2a12000 0.1203 0.0984 -0.0899
+0x2a14000 0.0802 0.0999 0.0095
+0x2a16000 0.1791 0.1758 -0.0323
+0x2a18000 0.238 0.1429 0.051
+0x2a20000 0.2609 0.2075 -0.0979
+0x2a22000 0.1189 0.0867 -0.0164
+0x2a24000 0.2371 0.1366 -0.0812
+0x2a26000 0.2797 0.2028 -0.0979
+0x2a28000 0.1607 0.0479 -0.0891
+0x2a2a000 0.1349 0.0601 -0.0724
+0x2a2c000 0.2833 0.144 -0.1437
+0x2a2e000 0.2511 0.1479 -0.1349
+0x2a30000 0.0654 0.0152 -0.0587
+0x2a32000 0.1463 0.0778 -0.0568
+0x2a34000 0.1263 0.08 -0.0557
+0x2a36000 0.1345 0.0858 -0.1041
+0x2a38000 0.2432 0.1301 -0.1047
+0x2a40000 0.1032 0.1484 0.0259
+0x2a42000 0.0613 0.043 0.0093
+0x2a44000 0.3717 0.3573 -0.0226
+0x2a46000 0.2568 0.2489 -0.0466
+0x2a48000 0.1931 0.2083 -0.0316
+0x2a4a000 0.2618 0.2516 0.0004
+0x2a4c000 0.4353 0.4012 -0.0271
+0x2a4e000 0.471 0.4714 -0.0307
+0x2a50000 0.3104 0.3008 -0.0067
+0x2a52000 0.1388 0.1228 -0.0641
+0x2a54000 0.1694 0.1899 0.0219
+0x2a56000 0.185 0.1917 -0.0268
+0x2a58000 0.3698 0.2171 0.0148
+0x2a60000 0.1855 0.0891 -0.0838
+0x2a62000 0.2681 0.1543 -0.077
+0x2a64000 0.1704 0.0484 -0.0465
+0x2a66000 0.27 0.1741 -0.1373
+0x2a68000 0.1811 0.0115 -0.1007
+0x2a6a000 0.1385 0.0012 -0.0364
+0x2a6c000 0.1799 0.0733 0.0066
+0x2a6e000 0.0978 0.1031 -0.1019
+0x2a70000 0.1156 0.0217 -0.0481
+0x2a72000 0.2415 0.1048 -0.1079
+0x2a74000 0.1899 0.0967 -0.0682
+0x2a76000 0.1634 0.0432 -0.0718
+0x2a78000 0.118 0.0548 -0.0202
+0x2a80000 0.1227 0.0741 -0.1118
+0x2a82000 0.0726 0.0951 -0.0755
+0x2a84000 0.1986 0.1651 -0.0803
+0x2a86000 0.207 0.1817 -0.0658
+0x2a88000 0.1712 0.1225 -0.0714
+0x2a8a000 0.2234 0.0626 -0.0182
+0x2a8c000 0.1893 0.1759 -0.0455
+0x2a8e000 0.2367 0.2131 -0.0816
+0x2a90000 0.1662 0.12 -0.0616
+0x2a92000 0.0961 0.0645 -0.0882
+0x2a94000 0.2506 0.1265 -0.0304
+0x2a96000 0.2488 0.1723 -0.0552
+0x2a98000 0.1601 0.1003 -0.0731
+0x2aa0000 0.1976 0.1686 -0.0023
+0x2aa2000 0.1708 0.1559 -0.0213
+0x2aa4000 0.133 0.1575 -0.0349
+0x2aa6000 0.146 0.1213 -0.0292
+0x2aa8000 0.1045 0.1094 -0.0081
+0x2aaa000 0.1564 0.1261 -0.0182
+0x2aac000 0.0795 0.0512 -0.0304
+0x2aae000 1.8035 0.0373 -1.2957
+0x2ab0000 0.0729 0.0561 -0.0207
+0x2ab2000 0.0778 0.0702 -0.0282
+0x2ab4000 0.0406 0.0303 -0.0831
+0x2ab6000 0.0874 0.0804 -0.0083
+0x2ab8000 0.0896 0.1326 0.0219
+0x2ac0000 0.008 0.0135 0.0282
+0x2ac2000 0.1371 0.1243 0.0339
+0x2ac4000 0.1437 0.1122 0.0295
+0x2ac6000 0.1632 0.1392 0.028
+0x2ac8000 0.0957 0.1095 0.0099
+0x2aca000 0.1736 0.1548 0.0266
+0x2acc000 0.1846 0.1781 -0.0036
+0x2ace000 0.056 0.0664 0.017
+0x2ad0000 0.1575 0.1132 -0.0128
+0x2ad2000 0.1611 0.1295 -0.0505
+0x2ad4000 0.2416 0.2581 0.0156
+0x2ad6000 0.2129 0.1473 0.0278
+0x2ad8000 0.1773 0.0294 0.1253
+0x2ae0000 0.2416 0.1255 -0.1154
+0x2ae2000 0.1678 0.0784 -0.0814
+0x2ae4000 0.1541 0.1184 -0.0669
+0x2ae6000 0.1763 0.0915 -0.125
+0x2ae8000 0.1651 0.0968 -0.1298
+0x2aea000 0.2697 0.1519 -0.0835
+0x2aec000 0.1802 0.1387 -0.0738
+0x2aee000 0.1726 0.1267 -0.0879
+0x2af0000 0.2177 0.1063 -0.1752
+0x2af2000 0.0557 0.0053 -0.049
+0x2af4000 0.1679 0.0733 -0.0317
+0x2af6000 0.2065 0.0829 -0.1019
+0x2af8000 0.2115 0.0827 -0.136
+0x2b00000 0.2012 0.0556 -0.0775
+0x2b02000 0.2029 0.1314 -0.0555
+0x2b04000 0.1681 0.1279 -0.057
+0x2b06000 0.1921 0.0672 -0.0404
+0x2b08000 0.1903 0.1287 -0.1232
+0x2b0a000 0.1339 0.0914 -0.0679
+0x2b0c000 0.2066 0.1346 -0.0173
+0x2b0e000 0.1829 0.0621 -0.1157
+0x2b10000 0.1941 0.1127 -0.0739
+0x2b12000 0.0404 0.0504 -0.0855
+0x2b14000 0.219 0.1324 -0.2258
+0x2b16000 0.1217 0.0546 -0.092
+0x2b18000 0.2409 0.1715 -0.0556
+0x2b20000 0.0689 0.0408 -0.0142
+0x2b22000 0.1273 0.1421 0.0344
+0x2b24000 0.0688 0.1042 0.03
+0x2b26000 0.0429 0.0345 0.0012
+0x2b28000 0.0917 0.0856 -0.0079
+0x2b2a000 0.1104 0.0832 -0.0356
+0x2b2c000 0.0046 0 0.0024
+0x2b2e000 0.0519 0.0437 -0.0418
+0x2b30000 0.0566 0.0808 0.0132
+0x2b32000 0.1034 0.0967 0.0005
+0x2b34000 0.0424 0.0267 -0.0016
+0x2b36000 0.1105 0.0372 -0.0451
+0x2b38000 0.0703 0.0863 -0.0201
+0x2b40000 0.2496 0.2714 0.0311
+0x2b42000 0.0652 0.0752 0.0173
+0x2b44000 0.1664 0.1432 -0.0178
+0x2b46000 0.0974 0.0928 -0.0172
+0x2b48000 0.1614 0.1906 -0.0565
+0x2b4a000 0.0731 0.0884 -0.0082
+0x2b4c000 0.2841 0.2517 -0.048
+0x2b4e000 0.2306 0.185 -0.0279
+0x2b50000 0.278 0.2514 -0.0278
+0x2b52000 0.0911 0.0719 -0.0869
+0x2b54000 0.2 0.2357 0.0073
+0x2b56000 0.1753 0.1765 -0.0115
+0x2b58000 0.3251 0.1455 0.062
+0x2b60000 0.275 0.2178 -0.0624
+0x2b62000 0.1075 0.0431 -0.068
+0x2b64000 0.1416 0.1025 -0.0679
+0x2b66000 0.1742 0.2333 -0.0575
+0x2b68000 0.1653 0.1572 0.0174
+0x2b6a000 0.0933 0.0088 -0.0754
+0x2b6c000 0.2164 0.1113 -0.046
+0x2b6e000 0.046 0.0246 -0.0656
+0x2b70000 0.1195 0.0395 -0.0829
+0x2b72000 0.2746 0.2267 -0.1917
+0x2b74000 0.1457 0.1184 -0.175
+0x2b76000 0.114 0.0046 -0.0362
+0x2b78000 0.1631 0.15 -0.0923
+0x2b80000 0.2976 0.2315 -0.0734
+0x2b82000 0.0353 0.0048 -0.0088
+0x2b84000 0.2108 0.1354 -0.0897
+0x2b86000 0.1867 0.0597 -0.0736
+0x2b88000 0.1027 0.068 -0.0131
+0x2b8a000 0.1243 0.0252 -0.0376
+0x2b8c000 0.0315 0.019 -0.0356
+0x2b8e000 0.0198 0.0279 -0.051
+0x2b90000 0.2287 0.1359 -0.0999
+0x2b92000 0.1829 0.1383 -0.0841
+0x2b94000 0.1227 0.0095 -0.1275
+0x2b96000 0.08 0.0692 -0.0593
+0x2b98000 0.3723 0.2904 -0.1254
+0x2ba0000 0.129 0.0924 -0.0697
+0x2ba2000 0.1533 0.0321 -0.1455
+0x2ba4000 0.1855 0.095 -0.0217
+0x2ba6000 0.0553 0.072 -0.0516
+0x2ba8000 0.1141 0.0624 -0.0493
+0x2baa000 0.0559 0.0137 -0.0414
+0x2bac000 0.0717 0.0072 -0.0592
+0x2bae000 0.126 0.0708 -0.05
+0x2bb0000 0.0812 0.0315 -0.0638
+0x2bb2000 0.1297 0.0842 -0.0565
+0x2bb4000 0.1855 0.1156 -0.0408
+0x2bb6000 0.1384 0.1065 -0.0853
+0x2bb8000 0.2017 0.0188 -0.0197
+0x2bc0000 0.164 0.1391 0.0051
+0x2bc2000 0.2051 0.1721 -0.0012
+0x2bc4000 0.2246 0.1899 -0.0594
+0x2bc6000 0.1347 0.1055 -0.0732
+0x2bc8000 0.1348 0.1425 0.0251
+0x2bca000 0.0723 0.1491 -0.013
+0x2bcc000 0.2401 0.1903 -0.0635
+0x2bce000 0.287 0.2689 -0.1006
+0x2bd0000 0.1695 0.145 0.0004
+0x2bd2000 0.1191 0.0859 -0.0323
+0x2bd4000 0.186 0.1786 -0.0057
+0x2bd6000 0.1811 0.1612 -0.0098
+0x2bd8000 0.2212 0.1309 0.0527
+0x2be0000 0.116 0.0796 -0.0108
+0x2be2000 0.0226 0.0331 -0.0118
+0x2be4000 0.0114 0.0044 0.0176
+0x2be6000 0.0318 0.0244 -0.0081
+0x2be8000 0.0147 0.019 0.0088
+0x2bea000 0.0767 0.0764 -0.0019
+0x2bec000 0.0068 0.006 0.0235
+0x2bee000 0.0084 0.0058 0.0086
+0x2bf0000 0.0018 0.0018 0
+0x2bf2000 0.0185 0.037 -0.0112
+0x2bf4000 0.0521 0.0687 -0.0101
+0x2bf6000 0.0327 0.0451 0.0137
+0x2bf8000 0.1047 0.0932 -0.0288
+0x2c00000 0.2652 0.199 -0.0478
+0x2c02000 0.0419 0.0692 -0.0458
+0x2c04000 0.2105 0.1329 -0.0875
+0x2c06000 0.1587 0.1397 -0.0741
+0x2c08000 0.1589 0.131 -0.0537
+0x2c0a000 0.1504 0.1315 -0.0743
+0x2c0c000 0.1669 0.0604 -0.0767
+0x2c0e000 0.1273 0.047 -0.1228
+0x2c10000 0.1909 0.146 -0.0961
+0x2c12000 0.0833 0.0476 -0.0784
+0x2c14000 0.1292 0.1037 -0.0682
+0x2c16000 0.0747 0.061 -0.0559
+0x2c18000 0.0425 0.0107 -0.0729
+0x2c20000 0.0883 0.0935 0.0165
+0x2c22000 0.081 0.0765 0.0166
+0x2c24000 0.1031 0.1051 -0.0084
+0x2c26000 0.0295 0.011 0.0032
+0x2c28000 0.1405 0.118 -0.0119
+0x2c2a000 0.0974 0.0972 -0.0006
+0x2c2c000 0.0377 0.0431 -0.0114
+0x2c2e000 0.0171 0.0162 -0.0136
+0x2c30000 0.0433 0.0326 -1e-04
+0x2c32000 0.0452 0.035 -0.0509
+0x2c34000 0.0559 0.0793 0.0106
+0x2c36000 0.0553 0.0908 -0.0047
+0x2c38000 0.1606 0.0002 0.0634
+0x2c40000 0.0838 0.097 0.0159
+0x2c42000 0.0755 0.0784 0.0033
+0x2c44000 0.1496 0.1423 -0.0356
+0x2c46000 0.149 0.1322 -0.0157
+0x2c48000 0.1035 0.1193 -0.0162
+0x2c4a000 0.1301 0.1125 -0.0098
+0x2c4c000 0.1056 0.0859 -0.0222
+0x2c4e000 0.1754 0.1551 -0.0489
+0x2c50000 0.0669 0.0724 -0.0313
+0x2c52000 0.0259 0.0192 -0.0466
+0x2c54000 0.1392 0.1071 -0.0148
+0x2c56000 0.1701 0.1337 -0.026
+0x2c58000 0.2189 0.1379 0.0264
+0x2c60000 0.0622 0.0631 0.0093
+0x2c62000 0.144 0.1261 0.0089
+0x2c64000 0.1192 0.1015 -0.0045
+0x2c66000 0.1164 0.1058 0.0085
+0x2c68000 0.1352 0.1661 0.0293
+0x2c6a000 0.0989 0.1109 0.0287
+0x2c6c000 0.0882 0.1062 0.0149
+0x2c6e000 0.1686 0.1554 -0.0412
+0x2c70000 0.1322 0.0983 -0.0041
+0x2c72000 0.1223 0.1041 -0.0421
+0x2c74000 0.2568 0.2151 0.0468
+0x2c76000 0.0579 0.0122 0.0148
+0x2c78000 0.1004 0.0575 0.0216
+0x2c80000 0.1005 0.0496 -0.0153
+0x2c82000 0.156 0.0478 -0.007
+0x2c84000 0.2621 0.1759 -0.0364
+0x2c86000 0.2178 0.1573 -0.0436
+0x2c88000 0.113 0.0351 -0.0716
+0x2c8a000 0.2092 0.1173 -0.0466
+0x2c8c000 0.1485 0.0562 -0.1376
+0x2c8e000 0.1409 0.0497 -0.0613
+0x2c90000 0.0738 0.003 -0.069
+0x2c92000 0.0875 0.0533 -0.0863
+0x2c94000 0.1044 0.0724 -0.1033
+0x2c96000 0.0991 0.0553 -0.1207
+0x2c98000 0.2194 0.1152 -0.0644
+0x2ca0000 0.1296 0.0989 -0.0681
+0x2ca2000 0.2165 0.0982 -0.0782
+0x2ca4000 0.1659 0.0256 -0.0534
+0x2ca6000 0.18 0.0039 -0.1376
+0x2ca8000 0.2285 0.04 -0.0167
+0x2caa000 0.2104 0.1726 -0.0816
+0x2cac000 0.3007 0.1727 0.0077
+0x2cae000 0.106 0.0684 -0.1005
+0x2cb0000 0.2011 0.0614 -0.1025
+0x2cb2000 0.1175 0.0165 -0.0514
+0x2cb4000 0.2182 0.0886 -0.0967
+0x2cb6000 0.1709 0.0744 -0.1456
+0x2cb8000 0.1435 0.0418 -0.0939
+0x3000000 0.149 0.0507 -0.0857
+0x3002000 0.1474 0.1499 -0.0842
+0x3004000 0.1663 0.072 0.0403
+0x3006000 0.1175 0.1125 -0.1066
+0x3008000 0.1457 0.1365 -0.1061
+0x300a000 0.2402 0.1221 -0.0501
+0x300c000 0.1673 0.04 -0.0684
+0x300e000 0.1734 0.1373 -0.0647
+0x3010000 0.1583 0.0689 -0.099
+0x3012000 0.0985 0.0722 -0.0612
+0x3014000 0.2643 0.1784 -0.1972
+0x3016000 0.1938 0.1107 -0.0945
+0x3018000 0.2344 0.1576 0.0027
+0x3020000 0.0132 0.0304 -0.0106
+0x3022000 0.0531 0.0384 -0.006
+0x3024000 0 0 0.0005
+0x3026000 0.0227 0.0392 0.0159
+0x3028000 0.0364 0.036 -0.0121
+0x302a000 0.0698 0.0746 0.0032
+0x302c000 0.0471 0.0648 0.0055
+0x302e000 0.058 0.0515 -0.0099
+0x3030000 0.0721 0.0538 -0.0096
+0x3032000 0.0618 0.0441 -0.0191
+0x3034000 0.0604 0.0448 -0.0026
+0x3036000 0.035 0.0289 -0.0113
+0x3038000 0.0489 0.0407 -0.0046
+0x3040000 0.1967 0.2238 -0.0497
+0x3042000 0.2081 0.2266 -0.0084
+0x3044000 0.2696 0.268 -0.0115
+0x3046000 0.2371 0.2231 -0.0507
+0x3048000 0.269 0.257 -0.0437
+0x304a000 0.158 0.1832 -0.0233
+0x304c000 0.0332 0.0564 0.0018
+0x304e000 0.2013 0.1912 -0.0148
+0x3050000 0.2674 0.3042 -0.0518
+0x3052000 0.1799 0.1586 -0.0183
+0x3054000 0.0003 0.0882 -0.0269
+0x3056000 0.3415 0.3308 -0.0742
+0x3058000 0.428 0.343 -0.0026
+0x3060000 0.1077 0.0803 0.074
+0x3062000 0.1886 0.1845 0.0415
+0x3064000 0.1989 0.0876 -0.0074
+0x3066000 0.1268 0.0879 0.0833
+0x3068000 0.2179 0.2238 0.0218
+0x306a000 0.1002 0.087 0.0256
+0x306c000 0.1539 0.1221 0.0382
+0x306e000 0.2229 0.2352 0.0279
+0x3070000 0.2628 0.2429 0.012
+0x3072000 0.1948 0.1614 -0.0214
+0x3074000 0.2766 0.2823 0.0084
+0x3076000 0.1906 0.1621 -0.019
+0x3078000 0.2237 0.1618 0.0419
+0x3080000 0.2711 0.2396 -0.0432
+0x3082000 0.237 0.2356 -0.0405
+0x3084000 0.14 0.1279 -0.0398
+0x3086000 0.1926 0.2113 -0.0059
+0x3088000 0.1936 0.2061 -0.0137
+0x308a000 0.1503 0.1453 0.0097
+0x308c000 0.254 0.2452 0.0187
+0x308e000 0.2807 0.2546 -0.0491
+0x3090000 0.2552 0.241 -0.0511
+0x3092000 0.1911 0.2116 -0.0061
+0x3094000 0.2813 0.2643 -0.0206
+0x3096000 0.3138 0.3099 -0.0186
+0x3098000 0.2022 0.2085 -0.0217
+0x30a0000 0.0566 0.0362 -0.0048
+0x30a2000 0.1076 0.0014 0.0095
+0x30a4000 0.0791 0.0425 -0.0211
+0x30a6000 0.097 0.087 -0.0623
+0x30a8000 0.0515 0.0069 -0.0451
+0x30aa000 0.0308 0.0191 0.015
+0x30ac000 0.1284 0.094 -0.0522
+0x30ae000 0.0965 0.0023 -0.0391
+0x30b0000 0.2053 0.0996 -0.0957
+0x30b2000 0.189 0.0971 -0.2005
+0x30b4000 0.14 0.0864 -0.0496
+0x30b6000 0.1494 0.1166 -0.0668
+0x30b8000 0.2944 0.1463 -0.0518
+0x30c0000 0.1641 0.0666 -0.078
+0x30c2000 0.17 0.1058 0.0285
+0x30c4000 0.1628 0.0931 -0.0368
+0x30c6000 0.1813 0.1486 -0.0422
+0x30c8000 0.1614 0.0929 -0.0416
+0x30ca000 0.2812 0.1374 0.0317
+0x30cc000 0.169 0.0619 -0.0345
+0x30ce000 0.1611 0.1348 -0.0523
+0x30d0000 0.1336 0.0841 -0.0642
+0x30d2000 0.2286 0.1704 -0.0576
+0x30d4000 0.1318 0.0532 -0.0683
+0x30d6000 0.1911 0.0951 -0.0898
+0x30d8000 0.1414 0.0963 -0.1023
+0x30e0000 0.0656 0.0494 -0.0058
+0x30e2000 0.0861 0.0652 0.0041
+0x30e4000 0.0995 0.0887 0.0123
+0x30e6000 0.0914 0.0697 -0.0048
+0x30e8000 0.0169 0.0102 0.0089
+0x30ea000 0.0387 0.0146 0.0199
+0x30ec000 0.0667 0.0344 -0.0014
+0x30ee000 0.1943 0.1391 -0.0005
+0x30f0000 0.1217 0.0954 -0.0207
+0x30f2000 0.1515 0.1218 -0.0341
+0x30f4000 0.1619 0.1489 -0.0125
+0x30f6000 0.109 0.0868 -0.0158
+0x30f8000 0.1935 0.0927 0.0404
+0x3100000 0.1757 0.1837 0.005
+0x3102000 0.3089 0.2776 0.0405
+0x3104000 0.0607 0.0407 -0.0016
+0x3106000 0.0712 0.0598 0.0115
+0x3108000 0.1204 0.1164 -0.0058
+0x310a000 0.0516 0.0529 0.0124
+0x310c000 0.091 0.0819 -0.0101
+0x310e000 0.0532 0.042 0.008
+0x3110000 0.0893 0.083 0.0074
+0x3112000 0.1446 0.1016 -0.0407
+0x3114000 0.0011 0.0939 0.0316
+0x3116000 0.2352 0.1819 -0.0112
+0x3118000 0.4028 0.2905 0.0717
+0x3120000 0.1506 0.1199 -0.0294
+0x3122000 0.116 0.0549 -0.0383
+0x3124000 0.2087 0.1057 -0.0312
+0x3126000 0.1783 0.1057 -0.06
+0x3128000 0.096 0.0678 0.0545
+0x312a000 0.2871 0.1767 -0.1453
+0x312c000 0.2335 0.1784 -0.0212
+0x312e000 0.2084 0.1615 -0.1395
+0x3130000 0.1674 0.1381 -0.0496
+0x3132000 0.1714 0.1748 0.043
+0x3134000 0.2107 0.1446 -0.0499
+0x3136000 0.0934 0.0307 -0.0754
+0x3138000 0.0777 0.002 -0.0436
+0x3140000 0.1704 0.0876 -0.09
+0x3142000 0.1694 0.1233 -0.188
+0x3144000 0.1722 0.0941 -0.0925
+0x3146000 0.1352 0.0863 -0.0948
+0x3148000 0.1201 0.0927 -0.0681
+0x314a000 0.2631 0.1595 -0.0965
+0x314c000 0.2528 0.1977 -0.0609
+0x314e000 0.2078 0.1347 -0.1118
+0x3150000 0.118 0.0354 -0.0714
+0x3152000 0.0716 0.008 -0.0104
+0x3154000 0.1587 0.0881 -0.0389
+0x3156000 0.1628 0.0695 -0.1173
+0x3158000 0.1687 0.0905 -0.0894
+0x3160000 0.0164 0.0078 0.0079
+0x3162000 0.0104 0.0123 0.0207
+0x3164000 0.0711 0.0706 -0.0105
+0x3166000 0.0068 0.004 0.0009
+0x3168000 0.0463 0.0048 -0.0064
+0x316a000 0.0698 0.0527 0.0083
+0x316c000 0.0119 0.013 0.0022
+0x316e000 0.0528 0.0541 -0.0136
+0x3170000 0.0442 0.0414 0.0183
+0x3172000 0.0395 0.0395 -0.0479
+0x3174000 0.0508 0.0404 0.0137
+0x3176000 0.1179 0.0918 -0.0198
+0x3178000 0.1539 0.0782 0.0494
+0x3180000 0.1898 0.1446 -0.0418
+0x3182000 0.1461 0.1106 -0.1056
+0x3184000 0.3039 0.2255 -0.0776
+0x3186000 0.2789 0.2258 -0.0422
+0x3188000 0.2251 0.1556 -0.0679
+0x318a000 0.0944 0.0746 -0.0328
+0x318c000 0.2427 0.1791 -0.0544
+0x318e000 0.197 0.0803 -0.0722
+0x3190000 0.2088 0.1594 -0.0909
+0x3192000 0.178 0.1461 -0.0684
+0x3194000 0.2631 0.1869 -0.0376
+0x3196000 0.1968 0.1427 0.0145
+0x3198000 0.1863 0.154 -0.0205
+0x31a0000 0.0132 0.0305 -0.0106
+0x31a2000 0.0531 0.0384 -0.006
+0x31a4000 0.0155 0.0203 0.0078
+0x31a6000 0.0227 0.0392 0.0159
+0x31a8000 0.0364 0.036 -0.0121
+0x31aa000 0.0698 0.0746 0.0032
+0x31ac000 0.0471 0.0648 0.0055
+0x31ae000 0.058 0.0515 -0.0099
+0x31b0000 0.0721 0.0488 -0.0075
+0x31b2000 0.0618 0.0441 -0.0191
+0x31b4000 0.0604 0.0448 -0.0026
+0x31b6000 0.035 0.0289 -0.0113
+0x31b8000 0.0489 0.0407 -0.0046
+0x31c0000 0.2114 0.1297 -0.0754
+0x31c2000 0.2383 0.167 -0.095
+0x31c4000 0.1602 0.1102 -0.0954
+0x31c6000 0.2751 0.1855 -0.1147
+0x31c8000 0.1604 0.1214 -0.0487
+0x31ca000 0.2088 0.1388 -0.0702
+0x31cc000 0.178 0.0441 -0.0439
+0x31ce000 0.1769 0.107 -0.0347
+0x31d0000 0.1131 0.0741 -0.1289
+0x31d2000 0.1607 0.084 -0.1148
+0x31d4000 0.1778 0.077 -0.0892
+0x31d6000 0.2194 0.1045 0.0054
+0x31d8000 0.1079 0.0874 -0.0998
+0x31e0000 0.0491 0.0666 0.0219
+0x31e2000 0.046 0.0667 0.0223
+0x31e4000 0.0386 0.0329 0.0261
+0x31e6000 0.0027 0.008 0.0435
+0x31e8000 0.0522 0.0355 -0.028
+0x31ea000 0.1093 0.0804 -0.0013
+0x31ec000 0.0763 0.0204 -0.0019
+0x31ee000 0.0397 0.0135 -0.0532
+0x31f0000 0.0733 0.0725 -0.01
+0x31f2000 0.0229 0.0399 -0.0068
+0x31f4000 0.0801 0.0152 -0.0365
+0x31f6000 0.1002 0.0488 -0.034
+0x31f8000 0.075 0.0988 0.0061
+0x3200000 0.1325 0.0623 -0.043
+0x3202000 0.1864 0.1507 -0.0345
+0x3204000 0.0989 0.0964 -0.0347
+0x3206000 0.1875 0.1088 0.0253
+0x3208000 0.225 0.145 -0.0511
+0x320a000 0.136 0.0743 -0.0529
+0x320c000 0.1928 0.1377 -0.0733
+0x320e000 0.0966 0.0716 -0.0932
+0x3210000 0.3205 0.1696 -0.0706
+0x3212000 0.0903 0.0378 -0.0422
+0x3214000 0.2322 0.1111 -0.1063
+0x3216000 0.1282 0.1041 -0.0921
+0x3218000 0.1453 0.1627 -0.077
+0x3220000 1.2343 0.1753 -0.6682
+0x3222000 0.499 0 -0.3812
+0x3224000 0.1532 0.1572 0.0279
+0x3226000 0.2089 0.2116 -0.0228
+0x3228000 0.2 0.2039 0.0026
+0x322a000 0.072 0.0766 0.0194
+0x322c000 0.1567 0.1695 0.0083
+0x322e000 0.0674 0.0626 0.0157
+0x3230000 0.2176 0.223 -0.0002
+0x3232000 0.0559 0.0408 -0.0319
+0x3234000 0.3193 0.3371 -0.0395
+0x3236000 0.1487 0.1578 -0.0043
+0x3238000 0.2545 0.2401 0.0765
+0x3240000 0.1547 0.1618 0.0388
+0x3242000 0.1979 0.1671 0.0157
+0x3244000 0.1214 0.0996 0.039
+0x3246000 0.1548 0.1367 -0.0183
+0x3248000 0.1451 0.1286 -0.0374
+0x324a000 0.0899 0.0958 0.0069
+0x324c000 0.0741 0.0884 -0.0209
+0x324e000 0.1556 0.14 -0.0212
+0x3250000 0.0856 0.0825 -0.0007
+0x3252000 0.107 0.1258 -0.0126
+0x3254000 0.0618 0.0798 -0.0289
+0x3256000 0.2024 0.1998 -0.0194
+0x3258000 0.2332 0.1879 0.018
+0x3260000 0.271 0.1544 -0.0171
+0x3262000 0.1287 0.1078 -0.0329
+0x3264000 0.1963 0.1026 -0.0495
+0x3266000 0.2697 0.1783 -0.0593
+0x3268000 0.1741 0.0781 -0.0656
+0x326a000 0.2019 0.1835 -0.0557
+0x326c000 0.2148 0.1457 -0.0776
+0x326e000 0.2368 0.1968 -0.0297
+0x3270000 0.2198 0.1608 -0.066
+0x3272000 0.2391 0.0936 -0.0224
+0x3274000 0.2269 0.1541 -0.0493
+0x3276000 0.2523 0.2168 -0.0397
+0x3278000 0.2389 0.167 -0.0165
+0x3280000 0.1905 0.2153 0.0036
+0x3282000 0.1918 0.1976 0.0086
+0x3284000 0.1635 0.1378 0.001
+0x3286000 0.2002 0.1834 0.0131
+0x3288000 0.1535 0.133 -0.0055
+0x328a000 0.2302 0.2074 -0.034
+0x328c000 0.2215 0.2192 -0.0006
+0x328e000 0.2002 0.177 -0.0114
+0x3290000 0.2251 0.2455 -0.0458
+0x3292000 0.3257 0.3277 -0.0216
+0x3294000 0.143 0.1705 -0.013
+0x3296000 0.2008 0.1991 0.0008
+0x3298000 0.2881 0.1865 0.0638
+0x32a0000 0.1598 0.142 -0.0412
+0x32a2000 0.1653 0.1802 0.0182
+0x32a4000 0.0858 0.0622 -0.016
+0x32a6000 0.1666 0.1687 -0.0245
+0x32a8000 0.1011 0.0923 -0.0221
+0x32aa000 0.0678 0.0772 -0.0088
+0x32ac000 0.2327 0.2141 -0.0027
+0x32ae000 0.1838 0.1734 -0.0086
+0x32b0000 0.0956 0.1122 -0.0095
+0x32b2000 0.1214 0.0892 0.0055
+0x32b4000 0.1593 0.1494 0.0042
+0x32b6000 0.0486 0.0504 -0.005
+0x32b8000 0.0991 0.1106 0.0066
+0x32c0000 0.2504 0.1699 -0.0732
+0x32c2000 0.1247 0.0448 -0.0705
+0x32c4000 0.1961 0.1619 -0.0492
+0x32c6000 0.0902 0.0391 -0.0853
+0x32c8000 0.2455 0.1497 -0.0377
+0x32ca000 0.1817 0.134 -0.0151
+0x32cc000 0.1543 0.0974 0.0082
+0x32ce000 0.099 0.0976 -0.0984
+0x32d0000 0.1301 0.0838 0.0337
+0x32d2000 0.1955 0.1406 -0.0926
+0x32d4000 0.1988 0.1004 -0.0412
+0x32d6000 0.2132 0.0841 -0.0113
+0x32d8000 0.1896 0.1238 -0.029
+0x32e0000 0.0599 0.0046 -0.0401
+0x32e2000 0.1104 0.1064 -0.0596
+0x32e4000 0.0852 0.0328 -0.0569
+0x32e6000 0.1115 0.0212 -0.0758
+0x32e8000 0.0965 0.0384 -0.066
+0x32ea000 0.1834 0.0566 -0.0441
+0x32ec000 0.1569 0.0733 -0.0579
+0x32ee000 0.1657 0.1387 -0.0656
+0x32f0000 0.1017 0.0507 -0.0546
+0x32f2000 0.0753 0.0282 -0.0472
+0x32f4000 0.1868 0.1464 -0.0513
+0x32f6000 0.2015 0.1444 -0.067
+0x32f8000 0.1 0.0875 -0.0786
+0x3300000 0.2322 0.1019 -0.0523
+0x3302000 0.1288 0.0252 -0.0656
+0x3304000 0.2954 0.2 -0.0492
+0x3306000 0.118 0.0831 -0.0459
+0x3308000 0.2486 0.1415 -0.0061
+0x330a000 0.1339 0.0624 -0.0362
+0x330c000 0.2384 0.1318 -0.022
+0x330e000 0.193 0.1109 -0.0523
+0x3310000 0.1633 0.1179 -0.0317
+0x3312000 0.2427 0.1424 -0.0395
+0x3314000 0.2137 0.1071 -0.0326
+0x3316000 0.1723 0.0726 -0.098
+0x3318000 0.1957 0.1179 -0.092
+0x3320000 0.1359 0.1315 0.0485
+0x3322000 0.1471 0.136 0.0009
+0x3324000 0.1187 0.1044 0.0212
+0x3326000 0.0668 0.09 -0.0012
+0x3328000 0.0542 0.0559 0.0003
+0x332a000 0.1433 0.1304 -0.0158
+0x332c000 0.1414 0.123 -0.05
+0x332e000 0.1218 0.1196 0.0078
+0x3330000 0.0962 0.0808 -0.0076
+0x3332000 0.0687 0.0434 0.0026
+0x3334000 0.1528 0.1422 0.0157
+0x3336000 0.1641 0.1701 -0.0241
+0x3338000 0.1473 0.1281 0.0125
+0x3340000 0.2142 0.0661 -0.0854
+0x3342000 0.1861 0.1517 -0.0456
+0x3344000 0.2308 0.0283 -0.0464
+0x3346000 0.2071 0.1377 -0.0707
+0x3348000 0.2055 0.1516 -0.0283
+0x334a000 0.2121 0.143 -0.0598
+0x334c000 0.1189 0.084 -0.0493
+0x334e000 0.1425 0.1336 -0.0909
+0x3350000 0.1543 0.1327 -0.09
+0x3352000 0.0826 0.0623 -0.0984
+0x3354000 0.2215 0.1866 -0.1027
+0x3356000 0.2638 0.1117 -0.125
+0x3358000 0.2215 0.2093 -0.0642
+0x3360000 0.1502 0.0645 0.0181
+0x3362000 0.1657 0.0658 0.042
+0x3364000 0.1802 0.1706 -0.0547
+0x3366000 0.137 0.0575 -0.0644
+0x3368000 0.0368 0.0176 -0.0064
+0x336a000 0.0612 0.0099 -0.0109
+0x336c000 0.0734 0.0567 -0.0424
+0x336e000 0.0795 0.0349 -0.0664
+0x3370000 0.254 0.1483 -0.1302
+0x3372000 0.1364 0.0958 -0.1395
+0x3374000 0.2193 0.1985 -0.0623
+0x3376000 0.1439 0.0527 -0.0603
+0x3378000 0.1857 0.0917 -0.108
+0x3380000 0.1949 0.1502 -0.0823
+0x3382000 0.2668 0.1423 -0.0543
+0x3384000 0.1891 0.183 -0.1505
+0x3386000 0.1917 0.1383 -0.1202
+0x3388000 0.2247 0.1437 -0.0564
+0x338a000 0.1613 0.0976 -0.0868
+0x338c000 0.2332 0.1345 -0.014
+0x338e000 0.1519 0.0982 -0.1115
+0x3390000 0.1233 0.1039 -0.0683
+0x3392000 0.2134 0.1427 -0.1013
+0x3394000 0.1551 0.1442 0.0556
+0x3396000 0.1483 0.0734 -0.0774
+0x3398000 0.1649 0.0849 -0.0234
+0x33a0000 0.0854 0.0729 -0.0112
+0x33a2000 0.035 0.0279 -0.0048
+0x33a4000 0.0732 0.0605 -0.0018
+0x33a6000 0.0026 0.0102 0.007
+0x33a8000 0.0435 0.0527 -0.0028
+0x33aa000 0.188 0.1749 -0.012
+0x33ac000 0.0342 0.0463 0.0008
+0x33ae000 0.0817 0.075 -0.0067
+0x33b0000 0.08 0.0608 -0.0027
+0x33b2000 0.0589 0.0581 0.0027
+0x33b4000 0.0254 0.0244 -0.0063
+0x33b6000 0.024 0.0054 -0.0003
+0x33b8000 0.2165 0.1369 0.0418
+0x33c0000 0.1419 0.096 -0.0124
+0x33c2000 0.1934 0.1047 -0.0586
+0x33c4000 0.0832 0.0379 -0.0807
+0x33c6000 0.0458 0.0834 0.0616
+0x33c8000 0.1634 0.1479 -0.1004
+0x33ca000 0.1796 0.1116 -0.0703
+0x33cc000 0.1887 0.1988 -0.0204
+0x33ce000 0.1125 0.1254 -0.0492
+0x33d0000 0.1585 0.0262 0.0574
+0x33d2000 0.1682 0.1331 -0.066
+0x33d4000 0.1855 0.1223 -0.045
+0x33d6000 0.1681 0.1208 -0.0525
+0x33d8000 0.1101 0.0775 -0.0591
+0x33e0000 0.1377 0.0885 -0.0518
+0x33e2000 0.2255 0.1129 -0.1354
+0x33e4000 0.214 0.1349 -0.1019
+0x33e6000 0.2261 0.045 -0.1309
+0x33e8000 0.1221 0.0601 -0.0276
+0x33ea000 0.1667 0.0815 -0.0766
+0x33ec000 0.1565 0.1212 -0.0867
+0x33ee000 0.1261 0.0528 -0.0913
+0x33f0000 0.0822 0.0366 -0.0248
+0x33f2000 0.1895 0.1252 -0.0898
+0x33f4000 0.1623 0.0432 -0.1746
+0x33f6000 0.1154 0.0413 -0.035
+0x33f8000 0.1427 0.1445 -0.0951
+0x3400000 0.1334 0.1599 0.0469
+0x3402000 0.2032 0.2281 0.0357
+0x3404000 0.2264 0.2316 0.0258
+0x3406000 0.1796 0.1926 -0.0291
+0x3408000 0.2111 0.2331 -0.0162
+0x340a000 0.2761 0.2519 -0.0311
+0x340c000 0.2699 0.2497 -0.0488
+0x340e000 0.1864 0.1813 -0.019
+0x3410000 0.1888 0.195 0.004
+0x3412000 0.1773 0.2021 -0.0033
+0x3414000 0.1713 0.1699 -0.0321
+0x3416000 0.157 0.1679 1e-04
+0x3418000 0.3456 0.2617 -0.0153
+0x3420000 0.24 0.2593 0.0368
+0x3422000 0.0878 0.1108 0.0293
+0x3424000 0.108 0.1051 -0.0144
+0x3426000 0.1924 0.1862 -0.0516
+0x3428000 0.2169 0.2231 -0.0033
+0x342a000 0.0895 0.0697 0.0129
+0x342c000 0.0957 0.1004 -0.0726
+0x342e000 0.1127 0.0952 0.024
+0x3430000 0.1759 0.1886 0.0022
+0x3432000 0.1486 0.1413 -0.028
+0x3434000 0.1405 0.1287 -0.0472
+0x3436000 0.2423 0.2243 -0.0309
+0x3438000 0 0 0
+0x3440000 0.0693 0.0837 1e-04
+0x3442000 0.0085 0.0128 -0.0085
+0x3444000 0.0228 0.0417 0.0123
+0x3446000 0.0319 0.0477 0.0046
+0x3448000 0.1102 0.1054 -0.0118
+0x344a000 0.0481 0.0535 -0.0016
+0x344c000 0.0701 0.0568 0.0026
+0x344e000 0.0698 0.0986 -0.0051
+0x3450000 0.0496 0.0366 0.012
+0x3452000 0.025 0.0295 0.0125
+0x3454000 0.0033 0.0049 -0.0113
+0x3456000 0.0157 0.0088 0.005
+0x3458000 0.0691 0.0758 -0.0119
+0x3460000 0.263 0.2604 0.0232
+0x3462000 0.0907 0.0974 0.0232
+0x3464000 0.1794 0.1823 0.0017
+0x3466000 0.1844 0.1522 0.0286
+0x3468000 0.2927 0.2523 -0.0173
+0x346a000 0.1152 0.1133 0.0146
+0x346c000 0.2146 0.1895 0.0293
+0x346e000 0.0948 0.099 0.0027
+0x3470000 0.2596 0.2626 0.0247
+0x3472000 0.0668 0.0756 -0.0048
+0x3474000 0.2341 0.2211 -0.1019
+0x3476000 0.1529 0.1629 -0.0124
+0x3478000 0.1502 0.118 0.0372
+0x3480000 0.0152 0.0366 0.0084
+0x3482000 0.0094 0.0544 0.0094
+0x3484000 0.0895 0.0697 -0.0193
+0x3486000 0.005 0.0167 -0.0016
+0x3488000 0.0439 0.04 -0.0065
+0x348a000 0.0904 0.1238 -0.0058
+0x348c000 0.0834 0.0605 -0.0172
+0x348e000 0.0803 0.0987 0.0185
+0x3490000 0.0385 0.0773 0.0281
+0x3492000 0.0948 0.0783 0.0078
+0x3494000 0.0118 0.0056 -0.0057
+0x3496000 0.0295 0.0517 0.0169
+0x3498000 0.0459 0.0563 -0.0119
+0x34a0000 0 0 0
+0x34a2000 0 0 0
+0x34a4000 0 0 0
+0x34a6000 0 0 0
+0x34a8000 0 0 0
+0x34aa000 0 0 0
+0x34ac000 0 0 0
+0x34ae000 0 0 0
+0x34b0000 0 0 0
+0x34b2000 0 0 0
+0x34b4000 0 0 0
+0x34b6000 0 0 0
+0x34b8000 0 0 0
+0x34c0000 0.2464 0.2592 0.005
+0x34c2000 0.1583 0.1363 0.0057
+0x34c4000 0.3133 0.2422 -0.1019
+0x34c6000 0.2355 0.1983 -0.0553
+0x34c8000 0.1938 0.192 -0.0232
+0x34ca000 0.1749 0.1589 -0.0252
+0x34cc000 0.304 0.2724 -0.0632
+0x34ce000 0.2387 0.2303 -0.0039
+0x34d0000 0.1538 0.1441 -0.02
+0x34d2000 0.1194 0.1079 -0.0494
+0x34d4000 0.1075 0.0726 0.0489
+0x34d6000 0.0257 0.0214 0.043
+0x34d8000 0.0982 0.1102 0.0421
+0x34e0000 0.2682 0.2921 0.0107
+0x34e2000 0.0894 0.0748 0.0284
+0x34e4000 0.4142 0.411 -0.0367
+0x34e6000 0.1297 0.1268 -0.0106
+0x34e8000 0.3677 0.3557 -0.0011
+0x34ea000 0.1306 0.1357 0.0101
+0x34ec000 0.0908 0.1121 -0.0192
+0x34ee000 0.425 0.3788 -0.0397
+0x34f0000 0.2544 0.234 -0.0641
+0x34f2000 0.1521 0.1421 -0.0693
+0x34f4000 0.0774 0.1072 0.0156
+0x34f6000 0.2124 0.1851 -0.0005
+0x34f8000 0.473 0.3241 0.0407
+0x3500000 0.0359 0.0227 -0.0012
+0x3502000 0.0978 0.0645 -0.015
+0x3504000 0.0406 0.0278 -0.0076
+0x3506000 0.0649 0.0362 0.0017
+0x3508000 0.0869 0.1133 -0.005
+0x350a000 0.0688 0.0611 -0.0041
+0x350c000 0.0215 0.0529 0.0023
+0x350e000 0.0962 0.0831 -0.0076
+0x3510000 0.0506 0.0751 -0.009
+0x3512000 0.0733 0.0822 -0.0207
+0x3514000 0.1058 0.0881 -0.0101
+0x3516000 0.0575 0.0778 -0.0105
+0x3518000 0.053 0.066 -0.016
+0x3520000 0.2229 0.2299 0.0053
+0x3522000 0.2677 0.2411 0.0179
+0x3524000 0.2135 0.1987 -0.008
+0x3526000 0.1597 0.1746 -0.0161
+0x3528000 0.1689 0.1895 -0.0089
+0x352a000 0.2208 0.2459 -0.0168
+0x352c000 0.4967 0.5005 -0.0821
+0x352e000 0.2191 0.2221 -0.046
+0x3530000 0.3361 0.3502 -0.0275
+0x3532000 0.3107 0.3442 -0.0424
+0x3534000 0.3302 0.3276 -0.0668
+0x3536000 0.3238 0.3174 -0.0591
+0x3538000 0.3362 0.2766 0.0274
+0x3540000 0.0555 0.0802 0.0263
+0x3542000 0.0491 0.0377 0.006
+0x3544000 0.0535 0.0537 -0.0115
+0x3546000 0.0528 0.0695 0.0134
+0x3548000 0.049 0.0143 -0.0067
+0x354a000 0.0673 0.0625 -0.007
+0x354c000 0.0017 0.0033 0.019
+0x354e000 0.036 0.0436 0.0093
+0x3550000 0.0609 0.0697 -0.0272
+0x3552000 0.0304 0.0363 -0.0079
+0x3554000 0.0012 0.0038 0.0035
+0x3556000 0.0063 0.0231 0.0237
+0x3558000 0.0852 0.0812 -0.0103
+0x3560000 0.0533 0.0535 0.0103
+0x3562000 0.0486 0.0289 0.001
+0x3564000 0.0937 0.0653 -0.0014
+0x3566000 0.1322 0.1372 0.018
+0x3568000 0.144 0.1603 0.0102
+0x356a000 0.1007 0.098 0.0218
+0x356c000 0.1329 0.1238 0.0165
+0x356e000 0.1569 0.1495 -0.0173
+0x3570000 0.0706 0.0629 -0.0063
+0x3572000 0.1565 0.1609 0.009
+0x3574000 0.1125 0.1238 0.0285
+0x3576000 0.0591 0.0727 0.0132
+0x3578000 0.1051 0.102 -0.0011
+0x3580000 0.2542 0.2499 -0.0177
+0x3582000 0.1425 0.1465 0.0155
+0x3584000 0.2546 0.2715 0.0169
+0x3586000 0.2931 0.3115 0.0179
+0x3588000 0.2149 0.1967 -0.0743
+0x358a000 0.1859 0.2122 0.0059
+0x358c000 0.1492 0.1587 0.0215
+0x358e000 0.2312 0.2047 -0.0245
+0x3590000 0.1029 0.117 0.0136
+0x3592000 0.1679 0.1744 -0.0353
+0x3594000 0.0005 0.0794 0.0212
+0x3596000 0.1608 0.1494 0.0015
+0x3598000 0.1707 0.1012 0.0686
+0x35a0000 0.3031 0.2795 -0.0382
+0x35a2000 0.3497 0.3548 -0.0039
+0x35a4000 0.2041 0.2071 0.0101
+0x35a6000 0.1594 0.1741 -0.0081
+0x35a8000 0.2141 0.2225 0.0089
+0x35aa000 0.1861 0.2219 -0.0044
+0x35ac000 0.3589 0.3161 -0.0415
+0x35ae000 0.2216 0.2536 -0.0156
+0x35b0000 0.301 0.3272 -0.0341
+0x35b2000 0.2533 0.2834 -0.0261
+0x35b4000 0.1628 0.1882 -0.0173
+0x35b6000 0.2605 0.2202 -0.0761
+0x35b8000 0.3007 0.2211 0.0156
+0x35c0000 0.2646 0.2931 0.0347
+0x35c2000 0.4877 0.4825 0.0357
+0x35c4000 0.1242 0.1399 -0.002
+0x35c6000 0.2085 0.1994 0.0235
+0x35c8000 0.1209 0.1445 0.0034
+0x35ca000 0.1843 0.1902 0.018
+0x35cc000 0.1862 0.1849 -0.0139
+0x35ce000 0.2913 0.2907 -0.0173
+0x35d0000 0.2167 0.1988 0.0015
+0x35d2000 0.1434 0.1226 -0.0309
+0x35d4000 0.3049 0.3162 -0.0017
+0x35d6000 0.0933 0.1063 -0.0017
+0x35d8000 0.2739 0.1838 0.0547
+0x35e0000 0.1042 0.0646 -0.0204
+0x35e2000 0.0826 0.0716 0.0076
+0x35e4000 0.1635 0.1309 -0.0177
+0x35e6000 0.1168 0.1178 0.0135
+0x35e8000 0.0577 0.0583 0
+0x35ea000 0.1732 0.173 -0.0128
+0x35ec000 0.1186 0.1602 -0.0081
+0x35ee000 0.061 0.055 0.0039
+0x35f0000 0.1344 0.1231 -0.0007
+0x35f2000 0.123 0.139 0.0026
+0x35f4000 0.088 0.0728 0.0057
+0x35f6000 0.085 0.0665 0.0413
+0x35f8000 0.0833 0.1118 0.0044
+0x3600000 0.2307 0.1365 -0.0553
+0x3602000 0.2165 0.1325 -0.1107
+0x3604000 0.2243 0.1436 -0.0656
+0x3606000 0.2837 0.2653 -0.0803
+0x3608000 0.2376 0.1329 -0.0994
+0x360a000 0.1871 0.0362 -0.1208
+0x360c000 0.0744 0.0571 -0.0246
+0x360e000 0.2379 0.1485 -0.0918
+0x3610000 0.2622 0.167 -0.0651
+0x3612000 0.1757 0.1346 -0.1631
+0x3614000 0.1764 0.0758 -0.0748
+0x3616000 0.2284 0.1864 -0.127
+0x3618000 0.1793 0.1486 -0.0407
+0x3620000 0.033 0.0123 -0.0252
+0x3622000 0.1624 0.1618 -0.0792
+0x3624000 0.1398 0.0302 -0.0498
+0x3626000 0.1711 0.1114 -0.1129
+0x3628000 0.2183 0.1836 -0.1029
+0x362a000 0.1887 0.0892 -0.1097
+0x362c000 0.2185 0.1111 -0.1326
+0x362e000 0.1963 0.0568 -0.1244
+0x3630000 0.2084 0.1194 -0.1049
+0x3632000 0.3637 0.2636 -0.1055
+0x3634000 0.2223 0.0952 -0.145
+0x3636000 0.1738 0.1073 -0.1622
+0x3638000 0.1263 0.0592 -0.0999
+0x3640000 0.0463 0.0403 -0.0249
+0x3642000 0.0151 0.0011 0.0028
+0x3644000 0.005 0.0216 0.0022
+0x3646000 0.0733 0.0501 0.0032
+0x3648000 0.0014 0.0122 0.0225
+0x364a000 0.0451 0.019 -0.0196
+0x364c000 0.0576 0.0635 0.0183
+0x364e000 0.0052 0.0188 -0.0116
+0x3650000 0.0254 0.0194 -0.0141
+0x3652000 0.0159 0.0417 -0.0133
+0x3654000 0.0653 0.0588 -0.0048
+0x3656000 0.1105 0.1016 -0.016
+0x3658000 0.1127 0.0957 -0.02
+0x3660000 0.121 0.0851 -0.0607
+0x3662000 0.1964 0.1142 -0.0748
+0x3664000 0.1276 0.0064 -0.0915
+0x3666000 0.073 0.1326 -0.1371
+0x3668000 0.1889 0.0603 -0.0093
+0x366a000 0.1971 0.097 -0.1107
+0x366c000 0.1404 0.0872 -0.0113
+0x366e000 0.1331 0.0034 -0.0823
+0x3670000 0.1355 0.0461 -0.1394
+0x3672000 0.1397 0.1121 -0.1156
+0x3674000 0.1913 0.0609 -0.0784
+0x3676000 0.1344 0.0763 -0.083
+0x3678000 0.1729 0.1345 -0.0686
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/IBL_calibration.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/IBL_calibration.h
new file mode 100644
index 00000000000..64e80ab1df6
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/IBL_calibration.h
@@ -0,0 +1,76 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+  calphi[0]=0.0463822;
+  calerrphi[0][0]=0.00458704;
+  calerrphi[0][1]=0.00240123;
+  calerrphi[0][2]=0.0381553;
+  calphi[1]=0.0395409;
+  calerrphi[1][0]=0.00571953;
+  calerrphi[1][1]=0.00217718;
+  calerrphi[1][2]=0.0443544;
+  calphi[2]=0.0291725;
+  calerrphi[2][0]=0.00753389;
+  calerrphi[2][1]=0.00192153;
+  calerrphi[2][2]=0.0502262;
+  calphi[3]=0.0221493;
+  calerrphi[3][0]=0.00908161;
+  calerrphi[3][1]=0.00234422;
+  calerrphi[3][2]=0.052859;
+  calphi[4]=0.0183585;
+  calerrphi[4][0]=0.009916;
+  calerrphi[4][1]=0.00307481;
+  calerrphi[4][2]=0.0560763;
+  calphi[5]=0.0228795;
+  calerrphi[5][0]=0.00886146;
+  calerrphi[5][1]=0.00260481;
+  calerrphi[5][2]=0.0516711;
+  calphi[6]=0.0296685;
+  calerrphi[6][0]=0.00746781;
+  calerrphi[6][1]=0.00197842;
+  calerrphi[6][2]=0.0497699;
+  calphi[7]=0.0395992;
+  calerrphi[7][0]=0.00557493;
+  calerrphi[7][1]=0.00213298;
+  calerrphi[7][2]=0.0454933;
+  calphi[8]=0.0497221;
+  calerrphi[8][0]=0.00461163;
+  calerrphi[8][1]=0.00251781;
+  calerrphi[8][2]=0.0309285;
+  caleta[0][0]=0;
+  caleta[0][1]=0;
+  caleta[0][2]=0.0669391;
+  calerreta[0][0]=0;
+  calerreta[0][1]=0.0614102;
+  calerreta[0][2]=0.00891571;
+  caleta[1][0]=0.0669391;
+  caleta[1][1]=0.199526;
+  caleta[1][2]=0.0642114;
+  calerreta[1][0]=0.0445204;
+  calerreta[1][1]=0.05385;
+  calerreta[1][2]=0.0104638;
+  caleta[2][0]=0.322464;
+  caleta[2][1]=0.207504;
+  caleta[2][2]=0.0699703;
+  calerreta[2][0]=0.045776;
+  calerreta[2][1]=0.0222315;
+  calerreta[2][2]=0.0106168;
+  caleta[3][0]=0.299711;
+  caleta[3][1]=0.215319;
+  caleta[3][2]=0.0653161;
+  calerreta[3][0]=0.0277008;
+  calerreta[3][1]=0.0218932;
+  calerreta[3][2]=0.0108854;
+  caleta[4][0]=0.295881;
+  caleta[4][1]=0.215595;
+  caleta[4][2]=0.0284735;
+  calerreta[4][0]=0.0281094;
+  calerreta[4][1]=0.0215104;
+  calerreta[4][2]=0.0159464;
+  caleta[5][0]=0.321041;
+  caleta[5][1]=0.216542;
+  caleta[5][2]=0.172694;
+  calerreta[5][0]=0.0312848;
+  calerreta[5][1]=0.0236938;
+  calerreta[5][2]=0.0202331;
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
new file mode 100755
index 00000000000..c5800380882
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/PixelClusterOnTrackTool.cxx
@@ -0,0 +1,953 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/////////////////////////////////////////////////////////////////
+//   Implementation file for class PixelClusterOnTrackTool
+///////////////////////////////////////////////////////////////////
+// (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+// AlgTool used for PixelClusterOnTrack object production
+///////////////////////////////////////////////////////////////////
+// started 1.0 21/04/2004 I.Gavrilenko - see ChangeLog
+///////////////////////////////////////////////////////////////////
+
+#include "SiClusterOnTrackTool/PixelClusterOnTrackTool.h"
+
+#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelModuleDesign.h"
+
+#include "InDetIdentifier/PixelID.h"
+#include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
+#include "PixelConditionsTools/IModuleDistortionsTool.h"
+
+#include "TrkSurfaces/PlaneSurface.h"
+
+#include "StoreGate/StoreGateSvc.h"
+
+#include "GaudiKernel/IIncidentSvc.h"
+
+#include "SiClusterizationTool/NnClusterizationFactory.h"
+#include "EventPrimitives/EventPrimitives.h"
+#include "PixelGeoModel/IBLParameterSvc.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+
+using CLHEP::mm;
+using CLHEP::micrometer;
+
+
+
+///////////////////////////////////////////////////////////////////
+// Constructor
+///////////////////////////////////////////////////////////////////
+
+namespace
+{
+  double distance(std::vector<Amg::Vector2D> & vectorOfPositions,
+                  std::vector<Amg::Vector2D> & allLocalPositions,
+                  std::vector<Amg::MatrixX> & allErrorMatrix,
+                  int i,int j,int k)
+  {
+    return 
+        std::pow(vectorOfPositions[i][0]-allLocalPositions[0][0],2)/allErrorMatrix[0](0,0)+
+        std::pow(vectorOfPositions[j][0]-allLocalPositions[1][0],2)/allErrorMatrix[1](0,0)+
+        std::pow(vectorOfPositions[k][0]-allLocalPositions[2][0],2)/allErrorMatrix[2](0,0)+
+        std::pow(vectorOfPositions[i][1]-allLocalPositions[0][1],2)/allErrorMatrix[0](1,1)+
+        std::pow(vectorOfPositions[j][1]-allLocalPositions[1][1],2)/allErrorMatrix[1](1,1)+
+        std::pow(vectorOfPositions[k][1]-allLocalPositions[2][1],2)/allErrorMatrix[2](1,1);
+  }
+}
+
+
+InDet::PixelClusterOnTrackTool::PixelClusterOnTrackTool
+(const std::string& t,const std::string& n,const IInterface* p) :
+        ::AthAlgTool(t,n,p),
+	m_pixDistoTool("PixelDistortionsTool"),
+	m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"),
+	m_calibSvc("PixelOfflineCalibSvc",n),
+	m_disableDistortions(false),
+	m_rel13like(false),
+	m_applyNNcorrection(false),
+	m_NNIBLcorrection(false),
+	m_IBLAbsent(true),
+	m_NnClusterizationFactory("InDet::NnClusterizationFactory/NnClusterizationFactory"),
+	m_storeGate( "StoreGateSvc", n ),
+	m_incidentSvc("IncidentSvc", n),
+	m_IBLParameterSvc("IBLParameterSvc",n),	
+	m_splitClusterMap(0),
+	m_splitClusterMapName("SplitClusterAmbiguityMap"),
+	m_doNotRecalibrateNN(false),
+	m_noNNandBroadErrors(false)
+{
+  declareInterface<IRIO_OnTrackCreator>(this);
+  
+  declareProperty("ErrorScalingTool",         m_errorScalingTool,"The error scaling tool");
+  declareProperty("PixelDistortionsTool",     m_pixDistoTool,       "Tool to retrieve pixel distortions");
+  declareProperty("PositionStrategy",         m_positionStrategy=1,"Which calibration of cluster positions"); 
+  declareProperty("ErrorStrategy",            m_errorStrategy=2,"Which calibration of cluster position errors"); 
+  declareProperty("DisableDistortions",	      m_disableDistortions,	"Disable simulation of module distortions");
+  declareProperty("Release13like",            m_rel13like, "Activate release-13 like settigs");
+  declareProperty("PixelOfflineCalibSvc",     m_calibSvc, "Offline calibration svc");
+  declareProperty("applyNNcorrection",        m_applyNNcorrection);
+  declareProperty("NNIBLcorrection",	      m_NNIBLcorrection);
+  declareProperty("EventStore",              m_storeGate );
+  declareProperty("IncidentService",         m_incidentSvc );
+  declareProperty("NnClusterizationFactory", m_NnClusterizationFactory);
+  declareProperty("SplitClusterAmbiguityMap", m_splitClusterMapName);
+  declareProperty("doNotRecalibrateNN",       m_doNotRecalibrateNN);
+  declareProperty("m_noNNandBroadErrors",     m_noNNandBroadErrors);
+
+}
+
+///////////////////////////////////////////////////////////////////
+// Destructor  
+///////////////////////////////////////////////////////////////////
+
+InDet::PixelClusterOnTrackTool::~PixelClusterOnTrackTool(){}
+
+///////////////////////////////////////////////////////////////////
+// Initialisation
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::PixelClusterOnTrackTool::initialize()
+{
+  StatusCode sc = AthAlgTool::initialize(); 
+
+   msg(MSG::INFO)  << name() << " initialize()" << endreq;   
+   msg(MSG::DEBUG) << "Error strategy is" << m_errorStrategy << endreq;
+   msg(MSG::DEBUG) << "Release 13 flag is" << m_rel13like << endreq;
+
+   if (m_IBLParameterSvc.retrieve().isFailure()) { 
+     ATH_MSG_WARNING( "Could not retrieve IBLParameterSvc"); 
+   } 
+   else { 
+     m_IBLParameterSvc->setBoolParameters(m_applyNNcorrection,"doPixelClusterSplitting");
+     m_IBLParameterSvc->setBoolParameters(m_IBLAbsent,"IBLAbsent");
+   } 
+   
+   //get the offline calibration service
+   sc = m_calibSvc.retrieve();
+   if (sc.isFailure() || !m_calibSvc) {
+      msg(MSG::ERROR) << m_calibSvc.type() << " not found! "<< endreq;
+      // return StatusCode::SUCCESS;
+   }
+   else{
+      msg(MSG::INFO) << "Retrieved tool " <<  m_calibSvc.type() << endreq;
+   }
+
+   // get the error scaling tool
+  if ( m_errorScalingTool.retrieve().isFailure() ) {
+    msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endreq;
+    return StatusCode::FAILURE;
+  } else {
+    msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endreq;
+    m_scalePixelCov = m_errorScalingTool->needToScalePixel();
+    if (m_scalePixelCov) msg(MSG::DEBUG) << "Detected need for scaling Pixel errors." << endreq;
+  }
+ 
+  // the NN corrections
+  if ( m_applyNNcorrection && m_NnClusterizationFactory.retrieve().isFailure())
+  {
+      msg(MSG::ERROR) << "Can't get " << m_NnClusterizationFactory << endreq;
+      return StatusCode::FAILURE;
+  } else if (m_applyNNcorrection)
+      msg(MSG::INFO) << "Retireved " <<  m_NnClusterizationFactory << " for NN corrections." << endreq;
+  
+ 
+  // get the module distortions tool
+  if (!m_disableDistortions) {
+    if  (!m_pixDistoTool.empty()) {
+      sc = m_pixDistoTool.retrieve();
+      if ( sc != StatusCode::SUCCESS ) {
+	msg(MSG::ERROR) << "Can't get pixel distortions tool " << endreq;
+      } else {
+	msg(MSG::INFO) << "Pixel distortions tool retrieved" << endreq;
+      }
+    } else {
+      msg(MSG::INFO) << "No PixelDistortionsTool selected." << endreq;
+    }
+  }
+  else{
+    msg(MSG::INFO) << "No PixelDistortions will be simulated." << endreq;
+  }
+    
+  if (detStore()->retrieve(m_pixelid, "PixelID").isFailure()) {
+    ATH_MSG_FATAL ("Could not get Pixel ID helper");
+    return StatusCode::FAILURE;
+  }
+
+  if (m_storeGate.retrieve().isFailure()){
+    ATH_MSG_WARNING("Can not retrieve " << m_storeGate << ". Exiting.");
+    return StatusCode::FAILURE;
+  }
+
+  if (m_incidentSvc.retrieve().isFailure()){
+    ATH_MSG_WARNING("Can not retrieve " << m_incidentSvc << ". Exiting.");
+    return StatusCode::FAILURE;
+  }
+
+  // register to the incident service: EndEvent needed for memory cleanup
+  m_incidentSvc->addListener( this, "EndEvent");
+
+  /* ME : booking of test histos is something to be hidden from production code !
+     sc = service("HistogramDataSvc", m_HistSvc, true);
+     // Define here the histograms;
+     m_h_Resx = m_HistSvc->book(m_foldername,"Resx","X shift (um)",400,-400.,400.);
+     m_h_Resy = m_HistSvc->book(m_foldername,"Resy","Y shift (um)",400,-400.,400.);
+     m_h_Locx = m_HistSvc->book(m_foldername,"Locx","X position (mm)",400,-20.,20.);
+     m_h_Locy = m_HistSvc->book(m_foldername,"Locy","Y position (mm)",800,-40.,40.); 
+     m_h_ThetaTrack = m_HistSvc->book(m_foldername,"ThetaTrack","Theta Track (rad)",140,-7.,7);
+     m_h_PhiTrack = m_HistSvc->book(m_foldername,"PhiTrack","Phi Track (rad)",140,-7.,7);    
+  */
+  return sc;
+}
+
+ 
+void InDet::PixelClusterOnTrackTool::handle(const Incident& inc) 
+{
+      if ( inc.type() == "EndEvent" ){
+          ATH_MSG_VERBOSE("'EndEvent' incident caught. Refreshing Cache.");
+	  m_splitClusterMap = 0;
+      }     
+ }
+
+
+///////////////////////////////////////////////////////////////////
+// Finalize
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::PixelClusterOnTrackTool::finalize()
+{
+  StatusCode sc = AlgTool::finalize(); return sc;
+}
+
+///////////////////////////////////////////////////////////////////
+// Trk::SiClusterOnTrack  production
+///////////////////////////////////////////////////////////////////
+
+
+const InDet::PixelClusterOnTrack* InDet::PixelClusterOnTrackTool::correct
+(const Trk::PrepRawData& rio,const Trk::TrackParameters& trackPar) const
+{
+  
+  
+  // check if cluster splitting actually could be done you could : switching off will only happen once
+  bool clusterMapExists = m_applyNNcorrection ? m_storeGate->contains<InDet::PixelGangedClusterAmbiguities>(m_splitClusterMapName) : false;
+  if (!clusterMapExists && m_applyNNcorrection){
+      ATH_MSG_INFO("No PixelCluster splitting information available, switchng NN recalibration off (was: on).");
+      ATH_MSG_INFO(" -> This is expected if you read ESD data prior to release 17.0.2.8");
+      m_applyNNcorrection = false;
+  }
+  
+  if (!m_applyNNcorrection || ((dynamic_cast<const InDetDD::SiDetectorElement*>(rio.detectorElement()))->isBlayer() && !m_NNIBLcorrection && !m_IBLAbsent))
+  {
+    return correctDefault(rio,trackPar);
+  }
+  else
+  {
+    if (m_errorStrategy==0 || m_errorStrategy ==1)
+    {
+      // version from Giacinto
+      if (m_noNNandBroadErrors ) return 0; 
+
+      // if we try broad errors, get Pixel Cluster to test if it is split
+      const InDet::PixelCluster* pix = dynamic_cast<const InDet::PixelCluster*>(&rio);
+      if(!pix) return 0;
+      
+      if (pix->isSplit())
+	return correctNN(rio,trackPar);
+      else
+	return correctDefault(rio,trackPar);
+    }
+    else
+    {
+      return correctNN(rio,trackPar);
+    }
+  }
+}
+
+
+
+/** The correct method produces a PixelClusterOnTrack using the
+ *  measured PixelCluster and the track prediction. 
+ */
+const InDet::PixelClusterOnTrack* InDet::PixelClusterOnTrackTool::correctDefault
+(const Trk::PrepRawData& rio,const Trk::TrackParameters& trackPar) const{
+  //  const InDet::SiCluster* SC = dynamic_cast<const InDet::SiCluster*> (&rio);
+  const InDet::PixelCluster* pix = 0;
+  if(!(pix = dynamic_cast<const InDet::PixelCluster*>(&rio))) return 0;
+
+  ATH_MSG_VERBOSE ("Correct called with Error strategy " << m_errorStrategy);
+  
+  // PixelClusterOnTrack production
+  //
+  Trk::LocalParameters locpar;
+  Amg::Vector3D   glob(pix->globalPosition());
+
+  // Include IBL calibration constants
+  static const int nbinphi=9;
+  static const double phimin=-0.27, phimax=0.27;
+  static double phix[nbinphi+1];
+  for (int i=0; i<=nbinphi; i++) phix[i]=phimin+i*(phimax-phimin)/nbinphi;
+  static const int nbineta=6;
+  static const double etacen[nbineta]={-0.,1.,1.55,1.9,2.15,2.35};
+  static double etax[nbineta+1];
+  etax[0]=0.; etax[nbineta]=2.7;
+  for (int i=0; i<nbineta-1; i++) etax[i+1]=(etacen[i]+etacen[i+1])/2.;
+  static double calphi[nbinphi];
+  static double caleta[nbineta][3];
+  static double calerrphi[nbinphi][3];
+  static double calerreta[nbineta][3];
+#include "IBL_calibration.h"
+  
+  // Get pointer to detector element
+  
+  const InDetDD::SiDetectorElement* element = pix->detectorElement(); 
+  if(!element) return 0;
+  bool blayer = element->isBlayer();
+  IdentifierHash                    iH = element->identifyHash();
+  
+  double errphi = -1; 
+  double erreta = -1; 
+
+  if(pix->rdoList().size() <=0) {
+    ATH_MSG_WARNING ("Pixel RDO-list size is 0, check integrity of pixel clusters! stop ROT creation.");
+    return NULL;
+  }
+  else{
+  
+    const InDetDD::PixelModuleDesign* design = 
+           dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
+
+    // float phi = trackPar.parameters()[Trk::phi];
+    // float theta = trackPar.parameters()[Trk::theta];
+    // const Trk::Surface* surf = trackPar.associatedSurface();
+    // float phis = surf->normal().phi();
+    // float thetas = surf->normal().theta();
+    // float angle2 = phi-phis;
+    // if(angle2>PI) angle2 = 2*PI-angle2;
+    // if(angle2<-1*PI) angle2 += 2*PI;
+    // if(angle2> PI/2) angle2 -= PI;
+    // if(angle2< -1*PI/2) angle2 += PI;
+
+    // get candidate track angle in module local frame
+    Amg::Vector3D my_track = trackPar.momentum();
+    Amg::Vector3D my_normal = element->normal();
+    Amg::Vector3D my_phiax = element->phiAxis();
+    Amg::Vector3D my_etaax = element->etaAxis();
+    float trkphicomp = my_track.dot(my_phiax);
+    float trketacomp = my_track.dot(my_etaax);
+    float trknormcomp = my_track.dot(my_normal);
+    double bowphi = atan2(trkphicomp,trknormcomp);
+    double boweta = atan2(trketacomp,trknormcomp);
+    float etatrack = trackPar.eta();
+    
+    float tanl = element->getTanLorentzAnglePhi();
+    int readoutside = element->design().readoutSide();
+   
+    // double PI = acos(-1.);
+    // map the angles of inward-going tracks onto [-PI/2, PI/2]
+    if(bowphi > M_PI/2) bowphi -= M_PI;
+    if(bowphi < -M_PI/2) bowphi += M_PI;
+    // finally, subtract the Lorentz angle effect
+    // the readoutside term is needed because of a bug in old 
+    // geometry versions (CSC-01-* and CSC-02-*)
+    double angle = atan(tan(bowphi)-readoutside*tanl);
+
+    // try to understand...
+    const Identifier element_id = element->identify();
+    int PixEtaModule = m_pixelid->eta_module(element_id);    
+    int PixPhiModule = m_pixelid->phi_module(element_id);
+    double PixTrkPt = trackPar.pT();
+    double PixTrkEta = trackPar.eta();
+    ATH_MSG_VERBOSE ("tanl = " <<  tanl << " readout side is " << readoutside <<
+                     " module " << PixEtaModule << " " << PixPhiModule<<
+                     " track pt, eta = " << PixTrkPt << " " << PixTrkEta <<
+                     " track momentum phi, norm = " << trkphicomp << " " <<
+                     trknormcomp << " bowphi = " << bowphi <<" angle = "<<angle);
+     
+    float omegaphi = pix->omegax();
+    float omegaeta = pix->omegay();
+    double localphi = -9999.;
+    double localeta = -9999.;    
+    
+//    m_h_ThetaTrack->fill(boweta,1.);
+//    m_h_PhiTrack->fill(bowphi,1.);
+    
+
+    std::vector<Identifier> rdos = pix->rdoList();
+    std::vector<Identifier>::const_iterator oneRDO = rdos.begin();
+    InDetDD::SiLocalPosition meanpos(0,0,0);
+    int rowmin=9999; int rowmax=-9999;
+    int colmin=9999; int colmax=-9999;
+    for(; oneRDO != rdos.end(); oneRDO++){
+      Identifier rId = *oneRDO;
+      int row = m_pixelid->phi_index(rId);
+      int col = m_pixelid->eta_index(rId);
+      if(rowmin > row) rowmin = row;
+      if(rowmax < row) rowmax = row;
+      if(colmin > col) colmin = col;
+      if(colmax < col) colmax = col;
+      meanpos += design->positionFromColumnRow(col,row);
+    }
+    meanpos = meanpos/rdos.size();
+    InDetDD::SiLocalPosition pos1 = 
+         design->positionFromColumnRow(colmin,rowmin);
+    InDetDD::SiLocalPosition pos2 = 
+         design->positionFromColumnRow(colmax,rowmin);
+    InDetDD::SiLocalPosition pos3 = 
+         design->positionFromColumnRow(colmin,rowmax);
+    InDetDD::SiLocalPosition pos4 = 
+         design->positionFromColumnRow(colmax,rowmax);
+
+    InDetDD::SiLocalPosition centroid = 0.25*(pos1+pos2+pos3+pos4); 
+    double shift = element->getLorentzCorrection();
+    int nrows = rowmax-rowmin+1;
+    int ncol = colmax-colmin+1;
+    double ang = 999.;
+    double eta = 999.;
+
+    //    ATH_MSG_VERBOSE ( << "Position strategy = " 
+    //    << m_positionStrategy << "omegaphi = " << omegaphi )
+
+    // TOT interpolation for collision data    
+    // Force IBL to use digital clustering and broad errors.
+    if(m_positionStrategy > 0 && omegaphi > -0.5 && omegaeta > -0.5 ){
+       localphi = centroid.xPhi()+shift;
+       localeta = centroid.xEta();
+
+       //  msg(MSG::VERBOSE) << "here I am = " << endreq;
+
+       // barrel 
+       if(element->isBarrel() ){
+
+	 //   double delta=0;
+          ang = 180*angle/M_PI;
+          double delta = 0.;
+          if (m_IBLAbsent || !blayer) delta = m_calibSvc->getBarrelDeltaX(nrows,ang);
+	  else { 	 //special calibration for IBL
+	    if ( angle<phix[0] || angle>phix[nbinphi] || nrows!=2 ) 
+	      delta=0.;
+	    else{
+	      int bin=-1;
+	      while ( angle>phix[bin+1] ) bin++;
+	      delta = calphi[bin];
+	    }
+	    if (m_calibSvc->includesIBLParams()) delta = m_calibSvc->getIBLDeltaX(nrows,ang); 
+	  }
+	  // if(nrows==2 && ang<14) delta = 0.06-0.0037*(14-ang);
+	  // if(nrows==2 && ang > 14 && ang<30) delta = 0.06-0.0037*(ang-14);
+          localphi += delta*(omegaphi-0.5);
+
+
+          // settle the sign/pi periodicity issues
+	  double thetaloc=-999.;
+	  if(boweta > -0.5*M_PI && boweta < M_PI/2.){ 
+            thetaloc = M_PI/2.-boweta;
+	  }
+	  else if(boweta > M_PI/2. && boweta < M_PI){ 
+            thetaloc = 1.5*M_PI-boweta;
+	  }
+          else{ // 3rd quadrant
+            thetaloc = -0.5*M_PI-boweta;
+	  }
+	  double etaloc = -1*log(tan(thetaloc/2.));
+
+          if ( m_IBLAbsent || !blayer ) delta = m_calibSvc->getBarrelDeltaY(ncol,etaloc);
+	  else { 	 //special calibration for IBL
+	    etaloc = fabs(etaloc);
+	    if ( etaloc<etax[0] || etaloc>etax[nbineta] ) 
+	      delta=0.;
+	    else{
+	      int bin=-1;
+	      while ( etaloc>etax[bin+1] ) bin++;
+              if ( ncol==bin ) delta = caleta[bin][0];
+              else if ( ncol==bin+1 ) delta = caleta[bin][1];
+              else if ( ncol==bin+2 ) delta = caleta[bin][2];
+              else delta = 0.;
+	    }
+	    if (m_calibSvc->includesIBLParams()) delta = m_calibSvc->getIBLDeltaY(ncol,etaloc);
+	  }
+          localeta += delta*(omegaeta-0.5);
+       }
+       else{
+	 // collision endcap data
+	 if(m_positionStrategy == 1){
+	   // double deltax = 10*micrometer;
+	   // double deltay = 10*micrometer;
+
+          double deltax = m_calibSvc->getEndcapDeltaX();
+          double deltay = m_calibSvc->getEndcapDeltaY();
+          localphi += deltax*(omegaphi-0.5);
+	  localeta += deltay*(omegaeta-0.5);
+
+
+	 }
+	 // SR1 cosmics endcap data 
+	 // some parametrization dependent on track angle
+	 // would be better here
+	 else if(m_positionStrategy == 20){
+          double deltax = 35*micrometer;
+          double deltay = 35*micrometer;
+          localphi += deltax*(omegaphi-0.5);      
+          localeta += deltay*(omegaeta-0.5);
+	 }
+       }  
+    }
+    // digital
+    else{
+      localphi = meanpos.xPhi()+shift;
+      localeta = meanpos.xEta();
+    } 
+
+    InDet::SiWidth width = pix->width();
+    
+    //Error strategies
+
+    // For very shallow tracks the cluster can easily break as 
+    // the average charge per pixel is of the order of the threshold
+    // In this case, an error equal to the geometrical projection 
+    // of the track path in silicon onto the module surface seems 
+    // appropriate  
+    if(fabs(angle) > 1){
+      errphi = 250*micrometer*tan(fabs(angle))/sqrt(12.);
+      erreta = width.z() > 250*micrometer*tan(fabs(boweta)) ? 
+        width.z()/sqrt(12.) : 250*micrometer*tan(fabs(boweta))/sqrt(12.);
+      ATH_MSG_VERBOSE ( "Shallow track with tanl = " <<  tanl << " bowphi = " <<
+                        bowphi << " angle = " << angle << " width.z = " << width.z()<<
+                        " errphi = " << errphi << " erreta = " << erreta);
+    }
+    else if( m_errorStrategy == 0 ){
+       errphi = width.phiR()/sqrt(12.);          
+       erreta = width.z()/sqrt(12.);
+    }
+    else if( m_errorStrategy == 1 ){
+       errphi = (width.phiR()/nrows)/sqrt(12.);
+       erreta = (width.z()/ncol)/sqrt(12.);
+    }
+    else if( m_errorStrategy == 2 ){
+     
+       if(element->isBarrel()){
+
+           if ( m_IBLAbsent || !blayer ) errphi = m_calibSvc->getBarrelNewErrorPhi(ang,nrows);
+	   else { 	 //special calibration for IBL
+	     if ( angle<phix[0] || angle>phix[nbinphi] ) 
+	       errphi = width.phiR()/sqrt(12.);
+	     else{
+	       int bin=-1;
+	       while ( angle>phix[bin+1] ) bin++;
+	       if ( nrows==1 ) errphi = calerrphi[bin][0];
+	       else if ( nrows==2 ) errphi = calerrphi[bin][1];
+	       else errphi=calerrphi[bin][2];
+	     }
+	   }
+
+	   if(m_rel13like){
+             erreta = m_calibSvc->getBarrelErrorEta(eta,ncol,nrows);
+	   }
+	   else if ( m_IBLAbsent || !blayer ) {
+	     erreta =  m_calibSvc->getBarrelNewErrorEta(fabs(etatrack),nrows,ncol);
+	   }
+	   else { 	 //special calibration for IBL
+	     double etaloc = fabs(etatrack);
+	     if ( etaloc<etax[0] || etaloc>etax[nbineta] ) 
+	       erreta = width.z()/sqrt(12.);
+	     else{
+	       /*
+	       int bin=-1;
+	       while ( etaloc>etax[bin+1] ) bin++;
+	       */
+	       int bin = 0;
+	       while ( etaloc>etax[bin+1] ) ++bin;
+	       if ( ncol==bin ) erreta = calerreta[bin][0];
+	       else if ( ncol==bin+1 ) erreta = calerreta[bin][1];
+	       else if ( ncol==bin+2 ) erreta = calerreta[bin][2];
+	       else erreta = width.z()/sqrt(12.);
+	     }
+	   }
+       }
+       else{
+           errphi = m_calibSvc->getEndCapErrorPhi(ncol,nrows);
+           erreta = m_calibSvc->getEndCapErrorEta(ncol,nrows);
+       }       
+       if (errphi>erreta) erreta = width.z()/sqrt(12.);
+    }
+    
+    //Bow correction for Barrel
+    
+    /*std::vector<double> VecPos;
+    std::vector<double>* pvec;
+    //pvec = new std::vector<double>;
+    VecPos.push_back(localphi);
+    VecPos.push_back(localeta);
+    pvec = &VecPos; */
+    
+    
+    Amg::Vector2D locpos = Amg::Vector2D(localphi,localeta);	
+    if(element->isBarrel() && !m_disableDistortions ) {
+      // ME: comment out: m_h_ThetaTrack->fill(boweta,1.);
+      //msg(MSG::FATAL) << element->identify() << endreq;
+      //msg(MSG::FATAL) << m_pixelid->print(element->identify()) << endreq;
+
+      //       msg(MSG::INFO) <<  "YYY bowphi = " << bowphi 
+      //  << " angle2 = " << angle2  
+      //  << " theta-thetas = " << thetas-theta 
+      //  << " boweta = " << boweta << endreq;  
+
+      correctBow(element->identify(), locpos, bowphi, boweta);
+    }
+    
+
+    locpar = Trk::LocalParameters(locpos);
+    centroid = InDetDD::SiLocalPosition(localeta,localphi,0.);
+    glob = element->globalPosition(centroid);
+    
+ }
+
+  // Error matrix production
+  
+  Amg::MatrixX  cov = pix->localCovariance();
+
+  // corrected phi error
+  if(errphi>0) cov(0,0) = errphi*errphi; 
+  if(erreta>0) cov(1,1) = erreta*erreta; 
+
+  ATH_MSG_VERBOSE (" errphi =  " << errphi << " erreta = "<< erreta);
+  
+  // create new copy of error matrix
+  if( m_scalePixelCov ){
+    Amg::MatrixX* newCov = m_errorScalingTool->createScaledPixelCovariance(cov,element->isEndcap());
+    if( !newCov ) {
+      ATH_MSG_WARNING("Failed to create scaled error for Pixel");
+      return 0;
+    }
+    cov = *newCov;
+    delete newCov;
+  }
+  bool isbroad = (m_errorStrategy==0) ? true : false;
+  return new InDet::PixelClusterOnTrack(pix,locpar,cov,iH,glob,pix->gangedPixel(),isbroad);
+} 
+
+void InDet::PixelClusterOnTrackTool::correctBow(const Identifier& id, Amg::Vector2D& localpos, const double phi, const double theta) const {
+  Amg::Vector3D dir(tan(phi),tan(theta),1.);
+  Amg::Vector2D newpos = 
+    m_pixDistoTool->correctReconstruction(id, localpos, dir);
+  localpos = newpos;
+  return;
+} 
+
+const InDet::PixelClusterOnTrack* InDet::PixelClusterOnTrackTool::correct
+(const Trk::PrepRawData& rio,const Trk::TrackParameters& trackPar,
+ const InDet::PixelClusterStrategy strategy) const {
+  int initial_errorStrategy;
+  const InDet::PixelClusterOnTrack *newROT;
+  switch ( strategy ) {
+  case InDet::PIXELCLUSTER_OUTLIER : // if cluster is outlier, increase errors
+  case InDet::PIXELCLUSTER_SHARED :
+    initial_errorStrategy = m_errorStrategy;
+    if(!m_rel13like) m_errorStrategy = 0; // error as size of cluster /sqrt(12)
+    newROT = correct(rio,trackPar);
+    m_errorStrategy = initial_errorStrategy;
+    return newROT;
+  default:
+    return correct(rio, trackPar);
+  }
+}
+
+// GP: NEW correct() method in case of NN based calibration  */
+
+const InDet::PixelClusterOnTrack* InDet::PixelClusterOnTrackTool::correctNN
+(const Trk::PrepRawData& rio,const Trk::TrackParameters& trackPar) const
+{
+  const InDet::PixelCluster* pixelPrepCluster=dynamic_cast<const InDet::PixelCluster*>(&rio);
+  
+  if(pixelPrepCluster==0) 
+  {
+    ATH_MSG_WARNING("This is not a pixel cluster, return 0.");
+    return 0;
+  }
+
+  const InDetDD::SiDetectorElement* element = pixelPrepCluster->detectorElement(); 
+  if(!element) 
+  {
+    ATH_MSG_WARNING ("Cannot access detector element. Aborting cluster correction...");
+    return 0;
+  }
+
+  IdentifierHash iH = element->identifyHash();
+
+  if (m_doNotRecalibrateNN)
+  {
+    
+    Amg::Vector3D   glob(pixelPrepCluster->globalPosition());
+
+    Amg::Vector3D my_track = trackPar.momentum();
+    Amg::Vector3D my_normal = element->normal();
+    Amg::Vector3D my_phiax = element->phiAxis();
+    Amg::Vector3D my_etaax = element->etaAxis();
+    float trkphicomp = my_track.dot(my_phiax);
+    float trketacomp = my_track.dot(my_etaax);
+    float trknormcomp = my_track.dot(my_normal);
+    double bowphi = atan2(trkphicomp,trknormcomp);
+    double boweta = atan2(trketacomp,trknormcomp);
+      
+    Amg::Vector2D locpos = pixelPrepCluster->localPosition();
+    if(element->isBarrel() && !m_disableDistortions ) {
+      correctBow(element->identify(), locpos, bowphi, boweta);
+    }
+    
+    Trk::LocalParameters locpar = Trk::LocalParameters(locpos);
+    Amg::MatrixX cov = pixelPrepCluster->localCovariance();
+
+    // create new copy of error matrix
+    if( m_scalePixelCov ){
+      Amg::MatrixX* newCov = m_errorScalingTool->createScaledPixelCovariance(cov,element->isEndcap());
+      if( !newCov ) {
+	ATH_MSG_WARNING("Failed to create scaled error for Pixel");
+	return 0;
+      }
+      cov = *newCov;
+      delete newCov;
+    }
+    return new InDet::PixelClusterOnTrack(pixelPrepCluster,locpar,cov,iH,glob,pixelPrepCluster->gangedPixel(),false);
+  }
+  
+  
+  if (!m_splitClusterMap) {
+    StatusCode sc = m_storeGate->retrieve(m_splitClusterMap, m_splitClusterMapName);
+    if (sc.isFailure()) {
+      ATH_MSG_DEBUG("Could not retrieve split cluster map.");
+      return 0;
+    } 
+  }
+
+  std::vector<Amg::Vector2D> vectorOfPositions;
+  
+  int numberOfSubclusters=1;
+  vectorOfPositions.push_back(pixelPrepCluster->localPosition());
+  
+  InDet::PixelGangedClusterAmbiguities::const_iterator mapBegin=m_splitClusterMap->begin();
+  InDet::PixelGangedClusterAmbiguities::const_iterator mapEnd=m_splitClusterMap->end();
+
+  for (InDet::PixelGangedClusterAmbiguities::const_iterator mapIter=mapBegin;mapIter!=mapEnd;++mapIter)
+  {
+    const SiCluster* first=(*mapIter).first;
+    const SiCluster* second=(*mapIter).second;
+    if (first == &rio  && second != &rio)
+    {
+      ATH_MSG_DEBUG("Found additional split cluster in ambiguity map (+=1).");
+      numberOfSubclusters+=1;
+
+      const SiCluster* otherOne=second;
+
+      const InDet::PixelCluster* pixelAddCluster=dynamic_cast<const InDet::PixelCluster*>(otherOne);
+      if (pixelAddCluster==0)
+      {
+        ATH_MSG_WARNING("Pixel ambiguity map has empty pixel cluster. Please DEBUG!");
+        continue;
+      }
+      vectorOfPositions.push_back(pixelAddCluster->localPosition());
+      
+      if(msgLvl(MSG::DEBUG))
+      {
+        msg(MSG::DEBUG) << "Found one more pixel cluster. Posistion x: " 
+                        << pixelAddCluster->localPosition()[0] << "y: " << pixelAddCluster->localPosition()[1] << endreq;
+      }
+    }//find relevant element of map
+  }//iterate over map
+
+  // A.S. hack for the moment: isSplit is also set for modified (non-split) 1-pixel-clusters ... is this needed anyway ?
+  //
+  //if (pixelPrepCluster->isSplit() && numberOfSubclusters<2)
+  //{
+  //msg(MSG::WARNING) << " Cluster is split but no further clusters found in split cluster map." << endreq;
+  //}
+  
+  //now you have numberOfSubclusters and the vectorOfPositions (Amg::Vector2D)
+
+  const Trk::AtaPlane* parameters=dynamic_cast<const Trk::AtaPlane*>(&trackPar);
+  if (parameters==0)
+  {
+    msg(MSG::WARNING) << "Parameters are not at a plane ! Aborting cluster correction... " << endreq;
+    return 0;
+  }
+
+  std::vector<Amg::Vector2D>     allLocalPositions;
+  std::vector<Amg::MatrixX>      allErrorMatrix;
+
+  allLocalPositions=
+      m_NnClusterizationFactory->estimatePositions(*pixelPrepCluster,
+                                                   parameters->associatedSurface(),
+                                                   *parameters,
+                                                   allErrorMatrix,
+                                                   numberOfSubclusters);
+  
+  if (allLocalPositions.size()  == 0)
+  {
+    if(msgLvl(MSG::DEBUG))
+    {
+      msg(MSG::DEBUG) << " Cluster cannot be treated by NN. Giving back to default clusterization " << endreq;
+    }
+    return correctDefault(rio,trackPar);
+  }
+
+  if (allLocalPositions.size() != size_t(numberOfSubclusters))
+  {
+    msg(MSG::WARNING) << "Returned position vector size " << allLocalPositions.size() << " not according to expected number of subclusters: " << numberOfSubclusters << ". Abort cluster correction..." << endreq;
+    return 0;
+  }
+  
+  Amg::Vector2D finalposition;
+  Amg::MatrixX finalerrormatrix;
+
+  // GP: now the not so nice part of matching the new result with the old one...
+  // Takes the error into account to improve the matching
+
+  if (numberOfSubclusters==1)
+  {
+    finalposition=allLocalPositions[0];
+    finalerrormatrix=allErrorMatrix[0];
+  }
+  
+  if (numberOfSubclusters==2)
+  {
+    double distancesq1=
+        std::pow(vectorOfPositions[0][0]-allLocalPositions[0][0],2)/allErrorMatrix[0](0,0)+
+        std::pow(vectorOfPositions[1][0]-allLocalPositions[1][0],2)/allErrorMatrix[1](0,0)+
+        std::pow(vectorOfPositions[0][1]-allLocalPositions[0][1],2)/allErrorMatrix[0](1,1)+
+        std::pow(vectorOfPositions[1][1]-allLocalPositions[1][1],2)/allErrorMatrix[1](1,1);
+
+    double distancesq2=
+        std::pow(vectorOfPositions[1][0]-allLocalPositions[0][0],2)/allErrorMatrix[0](0,0)+
+        std::pow(vectorOfPositions[0][0]-allLocalPositions[1][0],2)/allErrorMatrix[1](0,0)+
+        std::pow(vectorOfPositions[1][1]-allLocalPositions[0][1],2)/allErrorMatrix[0](1,1)+
+        std::pow(vectorOfPositions[0][1]-allLocalPositions[1][1],2)/allErrorMatrix[1](1,1);
+
+    if(msgLvl(MSG::DEBUG))
+    {
+      msg(MSG::DEBUG) << " Old pix (1) x: " << vectorOfPositions[0][0] << " y: " << vectorOfPositions[0][1] << endreq;
+      msg(MSG::DEBUG) << " Old pix (2) x: " << vectorOfPositions[1][0] << " y: " << vectorOfPositions[1][1] << endreq;
+      msg(MSG::DEBUG) << " Pix (1) x: " << allLocalPositions[0][0] << " +/- " << sqrt(allErrorMatrix[0](0,0)) 
+                      << " y: " << allLocalPositions[0][1] << " +/- " << sqrt(allErrorMatrix[0](1,1)) << endreq;
+      msg(MSG::DEBUG) << " Pix (2) x: " << allLocalPositions[1][0] << " +/- " << sqrt(allErrorMatrix[1](0,0)) 
+                      << " y: " << allLocalPositions[1][1] << " +/- " << sqrt(allErrorMatrix[1](1,1)) << endreq;
+      msg(MSG::DEBUG) << " Old (1) new (1) dist: " << sqrt(distancesq1) << " Old (1) new (2) " << sqrt(distancesq2) << endreq;
+    }
+    
+    if (distancesq1<distancesq2)
+    {
+      finalposition=allLocalPositions[0];
+      finalerrormatrix=allErrorMatrix[0];
+    }
+    else
+    {
+      finalposition=allLocalPositions[1];
+      finalerrormatrix=allErrorMatrix[1];
+    }
+  }
+
+
+  if (numberOfSubclusters==3)
+  {
+    double distances[6];
+
+    distances[0]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,0,1,2);
+    distances[1]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,0,2,1);
+    distances[2]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,1,0,2);
+    distances[3]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,1,2,0);
+    distances[4]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,2,0,1);
+    distances[5]=distance(vectorOfPositions,allLocalPositions,allErrorMatrix,2,1,0);
+
+    int smallestDistanceIndex=-10;
+    double minDistance=1e10;
+    
+    for (int i=0;i<6;i++)
+    {
+      if (msgLvl(MSG::VERBOSE))
+      {
+        msg(MSG::VERBOSE) << " distance n.: " << i << " distance is: " << distances[i] << endreq;
+      }
+      
+      if (distances[i]<minDistance)
+      {
+        minDistance=distances[i];
+        smallestDistanceIndex=i;
+      }
+    }
+    
+    if(msgLvl(MSG::DEBUG))
+    {
+      msg(MSG::DEBUG) << " The minimum distance is : " << minDistance << " for index: " << smallestDistanceIndex  << endreq;
+    }
+      
+    if (smallestDistanceIndex==0 ||  smallestDistanceIndex==1)
+    {
+      finalposition=allLocalPositions[0];
+      finalerrormatrix=allErrorMatrix[0];
+    }
+    if (smallestDistanceIndex==2 ||  smallestDistanceIndex==4)
+    {
+      finalposition=allLocalPositions[1];
+      finalerrormatrix=allErrorMatrix[1];
+    }
+    if (smallestDistanceIndex==3 || smallestDistanceIndex==5)
+    {
+      finalposition=allLocalPositions[2];
+      finalerrormatrix=allErrorMatrix[2];
+    }
+  }
+
+  if (msgLvl(MSG::DEBUG))
+  {
+    msg(MSG::DEBUG) << " Old position x: " << pixelPrepCluster->localPosition()[0] << 
+        " +/- " << sqrt(pixelPrepCluster->localCovariance()(0,0)) 
+                    << " y: " << pixelPrepCluster->localPosition()[1] << 
+        " +/- " << sqrt(pixelPrepCluster->localCovariance()(1,1)) << endreq;
+    msg(MSG::DEBUG) << " Final position x: " << finalposition[0] << 
+        " +/- " << sqrt(finalerrormatrix(0,0)) << 
+        " y: " << finalposition[1] << " +/- " << 
+        sqrt(finalerrormatrix(1,1)) << endreq;
+  }
+  
+
+
+  Amg::Vector3D my_track = trackPar.momentum();
+  Amg::Vector3D my_normal = element->normal();
+  Amg::Vector3D my_phiax = element->phiAxis();
+  Amg::Vector3D my_etaax = element->etaAxis();
+  float trkphicomp = my_track.dot(my_phiax);
+  float trketacomp = my_track.dot(my_etaax);
+  float trknormcomp = my_track.dot(my_normal);
+  double bowphi = atan2(trkphicomp,trknormcomp);
+  double boweta = atan2(trketacomp,trknormcomp);
+      
+  if(element->isBarrel() && !m_disableDistortions ) {
+    correctBow(element->identify(), finalposition, bowphi, boweta);
+  }
+    
+  Amg::MatrixX  cov = finalerrormatrix;
+  // create new copy of error matrix
+  if( m_scalePixelCov ){
+    Amg::MatrixX* newCov = m_errorScalingTool->createScaledPixelCovariance(cov,element->isEndcap());
+    if( !newCov ) {
+      ATH_MSG_WARNING("Failed to create scaled error for Pixel");
+      return 0;
+    }
+    cov = *newCov;
+    delete newCov;
+  }
+
+  InDetDD::SiLocalPosition centroid = InDetDD::SiLocalPosition(finalposition[1],
+                                                               finalposition[0],
+                                                               0);
+  Trk::LocalParameters locpar = Trk::LocalParameters(finalposition);
+
+  const Amg::Vector3D& glob = element->globalPosition(centroid);
+    
+  
+  return new InDet::PixelClusterOnTrack(pixelPrepCluster,locpar,cov,iH,
+                                        glob,
+                                        pixelPrepCluster->gangedPixel(),
+                                        false);
+
+}
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx
new file mode 100755
index 00000000000..23ff4c998f9
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/SCT_ClusterOnTrackTool.cxx
@@ -0,0 +1,343 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+//   Implementation file for class SCT_ClusterOnTrackTool
+///////////////////////////////////////////////////////////////////
+// (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+// AlgTool used for SCT_ClusterOnTrack object production
+///////////////////////////////////////////////////////////////////
+// started 21/04/2004 I.Gavrilenko -- see ChangeLog
+///////////////////////////////////////////////////////////////////
+
+#include "SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h"
+
+#include "TrkSurfaces/RectangleBounds.h"
+#include "TrkSurfaces/TrapezoidBounds.h"
+
+using CLHEP::micrometer;
+using CLHEP::deg;
+
+///////////////////////////////////////////////////////////////////
+// Constructor
+///////////////////////////////////////////////////////////////////
+
+InDet::SCT_ClusterOnTrackTool::SCT_ClusterOnTrackTool
+(const std::string& t,const std::string& n,const IInterface* p) :
+  AthAlgTool(t,n,p),
+  m_errorScalingTool("Trk::RIO_OnTrackErrorScalingTool/RIO_OnTrackErrorScalingTool"),
+  m_distortionsTool("SCT_DistortionsTool"),
+  m_scaleSctCov(false),
+  m_option_make2dimBarrelClusters(false),
+  m_doDistortions(false),
+  m_option_errorStrategy(-1),
+  m_option_correctionStrategy(-1)
+{
+  // declareInterface<SCT_ClusterOnTrackTool>(this);
+  declareInterface<IRIO_OnTrackCreator>(this);
+
+  declareProperty("ErrorScalingTool", m_errorScalingTool,
+                  "The toolhandle for central error scaling");
+  declareProperty("MakeTwoDimBarrelClusters", m_option_make2dimBarrelClusters,
+                  "flag if strip length should be part of the measurement");
+  declareProperty("ErrorStrategy", m_option_errorStrategy,
+                  "if ErrorStrategy < 0, keep previous errors else recompute");
+  declareProperty("CorrectionStrategy", m_option_correctionStrategy,
+                  "if CorrectionStrategy >= 0, apply a correction to the cluster position");  
+  declareProperty("doDistortions",   m_doDistortions, 
+		  "Simulation of module distortions");
+  declareProperty("SCTDistortionsTool", m_distortionsTool, 
+		  "Tool to retrieve SCT distortions");
+}
+
+///////////////////////////////////////////////////////////////////
+// Destructor  
+///////////////////////////////////////////////////////////////////
+
+InDet::SCT_ClusterOnTrackTool::~SCT_ClusterOnTrackTool(){}
+
+///////////////////////////////////////////////////////////////////
+// Initialisation
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::SCT_ClusterOnTrackTool::initialize()
+{
+  StatusCode sc = AlgTool::initialize(); 
+
+  msg(MSG::INFO) << "A strategy to ";
+  switch (m_option_errorStrategy) {
+    case -1:  msg(MSG::INFO)<< "keep the PRD errors"; break;
+    case  0:  msg(MSG::INFO)<< "apply simple pitch errors"; break;
+    case  1:  msg(MSG::INFO)<< "assign tuned SCT errors"; break;
+    case  2:  msg(MSG::INFO)<< "assign tuned, angle-dependent SCT errors"; break;
+    default:  msg(MSG::INFO)<< " -- NO, UNKNOWN. Pls check jobOptions!"; break;
+  }
+  msg(MSG::INFO)<< " will be applied during SCT_ClusterOnTrack making" << endreq;
+  if (m_option_correctionStrategy == 0) {
+    msg(MSG::INFO) << "SCT cluster positions will be corrected" << endreq;
+  }
+
+  if ( m_errorScalingTool.retrieve().isFailure() ) {
+    msg(MSG::FATAL) << "Failed to retrieve tool " << m_errorScalingTool << endreq;
+    return StatusCode::FAILURE;
+  } else {
+    msg(MSG::INFO) << "Retrieved tool " << m_errorScalingTool << endreq;
+    m_scaleSctCov   = m_errorScalingTool->needToScaleSct();
+    if (m_scaleSctCov) msg(MSG::DEBUG) << "Detected need for scaling SCT errors." << endreq;
+  }
+
+  //Get ISCT_ModuleDistortionsTool
+  if (m_distortionsTool.retrieve().isFailure()) {
+    msg(MSG::FATAL)<< "Could not retrieve distortions tool: " << m_distortionsTool.name() << endreq;
+    return StatusCode::FAILURE;
+  }
+
+  return sc;
+}
+
+///////////////////////////////////////////////////////////////////
+// Finalize
+///////////////////////////////////////////////////////////////////
+
+StatusCode InDet::SCT_ClusterOnTrackTool::finalize()
+{
+  StatusCode sc = AlgTool::finalize(); return sc;
+}
+
+///////////////////////////////////////////////////////////////////
+// Trk::SCT_ClusterOnTrack  production
+///////////////////////////////////////////////////////////////////
+
+const InDet::SCT_ClusterOnTrack* InDet::SCT_ClusterOnTrackTool::correct
+(const Trk::PrepRawData& rio,const Trk::TrackParameters& trackPar) const
+{
+  const InDet::SCT_Cluster* SC = 0;
+  if(!(SC = dynamic_cast<const InDet::SCT_Cluster*> (&rio))) return 0;
+
+  const InDet::SiWidth width = SC->width();
+  const Amg::Vector2D& colRow = width.colRow();
+
+  // Get pointer to detector element
+  //
+  const InDetDD::SiDetectorElement* EL = SC->detectorElement(); 
+  if(!EL) return 0;
+  IdentifierHash                    iH = EL->identifyHash();
+
+  // Get local position of track
+  //
+  Amg::Vector2D loct = trackPar.localPosition();
+
+  // Find phi angle of track relative to Lorentz drift direction, if needed
+  //
+  double dphi(0.);
+  double sinAlpha = EL->sinStereoLocal(SC->localPosition()); 
+  double cosAlpha = sqrt(1-sinAlpha*sinAlpha);
+  if(m_option_errorStrategy == 2 || m_option_correctionStrategy == 0) {
+    
+    double pNormal  = trackPar.momentum().dot(EL->normal());
+    double pPhi     = trackPar.momentum().dot(Amg::AngleAxis3D(asin(-sinAlpha), Amg::Vector3D::UnitZ() )*EL->phiAxis());
+    dphi = atan(pPhi/pNormal) - atan(EL->getTanLorentzAnglePhi());
+  }
+  Amg::Vector3D localstripdir(-sinAlpha,cosAlpha,0.);
+  Amg::Vector3D globalstripdir=trackPar.associatedSurface().transform().linear()*localstripdir;
+  double distance=(trackPar.position()-SC->globalPosition()).mag();
+  const Trk::TrapezoidBounds *tbounds=dynamic_cast<const Trk::TrapezoidBounds *>(&trackPar.associatedSurface().bounds());
+  const Trk::RectangleBounds *rbounds=dynamic_cast<const Trk::RectangleBounds *>(&trackPar.associatedSurface().bounds());
+
+  if(!tbounds && !rbounds) return 0;
+
+  double boundsy=rbounds ? rbounds->halflengthY(): tbounds->halflengthY();
+  if (distance*cosAlpha> boundsy  ){
+    distance=boundsy/cosAlpha-1;
+  }
+  // SCT_ClusterOnTrack production
+  //
+  Trk::LocalParameters locpar;
+  if (loct.y()<0) distance=-distance;
+  Amg::Vector3D    glob(SC->globalPosition()+distance*globalstripdir);
+  Amg::MatrixX oldcov = SC->localCovariance();
+  // Local position and error matrix production
+  //
+  // let's start to re-compute cluster error if errorStrategy >=0
+  if(m_option_errorStrategy > -1){ 
+    Amg::MatrixX mat(2,2);
+    mat.setZero();
+    switch (m_option_errorStrategy) 
+      {
+      case 0:
+        mat(0,0) = pow(width.phiR(),2)/12;
+        mat(1,1) = pow(width.z(),2)/12;
+        break;
+      case 1:
+        if(colRow.x() == 1){
+          mat(0,0) = pow(1.05*width.phiR(),2)/12;
+        } else if(colRow.x() == 2){
+          mat(0,0) = pow(0.27*width.phiR(),2)/12;
+        } else{
+          mat(0,0) = pow(width.phiR(),2)/12;
+        }
+        mat(1,1) = pow(width.z()/colRow.y(),2)/12;
+        break;
+      case 2:
+	mat(0,0) = pow(getError(dphi,int(colRow.x()))*(EL->phiPitch()/0.080),2);
+        mat(1,1) = pow(width.z()/colRow.y(),2)/12;
+        break;
+      default:
+        // don't do anything....
+        break;
+      }
+    // rotation for endcap SCT
+    if(EL->design().shape() == InDetDD::Trapezoid) {
+          double sn      = EL->sinStereoLocal(SC->localPosition ()); 
+          double sn2     = sn*sn;
+          double cs2     = 1.-sn2;
+          double w       = EL->phiPitch(SC->localPosition ())/EL->phiPitch(); 
+          double v0      = mat(0,0)*w*w;
+          double v1      = mat(1,1);
+	  mat(0,0) = (cs2*v0+sn2*v1);
+	  mat(1,0) = (sn*sqrt(cs2)*(v0-v1));
+	  mat(0,1) = mat(1,0);
+	  mat(1,1) = (sn2*v0+cs2*v1);
+	}
+    oldcov = mat;
+  }
+
+  Amg::MatrixX  cov(oldcov);
+  if(EL->design().shape()!=InDetDD::Trapezoid) {                     // barrel
+
+    Trk::DefinedParameter lpos1dim(SC->localPosition().x(),Trk::locX);
+    locpar = (m_option_make2dimBarrelClusters)       ?
+      Trk::LocalParameters(SC->localPosition ())://PRDformation does 2-dim
+      Trk::LocalParameters(lpos1dim);
+    if( !m_option_make2dimBarrelClusters ) {
+      cov = Amg::MatrixX(1,1);
+      cov(0,0) = oldcov(0,0);
+    }
+
+    if( m_scaleSctCov ){
+      Amg::MatrixX* newCov = m_errorScalingTool->createScaledSctCovariance(cov,false,0.0);
+      if( !newCov ) {
+	      ATH_MSG_WARNING("Failed to create scaled error for SCT");
+	      return 0;
+      }
+      cov = *newCov;
+      delete newCov;
+    }
+  }else{                                            // endcap
+   
+    locpar = Trk::LocalParameters(SC->localPosition ());
+    if( m_scaleSctCov ){
+      Amg::MatrixX* newCov = m_errorScalingTool->createScaledSctCovariance(cov,true,
+									   EL->sinStereoLocal(SC->localPosition ()));
+      if( !newCov ) {
+	ATH_MSG_WARNING("Failed to create scaled error for SCT");
+	return 0;
+      }
+      cov = *newCov;
+      delete newCov;
+    }
+    double Sn      = EL->sinStereoLocal(SC->localPosition ()); 
+    double Sn2     = Sn*Sn;
+    double Cs2     = (1.-Sn)*(1.+Sn);
+    double SC      = Sn*sqrt(Cs2);
+    double W       = EL->phiPitch(loct)/EL->phiPitch(); 
+    double dV0     = (Cs2*cov(0,0)+Sn2*cov(1,1)+
+                      2.*SC*cov(1,0))*(W*W-1.);
+    cov(0,0) += (Cs2*dV0);
+    cov(1,0) += (SC *dV0);
+    cov(0,1)  = cov(1,0);
+    cov(1,1) += (Sn2*dV0);
+  }
+
+  if(m_doDistortions){
+    if(EL->isBarrel() == 1){//Only apply disortions to barrel modules
+      locpar[Trk::locX] -= m_distortionsTool->correctReconstruction(trackPar, *EL, locpar, loct);
+    }
+  }
+
+
+  // Apply correction for cluster position bias
+  //
+  if (m_option_correctionStrategy == 0) {
+    double correction = getCorrection(dphi,int(colRow.x())) * EL->hitDepthDirection();
+    locpar[Trk::locX] += correction;
+  }
+  bool isbroad=(m_option_errorStrategy==0) ? true : false;
+  return new InDet::SCT_ClusterOnTrack (SC,locpar,cov,iH,glob,isbroad);
+}
+
+
+double InDet::SCT_ClusterOnTrackTool::getCorrection(double phi, int nstrip) const {
+
+  float corr1[30] = { 0.3, 0.8, 1.1, 1.5, 1.9, 1.9, 2.1, 2.4, 2.3, 2.6,
+                      2.6, 2.7, 2.8, 2.7, 2.5, 2.6, 2.8, 2.6, 2.6, 2.7,
+                      2.2, 1.8, 1.8, 1.6, 1.5, 0.0, 0.0, 0.0, 0.0, 0.0 };
+  float corr2[30] = { 0.0, 0.0, 0.0, 1.0, 1.5, 1.7, 1.7, 2.3, 2.1, 2.5,
+                      2.5, 2.7, 2.7, 2.9, 3.0, 3.0, 3.0, 3.0, 3.4, 3.4,
+                      3.0, 3.2, 2.6, 2.6, 3.0, 2.7, 2.5, 2.4, 1.7, 1.3 };
+
+  // Phi bins have 1 degree width, and cover 0-30 degrees
+  int phiBin = int(fabs(phi)/deg);
+
+  float correction(0.);
+  if (phiBin<30) {
+    if (nstrip==1) correction = corr1[phiBin];
+    if (nstrip==2) correction = corr2[phiBin];
+  }
+
+  if (phi>0.) correction *= -1.;
+
+  return correction * micrometer;
+}
+
+
+double InDet::SCT_ClusterOnTrackTool::getError(double phi, int nstrip) const {
+
+  float sigma1[60] = { 22.1, 21.8, 21.4, 21.0, 20.5, 20.0, 19.6, 19.1, 18.5, 18.0,
+                       17.4, 17.0, 16.4, 15.8, 15.4, 14.9, 14.4, 14.1, 13.3, 13.1,
+                       12.9, 12.4, 12.6, 12.2, 12.3, 12.6, 13.4, 14.2, 15.6, 19.3,
+                       22.8, 29.5, 33.2, 41.8, 44.3, 48.4, 49.9, 54.0, 53.0, 56.3,
+                       57.5, 56.3, 64.5, 65.7, 66.1, 69.4, 74.8, 78.3, 78.8, 79.8,
+                       73.5, 73.8, 75.8, 84.3, 87.0, 99.9, 86.3,  0.0,  0.0,  0.0 };
+  float sigma2[60] = { 22.2, 20.3, 18.8, 16.0, 14.6, 13.8, 12.9, 12.9, 12.7, 12.3,
+                       12.7, 12.6, 13.0, 13.3, 14.0, 14.6, 15.3, 15.9, 16.6, 17.6,
+                       18.4, 19.3, 19.9, 20.5, 21.0, 21.2, 21.5, 21.4, 21.3, 21.3,
+                       20.9, 20.8, 20.6, 20.7, 20.3, 20.7, 21.7, 24.4, 26.5, 29.5,
+                       34.6, 41.6, 48.5, 52.3, 54.5, 58.4, 61.8, 66.7, 69.9, 72.1,
+                       78.9, 79.2, 81.8, 80.9, 87.5, 99.2,  0.0,  0.0,  0.0,  0.0 };
+  float sigma3[60] = { 70.1, 73.6, 71.7, 66.9, 68.3, 66.8, 66.2, 64.8, 66.6, 63.3,
+                       63.3, 60.4, 59.0, 57.1, 56.4, 54.4, 54.2, 54.4, 50.3, 48.9,
+                       48.1, 41.9, 38.0, 31.8, 28.3, 23.1, 23.0, 20.3, 18.5, 17.6,
+                       17.7, 16.8, 18.3, 19.3, 19.0, 20.0, 20.9, 21.6, 22.0, 22.2,
+                       22.7, 22.4, 24.3, 24.8, 24.6, 27.0, 29.8, 37.0, 47.7, 49.3,
+                       58.2, 60.2, 66.8, 70.8, 77.3, 80.6,  0.0,  0.0,  0.0,  0.0 };
+  float sigma4[60] = {103.2,100.4,100.7,101.2,107.4,100.6,100.9,100.4, 96.3, 98.2,
+ 		       96.7, 94.5, 96.9, 91.7, 90.5, 89.5, 86.3, 90.6, 82.4, 89.3,
+		       87.3, 77.6, 75.7, 77.2, 77.3, 84.1, 80.1, 66.9, 73.7, 72.3,
+		       58.1, 65.6, 64.2, 54.7, 47.2, 44.4, 34.6, 36.4, 29.1, 25.8,
+	               18.8, 21.6, 18.6, 20.3, 22.7, 23.3, 24.1, 22.4, 24.7, 24.7,
+	               27.3, 30.4, 37.0, 46.4, 59.4, 62.6, 65.3,  0.0,  0.0,  0.0 };
+  float sigma5[60] = {150.9,139.7,133.9,139.8,141.4,134.9,138.4,129.3,137.9,128.7,
+                      132.4,130.1,124.2,115.8,131.4,115.2,128.7,112.8,130.7,129.0,
+                      115.8,101.3,115.9,116.1,121.7,109.9,110.0, 97.2, 96.4,107.3,
+	               98.2, 80.0, 73.2, 87.0, 97.0, 88.5, 72.2, 73.9, 80.8, 75.7,
+	               69.5, 67.1, 54.1, 58.9, 47.3, 50.6, 29.5, 26.6, 25.8, 20.9,
+	               20.6, 21.9, 22.1, 21.1, 27.9, 41.6,  0.0,  0.0,  0.0,  0.0 };
+
+  // Phi bins have 1 degree width, and cover 0-60 degrees
+  int phiBin = int(fabs(phi)/deg);
+
+  float sigma(0.);
+  if (phiBin<60) {
+    if (nstrip==1) sigma = sigma1[phiBin];
+    if (nstrip==2) sigma = sigma2[phiBin];
+    if (nstrip==3) sigma = sigma3[phiBin];
+    if (nstrip==4) sigma = sigma4[phiBin];
+    if (nstrip==5) sigma = sigma5[phiBin];
+  }
+  if (sigma<0.1) sigma = std::max(100.,float(nstrip)*80./sqrt(12));
+
+  return sigma * micrometer;
+}
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_entries.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_entries.cxx
new file mode 100755
index 00000000000..4df7ac15dfb
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_entries.cxx
@@ -0,0 +1,14 @@
+#include "GaudiKernel/DeclareFactoryEntries.h"
+#include "SiClusterOnTrackTool/PixelClusterOnTrackTool.h"
+#include "SiClusterOnTrackTool/SCT_ClusterOnTrackTool.h"
+
+DECLARE_NAMESPACE_TOOL_FACTORY(InDet, PixelClusterOnTrackTool)
+DECLARE_NAMESPACE_TOOL_FACTORY(InDet, SCT_ClusterOnTrackTool)
+
+DECLARE_FACTORY_ENTRIES(SiClusterOnTrackTool) {
+  DECLARE_NAMESPACE_TOOL(InDet, PixelClusterOnTrackTool)
+  DECLARE_NAMESPACE_TOOL(InDet, SCT_ClusterOnTrackTool)
+}
+
+
+
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_load.cxx b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_load.cxx
new file mode 100755
index 00000000000..f9e36344f64
--- /dev/null
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/src/components/SiClusterOnTrackTool_load.cxx
@@ -0,0 +1,4 @@
+#include "GaudiKernel/LoadFactoryEntries.h"
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+LOAD_FACTORY_ENTRIES(SiClusterOnTrackTool )
-- 
GitLab