From 47ed7b57da21ba936807c1d517aff55806c452ca Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Wed, 12 Oct 2016 14:41:15 +0200
Subject: [PATCH 01/18] PhysConf: ! 2016-10-12 - Vanya Belyaev  - add module
 python/PhysConf/Selections.py    It allows to provide "Selection" framework  
  with a bit more intuitive syntax:    now one needs to import selection
 objects fomr PhysConf.Selections    instead of a bit cryptic
 PhysSelPython.Wrappers

---
 Phys/PhysConf/CMakeLists.txt                |  3 +-
 Phys/PhysConf/cmt/requirements              |  3 +-
 Phys/PhysConf/doc/release.notes             |  9 ++
 Phys/PhysConf/python/PhysConf/Selections.py | 97 +++++++++++++++++++++
 4 files changed, 110 insertions(+), 2 deletions(-)
 create mode 100755 Phys/PhysConf/python/PhysConf/Selections.py

diff --git a/Phys/PhysConf/CMakeLists.txt b/Phys/PhysConf/CMakeLists.txt
index 2a3b7f7bb..ca34ccebd 100644
--- a/Phys/PhysConf/CMakeLists.txt
+++ b/Phys/PhysConf/CMakeLists.txt
@@ -10,7 +10,8 @@ gaudi_depends_on_subdirs(Calo/CaloPIDs
                          Muon/MuonDAQ
                          Muon/MuonID
                          Phys/LoKiCore
-                         Rec/GlobalReco)
+                         Rec/GlobalReco
+                         PhysSel/PhysSelPython)
 
 gaudi_install_python_modules()
 
diff --git a/Phys/PhysConf/cmt/requirements b/Phys/PhysConf/cmt/requirements
index c8e75345f..228dcdf62 100644
--- a/Phys/PhysConf/cmt/requirements
+++ b/Phys/PhysConf/cmt/requirements
@@ -24,9 +24,10 @@ use       LHCbAlgs    v* Kernel
 use       MuonDAQ     v* Muon
 use       MuonID      v* Muon
 use       LoKiCore    v* Phys
-use       DAQSys      v* DAQ
+use       DAQSys         v* DAQ
 use       RawEventFormat v*
 use       RawEventCompat v* DAQ
+use       PhysSelPython  v* PhysSel
 
 include_path      none
 
diff --git a/Phys/PhysConf/doc/release.notes b/Phys/PhysConf/doc/release.notes
index 17d95b4f3..6f559a99d 100644
--- a/Phys/PhysConf/doc/release.notes
+++ b/Phys/PhysConf/doc/release.notes
@@ -5,6 +5,15 @@
 ! Purpose     : Configuration for Phys project
 !-----------------------------------------------------------------------------
 
+! 2016-10-12 - Vanya Belyaev
+ - add python/PhysConf/Selections.py
+   It allows to provide "Selection" framework 
+   with a bit more intuitive syntax: 
+   now one needs to import selection objects fomr PhysConf.Selections 
+   instead of a bit cryptic PhysSelPython.Wrappers 
+   
+
+
 !========================= PhysConf v1r33 2016-04-11 =========================
 
 ! 2016-04-11 - Eduardo Rodrigues
diff --git a/Phys/PhysConf/python/PhysConf/Selections.py b/Phys/PhysConf/python/PhysConf/Selections.py
new file mode 100755
index 000000000..f405bd44c
--- /dev/null
+++ b/Phys/PhysConf/python/PhysConf/Selections.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# =============================================================================
+# $Id$ 
+# =============================================================================
+## @file PhysConf/Selections.py
+#  Collection of high-level blocks for ``Seelctions''-framework
+#
+#  Basic blocks: 
+# - AutomaticData            :  selection that gets data from TES (or Datra-On-Demand)
+# - MergedSelection          :  merge several selections into one ('OR'-mode)
+# - SelectionSequence        :  create the selection sequence 
+# - MultiSelectionSequence   :  create the sequence for several selections 
+#
+#  Derived blocks: 
+# - SimpleSelection          : create 1-step selection 
+# - FilterSelection          : selection with FilterDesktop    algorithm 
+# - CombineSelection         : selection with CombineParticles algorithm 
+# - Combine3BodySelection    : selection with DaVinci::N3BodyDecays algorithm 
+# - Combine4BodySelection    : selection with DaVinci::N4BodyDecays algorithm 
+# - TupleSelection           : selection with DecayTreeTuple algorithm 
+# - PrintSelection           : helper selection for debugging purposes
+# - LimitSelection           : limit selection 
+# - CheckPVSelection         : embed CheckPV algorithm into selectiton sequence 
+# - MomentumScaling          : insert momentum scaling into selectiton sequence
+#
+#  @author Juan  PALACIOS 
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#
+#                    $Revision$
+#  Last modification $Date$
+#                 by $Author$ 
+# =============================================================================
+""" Collection of high-level blocks for ``Selections''-framework:
+
+Basic blocks: 
+- AutomaticData            :  selection that gets data from TES (or Datra-On-Demand)
+- MergedSelection          :  merge several selections into one ('OR'-mode)
+- SelectionSequence        :  create the selection sequence 
+- MultiSelectionSequence   :  create the sequence for several selections 
+
+Derived blocks: 
+- SimpleSelection          : create 1-step selection 
+- FilterSelection          : selection with FilterDesktop    algorithm 
+- CombineSelection         : selection with CombineParticles algorithm 
+- Combine3BodySelection    : selection with DaVinci::N3BodyDecays algorithm 
+- Combine4BodySelection    : selection with DaVinci::N4BodyDecays algorithm 
+- TupleSelection           : selection with DecayTreeTuple algorithm 
+- PrintSelection           : helper selection for debugging purposes
+- LimitSelection           : limit selection 
+- CheckPVSelection         : embed CheckPV algorithm into selectiton sequence 
+- MomentumScaling          : insert momentum scaling into selectiton sequence 
+"""
+# =============================================================================
+__author__  = 'Juan PALACIOS, Vanya BELYAEV'
+__version__ = '$Revision$'
+__date__    = '2016-03-12'
+__all__     = ( 'AutomaticData'                 ,
+                'Selection'                     ,
+                'MergedSelection'               ,
+                'SelectionSequence'             ,
+                'MultiSelectionSequence'        ,
+                #
+                'SimpleSelection'               , 
+                'FilterSelection'               , 
+                'PrintSelection'                , 
+                'LimitSelection'                ,
+                'CombineSelection'              ,
+                'Combine3BodySelection'         ,
+                'Combine4BodySelection'         ,
+                'TupleSelection'                ,
+                ##
+                'CheckPVSelection'              ,  
+                ## 
+                'MomentumScaling' 
+                )
+# =============================================================================
+## import all blocks from wrappers 
+from PhysSelPython.Selections import *
+# =============================================================================
+
+
+# =============================================================================
+if '__main__' == __name__ :
+
+    print   80*'*'  
+    print  __doc__ 
+    print  ' Author  : %s ' %  __author__  
+    print  ' Version : %s ' %  __version__  
+    print  ' Date    : %s ' %  __date__   
+    print  ' Symbols : %s ' %  list ( __all__ )
+    print   80*'*'  
+ 
+# =============================================================================
+# The END 
+# =============================================================================
+
-- 
GitLab


From 73d88eba0653b7d5ea0dcefe2b4005df0e6abe8a Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Tue, 18 Oct 2016 22:52:19 +0200
Subject: [PATCH 02/18] Modernize LoKiPhys

* prefer implicit destructors over explicit trivial destructors
* do not explicitly disable default constructors which are not
  implicitly generated
* prefer override over virtual
* add final
* replace Particle2Track member data with functor
* remove obsolete SVN keywords
* prefer implicit copy constructors
* do not call default member constructors in constructors
---
 Phys/LoKiPhys/LoKi/Decays.h       |  21 --
 Phys/LoKiPhys/LoKi/Particles0.h   |  61 ++----
 Phys/LoKiPhys/LoKi/Particles1.h   |  10 -
 Phys/LoKiPhys/LoKi/Particles10.h  |  10 -
 Phys/LoKiPhys/LoKi/Particles11.h  |  16 --
 Phys/LoKiPhys/LoKi/Particles12.h  |  24 ---
 Phys/LoKiPhys/LoKi/Particles13.h  | 194 +++++++-----------
 Phys/LoKiPhys/LoKi/Particles14.h  |   5 -
 Phys/LoKiPhys/LoKi/Particles15.h  |   5 -
 Phys/LoKiPhys/LoKi/Particles17.h  |  16 --
 Phys/LoKiPhys/LoKi/Particles18.h  |  10 -
 Phys/LoKiPhys/LoKi/Particles19.h  |  26 ---
 Phys/LoKiPhys/LoKi/Particles27.h  |  15 +-
 Phys/LoKiPhys/LoKi/Particles28.h  |  24 +--
 Phys/LoKiPhys/LoKi/Particles29.h  |   5 -
 Phys/LoKiPhys/LoKi/Particles3.h   |  27 +--
 Phys/LoKiPhys/LoKi/Particles31.h  |  20 --
 Phys/LoKiPhys/LoKi/Particles32.h  |   5 -
 Phys/LoKiPhys/LoKi/Particles33.h  |  59 +-----
 Phys/LoKiPhys/LoKi/Particles34.h  |   4 -
 Phys/LoKiPhys/LoKi/Particles35.h  |  29 ---
 Phys/LoKiPhys/LoKi/Particles36.h  |  61 +-----
 Phys/LoKiPhys/LoKi/Particles37.h  |  88 +++------
 Phys/LoKiPhys/LoKi/Particles38.h  |  30 +--
 Phys/LoKiPhys/LoKi/Particles39.h  |  58 +-----
 Phys/LoKiPhys/LoKi/Particles4.h   |  20 --
 Phys/LoKiPhys/LoKi/Particles40.h  |  20 +-
 Phys/LoKiPhys/LoKi/Particles43.h  |   4 -
 Phys/LoKiPhys/LoKi/Particles44.h  |  10 +-
 Phys/LoKiPhys/LoKi/Particles45.h  |  10 +-
 Phys/LoKiPhys/LoKi/Particles5.h   | 313 ++++++++++++-----------------
 Phys/LoKiPhys/LoKi/Particles9.h   |   9 -
 Phys/LoKiPhys/LoKi/PhysExtract.h  |  22 +--
 Phys/LoKiPhys/src/Particles12.cpp |  53 ++---
 Phys/LoKiPhys/src/Particles13.cpp | 315 ++++++++++++++----------------
 Phys/LoKiPhys/src/Particles27.cpp |   6 +-
 Phys/LoKiPhys/src/Particles35.cpp |  23 ---
 Phys/LoKiPhys/src/Particles43.cpp |  36 +---
 Phys/LoKiPhys/src/Particles44.cpp |  35 +---
 Phys/LoKiPhys/src/Particles45.cpp |  29 +--
 Phys/LoKiPhys/src/Particles5.cpp  |  62 ------
 Phys/LoKiPhys/src/Particles9.cpp  |   3 +-
 42 files changed, 482 insertions(+), 1311 deletions(-)

diff --git a/Phys/LoKiPhys/LoKi/Decays.h b/Phys/LoKiPhys/LoKi/Decays.h
index 097e78358..fb06acf5d 100644
--- a/Phys/LoKiPhys/LoKi/Decays.h
+++ b/Phys/LoKiPhys/LoKi/Decays.h
@@ -76,8 +76,6 @@ namespace Decays
       Exclusive
       ( const Decays::Decay&       decay                  , 
         const Alg                  alg        = Daughters ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~Exclusive () {}
       // ====================================================================
     public:
       // ====================================================================
@@ -191,11 +189,6 @@ namespace Decays
       inline bool mother ( const LHCb::ParticleID& pid ) const 
       { return m_mother.node ( pid ) ;  }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      Exclusive () ;                     // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// The mother 
@@ -243,8 +236,6 @@ namespace Decays
         const Alg                  alg        = Daughters ) ;
       /// constructor from exclusive decay 
       Inclusive ( const Exclusive& right ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~Inclusive () {}
       // ====================================================================
     public:
       // ====================================================================
@@ -281,11 +272,6 @@ namespace Decays
       Inclusive& operator+= ( const LHCb::ParticleProperty*    node ) 
       { addDaughter ( node ) ; return *this ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      Inclusive () ;                     // the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
     /** @class Optional
@@ -324,8 +310,6 @@ namespace Decays
       Optional 
       ( const Exclusive& right                  , 
         const TreeList&  optional = TreeList () ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~Optional () {}
       // ====================================================================
     public:
       // ====================================================================
@@ -403,11 +387,6 @@ namespace Decays
       size_t                   optSize  () const { return m_optional.size  () ; }
       size_t nOptional() const { return optSize() ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      Optional () ;                      // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// the optional particles in the tree 
diff --git a/Phys/LoKiPhys/LoKi/Particles0.h b/Phys/LoKiPhys/LoKi/Particles0.h
index adb98d38b..8f3a06197 100644
--- a/Phys/LoKiPhys/LoKi/Particles0.h
+++ b/Phys/LoKiPhys/LoKi/Particles0.h
@@ -154,11 +154,6 @@ namespace LoKi
       const  std::string& location () const { return m_location ; }
       /// operation mode flag
       inline bool         fullpath () const{ return m_fullpath ; }
-    private:
-      // ======================================================================
-      // the default constructor is disabled
-      InTES() ;
-      // ======================================================================
     private:
       // ======================================================================
       std::string m_location ;
@@ -521,11 +516,11 @@ namespace LoKi
       /// Default Contructor
       MomentumY() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual MomentumY* clone() const ;
+      MomentumY* clone() const override;
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
+      std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
     };
     // ========================================================================
@@ -543,11 +538,11 @@ namespace LoKi
       /// Default Contructor
       MomentumZ() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual MomentumZ* clone() const ;
+      MomentumZ* clone() const override;
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
+      std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
     };
     // ========================================================================
@@ -569,11 +564,11 @@ namespace LoKi
       /// Default Contructor
       PseudoRapidity() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual PseudoRapidity* clone() const ;
+      PseudoRapidity* clone() const override;
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
+      std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
       /// get eta
       double eta ( argument                    p ) const
@@ -611,11 +606,11 @@ namespace LoKi
       /// Default Contructor
       Rapidity() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual Rapidity* clone() const ;
+      Rapidity* clone() const override;
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
+      std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
     };
     // ========================================================================
@@ -636,11 +631,11 @@ namespace LoKi
       /// Default Contructor
       Rapidity0() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual Rapidity0* clone() const ;
+      Rapidity0* clone() const override;
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
+      std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
     };
     // ========================================================================
@@ -658,11 +653,11 @@ namespace LoKi
       /// Default Contructor
       Phi() : AuxFunBase{ std::tie() } { }
       /// clone method (mandatory!)
-      virtual Phi* clone() const { return new Phi ( *this ) ; }
+      Phi* clone() const override { return new Phi ( *this ) ; }
       /// the only one essential method
-      result_type operator() ( argument p ) const ;
+      result_type operator() ( argument p ) const  override;
       /// the specific printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
+      std::ostream& fillStream( std::ostream& s ) const override
       { return s << "PHI" ; }
       // ======================================================================
     public:
@@ -871,11 +866,6 @@ namespace LoKi
       /// get the mass
       double m0() const { return m_mass ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled
-      DeltaMass();                           // default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// the reference mass
@@ -1068,11 +1058,6 @@ namespace LoKi
       /// specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled
-      DeltaMeasuredMassChi2();
-      // ======================================================================
     };
     // ========================================================================
     /** @class DeltaMassChi2
@@ -1350,11 +1335,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled
-      TransverseMomentumRel ( ) ;
-      // ======================================================================
     public:
       // ======================================================================
       /// get the momentum
@@ -1505,11 +1485,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      Cov2 () ;                          // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       unsigned short m_i ;
diff --git a/Phys/LoKiPhys/LoKi/Particles1.h b/Phys/LoKiPhys/LoKi/Particles1.h
index c9bef9b2d..ba473e86a 100644
--- a/Phys/LoKiPhys/LoKi/Particles1.h
+++ b/Phys/LoKiPhys/LoKi/Particles1.h
@@ -365,11 +365,6 @@ namespace LoKi
       size_t size  () const { return m_fun.size  () ;  }
       bool   empty () const { return m_fun.empty () ;  }
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is disabled 
-      MinVertexDistance () ;
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor itself 
@@ -437,11 +432,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled 
-      MinVertexChi2Distance () ;
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor 
diff --git a/Phys/LoKiPhys/LoKi/Particles10.h b/Phys/LoKiPhys/LoKi/Particles10.h
index e666068b3..aa746e915 100644
--- a/Phys/LoKiPhys/LoKi/Particles10.h
+++ b/Phys/LoKiPhys/LoKi/Particles10.h
@@ -102,11 +102,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // The default costructor is disabled 
-      HasTracksFromPV();
-      // ======================================================================
     } ;
     // ========================================================================    
     /** @class HasTracksInTreeFromPV 
@@ -185,11 +180,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // The defualt costructor is disabled 
-      HasTracksInTreeFromPV();
-      // ======================================================================
     } ;
     // ========================================================================    
   } //                                               end of namespace Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles11.h b/Phys/LoKiPhys/LoKi/Particles11.h
index 2546fbdfa..e37ff9fb4 100644
--- a/Phys/LoKiPhys/LoKi/Particles11.h
+++ b/Phys/LoKiPhys/LoKi/Particles11.h
@@ -112,12 +112,6 @@ namespace LoKi
       bool inList ( const LHCb::Particle* p ) const ;
       bool inTree ( const LHCb::Particle* p ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // The default costructor is disabled 
-      // ======================================================================
-      IsAParticle();
-      // ======================================================================
     } ;
     // ========================================================================    
     /** @class IsAParticleInTree
@@ -188,11 +182,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // The defualt costructor is disabled 
-      IsAParticleInTree();
-      // ======================================================================
     } ;
     // ========================================================================    
     /** @class IsAParticleFromTree
@@ -262,11 +251,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // The defualt costructor is disabled 
-      IsAParticleFromTree();
-      // ======================================================================
     } ;
     // ========================================================================    
   } // end of namespace                                         LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles12.h b/Phys/LoKiPhys/LoKi/Particles12.h
index cc74d0a21..eac21f893 100644
--- a/Phys/LoKiPhys/LoKi/Particles12.h
+++ b/Phys/LoKiPhys/LoKi/Particles12.h
@@ -54,8 +54,6 @@ namespace LoKi
       // ======================================================================
       /// constructor form the index in ProtoParticle::ExtraInfo
       ProtoHasInfo ( int index ) ;
-      /// copy constructor 
-      ProtoHasInfo ( const ProtoHasInfo& right ) ;
       /// clone method (mandatory!)
       virtual  ProtoHasInfo* clone() const { return new ProtoHasInfo(*this) ; }    
       /// the only one essential method 
@@ -63,11 +61,6 @@ namespace LoKi
       /// the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // default contructor is disabled 
-      ProtoHasInfo() ;
-      // ======================================================================
     private :
       // ======================================================================
       /// index in ProtoParticle::ExtraInfo 
@@ -110,8 +103,6 @@ namespace LoKi
       ProtoInfo 
       ( const int    key , 
         const double def ) ;
-      /// copy constructor 
-      ProtoInfo ( const ProtoInfo& right ) ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  ProtoInfo* clone() const { return new ProtoInfo(*this); }
       /// MANDATORY: the only one essential method 
@@ -119,11 +110,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      ProtoInfo();
-      // ======================================================================
     private:
       // ======================================================================
       /// index in ProtoParticle::ExtraInfo
@@ -366,11 +352,6 @@ namespace LoKi
       /// the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // default contructor is disabled 
-      TrackHasInfo() ;
-      // ======================================================================
     private :
       // ======================================================================
       /// index in Track::ExtraInfo 
@@ -422,11 +403,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      TrackInfo();  // the default constructor is disabled 
-      // ======================================================================
     private:
       // =======================================================================
       /// index in Track::ExtraInfo
diff --git a/Phys/LoKiPhys/LoKi/Particles13.h b/Phys/LoKiPhys/LoKi/Particles13.h
index 6a3673f98..62e66ec78 100644
--- a/Phys/LoKiPhys/LoKi/Particles13.h
+++ b/Phys/LoKiPhys/LoKi/Particles13.h
@@ -1,47 +1,47 @@
 // ============================================================================
-#ifndef LOKI_PARTICLES13_H 
+#ifndef LOKI_PARTICLES13_H
 #define LOKI_PARTICLES13_H 1
 // ============================================================================
 // Include files
 // ============================================================================
-// LoKiPhys 
+// LoKiPhys
 // ============================================================================
 #include "LoKi/PhysTypes.h"
 // ============================================================================
-namespace LHCb { class State ; }  
+namespace LHCb { class State ; }
 // ============================================================================
 /** @file
  *
- *  This file is a part of LoKi project - 
+ *  This file is a part of LoKi project -
  *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
  *
  *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
+ *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
+ *  contributions and advices from G.Raven, J.van Tilburg,
  *  A.Golutvin, P.Koppenburg have been used in the design.
  *
  *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- *  @date 2006-02-23 
+ *  @date 2006-02-23
  */
 // ============================================================================
 namespace LoKi
 {
   // ==========================================================================
-  namespace Particles 
+  namespace Particles
   {
     // ========================================================================
-    /** @class TrackChi2 
+    /** @class TrackChi2
      *  The trivial funtion which evaluates LHCb::Track::chi2
      *
      *  @see LHCb::Particle
      *  @see LHCb::Track
-     *  @see LHCb::Track::chi2 
-     *  @see LoKi::Cuts::TRCHI2 
+     *  @see LHCb::Track::chi2
+     *  @see LoKi::Cuts::TRCHI2
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackChi2
+    class GAUDI_API TrackChi2 final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -50,19 +50,14 @@ namespace LoKi
       TrackChi2() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
       virtual  TrackChi2* clone() const { return new TrackChi2(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
-    // ========================================================================    
-    /** @class TrackChi2PerDoF 
+    // ========================================================================
+    /** @class TrackChi2PerDoF
      *  The trivial funtion which evaluates LHCb::Track::chi2PerDoF
      *
      *  @see LHCb::Particle
@@ -71,9 +66,9 @@ namespace LoKi
      *  @see LoKi::Cuts::TRCHI2DOF
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackChi2PerDoF 
+    class GAUDI_API TrackChi2PerDoF final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -81,50 +76,40 @@ namespace LoKi
       /// Default Constructor
       TrackChi2PerDoF() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackChi2PerDoF* clone() const 
+      virtual  TrackChi2PerDoF* clone() const
       { return new TrackChi2PerDoF(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
     // ========================================================================
-    /** @class TrackChi2Prob 
-     *  The trivial function whcih evaluates the track's 
+    /** @class TrackChi2Prob
+     *  The trivial function whcih evaluates the track's
      *  \f$\chi^2\f$-probability.
      *
-     *  The GSL routine <c>gsl_cdf_chisq_Q</c> is used for evaluation 
+     *  The GSL routine <c>gsl_cdf_chisq_Q</c> is used for evaluation
      *  @see LHCb::Track
-     *  @see LoKi::TRPCHI2 
+     *  @see LoKi::TRPCHI2
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2008-04-10
      */
-    class GAUDI_API TrackChi2Prob 
+    class GAUDI_API TrackChi2Prob final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
       // ======================================================================
       /// Default Constructor
       TrackChi2Prob() : AuxFunBase{ std::tie() } {}
-      /// MANDATORY: clone method ("virtual constructor") 
-      virtual  TrackChi2Prob* clone () const 
+      /// MANDATORY: clone method ("virtual constructor")
+      virtual  TrackChi2Prob* clone () const
       { return new TrackChi2Prob ( *this ) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the extractor of tracks: 
-      LoKi::Extract::Particle2Track m_track ; // the extractor of tracks 
-      // ======================================================================        
     };
     // ========================================================================
     /** @class TrackHasState
@@ -136,35 +121,26 @@ namespace LoKi
      *  @see LoKi::Cuts::HASSTATE
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackHasState
-      : public LoKi::BasicFunctors<const LHCb::Particle*>::Predicate 
+    class GAUDI_API TrackHasState final
+      : public LoKi::BasicFunctors<const LHCb::Particle*>::Predicate
     {
     public:
       // ======================================================================
-      /// constructor from the state location 
+      /// constructor from the state location
       TrackHasState ( const LHCb::State::Location location ) ;
-      /// copy constructor
-      TrackHasState ( const TrackHasState& right ) ;
       /// MANDATORY: clone method ("vitual constructor")
       virtual  TrackHasState* clone() const
       { return new TrackHasState(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
     private:
       // ======================================================================
-      // the default constructor is disabled 
-      TrackHasState();
-      // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // location of the state 
+      // location of the state
       LHCb::State::Location m_location ;
       // ======================================================================
     } ;
@@ -175,13 +151,13 @@ namespace LoKi
      *  @see LHCb::Particle
      *  @see LHCb::Track
      *  @see LHCb::Track::Type
-     *  @see LHCb::Track::type 
+     *  @see LHCb::Track::type
      *  @see LoKi::Cuts::TRTYPE
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackType
+    class GAUDI_API TrackType final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -189,18 +165,13 @@ namespace LoKi
       /// Default Constructor
       TrackType() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackType* clone() const 
+      virtual  TrackType* clone() const
       { return new TrackType(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
     // ========================================================================
     /** @class TrackHistory
@@ -213,9 +184,9 @@ namespace LoKi
      *  @see LoKi::Cuts::TRHISTORY
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackHistory 
+    class GAUDI_API TrackHistory final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -223,18 +194,13 @@ namespace LoKi
       /// Default Constructor
       TrackHistory() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackHistory* clone() const 
+      virtual  TrackHistory* clone() const
       { return new TrackHistory(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
     // ========================================================================
     /** @class TrackHistoryFit
@@ -247,9 +213,9 @@ namespace LoKi
      *  @see LoKi::Cuts::TRHISTFIT
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackHistoryFit
+    class GAUDI_API TrackHistoryFit final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -257,20 +223,15 @@ namespace LoKi
       /// Default Constructor
       TrackHistoryFit() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackHistoryFit* clone() const 
+      virtual  TrackHistoryFit* clone() const
       { return new TrackHistoryFit(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
-    // ========================================================================    
+    // ========================================================================
     /** @class TrackStatus
      *  The trivial function which evaluates LHCb::Track::status
      *
@@ -281,9 +242,9 @@ namespace LoKi
      *  @see LoKi::Cuts::TRSTATUS
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-23 
+     *  @date 2006-02-23
      */
-    class GAUDI_API TrackStatus
+    class GAUDI_API TrackStatus final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -291,28 +252,23 @@ namespace LoKi
       /// Default Constructor
       TrackStatus() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackStatus* clone() const 
+      virtual  TrackStatus* clone() const
       { return new TrackStatus(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;
-      // ======================================================================
     };
     // ========================================================================
-    /** @class GhostProbability 
+    /** @class GhostProbability
      *  The trivial function which evaluates "ghost probability"
      *  @see LoKi::Cuts::TRGHOSTPROB
      *  @see LoKi::Cuts::TRGP
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2009-10-02
      */
-    class GAUDI_API GhostProbability 
+    class GAUDI_API GhostProbability final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -320,18 +276,13 @@ namespace LoKi
       /// Default Constructor
       GhostProbability() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  GhostProbability* clone() const 
+      virtual  GhostProbability* clone() const
       { return new GhostProbability(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;                // track extractor 
-      // ======================================================================
     };
     // ========================================================================
     /** @class Track Likelihood
@@ -341,7 +292,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2009-10-02
      */
-    class GAUDI_API TrackLikelihood
+    class GAUDI_API TrackLikelihood final
       : public LoKi::BasicFunctors<const LHCb::Particle*>::Function
     {
     public:
@@ -349,25 +300,20 @@ namespace LoKi
       /// Default Constructor
       TrackLikelihood() : AuxFunBase{ std::tie() } {}
       /// MANDATORY: clone method ("vitual constructor")
-      virtual  TrackLikelihood* clone() const 
+      virtual  TrackLikelihood* clone() const
       { return new TrackLikelihood(*this); }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL:  the specific printout 
+      /// OPTIONAL:  the specific printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// extractor of the track from the partice 
-      LoKi::Extract::Particle2Track m_track ;                // track extractor 
-      // ======================================================================
     };
     // ========================================================================
   } //                                         end of namespace LoKi::Particles
   // ==========================================================================
 } //                                                      end of namespace LoKi
 // ============================================================================
-// The END 
+// The END
 // ============================================================================
 #endif // LOKI_PARTICLES12_H
 // ============================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles14.h b/Phys/LoKiPhys/LoKi/Particles14.h
index eb5c63401..8883ba31b 100644
--- a/Phys/LoKiPhys/LoKi/Particles14.h
+++ b/Phys/LoKiPhys/LoKi/Particles14.h
@@ -65,11 +65,6 @@ namespace LoKi
       /// OPTIONAL: specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      DecayAngle();
-      // ======================================================================
     private:
       // ======================================================================
       // index of the daughter particle
diff --git a/Phys/LoKiPhys/LoKi/Particles15.h b/Phys/LoKiPhys/LoKi/Particles15.h
index 76fa586db..0075f0b93 100644
--- a/Phys/LoKiPhys/LoKi/Particles15.h
+++ b/Phys/LoKiPhys/LoKi/Particles15.h
@@ -62,11 +62,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled
-      Filter () ;                            // default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// the tool itself 
diff --git a/Phys/LoKiPhys/LoKi/Particles17.h b/Phys/LoKiPhys/LoKi/Particles17.h
index 4dfa8e201..30734e758 100644
--- a/Phys/LoKiPhys/LoKi/Particles17.h
+++ b/Phys/LoKiPhys/LoKi/Particles17.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES17_H 
 #define LOKI_PARTICLES17_H 1
@@ -87,11 +86,6 @@ namespace LoKi
       double dphi ( argument p ) const 
       { return adjust ( phi ( p ) - phi0 () ) ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DeltaPhi ();
-      // ======================================================================
     private:
       // ======================================================================
       /// the angle itself 
@@ -149,11 +143,6 @@ namespace LoKi
       /// get delta eta
       double deta ( argument p ) const { return eta ( p ) - eta0() ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DeltaEta (); // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the angle itself 
@@ -213,11 +202,6 @@ namespace LoKi
       /// get delta eta
       double deta ( argument p ) const { return m_deta.deta ( p ); }
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DeltaR2 () ;
-      // ======================================================================
     private:
       // ======================================================================
       /// the actual evaluator of delta eta
diff --git a/Phys/LoKiPhys/LoKi/Particles18.h b/Phys/LoKiPhys/LoKi/Particles18.h
index 11916ff02..4e2d4ed82 100644
--- a/Phys/LoKiPhys/LoKi/Particles18.h
+++ b/Phys/LoKiPhys/LoKi/Particles18.h
@@ -45,11 +45,6 @@ namespace LoKi
       /// the specific printout
       std::ostream& fillStream( std::ostream& s ) const override ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled
-      HasInfo();
-      // ======================================================================
     };
     // ========================================================================
     /** @class Info
@@ -78,11 +73,6 @@ namespace LoKi
       /// the specific printout
       std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled
-      Info();
-      // ======================================================================
     };
     // ========================================================================
   } //                                         end of namepsace LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles19.h b/Phys/LoKiPhys/LoKi/Particles19.h
index 0afae41ad..83535ba04 100644
--- a/Phys/LoKiPhys/LoKi/Particles19.h
+++ b/Phys/LoKiPhys/LoKi/Particles19.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES19_H 
 #define LOKI_PARTICLES19_H 1
@@ -119,11 +118,6 @@ namespace LoKi
       /// evaluate the lifetime error 
       result_type lifeTimeError      ( argument p ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      LifeTime () ; // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// the lifetime fitter itself
@@ -182,11 +176,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      LifeTimeChi2 () ; // the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
     /** @class LifeTimeSignedChi2 
@@ -242,11 +231,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      LifeTimeSignedChi2 () ; // the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
     /** @class LifeTimeFitChi2 
@@ -295,11 +279,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      LifeTimeFitChi2 () ; ///< the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
     /** @class LifeTimeErorr
@@ -346,11 +325,6 @@ namespace LoKi
       virtual std::ostream& fillStream ( std::ostream& s ) const 
       { return s << "LTIMEERR" ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      LifeTimeError () ; ///< the default constructor is disabled
-      // ======================================================================
     };
    // =========================================================================
   } //                                         end of namespace LoKi::Particles 
diff --git a/Phys/LoKiPhys/LoKi/Particles27.h b/Phys/LoKiPhys/LoKi/Particles27.h
index 563ad4aad..a8288bcc4 100644
--- a/Phys/LoKiPhys/LoKi/Particles27.h
+++ b/Phys/LoKiPhys/LoKi/Particles27.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES27_H 
 #define LOKI_PARTICLES27_H 1
@@ -69,11 +68,6 @@ namespace LoKi
       void setFitter ( const LoKi::Interface<IParticleReFitter>& fitter ) const 
       { m_fitter = fitter ; }
       // ======================================================================      
-    private:
-      // ======================================================================
-      /// the defaut constructor is disabled 
-      ReFit() ;                          // the defaut constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the refitter itself 
@@ -148,11 +142,6 @@ namespace LoKi
       void setFitter ( const LoKi::Interface<IMassFit>& fitter ) const 
       { m_fitter = fitter ; }
       // ======================================================================      
-    private:
-      // ======================================================================
-      /// the defaut constructor is disabled 
-      MassFit() ;                         // the defaut constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the refitter itself 
@@ -188,7 +177,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::ReFit                                     REFIT_ ;
+    using REFIT_ =LoKi::Particles::ReFit;
     // ========================================================================
     /** @typedef MFIT_
      *  Simple predicate to perform mass-constained fit fo particle candidate 
@@ -219,7 +208,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::MassFit                                    MFIT_ ;
+    using MFIT_ = LoKi::Particles::MassFit;
     // ========================================================================
   } //                                              end of namespace LoKi::Cuts 
   // ==========================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles28.h b/Phys/LoKiPhys/LoKi/Particles28.h
index ab316899f..1823bf7dd 100644
--- a/Phys/LoKiPhys/LoKi/Particles28.h
+++ b/Phys/LoKiPhys/LoKi/Particles28.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES28_H 
 #define LOKI_PARTICLES28_H 1
@@ -36,8 +35,6 @@ namespace LoKi
       // ======================================================================
       /// constructor from the tool name 
       ReFitter ( const std::string& name ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~ReFitter(){} ;
       /// MANDATORY: clone method ("virtual constructor") 
       virtual  ReFitter* clone() const { return new ReFitter ( *this ) ; }
       /// MANDATORY: the only one essential method 
@@ -45,11 +42,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the defautl constructor is disabled 
-      ReFitter() ;                       // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the refitter name 
@@ -79,8 +71,6 @@ namespace LoKi
       /// constructor from the tool name 
       MassFitter ( const std::string& name      , 
                    const double       mass      ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~MassFitter(){} ;
       /// MANDATORY: clone method ("virtual constructor") 
       virtual  MassFitter* clone() const { return new MassFitter ( *this ) ; }
       /// MANDATORY: the only one essential method 
@@ -121,7 +111,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::ReFitter                                   REFIT ;
+    using REFIT = LoKi::Particles::ReFitter;
     // ========================================================================
     /** @typedef REFITTER
      *  Simple predicate to perform the re=-fit of particle candidate 
@@ -141,10 +131,10 @@ namespace LoKi
      *  @see LoKi::Particle::ReFit 
      *  @see LoKi::Cuts::REFIT_
      *  @see LoKi::Cuts::REFIT
-     *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
+     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::ReFitter                                REFITTER ;
+    using REFITTER = LoKi::Particles::ReFitter ;
     // ========================================================================
     /** @var MFIT
      *  Simple predicate to perform mass-constained fit fo particle candidate 
@@ -164,7 +154,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    const LoKi::Particles::MassFitter                                    MFIT ;
+    const auto MFIT = LoKi::Particles::MassFitter{};
     // ========================================================================
     /** @typedef MFITTER
      *  Simple predicate to perform mass-constained fit fo particle candidate 
@@ -185,10 +175,10 @@ namespace LoKi
      *  @see LoKi::Particle::MFIT
      *  @see LoKi::Particle::MASSFIT
      *  @see LoKi::Particle::MassFit 
-     *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
+     *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::MassFitter                               MFITTER ;
+    using MFITTER = LoKi::Particles::MassFitter;
     // ========================================================================
     /** @typedef MASSFIT
      *  Simple predicate to perform mass-constained fit fo particle candidate 
@@ -212,7 +202,7 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date   2009-04-30
      */ 
-    typedef LoKi::Particles::MassFitter                               MASSFIT ;
+    using MASSFIT = LoKi::Particles::MassFitter;
     // ========================================================================
   } //                                              end of namespace LoKi::Cuts 
   // ==========================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles29.h b/Phys/LoKiPhys/LoKi/Particles29.h
index edef8e563..670654fd9 100644
--- a/Phys/LoKiPhys/LoKi/Particles29.h
+++ b/Phys/LoKiPhys/LoKi/Particles29.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES29_H 
 #define LOKI_PARTICLES29_H 1
@@ -28,10 +27,6 @@
  *  
  *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
  *  @date   2009-04-30
- * 
- *                    $Revision$
- *  Last modification $Date$
- *                 by $Author$
  *                    
  */
 // ============================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles3.h b/Phys/LoKiPhys/LoKi/Particles3.h
index 76b1cbdf1..60604dde1 100644
--- a/Phys/LoKiPhys/LoKi/Particles3.h
+++ b/Phys/LoKiPhys/LoKi/Particles3.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES3_H 
 #define LOKI_PARTICLES3_H 1
@@ -109,11 +108,6 @@ namespace LoKi
       void setParticle( const LHCb::Particle* value ) const 
       { m_particle = value ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is private 
-      ClosestApproach();
-      // ======================================================================
     protected:
       // ======================================================================
       /// the particle 
@@ -138,9 +132,8 @@ namespace LoKi
      *  @date 2003-03-17
      *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
      */
-    class GAUDI_API ClosestApproachChi2 : public ClosestApproach 
+    struct GAUDI_API ClosestApproachChi2 : ClosestApproach 
     {
-    public:
       // ======================================================================
       /// constructor from the particle and the tool  
       ClosestApproachChi2 
@@ -159,11 +152,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is private 
-      ClosestApproachChi2();
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class MinClosestApproach
@@ -252,11 +240,6 @@ namespace LoKi
       /// the actual evaluation
       result_type chi2     ( argument p ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is private 
-      MinClosestApproach(); /// default constructor is private 
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::Particles::ClosestApproach m_fun ;
@@ -279,9 +262,8 @@ namespace LoKi
      *  @date 2003-03-17
      *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
      */
-    class GAUDI_API MinClosestApproachChi2 : public MinClosestApproach 
+    struct GAUDI_API MinClosestApproachChi2 : MinClosestApproach 
     {
-    public:
       // ======================================================================
       /// constructor from the particle(s) and the tool  
       MinClosestApproachChi2 
@@ -334,11 +316,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is private 
-      MinClosestApproachChi2();               // default constructor is private 
-      // ======================================================================
     } ;    
     // ========================================================================
   } //                                         end of namespace LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles31.h b/Phys/LoKiPhys/LoKi/Particles31.h
index 5da08adf0..c60b930e5 100644
--- a/Phys/LoKiPhys/LoKi/Particles31.h
+++ b/Phys/LoKiPhys/LoKi/Particles31.h
@@ -47,11 +47,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      PCutA() ;                          // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       // the actual predicate
@@ -93,11 +88,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      PFunA() ;                          // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       // the actual functors
@@ -137,11 +127,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      PCutV() ;                          // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       // the actual predicate
@@ -181,11 +166,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      PFunV() ;                          // the default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       // the actual functors
diff --git a/Phys/LoKiPhys/LoKi/Particles32.h b/Phys/LoKiPhys/LoKi/Particles32.h
index 33974ea2e..015fc07bf 100644
--- a/Phys/LoKiPhys/LoKi/Particles32.h
+++ b/Phys/LoKiPhys/LoKi/Particles32.h
@@ -38,11 +38,6 @@ namespace LoKi
       /// OPTIONAL: the nice string representation 
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      BestPrimaryVertexAdaptor () ;      // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the actual vertex-functor 
diff --git a/Phys/LoKiPhys/LoKi/Particles33.h b/Phys/LoKiPhys/LoKi/Particles33.h
index 459d84382..d82b64d99 100644
--- a/Phys/LoKiPhys/LoKi/Particles33.h
+++ b/Phys/LoKiPhys/LoKi/Particles33.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES33_H
 #define LOKI_PARTICLES33_H 1
@@ -94,11 +93,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      PolarizationAngle () ; // the default constructor is disabled
-      // ======================================================================
     protected:
       // ======================================================================
       /// get the proper decay components
@@ -215,11 +209,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      SinChi () ;                        // the default constructor is disabled
-      // ======================================================================
     protected:
       // ======================================================================
       /// get the proper decay components
@@ -288,9 +277,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
      *  @date 2010-02-21
      */
-    class GAUDI_API CosChi : public SinChi
+    struct GAUDI_API CosChi : SinChi
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       CosChi ( const LoKi::Child::Selector& particle1 ,
@@ -325,11 +313,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      CosChi () ;                        // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class AngleChi
@@ -349,9 +332,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
      *  @date 2010-02-21
      */
-    class GAUDI_API AngleChi : public CosChi
+    struct GAUDI_API AngleChi : CosChi
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       AngleChi ( const LoKi::Child::Selector& particle1 ,
@@ -386,11 +368,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      AngleChi () ;                      // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class CosThetaTr
@@ -426,9 +403,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-06-02
      */
-    class GAUDI_API CosThetaTr : public AngleChi
+    struct GAUDI_API CosThetaTr : AngleChi
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       CosThetaTr ( const LoKi::Child::Selector& particle1 ,
@@ -463,11 +439,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      CosThetaTr () ;                    // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class SinPhiTr
@@ -512,9 +483,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-06-02
      */
-    class GAUDI_API SinPhiTr : public CosThetaTr
+    struct GAUDI_API SinPhiTr : CosThetaTr
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       SinPhiTr ( const LoKi::Child::Selector& particle1 ,
@@ -549,11 +519,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      SinPhiTr () ;                    // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class CosPhiTr
@@ -575,9 +540,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-06-02
      */
-    class GAUDI_API CosPhiTr : public SinPhiTr
+    struct GAUDI_API CosPhiTr : SinPhiTr
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       CosPhiTr ( const LoKi::Child::Selector& particle1 ,
@@ -612,11 +576,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      CosPhiTr () ;                      // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class AnglePhiTr
@@ -638,9 +597,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-06-02
      */
-    class GAUDI_API AnglePhiTr : public CosPhiTr
+    struct GAUDI_API AnglePhiTr : CosPhiTr
     {
-    public:
       // ======================================================================
       /// constructor from child-selector
       AnglePhiTr ( const LoKi::Child::Selector& particle1 ,
@@ -675,11 +633,6 @@ namespace LoKi
       /// OPTIONAL: the nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      AnglePhiTr () ;                    // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
   } //                                         end of namespace LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles34.h b/Phys/LoKiPhys/LoKi/Particles34.h
index f0fae5cf8..f4fa63168 100644
--- a/Phys/LoKiPhys/LoKi/Particles34.h
+++ b/Phys/LoKiPhys/LoKi/Particles34.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES34_H 
 #define LOKI_PARTICLES34_H 1
@@ -21,9 +20,6 @@
  *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
  *  @date 2010-05-15
  *   
- *                    $Revision$
- *  Last modifictaion $Date$
- *                 by $Author$
  */
 // ============================================================================
 //                                                                      The END 
diff --git a/Phys/LoKiPhys/LoKi/Particles35.h b/Phys/LoKiPhys/LoKi/Particles35.h
index 93097c4f2..76f8178ac 100644
--- a/Phys/LoKiPhys/LoKi/Particles35.h
+++ b/Phys/LoKiPhys/LoKi/Particles35.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES35_H 
 #define LOKI_PARTICLES35_H 1
@@ -39,8 +38,6 @@ namespace LoKi
       /// constructor from protoparticle-function
       ProtoPFun 
       ( const LoKi::BasicFunctors<const LHCb::ProtoParticle*>::Function& fun ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~ProtoPFun() ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  ProtoPFun* clone() const ;
       /// MANDATORY: the only one essential method 
@@ -48,11 +45,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      ProtoPFun () ;                    // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor itself 
@@ -77,8 +69,6 @@ namespace LoKi
       /// constructor from protoparticle-function
       ProtoPCut
       ( const LoKi::BasicFunctors<const LHCb::ProtoParticle*>::Predicate& cut ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~ProtoPCut() ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  ProtoPCut* clone() const ;
       /// MANDATORY: the only one essential method 
@@ -86,11 +76,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      ProtoPCut () ;                    // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor itself 
@@ -117,8 +102,6 @@ namespace LoKi
       /// constructor from protoparticle-function
       TrackFun 
       ( const LoKi::BasicFunctors<const LHCb::Track*>::Function& fun ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~TrackFun() ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  TrackFun* clone() const ;
       /// MANDATORY: the only one essential method 
@@ -126,11 +109,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      TrackFun () ;                    // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor itself 
@@ -155,8 +133,6 @@ namespace LoKi
       /// constructor from protoparticle-function
       TrackCut 
       ( const LoKi::BasicFunctors<const LHCb::Track*>::Predicate& cut ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~TrackCut() ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  TrackCut* clone() const ;
       /// MANDATORY: the only one essential method 
@@ -164,11 +140,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      TrackCut () ;                    // the default constructor is disabled 
-      // ======================================================================
     private:
       // ======================================================================
       /// the functor itself 
diff --git a/Phys/LoKiPhys/LoKi/Particles36.h b/Phys/LoKiPhys/LoKi/Particles36.h
index 862963ffe..fe160466a 100644
--- a/Phys/LoKiPhys/LoKi/Particles36.h
+++ b/Phys/LoKiPhys/LoKi/Particles36.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES36_H
 #define LOKI_PARTICLES36_H 1
@@ -171,11 +170,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      DecayTreeFitterFun () ;             // the default constrctor is disabled
-      // ======================================================================
     protected:
       // ======================================================================
       /// use related primary vertex in the fit ?
@@ -321,11 +315,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      DecayTreeFitterCut () ;             // the default constrctor is disabled
-      // ======================================================================
     protected:
       // ======================================================================
       /// use related primary vertex in the fit ?
@@ -436,11 +425,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      ChildCTau () ;                      // the default constrctor is disabled
-      // ======================================================================
     protected:
       // ======================================================================
       /// get the child selector 
@@ -482,9 +466,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date 2010-06-03
      */     
-    class GAUDI_API ChildCTauErr : public ChildCTau 
+    struct GAUDI_API ChildCTauErr : ChildCTau 
     {
-    public:
       // ======================================================================
       /// constructor from child selector & PV-flag & constraints 
       ChildCTauErr
@@ -557,11 +540,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      ChildCTauErr () ;                  // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class ChildCTauSignificance
@@ -577,9 +555,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date 2010-06-03
      */     
-    class GAUDI_API ChildCTauSignificance : public ChildCTauErr 
+    struct GAUDI_API ChildCTauSignificance : ChildCTauErr 
     {
-    public:
       // ======================================================================
       /// constructor from child selector & PV-flag & constraints 
       ChildCTauSignificance
@@ -652,11 +629,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      ChildCTauSignificance () ;         // the default constructor is disabled
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class DecayTreeFitChi2
@@ -689,11 +661,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DecayTreeFitChi2 () ;              // the default constructor is disabled 
-      // ======================================================================
     public:
       // ======================================================================
       /// get chi2 of decay tree fit 
@@ -718,9 +685,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date 2010-06-08
      */     
-    class GAUDI_API DecayTreeFitNDoF : public DecayTreeFitChi2
+    struct GAUDI_API DecayTreeFitNDoF : DecayTreeFitChi2
     {
-    public: 
       // ======================================================================
       /// constructor from PV-flag & vector of constraints  
       DecayTreeFitNDoF
@@ -740,11 +706,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DecayTreeFitNDoF () ;              // the default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class DecayTreeFitChi2PerNDoF
@@ -756,9 +717,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date 2010-06-08
      */     
-    class GAUDI_API DecayTreeFitChi2NDoF : public DecayTreeFitNDoF
+    struct GAUDI_API DecayTreeFitChi2NDoF : DecayTreeFitNDoF
     {
-    public: 
       // ======================================================================
       /// constructor from PV-flag & vector of constraints  
       DecayTreeFitChi2NDoF
@@ -778,11 +738,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DecayTreeFitChi2NDoF () ;          // the default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class DecayTreeFitProb
@@ -793,9 +748,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
      *  @date 2010-06-08
      */     
-    class GAUDI_API DecayTreeFitProb : public DecayTreeFitChi2NDoF
+    struct GAUDI_API DecayTreeFitProb : DecayTreeFitChi2NDoF
     {
-    public: 
       // ======================================================================
       /// constructor from PV-flag & vector of constraints  
       DecayTreeFitProb
@@ -813,11 +767,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual  std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      DecayTreeFitProb () ;              // the default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
   } //                                         end of namespace LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles37.h b/Phys/LoKiPhys/LoKi/Particles37.h
index dce78ed03..52ee04473 100644
--- a/Phys/LoKiPhys/LoKi/Particles37.h
+++ b/Phys/LoKiPhys/LoKi/Particles37.h
@@ -63,17 +63,16 @@ namespace LoKi
      *  @author Roel Aaij
      *  @date   2010-06-18
      */
-    class GAUDI_API DecayLengthSignificance 
-      : public LoKi::BasicFunctors< const LHCb::Particle* >::Function
-      , public LoKi::Vertices::VertexHolder 
+    struct GAUDI_API DecayLengthSignificance 
+      : LoKi::BasicFunctors< const LHCb::Particle* >::Function
+      , LoKi::Vertices::VertexHolder 
     {
-    public:
       // ======================================================================
       /// constructor from a vertex
       DecayLengthSignificance ( const LHCb::VertexBase* vertex );
       /// constructor from a point
       DecayLengthSignificance ( const LoKi::Point3D& vertex );
-      /// copy constructor
+      /// constructor from VertexHolder
       DecayLengthSignificance ( const LoKi::Vertices::VertexHolder& base );
       /// MANDATORY: clone method ("virtual constructor")
       virtual DecayLengthSignificance* clone() const;
@@ -84,10 +83,6 @@ namespace LoKi
       /// OPTIONAL: nice printout
       virtual std::ostream& fillStream( std::ostream& stream ) const;
       // ======================================================================
-    private:
-      // ======================================================================
-      DecayLengthSignificance();
-      // ======================================================================
     };
     // ========================================================================
     /** @class DecayLengthSignificanceDV
@@ -109,11 +104,10 @@ namespace LoKi
      *  @author Roel Aaij
      *  @date   2010-05-07
      */
-    class GAUDI_API DecayLengthSignificanceDV
-      : public         DecayLengthSignificance
-      , public virtual LoKi::AuxDesktopBase
+    struct GAUDI_API DecayLengthSignificanceDV
+      : DecayLengthSignificance
+      , virtual LoKi::AuxDesktopBase
     {
-    public:
       // ======================================================================
       /// basic constructor
       DecayLengthSignificanceDV();
@@ -136,9 +130,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API PathDistance : public LoKi::Particles::ImpPar 
+    struct GAUDI_API PathDistance : LoKi::Particles::ImpPar 
     {
-    public:
       // ======================================================================
       /// constructor from the primary vertex & tool 
       PathDistance 
@@ -153,11 +146,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// The default constructor is disabled 
-      PathDistance() ;                   // The default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class PathDistanceChi2
@@ -168,9 +156,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API PathDistanceChi2 : public LoKi::Particles::PathDistance 
+    struct GAUDI_API PathDistanceChi2 : LoKi::Particles::PathDistance 
     {
-    public:
       // ======================================================================
       /// constructor from the primary vertex & tool 
       PathDistanceChi2 
@@ -185,11 +172,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// The default constructor is disabled 
-      PathDistanceChi2 () ;              // The default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class PathDistanceSignificance
@@ -202,10 +184,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API PathDistanceSignificance 
-      : public LoKi::Particles::PathDistanceChi2
+    struct GAUDI_API PathDistanceSignificance 
+      : LoKi::Particles::PathDistanceChi2
     {
-    public:
       // ======================================================================
       /// constructor from the primary vertex & tool 
       PathDistanceSignificance
@@ -220,11 +201,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// The default constructor is disabled 
-      PathDistanceSignificance () ;      // The default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class ProjDistance
@@ -234,9 +210,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API ProjectedDistance : public LoKi::Particles::PathDistance 
+    struct GAUDI_API ProjectedDistance : LoKi::Particles::PathDistance 
     {
-    public:
       // ======================================================================
       /// constructor from the primary vertex & tool 
       ProjectedDistance 
@@ -251,11 +226,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// The default constructor is disabled 
-      ProjectedDistance () ;             // The default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class ProjectedDistanceSignificance
@@ -265,10 +235,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API ProjectedDistanceSignificance 
-      : public LoKi::Particles::ProjectedDistance
+    struct GAUDI_API ProjectedDistanceSignificance 
+      : LoKi::Particles::ProjectedDistance
     {
-    public:
       // ======================================================================
       /// constructor from the primary vertex & tool 
       ProjectedDistanceSignificance 
@@ -283,11 +252,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// The default constructor is disabled 
-      ProjectedDistanceSignificance () ; // The default constructor is disabled 
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class PathDistanceWithBestPV
@@ -299,10 +263,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API PathDistanceWithBestPV
-      : public LoKi::Particles::ImpParWithTheBestPV  
+    struct GAUDI_API PathDistanceWithBestPV
+      : LoKi::Particles::ImpParWithTheBestPV  
     {
-    public:
       // ======================================================================
       /// constructor from tool nickname 
       PathDistanceWithBestPV ( const std::string& geo = "" )  ;
@@ -323,10 +286,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class PathDistanceChi2WithBestPV 
-      : public LoKi::Particles::PathDistanceWithBestPV 
+    struct PathDistanceChi2WithBestPV : LoKi::Particles::PathDistanceWithBestPV
     {
-    public:
       // ======================================================================
       /// constructor from tool nickname 
       PathDistanceChi2WithBestPV ( const std::string& geo = "" )  ;
@@ -347,10 +308,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API PathDistanceSignificanceWithBestPV 
-      : public LoKi::Particles::PathDistanceChi2WithBestPV 
+    struct GAUDI_API PathDistanceSignificanceWithBestPV 
+      : LoKi::Particles::PathDistanceChi2WithBestPV 
     {
-    public:
       // ======================================================================
       /// constructor from tool nickname 
       PathDistanceSignificanceWithBestPV ( const std::string& geo = "" )  ;
@@ -370,10 +330,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API ProjectedDistanceWithBestPV 
-      : public LoKi::Particles::PathDistanceWithBestPV
+    struct GAUDI_API ProjectedDistanceWithBestPV 
+      : LoKi::Particles::PathDistanceWithBestPV
     {
-    public:
       // ======================================================================
       /// constructor from tool nickname 
       ProjectedDistanceWithBestPV ( const std::string& geo = "" )  ;
@@ -394,10 +353,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2010-10-23
      */
-    class GAUDI_API ProjectedDistanceSignificanceWithBestPV 
-      : public LoKi::Particles::ProjectedDistanceWithBestPV
+    struct GAUDI_API ProjectedDistanceSignificanceWithBestPV 
+      :  LoKi::Particles::ProjectedDistanceWithBestPV
     {
-    public:
       // ======================================================================
       /// constructor from tool nickname 
       ProjectedDistanceSignificanceWithBestPV ( const std::string& geo = "" )  ;
diff --git a/Phys/LoKiPhys/LoKi/Particles38.h b/Phys/LoKiPhys/LoKi/Particles38.h
index 857375148..2aab16c6b 100644
--- a/Phys/LoKiPhys/LoKi/Particles38.h
+++ b/Phys/LoKiPhys/LoKi/Particles38.h
@@ -47,11 +47,10 @@ namespace LoKi
      *  @date   2010-10-23
      */
     // ========================================================================
-    class GAUDI_API PtFlight
-      : public  LoKi::Particles::TransverseMomentumRel  
-      , public  LoKi::Vertices::VertexHolder    
+    struct GAUDI_API PtFlight
+      : LoKi::Particles::TransverseMomentumRel  
+      , LoKi::Vertices::VertexHolder    
     {
-    public:
       // ======================================================================
       /** constructor from the primary vertex
        *  @param pv  the primary vertex 
@@ -76,11 +75,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled 
-      PtFlight ( ) ;
-      // ======================================================================
     public:
       // ======================================================================
       /** evaluate the transverse momentum versus the flight direction 
@@ -134,9 +128,8 @@ namespace LoKi
      *  @date   2010-10-23
      */
     // ========================================================================
-    class GAUDI_API MCorrected : public  LoKi::Particles::PtFlight  
+    struct GAUDI_API MCorrected : LoKi::Particles::PtFlight  
     {
-    public:
       // ======================================================================
       /** constructor from the primary vertex
        *  @param pv  the primary vertex 
@@ -161,11 +154,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       std::ostream& fillStream( std::ostream& s ) const override;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled 
-      MCorrected ( ) ;
-      // ======================================================================
     } ;
     // ========================================================================
     /** @class PtFlightWithBestVertex 
@@ -176,11 +164,10 @@ namespace LoKi
      *  @thanks Mike Williams
      */
     // ========================================================================
-    class GAUDI_API PtFlightWithBestVertex 
-      : public          LoKi::Particles::PtFlight 
-      , public virtual  LoKi::AuxDesktopBase 
+    struct GAUDI_API PtFlightWithBestVertex 
+      :          LoKi::Particles::PtFlight 
+      , virtual  LoKi::AuxDesktopBase 
     {
-    public: 
       // =====================================================================
       /// constructor 
       PtFlightWithBestVertex();
@@ -212,9 +199,8 @@ namespace LoKi
      *  @thanks Mike Williams
      */
     // ========================================================================
-    class GAUDI_API MCorrectedWithBestVertex : public PtFlightWithBestVertex 
+    struct GAUDI_API MCorrectedWithBestVertex : PtFlightWithBestVertex 
     {
-    public: 
       // =====================================================================
       /// constructor 
       MCorrectedWithBestVertex() : AuxFunBase{ std::tie() } { }
diff --git a/Phys/LoKiPhys/LoKi/Particles39.h b/Phys/LoKiPhys/LoKi/Particles39.h
index 89e54b878..8f8b12df7 100644
--- a/Phys/LoKiPhys/LoKi/Particles39.h
+++ b/Phys/LoKiPhys/LoKi/Particles39.h
@@ -60,11 +60,6 @@ namespace LoKi
       /// MANDATORY: the only essential method
       virtual result_type operator() ( argument p ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinMaxDistance () ;                // the default constructor is disabled 
-      // ======================================================================
     protected:
       // ======================================================================
       double distance 
@@ -104,11 +99,6 @@ namespace LoKi
       /// MANDATORY: the only essential method
       virtual result_type operator() ( argument p ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinMaxDistanceWithSource () ;      // the default constructor is disabled 
-      // ======================================================================
     protected:
       // ======================================================================
       typedef LoKi::BasicFunctors<const LHCb::Particle*>::Source   iSource ;
@@ -130,9 +120,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MinDR2 : public MinMaxDistanceWithSource
+    struct MinDR2 : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MinDR2
@@ -152,11 +141,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinDR2 () ;                        // the default constructor is disabled 
-      // ======================================================================
     };
     // ========================================================================
     /** @class MaxDR2 
@@ -166,9 +150,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MaxDR2 : public MinMaxDistanceWithSource
+    struct MaxDR2 : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MaxDR2
@@ -188,11 +171,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MaxDR2 () ;                        // the default constructor is disabled 
-      // ======================================================================
     };
     // ======================================================================
     /** @class MinKL 
@@ -202,9 +180,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MinKL : public MinMaxDistanceWithSource
+    struct MinKL : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MinKL
@@ -224,11 +201,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinKL () ;                        // the default constructor is disabled 
-      // ======================================================================
     };
     // ========================================================================
     /** @class MinAngle 
@@ -239,9 +211,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MinAngle : public MinMaxDistanceWithSource
+    struct MinAngle : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MinAngle
@@ -261,11 +232,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinAngle () ;                      // the default constructor is disabled 
-      // ======================================================================
     };
     // ========================================================================
     /** @class MinM2 
@@ -275,9 +241,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MinM2 : public MinMaxDistanceWithSource
+    struct MinM2 : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MinM2
@@ -297,11 +262,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MinM2 () ;                        // the default constructor is disabled 
-      // ======================================================================
     };
     // ========================================================================
     /** @class MaxIDs 
@@ -311,9 +271,8 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.BElyaev@itep.ru
      *  @date 2012-01-18
      */
-    class MaxIDs : public MinMaxDistanceWithSource
+    struct MaxIDs : MinMaxDistanceWithSource
     {
-    public:
       // ======================================================================
       /// constructor from the source 
       MaxIDs
@@ -333,11 +292,6 @@ namespace LoKi
       /// OPTIONAL: nice printout 
       virtual std::ostream& fillStream ( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      MaxIDs () ;                        // the default constructor is disabled 
-      // ======================================================================
     };
   } //                                         end of namespace LoKi::Particles
   // ==========================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles4.h b/Phys/LoKiPhys/LoKi/Particles4.h
index e18904fe4..e5487a1e1 100644
--- a/Phys/LoKiPhys/LoKi/Particles4.h
+++ b/Phys/LoKiPhys/LoKi/Particles4.h
@@ -135,11 +135,6 @@ namespace LoKi
        */
       double     projected ( argument p        ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is private 
-      ImpPar(); // default constructor is private 
-      // ======================================================================
     };
     // ========================================================================    
     /** @class ImpParChi2
@@ -202,11 +197,6 @@ namespace LoKi
       virtual std::ostream& fillStream ( std::ostream& s ) const 
       { return s <<  "IPCHI2" ; }
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is private 
-      ImpParChi2() ; // default constructor is private 
-      // ======================================================================
     };
     // ========================================================================    
     /** @class MinImpPar
@@ -370,11 +360,6 @@ namespace LoKi
       /// the actual evaluator 
       result_type mipchi2 ( argument p ) const ;
       // ======================================================================
-    private:
-      /// ===================================================================== 
-      // default constructor is private 
-      MinImpPar();
-      /// ===================================================================== 
     };
     // ========================================================================
     /** @class MinImpParChi2
@@ -525,11 +510,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout 
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is private 
-      MinImpParChi2();
-      // ======================================================================
     };
     // ========================================================================    
   } //                                         end of namespace LoKi::Particles
diff --git a/Phys/LoKiPhys/LoKi/Particles40.h b/Phys/LoKiPhys/LoKi/Particles40.h
index 51bb12d91..eb8f689ea 100644
--- a/Phys/LoKiPhys/LoKi/Particles40.h
+++ b/Phys/LoKiPhys/LoKi/Particles40.h
@@ -50,10 +50,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
      *  @date 2012-02-27
      */
-    class GAUDI_API SmartInfo
-      : public LoKi::ExtraInfo::GetSmartInfo<const LHCb::Particle*>
+    struct GAUDI_API SmartInfo
+      : LoKi::ExtraInfo::GetSmartInfo<const LHCb::Particle*>
     {
-    public:
       // ======================================================================
       /** constructor from fuction, key and update-flag
        *  @param index the key in LHCb::Particle::extraInfo table
@@ -78,11 +77,6 @@ namespace LoKi
       /// the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      SmartInfo();                       // the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
   } //                                         End of namespace LoKi::Particles
@@ -108,10 +102,9 @@ namespace LoKi
      *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
      *  @date 2012-02-27
      */
-    class GAUDI_API SmartInfo
-      : public LoKi::ExtraInfo::GetSmartInfo<const LHCb::VertexBase*>
+    struct GAUDI_API SmartInfo
+      : LoKi::ExtraInfo::GetSmartInfo<const LHCb::VertexBase*>
     {
-    public:
       // ======================================================================
       /** constructor from fuction, key and update-flag
        *  @param index the key in LHCb::Particle::extraInfo table
@@ -136,11 +129,6 @@ namespace LoKi
       /// the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled
-      SmartInfo();                       // the default constructor is disabled
-      // ======================================================================
     };
     // ========================================================================
   } //                                          End of namespace LoKi::Vertices
diff --git a/Phys/LoKiPhys/LoKi/Particles43.h b/Phys/LoKiPhys/LoKi/Particles43.h
index e4de5ddf0..2e338943b 100644
--- a/Phys/LoKiPhys/LoKi/Particles43.h
+++ b/Phys/LoKiPhys/LoKi/Particles43.h
@@ -48,8 +48,6 @@ namespace LoKi
         const LHCb::Particle::Range& parts  = LHCb::Particle::Range()   , 
         const double                 init   = 0                         ) ;
       // ======================================================================
-      /// MANDATORY: virtual destructor 
-      virtual ~SumInR2Cone () ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  SumInR2Cone* clone() const ;
       /// MANDATORY: the only essential method
@@ -111,8 +109,6 @@ namespace LoKi
         const LoKi::BasicFunctors<const LHCb::Particle*>::Predicate& cut     =
         LoKi::BasicFunctors<const LHCb::Particle*>::BooleanConstant( true )   , 
         const double                                                 init    = 0 ) ;
-      /// MANDATORY : virtual destructor 
-      virtual ~SumInR2ConeWithSource () ;
       /// MANDATORY : clone method ("virtual constructor")
       virtual  SumInR2ConeWithSource* clone () const ;
       /// MANDATORY: the only essential method
diff --git a/Phys/LoKiPhys/LoKi/Particles44.h b/Phys/LoKiPhys/LoKi/Particles44.h
index af54d07b2..152e2f1e8 100644
--- a/Phys/LoKiPhys/LoKi/Particles44.h
+++ b/Phys/LoKiPhys/LoKi/Particles44.h
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 #ifndef LOKI_PARTICLES44_H 
 #define LOKI_PARTICLES44_H 1
@@ -51,11 +50,11 @@ namespace LoKi
     public:
       // ======================================================================
       /// constructor from the tool name 
-      Value ( const std::string&      tool ) ;
+      Value ( const std::string&     tool ) ;
       /// constructor from the tool 
       Value ( const IParticleValue*  tool ) ;
       /// copy constructor
-      Value ( const Value& right ) ;
+      Value ( const Value& right ) = default;
       /// MANDATORY: virtual destructor
       virtual ~Value() ;
       /// MANDATORY: clone method ("virtual constructor")
@@ -65,11 +64,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      /// default constructor is disabled
-      Value () ;                            // default constructor is disabled
-      // ======================================================================
     private:
       // ======================================================================
       /// the tool itself 
diff --git a/Phys/LoKiPhys/LoKi/Particles45.h b/Phys/LoKiPhys/LoKi/Particles45.h
index 7d9b9393b..21e30f2dc 100644
--- a/Phys/LoKiPhys/LoKi/Particles45.h
+++ b/Phys/LoKiPhys/LoKi/Particles45.h
@@ -63,10 +63,6 @@ namespace LoKi
       RelatedInfo ( const std::string& location        , 
                     const std::string& variable        , 
                     const double       bad     = -1000 ) ;
-      /// copy constructor  
-      RelatedInfo ( const RelatedInfo& ) ;
-      /// MANDATORY: virtual destructor
-      virtual ~RelatedInfo () ;
       /// MANDATORY: clone method ("virtual constructor")
       virtual  RelatedInfo* clone() const ;
       /// MANDATORY: the only one essential method 
@@ -74,10 +70,6 @@ namespace LoKi
       /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      RelatedInfo () ;
-      // ======================================================================
     private:
       // ======================================================================
       std::string m_location ;
@@ -85,7 +77,7 @@ namespace LoKi
       double      m_bad      ;
       // ======================================================================
       typedef IRelation<LHCb::Particle,LHCb::RelatedInfoMap>  IMAP ;
-      mutable const IMAP*  m_table   ;
+      mutable const IMAP*  m_table = nullptr  ;
       // ======================================================================
     };
     // ========================================================================    
diff --git a/Phys/LoKiPhys/LoKi/Particles5.h b/Phys/LoKiPhys/LoKi/Particles5.h
index 757ddcbb9..e41d774f1 100644
--- a/Phys/LoKiPhys/LoKi/Particles5.h
+++ b/Phys/LoKiPhys/LoKi/Particles5.h
@@ -1,175 +1,153 @@
-// $Id$
 // ============================================================================
-#ifndef LOKI_PARTICLES5_H 
+#ifndef LOKI_PARTICLES5_H
 #define LOKI_PARTICLES5_H 1
 // ============================================================================
 // Include files
 // ============================================================================
-// LoKiCore 
+// LoKiCore
 // ============================================================================
 #include "LoKi/Constants.h"
 // ============================================================================
-// LoKiPhys 
+// LoKiPhys
 // ============================================================================
 #include "LoKi/PhysTypes.h"
 // ============================================================================
 /** @file
  *
- *  This file is a part of LoKi project - 
+ *  This file is a part of LoKi project -
  *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
  *
  *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
+ *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
+ *  contributions and advices from G.Raven, J.van Tilburg,
  *  A.Golutvin, P.Koppenburg have been used in the design.
  *
  *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- *  @date 2006-02-20 
+ *  @date 2006-02-20
  */
 // ============================================================================
 namespace LoKi
 {
   // ==========================================================================
-  namespace Particles 
+  namespace Particles
   {
     // ========================================================================
     /** @class InTree
-     *  The trivial predicate which evaluates to true 
-     *  if there is at least one particle in the decay 
-     *  tree of the given particle which satisfies the 
+     *  The trivial predicate which evaluates to true
+     *  if there is at least one particle in the decay
+     *  tree of the given particle which satisfies the
      *  certain criteria
      *
-     *  The function uses the algorithm LoKi::PhysAlgs::found 
+     *  The function uses the algorithm LoKi::PhysAlgs::found
      *
-     *  @see LoKi::PhysAlgs::found 
-     *  @see LoKi::Cuts::INTREE 
+     *  @see LoKi::PhysAlgs::found
+     *  @see LoKi::Cuts::INTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API InTree : public LoKi::PhysTypes::Cuts 
+    class GAUDI_API InTree : public LoKi::PhysTypes::Cuts
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param cut cut to be applied 
+      /** standard constructor
+       *  @param cut cut to be applied
        */
       InTree  ( const LoKi::PhysTypes::Cuts& cut ) ;
-      /// copy constructor 
-      InTree  ( const InTree& right ) ;
       /// MANDATORY: clone function ("virtual constructor")
       virtual  InTree*       clone() const { return new InTree(*this) ;}
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // default constructor is disabled 
-      InTree () ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Cut m_cut ;
       // ======================================================================
     };
-    // ========================================================================    
+    // ========================================================================
     /** @class NinTree
-     *  The simple funtion which evaluates the number 
-     *  of particle in decay tree which satisfies the certan criteria 
-     * 
-     *  The function uses the algorithm LoKi::PhysAlgs::count_if 
+     *  The simple funtion which evaluates the number
+     *  of particle in decay tree which satisfies the certain criteria
      *
-     *  @see LoKi::PhysAlgs::count_if 
-     *  @see LoKi::Cuts::NINTREE 
+     *  The function uses the algorithm LoKi::PhysAlgs::count_if
+     *
+     *  @see LoKi::PhysAlgs::count_if
+     *  @see LoKi::Cuts::NINTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API NinTree : public LoKi::PhysTypes::Func 
+    class GAUDI_API NinTree : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param cut cut to be applied 
+      /** standard constructor
+       *  @param cut cut to be applied
        */
       NinTree  ( const LoKi::PhysTypes::Cuts& cut ) ;
-      /// copy constructor 
-      NinTree  ( const NinTree& right ) ;
       /// MANDATORY: clone function (virtual destructor)
       virtual  NinTree* clone() const { return new NinTree(*this) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      NinTree () ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Cut m_cut ;
       // ======================================================================
     };
-    // ========================================================================    
+    // ========================================================================
     /** @class SumTree
      *
-     *  The simple function which accumulated the 
-     *  value of certain function over the decay 
-     *  tree of the particle for the articles which 
+     *  The simple function which accumulated the
+     *  value of certain function over the decay
+     *  tree of the particle for the articles which
      *  satisfy the certain selection criteria
      *  Accumulation is done throught summation
      *
      *  The function uses the algorithm LoKi::PhysAlgs::accumulate
      *
      *  @see LoKi::PhysAlgs::accumulate
-     *  @see LoKi::Cuts::SUMTREE 
+     *  @see LoKi::Cuts::SUMTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API SumTree : public LoKi::PhysTypes::Func 
+    class GAUDI_API SumTree : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       SumTree
       ( const LoKi::PhysTypes::Func& fun       ,
         const LoKi::PhysTypes::Cuts& cut       ,
         const double                 res = 0.0 ) ;
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       SumTree
       ( const LoKi::PhysTypes::Cuts& cut       ,
         const LoKi::PhysTypes::Func& fun       ,
         const double                 res = 0.0 ) ;
-      /// copy constructor 
-      SumTree ( const SumTree& right ) ;
       /// MANDATORY: clone function (virtual destructor)
       virtual  SumTree* clone() const { return new SumTree(*this) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      SumTree() ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Fun m_fun ;
@@ -180,57 +158,50 @@ namespace LoKi
     // ========================================================================
     /** @class MultTree
      *
-     *  The simple function which accumulated the 
-     *  value of certain function over the decay 
-     *  tree of the particle for the articles which 
+     *  The simple function which accumulated the
+     *  value of certain function over the decay
+     *  tree of the particle for the articles which
      *  satisfy the certain selection criteria
      *  Accumulation is done throught summation
      *
      *  The function uses the algorithm LoKi::PhysAlgs::multiplicate
      *
      *  @see LoKi::PhysAlgs::multuplicate
-     *  @see LoKi::Cuts::MULTTREE 
+     *  @see LoKi::Cuts::MULTTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API MultTree : public LoKi::PhysTypes::Func 
+    class GAUDI_API MultTree : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MultTree
       ( const LoKi::PhysTypes::Func& fun       ,
         const LoKi::PhysTypes::Cuts& cut       ,
         const double                 res = 1.0 ) ;
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MultTree
       ( const LoKi::PhysTypes::Cuts& cut       ,
         const LoKi::PhysTypes::Func& fun       ,
         const double                 res = 1.0 ) ;
-      /// copy constructor 
-      MultTree ( const MultTree& right ) ;
       /// MANDATORY: clone function (virtual destructor)
       virtual  MultTree* clone() const { return new MultTree(*this) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      MultTree() ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Fun m_fun ;
@@ -241,58 +212,51 @@ namespace LoKi
     // ========================================================================
     /** @class MinTree
      *
-     *  The trivial algorithm which scans the decay 
-     *  tree of the particle and searches for the the 
+     *  The trivial algorithm which scans the decay
+     *  tree of the particle and searches for the the
      *  minimal value for some functions for
-     *  particles which satisfy the certain criteria 
+     *  particles which satisfy the certain criteria
      *
-     *  The function uses the algorithm LoKi::PhysAlgs::min_value 
+     *  The function uses the algorithm LoKi::PhysAlgs::min_value
      *
-     *  @see LoKi::PhysAlgs::min_value  
-     *  @see LoKi::Cuts::MINTREE 
+     *  @see LoKi::PhysAlgs::min_value
+     *  @see LoKi::Cuts::MINTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API MinTree : public LoKi::PhysTypes::Func 
+    class GAUDI_API MinTree : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MinTree
       ( const LoKi::PhysTypes::Func& fun  ,
         const LoKi::PhysTypes::Cuts& cut  ,
-        const double                 res  = 
+        const double                 res  =
         LoKi::Constants::PositiveInfinity ) ;
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MinTree
       ( const LoKi::PhysTypes::Cuts& cut ,
         const LoKi::PhysTypes::Func& fun ,
-        const double                 res = 
+        const double                 res =
         LoKi::Constants::PositiveInfinity ) ;
-      /// copy constructor 
-      MinTree ( const MinTree& right ) ;
       /// MANDATORY: clone function (virtual destructor)
       virtual  MinTree* clone() const { return new MinTree(*this) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      MinTree() ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Fun m_fun ;
@@ -303,58 +267,51 @@ namespace LoKi
     // ========================================================================
     /** @class MinTree
      *
-     *  The trivial algorithm which scans the decay 
-     *  tree of the particle and searches for the the 
+     *  The trivial algorithm which scans the decay
+     *  tree of the particle and searches for the the
      *  minimal value for some functions for
-     *  particles which satisfy the certain criteria 
+     *  particles which satisfy the certain criteria
      *
-     *  The function uses the algorithm LoKi::PhysAlgs::max_value 
+     *  The function uses the algorithm LoKi::PhysAlgs::max_value
      *
-     *  @see LoKi::PhysAlgs::max_value  
-     *  @see LoKi::Cuts::MAXTREE 
+     *  @see LoKi::PhysAlgs::max_value
+     *  @see LoKi::Cuts::MAXTREE
      *  @see LHCb::Particle
      *
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2004-05-05
      */
-    class GAUDI_API MaxTree : public LoKi::PhysTypes::Func 
+    class GAUDI_API MaxTree : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MaxTree
       ( const LoKi::PhysTypes::Func& fun  ,
         const LoKi::PhysTypes::Cuts& cut  ,
-        const double                 res  = 
+        const double                 res  =
         LoKi::Constants::NegativeInfinity ) ;
-      /** standard constructor 
-       *  @param fun the function to be evaluated 
-       *  @param cut cut to be applied 
-       *  @param res initial value 
+      /** standard constructor
+       *  @param fun the function to be evaluated
+       *  @param cut cut to be applied
+       *  @param res initial value
        */
       MaxTree
       ( const LoKi::PhysTypes::Cuts& cut ,
         const LoKi::PhysTypes::Func& fun ,
-        const double                 res = 
+        const double                 res =
         LoKi::Constants::NegativeInfinity ) ;
-      /// copy constructor 
-      MaxTree ( const MaxTree& right ) ;
       /// MANDATORY: clone function (virtual destructor)
       virtual  MaxTree* clone() const { return new MaxTree(*this) ; }
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual  result_type   operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      MaxTree() ;
-      // ======================================================================
     private:
       // ======================================================================
       LoKi::PhysTypes::Fun m_fun ;
@@ -363,103 +320,93 @@ namespace LoKi
       // ======================================================================
     };
     // ========================================================================
-    /** @class InGeneration 
+    /** @class InGeneration
      *
      *  Simple meta-functor which checks the presence of the certain particles
      *  at the given level of decay tree structure.
-     *  
+     *
      *  The concept belongs to Patrick KOPPENBURG (Patrick.Koppenburg@cern.ch)
      *
      *  @see LoKi::Cuts::INGENERATION
-     *  @see LoKi::Algs::find_if 
+     *  @see LoKi::Algs::find_if
      *
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2008-03-28
      */
-    class GAUDI_API InGeneration : public LoKi::PhysTypes::Cuts 
+    class GAUDI_API InGeneration : public LoKi::PhysTypes::Cuts
     {
     public:
       // ======================================================================
       /// the constructor from the predicate and the generation level
-      InGeneration 
-      ( const LoKi::PhysTypes::Cuts& cut   , 
-        const unsigned int           level ) ;      
-      /// the constructor from the generation level and the prediate 
-      InGeneration 
+      InGeneration
+      ( const LoKi::PhysTypes::Cuts& cut   ,
+        const unsigned int           level ) ;
+      /// the constructor from the generation level and the prediate
+      InGeneration
       ( const unsigned int           level ,
         const LoKi::PhysTypes::Cuts& cut   ) ;
       /// MANDATORY: clone method ("virtual constructor") ;
       virtual  InGeneration* clone () const ;
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
     private:
       // ======================================================================
-      /// the default constructor is disabled 
-      InGeneration(); // the default constructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the predicate to be checked 
+      /// the predicate to be checked
       LoKi::PhysTypes::Cut  m_cut   ; // the predicate to be checked
-      /// the generation level 
-      unsigned int          m_level ; // the generation level 
+      /// the generation level
+      unsigned int          m_level ; // the generation level
       // ======================================================================
     };
     // ========================================================================
-    /** @class NinGeneration 
+    /** @class NinGeneration
      *
      *  Simple meta-functor which checks the presence of the certain particles
      *  at the given level of decay tree structure.
-     *  
+     *
      *  The concept belongs to Patrick KOPPENBURG (Patrick.Koppenburg@cern.ch)
      *
      *  @see LoKi::Cuts::NINGENERATION
-     *  @see LoKi::Algs::count_if 
+     *  @see LoKi::Algs::count_if
      *
      *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
      *  @date 2008-03-28
      */
-    class GAUDI_API NinGeneration : public LoKi::PhysTypes::Func 
+    class GAUDI_API NinGeneration : public LoKi::PhysTypes::Func
     {
     public:
       // ======================================================================
       /// the constructor from the predicate and the generation level
-      NinGeneration 
-      ( const LoKi::PhysTypes::Cuts& cut   , 
-        const unsigned int           level ) ;      
-      /// the constructor from the generation level and the prediate 
-      NinGeneration 
+      NinGeneration
+      ( const LoKi::PhysTypes::Cuts& cut   ,
+        const unsigned int           level ) ;
+      /// the constructor from the generation level and the prediate
+      NinGeneration
       ( const unsigned int           level ,
         const LoKi::PhysTypes::Cuts& cut   ) ;
       /// MANDATORY: clone method ("virtual constructor") ;
       virtual  NinGeneration* clone () const ;
-      /// MANDATORY: the only one essential method 
+      /// MANDATORY: the only one essential method
       virtual result_type operator() ( argument p ) const ;
-      /// OPTIONAL: the specific printout 
+      /// OPTIONAL: the specific printout
       virtual std::ostream& fillStream( std::ostream& s ) const ;
       // ======================================================================
     private:
       // ======================================================================
-      /// the default constructor is disabled 
-      NinGeneration(); // the default constructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the predicate to be checked 
+      /// the predicate to be checked
       LoKi::PhysTypes::Cut  m_cut   ; // the predicate to be checked
-      /// the generation level 
-      unsigned int          m_level ; // the generation level 
+      /// the generation level
+      unsigned int          m_level ; // the generation level
       // ======================================================================
     };
-    // ========================================================================    
+    // ========================================================================
   } //                                         end of namespace LoKi::Particles
   // ==========================================================================
 } //                                                      end of namespace LoKi
 // ============================================================================
-//                                                                      The END 
+//                                                                      The END
 // ============================================================================
 #endif // LOKI_PARTICLES4_H
 // ============================================================================
diff --git a/Phys/LoKiPhys/LoKi/Particles9.h b/Phys/LoKiPhys/LoKi/Particles9.h
index cb3f9af86..c29963401 100644
--- a/Phys/LoKiPhys/LoKi/Particles9.h
+++ b/Phys/LoKiPhys/LoKi/Particles9.h
@@ -137,15 +137,6 @@ namespace LoKi
       std::size_t addTracks ( const LHCb::Vertex*        vertex   ) ;
       std::size_t addTracks ( const LHCb::RecVertex*     vertex   ) ;
       // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      HasTracks();
-      // ======================================================================
-    private:
-      // ======================================================================
-      LoKi::Extract::Particle2Track  m_extract ;
-      // ======================================================================
     } ;
     // ========================================================================    
     /** @class HasTracksInTree
diff --git a/Phys/LoKiPhys/LoKi/PhysExtract.h b/Phys/LoKiPhys/LoKi/PhysExtract.h
index 2208627b5..0e9edc901 100644
--- a/Phys/LoKiPhys/LoKi/PhysExtract.h
+++ b/Phys/LoKiPhys/LoKi/PhysExtract.h
@@ -664,12 +664,11 @@ namespace LoKi
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-02-10
      */
-    struct Particle2ProtoParticle
+    constexpr struct Particle2ProtoParticle_t
     {
-      inline LHCb::ProtoParticle* operator() 
-        ( const LHCb::Particle* p ) const 
-      { return NULL != p ? const_cast<LHCb::ProtoParticle*> ( p->proto() ) : NULL ; }
-    } ;
+      LHCb::ProtoParticle* operator() ( const LHCb::Particle* p ) const 
+      { return p ? const_cast<LHCb::ProtoParticle*> ( p->proto() ) : nullptr ; }
+    } Particle2ProtoParticle {} ;
     // ========================================================================
     /** @struct Particle2Track
      *  Helper trivial functor with could be used to 
@@ -678,17 +677,14 @@ namespace LoKi
      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
      *  @date 2006-02-10
      */
-    struct Particle2Track
+    constexpr struct Particle2Track_t
     {
-      Particle2Track() : m_eval() { }
-      inline LHCb::Track* operator() ( const LHCb::Particle* p ) const 
+      LHCb::Track* operator() ( const LHCb::Particle* p ) const 
       {
-        LHCb::ProtoParticle* pp = m_eval ( p ) ;
-        return ( NULL != pp ? const_cast<LHCb::Track*>( pp->track() ) : NULL );        
+        LHCb::ProtoParticle* pp = Particle2ProtoParticle ( p ) ;
+        return pp ? const_cast<LHCb::Track*>( pp->track() ) : nullptr ;        
       } ;
-    private :
-      Particle2ProtoParticle m_eval ;
-    } ;
+    } Particle2Track {};
     // ========================================================================
     /** Simple funtion to get recursively all tracks, which 
      *  makes contribution for a given particle 
diff --git a/Phys/LoKiPhys/src/Particles12.cpp b/Phys/LoKiPhys/src/Particles12.cpp
index 5520aa7cc..a4d283dc7 100644
--- a/Phys/LoKiPhys/src/Particles12.cpp
+++ b/Phys/LoKiPhys/src/Particles12.cpp
@@ -42,31 +42,21 @@
 // ============================================================================
 LoKi::Particles::ProtoHasInfo::ProtoHasInfo( const int info ) 
   : LoKi::AuxFunBase ( std::tie ( info ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate() 
   , m_info ( info ) 
 {}
 // ============================================================================
-LoKi::Particles::ProtoHasInfo::ProtoHasInfo
-( const LoKi::Particles::ProtoHasInfo& right ) 
-  : LoKi::AuxFunBase                      ( right )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate( right ) 
-  , m_info ( right.m_info )
-{}
-// ============================================================================
 LoKi::Particles::ProtoHasInfo::result_type 
 LoKi::Particles::ProtoHasInfo::operator() 
   ( LoKi::Particles::ProtoHasInfo::argument p ) const 
 {
   //
-  if ( 0 == p ) 
+  if ( !p ) 
   {
     Error ( "Invalid Particle, return 'false'" ) ;
     return false ;                                    // RETURN 
   }
   // 
-  const LHCb::ProtoParticle* pp = p->proto() ;
-  //
-  return LoKi::ExtraInfo::hasInfo ( pp , m_info ) ;
+  return LoKi::ExtraInfo::hasInfo ( p->proto() , m_info ) ;
 }
 // ============================================================================
 std::ostream& 
@@ -79,7 +69,6 @@ LoKi::Particles::ProtoInfo::ProtoInfo
   const double def , 
   const double bad )
   : LoKi::AuxFunBase ( std::tie ( key , def , bad ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_key ( key ) 
   , m_def ( def ) 
   , m_bad ( bad ) 
@@ -89,27 +78,17 @@ LoKi::Particles::ProtoInfo::ProtoInfo
 ( const int    key , 
   const double def )
   : LoKi::AuxFunBase ( std::tie ( key , def ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_key ( key ) 
   , m_def ( def ) 
   , m_bad ( def ) 
 {}
 // ============================================================================
-LoKi::Particles::ProtoInfo::ProtoInfo
-( const LoKi::Particles::ProtoInfo& right ) 
-  : LoKi::AuxFunBase                     ( right )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function( right ) 
-  , m_key  ( right.m_key  )
-  , m_def  ( right.m_def  )
-  , m_bad  ( right.m_bad  )
-{}
-// ============================================================================
 LoKi::Particles::ProtoInfo::result_type 
 LoKi::Particles::ProtoInfo::operator() 
   ( LoKi::Particles::ProtoInfo::argument p ) const 
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) ) 
   {
     Error ( "Argument is invalid! return " + 
             Gaudi::Utils::toString ( m_bad ) ) ;
@@ -118,10 +97,13 @@ LoKi::Particles::ProtoInfo::operator()
   //
   const LHCb::ProtoParticle* pp = p->proto() ;
   //
-  if ( 0 == pp ) 
+  if ( UNLIKELY(!pp) ) 
   {
     Error ( "ProtoParticle is invalid! return " + 
             Gaudi::Utils::toString ( m_bad ) ) ;
+
+    std::cerr << *p << std::endl;
+
     return m_bad ;                                          // RETURN 
   }  
   //
@@ -144,7 +126,7 @@ LoKi::Particles::ProtoHasRichPID::operator()
   ( LoKi::Particles::ProtoHasRichPID::argument p ) const 
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) ) 
   {
     Error ( "Invalid Particle, return 'false'" ) ;
     return false ;                                    // RETURN 
@@ -152,7 +134,7 @@ LoKi::Particles::ProtoHasRichPID::operator()
   // 
   const LHCb::ProtoParticle* pp = p->proto() ;
   //
-  if ( 0 == pp ) 
+  if ( UNLIKELY(!pp) ) 
   {
     Warning ( "Invalid ProtoParticle, return 'false'" ) ;
     return false ;                                   // RETURN 
@@ -254,23 +236,22 @@ LoKi::Particles::IsMuon::operator()
 const LHCb::MuonPID* LoKi::Particles::IsMuon::muonPID 
 ( const LHCb::Particle* p ) const 
 {
-  if ( 0 == p  )  { return 0 ; } ;                                // RETURN  
+  if ( 0 == p  )  { return nullptr ; } ;                                // RETURN  
   //
   const LHCb::ProtoParticle* pp = p->proto() ;
-  if ( 0 == pp ) 
+  if ( !pp ) 
   {
     Warning ("muonPID: Invalid ProtoParticle, return NULL") ;
-    return 0 ;                                                    // RETURN 
+    return nullptr ;                                                    // RETURN 
   }
   //
   const LHCb::MuonPID* pid = pp->muonPID() ;
-  if ( 0 != pid ) { return pid ; }                                // RETURN
+  if ( pid ) { return pid ; }                                // RETURN
   //  
   // Access the status word
-  LHCb::ProtoParticle::ExtraInfo::const_iterator ifind = 
-    pp->extraInfo().find ( LHCb::ProtoParticle::MuonPIDStatus );
+  auto ifind = pp->extraInfo().find ( LHCb::ProtoParticle::MuonPIDStatus );
   //
-  if ( pp->extraInfo().end () == ifind ) { return 0 ; }            // RETURN
+  if ( pp->extraInfo().end () == ifind ) { return nullptr ; }            // RETURN
   //
   m_pid.setStatus ( static_cast<unsigned int> ( ifind->second ) ) ;
   //
@@ -288,7 +269,7 @@ LoKi::Particles::IsMuonLoose::operator()
   ( LoKi::Particles::IsMuonLoose::argument p ) const
 {
   //
-  if ( 0 == p ) 
+  if ( !p ) 
   {
     Error ( "Invalid Particle, return 'false'" ) ;
     return false ;                                     // RETURN 
@@ -296,7 +277,7 @@ LoKi::Particles::IsMuonLoose::operator()
   //
   const LHCb::MuonPID* pid = muonPID ( p ) ;
   //
-  if ( 0 == pid ) 
+  if ( !pid ) 
   {
     Warning ( "Invalid MuonPID, return 'false'", StatusCode::SUCCESS, 0 ) ;
     return false ;                                       // RETURN 
diff --git a/Phys/LoKiPhys/src/Particles13.cpp b/Phys/LoKiPhys/src/Particles13.cpp
index d3d8fcd0b..f9148fd61 100644
--- a/Phys/LoKiPhys/src/Particles13.cpp
+++ b/Phys/LoKiPhys/src/Particles13.cpp
@@ -1,16 +1,15 @@
-// $Id$
 // ============================================================================
-// Include files 
+// Include files
 // ============================================================================
-// STD & STL 
+// STD & STL
 // ============================================================================
 #include <algorithm>
 // ============================================================================
-// Event 
+// Event
 // ============================================================================
 #include "Event/Track.h"
 // ============================================================================
-// LoKiCore 
+// LoKiCore
 // ============================================================================
 #include "LoKi/Constants.h"
 #include "LoKi/Print.h"
@@ -20,7 +19,7 @@
 #include "LoKi/PhysExtract.h"
 #include "LoKi/Particles13.h"
 // ============================================================================
-// GSL 
+// GSL
 // ============================================================================
 #include "gsl/gsl_cdf.h"
 // ============================================================================
@@ -28,123 +27,115 @@
  *
  *  Implementation file for functions from namespace  LoKi::Particles
  *
- *  This file is a part of LoKi project - 
+ *  This file is a part of LoKi project -
  *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
  *
  *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
+ *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
+ *  contributions and advices from G.Raven, J.van Tilburg,
  *  A.Golutvin, P.Koppenburg have been used in the design.
  *
  *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
  *  @date 2006-02-22
  */
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackChi2::result_type
-LoKi::Particles::TrackChi2::operator() 
-  ( LoKi::Particles::TrackChi2::argument p ) const 
+LoKi::Particles::TrackChi2::operator()
+  ( LoKi::Particles::TrackChi2::argument p ) const
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) )
   {
     Error ( "Argument is invalid! return 'InvalidChi2'" ) ;
-    return LoKi::Constants::InvalidChi2 ;               // RETURN 
+    return LoKi::Constants::InvalidChi2 ;               // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( UNLIKELY(!track) )
   {
     Error ( "Track    is invalid! return 'InvalidChi2'" ) ;
-    return LoKi::Constants::InvalidChi2 ;               // RETURN 
+    return LoKi::Constants::InvalidChi2 ;               // RETURN
   }
   //
-  return track->chi2 () ;                               // RETURN 
-} 
+  return track->chi2 () ;                               // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackChi2::fillStream ( std::ostream& s ) const 
+std::ostream&
+LoKi::Particles::TrackChi2::fillStream ( std::ostream& s ) const
 { return s << "TRCHI2" ; }
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackChi2PerDoF::result_type
-LoKi::Particles::TrackChi2PerDoF::operator() 
-  ( LoKi::Particles::TrackChi2PerDoF::argument p ) const 
+LoKi::Particles::TrackChi2PerDoF::operator()
+  ( LoKi::Particles::TrackChi2PerDoF::argument p ) const
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) )
   {
     Error ( "Argument is invalid! return 'InvalidChi2'" ) ;
-    return LoKi::Constants::InvalidChi2 ;               // RETURN 
+    return LoKi::Constants::InvalidChi2 ;               // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( UNLIKELY(!track) )
   {
     Error ( "Track    is invalid! return 'InvalidChi2'" ) ;
-    return LoKi::Constants::InvalidChi2 ;               // RETURN 
+    return LoKi::Constants::InvalidChi2 ;               // RETURN
   }
   //
-  return track->chi2PerDoF () ;                               // RETURN 
-} 
+  return track->chi2PerDoF () ;                               // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackChi2PerDoF::fillStream ( std::ostream& s ) const 
+std::ostream&
+LoKi::Particles::TrackChi2PerDoF::fillStream ( std::ostream& s ) const
 { return s << "TRCHI2DOF" ; }
 // ============================================================================
 LoKi::Particles::TrackHasState::TrackHasState
-( const LHCb::State::Location location ) 
-  : LoKi::AuxFunBase ( std::tie ( location ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate()
-  , m_location ( location ) 
-{}
-// ============================================================================
-LoKi::Particles::TrackHasState::TrackHasState
-( const LoKi::Particles::TrackHasState& right ) 
-  : LoKi::AuxFunBase                      ( right )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate( right )
-  , m_location                            ( right.m_location ) 
+( const LHCb::State::Location location )
+  : LoKi::AuxFunBase ( std::tie ( location ) )
+  , m_location ( location )
 {}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackHasState::result_type
-LoKi::Particles::TrackHasState::operator() 
-  ( LoKi::Particles::TrackHasState::argument p ) const 
+LoKi::Particles::TrackHasState::operator()
+  ( LoKi::Particles::TrackHasState::argument p ) const
 {
   //
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return false" ) ;
-    return false ;                                         // RETURN 
+    return false ;                                         // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return false" ) ;
-    return false ;                                          // RETURN 
+    return false ;                                          // RETURN
   }
   //
-  return track->hasStateAt ( m_location ) ;                // RETURN 
-} 
+  return track->hasStateAt ( m_location ) ;                // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackHasState::fillStream ( std::ostream& s ) const 
-{ 
+std::ostream&
+LoKi::Particles::TrackHasState::fillStream ( std::ostream& s ) const
+{
   s << "HASSTATE['" ;
-  switch ( m_location) 
+  switch ( m_location)
   {
   case LHCb::State::LocationUnknown  : s << "LocationUnknown"  ; break ;
   case LHCb::State::ClosestToBeam    : s << "ClosestToBeam"    ; break ;
@@ -165,240 +156,230 @@ LoKi::Particles::TrackHasState::fillStream ( std::ostream& s ) const
   case LHCb::State::MidHCal          : s << "MidHCal"          ; break ;
   case LHCb::State::EndHCal          : s << "EndHCal"          ; break ;
   case LHCb::State::Muon             : s << "Muon"             ; break ;
-  default : s << "?" <<m_location << "?" ; break ;  
+  default : s << "?" <<m_location << "?" ; break ;
   }
   return s << "']";
-} 
+}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackType::result_type
-LoKi::Particles::TrackType::operator() 
-  ( LoKi::Particles::TrackType::argument p ) const 
+LoKi::Particles::TrackType::operator()
+  ( LoKi::Particles::TrackType::argument p ) const
 {
   //
   const int errVal = -1000;
   //
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                      // RETURN 
+    return errVal ;                                      // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                     // RETURN 
+    return errVal ;                                     // RETURN
   }
   //
-  return track->type() ;                 // RETURN 
-} 
+  return track->type() ;                 // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackType::fillStream ( std::ostream& s ) const 
-{ return s << "TRTYPE" ;} 
+std::ostream&
+LoKi::Particles::TrackType::fillStream ( std::ostream& s ) const
+{ return s << "TRTYPE" ;}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackHistory::result_type
-LoKi::Particles::TrackHistory::operator() 
-  ( LoKi::Particles::TrackHistory::argument p ) const 
+LoKi::Particles::TrackHistory::operator()
+  ( LoKi::Particles::TrackHistory::argument p ) const
 {
   //
   const int errVal = -1000;
   //
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                      // RETURN 
+    return errVal ;                                      // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                      // RETURN 
+    return errVal ;                                      // RETURN
   }
   //
-  return track->history() ;                 // RETURN 
-} 
+  return track->history() ;                 // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackHistory::fillStream ( std::ostream& s ) const 
-{ return s << "TRHISTORY" ;} 
+std::ostream&
+LoKi::Particles::TrackHistory::fillStream ( std::ostream& s ) const
+{ return s << "TRHISTORY" ;}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackHistoryFit::result_type
-LoKi::Particles::TrackHistoryFit::operator() 
-  ( LoKi::Particles::TrackHistoryFit::argument p ) const 
+LoKi::Particles::TrackHistoryFit::operator()
+  ( LoKi::Particles::TrackHistoryFit::argument p ) const
 {
   //
   const int errVal = -1000;
   //
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                        // RETURN 
+    return errVal ;                                        // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                        // RETURN 
+    return errVal ;                                        // RETURN
   }
   //
-  return track->fitHistory() ;                 // RETURN 
-} 
+  return track->fitHistory() ;                 // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackHistoryFit::fillStream ( std::ostream& s ) const 
-{ return s << "TRHISTFIT" ;} 
+std::ostream&
+LoKi::Particles::TrackHistoryFit::fillStream ( std::ostream& s ) const
+{ return s << "TRHISTFIT" ;}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackStatus::result_type
-LoKi::Particles::TrackStatus::operator() 
-  ( LoKi::Particles::TrackStatus::argument p ) const 
+LoKi::Particles::TrackStatus::operator()
+  ( LoKi::Particles::TrackStatus::argument p ) const
 {
   //
   const int errVal = -1000;
   //
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                      // RETURN 
+    return errVal ;                                      // RETURN
   }
   //
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return "+Gaudi::Utils::toString(errVal) ) ;
-    return errVal ;                                      // RETURN 
+    return errVal ;                                      // RETURN
   }
   //
-  return track->fitStatus() ;                 // RETURN 
-} 
+  return track->fitStatus() ;                 // RETURN
+}
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackStatus::fillStream ( std::ostream& s ) const 
-{ return s << "TRSTATUS" ;} 
+std::ostream&
+LoKi::Particles::TrackStatus::fillStream ( std::ostream& s ) const
+{ return s << "TRSTATUS" ;}
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackChi2Prob::result_type
-LoKi::Particles::TrackChi2Prob::operator() 
-  ( LoKi::Particles::TrackChi2Prob::argument p ) const 
+LoKi::Particles::TrackChi2Prob::operator()
+  ( LoKi::Particles::TrackChi2Prob::argument p ) const
 {
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel;                    // RETURN 
+    return LoKi::Constants::InvalidConfLevel;                    // RETURN
   }
   // get the track:
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel ;                        // RETURN 
+    return LoKi::Constants::InvalidConfLevel ;                        // RETURN
   }
   //
-  const double chi2 = track -> chi2 () ;
-  const int    nDoF = track -> nDoF () ;
-  //
-  return gsl_cdf_chisq_Q ( chi2 , nDoF ) ;
+  return gsl_cdf_chisq_Q ( track->chi2() , track->nDoF() ) ;
 }
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackChi2Prob::fillStream ( std::ostream& s ) const 
-{ return s << "TRPCHI2" ;} 
-
-
+std::ostream&
+LoKi::Particles::TrackChi2Prob::fillStream ( std::ostream& s ) const
+{ return s << "TRPCHI2" ;}
 
 
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::GhostProbability::result_type
-LoKi::Particles::GhostProbability::operator() 
-  ( LoKi::Particles::GhostProbability::argument p ) const 
+LoKi::Particles::GhostProbability::operator()
+  ( LoKi::Particles::GhostProbability::argument p ) const
 {
-  if ( 0 == p ) 
+  if ( 0 == p )
   {
     Error ( "Argument is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel;                    // RETURN 
+    return LoKi::Constants::InvalidConfLevel;                    // RETURN
   }
   // get the track:
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
+  if ( 0 == track )
   {
     Error ( "Track    is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel ;                        // RETURN 
+    return LoKi::Constants::InvalidConfLevel ;                        // RETURN
   }
   //
   return track->ghostProbability() ;
 }
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::GhostProbability::fillStream ( std::ostream& s ) const 
-{ return s << "TRGHOSTPROB" ; } 
+std::ostream&
+LoKi::Particles::GhostProbability::fillStream ( std::ostream& s ) const
+{ return s << "TRGHOSTPROB" ; }
 // ============================================================================
 
-
-
 // ============================================================================
-// MANDATORY: the only one essential method 
+// MANDATORY: the only one essential method
 // ============================================================================
 LoKi::Particles::TrackLikelihood::result_type
-LoKi::Particles::TrackLikelihood::operator() 
-  ( LoKi::Particles::TrackLikelihood::argument p ) const 
+LoKi::Particles::TrackLikelihood::operator()
+  ( LoKi::Particles::TrackLikelihood::argument p ) const
 {
-  if ( 0 == p ) 
-  {
+  if ( UNLIKELY(!p) ) {
     Error ( "Argument is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel;                    // RETURN 
+    return LoKi::Constants::InvalidConfLevel;                    // RETURN
   }
   // get the track:
-  const LHCb::Track* track = m_track ( p ) ;
+  const LHCb::Track* track = Extract::Particle2Track ( p ) ;
   //
-  if ( 0 == track ) 
-  {
+  if ( UNLIKELY(!track) ) {
     Error ( "Track    is invalid! return 'InvalidConfLevel'" ) ;
-    return LoKi::Constants::InvalidConfLevel ;                        // RETURN 
+    return LoKi::Constants::InvalidConfLevel ;                        // RETURN
   }
   //
   return track->likelihood() ;
 }
 // ============================================================================
-// OPTIONAL:  the specific printout 
+// OPTIONAL:  the specific printout
 // ============================================================================
-std::ostream& 
-LoKi::Particles::TrackLikelihood::fillStream ( std::ostream& s ) const 
-{ return s << "TRLIKELIHOOD" ; } 
+std::ostream&
+LoKi::Particles::TrackLikelihood::fillStream ( std::ostream& s ) const
+{ return s << "TRLIKELIHOOD" ; }
 // ============================================================================
 
-
 // ============================================================================
-// The END 
+// The END
 // ============================================================================
 
diff --git a/Phys/LoKiPhys/src/Particles27.cpp b/Phys/LoKiPhys/src/Particles27.cpp
index c2e2e3320..c966b3c9f 100644
--- a/Phys/LoKiPhys/src/Particles27.cpp
+++ b/Phys/LoKiPhys/src/Particles27.cpp
@@ -31,8 +31,7 @@ LoKi::Particles::ReFit::ReFit
 // ============================================================================
 LoKi::Particles::ReFit::~ReFit() 
 {
-  if ( m_fitter && !gaudi() ) 
-  {
+  if ( m_fitter && !gaudi() ) {
     // Warning("Manual reset IParticleReFiter") ;
     m_fitter.reset() ;    
   }
@@ -143,8 +142,7 @@ LoKi::Particles::MassFit::MassFit
 // ============================================================================
 LoKi::Particles::MassFit::~MassFit() 
 {
-  if ( m_fitter && !gaudi() ) 
-  {
+  if ( m_fitter && !gaudi() ) {
     // Warning("Manual reset IMassFit") ;
     m_fitter.reset() ;
   }
diff --git a/Phys/LoKiPhys/src/Particles35.cpp b/Phys/LoKiPhys/src/Particles35.cpp
index f59a870be..7f8fa63e9 100644
--- a/Phys/LoKiPhys/src/Particles35.cpp
+++ b/Phys/LoKiPhys/src/Particles35.cpp
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -21,7 +20,6 @@ LoKi::Particles::ProtoPFun::ProtoPFun
 ( const LoKi::BasicFunctors<const LHCb::ProtoParticle*>::Function& fun ,
   const double                                                     bad ) 
   : LoKi::AuxFunBase ( std::tie ( fun , bad ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_fun  ( fun ) 
   , m_bad   ( bad ) 
 {}
@@ -31,15 +29,10 @@ LoKi::Particles::ProtoPFun::ProtoPFun
 LoKi::Particles::ProtoPFun::ProtoPFun 
 ( const LoKi::BasicFunctors<const LHCb::ProtoParticle*>::Function& fun )
   : LoKi::AuxFunBase ( std::tie ( fun ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_fun  ( fun ) 
   , m_bad  ( LoKi::Constants::NegativeInfinity ) 
 {}
 // ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Particles::ProtoPFun::~ProtoPFun(){}
-// ============================================================================
 // MANDATORY: clone method ("virtual constructor")
 // ============================================================================
 LoKi::Particles::ProtoPFun*
@@ -81,14 +74,9 @@ std::ostream& LoKi::Particles::ProtoPFun::fillStream ( std::ostream& s ) const
 LoKi::Particles::ProtoPCut::ProtoPCut 
 ( const LoKi::BasicFunctors<const LHCb::ProtoParticle*>::Predicate& cut ) 
   : LoKi::AuxFunBase ( std::tie ( cut ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate() 
   , m_cut  ( cut ) 
 {}
 // ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Particles::ProtoPCut::~ProtoPCut(){}
-// ============================================================================
 // MANDATORY: clone method ("virtual constructor")
 // ============================================================================
 LoKi::Particles::ProtoPCut*
@@ -129,7 +117,6 @@ LoKi::Particles::TrackFun::TrackFun
 ( const LoKi::BasicFunctors<const LHCb::Track*>::Function& fun , 
   const double                                             bad ) 
   : LoKi::AuxFunBase ( std::tie ( fun , bad ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_fun  ( fun ) 
   , m_bad  ( bad ) 
 {}
@@ -139,15 +126,10 @@ LoKi::Particles::TrackFun::TrackFun
 LoKi::Particles::TrackFun::TrackFun 
 ( const LoKi::BasicFunctors<const LHCb::Track*>::Function& fun )
   : LoKi::AuxFunBase ( std::tie ( fun ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_fun  ( fun ) 
   , m_bad  ( LoKi::Constants::NegativeInfinity ) 
 {}
 // ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Particles::TrackFun::~TrackFun(){}
-// ============================================================================
 // MANDATORY: clone method ("virtual constructor")
 // ============================================================================
 LoKi::Particles::TrackFun*
@@ -201,14 +183,9 @@ std::ostream& LoKi::Particles::TrackFun::fillStream ( std::ostream& s ) const
 LoKi::Particles::TrackCut::TrackCut 
 ( const LoKi::BasicFunctors<const LHCb::Track*>::Predicate& cut )
   : LoKi::AuxFunBase ( std::tie ( cut ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Predicate() 
   , m_cut  ( cut ) 
 {}
 // ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Particles::TrackCut::~TrackCut(){}
-// ============================================================================
 // MANDATORY: clone method ("virtual constructor")
 // ============================================================================
 LoKi::Particles::TrackCut*
diff --git a/Phys/LoKiPhys/src/Particles43.cpp b/Phys/LoKiPhys/src/Particles43.cpp
index dbe42773b..30c8ac61e 100644
--- a/Phys/LoKiPhys/src/Particles43.cpp
+++ b/Phys/LoKiPhys/src/Particles43.cpp
@@ -54,10 +54,6 @@ LoKi::Particles::SumInR2Cone::SumInR2Cone
   , m_init ( init )
 {}
 // ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Particles::SumInR2Cone::~SumInR2Cone () {}
-// ============================================================================
 // MANDATORY: clone method ("virtual constructor")
 // ============================================================================
 LoKi::Particles::SumInR2Cone*
@@ -71,7 +67,7 @@ LoKi::Particles::SumInR2Cone::operator()
   ( LoKi::Particles::SumInR2Cone::argument p  ) const 
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) ) 
   {
     Error ( "LHCb::Particle* points to NULL, return 'NegativeInfinity'" ) ;
     return LoKi::Constants::NegativeInfinity ;       // RETURN 
@@ -84,23 +80,13 @@ LoKi::Particles::SumInR2Cone::operator()
 // ============================================================================
 double LoKi::Particles::SumInR2Cone::sum ( const LHCb::Particle* p  ) const 
 {
-  // empty storage? 
-  if ( empty() ) { return m_init ; }                 // RETURN 
-  //
-  // create selection criteria 
-  //
   using namespace LoKi::Particles ;
-  const DeltaR2   r2 ( p ) ;
-  const HasProtos c1 ( p ) ;
-  //
-  double result = m_init ;
-  return LoKi::Algs::accumulate 
-    ( begin ()              , 
-      end   ()              , 
-      m_fun                 , 
-      ( r2 < m_dr2 ) && !c1 , 
-      result                , 
-      std::plus<double> ()  ) ;
+  return empty() ? m_init 
+                 : LoKi::Algs::accumulate( begin(), end(), 
+                                           m_fun, 
+                                           ( DeltaR2(p) < m_dr2 ) && !HasProtos(p), 
+                                           m_init, 
+                                           std::plus<double> () ) ;
 }
 // ===========================================================================
 
@@ -143,10 +129,6 @@ LoKi::Particles::SumInR2ConeWithSource::SumInR2ConeWithSource
   , m_source (   LoKi::Particles::SourceTES ( location , cut ) ) 
 {}
 // ===========================================================================
-// MANDATORY : virtual destructor 
-// ===========================================================================
-LoKi::Particles::SumInR2ConeWithSource::~SumInR2ConeWithSource () {}
-// ===========================================================================
 // MANDATORY : clone method ("virtual constructor")
 // ===========================================================================
 LoKi::Particles::SumInR2ConeWithSource*
@@ -160,7 +142,7 @@ LoKi::Particles::SumInR2ConeWithSource::operator()
   ( LoKi::Particles::SumInR2ConeWithSource::argument p ) const
 {
   //
-  if ( 0 == p ) 
+  if ( UNLIKELY(!p) ) 
   {
     Error ( "LHCb::Particle* points to NULL, return NegativeInfinity") ;
     return LoKi::Constants::NegativeInfinity ;
@@ -196,8 +178,6 @@ std::ostream& LoKi::Particles::SumInR2ConeWithSource::fillStream
   return s << ") " ;
 }
 // ===========================================================================
-
-
  
 // ============================================================================
 // The END 
diff --git a/Phys/LoKiPhys/src/Particles44.cpp b/Phys/LoKiPhys/src/Particles44.cpp
index f48c2f79a..202520b64 100644
--- a/Phys/LoKiPhys/src/Particles44.cpp
+++ b/Phys/LoKiPhys/src/Particles44.cpp
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -42,28 +41,20 @@
 LoKi::Particles::Value::Value
 ( const std::string& function ) 
   : LoKi::AuxFunBase ( std::tie ( function ) ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function () 
-  , m_function ()
 {
   // 1. get from the context 
   LoKi::ILoKiSvc* loki  = lokiSvc() ;
   //
   SmartIF<IAlgContextSvc> context ( loki ) ;
   GaudiAlgorithm* alg = Gaudi::Utils::getGaudiAlg ( context ) ;
-  if ( 0 != alg ) 
-  { 
+  if ( alg ) { 
     m_function = alg->tool<IParticleValue> ( function , alg , true ) ; 
-  }
-  else 
-  { 
+  } else { 
     /// 2. use tool service 
     SmartIF<IToolSvc> tsvc ( loki ) ;
-    if ( ! ( ! tsvc ) ) 
-    {
-      IParticleValue*   _func  = 0 ;
-      const IInterface* parent = 0 ;
-      StatusCode sc = tsvc->retrieveTool 
-        ( function , _func , parent , true ) ;
+    if ( tsvc ) {
+      IParticleValue*   _func  = nullptr ;
+      StatusCode sc = tsvc->retrieveTool( function , _func , nullptr , true ) ;
       Assert ( sc.isSuccess() , "Unable to retrieve the tool/1: '" + function +"'", sc ) ;
       Assert ( 0 != _func     , "Unable to retrieve the tool/2: '" + function +"'"     ) ;
       m_function = _func ;
@@ -77,18 +68,10 @@ LoKi::Particles::Value::Value
 // ============================================================================
 LoKi::Particles::Value::Value
 ( const IParticleValue* function ) 
-  : LoKi::AuxFunBase () 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function () 
+  : LoKi::AuxFunBase{ std::tie() } 
   , m_function ( function )
 {} 
 // ============================================================================
-LoKi::Particles::Value::Value
-( const LoKi::Particles::Value& right ) 
-  : LoKi::AuxFunBase( right )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function( right ) 
-  , m_function ( right.m_function )
-{}
-// ============================================================================
 // MANDATORY: virtual destructor
 // ============================================================================
 LoKi::Particles::Value::~Value()
@@ -111,13 +94,11 @@ LoKi::Particles::Value::result_type
 LoKi::Particles::Value::operator() 
   ( LoKi::Particles::Value::argument p ) const 
 {
-  if ( !p ) 
-  {
+  if ( !p ) {
     Error ( "Invalid argument, return 'false'");
     return false ;                                                 // RETURN 
   }
-  if ( !m_function ) 
-  {
+  if ( !m_function ) {
     Error ( "Invalid tool: IParticleValue* points to NULL, return 'false'");
     return false ;                                                 // RETURN 
   }
diff --git a/Phys/LoKiPhys/src/Particles45.cpp b/Phys/LoKiPhys/src/Particles45.cpp
index 8336875a0..c930670a2 100644
--- a/Phys/LoKiPhys/src/Particles45.cpp
+++ b/Phys/LoKiPhys/src/Particles45.cpp
@@ -22,11 +22,9 @@ LoKi::Particles::RelatedInfo::RelatedInfo
   const short        index    , 
   const double       bad      ) 
   : LoKi::AuxFunBase( std::tie ( location , index , bad ) )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_location ( location ) 
   , m_index    ( index    ) 
   , m_bad      ( bad      ) 
-  , m_table    ( 0        ) 
 {}
 //
 LoKi::Particles::RelatedInfo::RelatedInfo 
@@ -34,10 +32,8 @@ LoKi::Particles::RelatedInfo::RelatedInfo
   const std::string& variable , 
   const double       bad      ) 
   : LoKi::AuxFunBase( std::tie ( location , variable , bad ) )
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function() 
   , m_location ( location ) 
   , m_bad      ( bad      ) 
-  , m_table    ( 0        ) 
 {
   short index = RelatedInfoNamed::indexByName( variable ); 
   if ( index == RelatedInfoNamed::UNKNOWN ) {
@@ -46,21 +42,10 @@ LoKi::Particles::RelatedInfo::RelatedInfo
   m_index = index;
 }
 //
-LoKi::Particles::RelatedInfo::RelatedInfo 
-( const LoKi::Particles::RelatedInfo& right ) 
-  : LoKi::AuxFunBase ( right ) 
-  , LoKi::BasicFunctors<const LHCb::Particle*>::Function( right )
-  , m_location ( right.m_location ) 
-  , m_index    ( right.m_index    ) 
-  , m_bad      ( right.m_bad      ) 
-  , m_table    ( 0        ) 
-{}
-//
 LoKi::Particles::RelatedInfo*
 LoKi::Particles::RelatedInfo::clone() const 
 { return new LoKi::Particles::RelatedInfo(*this) ; }
 //
-LoKi::Particles::RelatedInfo::~RelatedInfo(){}
 // MANDATORY: the only one essential method 
 LoKi::Particles::RelatedInfo::result_type 
 LoKi::Particles::RelatedInfo::operator () 
@@ -72,7 +57,7 @@ LoKi::Particles::RelatedInfo::operator ()
     return -1000 ;
   }
   //
-  if ( 0 == m_table  || !sameEvent() ) 
+  if ( !m_table  || !sameEvent() ) 
   {
     SmartIF<IDataProviderSvc> ds ( lokiSvc().getObject() ) ;
     SmartDataPtr<IMAP> data ( ds , m_location ) ;
@@ -85,7 +70,7 @@ LoKi::Particles::RelatedInfo::operator ()
     setEvent () ;  
   }
   //
-  IMAP::Range r = m_table->relations( p ) ;
+  auto r = m_table->relations( p ) ;
   if ( r.empty() )  
   {
     Warning ( "No entry for particle" ) ;
@@ -103,11 +88,7 @@ LoKi::Particles::RelatedInfo::operator ()
 /// OPTIONAL: the specific printout
 std::ostream& LoKi::Particles::RelatedInfo::fillStream( std::ostream& s ) const 
 {
-  return 
-    s << "RELINFO('"
-      << m_location << "',"
-      << m_index    << "," << m_bad << ")" ;
+  return s << "RELINFO('"
+           << m_location << "',"
+           << m_index    << "," << m_bad << ")" ;
 }
-
-
-
diff --git a/Phys/LoKiPhys/src/Particles5.cpp b/Phys/LoKiPhys/src/Particles5.cpp
index 78c56a08d..471896c98 100644
--- a/Phys/LoKiPhys/src/Particles5.cpp
+++ b/Phys/LoKiPhys/src/Particles5.cpp
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -41,15 +40,6 @@ LoKi::Particles::InTree::InTree
   , m_cut ( cut ) 
 {}
 // ============================================================================
-// copy constructor 
-// ============================================================================
-LoKi::Particles::InTree::InTree 
-( const LoKi::Particles::InTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Cuts ( right ) 
-  , m_cut                 ( right.m_cut ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::InTree::result_type 
@@ -73,19 +63,9 @@ LoKi::Particles::InTree::fillStream( std::ostream& s ) const
 LoKi::Particles::NinTree::NinTree 
 ( const LoKi::PhysTypes::Cuts& cut ) 
   : LoKi::AuxFunBase ( std::tie ( cut ) )
-  , LoKi::PhysTypes::Func () 
   , m_cut ( cut ) 
 {}
 // ============================================================================
-// copy constructor 
-// ============================================================================
-LoKi::Particles::NinTree::NinTree 
-( const LoKi::Particles::NinTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Func ( right ) 
-  , m_cut                 ( right.m_cut ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::NinTree::result_type 
@@ -107,7 +87,6 @@ LoKi::Particles::SumTree::SumTree
   const LoKi::PhysTypes::Cuts& cut ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( fun , cut , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
@@ -118,21 +97,11 @@ LoKi::Particles::SumTree::SumTree
   const LoKi::PhysTypes::Func& fun ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( cut , fun , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
 {}
 // ============================================================================
-LoKi::Particles::SumTree::SumTree
-( const LoKi::Particles::SumTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Func ( right ) 
-  , m_fun ( right.m_fun ) 
-  , m_cut ( right.m_cut )
-  , m_res ( right.m_res ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::SumTree::result_type 
@@ -160,7 +129,6 @@ LoKi::Particles::MultTree::MultTree
   const LoKi::PhysTypes::Cuts& cut ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( fun , cut , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
@@ -171,21 +139,11 @@ LoKi::Particles::MultTree::MultTree
   const LoKi::PhysTypes::Func& fun ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( cut , fun , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
 {}
 // ============================================================================
-LoKi::Particles::MultTree::MultTree
-( const LoKi::Particles::MultTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Func ( right ) 
-  , m_fun ( right.m_fun ) 
-  , m_cut ( right.m_cut )
-  , m_res ( right.m_res ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::MultTree::result_type 
@@ -229,15 +187,6 @@ LoKi::Particles::MinTree::MinTree
   , m_res ( res ) 
 {}
 // ============================================================================
-LoKi::Particles::MinTree::MinTree
-( const LoKi::Particles::MinTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Func ( right ) 
-  , m_fun ( right.m_fun ) 
-  , m_cut ( right.m_cut )
-  , m_res ( right.m_res ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::MinTree::result_type 
@@ -262,7 +211,6 @@ LoKi::Particles::MaxTree::MaxTree
   const LoKi::PhysTypes::Cuts& cut ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( fun , cut , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
@@ -273,21 +221,11 @@ LoKi::Particles::MaxTree::MaxTree
   const LoKi::PhysTypes::Func& fun ,
   const double                 res ) 
   : LoKi::AuxFunBase ( std::tie ( cut , fun , res ) )
-  , LoKi::PhysTypes::Func() 
   , m_fun ( fun ) 
   , m_cut ( cut )
   , m_res ( res ) 
 {}
 // ============================================================================
-LoKi::Particles::MaxTree::MaxTree
-( const LoKi::Particles::MaxTree& right ) 
-  : LoKi::AuxFunBase      ( right ) 
-  , LoKi::PhysTypes::Func ( right ) 
-  , m_fun ( right.m_fun ) 
-  , m_cut ( right.m_cut )
-  , m_res ( right.m_res ) 
-{}
-// ============================================================================
 //  MANDATORY: the only one essential method 
 // ============================================================================
 LoKi::Particles::MaxTree::result_type 
diff --git a/Phys/LoKiPhys/src/Particles9.cpp b/Phys/LoKiPhys/src/Particles9.cpp
index b3ac46a37..26d7c1850 100644
--- a/Phys/LoKiPhys/src/Particles9.cpp
+++ b/Phys/LoKiPhys/src/Particles9.cpp
@@ -109,8 +109,7 @@ LoKi::Particles::HasTracks::operator()
 // ============================================================================
 bool LoKi::Particles::HasTracks::inList ( const LHCb::Particle* p ) const 
 {
-  if ( 0 == p ) { return false ; } ;
-  return std::binary_search ( begin() , end() , m_extract( p ) ) ;  
+  return p && std::binary_search ( begin() , end() , Extract::Particle2Track( p ) ) ;  
 }
 // ============================================================================
 bool LoKi::Particles::HasTracks::inTree ( const LHCb::Particle* p ) const 
-- 
GitLab


From e4297e18e4f6e48884e999fc7b68afb72ec3f072 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Wed, 19 Oct 2016 15:53:35 +0200
Subject: [PATCH 03/18] remove code that was copied to Rec/LoKiTracks

---
 .../LoKi/ITrackFunctorAntiFactory.h           |   68 -
 Phys/LoKiTracks/LoKi/ITrackFunctorFactory.h   |  124 --
 Phys/LoKiTracks/LoKi/LoKiTracks.h             |   20 -
 Phys/LoKiTracks/LoKi/LoKiTracks_dct.h         |  252 ----
 Phys/LoKiTracks/LoKi/TrSources.h              |  194 ---
 Phys/LoKiTracks/LoKi/TrackCuts.h              | 1212 -----------------
 Phys/LoKiTracks/LoKi/TrackEngine.h            |   88 --
 Phys/LoKiTracks/LoKi/TrackEngineActor.h       |  114 --
 Phys/LoKiTracks/LoKi/TrackFactoryLock.h       |   65 -
 Phys/LoKiTracks/LoKi/TrackFunctions.h         |   70 -
 Phys/LoKiTracks/LoKi/TrackIDs.h               |  445 ------
 Phys/LoKiTracks/LoKi/TrackTypes.h             |  243 ----
 Phys/LoKiTracks/LoKi/Tracks.h                 |  809 -----------
 .../LoKiTracks/LoKi/VeloHitPatternFunctions.h |  220 ---
 Phys/LoKiTracks/dict/LoKiTracks.xml           |   55 -
 Phys/LoKiTracks/dict/LoKiTracksDict.h         |   13 -
 Phys/LoKiTracks/python/LoKiTracks/__init__.py |   37 -
 .../python/LoKiTracks/decorators.py           |  155 ---
 .../LoKiTracks/python/LoKiTracks/functions.py |  535 --------
 Phys/LoKiTracks/python/LoKiTracks/tests.py    |  173 ---
 .../src/Components/TrackFunctorFactory.cpp    |  323 -----
 .../src/Components/TrackSelector.cpp          |  215 ---
 Phys/LoKiTracks/src/LoKiTracks.cpp            |  136 --
 Phys/LoKiTracks/src/LoKiTracks_dct.cpp        |   10 -
 Phys/LoKiTracks/src/TrSources.cpp             |  304 -----
 Phys/LoKiTracks/src/TrStreamers.cpp           |  167 ---
 Phys/LoKiTracks/src/TrackEngine.cpp           |   92 --
 Phys/LoKiTracks/src/TrackEngineActor.cpp      |  150 --
 Phys/LoKiTracks/src/TrackFactoryLock.cpp      |   58 -
 Phys/LoKiTracks/src/TrackFunctions.cpp        |  170 ---
 Phys/LoKiTracks/src/TrackIDs.cpp              |  881 ------------
 Phys/LoKiTracks/src/Tracks.cpp                |  786 -----------
 .../src/VeloHitPatternFunctions.cpp           |  113 --
 33 files changed, 8297 deletions(-)
 delete mode 100644 Phys/LoKiTracks/LoKi/ITrackFunctorAntiFactory.h
 delete mode 100644 Phys/LoKiTracks/LoKi/ITrackFunctorFactory.h
 delete mode 100644 Phys/LoKiTracks/LoKi/LoKiTracks.h
 delete mode 100644 Phys/LoKiTracks/LoKi/LoKiTracks_dct.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrSources.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackEngine.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackEngineActor.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackFactoryLock.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackFunctions.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackIDs.h
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackTypes.h
 delete mode 100644 Phys/LoKiTracks/LoKi/VeloHitPatternFunctions.h
 delete mode 100644 Phys/LoKiTracks/dict/LoKiTracks.xml
 delete mode 100644 Phys/LoKiTracks/dict/LoKiTracksDict.h
 delete mode 100755 Phys/LoKiTracks/python/LoKiTracks/__init__.py
 delete mode 100644 Phys/LoKiTracks/python/LoKiTracks/decorators.py
 delete mode 100644 Phys/LoKiTracks/python/LoKiTracks/functions.py
 delete mode 100755 Phys/LoKiTracks/python/LoKiTracks/tests.py
 delete mode 100644 Phys/LoKiTracks/src/Components/TrackFunctorFactory.cpp
 delete mode 100644 Phys/LoKiTracks/src/Components/TrackSelector.cpp
 delete mode 100644 Phys/LoKiTracks/src/LoKiTracks.cpp
 delete mode 100644 Phys/LoKiTracks/src/LoKiTracks_dct.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrSources.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrStreamers.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrackEngine.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrackEngineActor.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrackFactoryLock.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrackFunctions.cpp
 delete mode 100644 Phys/LoKiTracks/src/TrackIDs.cpp
 delete mode 100644 Phys/LoKiTracks/src/VeloHitPatternFunctions.cpp

diff --git a/Phys/LoKiTracks/LoKi/ITrackFunctorAntiFactory.h b/Phys/LoKiTracks/LoKi/ITrackFunctorAntiFactory.h
deleted file mode 100644
index a62ce766f..000000000
--- a/Phys/LoKiTracks/LoKi/ITrackFunctorAntiFactory.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// ============================================================================
-#ifndef LOKI_ITRACKHYBRIDTOOL_H
-#define LOKI_ITRACKHYBRIDTOOL_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <string>
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/IAlgTool.h"
-#include "GaudiKernel/StatusCode.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  /** @class ITrackFunctorAntiFactory LoKi/ITrackfunctorAntiFactory
-   *
-   *  Helper interface for implementation of C++/Python "Hybrid" solution
-   *
-   *  This file is a part of LoKi project -
-   *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-   *
-   *  The package has been designed with the kind help from
-   *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
-   *  contributions and advices from G.Raven, J.van Tilburg,
-   *  A.Golutvin, P.Koppenburg have been used in the design.
-   *
-   *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-   *  @date   2004-06-29
-   */
-  struct ITrackFunctorAntiFactory : virtual IAlgTool
-  {
-    // ========================================================================
-    /// InterfaceID
-    DeclareInterfaceID ( ITrackFunctorAntiFactory , 2 , 0 ) ;
-    // ========================================================================
-    /// set the C++ predicate for LHCb::Track
-    virtual void set ( const LoKi::Types::TrCuts&    cut ) = 0 ;
-    /// set the C++ function for LHCb::Track
-    virtual void set ( const LoKi::Types::TrFunc&    fun ) = 0 ;
-    // ========================================================================
-    // the functional part
-    /// set the C++ "maps"     for Tracks
-    virtual void set ( const LoKi::Types::TrMaps&     fun ) = 0 ;
-    /// set the C++ "pipes"    for Tracks
-    virtual void set ( const LoKi::Types::TrPipes&    fun ) = 0 ;
-    /// set the C++ "funvals"  for Tracks
-    virtual void set ( const LoKi::Types::TrFunVals&  fun ) = 0 ;
-    /// set the C++ "cutvals"  for Tracks
-    virtual void set ( const LoKi::Types::TrCutVals&  fun ) = 0 ;
-    /// set the C++ "sources"  for Tracks
-    virtual void set ( const LoKi::Types::TrSources&  fun ) = 0 ;
-    // ========================================================================
-  };
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-//                                                                      The END
-// ============================================================================
-#endif // LOKI_ITRHYBRIDTOOL_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/ITrackFunctorFactory.h b/Phys/LoKiTracks/LoKi/ITrackFunctorFactory.h
deleted file mode 100644
index e964149c6..000000000
--- a/Phys/LoKiTracks/LoKi/ITrackFunctorFactory.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// ============================================================================
-#ifndef LOKI_ITRACKHYBRIDFACTORY_H
-#define LOKI_ITRACKHYBRIDFACTORY_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <string>
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/IAlgTool.h"
-#include "GaudiKernel/StatusCode.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-// ============================================================================
-/** @file
- *  This file is part of LoKi project:
- *   ``C++ ToolKit for Smart and Friendly Physics Analysis''
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
- *  contributions and advices from G.Raven, J.van Tilburg,
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
- */
-namespace LoKi
-{
-  // ==========================================================================
-  /** @class ITrackFunctorFactory LoKi/ITrackFunctorFactory.h
-   *  The abstract interface to "hybrid factory"
-   *  @author Vanya BELYAEV ibelayev@physics.syr.edu
-   *  @date   2007-06-10
-   */
-  struct ITrackFunctorFactory : virtual IAlgTool
-  {
-    // ========================================================================
-    /// InterfaceID
-    DeclareInterfaceID ( ITrackFunctorFactory , 2 , 0 ) ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param cuts the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get( const std::string&   pycode       ,
-                            LoKi::Types::TrCut&  cuts         ,
-                            const std::string&   context = "" ) = 0 ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&   pycode       ,
-                             LoKi::Types::TrFun&  func         ,
-                             const std::string&   context = "" ) = 0 ;
-    // ========================================================================
-    // functional part for LHCb::Track
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&   pycode       ,
-                             LoKi::Types::TrMap&  func         ,
-                             const std::string&   context = "" ) = 0 ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&   pycode       ,
-                             LoKi::Types::TrPipe& func         ,
-                             const std::string&   context = "" ) = 0 ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&     pycode       ,
-                             LoKi::Types::TrFunVal& func         ,
-                             const std::string&     context = "" ) = 0 ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&     pycode       ,
-                             LoKi::Types::TrCutVal& func         ,
-                             const std::string&     context = "" ) = 0 ;
-    // ========================================================================
-    /** "Factory": get the the object form python code
-     *  @param pycode the python pseudo-code of the function
-     *  @param func the placeholder for the result
-     *  @param context the context lines to be executed
-     *  @return StatusCode
-     */
-    virtual StatusCode get ( const std::string&     pycode       ,
-                             LoKi::Types::TrSource& func         ,
-                             const std::string&     context = "" ) = 0 ;
-    // ========================================================================
-  } ;
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-//                                                                      The END
-// ============================================================================
-#endif // LOKI_ITRACKHYBRIDFACTORY_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/LoKiTracks.h b/Phys/LoKiTracks/LoKi/LoKiTracks.h
deleted file mode 100644
index 3aabf695c..000000000
--- a/Phys/LoKiTracks/LoKi/LoKiTracks.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// $Id$
-// ============================================================================
-#ifndef LOKI_LOKITRACKS_H 
-#define LOKI_LOKITRACKS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKiTracks 
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-#include "LoKi/Tracks.h"
-#include "LoKi/TrackIDs.h"
-#include "LoKi/TrSources.h"
-#include "LoKi/VeloHitPatternFunctions.h"
-#include "LoKi/TrackFunctions.h"
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_LOKITRACKS_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/LoKiTracks_dct.h b/Phys/LoKiTracks/LoKi/LoKiTracks_dct.h
deleted file mode 100644
index 9e48b3da7..000000000
--- a/Phys/LoKiTracks/LoKi/LoKiTracks_dct.h
+++ /dev/null
@@ -1,252 +0,0 @@
-// ============================================================================
-#ifndef LOKI_LOKITRACKS_DCT_H 
-#define LOKI_LOKITRACKS_DCT_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/Dicts.h"
-#include "LoKi/TrackIDs.h"
-#include "LoKi/VeloHitPatternFunctions.h"
-#include "LoKi/Tracks.h"
-#include "LoKi/TrSources.h"
-#include "LoKi/TrackTypes.h"
-#include "LoKi/LoKiTracks.h"
-// ============================================================================
-#include "LoKi/ITrackFunctorFactory.h"
-#include "LoKi/ITrackFunctorAntiFactory.h"
-#include "LoKi/TrackEngine.h"
-// ============================================================================
-/** @file
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- */
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Dicts 
-  {
-    // ========================================================================
-    /** @class FunCalls Calls.h LoKi/Calls.h
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-05-29
-     */
-    template <>
-    class FunCalls<LHCb::Track>
-    {
-    private:
-      // ======================================================================
-      typedef LHCb::Track                                       Type ;
-      typedef LoKi::BasicFunctors<const LHCb::Track*>::Function Fun  ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      // __call__
-      static Fun::result_type __call__ 
-      ( const Fun& fun  , const Type*           o ) { return fun ( o ) ; }
-      // __call__
-      static Fun::result_type __call__ 
-      ( const Fun& fun  , const SmartRef<Type>& o ) { return fun ( o ) ; }      
-      // ======================================================================
-      // __call__
-      static std::vector<Fun::result_type> __call__ 
-      ( const Fun& fun  , const LHCb::Track::ConstVector&     o ) 
-      { return o >> fun ; }
-      // __call__
-      static std::vector<Fun::result_type> __call__ 
-      ( const Fun& fun  , const LHCb::Track::Range&            o ) 
-      { return o >> fun ; }
-      // __call__
-      static std::vector<Fun::result_type> __call__ 
-      ( const Fun& fun  , const LHCb::Track::Container*       o ) 
-      { return o >> fun ; }
-      // __call__
-      static std::vector<Fun::result_type> __call__ 
-      ( const Fun& fun  , const LHCb::Track::Selection*       o ) 
-      { return o >> fun ; }
-      // __call__
-      static std::vector<Fun::result_type> __call__ 
-      ( const Fun& fun  , const SmartRefVector<LHCb::Track>&  o ) 
-      { return o >> fun ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      // __rrshift__
-      static std::vector<Fun::result_type> __rrshift__ 
-      ( const Fun& fun  , const LHCb::Track::ConstVector&     o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static std::vector<Fun::result_type> __rrshift__ 
-      ( const Fun& fun  , const LHCb::Track::Range&            o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static std::vector<Fun::result_type> __rrshift__ 
-      ( const Fun& fun  , const LHCb::Track::Container*       o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static std::vector<Fun::result_type> __rrshift__ 
-      ( const Fun& fun  , const LHCb::Track::Selection*       o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static std::vector<Fun::result_type> __rrshift__ 
-      ( const Fun& fun  , const SmartRefVector<LHCb::Track>&  o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Fun::result_type __rrshift__ 
-      ( const Fun& fun  , const Type*           o ) { return fun ( o ) ; }
-      // __rrshift__
-      static Fun::result_type __rrshift__ 
-      ( const Fun& fun  , const SmartRef<Type>& o ) { return fun ( o ) ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      // __rshift__
-      static LoKi::FunctorFromFunctor<const Type*,double> __rshift__            
-      ( const Fun&                          fun  , 
-        const LoKi::Functor<double,double>& o    ) { return fun >> o  ; }
-      // __rshift__
-      static LoKi::FunctorFromFunctor<const Type*,bool>   __rshift__            
-      ( const Fun&                          fun  , 
-        const LoKi::Functor<double,bool>&   o    ) { return fun >> o  ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    template <>
-    class CutCalls<LHCb::Track>
-    {
-    private:
-      // ======================================================================
-      typedef LHCb::Track                                        Type ;
-      typedef LoKi::BasicFunctors<const LHCb::Track*>::Predicate Fun  ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      // __call__
-      static Fun::result_type __call__ 
-      ( const Fun&            fun ,  
-        const Type*           o   ) { return fun ( o ) ;  }
-      // __call__
-      static Fun::result_type __call__ 
-      ( const Fun&            fun , 
-        const SmartRef<Type>& o   ) { return fun ( o ) ; }
-      //
-      // __call__ as filter 
-      // 
-      // __call__
-      static Type::ConstVector __call__ 
-      ( const Fun& fun  , const Type::ConstVector&          o )
-      { return o >> fun ; }
-      // __call__
-      static Type::ConstVector __call__ 
-      ( const Fun& fun  , const Type::Range&                o )
-      { return o >> fun ; }
-      // __call__
-      static Type::ConstVector __call__ 
-      ( const Fun& fun  , const Type::Container*            o ) 
-      { return o >> fun ; }
-      // __call__
-      static Type::ConstVector __call__ 
-      ( const Fun& fun  , const Type::Selection*            o ) 
-      { return o >> fun ; }
-      // __call__
-      static Type::ConstVector __call__ 
-      ( const Fun& fun  , const SmartRefVector<Type>&       o ) 
-      { return o >> fun ; }
-      // __call__ 
-      static Type::Vector      __call__ 
-      ( const Fun& fun  , const Type::Vector&               o ) 
-      { return o >> fun ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      // __rrshift__
-      static Type::ConstVector __rrshift__ 
-      ( const Fun& fun  , const Type::ConstVector&          o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Type::ConstVector __rrshift__ 
-      ( const Fun& fun  , const Type::Range&                o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Type::ConstVector __rrshift__ 
-      ( const Fun& fun  , const Type::Container*            o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Type::ConstVector __rrshift__ 
-      ( const Fun& fun  , const Type::Selection*            o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Type::ConstVector __rrshift__ 
-      ( const Fun& fun  , const SmartRefVector<Type>&       o ) 
-      { return o >> fun ; }
-      // __rrshift__ 
-      static Type::Vector      __rrshift__ 
-      ( const Fun& fun  , const Type::Vector&               o ) 
-      { return o >> fun ; }
-      // __rrshift__
-      static Fun::result_type  __rrshift__ 
-      ( const Fun& fun  , const Type*           o ) { return fun ( o ) ; }
-      // __rrshift__
-      static Fun::result_type  __rrshift__ 
-      ( const Fun& fun  , const SmartRef<Type>& o ) { return fun ( o ) ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      static LoKi::FunctorFromFunctor<const Type*,bool> __rshift__            
-      ( const Fun& fun  , const Fun&                        o ) 
-      { return fun >> o  ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-  } //                                             end of namespace LoKi::Dicts
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-namespace
-{
-  // ==========================================================================
-  struct _Instantiations 
-  {
-    // ========================================================================
-    // Monitoring & Extra Info    
-    LoKi::ExtraInfo::GetInfo<const LHCb::Track*>     m_53 ;
-    LoKi::ExtraInfo::CheckInfo<const LHCb::Track*>   m_54 ;
-    // the basic functions 
-    LoKi::Dicts::Funcs     <const LHCb::Track*>               m_f1   ;
-    LoKi::Dicts::VFuncs    <const LHCb::Track*>               m_v1   ;
-    // operators 
-    LoKi::Dicts::FuncOps   <const LHCb::Track*>               m_o1   ;
-    LoKi::Dicts::CutsOps   <const LHCb::Track*>               m_co1  ;
-    // functionals 
-    LoKi::Dicts::MapsOps   <const LHCb::Track*>               m_fo1  ;
-    LoKi::Dicts::PipeOps   <const LHCb::Track*>               m_fo3  ;
-    LoKi::Dicts::FunValOps <const LHCb::Track*>               m_fo5  ;
-    LoKi::Dicts::SourceOps <const LHCb::Track*>               m_fo9  ;
-    LoKi::Dicts::CutValOps <const LHCb::Track*>               m_fo11 ;
-    // infor 
-    LoKi::Dicts::InfoOps   <const LHCb::Track*>               m_i1   ;
-    // calls 
-    LoKi::Dicts::FunCalls<LHCb::Track>                        m_cf1  ;
-    LoKi::Dicts::CutCalls<LHCb::Track>                        m_cc1  ;
-    /// trivia:
-    LoKi::Functors::Empty     <const LHCb::Track*>            m_e1   ;
-    LoKi::Functors::Size      <const LHCb::Track*>            m_s1   ;
-    LoKi::Functors::FakeSource<const LHCb::Track*>            m_fs   ;
-    /// fictive constructor 
-    _Instantiations () ;
-    // ========================================================================
-  } ;  
-  // ==========================================================================
-} //                                                 end of anonymous namespace 
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_LOKITRACKS_DCT_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrSources.h b/Phys/LoKiTracks/LoKi/TrSources.h
deleted file mode 100644
index 0b1b20bd8..000000000
--- a/Phys/LoKiTracks/LoKi/TrSources.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// $Id$
-// ============================================================================
-#ifndef LOKI_TRSOURCES_H 
-#define LOKI_TRSOURCES_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/IDataProviderSvc.h"
-// ============================================================================
-// TrackEvent/RecEvent
-// ============================================================================
-#include "Event/Track.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/BasicFunctors.h"
-#include "LoKi/Interface.h"
-#include "LoKi/TrackTypes.h"
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Tracks
-  {
-    // ========================================================================
-    /** @class SourceTES 
-     * 
-     *  @see LoKi::Cuts::TrSOURCE
-     *  simple "source for the tracks from TES "
-     *  @author Vanya BELYAEV ibelyav@physics.syr.edu
-     *  @date 2006-12-07
-     */
-    class SourceTES 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Source 
-    { 
-      // ======================================================================
-      typedef LoKi::BasicFunctors<const LHCb::Track*>::Source _Source;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const std::string&              path                    , 
-        IDataProviderSvc*               svc  = 0                , 
-        const LoKi::TrackTypes::TrCuts& cuts = 
-        LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant(true) ) ; 
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const std::vector<std::string>& path                    , 
-        IDataProviderSvc*               svc  = 0                , 
-        const LoKi::TrackTypes::TrCuts& cuts = 
-        LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant(true) ) ; 
-      /// constructor from the service, TES location and cuts 
-      SourceTES
-      ( const std::string&              path     , 
-        const LoKi::TrackTypes::TrCuts& cuts     ,  
-        IDataProviderSvc*               svc  = 0 ) ;
-      /// constructor from the service, TES location and cuts 
-      SourceTES
-      ( const std::vector<std::string>& path     , 
-        const LoKi::TrackTypes::TrCuts& cuts     ,  
-        IDataProviderSvc*               svc  = 0 ) ;
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const LoKi::TrackTypes::TrCuts& cuts        ,  
-        const std::string&              path        ,
-        IDataProviderSvc*               svc  = 0    ) ;
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const LoKi::TrackTypes::TrCuts& cuts        ,  
-        const std::vector<std::string>& path        ,
-        IDataProviderSvc*               svc  = 0    ) ;
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const LoKi::TrackTypes::TrCuts& cuts  ,  
-        IDataProviderSvc*               svc   ,  
-        const std::string&              path  ) ;
-      /// constructor from the service, TES location and cuts 
-      SourceTES 
-      ( const LoKi::TrackTypes::TrCuts& cuts  ,  
-        IDataProviderSvc*               svc   ,  
-        const std::vector<std::string>& path  ) ;
-      /// copy constructor
-      SourceTES ( const SourceTES& right ) ;
-      /// MANDATORY: virtual destructor 
-      virtual ~SourceTES() ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  SourceTES* clone() const  ;
-      /// MANDATORY: the only essential method:
-      virtual result_type operator() ( /* argument */ ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream ( std::ostream& o ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      SourceTES() ;                      // the default constructor is disabled 
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// get the path 
-      const std::vector<std::string>& paths() const { return m_path ; }
-      /// get the service
-      const LoKi::Interface<IDataProviderSvc>& dataSvc() const 
-      { return m_dataSvc ; }      
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// get the cuts :
-      const LoKi::TrackTypes::TrCuts& cut() const { return m_cut ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// set the  paths
-      void setPaths  ( const std::vector<std::string>& value ) { m_path = value ; }
-      /// set the  paths
-      void addToPath ( const std::string& value ) { m_path.push_back( value ) ; }
-      /// set the  service 
-      void setDataSvc ( const                 IDataProviderSvc*  value ) 
-      { m_dataSvc = value ; }
-      /// set the  service 
-      void setDataSvc ( const LoKi::Interface<IDataProviderSvc>& value ) 
-      { m_dataSvc = value ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// get the tracks from the certain  TES location 
-      LHCb::Track::Range get 
-      ( const std::string& location        , 
-        const bool         exc      = true ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// TES locations of Tracks 
-      std::vector<std::string>  m_path ;             // TES locations of tracks 
-      /// data provider service 
-      mutable LoKi::Interface<IDataProviderSvc>  m_dataSvc ; // the service
-      /// 'on-flight' filter
-      LoKi::TrackTypes::TrCut   m_cut ;              //      'on-flight' filter
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class TESCounter 
-     *  simple functor to count number of 'good'-objects form TES 
-     *  @author Vanya BELYAEV Ivan.BElyaev@nikhef.nl
-     *  @see LoKi::Cuts::TrNUM
-     *  @date   2010-10-24
-     */
-    class TESCounter 
-      : public LoKi::Functor<void,double>
-    {
-    public:
-      // ======================================================================
-      /// constructor from the service, TES location and cuts 
-      TESCounter 
-      ( const std::string&              path                    , 
-        const LoKi::TrackTypes::TrCuts& cuts = 
-        LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant(true) ) ; 
-      /// constructor from the service, TES location and cuts 
-      TESCounter
-      ( const std::vector<std::string>& path                    , 
-        const LoKi::TrackTypes::TrCuts& cuts = 
-        LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant(true) ) ; 
-      /// MANDATORY: virtual destructor 
-      virtual ~TESCounter() ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  TESCounter* clone() const ;
-      /// MANDATORY: the only essential method:
-      virtual result_type operator() ( /* argument */ ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream ( std::ostream& o ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      TESCounter () ;                    // the default constructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the actual source 
-      SourceTES m_source ;                                 // the actual source 
-      // ======================================================================
-    } ;
-    // ========================================================================
-  } //                                            end of namespace LoKi::Tracks
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_TRSOURCES_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackCuts.h b/Phys/LoKiTracks/LoKi/TrackCuts.h
index aa6318a9a..4f95436d9 100644
--- a/Phys/LoKiTracks/LoKi/TrackCuts.h
+++ b/Phys/LoKiTracks/LoKi/TrackCuts.h
@@ -16,200 +16,6 @@ namespace LoKi
   // ==========================================================================
   namespace Cuts
   {
-    // ======================================================================== 
-    /** @var TrTYPE 
-     *  Simple function which evaluates LHCb::Track::type
-     * 
-     *  @code
-     * 
-     *    const LHCb::Track& t = ... ;
-     *    
-     *    TrCut isLong = LHCb::Track::Long == TrTYPE ;
-     *
-     *    const bool longTrack = isLong ( t ) ;
-     *   
-     *  @endcode 
-     *  
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LoKi::Tracks::Type
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-07-27
-     */
-    const LoKi::Tracks::Type                                           TrTYPE{} ;
-    // ========================================================================
-    /** @var TrALL 
-     *  trivial predicate which always return true 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant TrALL { true } ;
-    // ========================================================================
-    /** @var TrBACKWARD 
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool backward = TrBACKWARD ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag         TrBACKWARD { LHCb::Track::Backward } ;
-    // ========================================================================
-    /** @var TrCHI2
-     *  the simple function which returns LHCb::Track::Chi2
-     *  @see LHCb::Track
-     *  @see LHCb::Track::chi2
-     *  @see LoKi::Tracks::Chi2
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-07-27
-     */
-    const LoKi::Tracks::Chi2                                           TrCHI2{} ; 
-    // ========================================================================
-    /** @var TrCHI2PDOF
-     *  the simple function which returns LHCb::Track::chi2PerDoF
-     *  @see LHCb::Track
-     *  @see LHCb::Track::chi2PerDoF
-     *  @see LoKi::Tracks::Chi2PerDoF
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-07-27
-     */
-    const LoKi::Tracks::Chi2PerDoF                                 TrCHI2PDOF{} ; 
-    // ========================================================================
-    /** @var TrCLONE
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool clone = TrCLONE ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag              TrCLONE { LHCb::Track::Clone } ;
-    // ========================================================================
-    /** @typedef TrCOUNTER
-     *  Simple monitoring counter for predicates
-     *
-     *  @code 
-     *
-     *  // some predicate to be monitored
-     *  TrCut cut = ... ;
-     *
-     *  // Create the monitored predicate using the generic counter
-     *  // either local counter, or the counter from IStatSvc or ICounterSvc
-     *  StatEntity* counter = ... ; ///< the generic counter
-     *  TrCut mon = TrCOUNTER ( cut , counter ) ;
-     *
-     *  for ( ... ) 
-     *    {
-     *      ...
-     *      const LHCb::Track& t = ... ;
-     *      const bool result = mon( t ) ; ///< use the predicate
-     *      ...
-     *    }
-     *
-     *  ...
-     *  info () 
-     *     << " Monitoring results : "                       << endmsg 
-     *     << " NEntries:  #" << counter->entries ()         << endmsg 
-     *     << " Efficiency:(" << counter->eff     ()   
-     *     << "+="            << counter->effErr  () << ")%" << endmsg ;
-     *
-     *  @endcode
-     *
-     *  The alternative (recommended) way to create the monitored predicate:
-     *  @code 
-     *
-     *  TrCut cut = ... ;
-     *
-     *  TrCut mon = monitor ( cut , counter("SomeEffCounter") ) ;
-     *  
-     *  @endcode 
-     *
-     *  The substitution of the predicate by monitored predicate 
-     *  cound be done "on-flight" without the disturbing of the
-     *  actual processing:
-     *  @code
-     *
-     *  // some predicate to be monitored
-     *  TrCut cut = ... ;
-     *
-     *  if ( monitoring ) 
-     *    {
-     *       cut = monitor ( cut , "Efficiency1" ) ;
-     *    }
-     *
-     *  @endcode
-     *
-     *
-     *  @attention The string representation of the object 
-     *             is delegated to the underlying prediate,  
-     *             therefore the object is NOT recontructable 
-     *             from its string representations. It is done 
-     *             on purpose to avoid the disturbing of ids. 
-     * 
-     *  @see LoKi::Monitoring::Counter
-     *  @see LoKi::monitor
-     *  @see StatEntity
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-03-03 
-     */        
-    typedef LoKi::Monitoring::Counter<const LHCb::Track*,bool>      TrCOUNTER ;
-    // ========================================================================
-    /** @var TrDOWNSTREAM
-     *  simple predicate to check if the track has a type LHCb::Track::Downstream
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isDown = TrDOWNSTREAM ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Downstream
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrDOWNSTREAM { TrTYPE , LHCb::Track::Downstream } ;
-    // ========================================================================
-    /** @typedef TrEQUALTO
-     *  helper function to check the equality of another function to some value
-     *  @see LoKi::EqualToValue 
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    typedef LoKi::EqualToValue<const LHCb::Track*,double>           TrEQUALTO ;
-    // ======================================================================== 
-    /** @var TrFALSE
-     *  trivial predicate which always return false 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant TrFALSE { false } ;
     // ========================================================================
     /** @typedef TrFILTER  
      *  Simple predicate (wrapper) for ITrackSelector tool
@@ -231,1024 +37,6 @@ namespace LoKi
      */
     typedef LoKi::Tracks::Filter                                   TrFILTER ;
     // ========================================================================
-    /** @typedef TrHASINFO 
-     *  Trivial predicate which evaluates LHCb::Track::hasInfo
-     *  function
-     *
-     *  @code 
-     * 
-     *  const LHCb::Track& t = ... ;
-     *  TrCut hasIndex = TrHASINFO( <index> ) ;
-     * 
-     *  const bool good = hasIndex( p ) ;
-     *
-     *  @endcode 
-     *
-     * 
-     *  @see LHCb::Track
-     *  @see LoKi::Tracks::HasInfo
-     *  @see LoKi::ExtraInfo::CheckInfo
-     *  @see LoKi::ExtraInfo::hasInfo
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */    
-    typedef LoKi::Tracks::HasInfo                                   TrHASINFO ;
-    // ========================================================================
-    /** @var TrHASSTATE
-     *  Simple predicate which evaluates LHCb::Track::hasStateAt
-     *
-     *  @code 
-     * 
-     *  const LHCb::Track& t = ... ;
-     *  TrCut hasAtTT = TeHASSTATE ( LHCb::State::AtTT ) ;
-     * 
-     *  const bool good = hasAtTT ( p ) ;
-     *
-     *  @endcode 
-     *  @see LHCb::Track
-     *  @see LHCb::Track::hasStateAt
-     *  @see LHCb::State
-     *  @see LHCb::State::Location
-     *  @see LoKi::Tracks::HasStateAt
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */    
-    typedef LoKi::Tracks::HasStateAt                               TrHASSTATE ;
-    // ========================================================================
-    /** @var TrINTES
-     *  trivial predicate which checks if the object registered in TES
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const bool inTES = TrINTES ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::InTES
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::Tracks::InTES                                         TrINTES{} ;
-    // ========================================================================
-    /** @typedef TrINFO 
-     *  Trivial function which evaluates LHCb::Track::info
-     *  
-     *  @code 
-     * 
-     *  const LHCb::Track& t = ... ;
-     *
-     *  const int index = ... ;
-     *
-     *  TrFun info = TrINFO( index , -1000 ) ;
-     * 
-     *  const double result = info( t ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::info
-     *  @see LoKi::ExtraInfo::GetInfo
-     *  @see LoKi::ExtraInfo::info
-     *  @see LoKi::Tracks::Info
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */
-    typedef LoKi::Tracks::Info                                         TrINFO ;
-    // ========================================================================
-    /** @var TrINVALID
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool invalid = TrINVALID ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag          TrINVALID { LHCb::Track::Invalid } ;
-    // ========================================================================
-    /** @var TrIPSELECTED
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool ok = TrIPSELECTED ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag    TrIPSELECTED { LHCb::Track::IPSelected } ;
-    // ========================================================================
-    /** @typedef TrISFLAG
-     *  Check is the track has a given flag:
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   // create the predicate:
-     *   const TrCut isClone = TrISFLAG ( LHCb::Track::Clone ) ;
-     *
-     *   cons bool clone = isClone ( track ) ;
-     *
-     *  @endcode
-     *  
-     *  @see LoKi::Cuts::TrBACKWARD
-     *  @see LoKi::Cuts::TrINVALID
-     *  @see LoKi::Cuts::TrCLONE
-     *  @see LoKi::Cuts::TrUSED
-     *  @see LoKi::Cuts::TrIPSELECTED
-     *  @see LoKi::Cuts::TrPIDSELECTED
-     *  @see LoKi::Cuts::TrSELECTED
-     *  @see LoKi::Cuts::TrL0CANDIDATE
-     *  @see LoKi::Tracks::Momentum
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    typedef LoKi::Tracks::CheckFlag                                  TrISFLAG ;
-    // ========================================================================
-    /** @typedef TrISONTRACK
-     *  Simple predicate whcih evaluates LHCb::Track::isOnTrack
-     * 
-     *  @code
-     *
-     *   const LHCb::Track& t = ... ;
-     *  
-     *   const LHCb::LHCbID& id = ... ;
-     *   TrCut ok = TrISONTRACK ( id ) ;
-     *
-     *   const bool good = ok ( t ) ;
-     *
-     *  @endcode 
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-07-27
-     */
-    typedef LoKi::Tracks::IsOnTrack                               TrISONTRACK ;
-    // ========================================================================
-    /** @var TrKEY
-     *  trivial estimator of the key 
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double key = TrKEY ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::Key
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::Tracks::Key                                             TrKEY{} ;
-    // ========================================================================
-    /** @var TrL0CANDIDATE
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool ok = TrL0CANDIDATE( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag  TrL0CANDIDATE { LHCb::Track::L0Candidate } ;
-    // ========================================================================
-    /** @var TrLONG
-     *  simple predicate to check if the track has a type LHCb::Track:Long
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isLong = TrLONG ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Long
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrLONG { TrTYPE , LHCb::Track::Long } ;
-    // ========================================================================
-    /** @var TrMUON
-     *  simple predicate to check if the track has a type LHCb::Track:Muon
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isMuon = TrMUON ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Muon
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrMUON { TrTYPE , LHCb::Track::Muon } ;
-    // ========================================================================
-    /** @var TrNONE
-     *  trivial predicate which always return false 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant TrNONE { false } ;
-    // ========================================================================
-    /** @var TrONE 
-     *  trivial function which always return 1 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::Constant       TrONE { 1 } ;
-    // ======================================================================== 
-    /** @var TrP
-     *  trivial estimator of the momentum of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double p = TrP ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::Momentum
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::Tracks::Momentum                                          TrP{} ;
-    // ========================================================================
-    /** @var TrPX
-     *  trivial estimator of the x-component momentum of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double px = TrPX ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::Momentum
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::MomentumX                                       TrPX{} ;
-    // ========================================================================
-    /** @var TrPY
-     *  trivial estimator of the y-component momentum of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double py = TrPY ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::MomentumY
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::MomentumY                                       TrPY{} ;
-    // ========================================================================
-    /** @var TrPZ
-     *  trivial estimator of the z-component momentum of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double pz = TrPZ ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::MomentumZ
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::MomentumZ                                       TrPZ{} ;
-    // ========================================================================
-    /** @var TrPIDSELECTED
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool ok = TrPIDSELECTED ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag  TrPIDSELECTED { LHCb::Track::PIDSelected } ;
-    // ========================================================================
-    /** @typedef TrPLOT
-     *  Simple monitoring histogram for the functions
-     *
-     *  @code 
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  // Create the monitored function using the histogram:
-     *  AIDA::IHistogram1D* histo = ... ;
-     *  TrFun mon = PLOT ( fun , histo ) ;
-     *
-     *  for ( ... ) 
-     *    {
-     *      ...
-     *      const LHCb::Track& t = ... ;
-     *      const double result = mon( t ) ; ///< use the function
-     *      ...
-     *    }
-     *
-     *  @endcode
-     *
-     *  The alternative (recommended) way to create the monitored function
-     *  @code 
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  AIDA::IHistogram1D* histo = ... ;
-     *  TrFun mon = monitor ( fun , histo ) ;
-     *  
-     *  @endcode 
-     *
-     *  The substitution of the function by monitored function 
-     *  cound be done "on-flight" without the disturbing of the
-     *  actual processing:
-     *  @code
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  if ( monitoring ) 
-     *    {
-     *       AIDA::IHistogram1D* histo = ... ;
-     *       fun = monitor ( fun , histo ) ;
-     *    }
-     *
-     *  @endcode
-     * 
-     *  @attention The string representation of the object 
-     *             is delegated to the underlying function,  
-     *             therefore the object is NOT recontructable 
-     *             from its string representations. It is done 
-     *             on purpose to avoid the disturbing of ids. 
-     * 
-     *  @see LoKi::Monitoring::Plot
-     *  @see LoKi::monitor
-     *  @see AIDA::IHistogram1D
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-03-03 
-     */        
-    typedef LoKi::Monitoring::Plot<const LHCb::Track*,double>          TrPLOT ;
-    // ========================================================================
-    /** @var TrPROBCHI2
-     *  the simple function which returns LHCb::Track::probChi2
-     *  @see LHCb::Track
-     *  @see LHCb::Track::probChi2
-     *  @see LoKi::Tracks::ProbChi2
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-07-27
-     */
-    const LoKi::Tracks::ProbChi2                                   TrPROBCHI2{} ; 
-    // ========================================================================
-    /** @var TrPT
-     *  trivial estimator of the tarnsverse momentum of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double pt = TrPT ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::TransverseMomentum
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::Tracks::GhostProb                                   TrGHOSTPROB{} ; 
-    // ========================================================================
-    /** @var TrGHOSTPROB
-     *  trivial estimator of the ghost probability of the track
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const double pt = TrGHOSTPROB ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::GhostProb
-     *  @author Sascha Stahl sascha.stahl@cern.ch
-     *  @date   2016-01-12
-     */
-    const LoKi::Tracks::TransverseMomentum                               TrPT{} ;
-    // =========================================================================
-    /** @var TrHAST
-     *  Check if track is of a type that goes thro T
-     
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const bool ok = TrHAST ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::HasT
-     *  @see LHCb::Track::hasT
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::HasT                                           TrHAST{} ;
-    // ========================================================================
-    /** @var TrHASVELO
-     *  Check if track is of a type that goes thro Velo
-     
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const bool ok = TrHASVELO ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::HasVelo
-     *  @see LHCb::Track::hasVelo
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::HasVelo                                     TrHASVELO{} ;
-    // ========================================================================
-    /** @var TrHASTT
-     *  Check if track is of a type that goes thro TT
-     
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const bool ok = TrHASTT ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::HasTT
-     *  @see LHCb::Track::hasTT 
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-03-18
-     */
-    const LoKi::Tracks::HasTT                                         TrHASTT{} ;
-    // ========================================================================
-    /** @var TrQ
-     *  trivial estimator of the charge of the track 
-     *
-     *  @code
-     *
-     *   const LHCb::Track& track = ... ;
-     *
-     *   const bool positive = 0 < TrQ ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LoKi::Tracks::Charge
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::Tracks::Charge                                            TrQ{} ;
-    // ========================================================================
-    /** @var TrSELECTED
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool ok = TrSELECTED ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag        TrSELECTED { LHCb::Track::Selected } ;
-    // ========================================================================
-    /** @typedef TrSELECTOR
-     *  Simple predicate (wrapper) for ITrackSelector tool
-     *  
-     *  @code 
-     * 
-     *    const LHCb::Track&    track = ... ;
-     *    // get the tool: 
-     *    const ITrackSelector* tool = ... ;
-     *    //create the function:
-     *    const TrCut accept = TrSELECTOR ( tool ) ;
-     *    // use it!
-     *    const bool OK = accept ( track ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::Selector
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    typedef LoKi::Tracks::Selector                                 TrSELECTOR ;
-    // ========================================================================
-    /** @typedef TrSINFO 
-     *  "Smart-Extra-Info" function, 
-     *  it checks the information with the given key in "Extra Info",
-     *  for the missing information the supplied function will 
-     *  be evaluated and (optinaly) the informatin will be added   
-     *  to "extra info"
-     *  
-     *  @code 
-     * 
-     *  const LHCb::Track& t = ... ;
-     *
-     *  const int index = ... ;
-     *
-     *  const TrFrun& fun = ... ;                   
-     *
-     *  TrFun sinfo = TrSINFO( index , fun , true ) ;
-     * 
-     *  const double result = sinfo( t ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::info
-     *  @see LoKi::ExtraInfo::GetSmartInfo
-     *  @see LoKi::ExtraInfo::info
-     *  @see LoKi::ExtraInfo::hasInfo
-     *  @see LoKi::ExtraInfo::addInfo
-     *  @see LoKi::Tracks::SmartInfo
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-08-14
-     */
-    typedef LoKi::Tracks::SmartInfo                                   TrSINFO ;
-    // ========================================================================
-    /** @typedef TrSSWITCH
-     *  Simple "switch"
-     *  The function evaluates the predicate and returns 
-     *  one of the predefined values, depending on result on 
-     *  predicate evaluation.
-     *  In some sense it is a conversion of "predicate" to "function"
-     * 
-     *  @code
-     *
-     *   const LHCb::Track& = ...  ;
-     *
-     *   TrFun fun = TrSSWITCH( TrPT > 1000 , 1 , -1 ) 
-     *
-     *   const double value = fun( p ) ;
-     *
-     *  @endcode 
-     *
-     *  For this example function returns 1 if track has Pt>1GeV 
-     *  and -1 otherwise 
-     *
-     *  @see LoKi::SipleSwitch 
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    typedef LoKi::SimpleSwitch<const LHCb::Track*>                  TrSSWITCH ;
-    // ========================================================================    
-    /** @typedef TrSTAT
-     *  Simple monitoring counter for the functions
-     *
-     *  @code 
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  // Create the monitored function using the generic counter
-     *  // either local counter, or the counter from IStatSvc or ICounterSvc
-     *  StatEntity* counter = ... ; ///< the generic counter
-     *  TrFun mon = TrSTAT ( fun , counter ) ;
-     *
-     *  for ( ... ) 
-     *    {
-     *      ...
-     *      const LHCb::Track& t = ... ;
-     *      const double result = mon( t ) ; ///< use the function
-     *      ...
-     *    }
-     *
-     *  ...
-     *  info () 
-     *     << " Monitoring results : "                 << endmsg 
-     *     << " NEntries:  #" << counter->entries  ()  << endmsg 
-     *     << " TotalSum:   " << counter->flag     ()  << endmsg 
-     *     << " Mean+-RMS:  " << counter->flagMean () 
-     *     << "+="            << counter->flagRMS  ()  << endmsg      
-     *     << " Min/Max:    " << counter->flagMin  ()  
-     *     << "/"             << counter->flagMax  ()  << endmsg ;
-     *
-     *  @endcode
-     *
-     *  The alternative (recommended) way to create the monitored function
-     *  @code 
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  TrFun mon = monitor ( fun , counter("SomeCounter") ) ;
-     *  
-     *  @endcode 
-     *
-     *  The substitution of the function by monitored function 
-     *  could be done "on-flight" without the disturbing of the
-     *  actual processing:
-     *  @code
-     *
-     *  // some function to be monitored
-     *  TrFun fun = ... ;
-     *
-     *  if ( monitoring ) 
-     *    {
-     *       fun = monitor ( fun , "MonitoredFun" ) ;
-     *    }
-     *
-     *  @endcode
-     *
-     *  @attention The string representation of the object 
-     *             is delegated to the underlying function,  
-     *             therefore the object is NOT recontructable 
-     *             from its string representations. It is done 
-     *             on purpose to avoid the disturbing of ids. 
-     * 
-     *  @see LoKi::Monitoring::Counter
-     *  @see LoKi::monitor
-     *  @see StatEntity
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-03-03 
-     */        
-    typedef LoKi::Monitoring::Counter<const LHCb::Track*,double>       TrSTAT ;
-    // ========================================================================
-    /** @typedef TrSWITCH
-     *  "switch"
-     *  The function evaluates the predicate and returns 
-     *  the values of one of the predefined functions, 
-     *  depending on result on predicate evaluation.
-     * 
-     *  @code
-     *
-     *
-     *   const LHCb::Track& = ...  ;
-     *
-     *   TrFun fun = TrSWITCH( TrQ >= 0 , TrPT , -1*TrPT ) 
-     *
-     *   const double value = fun( p ) ;
-     *
-     *  @endcode 
-     *
-     *  For this example function returns pt  for tracks of positive charge 
-     *  and -1*pt otherwise 
-     *  @see LoKi::Cuts::TrQ 
-     *  @see LoKi::Cuts::TrPT 
-     *  @see LoKi::Switch 
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    typedef LoKi::Switch<const LHCb::Track*>                         TrSWITCH ;
-    // ========================================================================
-    /** @var TrTRUE
-     *  trivial predicate which always return true 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant TrTRUE { true } ;
-    // ========================================================================
-    /** @var TrTTRACK
-     *  simple predicate to check if the track has a type LHCb::Track::Ttrack
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isT = TrTTRACK( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Ttrack
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrTTRACK { TrTYPE , LHCb::Track::Ttrack } ;
-    // ========================================================================
-    /** @var TrUNKNOWN
-     *  simple predicate to check if the track has a type LHCb::Track::TypeUnknown
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isUnknown = TrUNKNOWN ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::TypeUnknown
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrUNKNOWN { TrTYPE , LHCb::Track::TypeUnknown } ;
-    // ========================================================================
-    /** @var TrUPSTREAM
-     *  simple predicate to check if the track has a type LHCb::Track::Upstream
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isUp = TrUPSTREAM ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Upstream
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrUPSTREAM { TrTYPE , LHCb::Track::Upstream } ;
-    // ========================================================================
-    /** @var TrUSED
-     *  simple objects which check the "Flag" of the track:
-     *
-     *  @code 
-     *   
-     *    const LHCb::Track& track = ... ;
-     * 
-     *    const bool used = TrUSED ( track ) ;
-     *
-     *  @endcode 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::Tracks::CheckFlag                TrUSED { LHCb::Track::Used } ;
-    // ========================================================================
-    /** @var TrVELO 
-     *  simple predicate to check if the track has a type LHCb::Track:Velo
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isVelo = TrVELO ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::Velo
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrVELO { TrTYPE , LHCb::Track::Velo } ;
-    // ========================================================================
-    /** @var TrVELOR
-     *  simple predicate to check if the track has a type LHCb::Track:VeloR
-     *
-     *  @code
-     *
-     *  const LHCb::Track&t = ... ;
-     *  const bool isVeloR = TrVELOR ( t ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::Track::type
-     *  @see LHCb::Track::Types
-     *  @see LHCb::Track::VeloR
-     *  @see LoKi::Cuts::TrTYPE
-     *  @see LoKi::EqualToValue
-     *  @see LoKi::Tracks::CheckFlag
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */     
-    const LoKi::EqualToValue<const LHCb::Track*,double> 
-    TrVELOR { TrTYPE , LHCb::Track::VeloR } ;
-    // ========================================================================
-    /** @var TrZERO
-     *  trivial function which always return 0 
-     *
-     *  @see LoKi::Constant
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */
-    const LoKi::BasicFunctors<const LHCb::Track*>::Constant TrZERO { 0 } ;
-    // ========================================================================
-    /** @typedef TrSTATEZ 
-     *  simple evaluator for Z-position of the certain state 
-     *  @code
-     * 
-     *  const TrSTATEZ fun = TrSTATEZ ( LHCb::State::FirstMeasurement ) ;
-     *  const LHCb::Track&t = ... ;
-     *
-     *  const double value =  fun ( t ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::StateZ
-     *  @see LoKi::Cuts::TsFIRSTHITZ
-     *
-     *  @author Vanya Belyaev Ivan.Belyaev@nikhef.nl
-     *  @date 2010-06-02
-     */
-    typedef LoKi::Tracks::StateZ                                     TrSTATEZ ;
-    // ========================================================================
-    /** @var TrFIRSTHITZ 
-     *  simple evaluator for Z-position of the firts measuremnet 
-     *  @code
-     * 
-     *  const LHCb::Track&t = ... ;
-     *
-     *  const double value =  TrFIRSTHITZ ( t ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::StateZ
-     *  @see LoKi::Cuts::TsSTATEZ 
-     *
-     *  @author Vanya Belyaev Ivan.Belyaev@nikhef.nl
-     *  @date 2010-06-02
-     */
-    const LoKi::Tracks::StateZ TrFIRSTHITZ { LHCb::State::FirstMeasurement } ;
-    // ========================================================================
-    /** @typedef TrCOV2 
-     *  Get the element of track covariance matrix 
-     *
-     *  @code 
-     *
-     *    // use th first state 
-     *    const TrCOV2 covXX_1 = TrCOV2( 0 , 0  ) ;
-     *
-     *    // use the specific state:
-     *    const TrCOV2 covXX_2 = TrCOV2(  LHCb::State::AtTT  , 0 , 0  ) ; 
-     *
-     *    // use the state,closest to some z : 
-     *    const double z = ... ;
-     *    const TrCOV2 covXX_3 = TrCOV2(  z  , 0 , 0  ) ; 
-     *
-     *    const LHCb::Track* track  = ... ;
-     * 
-     *    const double c1 = covXX_1 ( track ) ;
-     *    const double c2 = covXX_2 ( track ) ;
-     *    const double c3 = covXX_3 ( track ) ;
-     *
-     *  @endcode
-     *
-     *  @see LHCb::Track
-     *  @see LHCb::State
-     *  @see LHCb::State
-     *  @see Gaudi::TrackSymMatrix
-     *  @see LoKi::Tracks::Cov2 
-     *  @author Vanya BELYAEV Ivan.Belyaev@cer.ch
-     *  @date 2010-12-09
-     */
-    typedef LoKi::Tracks::Cov2                                         TrCOV2 ;
-    // ========================================================================
-    /** @var TrPATQUALITY 
-     *  Accessor to LHCb::Track::PatQuality
-     */
-    const LoKi::Tracks::Info TrPATQUALITY { LHCb::Track::PatQuality , -1000 } ;
-    // ========================================================================
-    /** @var TrMATCHCHI2
-     *  Accessor to LHCb::Track::MatchChi2
-     */
-    const LoKi::Tracks::Info TrMATCHCHI2 { LHCb::Track::MatchChi2 , -1000 } ;
-    // ========================================================================
-    /** @var TrFITVELOCHI2
-     *  Accessor to LHCb::Track::FitVeloChi2
-     */
-    const LoKi::Tracks::Info TrFITVELOCHI2 { LHCb::Track::FitVeloChi2 , -1000 } ;
-    // ========================================================================
-    /** @var TrFITVELONDOF
-     *  Accessor to LHCb::Track::FitVeloNDof
-     */
-    const LoKi::Tracks::Info TrFITVELONDOF { LHCb::Track::FitVeloNDoF , -1000 } ;
-    // ========================================================================
-    /** @var TrFITTCHI2
-     *  Accessor to LHCb::Track::FitTChi2
-     */
-    const LoKi::Tracks::Info TrFITTCHI2 { LHCb::Track::FitTChi2 , -1000 } ;
-    // ========================================================================
-    /** @var TrFITTNDOF
-     *  Accessor to LHCb::Track::FitTNDof
-     */
-    const LoKi::Tracks::Info TrFITTNDOF { LHCb::Track::FitTNDoF , -1000 } ;
-    // ========================================================================
-    /** @var TrFITMATCHCHI2
-     *  Accessor to LHCb::Track::FitMatchChi2
-     */
-    const LoKi::Tracks::Info TrFITMATCHCHI2 { LHCb::Track::FitMatchChi2 , -1000 } ;
-    // ========================================================================
-    /** @var TrTSALIKELIHOOD
-     *  Accessor to LHCb::Track::TsaLikelihood
-     */
-    const LoKi::Tracks::Info TrTSALIKELIHOOD { LHCb::Track::TsaLikelihood , -1000 } ;
-    // ========================================================================
-    /** @var TrCLONEDIST
-     *  Accessor to LHCb::Track::CloneDist
-     */
-    const LoKi::Tracks::Info TrCLONEDIST { LHCb::Track::CloneDist , 1 * Gaudi::Units::km } ;
-    // ========================================================================
-    /** @var TrNVELOMISS 
-     *  @see Hlt::MissedVeloHits
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-01-28
-     */
-    const LoKi::Tracks::NVeloMissed                               TrNVELOMISS{} ;
-    // ========================================================================
-    /** @var TrNTHITS 
-     *  get effective number of T-hits for Johannes:  2x#IT + #OT
-     *  @see LoKi::Tracks::NTHits
-     *  @see LoKi::Cuts::TrTNORMIDC
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-02-02
-     */
-    const LoKi::Tracks::NTHits                                       TrNTHITS{} ;
-    // ========================================================================
-    /** @var TrNTHITS 
-     *  get effective number of T-hits for Vava:  2x#IT + #OT
-     *  @see LoKi::Tracks::NTHits
-     *  @see LoKi::Cuts::TrNTHITS
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-02-02
-     */
-    const LoKi::Tracks::NTHits                                     TrTNORMIDC{} ;
-    // ========================================================================
     /** @typedef  Tr_FASTDOCATOBEAMLINE
      *  Fast DOCA to beam line using TTrDOCA and BEAMSPOT, similar to the
      *  BEAMSPOTRHO cut
diff --git a/Phys/LoKiTracks/LoKi/TrackEngine.h b/Phys/LoKiTracks/LoKi/TrackEngine.h
deleted file mode 100644
index 3e9f98f93..000000000
--- a/Phys/LoKiTracks/LoKi/TrackEngine.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// ===========================================================================
-#ifndef LOKI_TRACKENGINE_H 
-#define LOKI_TRACKENGINE_H 1
-// ===========================================================================
-// Include files
-// ===========================================================================
-#include <string>
-// ===========================================================================
-// LoKi
-// ===========================================================================
-#include "LoKi/TrackTypes.h"
-// ===========================================================================
-namespace LoKi 
-{  
-  // =========================================================================
-  namespace Hybrid 
-  {
-    // =======================================================================
-    /** @class TrackEngine LoKi/TrackEngine.h
-     *  
-     *  Helper class for implementation of Hybrid Tools 
-     *
-     *  This file is a part of LoKi project - 
-     *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-     *
-     *  The package has been designed with the kind help from
-     *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-     *  contributions and advices from G.Raven, J.van Tilburg, 
-     *  A.Golutvin, P.Koppenburg have been used in the design.
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2004-06-30e
-     */
-    class TrackEngine
-    {
-    public:
-      // ======================================================================
-      /// constructor
-      TrackEngine () ;
-      /// destructor 
-      virtual ~TrackEngine( );
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// add the cut 
-      StatusCode process
-      ( const std::string&          name , 
-        const LoKi::Types::TrCuts&  cut  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process
-      ( const std::string&          name , 
-        const LoKi::Types::TrFunc&  func ) const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      // functional part
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrMaps&     fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrPipes&    fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrFunVals&  fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrSources&  fun  ) const ;
-      // ======================================================================
-    } ;  
-    // ========================================================================
-  } //                                            end of namespace LoKi::Hybrid
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// The END 
-// ============================================================================
-#endif // LOKI_CUTSHOLDERHELPER_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackEngineActor.h b/Phys/LoKiTracks/LoKi/TrackEngineActor.h
deleted file mode 100644
index c61c6d710..000000000
--- a/Phys/LoKiTracks/LoKi/TrackEngineActor.h
+++ /dev/null
@@ -1,114 +0,0 @@
-// ===========================================================================
-#ifndef LOKI_TRACKENGINEACTOR_H 
-#define LOKI_TRACKENGINEACTOR_H 1
-// ===========================================================================
-// Include files
-// ===========================================================================
-// LoKi
-// ===========================================================================
-#include "LoKi/Interface.h"
-#include "LoKi/ITrackFunctorAntiFactory.h"
-// ===========================================================================
-namespace LoKi
-{
-  // =========================================================================
-  namespace Hybrid
-  {
-    // =======================================================================
-    /** @class TrEngineActor LoKi/TrackEngineActor.h
-     *  
-     *  This file is a part of LoKi project - 
-     *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-     *
-     *  The package has been designed with the kind help from
-     *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-     *  contributions and advices from G.Raven, J.van Tilburg, 
-     *  A.Golutvin, P.Koppenburg have been used in the design.
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2004-06-29
-     */
-    class TrackEngineActor
-    { 
-    public:
-      // ======================================================================
-      // get the static instance 
-      static TrackEngineActor& instance() ;
-      // ======================================================================
-      /// connect the hybrid tool for code translation 
-      StatusCode connectTool (       LoKi::ITrackFunctorAntiFactory* tool ) ;
-      // ======================================================================
-      /// disconnect the tool 
-      StatusCode releaseTool ( const LoKi::ITrackFunctorAntiFactory* tool ) ;
-      // ======================================================================
-      /// propagate the cut to the tool 
-      StatusCode process
-      ( const std::string&          name , 
-        const LoKi::Types::TrCuts&  cut  ) const ;
-      // ======================================================================
-      /// propagate the function to the tool 
-      StatusCode process 
-      ( const std::string&          name , 
-        const LoKi::Types::TrFunc&  func ) const ;    
-      // ======================================================================
-    public:
-      // ======================================================================
-      // functional part for LHCb::Track 
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrMaps&     fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrPipes&    fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrFunVals&  fun  ) const ;
-      // ======================================================================
-      /// add the function 
-      StatusCode process 
-      ( const std::string&             name , 
-        const LoKi::Types::TrSources&  fun  ) const ;
-      // ======================================================================      
-    protected:
-      // ======================================================================
-      /// Standard constructor
-      TrackEngineActor() ;
-      /// virtual & protected destructor 
-      virtual ~TrackEngineActor( ); // virtual & protected destructor 
-      // ======================================================================      
-    private:
-      // ======================================================================
-      /// just to save some lines 
-      template <class TYPE>
-      inline StatusCode _add 
-      ( const std::string& name , 
-        const TYPE&        cut )  const ; // save some lines 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the copy contructor is disabled 
-      TrackEngineActor           ( const TrackEngineActor& ); // no-copy 
-      /// the assignement operator is disabled 
-      TrackEngineActor& operator=( const TrackEngineActor& ); // no-assignement 
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the tool itself 
-      LoKi::Interface<LoKi::ITrackFunctorAntiFactory> m_tool ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-  } //                                            end of namespace LoKi::Hybrid 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// The END 
-// ============================================================================
-#endif // LOKI_CUTSHOLDER_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackFactoryLock.h b/Phys/LoKiTracks/LoKi/TrackFactoryLock.h
deleted file mode 100644
index b878ad23d..000000000
--- a/Phys/LoKiTracks/LoKi/TrackFactoryLock.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// $Id$
-// ============================================================================
-#ifndef LOKI_TRACKHYBRIDLOCK_H 
-#define LOKI_TRACKHYBRIDLOCK_H 1
-// ============================================================================
-// $URL$ 
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/Interface.h"
-#include "LoKi/ITrackFunctorAntiFactory.h"
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Hybrid 
-  {
-    // ========================================================================
-    /** @class TrackFactoryLock LoKi/TrackFactoryLock.h 
-     *
-     *  Helper class (sentry) to connect ITrackFunctorAntiFactory to TrackEngine 
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-06-09
-     *
-     *  $Revision$
-     *  Last Modification $Date$ 
-     *                 by $Author$ 
-     *
-     */
-    class TrackFactoryLock 
-    {
-    public:
-      // ======================================================================
-      /// contructor : Lock 
-      TrackFactoryLock  ( LoKi::ITrackFunctorAntiFactory* tool ) ; 
-      /// destrcutor : UnLock
-      virtual ~TrackFactoryLock () ;                    // destrcutor : UnLock
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// no default constructor 
-      TrackFactoryLock () ;                     // no default constructor 
-      /// no copy constructor 
-      TrackFactoryLock ( const TrackFactoryLock& ) ; // no copy constructor 
-      /// no assignement opeartor 
-      TrackFactoryLock& operator = ( const TrackFactoryLock& ) ; 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the tool itself 
-      LoKi::Interface<LoKi::ITrackFunctorAntiFactory> m_tool ; // the tool 
-      // ======================================================================
-    } ;
-    // ========================================================================
-  } //                                            end of namespace LoKi::Hybrid 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// The END 
-// ============================================================================
-#endif // LOKI_HYBRIDLOCK_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackFunctions.h b/Phys/LoKiTracks/LoKi/TrackFunctions.h
deleted file mode 100644
index 5532ddb24..000000000
--- a/Phys/LoKiTracks/LoKi/TrackFunctions.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// $Id: Tracks.h 199592 2016-01-12 19:10:37Z sstahl $
-// ============================================================================
-#ifndef LOKI_TRACKFUNCTIONS_H 
-#define LOKI_TRACKFUNCTIONS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/Kernel.h"
-// ============================================================================
-// Event 
-// ============================================================================
-#include "Event/Track.h"
-#include "Event/State.h"
-// ============================================================================
-// LHCbMath 
-// ============================================================================
-#include "LHCbMath/ValueWithError.h"
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  namespace Tracks
-  {
-    // ========================================================================
-    /** get the transverse momentum (and uncertainty) from the state
-     *  @param state (INPUT) the  state 
-     *  @return transverse momentum (and uncertainty) from the given state 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2016-03-05
-     */
-    GAUDI_API
-    Gaudi::Math::ValueWithError state_pt       ( const LHCb::State& state ) ;
-    // ========================================================================
-    /** get the phi angle (and uncertainty) from the state
-     *  @param state (INPUT) the  state 
-     *  @return phi angle  (and uncertainty) from the given state 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2016-03-05
-     */
-    GAUDI_API
-    Gaudi::Math::ValueWithError state_phi      ( const LHCb::State& state ) ;
-    // ========================================================================
-    /** get the theta angle (and uncertainty) from the state
-     *  @param state (INPUT) the  state 
-     *  @return theta angle (and uncertainty) from the given state 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2016-03-05
-     */
-    GAUDI_API
-    Gaudi::Math::ValueWithError state_theta    ( const LHCb::State& state ) ;
-    // ========================================================================
-    /** get the pseudorapidity (and uncertainty) from the state
-     *  @param state (INPUT) the  state 
-     *  @return pseudorapidity (and uncertainty) from the given state 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2016-03-05
-     */
-    GAUDI_API
-    Gaudi::Math::ValueWithError state_eta      ( const LHCb::State& state ) ;
-    // ========================================================================
-  } //                                            end of namespace LoKi::Tracks
-  // ==========================================================================
-} //                                                      end of namespace LoKi 
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_TRACKFUNCTIONS_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackIDs.h b/Phys/LoKiTracks/LoKi/TrackIDs.h
deleted file mode 100644
index b13f83e12..000000000
--- a/Phys/LoKiTracks/LoKi/TrackIDs.h
+++ /dev/null
@@ -1,445 +0,0 @@
-// $Id$
-// ============================================================================
-#ifndef LOKI_TRACKIDS_H 
-#define LOKI_TRACKIDS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/Kernel.h"
-// ============================================================================
-// Kernel
-// ============================================================================
-#include "Kernel/OTChannelID.h"
-#include "Kernel/STChannelID.h"
-// ============================================================================
-// Event 
-// ============================================================================
-#include "Event/Track.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-// ============================================================================
-/** @file LoKi/TrackIDs.h
- *  Collection of functors that deals with LHCbIDs for Tracks 
- *  (on request from Wouter Hulsbergen)
- *
- *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
- *  @date   2009-12-17
- */
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  namespace Tracks 
-  {
-    // ========================================================================
-    /** @class CountIDs
-     *  Simple functor to count LHCbIDs that satisfy certain criteria 
-     *  @author  Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date   2009-12-17
-     */
-    class GAUDI_API CountIDs 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      // the actual type of pointer to member function
-      typedef bool (LHCb::LHCbID::*PMF)() const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from pointer to member function 
-      CountIDs ( PMF fun ) ;
-      /// constructor from pointer to member function name  
-      CountIDs ( const std::string& name ) ;
-      /// MANDATORY: virtual destructor
-      virtual ~CountIDs() ;
-      /// MANDATORY: clone method ("virtual consttructor")
-      virtual  CountIDs* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// The default contructor is disabled 
-      CountIDs() ;                        // The default contructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the pointer to member function 
-      PMF  m_pmf ;                            // the pointer to member function
-      /// the actual fuinctor name 
-      std::string m_nick ;                          // the actual fuinctor name
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class CountOTIDs
-     *  Simple functor to count OTChannelID that satisfy certain criteria 
-     *  @author  Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date   2009-12-17
-     */
-    class GAUDI_API CountOTIDs 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// the actual type of pointer to member function
-      typedef unsigned int (LHCb::OTChannelID::*PMF)() const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from pointer to member function 
-      CountOTIDs ( PMF fun , const unsigned int i ) ;
-      /// constructor from pointer to member function & list  
-      CountOTIDs ( PMF fun , const std::vector<unsigned int>& i ) ;
-      /// constructor from pointer to member function & range 
-      CountOTIDs ( const unsigned int imin , 
-                   PMF                fun  , 
-                   const unsigned int imax ) ;
-      /// constructor from pointer to member function name  
-      CountOTIDs ( const std::string& name , const unsigned int i ) ;
-      /// constructor from pointer to member function name  & list 
-      CountOTIDs ( const std::string& name , const std::vector<unsigned int>& i  ) ;
-      /// constructor from pointer to member function name  & range
-      CountOTIDs ( const unsigned int imin , 
-                   const std::string& nick , 
-                   const unsigned int imax ) ;
-      /// MANDATORY: virtual destructor
-      virtual ~CountOTIDs() ;
-      /// MANDATORY: clone method ("virtual consttructor")
-      virtual  CountOTIDs* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// The default contructor is disabled 
-      CountOTIDs () ;                     // The default contructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// set the nick properly 
-      void setNick ( PMF pmf ) ;                       // set the nick properly 
-      /// set PMF properly 
-      void setPmf  ( const std::string& nick ) ;       //      set PMF properly 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the pointer to member function 
-      PMF  m_pmf ;                            // the pointer to member function
-      /// the list of values 
-      std::vector<unsigned int>   m_uints ;  //       the list of values 
-      /// the low edge 
-      unsigned int m_imin ;                           // the low edge 
-      /// the high edge 
-      unsigned int m_imax ;                          // the high edge      
-      /// the actual fuinctor name 
-      std::string m_nick ;                          // the actual fuinctor name
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class CountSTIDs
-     *  Simple functor to count STChannelID that satisfy certain criteria 
-     *  @author  Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date   2009-12-17
-     */
-    class GAUDI_API CountSTIDs 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// the actual type of pointer to member function
-      typedef unsigned int (LHCb::STChannelID::*PMF)() const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from pointer to member function 
-      CountSTIDs ( PMF fun , const unsigned int i ) ;
-      /// constructor from pointer to member function & list  
-      CountSTIDs ( PMF fun , const std::vector<unsigned int>& i ) ;
-      /// constructor from pointer to member function & range 
-      CountSTIDs ( const unsigned int imin , 
-                   PMF                fun  , 
-                   const unsigned int imax ) ;
-      /// constructor from pointer to member function name  
-      CountSTIDs ( const std::string& name , const unsigned int i ) ;
-      /// constructor from pointer to member function name  & list 
-      CountSTIDs ( const std::string& name , const std::vector<unsigned int>& i  ) ;
-      /// constructor from pointer to member function name  & range
-      CountSTIDs ( const unsigned int imin , 
-                   const std::string& nick , 
-                   const unsigned int imax ) ;
-      /// MANDATORY: virtual destructor
-      virtual ~CountSTIDs() ;
-      /// MANDATORY: clone method ("virtual consttructor")
-      virtual  CountSTIDs* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// The default contructor is disabled 
-      CountSTIDs() ;                      // The default contructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// set the nick properly 
-      void setNick ( PMF pmf ) ;                       // set the nick properly 
-      /// set PMF properly 
-      void setPmf  ( const std::string& nick ) ;       //      set PMF properly 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the pointer to member function 
-      PMF  m_pmf ;                            // the pointer to member function
-      /// the list of values 
-      std::vector<unsigned int>   m_uints ;  //       the list of values 
-      /// the low edge 
-      unsigned int m_imin ;                           // the low edge 
-      /// the high edge 
-      unsigned int m_imax ;                          // the high edge      
-      /// the actual fuinctor name 
-      std::string m_nick ;                          // the actual fuinctor name
-      // ======================================================================
-    };  
-    // ========================================================================
-    /** @class CountVeloIDs
-     *  Simple functor to count VeloChannelID that satisfy certain criteria 
-     *  @author  Vanya BELYAEV Ivan.Belyaev@nikhef.nl
-     *  @date   2009-12-17
-     */
-    class GAUDI_API CountVeloIDs 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// the actual type of pointer to member function
-      typedef         bool (LHCb::VeloChannelID::*PMF1)() const ;
-      typedef unsigned int (LHCb::VeloChannelID::*PMF2)() const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from pointer to member function 
-      CountVeloIDs ( PMF2 fun , const unsigned int i ) ;
-      /// constructor from pointer to member function & list  
-      CountVeloIDs ( PMF2 fun , const std::vector<unsigned int>& i ) ;
-      /// constructor from pointer to member function & range 
-      CountVeloIDs ( const unsigned int imin , 
-                     PMF2               fun  , 
-                     const unsigned int imax ) ;
-      /// constructor from pointer to member function name  
-      CountVeloIDs ( const std::string& name , const unsigned int i ) ;
-      /// constructor from pointer to member function name  & list 
-      CountVeloIDs ( const std::string& name , const std::vector<unsigned int>& i  ) ;
-      /// constructor from pointer to member function name  & range
-      CountVeloIDs ( const unsigned int imin , 
-                     const std::string& nick , 
-                     const unsigned int imax ) ;
-      /// contructor from member-function 
-      CountVeloIDs ( PMF1               pmf  ) ;
-      /// contructor from member-function 
-      CountVeloIDs ( const std::string& nick ) ;      
-      /// MANDATORY: virtual destructor
-      virtual ~CountVeloIDs() ;
-      /// MANDATORY: clone method ("virtual consttructor")
-      virtual  CountVeloIDs* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// The default contructor is disabled 
-      CountVeloIDs() ;                    // The default contructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// set the nick properly 
-      void setNick ( PMF2 pmf ) ;                      // set the nick properly 
-      /// set PMF properly 
-      void setPmf  ( const std::string& nick ) ;       //      set PMF properly 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the pointer to member function 
-      PMF1 m_pmf1 ;                           // the pointer to member function
-      /// the pointer to member function 
-      PMF2 m_pmf2 ;                           // the pointer to member function
-      /// the list of values 
-      std::vector<unsigned int>   m_uints ;          //      the list of values 
-      /// the low edge 
-      unsigned int m_imin ;                          //            the low edge 
-      /// the high edge 
-      unsigned int m_imax ;                          //           the high edge      
-      /// the actual fuinctor name 
-      std::string m_nick ;                           // the actual functor name
-      // ======================================================================
-    };  
-    // ========================================================================
-  } //                                            end of namespace LoKi::Tracks
-  // ==========================================================================
-} //                                                      end of namespace LoKi 
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  namespace Cuts
-  {
-    // ========================================================================
-    /** @typedef TrIDC
-     *  simple functor to count LHCbIDs 
-     *
-     *  @code 
-     *
-     *   const LHCb::Track* track = ... ;
-     *
-     *    TrIDC fun1 = TrIDC ( &LHCb::LHCbID::isOT ) ; 
-     *    TrIDC fun2 = TrIDC ( "isVelo"            ) ;
-     *
-     *    const bool good = fun1 ( track ) > 10 && fun2 ( track ) > 6 ; 
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::CountIDs 
-     *  @see LHCb::LHCbIDs 
-     *  @see LHCb::Track
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru  
-     *  @date 2010-01-01
-     */
-    typedef LoKi::Tracks::CountIDs                                      TrIDC ;
-    // ========================================================================
-    /** @typedef TrOTIDC
-     *  simple functor to count OTChannelID 
-     *
-     *  @code 
-     *
-     *   const LHCb::Track* track = ... ;
-     *
-     *    TrOTIDC fun1 = TrOTIDC (     &LHCb::OTChannelID::layer  , 1   ) ; 
-     *
-     *    TrOTIDC fun2 = TrOTIDC ( 3 , &LHCb::OTChannelID::module , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrOTIDC fun3 = TrOTIDC ( &LHCb::OTChannelID::station , lst  ) ; 
-     *
-     *    TrOTIDC fun4 = TrOTIDC (     "layer"  , 1   ) ; 
-     *
-     *    TrOTIDC fun5 = TrOTIDC ( 3 , "module" , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrOTIDC fun6 = TrOTIDC ( "station , lst  ) ; 
-     *
-     *    const bool good = 
-     *               fun1 ( track ) > 1 && 
-     *               fun2 ( track ) > 2 &&  
-     *               fun3 ( track ) > 3 && 
-     *               fun4 ( track ) > 4 &&  
-     *               fun5 ( track ) > 5 && 
-     *               fun6 ( track ) > 6   ; 
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::CountOTIDs 
-     *  @see LHCb::OTChannelID 
-     *  @see LHCb::Track
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru  
-     *  @date 2010-01-01
-     */
-    typedef LoKi::Tracks::CountOTIDs                                  TrOTIDC ;
-    // ========================================================================
-    /** @typedef TrSTIDC
-     *  simple functor to count STChannelID 
-     *
-     *  @code 
-     *
-     *   const LHCb::Track* track = ... ;
-     *
-     *    TrSTIDC fun1 = TrSTIDC (     &LHCb::STChannelID::sector  , 1   ) ; 
-     *
-     *    TrSTIDC fun2 = TrSTIDC ( 3 , &LHCb::STChannelID::layer , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrSTIDC fun3 = TrSTIDC ( &LHCb::STChannelID::strip , lst  ) ; 
-     *
-     *    TrSTIDC fun4 = TrSTIDC (     "sector"  , 1   ) ; 
-     *
-     *    TrSTIDC fun5 = TrSTIDC ( 3 , "layer" , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrSTIDC fun6 = TrSTIDC ( "strip" , lst  ) ; 
-     *
-     *    const bool good = 
-     *               fun1 ( track ) > 1 && 
-     *               fun2 ( track ) > 2 &&  
-     *               fun3 ( track ) > 3 && 
-     *               fun4 ( track ) > 4 &&  
-     *               fun5 ( track ) > 5 && 
-     *               fun6 ( track ) > 6   ; 
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::CountSTIDs 
-     *  @see LHCb::STChannelID 
-     *  @see LHCb::Track
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru  
-     *  @date 2010-01-01
-     */
-    typedef LoKi::Tracks::CountSTIDs                                  TrSTIDC ;
-    // ========================================================================
-    /** @typedef TrVELOIDC
-     *  simple functor to count VeloChannelID 
-     *
-     *  @code 
-     *
-     *   const LHCb::Track* track = ... ;
-     *
-     *    TrVELOIDC fun1 = TrVELOIDC (     &LHCb::VeloChannelID::sensor  , 1   ) ; 
-     *
-     *    TrVELOIDC fun2 = TrVELOIDC ( 3 , &LHCb::VeloChannelID::strip , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrVELOIDC fun3 = TrVELOIDC ( &LHCb::VeloChannelID::channelID , lst  ) ; 
-     *
-     *    TrVELOIDC fun4 = TrVELOIDC (     "sensor"  , 1   ) ; 
-     *
-     *    TrVELOIDC fun5 = TrVELOIDC ( 3 , "strip" , 10  ) ;
-     *
-     *    const std::vector<unsigned int>& lst = ... ;
-     *    TrVELOIDC fun6 = TrVELOIDC ( "channelID" , lst  ) ; 
-     *
-     *    const bool good = 
-     *               fun1 ( track ) > 1 && 
-     *               fun2 ( track ) > 2 &&  
-     *               fun3 ( track ) > 3 && 
-     *               fun4 ( track ) > 4 &&  
-     *               fun5 ( track ) > 5 && 
-     *               fun6 ( track ) > 6   ; 
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::CountVeloIDs 
-     *  @see LHCb::VeloChannelID 
-     *  @see LHCb::Track
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru  
-     *  @date 2010-01-01
-     */
-    typedef LoKi::Tracks::CountVeloIDs                              TrVELOIDC ;
-    // ========================================================================
-  } //                                              end of namespace LoKi::Cuts 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// The END 
-// ============================================================================
-#endif // LOKI_TRACKIDS_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/TrackTypes.h b/Phys/LoKiTracks/LoKi/TrackTypes.h
deleted file mode 100644
index 5c6877ce1..000000000
--- a/Phys/LoKiTracks/LoKi/TrackTypes.h
+++ /dev/null
@@ -1,243 +0,0 @@
-// ============================================================================
-#ifndef LOKI_TRACKTYPES_H 
-#define LOKI_TRACKTYPES_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/Functions.h"
-#include "LoKi/BiFunctions.h"
-// ============================================================================
-// Event 
-// ============================================================================
-#include "Event/Track.h"
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  /** @namespace LoKi::TrackTypes 
-   *  helper namespace  to collect the types needed for "Track"-functions
-   *
-   *  This file is a part of LoKi project - 
-   *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-   *
-   *  The package has been designed with the kind help from
-   *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-   *  contributions and advices from G.Raven, J.van Tilburg, 
-   *  A.Golutvin, P.Koppenburg have been used in the design.
-   *
-   *  @author Vanya BELAYEV ibelyaev@physics.syr.edu
-   *  @date 2007-07-06
-   */
-  namespace TrackTypes 
-  {
-    // ========================================================================
-    // the regular functors for Tracks
-    // ========================================================================
-    
-    /// type of 'cuts' for Tracks       (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::Predicate TrCuts ;
-    /// type of 'functions' for Tracks  (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::Function  TrFunc ;
-    /// type of 'cuts' for Tracks       (assignable)
-    typedef LoKi::Assignable<TrCuts>::Type                     TrCut  ;
-    /// type of 'functions' for Tracks  (assignable)
-    typedef LoKi::Assignable<TrFunc>::Type                     TrFun  ;
-    
-    /// type of 'map'       for Tracks    (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::Map       TrMaps ;
-    /// type of 'map'       for Tracks    (assignable)
-    typedef LoKi::Assignable<TrMaps>::Type                     TrMap  ;
-    
-    /// type of 'pipe'      for Tracks    (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::Pipe      TrPipes ;
-    /// type of 'pipe'      for Tracks    (assignable)
-    typedef LoKi::Assignable<TrPipes>::Type                    TrPipe  ;
-    
-    /// type of 'fun-val'   for Tracks    (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::FunVal    TrFunVals ;
-    /// type of 'fun-val'   for Tracks    (assignable)
-    typedef LoKi::Assignable<TrFunVals>::Type                  TrFunVal  ;
-    
-    /// type of 'fun-val'   for Tracks    (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::CutVal    TrCutVals ;
-    /// type of 'fun-val'   for Tracks    (assignable)
-    typedef LoKi::Assignable<TrCutVals>::Type                  TrCutVal  ;
-    
-    /// type of 'source'   for Tracks    (interface)
-    typedef LoKi::BasicFunctors<const LHCb::Track*>::Source    TrSources  ;
-    /// type of 'source'   for Tracks    (assignable)
-    typedef LoKi::Assignable<TrSources>::Type                  TrSource   ;
-    // ========================================================================
-  } //                                        end of namespace LoKi::TrackTypes 
-  // ==========================================================================
-  namespace Types 
-  {
-    // ========================================================================
-    // regular functions/predicates for tracks: "Tr"
-    // ========================================================================
-    /// type of 'cuts' for Tracks       (interface)
-    typedef LoKi::TrackTypes::TrCuts              TrCuts  ;
-    /// type of 'functions' for Tracks  (interface)
-    typedef LoKi::TrackTypes::TrFunc              TrFunc  ;
-    /// type of 'cuts' for Tracks       (assignable)
-    typedef LoKi::TrackTypes::TrCut               TrCut   ;
-    /// type of 'functions' for Tracks  (assignable)
-    typedef LoKi::TrackTypes::TrFun               TrFun   ;
-
-    // ========================================================================
-    // functional part for Tracks :
-    // ========================================================================
-
-    /// type for "maps" for Track  (interface)
-    typedef LoKi::TrackTypes::TrMaps     TrMaps    ;
-    /// type for "maps" for Track  (assignable)
-    typedef LoKi::TrackTypes::TrMap      TrMap     ;
-    
-    /// type for "pipes" for Track  (interface)
-    typedef LoKi::TrackTypes::TrPipes    TrPipes   ;
-    /// type for "pipes" for Track  (assignable)
-    typedef LoKi::TrackTypes::TrPipe     TrPipe    ;
-    
-    /// type for "fun-vals" for Track  (interface)
-    typedef LoKi::TrackTypes::TrFunVals  TrFunVals ;
-    /// type for "fun-vals" for Track  (assignable)
-    typedef LoKi::TrackTypes::TrFunVal   TrFunVal  ;
-    
-    /// type for "fun-vals" for Track  (interface)
-    typedef LoKi::TrackTypes::TrCutVals  TrCutVals ;
-    /// type for "fun-vals" for Track  (assignable)
-    typedef LoKi::TrackTypes::TrCutVal   TrCutVal  ;
-    
-    /// type for "sources" for Track  (interface)
-    typedef LoKi::TrackTypes::TrSources TrSources   ;
-    /// type for "sources" for Track  (assignable)
-    typedef LoKi::TrackTypes::TrSource  TrSource    ;
-    
-    // ========================================================================
-  } //                                             end of namespace LoKi::Types 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  // the specialized printout 
-  // ==========================================================================
-  template <>
-  std::ostream& 
-  Constant<const LHCb::Track*,bool>::fillStream( std::ostream& s ) const ;
-  // ==========================================================================  
-} //                                                      end of namespace LoKi
-// ============================================================================
-#include "LoKi/Filters.h"
-#include "LoKi/Dumper.h"
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  namespace Functors 
-  {
-    // ========================================================================
-    // the specific printout
-    // ========================================================================
-    template <>
-    std::ostream& Empty<const LHCb::Track*>::fillStream ( std::ostream& s ) const ; 
-    // ========================================================================
-    // the specific printpout
-    // ========================================================================
-    template <>
-    std::ostream& 
-    Size<const LHCb::Track*>::fillStream ( std::ostream& s ) const  ;
-    // ========================================================================
-    template <>
-    Dump_<const LHCb::Track*>::result_type 
-    Dump_<const LHCb::Track*>::operator() 
-      ( Dump_<const LHCb::Track*>::argument a ) const ;
-    // ========================================================================
-    template <>
-    Dump1_<const LHCb::Track*,bool>::result_type 
-    Dump1_<const LHCb::Track*,bool>::operator() 
-      ( Dump1_<const LHCb::Track*,bool>::argument a ) const ;
-    // ========================================================================
-    template <>
-    Dump1_<const LHCb::Track*,double>::result_type 
-    Dump1_<const LHCb::Track*,double>::operator() 
-      ( Dump1_<const LHCb::Track*,double>::argument a ) const ;
-    // ========================================================================
-  } //                                          end of namespace LoKi::Functors 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// a little bit of streamers 
-// ============================================================================
-GAUDI_API 
-LHCb::Track::ConstVector
-operator>> 
-( const LHCb::Track::ConstVector&    input ,
-  const LoKi::Types::TrCuts&         cuts  ) ;
-// ============================================================================
-GAUDI_API 
-LHCb::Track::ConstVector
-operator>> 
-( const LHCb::Track::Range&          input ,
-  const LoKi::Types::TrCuts&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-LHCb::Track::ConstVector
-operator>> 
-( const SmartRefVector<LHCb::Track>& input ,
-  const LoKi::Types::TrCuts&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-LHCb::Track::ConstVector
-operator>> 
-( const LHCb::Track::Container*      input ,
-  const LoKi::Types::TrCuts&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-LHCb::Track::ConstVector
-operator>> 
-( const LHCb::Track::Selection*      input ,
-  const LoKi::Types::TrCuts&         cuts  ) ;
-// ===========================================================================
-// functions 
-// ===========================================================================
-GAUDI_API 
-std::vector<double>
-operator>> 
-( const LHCb::Track::ConstVector&    input ,
-  const LoKi::Types::TrFunc&         cuts  ) ;
-// ============================================================================
-GAUDI_API 
-std::vector<double>
-operator>> 
-( const LHCb::Track::Range&          input ,
-  const LoKi::Types::TrFunc&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-std::vector<double>
-operator>> 
-( const SmartRefVector<LHCb::Track>& input ,
-  const LoKi::Types::TrFunc&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-std::vector<double>
-operator>> 
-( const LHCb::Track::Container*      input ,
-  const LoKi::Types::TrFunc&         cuts  ) ;
-// ===========================================================================
-GAUDI_API 
-std::vector<double>
-operator>> 
-( const LHCb::Track::Selection*      input ,
-  const LoKi::Types::TrFunc&         cuts  ) ;
-// ===========================================================================
-
-
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_TRACKTYPES_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/LoKi/Tracks.h b/Phys/LoKiTracks/LoKi/Tracks.h
index 3fc0c6e30..65bdfbc3e 100644
--- a/Phys/LoKiTracks/LoKi/Tracks.h
+++ b/Phys/LoKiTracks/LoKi/Tracks.h
@@ -45,315 +45,6 @@ namespace LoKi
    */
   namespace Tracks
   {
-    // ========================================================================
-    /** @class Key
-     *  simple evaluator of the "key"
-     *  @see LoKi::Cuts::TrKEY
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Key : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Key() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Key* clone() const ;
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const  ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class InTES
-     *  Simple predicate which check is teh obejct registered in TES
-     *  @see LoKi::Cuts::TrINTES
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API InTES : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      InTES() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  InTES* clone() const { return new InTES(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrINTES" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Charge
-     *  simple evaluator of the charge of the track 
-     *  @see LoKi::Cuts::TrQ
-     *  @author Vanya BELYAEV ibelyaev@physiocs.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Charge : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Charge() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Charge* clone() const { return new Charge(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrQ" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class TransverseMomentum 
-     *  simple evaluator of transverse momentum of the track
-     *  @see LoKi::Cuts::TrPT
-     *  @author Vanya BELYAEV ibelyaev@physiocs.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API TransverseMomentum 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      TransverseMomentum() : AuxFunBase( std::tie() ) { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  TransverseMomentum* clone() const 
-      { return new TransverseMomentum(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPT" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Momentum 
-     *  @see LoKi::Cuts::TrP 
-     *  simple evaluator of momentum of the track
-     *  @author Vanya BELYAEV ibelyaev@physiocs.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Momentum : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Momentum() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Momentum* clone() const { return new Momentum(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrP" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Phi
-     *  @see LoKi::Cuts::TrPHI
-     *  @see LHCb::Track::phi
-     *  simple evaluator of phi angle for the track 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2015-01-30
-     */  
-    class GAUDI_API Phi : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Phi() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Phi* clone() const { return new Phi(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPHI" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Eta
-     *  @see LoKi::Cuts::TrETA
-     *  @see LHCb::Track::pseudoRapidity
-     *  simple evaluator of pseudorapidity for the track 
-     *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-     *  @date   2015-01-30
-     */  
-    class GAUDI_API Eta : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Eta () : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Eta* clone() const { return new Eta(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrETA" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class MomentumX 
-     *  @see LoKi::Cuts::TrPX 
-     *  simple evaluator of momentum of the track
-     *  @author Vanya BELYAEV Ivan.BElyaev@cern.ch
-     *  @date   2011-03-18
-     */  
-    class GAUDI_API MomentumX : public LoKi::Tracks::Momentum
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      MomentumX() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  MomentumX* clone() const { return new MomentumX(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPX" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class MomentumY
-     *  @see LoKi::Cuts::TrPY
-     *  simple evaluator of momentum of the track
-     *  @author Vanya BELYAEV Ivan.BElyaev@cern.ch
-     *  @date   2011-03-18
-     */  
-    class GAUDI_API MomentumY : public LoKi::Tracks::Momentum
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      MomentumY() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  MomentumY* clone() const { return new MomentumY(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPY" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class MomentumZ
-     *  @see LoKi::Cuts::TrPZ
-     *  simple evaluator of momentum of the track
-     *  @author Vanya BELYAEV Ivan.BElyaev@cern.ch
-     *  @date   2011-03-18
-     */  
-    class GAUDI_API MomentumZ : public LoKi::Tracks::Momentum
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      MomentumZ() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  MomentumZ* clone() const { return new MomentumZ(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPZ" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class CheckFlag 
-     *  @see LoKi::Cuts::TrISFLAG
-     *  @see LoKi::Cuts::TrBACKWARD
-     *  @see LoKi::Cuts::TrINVALID
-     *  @see LoKi::Cuts::TrCLONE
-     *  @see LoKi::Cuts::TrUSED
-     *  @see LoKi::Cuts::TrIPSELECTED
-     *  @see LoKi::Cuts::TrPIDSELECTED
-     *  @see LoKi::Cuts::TrSELECTED
-     *  @see LoKi::Cuts::TrL0CANDIDATE
-     *  @simple predicate to check the flag 
-     *  @author Vanya BELYAEV ibelyaev@physiocs.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API CheckFlag 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate 
-    {
-    public:
-      // ======================================================================
-      /// constructor form the flag ; 
-      CheckFlag ( LHCb::Track::Flags flag ) ;
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  CheckFlag* clone() const { return new CheckFlag (*this) ; }
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled
-      CheckFlag() ; ///< no default contructor
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the flag to be checked:
-      LHCb::Track::Flags m_flag ; ///< the flag to be checked:
-      // ======================================================================
-    } ;    
-    // ========================================================================
-    /** @class Selector
-     *  Simple class GAUDI_API to use "track-selector"
-     *  @see ITrackSelector
-     *  @see LoKi:Cuts::TrSELECTOR
-     *  @author Vanya BELYAEV ibelayev@physics.syr.edu
-     *  @date 2007-06-10
-     */
-    class GAUDI_API Selector 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate
-    {
-    public :
-      // ======================================================================
-      /// constructor form the tool 
-      Selector ( const ITrackSelector*  tool ) ;
-      /// constructor form the tool 
-      Selector ( const LoKi::Interface<ITrackSelector>& tool ) ;
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Selector* clone() const { return new Selector(*this) ; }
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// conversion operator to the tool
-      operator const LoKi::Interface<ITrackSelector>&() const { return m_tool ;}    
-      const LoKi::Interface<ITrackSelector>& selector() const { return m_tool ;}    
-      // ======================================================================
-      /// the only one essential method 
-      bool eval ( const LHCb::Track* t ) const ;
-      // ======================================================================
-    protected:
-      // ======================================================================
-      /// the default constructor is protected
-      Selector () ;                     // the default constructor is protected
-      /// set new selector tool 
-      void setSelector ( const ITrackSelector* selector ) const ;
-      // ======================================================================
-    protected:
-      // ======================================================================
-      /// the tool itself 
-      mutable LoKi::Interface<ITrackSelector> m_tool ;            // the tool itself 
-      // ======================================================================
-    } ;
     // ========================================================================
     /** @class Filter
      *  Simple class GAUDI_API to use "track-selector"
@@ -392,503 +83,6 @@ namespace LoKi
       // ======================================================================
     } ;
     // ========================================================================
-    /** @class HasInfo
-     *  Trivial predicate which evaluates LHCb::Track::hasInfo
-     *  function
-     *
-     *  It relies on the method LoKi::Info::hasInfo
-     *
-     *  @see LHCb::Track
-     *  @see LoKi::Cuts::TrHASINFO 
-     *  @see LoKi::ExtraInfo::CheckInfo
-     *  @see LoKi::ExtraInfo::hasInfo
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */
-    class GAUDI_API HasInfo : public LoKi::ExtraInfo::CheckInfo<const LHCb::Track*>
-    {
-    public:
-      // ======================================================================
-      /** constructor from "info"
-       *  @param key info index/mark/key
-       */
-      HasInfo ( const int key ) ;
-      /// clone method (mandatory!)
-      virtual HasInfo* clone() const { return new HasInfo(*this) ; }
-      /// the specific printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      HasInfo();
-      // ======================================================================
-    };
-    // ========================================================================    
-    /** @class Info
-     *  Trivial function which evaluates LHCb::Track::info
-     *  
-     *  It relies on the method LoKi::ExtraInfo::info 
-     *
-     *  @see LHCb::Track
-     *  @see LoKi::Cuts::TrINFO 
-     *  @see LoKi::ExtraInfo::GeInfo
-     *  @see LoKi::ExtraInfo::info
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */
-    class GAUDI_API Info : public LoKi::ExtraInfo::GetInfo<const LHCb::Track*>
-    {
-    public:
-      // ======================================================================
-      /** constructor from "info"
-       *  @param key info index/mark/key
-       *  @param def default value for missing key/invalid object 
-       */
-      Info ( const int    key , const double def ) ;
-      /// clone method (mandatory!)
-      virtual Info* clone() const { return new Info(*this); }
-      /// the specific printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      Info();
-      // ======================================================================
-    };
-    // ========================================================================    
-    /** @class SmartInfo
-     *  Trivial function which:
-     *    - checks the presence of informnation in LHCb::Track::extraInfo
-     *    - if the information present, it returns it 
-     *    - for missing infomation, use function to evaluate it 
-     *    - (optionally) fill th emissing field
-     *  
-     *  @see LHCb::Track
-     *  @see LoKi::Cuts::TrSINFO 
-     *  @see LoKi::ExtraInfo::GetSmartInfo
-     *  @see LoKi::ExtraInfo::info
-     *  @see LoKi::ExtraInfo::hasInfo
-     *  @see LoKi::ExtraInfo::setInfo
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2006-02-15
-     */
-    class GAUDI_API SmartInfo 
-      : public LoKi::ExtraInfo::GetSmartInfo<const LHCb::Track*>
-    {
-    public:
-      // ======================================================================
-      /** constructor from fuction, key and update-flag
-       *  @param index the key in LHCb::Track::extraInfo table 
-       *  @param fun functionto be evaluated for missing keys 
-       *  @param update the flag to allow the insert of mnissing information
-       */
-      SmartInfo
-      ( const int                                                index          , 
-        const LoKi::BasicFunctors<const LHCb::Track*>::Function& fun            , 
-        const bool                                               update = false ) ;
-      /// clone method (mandatory!)
-      virtual  SmartInfo* clone() const { return new SmartInfo(*this); }
-      /// the specific printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      // the default constructor is disabled 
-      SmartInfo();
-      // ======================================================================
-    };
-    // ========================================================================
-    /** @class Chi2
-     *  simple evaluator of the LHcb::Track::chi2
-     *  @see LoKi::Cuts::TrCHI2
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Chi2 : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Chi2() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Chi2* clone() const { return new Chi2(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrCHI2" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Chi2PerDoF
-     *  simple evaluator of the LHcb::Track::chi2PerDoF
-     *  @see LoKi::Cuts::TrCHI2PDOF
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Chi2PerDoF : public Chi2
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Chi2PerDoF() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Chi2PerDoF* clone() const { return new Chi2PerDoF(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrCHI2PDOF" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class ProbChi2
-     *  simple evaluator of the LHCb::Track::probChi2
-     *  @see LoKi::Cuts::TrPROBCHI2
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API ProbChi2 : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      ProbChi2() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  ProbChi2* clone() const { return new ProbChi2(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrPROBCHI2" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class GhostProb
-     *  simple evaluator of the LHCb::Track::ghostProbability
-     *  @see LoKi::Cuts::TrGHOSTPROB
-     *  @author Sascha Stahl sascha.stahl@cern.ch
-     *  @date   2016-01-12
-     */  
-    class GAUDI_API GhostProb : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      GhostProb() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  GhostProb* clone() const { return new GhostProb(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrGHOSTPROB" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class HasStateAt 
-     *  Simple predicate which evaluates LHCb::Track::HasStateAt
-     *  @see LoKi::Cuts::TrHASSTATE
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API HasStateAt : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate
-    {
-    public:
-      // ======================================================================
-      /// constructor
-      HasStateAt ( const LHCb::State::Location& loc ) ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  HasStateAt* clone() const { return new HasStateAt(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrHASSTATE(" << loc () << ")" ; }
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// get the location 
-      int loc () const { return m_loc ; }
-      // ======================================================================
-    private:
-      // ======================================================================
-      // defautl constructor is disabled 
-      HasStateAt() ; ///< no default constructor 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the location 
-      LHCb::State::Location m_loc ;                             // the location 
-      // ======================================================================
-    } ;  
-    // ========================================================================
-    /** @class IsOnTrack
-     *  Simple predicate which evaluates LHCb::Track::isOnTrack
-     *  @see LoKi::Cuts::TrISONTRACK
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API IsOnTrack : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate
-    {
-    public:
-      // ======================================================================
-      IsOnTrack ( const LHCb::LHCbID& id ) ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  IsOnTrack* clone() const { return new IsOnTrack(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrIsOnTRACK(LHCb.LHCbID(" << m_id.lhcbID() << "))" ; }
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      IsOnTrack() ;                                    // no default consructor 
-      // ======================================================================
-    private:
-      // ======================================================================
-      LHCb::LHCbID m_id ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Type
-     *  simple evaluator of the LHCb::Track::type
-     *  @see LHCb::Track::type 
-     *  @see LHCb::Track::Types
-     *  @see LoKi::Cuts::TrTYPE
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2007-06-08
-     */  
-    class GAUDI_API Type : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      Type() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  Type* clone() const { return new Type(*this) ; }
-      /// mandatory: the only one essential method 
-      virtual result_type operator() ( argument t ) const ; 
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrTYPE" ; }
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class StateZ 
-     *  check Z-position for the given state 
-     *  @see LoKi::Cuts::TrSTATEZ 
-     *  @see LoKi::Cuts::TrFIRSTHITZ
-     *  @see LHCb::State::Location
-     *  @author Vanya Belyaev@nikhef.nl
-     *  @date 2010-06-02
-     */
-    class GAUDI_API StateZ 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// constructor with the state indicator 
-      StateZ 
-      ( const LHCb::State::Location location = LHCb::State::FirstMeasurement ) ;
-      /// constructor with the state indicator & bad value  
-      StateZ ( const LHCb::State::Location location , 
-               const double       bad      ) ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  StateZ* clone () const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// get the string representation of the state 
-      const std::string& state() const ; // the string representation 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the state itself 
-      LHCb::State::Location m_state ;                       // the state itself 
-      /// the bad value 
-      double       m_bad   ;                                //    the bad value
-      /// the state 
-      mutable std::string m__state ;                        //        the state 
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class Cov2 
-     *  Get the element of covarinace element for the track state 
-     *  @see Tr_COV2 
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2010-12-09
-     */
-    class GAUDI_API Cov2
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// constructor from indices
-      Cov2 ( const unsigned short i , 
-             const unsigned short j ) ;
-      /// constructor from indices & state location 
-      Cov2 ( const LHCb::State::Location location , 
-             const unsigned short        i        , 
-             const unsigned short        j        ) ;
-      /// constructor from the indices and Z-position: 
-      Cov2 ( const double                z        , 
-             const unsigned short        i        , 
-             const unsigned short        j        ) ;
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual  Cov2* clone () const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      Cov2 () ;                          // the default constructor is disabled 
-      // ======================================================================
-    private:
-      // ======================================================================
-      enum _Case {
-        _First    , 
-        _Location ,
-        _Z     
-      } ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      _Case                 m_case ;
-      double                m_z    ;
-      LHCb::State::Location m_loc  ;
-      unsigned  short       m_i    ;
-      unsigned  short       m_j    ;      
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class NVeloMissed
-     *  @see Hlt::MissedVeloHits 
-     *  @author Vanya Belyaev Ivan.Belyaev@cern.ch
-     *  @date 2011-01-28
-     */
-    class GAUDI_API NVeloMissed 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      NVeloMissed() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method (virtual constructor) 
-      virtual  NVeloMissed* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const 
-      { return s << "TrNVELOMISS" ; }
-      // ======================================================================
-    } ;  
-    // ========================================================================
-    /** @class NTHits
-     *  Count number of effective T-hits : 2x#IT + #OT
-     *  @see LoKi::Cuts::TrNTHITS
-     *  @see LoKi::Cuts::TrTNORMIDC
-     *  @author Vanya Belyaev Ivan.Belyaev@cern.ch
-     *  @date 2011-02-02
-     */
-    class GAUDI_API NTHits
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      NTHits() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method (virtual constructor) 
-      virtual  NTHits* clone() const ;
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    } ;  
-    // ========================================================================
-    /** @class HasT 
-     *  Check if track is of a type that goes thro T stations
-     *  @see LHCb::Track::hasT
-     *  @see LoKi::Cuts::TrHAST
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-03-18
-     */
-    class GAUDI_API HasT 
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Predicate 
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      HasT() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  HasT* clone() const { return new HasT ( *this ) ; }
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class HasVelo
-     *  Check if track is of a type that goes thro Velo
-     *  @see LHCb::Track::hasVelo
-     *  @see LoKi::Cuts::TrHASVELO
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-03-18
-     */
-    class GAUDI_API HasVelo : public LoKi::Tracks::HasT 
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      HasVelo() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  HasVelo* clone() const { return new HasVelo ( *this ) ; }
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-    /** @class HasTT
-     *  Check if track is of a type that goes thro TT
-     *  @see LHCb::Track::hasTT
-     *  @see LoKi::Cuts::TrHASTT
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date 2011-03-18
-     */
-    class GAUDI_API HasTT : public LoKi::Tracks::HasT 
-    {
-    public:
-      // ======================================================================
-      /// Default Constructor
-      HasTT() : AuxFunBase{ std::tie() } { }
-      /// MANDATORY: clone method ("virtual constructor")  
-      virtual  HasTT* clone() const { return new HasTT ( *this ) ; }
-      /// MANDATORY: the only one essential method 
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout 
-      virtual std::ostream& fillStream( std::ostream& s ) const ;
-      // ======================================================================
-    } ;
-    // ========================================================================
     /**
      *  @class FastDOCAToBeamLine
      *  use TTrDOCA and BEAMSPOT to evaluate the closest distance of a track to
@@ -924,9 +118,6 @@ namespace LoKi
       LoKi::FastVertex::Line m_beamLine;
     } ;
     // ========================================================================
-    /// hash
-    GAUDI_API std::size_t hash ( const LHCb::Track* track ) ;
-    // ========================================================================
   } //                                            end of namespace LoKi::Tracks
   // ==========================================================================
 } //                                                      end of namespace LoKi 
diff --git a/Phys/LoKiTracks/LoKi/VeloHitPatternFunctions.h b/Phys/LoKiTracks/LoKi/VeloHitPatternFunctions.h
deleted file mode 100644
index cc9e45c4d..000000000
--- a/Phys/LoKiTracks/LoKi/VeloHitPatternFunctions.h
+++ /dev/null
@@ -1,220 +0,0 @@
-#ifndef LOKI_VELOHITPATTERNFUNCTIONS_H
-#define LOKI_VELOHITPATTERNFUNCTIONS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/BasicFunctors.h"
-// ============================================================================
-/** @file LoKi/VeloHitPatternFunctions.h
- *  Collection of Velo hit-pattern functions (that are not just counting the
- *  LHCbIDs passing a certain test)
- *
- *  @author Pieter David pieter.david@cern.ch
- *  @date   2012-03-12
- */
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Tracks
-  {
-    // ========================================================================
-    /** @class MaxNumConsecutiveVeloSpacePoints
-     *  Get the maximal number of consecutive Velo R-Phi space points on a
-     *  track
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    class GAUDI_API MaxNumConsecutiveVeloSpacePoints
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// MANDATORY: virtual destructor
-      virtual ~MaxNumConsecutiveVeloSpacePoints () {}
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual MaxNumConsecutiveVeloSpacePoints* clone() const
-      { return new MaxNumConsecutiveVeloSpacePoints(*this) ; }
-      /// MANDATORY: the only one essential method
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
-      { return s <<  "TrNCONSECVELOSPACEPOINTS" ; }
-      // ======================================================================
-    };
-    // ========================================================================
-    /** @class NumVeloSpacePoints
-     *  Count the Velo R-Phi space points on a track
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    class GAUDI_API NumVeloSpacePoints
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// MANDATORY: virtual destructor
-      virtual ~NumVeloSpacePoints () {}
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual NumVeloSpacePoints* clone() const
-      { return new NumVeloSpacePoints(*this) ; }
-      /// MANDATORY: the only one essential method
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
-      { return s <<  "TrNVELOSPACEPOINTS" ; }
-      // ======================================================================
-    };
-    // ========================================================================
-    /** @class NumVeloACOverlapHits
-     *  Count the A/C side overlap hits on a track, after taking the OR of R
-     *  and Phi hits.
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    class GAUDI_API NumVeloACOverlapHits
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// MANDATORY: virtual destructor
-      virtual ~NumVeloACOverlapHits () {}
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual NumVeloACOverlapHits* clone () const
-      { return new NumVeloACOverlapHits(*this) ; }
-      /// MANDATORY: the only one essential method
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
-      { return s << "TrNVELOOVERLAPS" ; }
-      // ======================================================================
-    };
-    // ========================================================================
-    /** @class NumVeloACOverlapHitsR
-     *  Count the A/C side overlap R hits on a track
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    class GAUDI_API NumVeloACOverlapHitsR
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// MANDATORY: virtual destructor
-      virtual ~NumVeloACOverlapHitsR () {}
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual NumVeloACOverlapHitsR* clone () const
-      { return new NumVeloACOverlapHitsR(*this) ; }
-      /// MANDATORY: the only one essential method
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
-      { return s << "TrNVELOOVERLAPSR" ; }
-      // ======================================================================
-    };
-    // ========================================================================
-    /** @class NumVeloACOverlapHitsPhi
-     *  Count the A/C side overlap Phi hits on a track
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    class GAUDI_API NumVeloACOverlapHitsPhi
-      : public LoKi::BasicFunctors<const LHCb::Track*>::Function
-    {
-    public:
-      // ======================================================================
-      /// MANDATORY: virtual destructor
-      virtual ~NumVeloACOverlapHitsPhi () {}
-      /// MANDATORY: clone method ("virtual constructor")
-      virtual NumVeloACOverlapHitsPhi* clone () const
-      { return new NumVeloACOverlapHitsPhi(*this) ; }
-      /// MANDATORY: the only one essential method
-      virtual result_type operator() ( argument t ) const ;
-      /// OPTIONAL: the nice printout
-      virtual std::ostream& fillStream( std::ostream& s ) const
-      { return s << "TrNVELOOVERLAPSPHI" ; }
-      // ======================================================================
-    };
-    // ========================================================================
-  } //                                            end of namespace LoKi::Tracks
-  // ==========================================================================
-  namespace Cuts
-  {
-    // ========================================================================
-    /** @typedef  TrNCONSECVELOSPACEPOINTS
-     *  Get the maximal number of consecutive Velo R-Phi space points on a
-     *  track
-     *  @see LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints
-     *  @see LoKi::Cuts::TrNVELOSPACEPOINTS
-     *  @see LoKi::Tracks::NumVeloSpacePoints
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    typedef LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints TrNCONSECVELOSPACEPOINTS ;
-    // ========================================================================
-    /** @typedef  TrNVELOSPACEPOINTS
-     *  Count the Velo R-Phi space points on a track
-     *  @see LoKi::Tracks::NumVeloSpacePoints
-     *  @see LoKi::Cuts::TrNCONSECVELOSPACEPOINTS
-     *  @see LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    typedef LoKi::Tracks::NumVeloSpacePoints TrNVELOSPACEPOINTS ;
-    // ========================================================================
-    /** @typedef TrNVELOOVERLAPS
-     *  Count the A/C side overlap hits on a track, after taking the OR of R
-     *  and Phi hits.
-     *  @see LoKi::Tracks::NumVeloACOverlapHits
-     *  @see LoKi::Cuts::TrNVELOOVERLAPSR
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsR
-     *  @see LoKi::Cuts::TrNVELOOVERLAPSPHI
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsPhi
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    typedef LoKi::Tracks::NumVeloACOverlapHits TrNVELOOVERLAPS ;
-    // ========================================================================
-    /** @typedef TrNVELOOVERLAPSR
-     *  Count the A/C side overlap R hits on a track
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsR
-     *  @see LoKi::Cuts::TrNVELOOVERLAPS
-     *  @see LoKi::Tracks::NumVeloACOverlapHits
-     *  @see LoKi::Cuts::TrNVELOOVERLAPSPHI
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsPhi
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    typedef LoKi::Tracks::NumVeloACOverlapHitsR TrNVELOOVERLAPSR ;
-    // ========================================================================
-    /** @typedef TrNVELOOVERLAPSPHI
-     *  Count the A/C side overlap R hits on a track
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsPhi
-     *  @see LoKi::Cuts::TrNVELOOVERLAPS
-     *  @see LoKi::Tracks::NumVeloACOverlapHits
-     *  @see LoKi::Cuts::TrNVELOOVERLAPSR
-     *  @see LoKi::Tracks::NumVeloACOverlapHitsR
-     *  @author Wouter Hulsbergen wouterh@nikhef.nl
-     *  @author Pieter David      pieter.david@cern.ch
-     *  @date 2012-03-12
-     */
-    typedef LoKi::Tracks::NumVeloACOverlapHitsPhi TrNVELOOVERLAPSPHI ;
-    // ========================================================================
-  } //                                              end of namespace LoKi::Cuts
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-//                                                                      The END
-// ============================================================================
-#endif // LOKI_VELOHITPATTERNFUNCTIONS_H
diff --git a/Phys/LoKiTracks/dict/LoKiTracks.xml b/Phys/LoKiTracks/dict/LoKiTracks.xml
deleted file mode 100644
index 776a49283..000000000
--- a/Phys/LoKiTracks/dict/LoKiTracks.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<!-- 
-     * $Id$ 
-     * ========================================================================
-     * @file
-     *
-     * The seleciton file to build Reflex dictionaries for Phys/LoKiTracks package
-     *
-     * @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     * @date 2006-02-06
-     *
-     * ========================================================================
--->
-
-<lcgdict>
-  
-  <class pattern   = "LoKi::Functor<*LHCb::Tr*>"             />
-  <class pattern   = "LoKi::FunctorFromFunctor<*LHCb::Tr*>"  />
-  <class pattern   = "LoKi::Constant<*LHCb::Tr*>"            />
-  
-  <class name = "LoKi::Functors::Empty<const LHCb::Track*>" /> 
-  <class name = "LoKi::Functors::Size<const LHCb::Track*>"  /> 
-  <class name = "LoKi::Functors::FakeSource<const LHCb::Track*>" /> 
-
-  <class pattern   = "LoKi::Tracks::*"                      />
-  
-  <class pattern   = "LoKi::Dicts::FunCalls<*LHCb::T*>"    />
-  <class pattern   = "LoKi::Dicts::CutCalls<*LHCb::T*>"    />
-  
-  <class pattern   = "LoKi::Dicts::FuncOps<*LHCb::T*>"    />
-  <class pattern   = "LoKi::Dicts::CutsOps<*LHCb::T*>"    />
-
-  <class pattern   = "LoKi::Dicts::FuncOps__<*LHCb::T*>"  />
-  <class pattern   = "LoKi::Dicts::FuncOps_<*LHCb::T*>"   />
-  <class pattern   = "LoKi::Dicts::CutsOps_<*LHCb::T*>"   />
-
-  <class pattern   = "LoKi::Dicts::MapsOps<*LHCb::T*>"    />
-  <class pattern   = "LoKi::Dicts::PipeOps<*LHCb::T*>"    />
-  <class pattern   = "LoKi::Dicts::FunValOps<*LHCb::T*>"  />
-  <class pattern   = "LoKi::Dicts::CutValOps<*LHCb::T*>"  />
-  <class pattern   = "LoKi::Dicts::SourceOps<*LHCb::T*>" />
-  <class pattern   = "LoKi::Dicts::InfoOps<*LHCb::T*>"   />
-  
-  <function pattern = "LoKi::Dicts::TrInfo::info*"     />
-  <class pattern    = "LoKi::ExtraInfo::CheckInfo<*LHCb::Track*>"  />
-  <class pattern    = "LoKi::ExtraInfo::GetInfo<*LHCb::Track*>"    />
-
-  <function name    = "LoKi::Tracks::hash" />
-
-  <function pattern = "LoKi::Tracks::state_*"    />
-
-  <class name = "LoKi::ITrackFunctorFactory"     />
-  <class name = "LoKi::ITrackFunctorAntiFactory" />
-  <class name = "LoKi::Hybrid::TrackEngine"      />
-  
-</lcgdict>
diff --git a/Phys/LoKiTracks/dict/LoKiTracksDict.h b/Phys/LoKiTracks/dict/LoKiTracksDict.h
deleted file mode 100644
index c94145b81..000000000
--- a/Phys/LoKiTracks/dict/LoKiTracksDict.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// $Id$
-// ============================================================================
-#ifndef LOKI_LOKITRACKSDICT_H 
-#define LOKI_LOKITRACKSDICT_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-#include "LoKi/LoKiTracks_dct.h"
-// ============================================================================
-//                                                                      The END 
-// ============================================================================
-#endif // LOKI_LOKITRACKSDICT_H
-// ============================================================================
diff --git a/Phys/LoKiTracks/python/LoKiTracks/__init__.py b/Phys/LoKiTracks/python/LoKiTracks/__init__.py
deleted file mode 100755
index 88d4c953b..000000000
--- a/Phys/LoKiTracks/python/LoKiTracks/__init__.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-# =============================================================================
-## @file
-#  The set of basic objects from LoKiTracks library
-#
-#        This file is a part of LoKi project - 
-#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-#
-#  The package has been designed with the kind help from
-#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-#  contributions and advices from G.Raven, J.van Tilburg, 
-#  A.Golutvin, P.Koppenburg have been used in the design.
-#
-#  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-#  @date 2007-06-09
-# =============================================================================
-"""
-The set of basic objects from LoKiTracks library
-
-      This file is a part of LoKi project - 
-``C++ ToolKit  for Smart and Friendly Physics Analysis''
-
-The package has been designed with the kind help from
-Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-contributions and advices from G.Raven, J.van Tilburg, 
-A.Golutvin, P.Koppenburg have been used in the design.
-"""
-# =============================================================================
-__author__  = "Vanya BELYAEV  Ivan.Belyaev@nikhef.nl "
-__date__    = "2010-07-17"
-__version__ = "CVS tag $Name:$, version $Revision$ "
-# =============================================================================
-
-
-# =============================================================================
-# The END 
-# =============================================================================
diff --git a/Phys/LoKiTracks/python/LoKiTracks/decorators.py b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
deleted file mode 100644
index c08202f3e..000000000
--- a/Phys/LoKiTracks/python/LoKiTracks/decorators.py
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/env python
-# =============================================================================
-## @file
-#  The set of basic objects from LoKiTracks library
-#
-#        This file is a part of LoKi project - 
-#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-#
-#  The package has been designed with the kind help from
-#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-#  contributions and advices from G.Raven, J.van Tilburg,
-#  A.Golutvin, P.Koppenburg have been used in the design.
-#
-#  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-#  @date 2007-06-09
-# =============================================================================
-"""
-The set of basic objects from LoKiTracks library
-
-      This file is a part of LoKi project - 
-``C++ ToolKit  for Smart and Friendly Physics Analysis''
-
-The package has been designed with the kind help from
-Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-contributions and advices from G.Raven, J.van Tilburg, 
-A.Golutvin, P.Koppenburg have been used in the design.
-"""
-# =============================================================================
-__author__  = "Vanya BELYAEV  Ivan.Belyaev@nikhef.nl "
-__date__    = "2010-07-17"
-__version__ = "CVS tag $Name:$, version $Revision$ "
-# =============================================================================
-
-from   LoKiTracks.functions import *
-from   LoKiCore.functions   import equal_to
-
-_name = __name__
-
-
-# =============================================================================
-## make the decoration of all objects fomr this module
-def _decorate ( name = _name  ) :
-    """
-    Make the decoration of all objects from this module
-    """
-    import LoKiCore.decorators as _LoKiCore
-    
-    ## regular functors which accept the track
-    _t  =  LHCb.Track
-    _pt = 'const LHCb::Track*'
-    
-    # "function" : Track -> double 
-    
-    _decorated  = _LoKiCore.getAndDecorateFunctions ( 
-        name                                   , ## module name  
-        TrFunc                                 , ## the base
-        LoKi.Dicts.FunCalls (_t)               , ## call-traits
-        LoKi.Dicts.FuncOps  (_pt,_pt)          ) ## operators&operations
-    
-    # "predicate/cut" :  Track -> bool
-    
-    _decorated |= _LoKiCore.getAndDecoratePredicates ( 
-        name                                   , ## module name  
-        TrCuts                                 , ## the base
-        LoKi.Dicts.CutCalls (_t)               , ## call-traits
-        LoKi.Dicts.CutsOps  (_pt,_pt)          ) ## operators&operations
-
-    ## functional stuff
-    _vt = 'std::vector<const LHCb::Track*>'      ## std.vector ( )    
-    _vd = 'std::vector<double>'                  ## std.vector ( 'double' )
-    
-    # "map" :  vector<T> -> vector<double>
-    _decorated |= _LoKiCore.getAndDecorateMaps ( 
-        name                                   , ## module name  
-        LoKi.Functor (_vt,_vd)                 , ## the base
-        LoKi.Dicts.MapsOps(_pt)                ) ## call-traits
-    
-    # "pipe" : vector<T> -> vector<T>    
-    _decorated |= _LoKiCore.getAndDecoratePipes ( 
-        name                                   , ## module name  
-        LoKi.Functor   (_vt,_vt)               , ## the base
-        LoKi.Dicts.PipeOps(_pt,_pt)            ) ## call-traits
-  
-    # "funval" : vector<T> -> double    
-    _decorated |= _LoKiCore.getAndDecorateFunVals ( 
-        name                                   , ## module name  
-        LoKi.Functor   (_vt,'double')          , ## the base
-        LoKi.Dicts.FunValOps(_pt)              ) ## call-traits
-
-    # "cutval" : vector<T> -> bool    
-    _decorated |= _LoKiCore.getAndDecorateCutVals ( 
-        name                                   , ## module name  
-        LoKi.Functor   (_vt,bool)              , ## the base
-        LoKi.Dicts.CutValOps(_pt)              ) ## call-traits
-    
-    # "source" : void -> vector<T>    
-    _decorated |= _LoKiCore.getAndDecorateSources ( 
-        name                                   , ## module name  
-        LoKi.Functor   ('void',_vt)            , ## the base
-        LoKi.Dicts.SourceOps(_pt,_pt)          ) ## call-traits
-
-    ## smart info:    
-    _decorated |= _LoKiCore.getAndDecorateInfos      (
-        name                                            , ## module name
-        TrFunc                                          , ## the base 
-        LoKi.Dicts.InfoOps (_pt)                        ) ## methods
-    ##
-
-
-    ## primitive voids:
-    
-    _decorated  |= _LoKiCore.getAndDecoratePrimitiveVoids ( name ) 
-    
-    return _decorated                            ## RETURN
-
-
-# =============================================================================
-## perform the decoration 
-_decorated = _decorate ()                         ## ATTENTION 
-# =============================================================================
-
-## @see LoKi::Cuts::TrDOWNSTREAM
-TrDOWNSTREAM  = equal_to ( TrTYPE , LHCb.Track.Downstream  )
-## @see LoKi::Cuts::TrLONG
-TrLONG        = equal_to ( TrTYPE , LHCb.Track.Long        ) 
-## @see LoKi::Cuts::TrMUON
-TrMUON        = equal_to ( TrTYPE , LHCb.Track.Muon        ) 
-## @see LoKi::Cuts::TrTTRACK
-TrTTRACK      = equal_to ( TrTYPE , LHCb.Track.Ttrack      ) 
-## @see LoKi::Cuts::TrUNKNOWN
-TrUNKNOWN     = equal_to ( TrTYPE , LHCb.Track.TypeUnknown ) 
-## @see LoKi::Cuts::TrUPSTREAM
-TrUPSTREAM    = equal_to ( TrTYPE , LHCb.Track.Upstream    ) 
-## @see LoKi::Cuts::TrVELO
-TrVELO        = equal_to ( TrTYPE , LHCb.Track.Velo        ) 
-## @see LoKi::Cuts::TrVELOR
-TrVELOR       = equal_to ( TrTYPE , LHCb.Track.VeloR       ) 
-
-
-# =============================================================================
-if '__main__' == __name__ :
-    
-    print '*'*120
-    print                      __doc__
-    print ' Author  : %s ' %   __author__    
-    print ' Version : %s ' %   __version__
-    print ' Date    : %s ' %   __date__
-    print ' Number of properly decorated types: %s'%len(_decorated)
-    print '*'*120
-    
-
-
-# =============================================================================
-# The END 
-# =============================================================================
diff --git a/Phys/LoKiTracks/python/LoKiTracks/functions.py b/Phys/LoKiTracks/python/LoKiTracks/functions.py
deleted file mode 100644
index 3b6e19103..000000000
--- a/Phys/LoKiTracks/python/LoKiTracks/functions.py
+++ /dev/null
@@ -1,535 +0,0 @@
-#!/usr/bin/env python
-# =============================================================================
-## @file
-#  The set of basic objects from LoKiTracks library
-#
-#        This file is a part of LoKi project - 
-#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-#
-#  The package has been designed with the kind help from
-#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-#  contributions and advices from G.Raven, J.van Tilburg, 
-#  A.Golutvin, P.Koppenburg have been used in the design.
-#
-#  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-#  @date 2007-06-09
-# =============================================================================
-"""
-The set of basic objects from LoKiTracks library
-
-      This file is a part of LoKi project - 
-``C++ ToolKit  for Smart and Friendly Physics Analysis''
-
-The package has been designed with the kind help from
-Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-contributions and advices from G.Raven, J.van Tilburg, 
-A.Golutvin, P.Koppenburg have been used in the design.
-"""
-# =============================================================================
-__author__  = "Vanya BELYAEV  Ivan.Belyaev@nikhef.nl "
-__date__    = "2010-07-17"
-__version__ = "CVS tag $Name:$, version $Revision$ "
-# =============================================================================
-
-
-import LoKiCore.decorators as _LoKiCore 
-
-# Namespaces:
-from LoKiCore.basic import cpp, std, LoKi
-LHCb     = cpp.LHCb
-
-LHCb.Track.__hash__ = lambda s : LoKi.Tracks.hash ( s ) 
-
-_T = 'const LHCb::Track*'
-
-# =============================================================================
-## "Ordinary" functions for Tracks: "Tr"
-# =============================================================================
-
-## @see LoKi::Types::TrFunc
-TrFunc  = LoKi.Functor                ( _T , 'double' ) 
-## @see LoKi::Types::TrCuts
-TrCuts  = LoKi.Functor                ( _T ,  bool    ) 
-## @see LoKi::Types::TrFun
-TrFun   = LoKi.FunctorFromFunctor     ( _T , 'double' ) 
-## @see LoKi::Types::TrCut
-TrCut   = LoKi.FunctorFromFunctor     ( _T ,  bool    )
-
- 
-## @see LoKi::Cuts::TrTYPE
-TrTYPE        = LoKi.Tracks.Type  () 
-
-## @see @see LoKi::Cuts::TrALL
-TrALL         = LoKi.Constant ( _T , bool ) ( True )
-## @see LoKi::Cuts::TrBACKWARD
-TrBACKWARD    = LoKi.Tracks.CheckFlag ( LHCb.Track.Backward ) 
-## @see LoKi::Cuts::TrCHI2 
-TrCHI2        = LoKi.Tracks.Chi2       () 
-## @see LoKi::Cuts::TrCHI2PDOF 
-TrCHI2PDOF    = LoKi.Tracks.Chi2PerDoF () 
-## @see LoKi::Cuts::TrGHOSTPROB 
-TrGHOSTPROB    = LoKi.Tracks.GhostProb () 
-## @see LoKi::Cuts::TrCLONE
-TrCLONE       = LoKi.Tracks.CheckFlag ( LHCb.Track.Clone ) 
-## ## @see LoKi::Cuts::TrDE
-## TrDE          = LoKi.Tracks.DeltaE     () 
-## @see LoKi::Cuts::TrFALSE
-TrFALSE       = LoKi.Constant( _T , bool ) ( False )
-## @see LoKi::Cuts::TrFILTER
-TrFILTER      = LoKi.Tracks.Filter
-## @see LoKi::Cuts::TrHASINFO
-TrHASINFO     = LoKi.Tracks.HasInfo
-## @see LoKi::Cuts::TrHASSTATE
-TrHASSTATE    = LoKi.Tracks.HasStateAt
-## @see LoKi::Cuts::TrINTES
-TrINTES       = LoKi.Tracks.InTES  () 
-## @see LoKi::Cuts::TrINFO
-TrINFO        = LoKi.Tracks.Info
-## @see LoKi::Cuts::TrINVALID
-TrINVALID     = LoKi.Tracks.CheckFlag ( LHCb.Track.Invalid )
-## @see LoKi::Cuts::TrIPSELECTED
-TrIPSELECTED  = LoKi.Tracks.CheckFlag ( LHCb.Track.IPSelected  )
-## @see LoKi::Cuts::TrISFLAG
-TrISFLAG      = LoKi.Tracks.CheckFlag
-## @see LoKi::Cuts::TrKEY
-TrKEY         = LoKi.Tracks.Key    () 
-## @see LoKi::Cuts::TrL0CANDIDATE
-TrL0CANDIDATE = LoKi.Tracks.CheckFlag ( LHCb.Track.L0Candidate ) 
-## @see LoKi::Cuts::TrNONE
-TrNONE        = LoKi.Constant( _T , bool ) ( False )
-## @see LoKi::Cuts::TrONE
-TrONE         = LoKi.Constant( _T , 'double' ) ( 1.0 )
-## @see LoKi::Cuts::TrP
-TrP           = LoKi.Tracks.Momentum          () 
-## @see LoKi::Cuts::TrPX
-TrPX          = LoKi.Tracks.MomentumX         () 
-## @see LoKi::Cuts::TrPY
-TrPY          = LoKi.Tracks.MomentumY         () 
-## @see LoKi::Cuts::TrPZ
-TrPZ          = LoKi.Tracks.MomentumZ         () 
-## @see LoKi::Cuts::TrPHI
-TrPHI         = LoKi.Tracks.Phi () 
-## @see LoKi::Cuts::TrETA
-TrETA         = LoKi.Tracks.Eta () 
-## @see LoKi::Cuts::TrPIDSELECTED
-TrPIDSELECTED = LoKi.Tracks.CheckFlag ( LHCb.Track.PIDSelected ) 
-## @see LoKi::Cuts::TrPROBCHI2 
-TrPROBCHI2    = LoKi.Tracks.ProbChi2 () 
-## @see LoKi::Cuts::TrPT
-TrPT          = LoKi.Tracks.TransverseMomentum () 
-## @see LoKi::Cuts::TrQ
-TrQ           = LoKi.Tracks.Charge ()
-## @see LoKi::Cuts::TrSELECTED
-TrSELECTED    = LoKi.Tracks.CheckFlag ( LHCb.Track.Selected ) 
-## @see LoKi::Cuts::TrSELECTOR
-TrSELECTOR    = LoKi.Tracks.Selector 
-## @see LoKi::Cuts::TrSINFO
-TrSINFO       = LoKi.Tracks.SmartInfo
-## @see LoKi::Cuts::TrTRUE
-TrTRUE        = LoKi.Constant( _T , bool ) ( True  )
-## @see LoKi::Cuts::TrUSED
-TrUSED        = LoKi.Tracks.CheckFlag ( LHCb.Track.Used )
-## @see LoKi::Cuts::TrZERO
-TrZERO        = LoKi.Constant( _T , 'double' ) ( 0.0 )
-
-## @see LoKi::Cuts::TrIDC
-TrIDC         = LoKi.Tracks.CountIDs
-## @see LoKi::Cuts::TrOTIDC
-TrOTIDC       = LoKi.Tracks.CountOTIDs
-## @see LoKi::Cuts::TrSTIDC
-TrSTIDC       = LoKi.Tracks.CountSTIDs
-## @see LoKi::Cuts::TrVELOIDC
-TrVELOIDC     = LoKi.Tracks.CountVeloIDs
-
-## @see LoKi::Cuts::TrSTATEZ
-TrSTATEZ      = LoKi.Tracks.StateZ
-## @see LoKi::Cuts::TrFIRTSHITZ
-TrFIRSTHITZ   = LoKi.Tracks.StateZ ( LHCb.State.FirstMeasurement )
-
-## @see LoKi::Cuts::TrCOV2
-TrCOV2        = LoKi.Tracks.Cov2
-
-## @see LoKi::Cuts::TrHAST
-TrHAST        = LoKi.Tracks.HasT    () 
-## @see LoKi::Cuts::TrHAST
-TrHASVELO     = LoKi.Tracks.HasVelo () 
-## @see LoKi::Cuts::TrHASTT
-TrHASTT       = LoKi.Tracks.HasTT   () 
-
-## @see LoKi::Cuts::TrPATQUALITY 
-TrPATQUALITY    = LoKi.Tracks.Info  ( LHCb.Track.PatQuality       , -1000 ) 
-## @see LoKi::Cuts::TrMATCHCHI2
-TrMATCHCHI2     = LoKi.Tracks.Info  ( LHCb.Track.MatchChi2        , -1000 ) 
-## @see LoKi::Cuts::TrFITVELOCHI2
-TrFITVELOCHI2   = LoKi.Tracks.Info  ( LHCb.Track.FitVeloChi2      , -1000 )
-## @see LoKi::Cuts::TrFITVELONDOF
-TrFITVELONDOF   = LoKi.Tracks.Info  ( LHCb.Track.FitVeloNDoF      , -1000 )
-## @see LoKi::Cuts::TrFITTCHI2
-TrFITTCHI2      = LoKi.Tracks.Info  ( LHCb.Track.FitTChi2         , -1000 )
-## @see LoKi::Cuts::TrFITTNDOF
-TrFITTNDOF      = LoKi.Tracks.Info  ( LHCb.Track.FitTNDoF         , -1000 )
-## @see LoKi::Cuts::TrFITMATCHCHI2
-TrFITMATCHCHI2  = LoKi.Tracks.Info  ( LHCb.Track.FitMatchChi2     , -1000 )
-## @see LoKi::Cuts::TrTSALIKELIHOOD
-TrTSALIKELIHOOD = LoKi.Tracks.Info  ( LHCb.Track.TsaLikelihood    , -1000 )
-## @see LoKi::Cuts::TrCLONEDIST
-TrCLONEDIST     = LoKi.Tracks.Info  ( LHCb.Track.CloneDist        , 1.e+9 ) 
-
-## @see LoKi::Cuts::TrNVELOMISS
-TrNVELOMISS     = LoKi.Tracks.NVeloMissed ()
-## @see LoKi::Cuts::TrNTHITS    (for Johannes)
-TrNTHITS        = LoKi.Tracks.NTHits      ()
-## @see LoKi::Cuts::TrTNORMIDC  (for Vava) 
-TrTNORMIDC      = LoKi.Tracks.NTHits      ()
-
-## @see LoKi::Cuts::TrNCONSECVELOSPACEPOINTS
-TrNCONSECVELOSPACEPOINTS = LoKi.Tracks.MaxNumConsecutiveVeloSpacePoints ()
-## @see LoKi::Tracks::NumVeloSpacePoints
-TrNVELOSPACEPOINTS       = LoKi.Tracks.NumVeloSpacePoints               ()
-## @see LoKi::Tracks::NumVeloACOverlapHits
-TrNVELOOVERLAPS          = LoKi.Tracks.NumVeloACOverlapHits             ()
-## @see LoKi::Tracks::NumVeloACOverlapHitsR
-TrNVELOOVERLAPSR         = LoKi.Tracks.NumVeloACOverlapHitsR            ()
-## @see LoKi::Tracks::NumVeloACOverlapHitsPhi
-TrNVELOOVERLAPSPHI       = LoKi.Tracks.NumVeloACOverlapHitsPhi          ()
-
-# =============================================================================
-
-## @see LoKi::Tracks::FastDOCAToBeamLine
-Tr_FASTDOCATOBEAMLINE = LoKi.Tracks.FastDOCAToBeamLine
-
-
-
-## functional part
-_vt       = 'std::vector<const LHCb::Track*>'
-_vd       = 'std::vector<double>'
-#
-TrMaps         = LoKi.Functor             ( _vt  , _vd       )
-TrMap          = LoKi.FunctorFromFunctor  ( _vt  , _vd       )
-TrPipes        = LoKi.Functor             ( _vt  , _vt       )
-TrPipe         = LoKi.FunctorFromFunctor  ( _vt  , _vt       )
-TrFunVals      = LoKi.Functor             ( _vt  , 'double'  )
-TrFunVal       = LoKi.FunctorFromFunctor  ( _vt  , 'double'  )
-TrSources      = LoKi.Functor             ('void', _vt  )
-TrSource       = LoKi.FunctorFromFunctor  ('void', _vt  )
-TrCutVals      = LoKi.Functor             ( _vt  , bool )
-TrCutVal       = LoKi.FunctorFromFunctor  ( _vt  , bool )
-
-TrSOURCE       = LoKi.Tracks.SourceTES 
-TrTES          = LoKi.Tracks.SourceTES 
-
-TrEMPTY        = LoKi.Functors.Empty ( _T ) ()
-TrSIZE         = LoKi.Functors.Size  ( _T ) ()
-
-TrNUM          = LoKi.Tracks.TESCounter
-
-
-TrFAKESOURCE   = LoKi.Functors.FakeSource( _T )
-TrVALID        = LoKi.Valid              ( _T )()
-
-# =============================================================================
-## helper function to create ``smart'' RecSumary functor 
-#  @see HASRECSUMMARY
-#  @see    RECSUMMARY
-#  @see      TrNUM
-#  @author rlambert
-#  @date  26.11.2011
-def  recSummaryTrack ( index , trtype, location='Rec/Track/Best' ) :
-    """
-    Helper function to create ``smart'' RecSummary-fucntor
-    
-    result = has summary  ? summary : contains
-    
-    """
-    #
-    from LoKiCore.functions import switch
-    #
-    from LoKiNumbers.functions import (HASRECSUMMARY, RECSUMMARY)
-    return switch ( HASRECSUMMARY ( index      ) ,
-                    RECSUMMARY    ( index , -1 ) ,
-                    TrNUM      ( location , trtype  ) )  
-
-
-
-# ==============================================================================
-## some decoration for States and Tracks
-if not hasattr ( LHCb.State , '_decorated_' ) :
-
-    VE = cpp.Gaudi.Math.ValueWithError
-    
-    LHCb.State._old_p_      = LHCb.State.p
-    LHCb.State._old_pt_     = LHCb.State.pt
-    LHCb.State._old_tx_     = LHCb.State.tx
-    LHCb.State._old_ty_     = LHCb.State.ty
-    LHCb.State._old_x_      = LHCb.State.x
-    LHCb.State._old_y_      = LHCb.State.y
-    LHCb.State._old_qOverP_ = LHCb.State.qOverP
-    
-    def _state_p_ ( state ) :
-        """ Get a momentum (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.p() 
-        """
-        _p  = state._old_p_ () 
-        _e2 = state.errP2   ()
-        return VE ( _p , _e2 )
-
-    def _state_pt_ ( state ) :
-        """ Get a transvserse momentum (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.pt() 
-        """
-        return cpp.LoKi.Tracks.state_pt ( state )
-    
-    def _state_phi_ ( state ) :
-        """ Get an angle phi (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.phi() 
-        """
-        return cpp.LoKi.Tracks.state_phi ( state )
-
-    def _state_theta_ ( state ) :
-        """ Get an angle theta (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.theta() 
-        """
-        return cpp.LoKi.Tracks.state_theta ( state )
-    
-    def _state_eta_ ( state ) :
-        """ Get a pseudorapidity (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.eta() 
-        """
-        return cpp.LoKi.Tracks.state_eta ( state )
-
-    def _state_tx_ ( state ) :
-        """ Get a slope t_x(+uncertainty) of the state
-        >>> state = ...
-        >>> print state.tx()
-        """
-        _tx = state._old_tx_ () 
-        _e2 = state.errTx2   ()
-        return VE ( _tx , _e2 )
-    
-    def _state_ty_ ( state ) :
-        """ Get a slope t_y(+uncertainty) of the state
-        >>> state = ...
-        >>> print state.ty()
-        """
-        _ty = state._old_ty_ () 
-        _e2 = state.errTy2   ()
-        return VE ( _ty , _e2 )
-
-    def _state_x_ ( state ) :
-        """ Get a position x (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.x()
-        """
-        _x  = state._old_x_ () 
-        _e2 = state.errX2   ()
-        return VE ( _x , _e2 )
-    
-    def _state_y_ ( state ) :
-        """ Get a positon y(+uncertainty) of the state
-        >>> state = ...
-        >>> print state.y()
-        """
-        _y  = state._old_y_ () 
-        _e2 = state.errY2   ()
-        return VE ( _y , _e2 )
-
-    def _state_qOverP_ ( state ) :
-        """ Get q/p (+uncertainty) of the state
-        >>> state = ...
-        >>> print state.qOverP()
-        """
-        _q  = state._old_qOverP_ () 
-        _e2 = state.errQOverP2   ()
-        return VE ( _q , _e2 )
-
-    LHCb.State.p           = _state_p_
-    LHCb.State.P           = _state_p_
-    
-    LHCb.State.pt          = _state_pt_
-    LHCb.State.pT          = _state_pt_
-    LHCb.State.Pt          = _state_pt_
-    LHCb.State.PT          = _state_pt_
-
-    LHCb.State.tx          = _state_tx_
-    LHCb.State.tX          = _state_tx_
-    LHCb.State.Tx          = _state_tx_
-    LHCb.State.TX          = _state_tx_
-
-    LHCb.State.ty          = _state_ty_
-    LHCb.State.tY          = _state_ty_
-    LHCb.State.Ty          = _state_ty_
-    LHCb.State.TY          = _state_ty_
-
-    LHCb.State.x           = _state_x_
-    LHCb.State.X           = _state_x_
-
-    LHCb.State.y           = _state_y_
-    LHCb.State.Y           = _state_y_
-
-    LHCb.State.phi         = _state_phi_
-    LHCb.State.theta       = _state_theta_
-    LHCb.State.eta         = _state_eta_
-    
-    LHCb.State.qOverP      = _state_qOverP_
-
-    LHCb.State._decorated_ = True 
-
-# ==============================================================================
-## some decoration for States and Tracks
-if not hasattr ( LHCb.Track , '_decorated_' ) :
-
-    LHCb.Track._old_p_   = LHCb.Track.p
-    LHCb.Track._old_pt_  = LHCb.Track.pt
-    LHCb.Track._old_phi_ = LHCb.Track.phi
-    
-    def _track_p_ ( track ) :
-        """ Get a momentum (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.p() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.p()
-
-    def _track_pt_ ( track ) :
-        """ Get transverse a momentum (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.pt() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.pt()
-    
-    def _track_phi_ ( track ) :
-        """ Get angle phi (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.phi() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.phi()
-
-    def _track_theta_ ( track ) :
-        """ Get angle theta (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.theta() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.theta()
-    
-    def _track_eta_ ( track ) :
-        """ Get pseudorapidity (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.eta() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.eta()
-
-    def _track_tx_ ( track ) :
-        """ Get slope tx (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.tx() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.tx()
-
-    def _track_ty_ ( track ) :
-        """ Get slope ty (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.ty() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.ty()
-
-    def _track_x_ ( track ) :
-        """ Get x (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.x() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.x()
-
-    def _track_y_ ( track ) :
-        """ Get y (+uncertainty) of the track
-        >>> track = ...
-        >>> print track.y() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.y()
-
-    def _track_z_ ( track ) :
-        """ Get z of the track
-        >>> track = ...
-        >>> print track.z() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.z()
-
-    def _track_qOverP_ ( track ) :
-        """ Get q/p of the track
-        >>> track = ...
-        >>> print track.qOverP() 
-        """
-        s = track.stateAt ( LHCb.State.ClosestToBeam ) 
-        if not s : s = track.firstState() 
-        return s.qOverP()
-
-    LHCb.Track.p           = _track_p_
-    LHCb.Track.P           = _track_p_
-    
-    LHCb.Track.pt          = _track_pt_
-    LHCb.Track.pT          = _track_pt_
-    LHCb.Track.Pt          = _track_pt_
-    LHCb.Track.PT          = _track_pt_
-
-    LHCb.Track.tx          = _track_tx_
-    LHCb.Track.tX          = _track_tx_
-    LHCb.Track.Tx          = _track_tx_
-    LHCb.Track.TX          = _track_tx_
-
-    LHCb.Track.ty          = _track_ty_
-    LHCb.Track.tY          = _track_ty_
-    LHCb.Track.Ty          = _track_ty_
-    LHCb.Track.TY          = _track_ty_
-
-    LHCb.Track.x           = _track_x_
-    LHCb.Track.X           = _track_x_
-    LHCb.Track.y           = _track_y_
-    LHCb.Track.Y           = _track_y_
-    LHCb.Track.z           = _track_z_
-    LHCb.Track.Z           = _track_z_
-
-    LHCb.Track.qOverP      = _track_qOverP_
-
-    LHCb.Track.phi         = _track_phi_
-    LHCb.Track.theta       = _track_theta_
-    LHCb.Track.eta         = _track_eta_
-
-    LHCb.Track._decorated_ = True 
-
-
-
-# =============================================================================
-if __name__ == '__main__' :
-    print '*'*120
-    print                      __doc__
-    print ' Author  : %s ' %   __author__    
-    print ' Version : %s ' %   __version__
-    print ' Date    : %s ' %   __date__
-    print '*'*120
-    
-# =============================================================================
-# The END 
-# =============================================================================
diff --git a/Phys/LoKiTracks/python/LoKiTracks/tests.py b/Phys/LoKiTracks/python/LoKiTracks/tests.py
deleted file mode 100755
index 74e8bdce0..000000000
--- a/Phys/LoKiTracks/python/LoKiTracks/tests.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/usr/bin/env python
-# =============================================================================
-## @file   LoKiTracks/tests.py
-#  The simple test script for Phys/LoKiTracks package
-#
-#        This file is a part of LoKi project - 
-#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-#
-#  The package has been designed with the kind help from
-#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-#  contributions and advices from G.Raven, J.van Tilburg, 
-#  A.Golutvin, P.Koppenburg have been used in the design.
-#
-#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-#  @date 2007-05-29
-# =============================================================================
-"""
-The simple test script for Phys/LoKiTracks package
-
-     This file is a part of LoKi project - 
-``C++ ToolKit  for Smart and Friendly Physics Analysis''
-
-The package has been designed with the kind help from
-Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-contributions and advices from G.Raven, J.van Tilburg, 
-A.Golutvin, P.Koppenburg have been used in the design.
-"""
-# =============================================================================
-__author__   = "Vanya BELYAEV  Ivan.Belyaev@itep.ru"
-__date__     = "2007-05-29"
-__version__  = "$Revision: 12005$"
-# =============================================================================
-
-import LoKiNumbers.decorators 
-from   LoKiTracks.decorators  import *
-from   LoKiCore.functions     import *
-from   LoKiCore.math          import *
-
-from   LoKiCore.basic         import LHCb
-if not hasattr ( std , 'stringstream' ) :
-    LHCb.Track.__repr__ = lambda s : LoKi.Print.toString ( s ) 
-    LHCb.State.__repr__ = lambda s : LoKi.Print.toString ( s ) 
-        
-# =============================================================================
-## The most trivial test function
-def test0() :
-    """
-    The most trivial test function
-    """
-    from LoKiTracks.decorators import _decorated
-    print 'LoKiTriggerTest: decorated objects %s'%len(_decorated)
-    pass
-
-
-## the test function for various "functional streamers"
-def test1() :
-    """
-    The test function for various 'functional streamers'
-    """
-
-    s = LHCb.State()
-    s.setState ( 0.0 , 0.0 , 0.0 , 0.01 , 0.01 , 0.2 )  
-    t = LHCb.Track()
-    t.addToStates ( s ) 
-    
-    print 'track: (TrP,TrPT)=(%s,%s)'%(TrP(t),TrPT(t))
-    print 'track: ( t>>TrP , p>>cos(TrPT) )=(%s,%s)'%(t>>TrP,t>>cos(TrPT))
-    
-    v = LHCb.Track.ConstVector()
-    
-    v.push_back(t)
-    
-    t1 = LHCb.Track()
-    s1 = LHCb.State()
-    s1.setState ( 0.0 , 0.0 , 0.0 , -0.01 , -0.01 , 0.1 )  
-    t1.addToStates ( s1 ) 
-    v.push_back ( t1 )
-    
-    t2 = LHCb.Track()
-    s2 = LHCb.State()
-    s2.setState ( 0.0 , 0.0 , 0.0 , +0.01 , -0.01 , 0.05 )  
-    t2.addToStates ( s2 ) 
-    v.push_back ( t2 )
-
-    t3 = LHCb.Track()
-    s3 = LHCb.State()
-    s3.setState ( 0.0 , 0.0 , 0.0 , -0.01 , +0.01 , 0.01 )  
-    t3.addToStates ( s3 ) 
-    v.push_back ( t3 )
-
-    t4 = LHCb.Track()
-    s4 = LHCb.State()
-    s4.setState ( 0.0 , 0.0 , 0.0 , 0.01 , 0.01 , 0.005 )  
-    t4.addToStates ( s4 ) 
-    v.push_back ( t4 )
-
-    t5 = LHCb.Track()
-    s5 = LHCb.State()
-    s5.setState ( 0.0 , 0.0 , 0.0 , 0.01 , 0.01 , 0.001 )  
-    t5.addToStates ( s5 ) 
-    v.push_back ( t5 )
-
-    print ' v>>TrP                            : %s'%(v>>TrP)
-    print ' v>>yields(TrP)                    : %s'%(v>>yields(TrP))
-    print ' v>>process(TrP)>>min_value(TrP)   : %s'%(v>>process(TrP)>>min_value(TrP))
-    print ' v>>(process(TrP)>>min_value(TrP)) : %s'%(v>>(process(TrP)>>min_value(TrP)))
-    print ' v>>min_value(TrPT)                : %s'%(v>>min_value(TrPT))
-    print ' v>>(select(TrP>10)>>TrSIZE)       : %s'%(v>>(select(TrP>10)>>TrSIZE))  
-    print ' v>>select(TrP>10)>>TrSIZE         : %s'%(v>>select(TrP>10)>>TrSIZE)  
-    print ' v>>(select(TrP>10)>>TrEMPTY)      : %s'%(v>>(select(TrP>10)>>TrEMPTY))  
-    print ' v>>select(TrP>10)>>TrEPMTY        : %s'%(v>>select(TrP>10)>>TrEMPTY)  
-
-    print ' v>>min_element(TrP)[0]            : %s'%(v>>min_element(TrP))[0]
-    print ' v>>max_element(TrP)[0]            : %s'%(v>>max_element(TrP))[0]
-
-def test2() :
-    """
-    Test #3 
-    """
-
-    def uints(*args) :
-        x = std.vector('unsigned int')()
-        for a in args : x.push_back(a)
-        return x
-
-    track = LHCb.Track()
-
-    f1  = TrIDC     (   'isVelo'   )
-    
-    f2  = TrOTIDC   (   'module',1 )
-    f3  = TrOTIDC   ( 1,'module',5 )
-    f4  = TrOTIDC   ( 'module', uints( 1, 2, 3, 4, 5 ) )
-    
-    f5  = TrSTIDC   (   'sector',1 )
-    f6  = TrSTIDC   ( 1,'sector',5 )
-    f7  = TrSTIDC   ( 'sector', uints( 1, 2, 3, 4, 5 ) )
-
-    f8  = TrVELOIDC (   'sensor',1 )
-    f9  = TrVELOIDC ( 1,'sensor',5 )
-    f10 = TrVELOIDC ( 'sensor', uints( 1, 2, 3, 4, 5 ) )
-    f11 = TrVELOIDC ( 'pileUp' ) 
-
-    for f in ( f1 , f2, f3, f4, f5, f6, f7, f8, f9, f10, f11 ) :
-        print f , f(track)
-    
-    
-# =============================================================================
-## Perform all known tests
-def testAll() :
-    """
-    Perform all known tests
-    """
-    test0()
-    test1()
-    test2()
-
-
-# =============================================================================
-if '__main__' == __name__ :
-
-    print '*'*120
-    print                      __doc__
-    print ' Author  : %s ' %   __author__    
-    print ' Version : %s ' %   __version__
-    print ' Date    : %s ' %   __date__
-    print '*'*120
-    
-    testAll ()
-# =============================================================================
-    
-# =============================================================================
-# The END 
-# =============================================================================
diff --git a/Phys/LoKiTracks/src/Components/TrackFunctorFactory.cpp b/Phys/LoKiTracks/src/Components/TrackFunctorFactory.cpp
deleted file mode 100644
index d2e080326..000000000
--- a/Phys/LoKiTracks/src/Components/TrackFunctorFactory.cpp
+++ /dev/null
@@ -1,323 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/System.h" 
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/HybridBase.h"
-#include "LoKi/TrackFactoryLock.h"
-#include "LoKi/ITrackFunctorFactory.h"
-#include "LoKi/ITrackFunctorAntiFactory.h"
-// ============================================================================
-/** @file 
- *
- *  definition and implementation file for class LoKi::Hybrid::TrackFunctorFactory
- *  
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- *  @date 2004-06-29
- */
-// ============================================================================
-namespace LoKi 
-{
-  // ==========================================================================
-  namespace Hybrid 
-  {
-    // ========================================================================
-    /** @class TrackFunctorFactory
-     *
-     *  Concrete impelmentation of LoKi::ITrHybridTool interface 
-     *  This file is a part of LoKi project - 
-     *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
-     *
-     *  The package has been designed with the kind help from
-     *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
-     *  contributions and advices from G.Raven, J.van Tilburg, 
-     *  A.Golutvin, P.Koppenburg have been used in the design.
-     *
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date   2004-06-29
-     */
-    class TrackFunctorFactory 
-    // : public virtual extends2< LoKi::Hybrid::Base             ,
-    // LoKi::ITrackFunctorFactory     ,
-    // LoKi::ITrackFunctorAntiFactory >
-      : public virtual LoKi::Hybrid::Base         
-      , public virtual LoKi::ITrackFunctorFactory 
-      , public virtual LoKi::ITrackFunctorAntiFactory 
-    {
-      // ======================================================================
-      // friend factory for instantiation
-      friend class ToolFactory<LoKi::Hybrid::TrackFunctorFactory> ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// finalization   of the tool 
-      virtual StatusCode finalize   () ;
-      // ======================================================================
-    public:
-      // ========================================================================
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param cuts the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&   pycode  , 
-        LoKi::Types::TrCut&  cuts    , 
-        const std::string&   context ) 
-      { return _get ( pycode , m_trcuts  , cuts , context ) ; }
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&   pycode  ,
-        LoKi::Types::TrFun&  func    ,
-        const std::string&   context )
-      { return _get ( pycode , m_trfunc  , func , context ) ; }
-      // ========================================================================
-    public:
-      // ========================================================================
-      // functional part for LHCb::Track
-      // ========================================================================
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&   pycode  , 
-        LoKi::Types::TrMap&  func    , 
-        const std::string&   context )
-      { return _get ( pycode , m_trMaps  , func , context ) ; }
-      // ========================================================================
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&   pycode  , 
-        LoKi::Types::TrPipe& func    , 
-        const std::string&   context ) 
-      { return _get ( pycode , m_trPipes  , func , context ) ; }
-      // ========================================================================
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&     pycode  , 
-        LoKi::Types::TrFunVal& func    , 
-        const std::string&     context ) 
-      { return _get ( pycode , m_trFunVals  , func , context ) ; }
-      // ======================================================================== 
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&     pycode  , 
-        LoKi::Types::TrCutVal& func    , 
-        const std::string&     context ) 
-      { return _get ( pycode , m_trCutVals  , func , context ) ; }
-      // ========================================================================
-      /** "Factory": get the the object form python code 
-       *  @param pycode the python pseudo-code of the function
-       *  @param func the placeholder for the result 
-       *  @param context the context lines to be executed 
-       *  @return StatusCode 
-       */
-      virtual StatusCode get
-      ( const std::string&     pycode  , 
-        LoKi::Types::TrSource& func    , 
-        const std::string&     context )
-      { return _get ( pycode , m_trSources  , func , context ) ; }
-      // ========================================================================
-    public: // "Anti-Factory"
-      // ========================================================================
-      /// set the C++ predicate for LHCb::Track
-      virtual void set ( const LoKi::Types::TrCuts&    cut ) 
-      { LoKi::Hybrid::Base::_set ( m_trcuts   , cut ) ; }
-      /// set the C++ function for LHCb::Track
-      virtual void set ( const LoKi::Types::TrFunc&    fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trfunc  , fun ) ; }
-      // ======================================================================
-    public: // "Anti-factory": functional part for Tracks 
-      // ======================================================================
-      /// set the C++ "maps"     for Tracks 
-      virtual void set ( const LoKi::Types::TrMaps&     fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trMaps      , fun ) ; }
-      /// set the C++ "pipes"    for Tracks 
-      virtual void set ( const LoKi::Types::TrPipes&    fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trPipes     , fun ) ; }
-      /// set the C++ "funvals"  for Tracks 
-      virtual void set ( const LoKi::Types::TrFunVals&  fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trFunVals   , fun ) ; }
-      /// set the C++ "cutvals"  for Tracks 
-      virtual void set ( const LoKi::Types::TrCutVals&  fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trCutVals   , fun ) ; }
-      /// set the C++ "sources"  for Tracks 
-      virtual void set ( const LoKi::Types::TrSources&  fun ) 
-      { LoKi::Hybrid::Base::_set ( m_trSources   , fun ) ; }
-      // ======================================================================
-    protected:
-      // ======================================================================
-      /// constructor
-      TrackFunctorFactory
-      ( const std::string& type   ,
-        const std::string& name   ,
-        const IInterface*  parent ) ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// the default constructor is disabled 
-      TrackFunctorFactory () ; //the default constructor is disabled     
-      /// the copy constructor is disabled 
-      TrackFunctorFactory           ( const TrackFunctorFactory& )  ;
-      /// the assignement operator  is disabled 
-      TrackFunctorFactory& operator=( const TrackFunctorFactory& )  ; 
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// helper method to save many lines:
-      template <class TYPE1,class TYPE2>
-      inline StatusCode _get 
-      ( const std::string&                                            pycode  , 
-        std::unique_ptr<LoKi::Functor<TYPE1,TYPE2>>&                  local   , 
-        typename LoKi::Assignable<LoKi::Functor<TYPE1,TYPE2> >::Type& output  , 
-        const std::string&                                            context ) ;
-      // ======================================================================
-    protected:
-      // ======================================================================
-      // local holder of cuts 
-      std::unique_ptr<LoKi::Types::TrCuts>     m_trcuts     ;
-      std::unique_ptr<LoKi::Types::TrFunc>     m_trfunc     ;
-      // functional parts for LHCb::Tracks
-      std::unique_ptr<LoKi::Types::TrMaps>     m_trMaps     ;
-      std::unique_ptr<LoKi::Types::TrPipes>    m_trPipes    ;
-      std::unique_ptr<LoKi::Types::TrFunVals>  m_trFunVals  ;
-      std::unique_ptr<LoKi::Types::TrCutVals>  m_trCutVals  ;
-      std::unique_ptr<LoKi::Types::TrSources>  m_trSources  ;
-      //
-      typedef std::vector<std::string> Modules ;
-      Modules     m_modules ;
-      std::string m_actor   =  "LoKi.Hybrid.TrackEngine()" ;
-      typedef std::vector<std::string> Lines   ;
-      Lines       m_lines   ;
-      // ======================================================================
-    } ;
-    // ========================================================================
-  } //                                            end of namespace LoKi::Hybrid 
-  // ==========================================================================
-} //                                                      end of namespace LoKi
-// ============================================================================
-// helper method to save many lines:
-// ============================================================================
-template <class TYPE1,class TYPE2>
-inline StatusCode LoKi::Hybrid::TrackFunctorFactory::_get 
-( const std::string&                                            pycode  , 
-  std::unique_ptr<LoKi::Functor<TYPE1,TYPE2>>&                  local   , 
-  typename LoKi::Assignable<LoKi::Functor<TYPE1,TYPE2> >::Type& output  , 
-  const std::string&                                            context ) 
-{
-  // ==========================================================================
-  // consistency check:
-  const LoKi::Functor<TYPE1,TYPE2>* tmp = &output ;
-  StatusCode sc = ( 0 != tmp ) ? StatusCode::SUCCESS : StatusCode::FAILURE ;
-  // prepare the actual python code 
-  std::string code = 
-    makeCode  ( m_modules , m_actor , pycode , m_lines , context ) ;
-  // define the scope:  ATTENTION: the scope is locked!!
-  LoKi::Hybrid::TrackFactoryLock lock ( this ) ; 
-  //
-  // use the base class method 
-  sc = LoKi::Hybrid::Base::_get_ ( code , local , output ) ;
-  if ( sc.isFailure() )
-  { return Error ( "Invalid object for the code '" + pycode + "'"    ) ; } // RETURN
-  //
-  //
-  return StatusCode::SUCCESS ;
-  // =========================================================================
-}
-// ============================================================================
-// Standard constructor
-// ============================================================================
-LoKi::Hybrid::TrackFunctorFactory::TrackFunctorFactory 
-( const std::string& type   ,
-  const std::string& name   ,
-  const IInterface*  parent )
-// : base_class ( type , name , parent )
-  : LoKi::Hybrid::Base( type , name , parent )
-///
-{
-  declareInterface<LoKi::ITrackFunctorFactory>     (this) ;
-  declareInterface<LoKi::ITrackFunctorAntiFactory> (this) ;  
-  //
-  m_modules.push_back ( "LoKiTracks.decorators"  ) ;
-  m_modules.push_back ( "LoKiCore.math"          ) ;
-  m_modules.push_back ( "LoKiCore.functions"     ) ;
-  //
-  declareProperty 
-    ( "Modules" , 
-      m_modules , 
-      "Python modules to be imported"            ) ;
-  declareProperty 
-    ( "Actor"   , 
-      m_actor   , 
-      "The processing engine"                    ) ;
-  declareProperty 
-    ( "Lines"   , 
-      m_lines   , 
-      "Additional Python lines to be executed"   ) ;
-  // ==========================================================================
-  // C++
-  // ==========================================================================
-  m_cpplines.push_back ( "#include \"LoKi/LoKiTracks.h\"" ) ;
-  // ==========================================================================
-} 
-// ============================================================================
-// finalization of the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackFunctorFactory::finalize  () 
-{
-  //
-  m_trcuts.reset();
-  m_trfunc.reset();
-  //
-  m_trMaps.reset();
-  m_trPipes.reset();
-  m_trFunVals.reset();
-  m_trCutVals.reset();
-  m_trSources.reset();
-  //  
-  // finalize the base 
-  return LoKi::Hybrid::Base::finalize() ;
-}
-// ============================================================================
-DECLARE_NAMESPACE_TOOL_FACTORY(LoKi::Hybrid,TrackFunctorFactory)
-// ============================================================================
-
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/Components/TrackSelector.cpp b/Phys/LoKiTracks/src/Components/TrackSelector.cpp
deleted file mode 100644
index 318e88558..000000000
--- a/Phys/LoKiTracks/src/Components/TrackSelector.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-// $Id$
-// ============================================================================
-// $URL$
-// ============================================================================
-// Include files 
-// ============================================================================
-// GaudiAlg
-// ============================================================================
-#include "GaudiAlg/GaudiTool.h" 
-// ============================================================================
-// TrackInerfaces 
-// ============================================================================
-#include "TrackInterfaces/ITrackSelector.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/ITrackFunctorFactory.h"
-#include "LoKi/Primitives.h"
-#include "LoKi/Operators.h"
-// ============================================================================
-// Boost 
-// ============================================================================
-#include "boost/algorithm/string/join.hpp"
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Hybrid 
-  {
-    // ========================================================================
-    /** @class TrackSelector     TrackSelector.cpp
-     *
-     *  Simple "hybrid-based" implementation of the interface 
-     *  ITrackSelector 
-     *  
-     *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
-     *  @date 2007-07-26
-     */
-    class TrackSelector 
-    // : public extends1<GaudiTool,ITrackSelector>
-      : public virtual GaudiTool
-      , public virtual ITrackSelector
-    {
-      // ======================================================================
-      /// the friend factory for istantiation
-      friend class ToolFactory<LoKi::Hybrid::TrackSelector> ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// the method @see ITrackSelector
-      virtual bool accept(const LHCb::Track& aTrack) const ;
-      // ======================================================================
-    public:
-      // ======================================================================
-      /// intialize the tool 
-      virtual StatusCode initialize () ;      
-      // ======================================================================
-    protected:
-      // ======================================================================
-      /// Standard constructor
-      TrackSelector  
-      ( const std::string& type, 
-        const std::string& name,
-        const IInterface* parent) ;
-      // ======================================================================
-      /// destructor : virtual and protected
-      virtual ~TrackSelector () {}
-      // ======================================================================
-    protected:
-      // ======================================================================
-      // update handler for properties 
-      void update ( Property& p ) ;            // update handler for properties 
-      /// decode the cuts 
-      StatusCode decode () const ;
-      /// get the preambulo 
-      std::string preambulo() const ;
-      // ======================================================================
-    private:
-      // ======================================================================
-      /// selection criteria itself 
-      mutable LoKi::Types::TrCut m_cut             ; //      selection criteria 
-      /// python pseudo-code
-      std::string                m_code            ; //      python pseudo-code
-      /// factory type/name
-      std::string                m_factory         ; //       factory type/name
-      /// preambulo 
-      std::vector<std::string>   m_preambulo       ; //           the preambulo 
-      /// update required ? 
-      mutable bool               m_update_required ; //       update required ?
-      // ======================================================================
-    } ; 
-    // ========================================================================
-  } //                                            end of namespace LoKi::Hybrid 
-  // ==========================================================================
-} //                                                      end of namespace LoKi 
-// ============================================================================
-// Standard constructor
-LoKi::Hybrid::TrackSelector::TrackSelector  
-( const std::string& type, 
-  const std::string& name,
-  const IInterface* parent)
-// : base_class  ( type , name , parent )
-  : GaudiTool   ( type , name , parent )
-  , m_cut       ( LoKi::BasicFunctors<const LHCb::Track*>::BooleanConstant ( false ) ) 
-  , m_code      ( "TrNONE" )
-  , m_factory   ( "LoKi::Hybrid::TrackFunctorFactory/TrackFunctorFactory:PUBLIC") 
-  , m_preambulo () 
-  , m_update_required ( true ) 
-{
-  declareInterface<ITrackSelector> ( this ) ;
-  // 
-  if      ( 0 == name.find ( "Hlt1" ) ) 
-  { m_factory = "LoKi::Hybrid::TrackFunctorFactory/Hlt1TrackFunctorFactory:PUBLIC" ; }
-  else if ( 0 == name.find ( "Hlt2" ) ) 
-  { m_factory = "LoKi::Hybrid::TrackFunctorFactory/Hlt2TrackFunctorFactory:PUBLIC" ; }
-  //
-  declareProperty 
-    ( "Code"    , 
-      m_code    , 
-      "Python pseudocode for the filter criteria"           ) 
-    -> declareUpdateHandler ( &LoKi::Hybrid::TrackSelector::update , this ) ;
-  //
-  declareProperty 
-    ( "Factory" , 
-      m_factory , 
-      "Type/Name for C++/Python LoKi/Bender Hybrid Factory" ) 
-    -> declareUpdateHandler ( &LoKi::Hybrid::TrackSelector::update , this ) ;
-  //
-  declareProperty 
-    ( "Preambulo" , 
-      m_preambulo , 
-      "Additional Python lines to be used for processing"   ) 
-    -> declareUpdateHandler ( &LoKi::Hybrid::TrackSelector::update , this ) ;
-} 
-// ============================================================================
-// decode the cuts 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackSelector::decode () const  
-{
-  //
-  m_update_required = true  ;
-  // (1) get the factory:
-  LoKi::ITrackFunctorFactory* factory = 
-    tool<LoKi::ITrackFunctorFactory> ( m_factory , this ) ;
-  if ( 0 == factory ) 
-  { return Error ( "Could not locate LoKi::ITrackFunctorFactory" ) ; } // RETURN 
-  // (2) use the factory to get the cuts 
-  StatusCode sc = factory->get (  m_code , m_cut  , preambulo() ) ;
-  if ( sc.isFailure() ) 
-  { return Error ( "Error from LoKi::ITrackFunctorFactory", sc   ) ; } // RETURN 
-  // 
-  info() << "CUT: '" << m_cut << "' "<< endmsg ;
-  //
-  m_update_required = false ;
-  // (3) release factory, not needed anymore
-  release ( factory ) ;
-  //
-  return StatusCode::SUCCESS ;  
-}
-// ============================================================================
-// the intialization of the tool
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackSelector::initialize () 
-{
-  // (1) initialize the base 
-  StatusCode  sc = GaudiTool::initialize() ;
-  if ( sc.isFailure() ) { return sc ; }                                // RETURN 
-  // (2) decode the cuts 
-  sc = decode() ;
-  if ( sc.isFailure() ) { return Error("Unable to decode the cuts" , sc ) ; }
-  //
-  return StatusCode::SUCCESS ;
-}
-// ============================================================================
-// update handler for properties 
-// ============================================================================
-void LoKi::Hybrid::TrackSelector::update ( Property& p ) // update the conditions map 
-{
-  //
-  m_update_required = true ;
-  //
-  // no action if not yet initialized 
-  if ( Gaudi::StateMachine::INITIALIZED > FSMState()   ) { return ; } 
-  // 
-  debug () << " Property is updated: " << p << endmsg ;
-  //
-  m_update_required = true ;
-  //
-}
-// ============================================================================
-// the method @see ITrackSelector
-// ============================================================================
-bool LoKi::Hybrid::TrackSelector::accept ( const LHCb::Track& aTrack ) const 
-{
-  if ( m_update_required ) 
-  {
-    StatusCode sc = decode() ;
-    Assert ( sc.isSuccess() , "Unable to decode the code" ) ;
-  }
-  //
-  return m_cut ( &aTrack ) ; 
-}
-// ============================================================================
-// get the preambulo 
-// ============================================================================
-std::string LoKi::Hybrid::TrackSelector::preambulo() const 
-{ return boost::algorithm::join( m_preambulo , "\n" ) ; }
-
-
-// ============================================================================
-/// Declaration of the Tool Factory
-DECLARE_NAMESPACE_TOOL_FACTORY(LoKi::Hybrid,TrackSelector)
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/LoKiTracks.cpp b/Phys/LoKiTracks/src/LoKiTracks.cpp
deleted file mode 100644
index 4e5ca2e85..000000000
--- a/Phys/LoKiTracks/src/LoKiTracks.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// Local 
-// ============================================================================
-#include "LoKi/LoKiTracks.h"
-// ============================================================================
-#include "LoKi/ITrackFunctorAntiFactory.h"
-#include "LoKi/ITrackFunctorFactory.h"
-#include "LoKi/TrackCuts.h"
-#include "LoKi/TrackEngineActor.h"
-#include "LoKi/TrackEngine.h"
-#include "LoKi/TrackFactoryLock.h"
-#include "LoKi/TrackIDs.h"
-#include "LoKi/Tracks.h"
-#include "LoKi/TrackTypes.h"
-#include "LoKi/TrSources.h"
-#include "LoKi/VeloHitPatternFunctions.h"
-// =======================================================================
-/** @file
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- */
-// ============================================================================
-// the specific printout
-// ============================================================================
-template <>
-std::ostream& LoKi::Functors::Empty<const LHCb::Track*>::fillStream
-( std::ostream& s ) const { return s << "TrEMPTY" ; }
-// ============================================================================
-// the specific printpout
-// ============================================================================
-template <>
-std::ostream& LoKi::Functors::Size<const LHCb::Track*>::fillStream
-( std::ostream& s ) const { return s << "TrSIZE" ; }
-// ============================================================================
-// the specific printpout
-// ============================================================================
-template <>
-std::ostream& 
-LoKi::Constant<const LHCb::Track*,bool>::fillStream( std::ostream& s ) const 
-{ return s << ( this->m_value ? "TrALL" : "TrNONE" ) ; }
-// ============================================================================
-template <>
-LoKi::Functors::Dump_<const LHCb::Track*>::result_type 
-LoKi::Functors::Dump_<const LHCb::Track*>::operator() 
-  ( LoKi::Functors::Dump_<const LHCb::Track*>::argument a ) const 
-{
-  const unsigned int mx = std::min ( m_dump.nMax() , a.size() ) ;
-  //
-  m_stream << m_dump.open  () ;
-  //
-  for ( unsigned int i = 0 ; i < mx ; ++i ) 
-  {
-    const LHCb::Track* track = a[i] ;
-    if (  0 == track ) 
-    { m_stream << "<NULL> LHCb::Track" << std::endl ; }
-    else 
-    { m_stream << ( *track ) ; }
-  }
-  //
-  m_stream << m_dump.close () ;
-  //
-  return a ; 
-}
-// ============================================================================
-template <>
-LoKi::Functors::Dump1_<const LHCb::Track*,bool>::result_type 
-LoKi::Functors::Dump1_<const LHCb::Track*,bool>::operator() 
-  ( LoKi::Functors::Dump1_<const LHCb::Track*,bool>::argument a ) const 
-{
-
-  if ( m_right ) 
-  {
-    m_stream << m_dump.open  () ;
-    //
-    if ( 0 == a ) { m_stream << "<NULL> LHCb::Track" << std::endl ; }
-    else          { m_stream << (*a) ; }
-    //
-    m_stream << m_dump.close () ;
-    return m_fun ( a ) ;
-  }
-  //
-  result_type result = m_fun ( a ) ;
-  //
-  m_stream << m_dump.open  () ;
-  //
-  if ( 0 == a ) { m_stream << "<NULL> LHCb::Track" << std::endl ; }
-  else          { m_stream << (*a) ; }
-  //
-  m_stream << m_dump.close () ;
-  //
-  return result ;
-}
-// ============================================================================
-template <>
-LoKi::Functors::Dump1_<const LHCb::Track*,double>::result_type 
-LoKi::Functors::Dump1_<const LHCb::Track*,double>::operator() 
-  ( LoKi::Functors::Dump1_<const LHCb::Track*,double>::argument a ) const 
-{
-  
-  if ( m_right ) 
-  {
-    m_stream << m_dump.open  () ;
-    //
-    if ( 0 == a ) { m_stream << "<NULL> LHCb::Track" << std::endl ; }
-    else          { m_stream << (*a) ; }
-    //
-    m_stream << m_dump.close () ;
-    return m_fun ( a ) ;
-  }
-  //
-  result_type result = m_fun ( a ) ;
-  //
-  m_stream << m_dump.open  () ;
-  //
-  if ( 0 == a ) { m_stream << "<NULL> LHCb::Track" << std::endl ; }
-  else          { m_stream << (*a) ; }
-  //
-  m_stream << m_dump.close () ;
-  //
-  return result ;
-}
-// ============================================================================
-// The END 
-// ============================================================================
-
-
diff --git a/Phys/LoKiTracks/src/LoKiTracks_dct.cpp b/Phys/LoKiTracks/src/LoKiTracks_dct.cpp
deleted file mode 100644
index 3fbad340f..000000000
--- a/Phys/LoKiTracks/src/LoKiTracks_dct.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// $Id:$ 
-// ===========================================================================
-// Include files 
-// ===========================================================================
-// local
-// ===========================================================================
-#include "LoKi/LoKiTracks_dct.h"
-// ===========================================================================
-// The END 
-// ===========================================================================
diff --git a/Phys/LoKiTracks/src/TrSources.cpp b/Phys/LoKiTracks/src/TrSources.cpp
deleted file mode 100644
index 1a8a0e1d3..000000000
--- a/Phys/LoKiTracks/src/TrSources.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/SmartDataPtr.h"
-#include "GaudiKernel/ToStream.h"
-#include "GaudiKernel/IMessageSvc.h"
-#include "GaudiKernel/MsgStream.h"
-// ============================================================================
-// GaudiAlg
-// ============================================================================
-#include "GaudiAlg/GetData.h"
-// ============================================================================
-// Event 
-// ============================================================================
-#include "Event/Track.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrSources.h"
-#include "LoKi/Services.h"
-#include "LoKi/select.h"
-#include "LoKi/apply.h"
-#include "LoKi/Algs.h"
-// ============================================================================
-/** @file 
- *  Implementation file for various sources
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV ibelyav@physics.syr.edu
- *  @date 2006-12-07
- */
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const std::string&              path , 
-  IDataProviderSvc*               svc  , 
-  const LoKi::TrackTypes::TrCuts& cuts ) 
-  : LoKi::AuxFunBase ( std::tie ( path , cuts ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( 1 , path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const std::vector<std::string>& path , 
-  IDataProviderSvc*               svc  , 
-  const LoKi::TrackTypes::TrCuts& cuts ) 
-  : LoKi::AuxFunBase ( std::tie ( path , cuts ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const std::string&              path , 
-  const LoKi::TrackTypes::TrCuts& cuts , 
-  IDataProviderSvc*               svc  ) 
-  : LoKi::AuxFunBase ( std::tie ( path , cuts ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( 1 , path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const std::vector<std::string>& path , 
-  const LoKi::TrackTypes::TrCuts& cuts , 
-  IDataProviderSvc*               svc  ) 
-  : LoKi::AuxFunBase ( std::tie ( path , cuts ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const LoKi::TrackTypes::TrCuts& cuts ,
-  const std::string&              path , 
-  IDataProviderSvc*               svc  ) 
-  : LoKi::AuxFunBase ( std::tie (  cuts , path ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( 1 , path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const LoKi::TrackTypes::TrCuts& cuts ,
-  const std::vector<std::string>& path , 
-  IDataProviderSvc*               svc  ) 
-  : LoKi::AuxFunBase ( std::tie (  cuts , path ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const LoKi::TrackTypes::TrCuts& cuts ,
-  IDataProviderSvc*               svc  ,
-  const std::string&              path ) 
-  : LoKi::AuxFunBase ( std::tie (  cuts , path ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( 1 , path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const LoKi::TrackTypes::TrCuts& cuts ,
-  IDataProviderSvc*               svc  ,
-  const std::vector<std::string>& path ) 
-  : LoKi::AuxFunBase ( std::tie (  cuts , path ) ) 
-  , LoKi::Tracks::SourceTES::_Source () 
-  , m_path    ( path ) 
-  , m_dataSvc ( svc  ) 
-  , m_cut     ( cuts )
-{}
-// ============================================================================
-// copy constructor
-// ============================================================================
-LoKi::Tracks::SourceTES::SourceTES 
-( const LoKi::Tracks::SourceTES& right ) 
-  : LoKi::AuxFunBase                 ( right ) 
-  , LoKi::Tracks::SourceTES::_Source ( right ) 
-  , m_path    ( right.m_path    ) 
-  , m_dataSvc ( right.m_dataSvc ) 
-  , m_cut     ( right.m_cut     ) 
-{}
-// ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Tracks::SourceTES::~SourceTES(){}
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::SourceTES* LoKi::Tracks::SourceTES::clone() const 
-{ return new SourceTES(*this) ; }
-// ============================================================================
-// MANDATORY: the only essential method:
-// ============================================================================
-LoKi::Tracks::SourceTES::result_type 
-LoKi::Tracks::SourceTES::operator() () const 
-{
-  if ( !m_dataSvc ) 
-  {
-    const LoKi::Services& svcs = LoKi::Services::instance() ;
-    m_dataSvc = svcs.evtSvc() ;
-    Assert ( m_dataSvc.validPointer ( )               ,
-             "Could not locate valid IDataProviderSvc" ) ;
-  }
-  //
-  Assert ( !m_path.empty() , "No TES locations are specified!" ) ;
-  //
-  LHCb::Track::ConstVector output ;
-  //
-  for ( std::vector<std::string>::const_iterator iaddr = 
-          m_path.begin() ; m_path.end() != iaddr ; ++iaddr ) 
-  {
-    LHCb::Track::Range r = get ( *iaddr ) ;
-    //
-    /// select the tracks 
-    LoKi::apply_filter  
-      ( r.begin () , 
-        r.end   () , 
-        m_cut.func ()      , 
-        std::back_inserter ( output ) ) ;
-  }
-  //
-  return output ;
-}
-// ============================================================================
-// get the particles from the certain  TES location 
-// ============================================================================
-LHCb::Track::Range LoKi::Tracks::SourceTES::get
-( const std::string& location , 
-  const bool         exc      ) const 
-{
-  if ( !m_dataSvc ) 
-  {
-    const LoKi::Services& svcs = LoKi::Services::instance() ;
-    m_dataSvc = svcs.evtSvc() ;
-    Assert ( m_dataSvc.validPointer ( )               ,
-             "Could not locate valid IDataProviderSvc" ) ;
-  }
-  //  
-  Gaudi::Utils::GetData<LHCb::Track::Range> data ;
-  //
-  SmartDataPtr<LHCb::Track::Selection> tracks_1 ( m_dataSvc , location ) ;
-  if ( !(!tracks_1) ) { return data.make_range ( tracks_1 ) ; }
-  //
-  SmartDataPtr<LHCb::Track::Container> tracks_2 ( m_dataSvc , location ) ;
-  if ( !(!tracks_2) ) { return data.make_range ( tracks_2 ) ; }
-  //
-  if ( exc ) 
-  { Exception ( "No valid data is found at location '" + location + "'") ; }
-  else 
-  { Error     ( "No valid data is found at location '" + location + "'") ; }
-  //
-  return LHCb::Track::Range() ;
-}
-// ============================================================================
-// OPTIONAL: the nice printout
-// ============================================================================
-std::ostream& 
-LoKi::Tracks::SourceTES::fillStream ( std::ostream& o ) const 
-{ return o << "TrSOURCE(" 
-           << Gaudi::Utils::toString( m_path ) << "," << m_cut << ")" ; }
-// ============================================================================
-
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::TESCounter::TESCounter 
-( const std::string&              path , 
-  const LoKi::TrackTypes::TrCuts& cuts )
-  : LoKi::AuxFunBase ( std::tie (  path , cuts ) ) 
-  , LoKi::Functor<void,double> () 
-  , m_source ( path , cuts ) 
-{}
-// ============================================================================
-// constructor from the service, TES location and cuts 
-// ============================================================================
-LoKi::Tracks::TESCounter::TESCounter 
-( const std::vector<std::string>& path                    , 
-  const LoKi::TrackTypes::TrCuts& cuts )
-  : LoKi::AuxFunBase ( std::tie ( path , cuts ) ) 
-  , LoKi::Functor<void,double> () 
-  , m_source ( path , cuts ) 
-{}
-// ============================================================================
-// MANDATORY: virtual destructor 
-// ============================================================================
-LoKi::Tracks::TESCounter::~TESCounter(){}
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::TESCounter*
-LoKi::Tracks::TESCounter::clone() const 
-{ return new LoKi::Tracks::TESCounter( *this ) ; }
-// ============================================================================
-// MANDATORY: the only essential method:
-// ============================================================================
-LoKi::Tracks::TESCounter::result_type 
-LoKi::Tracks::TESCounter::operator() ( /* argument */ ) const 
-{
-  unsigned long num = 0 ;
-  
-  typedef std::vector<std::string> List ;
-  const List& paths = m_source.paths() ;
-  for ( List::const_iterator iaddr = paths.begin() ; 
-        paths.end() != iaddr ; ++iaddr ) 
-  {
-    // get tracks 
-    LHCb::Track::Range r = m_source.get ( *iaddr , false ) ;
-    // count tracks 
-    num += LoKi::Algs::count_if ( r.begin () , r.end () , m_source.cut() ) ;
-  }
-  //
-  return num ;
-}
-// ============================================================================
-// OPTIONAL: the nice printout
-// ============================================================================
-std::ostream& 
-LoKi::Tracks::TESCounter::fillStream ( std::ostream& o ) const 
-{ return o << "TrNUM(" 
-           << Gaudi::Utils::toString( m_source.paths() ) 
-           << "," << m_source.cut() << ")" ; }
-// ============================================================================
-
-
-
-
-
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrStreamers.cpp b/Phys/LoKiTracks/src/TrStreamers.cpp
deleted file mode 100644
index 647ad944d..000000000
--- a/Phys/LoKiTracks/src/TrStreamers.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-// ============================================================================
-// Include files
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <set>
-#include <algorithm>
-#include <functional>
-// ============================================================================
-// local
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-// ============================================================================
-/** @file
- *
- *  implementation of some streamers
- *
- *  This file is a part of LoKi project -
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas,
- *  contributions and advices from G.Raven, J.van Tilburg,
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date 2012-05-24
- */
-// ============================================================================
-namespace
-{
-  // ==========================================================================
-  template <class TRACK>
-  inline
-  LHCb::Track::ConstVector
-  _get_ ( TRACK                      first ,
-          TRACK                      last  ,
-          const LoKi::Types::TrCuts& cuts  )
-  {
-    //
-    LHCb::Track::ConstVector trks ; trks.reserve ( last - first ) ;
-    std::copy_if ( first ,
-                   last  ,
-                   std::back_inserter ( trks ) , std::cref(cuts) ) ;
-    //
-    return trks ;
-  }
-  // ==========================================================================
-  template <class TRACKS>
-  inline
-  LHCb::Track::ConstVector
-  _get_ ( const TRACKS*              tracks ,
-          const LoKi::Types::TrCuts& cuts   )
-  {
-    //
-    LHCb::Track::ConstVector trks ;
-    if ( !tracks || tracks->empty() ) { return trks ; }
-    //
-    trks.reserve ( tracks -> size  () ) ;
-    std::copy_if ( tracks -> begin () ,
-                   tracks -> end   () ,
-                   std::back_inserter ( trks ) , std::cref(cuts) ) ;
-    //
-    return trks ;
-  }
-  // ==========================================================================
-  template <class TRACK>
-  inline
-  std::vector<double>
-  _get_ ( TRACK                      first ,
-          TRACK                      last  ,
-          const LoKi::Types::TrFunc& func  )
-  {
-    //
-    std::vector<double> r ; r.reserve ( last - first ) ;
-    //
-    LoKi::apply ( first ,
-                  last  , func , std::back_inserter ( r ) ) ;
-    //
-    return r ;
-  }
-  // ==========================================================================
-  template <class TRACKS>
-  inline
-  std::vector<double>
-  _get_ ( const TRACKS*              tracks ,
-          const LoKi::Types::TrFunc& func   )
-  {
-    std::vector<double> r ;
-    if ( 0 == tracks || tracks -> empty() ) { return r ; }
-    //
-    r.reserve   ( tracks->size() ) ;
-    //
-    LoKi::apply ( tracks -> begin ()  ,
-                  tracks -> end   ()  , func , std::back_inserter ( r ) ) ;
-    //
-    return r ;
-  }
-  // ==========================================================================
-}
-// ============================================================================
-LHCb::Track::ConstVector
-operator>>
-( const LHCb::Track::ConstVector&    input ,
-  const LoKi::Types::TrCuts&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ============================================================================
-LHCb::Track::ConstVector
-operator>>
-( const LHCb::Track::Range&          input ,
-  const LoKi::Types::TrCuts&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ===========================================================================
-LHCb::Track::ConstVector
-operator>>
-( const SmartRefVector<LHCb::Track>& input ,
-  const LoKi::Types::TrCuts&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ===========================================================================
-LHCb::Track::ConstVector
-operator>>
-( const LHCb::Track::Container*      input ,
-  const LoKi::Types::TrCuts&         cuts  )
-{ return _get_ ( input , cuts ) ; }
-// ===========================================================================
-LHCb::Track::ConstVector
-operator>>
-( const LHCb::Track::Selection*      input ,
-  const LoKi::Types::TrCuts&         cuts  )
-{ return _get_ ( input , cuts ) ; }
-// ===========================================================================
-// functions
-// ===========================================================================
-std::vector<double>
-operator>>
-( const LHCb::Track::ConstVector&    input ,
-  const LoKi::Types::TrFunc&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ============================================================================
-std::vector<double>
-operator>>
-( const LHCb::Track::Range&          input ,
-  const LoKi::Types::TrFunc&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ===========================================================================
-std::vector<double>
-operator>>
-( const SmartRefVector<LHCb::Track>& input ,
-  const LoKi::Types::TrFunc&         cuts  )
-{ return _get_ ( input.begin() , input.end() , cuts ) ; }
-// ===========================================================================
-std::vector<double>
-operator>>
-( const LHCb::Track::Container*      input ,
-  const LoKi::Types::TrFunc&         cuts  )
-{ return _get_ ( input , cuts ) ; }
-// ===========================================================================
-std::vector<double>
-operator>>
-( const LHCb::Track::Selection*      input ,
-  const LoKi::Types::TrFunc&         cuts  )
-{ return _get_ ( input , cuts ) ; }
-// ===========================================================================
-
-// ============================================================================
-// The END
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrackEngine.cpp b/Phys/LoKiTracks/src/TrackEngine.cpp
deleted file mode 100644
index 0a377d0be..000000000
--- a/Phys/LoKiTracks/src/TrackEngine.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// ============================================================================
-// Include files
-// ============================================================================
-// local
-// ============================================================================
-#include "LoKi/TrackEngine.h"
-#include "LoKi/TrackEngineActor.h"
-// ============================================================================
-/** @file 
- *  Implementation file for class LoKi::Hybrid::TrEngine
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- *  @date 2004-06-30 
- */
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Hybrid::TrackEngine::TrackEngine() {}
-// ============================================================================
-// destructor 
-// ============================================================================
-LoKi::Hybrid::TrackEngine::~TrackEngine() {}
-// ============================================================================
-namespace 
-{
-  // ==========================================================================
-  template <class TYPE> 
-  inline StatusCode _process 
-  ( const std::string& name , const TYPE& cut )
-  {
-    LoKi::Hybrid::TrackEngineActor& actor = 
-      LoKi::Hybrid::TrackEngineActor::instance() ;
-    return actor.process ( name , cut ) ;
-  } 
-  // ==========================================================================
-} //                                                 end of anonymoys namespace 
-// ============================================================================
-// add the cut 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&          name , 
-  const LoKi::Types::TrCuts&  cut  ) const { return _process ( name , cut ) ; }
-// ============================================================================
-// add the function 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&          name , 
-  const LoKi::Types::TrFunc&  func ) const { return _process ( name , func ) ; }
-// ============================================================================
-// the functional part 
-// ============================================================================
-// add the function 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&             name , 
-  const LoKi::Types::TrMaps&     func ) const 
-{ return _process ( name , func ) ; }
-// ============================================================================
-// add the function 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&             name , 
-  const LoKi::Types::TrPipes&    func ) const 
-{ return _process ( name , func ) ; }
-// ============================================================================
-// add the function 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&             name , 
-  const LoKi::Types::TrFunVals&  func ) const 
-{ return _process ( name , func ) ; }
-// ============================================================================
-// add the function 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngine::process
-( const std::string&             name , 
-  const LoKi::Types::TrSources&  func ) const
-{ return _process ( name , func ) ; }
-// ============================================================================
-
-
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrackEngineActor.cpp b/Phys/LoKiTracks/src/TrackEngineActor.cpp
deleted file mode 100644
index d255fcc27..000000000
--- a/Phys/LoKiTracks/src/TrackEngineActor.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrackEngineActor.h"
-#include "LoKi/Report.h"
-// ============================================================================
-/** @file 
- *  Implementation file for class LoKi::Hybrid::TrackEngineActor
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @date 2004-06-29 
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- */
-// ============================================================================
-// helper method to descrease number of lines 
-// ============================================================================
-template <class TYPE>
-inline StatusCode LoKi::Hybrid::TrackEngineActor::_add 
-( const std::string& name , const TYPE& cut ) const 
-{ 
-  // check the tool
-  if ( !m_tool.validPointer() ) 
-  {
-    return LoKi::Report::Error
-      ("LoKi::Hybrid::TrackEngineActor::addCut/Fun(): LoKi::ITrackFunctorAntiFactory* is not connected!") ;  
-  }
-  // one more check 
-  if ( name != m_tool->name() )
-  {
-    return LoKi::Report::Error
-      ("LoKi::Hybrid::TrackEngineActor::addCut/Fun(): mismatch in LoKi::ITrackFunctorAntiFactory name!" ) ;  
-  }
-  // set the cut for the tool 
-  m_tool->set ( cut ) ;
-  // 
-  return StatusCode::SUCCESS ;
-} 
-// ============================================================================
-// accessor to the static instance 
-// ============================================================================
-LoKi::Hybrid::TrackEngineActor& 
-LoKi::Hybrid::TrackEngineActor::instance() 
-{
-  static LoKi::Hybrid::TrackEngineActor s_holder ;
-  return s_holder ;
-}
-// ============================================================================
-// constructor 
-// ============================================================================
-LoKi::Hybrid::TrackEngineActor::TrackEngineActor() : m_tool ( 0 ) {} 
-// ============================================================================
-// destructor
-// ============================================================================
-LoKi::Hybrid::TrackEngineActor::~TrackEngineActor() {} 
-// ============================================================================
-// disconnect the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::releaseTool 
-( const LoKi::ITrackFunctorAntiFactory* tool ) 
-{
-  if ( m_tool.getObject() != tool ) 
-  {
-    m_tool = 0 ;
-    return LoKi::Report::Error
-      ("LoKi:Hybrid::TrackEngineActor::releaseTool(): mismatch in tools " ) ;
-  } 
-  // nullify the pointer 
-  m_tool = 0 ;
-  //
-  return StatusCode::SUCCESS ;
-}
-// ============================================================================
-// connect the hybrid tool for code translation 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::connectTool 
-(       LoKi::ITrackFunctorAntiFactory* tool )
-{
-  //
-  LoKi::Report::Assert 
-    ( !m_tool.validPointer() , 
-      "LoKi::Hybrid::TrackEngineActor: attempt for double lock!" ) ;
-  //
-  // substitute the tool 
-  //
-  m_tool =  tool ;
-  // 
-  if ( !m_tool.validPointer() ) 
-  {
-    return LoKi::Report::Error
-      ( "LoKi::Hybrid::TrackEngineActor::releaseTool(): Invalid LoKi::ITrackFunctorAntiFactory" ) ;
-  }
-  //
-  return StatusCode::SUCCESS ;
-}
-// ============================================================================
-// propagate the cut to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&          name , 
-  const LoKi::Types::TrCuts&  cut  ) const { return _add ( name , cut  ) ; }
-// ============================================================================
-// propagate the function to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&          name , 
-  const LoKi::Types::TrFunc&  func ) const { return _add ( name , func ) ; }
-// ============================================================================
-// functional part 
-// ============================================================================
-// propagate the function to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&             name , 
-  const LoKi::Types::TrMaps&     func ) const 
-{ return _add ( name , func ) ; }
-// ============================================================================
-// propagate the function to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&             name , 
-  const LoKi::Types::TrPipes&    func ) const 
-{ return _add ( name , func ) ; }
-// ============================================================================
-// propagate the function to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&             name , 
-  const LoKi::Types::TrFunVals&  func ) const 
-{ return _add ( name , func ) ; }
-// ============================================================================
-// propagate the function to the tool 
-// ============================================================================
-StatusCode LoKi::Hybrid::TrackEngineActor::process
-( const std::string&             name , 
-  const LoKi::Types::TrSources&  func ) const 
-{ return _add ( name , func ) ; }
-// ============================================================================
-
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrackFactoryLock.cpp b/Phys/LoKiTracks/src/TrackFactoryLock.cpp
deleted file mode 100644
index 2d43586e5..000000000
--- a/Phys/LoKiTracks/src/TrackFactoryLock.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/Report.h"
-#include "LoKi/TrackFactoryLock.h"
-#include "LoKi/TrackEngineActor.h"
-// ============================================================================
-/** @file 
- *  Implementation file for class LoKi::Hybrid::TrackFactoryLock
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @date 2007-06-10 
- *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
- */
-// ============================================================================
-// constructor 
-// ============================================================================
-LoKi::Hybrid::TrackFactoryLock::TrackFactoryLock 
-( LoKi::ITrackFunctorAntiFactory* tool ) 
-  : m_tool ( tool ) 
-{
-  LoKi::Hybrid::TrackEngineActor& actor = 
-    LoKi::Hybrid::TrackEngineActor::instance() ;
-  // connect the tool to the actor 
-  StatusCode sc = actor.connectTool ( m_tool.getObject () ) ;  
-  if ( sc.isFailure () ) 
-  {
-    LoKi::Report::Error
-      ( "LoKi::Hybrid::TrackFactoryLock: error from connectTool", sc ) .ignore() ;
-  } 
-}
-// ============================================================================
-// destructor 
-// ============================================================================
-LoKi::Hybrid::TrackFactoryLock::~TrackFactoryLock()
-{
-  LoKi::Hybrid::TrackEngineActor& actor = 
-    LoKi::Hybrid::TrackEngineActor::instance() ;
-  // connect the tool to the actor 
-  StatusCode sc = actor.releaseTool ( m_tool.getObject () ) ;  
-  if ( sc.isFailure () ) 
-  {
-    LoKi::Report::Error
-      ( "LoKi::Hybrid::TrackFactoryLock: error from releaseTool", sc ) .ignore() ;
-  } 
-}
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrackFunctions.cpp b/Phys/LoKiTracks/src/TrackFunctions.cpp
deleted file mode 100644
index 2d24d9de1..000000000
--- a/Phys/LoKiTracks/src/TrackFunctions.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-// $Id:$ 
-// ============================================================================
-// Include files 
-// ============================================================================
-// STD& STL
-// ============================================================================
-#include <cmath>
-// ============================================================================
-// Event/TrackEvent
-// ============================================================================
-#include "Event/Track.h"
-#include "Event/State.h"
-#include "Event/TrackParameters.h"
-// ============================================================================
-// LHCbMath 
-// ============================================================================
-#include "LHCbMath/LHCbMath.h"
-#include "LHCbMath/ValueWithError.h"
-// ============================================================================
-// local
-// ============================================================================
-#include "LoKi/TrackFunctions.h"
-// ============================================================================
-/** @file
- *  implemenation of functions from the file LoKi/TrackFunnctions.h
- *                                              \
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date   2016-03-05
- *  Version           $Revision:$
- *  Last modification $Date:$
- *  by                $Author:$
- */
-// ============================================================================
-namespace 
-{
-  // ==========================================================================
-  // is value close to zero ? 
-  const LHCb::Math::Zero<double> s_zero {} ;
-  // ==========================================================================
-}
-// ============================================================================
-/* get the transverse momentum (and uncertainty) from the state
- *  @param state (INPUT) the  state 
- *  @return transverse momentum (and uncertainty) from the given state 
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date   2016-03-05
- */
-// ============================================================================
-Gaudi::Math::ValueWithError
-LoKi::Tracks::state_pt 
-( const LHCb::State& state ) 
-{
-  /// get pt itself 
-  const double pt =            state.pt()      ;
-  //
-  const double qP = std::abs ( state.qOverP () ) ; 
-  //
-  if      ( qP < TrackParameters::lowTolerance ) 
-  { return Gaudi::Math::ValueWithError ( pt , pt ) ; }
-  else if ( s_zero ( pt )  ) 
-  { return Gaudi::Math::ValueWithError ( 0 ) ; }
-  //
-  const double tx =            state.tx     () ;
-  const double ty =            state.ty     () ;
-  //
-  const double c0 = tx * tx + ty  * ty ;
-  if ( s_zero ( c0 ) ) { return Gaudi::Math::ValueWithError ( pt ) ; }
-  //
-  const double c1 = 1 + c0 ;
-  const double c2 = c0 / c1 ;
-  const double c3 = std::sqrt ( c0 * c1 ) ;
-  //
-  // get the vector d(pt)/dp_i :
-  ROOT::Math::SVector<double,5> dPt_dP;
-  dPt_dP  [0] =  0 ;
-  dPt_dP  [1] =  0 ;
-  dPt_dP  [2] =  tx * ( 1 - c2 ) / ( c3 * qP ) ;
-  dPt_dP  [3] =  ty * ( 1 - c2 ) / ( c3 * qP ) ;
-  dPt_dP  [4] = -pt              /        qP   ;
-  //
-  const double s2pt = ROOT::Math::Similarity ( state.covariance() , dPt_dP ) ;
-  //
-  return 
-    s2pt <= 0 || s_zero ( s2pt ) ?
-    Gaudi::Math::ValueWithError ( pt        ) :
-    Gaudi::Math::ValueWithError ( pt , s2pt ) ;
-}
-// ============================================================================
-/*  get the phi angle (and uncertainty) from the state
- *  @param state (INPUT) the  state 
- *  @return phi angle  (and uncertainty) from the given state 
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date   2016-03-05
- */
-// ============================================================================
-Gaudi::Math::ValueWithError 
-LoKi::Tracks::state_phi ( const LHCb::State& state ) 
-{
-  const double tx  = state.tx () ;
-  const double ty  = state.ty () ;
-  //
-  /// get phi itself 
-  const double cxx =  state.covariance()(2,2) ;
-  const double cxy =  state.covariance()(2,3) ;
-  const double cyy =  state.covariance()(3,3) ;
-  //
-  const bool x_err = 0 < cxx  && !s_zero ( cxx ) ;
-  const bool y_err = 0 < cyy  && !s_zero ( cyy ) ;
-  //
-  if ( !x_err && !y_err ) { return std::atan2 ( ty , tx ) ; }
-  //
-  return Gaudi::Math::atan2 
-    ( Gaudi::Math::ValueWithError  ( ty , y_err ? cyy : 0.0 ) , 
-      Gaudi::Math::ValueWithError  ( tx , x_err ? cxx : 0.0 ) , 
-      !x_err || !y_err ? 0.0 : cxy / std::sqrt ( cxx * cyy ) ) ;
-}
-// ============================================================================
-/*  get the theta angle (and uncertainty) from the state
- *  @param state (INPUT) the  state 
- *  @return theta angle (and uncertainty) from the given state 
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date   2016-03-05
- */
-// ============================================================================
-Gaudi::Math::ValueWithError 
-LoKi::Tracks::state_theta    ( const LHCb::State& state ) 
-{
-  //
-  const double tx     = state.tx () ;
-  const double ty     = state.ty () ;
-  const double tanth2 = tx * tx + ty * ty ;
-  const double tanth  = std::sqrt ( tanth2 );
-  const double theta  = std::atan ( tanth  ) ;
-  //
-  if ( s_zero ( tanth2 ) ) { return Gaudi::Math::ValueWithError ( theta ) ;}
-  
-  const double c = 1 / ( ( 1 + tanth2 ) *  tanth ) ;
-  
-  // get the vector d(theta)/dp_i :
-  ROOT::Math::SVector<double,5> dTheta_dP;
-  dTheta_dP  [0] =  0 ;
-  dTheta_dP  [1] =  0 ;
-  dTheta_dP  [2] =  tx * c ;
-  dTheta_dP  [3] =  ty * c ;
-  dTheta_dP  [4] =  0 ;
-  //
-  const double s2theta = ROOT::Math::Similarity ( state.covariance() , dTheta_dP ) ;
-  //
-  return 
-    s2theta <= 0 || s_zero ( s2theta ) ?
-    Gaudi::Math::ValueWithError ( theta           ) :
-    Gaudi::Math::ValueWithError ( theta , s2theta ) ; 
-}
-// ============================================================================
-/*  get the pseudorapidity (and uncertainty) from the state
- *  @param state (INPUT) the  state 
- *  @return pseudorapidity (and uncertainty) from the given state 
- *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date   2016-03-05
- */
-// ============================================================================
-Gaudi::Math::ValueWithError 
-LoKi::Tracks::state_eta      ( const LHCb::State& state ) 
-{
-  const Gaudi::Math::ValueWithError theta = state_theta ( state ) ;
-  return - log ( tan ( 0.5 * theta ) ) ;
-}
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/TrackIDs.cpp b/Phys/LoKiTracks/src/TrackIDs.cpp
deleted file mode 100644
index f5f7fd2b1..000000000
--- a/Phys/LoKiTracks/src/TrackIDs.cpp
+++ /dev/null
@@ -1,881 +0,0 @@
-// ============================================================================
-// Include files 
-// ============================================================================
-// STD & STL
-// ============================================================================
-#include <algorithm>
-// ============================================================================
-// GaudiKernel
-// ============================================================================
-#include "GaudiKernel/ToStream.h"
-// ============================================================================
-// local
-// ============================================================================
-#include "LoKi/TrackIDs.h"
-// ============================================================================
-// Boost
-// ============================================================================
-#include "boost/static_assert.hpp"
-#include "boost/integer_traits.hpp"
-#include "boost/lambda/bind.hpp"
-// ============================================================================
-/** @file
- *  Implementation file for class : TrackIDs
- *  Collection of functors that deals with LHCbIDs for Tracks 
- *  (on request from Wouter Hulsbergen)
- *
- *  This file is a part of LoKi project - 
- *    "C++ ToolKit  for Smart and Friendly Physics Analysis"
- *
- *  The package has been designed with the kind help from
- *  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
- *  contributions and advices from G.Raven, J.van Tilburg, 
- *  A.Golutvin, P.Koppenburg have been used in the design.
- *
- *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
- *  @date   2009-12-17
- */
-// ============================================================================
-namespace 
-{
-  BOOST_STATIC_ASSERT( boost::integer_traits<unsigned int>::is_integral    && 
-                       boost::integer_traits<unsigned int>::is_specialized ) ;                     
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountIDs::CountIDs
-( LoKi::Tracks::CountIDs::PMF pmf ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf  ( pmf  ) 
-  , m_nick ( ) 
-{
-  
-  if      ( &LHCb::LHCbID::isVelo       == m_pmf ) { m_nick = "isVelo"       ; }
-  else if ( &LHCb::LHCbID::isVeloR      == m_pmf ) { m_nick = "isVeloR"      ; }
-  else if ( &LHCb::LHCbID::isVeloPhi    == m_pmf ) { m_nick = "isVeloPhi"    ; }
-  else if ( &LHCb::LHCbID::isVeloPileUp == m_pmf ) { m_nick = "isVeloPileUp" ; }
-  else if ( &LHCb::LHCbID::isVP         == m_pmf ) { m_nick = "isVP"         ; }
-  else if ( &LHCb::LHCbID::isTT         == m_pmf ) { m_nick = "isTT"         ; }
-  else if ( &LHCb::LHCbID::isIT         == m_pmf ) { m_nick = "isIT"         ; }
-  else if ( &LHCb::LHCbID::isST         == m_pmf ) { m_nick = "isST"         ; }
-  else if ( &LHCb::LHCbID::isOT         == m_pmf ) { m_nick = "isOT"         ; }
-  else if ( &LHCb::LHCbID::isRich       == m_pmf ) { m_nick = "isRich"       ; }
-  else if ( &LHCb::LHCbID::isCalo       == m_pmf ) { m_nick = "isCalo"       ; }
-  else if ( &LHCb::LHCbID::isMuon       == m_pmf ) { m_nick = "isMuon"       ; }
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::LHCbID member function!" ) ; 
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountIDs::CountIDs
-( const std::string& nick ) 
-  : LoKi::AuxFunBase ( std::tie ( nick ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf  ( 0    ) 
-  , m_nick ( nick ) 
-{
-  if      ( "isVelo"         == m_nick ) { m_pmf = &LHCb::LHCbID::isVelo       ; }
-  else if ( "isVeloR"        == m_nick ) { m_pmf = &LHCb::LHCbID::isVeloR      ; }
-  else if ( "isVeloPhi"      == m_nick ) { m_pmf = &LHCb::LHCbID::isVeloPhi    ; }
-  else if ( "isVeloPileUp"   == m_nick ) { m_pmf = &LHCb::LHCbID::isVeloPileUp ; }
-  else if ( "isVP"           == m_nick ) { m_pmf = &LHCb::LHCbID::isVP         ; }
-  else if ( "isTT"           == m_nick ) { m_pmf = &LHCb::LHCbID::isTT         ; }
-  else if ( "isIT"           == m_nick ) { m_pmf = &LHCb::LHCbID::isIT         ; }
-  else if ( "isOT"           == m_nick ) { m_pmf = &LHCb::LHCbID::isOT         ; }
-  else if ( "isST"           == m_nick ) { m_pmf = &LHCb::LHCbID::isST         ; }
-  else if ( "isRich"         == m_nick ) { m_pmf = &LHCb::LHCbID::isRich       ; }
-  else if ( "isCalo"         == m_nick ) { m_pmf = &LHCb::LHCbID::isCalo       ; }
-  else if ( "isMuon"         == m_nick ) { m_pmf = &LHCb::LHCbID::isMuon       ; }
-  // Backwards compatability
-  else if ( "isVeloPix"      == m_nick ) { m_pmf = &LHCb::LHCbID::isVP         ; }
-  
-  if ( 0 == m_pmf ) 
-  { Exception ( "Invalid LHCb::LHCbID member function: '" + m_nick + "'" ) ; }
-  
-}
-// ============================================================================
-// MANDATORY: virtual destructor
-// ============================================================================
-LoKi::Tracks::CountIDs::~CountIDs(){}
-// ============================================================================
-// MANDATORY: clone method ("virtual consttructor")
-// ============================================================================
-LoKi::Tracks::CountIDs*
-LoKi::Tracks::CountIDs::clone() const 
-{ return  new LoKi::Tracks::CountIDs ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::CountIDs::result_type 
-LoKi::Tracks::CountIDs::operator() 
-  ( LoKi::Tracks::CountIDs::argument t ) const 
-{
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1") ;
-    return -1 ;
-  }
-  //
-  const std::vector<LHCb::LHCbID>&  lhcbids = t->lhcbIDs() ;
-  //
-  return 
-    std::count_if ( lhcbids.begin() , 
-                    lhcbids.end() , 
-                    boost::lambda::bind ( m_pmf , boost::lambda::_1 ) ) ;  
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::CountIDs::fillStream( std::ostream& s ) const 
-{ return s << " TrIDC( '" << m_nick << "' ) " ; }
-
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( LoKi::Tracks::CountOTIDs::PMF pmf , 
-  const unsigned int            i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::OTchannelID member function!" ) ; 
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( LoKi::Tracks::CountOTIDs::PMF          pmf , 
-  const std::vector<unsigned int>& i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::OTchannelID member function!" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( const unsigned int            imin ,   
-  LoKi::Tracks::CountOTIDs::PMF pmf  , 
-  const unsigned int            imax )
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( )
-  , m_imin  ( imin ) 
-  , m_imax  ( imax ) 
-  , m_nick  (      )
-{
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf    , "Invalid LHCb::OTChannelID member function!" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-}
-// ============================================================================
-// set nick
-// ============================================================================
-void LoKi::Tracks::CountOTIDs::setNick ( LoKi::Tracks::CountOTIDs::PMF pmf ) 
-{ 
-  if      ( &LHCb::OTChannelID::geometry                == pmf ) { m_nick = "geometry"                    ; }
-  else if ( &LHCb::OTChannelID::sequentialUniqueLayer   == pmf ) { m_nick = "sequentialUniqueLayer"       ; }
-  else if ( &LHCb::OTChannelID::sequentialUniqueQuarter == pmf ) { m_nick = "sequentialUniqueQuarter"     ; }
-  else if ( &LHCb::OTChannelID::sequentialUniqueModule  == pmf ) { m_nick = "sequentialUniqueModule"      ; }
-  else if ( &LHCb::OTChannelID::sequentialUniqueOtis    == pmf ) { m_nick = "sequentialUniqueOtis"        ; }
-  else if ( &LHCb::OTChannelID::sequentialUniqueStraw   == pmf ) { m_nick = "sequentialUniqueStraw"       ; }
-  else if ( &LHCb::OTChannelID::channelID               == pmf ) { m_nick = "channelID"                   ; }
-  else if ( &LHCb::OTChannelID::tdcTime                 == pmf ) { m_nick = "tdcTime"                     ; }
-  else if ( &LHCb::OTChannelID::module                  == pmf ) { m_nick = "module"                      ; }
-  else if ( &LHCb::OTChannelID::quarter                 == pmf ) { m_nick = "quarter"                     ; }
-  else if ( &LHCb::OTChannelID::layer                   == pmf ) { m_nick = "layer"                       ; }
-  else if ( &LHCb::OTChannelID::straw                   == pmf ) { m_nick = "straw"                       ; }
-  else if ( &LHCb::OTChannelID::station                 == pmf ) { m_nick = "station"                     ; }
-  else if ( &LHCb::OTChannelID::uniqueModule            == pmf ) { m_nick = "uniqueModule"                ; }
-  else if ( &LHCb::OTChannelID::uniqueQuarter           == pmf ) { m_nick = "uniqueQuarter"               ; }
-  else if ( &LHCb::OTChannelID::uniqueLayer             == pmf ) { m_nick = "uniqueLayer"                 ; }
-  else if ( &LHCb::OTChannelID::uniqueStraw             == pmf ) { m_nick = "uniqueStraw"                 ; }
-  else { Exception ( "Invalid LHCb::OTChannelID member function!") ; }
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( const std::string&               nick , 
-  const std::vector<unsigned int>& i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::OTChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-  
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( const std::string&  nick , 
-  const unsigned int  i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::OTChannelID member function: '" + m_nick + "'" ) ; 
-  
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::CountOTIDs
-( const unsigned int  imin , 
-  const std::string&  nick , 
-  const unsigned int  imax ) 
-  : LoKi::AuxFunBase ( std::tie ( imin , nick , imax  ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( )
-  , m_imin  ( imin  ) 
-  , m_imax  ( imax  ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf   , "Invalid LHCb::OTChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-  
-}
-// ============================================================================
-// set PMF properly
-// ============================================================================
-void LoKi::Tracks::CountOTIDs::setPmf ( const std::string& nick ) 
-{
-  if      ( "geometry"                == nick ) { m_pmf = &LHCb::OTChannelID::geometry                ; }
-  else if ( "sequentialUniqueLayer"   == nick ) { m_pmf = &LHCb::OTChannelID::sequentialUniqueLayer   ; }
-  else if ( "sequentialUniqueQuarter" == nick ) { m_pmf = &LHCb::OTChannelID::sequentialUniqueQuarter ; }
-  else if ( "sequentialUniqueModule"  == nick ) { m_pmf = &LHCb::OTChannelID::sequentialUniqueModule  ; }
-  else if ( "sequentialUniqueOtis"    == nick ) { m_pmf = &LHCb::OTChannelID::sequentialUniqueOtis    ; }
-  else if ( "sequentialUniqueStraw"   == nick ) { m_pmf = &LHCb::OTChannelID::sequentialUniqueStraw   ; }
-  else if ( "channelID"               == nick ) { m_pmf = &LHCb::OTChannelID::channelID               ; }
-  else if ( "channel"                 == nick ) { m_pmf = &LHCb::OTChannelID::channelID               ; }
-  else if ( "tdcTime"                 == nick ) { m_pmf = &LHCb::OTChannelID::tdcTime                 ; }
-  else if ( "module"                  == nick ) { m_pmf = &LHCb::OTChannelID::module                  ; }
-  else if ( "layer"                   == nick ) { m_pmf = &LHCb::OTChannelID::layer                   ; }
-  else if ( "straw"                   == nick ) { m_pmf = &LHCb::OTChannelID::straw                   ; }
-  else if ( "station"                 == nick ) { m_pmf = &LHCb::OTChannelID::station                 ; }
-  else if ( "uniqueModule"            == nick ) { m_pmf = &LHCb::OTChannelID::uniqueModule            ; }
-  else if ( "uniqueQuarter"           == nick ) { m_pmf = &LHCb::OTChannelID::uniqueQuarter           ; }
-  else if ( "uniqueLayer"             == nick ) { m_pmf = &LHCb::OTChannelID::uniqueLayer             ; }
-  else if ( "uniqueStraw"             == nick ) { m_pmf = &LHCb::OTChannelID::uniqueStraw             ; }
-  else { Exception ( "Invalid LHCb::OTChannelID member function '" + nick + "'") ; }
-}
-// ============================================================================
-// MANDATORY: virtual destructor
-// ============================================================================
-LoKi::Tracks::CountOTIDs::~CountOTIDs(){}
-// ============================================================================
-// MANDATORY: clone method ('virtual constructor')
-// ============================================================================
-LoKi::Tracks::CountOTIDs*
-LoKi::Tracks::CountOTIDs::clone() const 
-{ return new LoKi::Tracks::CountOTIDs ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::CountOTIDs::result_type 
-LoKi::Tracks::CountOTIDs::operator()
-  ( LoKi::Tracks::CountOTIDs::argument t ) const 
-{
-  //
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1") ;
-    return -1 ;
-  }
-  //
-  typedef  std::vector<LHCb::LHCbID> IDs ;
-  //
-  const IDs& lhcbids = t->lhcbIDs() ;
-  //
-  size_t res = 0 ;
-  //
-  for ( IDs::const_iterator id = lhcbids.begin() ; lhcbids.end() != id ; ++id ) 
-  {
-    if ( ! id->isOT() ) { continue ; }
-    //
-    const unsigned int r = (id->otID().*m_pmf) () ;
-    if      ( m_uints.empty()     ) { if ( m_imin <= r && r <= m_imax ) { ++res ; } }
-    else if ( 1 == m_uints.size() ) { if ( m_uints.front() == r       ) { ++res ; } }
-    else 
-    { 
-      if  ( m_uints.end() != std::find ( m_uints.begin() , m_uints.end() , r ) ) { ++res ; } 
-    }
-  }
-  //
-  return res;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::CountOTIDs::fillStream( std::ostream& s ) const 
-{ 
-  s << " TrOTIDC( " ;
-  //
-  if      ( m_uints.empty()     ) { s << m_imin << " ,'" << m_nick << "', "<< m_imax ; }
-  else if ( 1 == m_uints.size() ) { s << "'" << m_nick << "', " << m_uints.front()     ; }
-  else 
-  {
-    s << "'" << m_nick << "', " ;
-    Gaudi::Utils::toStream ( m_uints , s ) ;
-  }
-  //
-  return s << " ) " ;
-}
-
-
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( LoKi::Tracks::CountSTIDs::PMF pmf , 
-  const unsigned int            i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::STChannelID member function!" ) ; 
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( LoKi::Tracks::CountSTIDs::PMF    pmf , 
-  const std::vector<unsigned int>& i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::STChannelID member function!" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( const unsigned int            imin ,   
-  LoKi::Tracks::CountSTIDs::PMF pmf  , 
-  const unsigned int            imax )
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( pmf   ) 
-  , m_uints ( )
-  , m_imin  ( imin ) 
-  , m_imax  ( imax ) 
-  , m_nick  (      )
-{
-  setNick ( m_pmf ) ;
-  
-  Assert ( 0 != m_pmf    , "Invalid LHCb::STChannelID member function!" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-}
-// ============================================================================
-// set nick
-// ============================================================================
-void LoKi::Tracks::CountSTIDs::setNick ( LoKi::Tracks::CountSTIDs::PMF pmf ) 
-{ 
-  if      ( &LHCb::STChannelID::strip           == pmf ) { m_nick = "strip"            ; }
-  else if ( &LHCb::STChannelID::sector          == pmf ) { m_nick = "sector"           ; }
-  else if ( &LHCb::STChannelID::detRegion       == pmf ) { m_nick = "detRegion"        ; }
-  else if ( &LHCb::STChannelID::layer           == pmf ) { m_nick = "layer"            ; }
-  else if ( &LHCb::STChannelID::station         == pmf ) { m_nick = "station"          ; }
-  else if ( &LHCb::STChannelID::uniqueLayer     == pmf ) { m_nick = "uniqueLayer"      ; }
-  else if ( &LHCb::STChannelID::uniqueDetRegion == pmf ) { m_nick = "uniqueDetRegion"  ; }
-  else if ( &LHCb::STChannelID::uniqueSector    == pmf ) { m_nick = "uniqueSector"     ; }
-  else if ( &LHCb::STChannelID::channelID       == pmf ) { m_nick = "channelID"        ; }
-  else { Exception ( "Invalid LHCb::STChannelID member function!") ; }
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( const std::string&               nick , 
-  const std::vector<unsigned int>& i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i  ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::STChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-  
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( const std::string&  nick , 
-  const unsigned int  i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i  ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf , "Invalid LHCb::STChannelID member function: '" + m_nick + "'" ) ; 
-  
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::CountSTIDs
-( const unsigned int  imin , 
-  const std::string&  nick , 
-  const unsigned int  imax ) 
-  : LoKi::AuxFunBase ( std::tie ( imin, nick , imax ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf   ( 0     ) 
-  , m_uints ( )
-  , m_imin  ( imin  ) 
-  , m_imax  ( imax  ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf   , "Invalid LHCb::OTChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-  
-}
-// ============================================================================
-// set PMF properly
-// ============================================================================
-void LoKi::Tracks::CountSTIDs::setPmf ( const std::string& nick ) 
-{
-  if      ( "strip"           == nick ) { m_pmf = &LHCb::STChannelID::strip           ; }
-  else if ( "sector"          == nick ) { m_pmf = &LHCb::STChannelID::sector          ; }
-  else if ( "detRegion"       == nick ) { m_pmf = &LHCb::STChannelID::detRegion       ; }
-  else if ( "region"          == nick ) { m_pmf = &LHCb::STChannelID::detRegion       ; }
-  else if ( "station"         == nick ) { m_pmf = &LHCb::STChannelID::station         ; }
-  else if ( "uniqueLayer"     == nick ) { m_pmf = &LHCb::STChannelID::uniqueLayer     ; }
-  else if ( "uniqueDetRegion" == nick ) { m_pmf = &LHCb::STChannelID::uniqueDetRegion ; }
-  else if ( "uniqueRegion"    == nick ) { m_pmf = &LHCb::STChannelID::uniqueDetRegion ; }
-  else if ( "uniqueSector"    == nick ) { m_pmf = &LHCb::STChannelID::uniqueSector    ; }
-  else if ( "type"            == nick ) { m_pmf = &LHCb::STChannelID::type            ; }
-  else if ( "channelID"       == nick ) { m_pmf = &LHCb::STChannelID::channelID       ; }
-  else if ( "channel"         == nick ) { m_pmf = &LHCb::STChannelID::channelID       ; }
-  else { Exception ( "Invalid LHCb::STChannelID member function '" + nick + "'") ; }
-}
-
-
-// ============================================================================
-// MANDATORY: virtual destructor
-// ============================================================================
-LoKi::Tracks::CountSTIDs::~CountSTIDs(){}
-// ============================================================================
-// MANDATORY: clone method ('virtual constructor')
-// ============================================================================
-LoKi::Tracks::CountSTIDs*
-LoKi::Tracks::CountSTIDs::clone() const 
-{ return new LoKi::Tracks::CountSTIDs ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::CountSTIDs::result_type 
-LoKi::Tracks::CountSTIDs::operator()
-  ( LoKi::Tracks::CountSTIDs::argument t ) const 
-{
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1") ;
-    return -1 ;
-  }
-  //
-  typedef  std::vector<LHCb::LHCbID> IDs ;
-  //
-  const IDs& lhcbids = t->lhcbIDs() ;
-  //
-  size_t res = 0 ;
-  //
-  for ( IDs::const_iterator id = lhcbids.begin() ; lhcbids.end() != id ; ++id ) 
-  {
-    if ( ! id->isST() ) { continue ; }
-    //
-    const unsigned int r = (id->stID().*m_pmf) () ;
-    if      ( m_uints.empty()     ) { if ( m_imin <= r && r <= m_imax ) { ++res ; } }
-    else if ( 1 == m_uints.size() ) { if ( m_uints.front() == r       ) { ++res ; } }
-    else 
-    { 
-      if  ( m_uints.end() != std::find ( m_uints.begin() , m_uints.end() , r ) ) { ++res ; } 
-    }
-  }
-  //
-  return res;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::CountSTIDs::fillStream ( std::ostream& s ) const 
-{ 
-  s << " TrSTIDC( " ;
-  //
-  if      ( m_uints.empty()     ) { s << m_imin << " ,'" << m_nick << "', "<< m_imax ; }
-  else if ( 1 == m_uints.size() ) { s << "'" << m_nick << "', " << m_uints.front()     ; }
-  else 
-  {
-    s << "'" << m_nick << "', " ;
-    Gaudi::Utils::toStream ( m_uints , s ) ;
-  }
-  //
-  return s << " ) " ;
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( LoKi::Tracks::CountVeloIDs::PMF2 pmf , 
-  const unsigned int               i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( pmf   ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf2 ) ;
-  
-  Assert ( 0 != m_pmf2 , "Invalid LHCb::VeloChannelID member function!" ) ; 
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( LoKi::Tracks::CountVeloIDs::PMF2 pmf , 
-  const std::vector<unsigned int>& i   ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( pmf   ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  (       )
-{
-  
-  setNick ( m_pmf2 ) ;
-  
-  Assert ( 0 != m_pmf2 , "Invalid LHCb::VeloChannelID member function!" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( const unsigned int               imin ,   
-  LoKi::Tracks::CountVeloIDs::PMF2 pmf  , 
-  const unsigned int               imax )
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( pmf   ) 
-  , m_uints ( )
-  , m_imin  ( imin ) 
-  , m_imax  ( imax ) 
-  , m_nick  (      )
-{
-  setNick ( m_pmf2 ) ;
-  
-  Assert ( 0 != m_pmf2 , "Invalid LHCb::OTChannelID member function!" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-}
-// ============================================================================
-// set nick
-// ============================================================================
-void LoKi::Tracks::CountVeloIDs::setNick ( LoKi::Tracks::CountVeloIDs::PMF2 pmf ) 
-{ 
-  if      ( &LHCb::VeloChannelID::channelID == pmf ) { m_nick = "channelID" ; }
-  else if ( &LHCb::VeloChannelID::strip     == pmf ) { m_nick = "strip"     ; }
-  else if ( &LHCb::VeloChannelID::sensor    == pmf ) { m_nick = "sensor"    ; }
-  else { Exception ( "Invalid LHCb::VeloChannelID member function!") ; }
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( const std::string&               nick , 
-  const std::vector<unsigned int>& i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( 0     ) 
-  , m_uints ( i     )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf2 , "Invalid LHCb::VeloChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( !m_uints.empty() , "Empty vector of values is specified!" ) ;
-  
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( const std::string&  nick , 
-  const unsigned int  i    ) 
-  : LoKi::AuxFunBase ( std::tie ( nick , i ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( 0     ) 
-  , m_uints ( 1 , i )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick  )
-{
-
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf2 , "Invalid LHCb::VeloChannelID member function: '" + m_nick + "'" ) ; 
-  
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( const unsigned int  imin , 
-  const std::string&  nick , 
-  const unsigned int  imax ) 
-  : LoKi::AuxFunBase ( std::tie ( imin , nick , imax ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( 0     ) 
-  , m_uints (       )
-  , m_imin  ( imin  ) 
-  , m_imax  ( imax  ) 
-  , m_nick  ( nick  )
-{
-  
-  setPmf ( m_nick ) ;
-  
-  Assert ( 0 != m_pmf2  , "Invalid LHCb::VeloChannelID member function: '" + m_nick + "'" ) ; 
-  
-  Assert ( imin <= imax  , "Invalid range of values" ) ; 
-  
-}
-// ============================================================================
-// set PMF properly
-// ============================================================================
-void LoKi::Tracks::CountVeloIDs::setPmf ( const std::string& nick ) 
-{
-  if      ( "channelID"  == nick ) { m_pmf2 = &LHCb::VeloChannelID::channelID ; }
-  else if ( "channel"    == nick ) { m_pmf2 = &LHCb::VeloChannelID::channelID ; }
-  else if ( "strip"      == nick ) { m_pmf2 = &LHCb::VeloChannelID::strip     ; }
-  else if ( "sensor"     == nick ) { m_pmf2 = &LHCb::VeloChannelID::sensor    ; }
-  else { Exception ( "Invalid LHCb::VeloChannelID member function '" + nick + "'") ; }
-}
-
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( LoKi::Tracks::CountVeloIDs::PMF1 pmf ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( pmf   ) 
-  , m_pmf2  ( 0     ) 
-  , m_uints (       )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ()
-{
- 
-  if      ( &LHCb::VeloChannelID::isPileUp  == m_pmf1 ) { m_nick = "isPileUp"  ; }
-  else if ( &LHCb::VeloChannelID::isRType   == m_pmf1 ) { m_nick = "isRType"   ; }
-  else if ( &LHCb::VeloChannelID::isPhiType == m_pmf1 ) { m_nick = "isPhiType" ; }
-  else 
-  { Exception("Invalid LHCb::VeloChannelID memebr function") ; }
-  
-  Assert ( 0 != m_pmf1  , "Invalid LHCb::VeloChannelID member function:" ) ;
-}
-// ============================================================================
-// constructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::CountVeloIDs
-( const std::string& nick  ) 
-  : LoKi::AuxFunBase ( std::tie ( nick ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function ()
-  , m_pmf1  ( 0     ) 
-  , m_pmf2  ( 0     ) 
-  , m_uints (       )
-  , m_imin  ( boost::integer_traits<unsigned int>::const_max ) 
-  , m_imax  ( boost::integer_traits<unsigned int>::const_min ) 
-  , m_nick  ( nick )
-{
-  
-  if      ( "isPileUp"  == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPileUp   ; }
-  else if ( "pileUp"    == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPileUp   ; }
-  else if ( "PileUp"    == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPileUp   ; }
-  else if ( "isRType"   == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isRType    ; }
-  else if ( "RType"     == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isRType    ; }
-  else if ( "rType"     == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isRType    ; }
-  else if ( "R"         == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isRType    ; }
-  else if ( "r"         == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isRType    ; }
-  else if ( "isPhiType" == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPhiType  ; }
-  else if ( "PhiType"   == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPhiType  ; }
-  else if ( "phiType"   == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPhiType  ; }
-  else if ( "Phi"       == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPhiType  ; }
-  else if ( "phi"       == m_nick ) { m_pmf1 = &LHCb::VeloChannelID::isPhiType  ; }
-  
-  Assert ( 0 != m_pmf1  , "Invalid LHCb::VeloChannelID member function '" + m_nick + "'" ) ;
-
-}
-// ============================================================================
-// MANDATORY: virtual destructor
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::~CountVeloIDs(){}
-// ============================================================================
-// MANDATORY: clone method ('virtual constructor')
-// ============================================================================
-LoKi::Tracks::CountVeloIDs*
-LoKi::Tracks::CountVeloIDs::clone() const 
-{ return new LoKi::Tracks::CountVeloIDs ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::CountVeloIDs::result_type 
-LoKi::Tracks::CountVeloIDs::operator()
-  ( LoKi::Tracks::CountVeloIDs::argument t ) const 
-{
-  //
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1") ;
-    return -1 ;
-  }
-  //
-  typedef  std::vector<LHCb::LHCbID> IDs ;
-  //
-  const IDs& lhcbids = t->lhcbIDs() ;
-  //
-  size_t res = 0 ;
-  //
-  for ( IDs::const_iterator id = lhcbids.begin() ; lhcbids.end() != id ; ++id ) 
-  {
-    if ( ! id->isVelo() ) { continue ; }
-    //
-    const LHCb::VeloChannelID velo = id->veloID() ;
-    //
-    if ( 0 != m_pmf1 ) { if ( (velo.*m_pmf1)() ) { ++res ; } }
-    else 
-    {
-      const unsigned int r = (velo.*m_pmf2) () ;
-      if      ( m_uints.empty()     ) { if ( m_imin <= r && r <= m_imax ) { ++res ; } }
-      else if ( 1 == m_uints.size() ) { if ( m_uints.front() == r       ) { ++res ; } }
-      else 
-      { 
-        if  ( m_uints.end() != std::find ( m_uints.begin() , m_uints.end() , r ) ) { ++res ; } 
-      }
-    }
-  }
-  //
-  return res;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::CountVeloIDs::fillStream ( std::ostream& s ) const 
-{ 
-  s << " TrVELOIDC( " ;
-  //
-  if ( 0 != m_pmf1 ) { return s << "'" << m_nick << "' ) " ; }
-  //
-  if      ( m_uints.empty()     ) { s << m_imin << " ,'" << m_nick << "', "<< m_imax ; }
-  else if ( 1 == m_uints.size() ) { s << "'" << m_nick << "', " << m_uints.front()     ; }
-  else 
-  {
-    s << "'" << m_nick << "', " ;
-    Gaudi::Utils::toStream ( m_uints , s ) ;
-  }
-  //
-  return s << " ) " ;
-}
-
-
-// ============================================================================
-// The END 
-// ============================================================================
diff --git a/Phys/LoKiTracks/src/Tracks.cpp b/Phys/LoKiTracks/src/Tracks.cpp
index 1aa3026cc..7b166e033 100644
--- a/Phys/LoKiTracks/src/Tracks.cpp
+++ b/Phys/LoKiTracks/src/Tracks.cpp
@@ -47,236 +47,6 @@ namespace
   // ==========================================================================
 }
 // ============================================================================
-// MANDATORY: clone method ("virtual constructor")  
-// ============================================================================
-LoKi::Tracks::Key* LoKi::Tracks::Key::clone() const { return new Key(*this) ; }
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Key::result_type
-LoKi::Tracks::Key::operator() 
-  ( LoKi::Tracks::Key::argument t ) const 
-{
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1 ") ;
-    return -1 ;
-  }
-  //
-  return t->key() ;
-}
-// ============================================================================
-// OPTIONAL: the nice printout 
-// ============================================================================
-std::ostream& 
-LoKi::Tracks::Key::fillStream ( std::ostream& s ) const
-{ return s << "TrKEY" ; }
-// ============================================================================
-
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::InTES::result_type
-LoKi::Tracks::InTES::operator() 
-  ( LoKi::Tracks::InTES::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return false") ;
-    return false;
-  }
-  return 0 != t->parent() ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Charge::result_type
-LoKi::Tracks::Charge::operator() 
-  ( LoKi::Tracks::Charge::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidCharge'") ;
-    return LoKi::Constants::InvalidCharge ;
-  }
-  return t->charge() ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::TransverseMomentum::result_type
-LoKi::Tracks::TransverseMomentum::operator() 
-  ( LoKi::Tracks::TransverseMomentum::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidMomentum'") ;
-    return LoKi::Constants::InvalidMomentum ;
-  }
-  return t->pt() ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Momentum::result_type
-LoKi::Tracks::Momentum::operator() 
-  ( LoKi::Tracks::Momentum::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidMomentum'") ;
-    return LoKi::Constants::InvalidMomentum ;
-  }
-  return t->p() ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Phi::result_type
-LoKi::Tracks::Phi::operator() 
-  ( LoKi::Tracks::Momentum::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidAngle'") ;
-    return LoKi::Constants::InvalidAngle ;
-  }
-  return t->phi() ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Eta::result_type
-LoKi::Tracks::Eta::operator() 
-  ( LoKi::Tracks::Momentum::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidAngle'") ;
-    return LoKi::Constants::InvalidAngle ;
-  }
-  return t->pseudoRapidity() ;
-}
-// ============================================================================
-// constructor from the flag 
-// ============================================================================
-LoKi::Tracks::CheckFlag::CheckFlag 
-( LHCb::Track::Flags flag ) 
-  : LoKi::AuxFunBase 
-    ( std::make_tuple 
-      ( LoKi::StrKeep
-        ( "LHCb::Track::" + LHCb::Track::FlagsToString( flag ) ) ) )
-  , LoKi::BasicFunctors<const LHCb::Track*>::Predicate() 
-  , m_flag ( flag ) 
-{}
-// ============================================================================
-// OPTIONAL: the nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::CheckFlag::fillStream( std::ostream& s ) const 
-{ 
-  switch ( m_flag ) 
-  {
-  case LHCb::Track::Backward    :
-    return s << "TrBACKWARD"     ;                     // RETURN 
-  case LHCb::Track::Invalid     : 
-    return s << "TrINVALID"      ;                     // RETURN 
-  case LHCb::Track::Clone       :
-    return s << "TrCLONE"        ;                     // RETURN 
-  case LHCb::Track::Used        :
-    return s << "TrUSED"         ;                     // RETURN 
-  case LHCb::Track::IPSelected  :
-    return s << "TrIPSELECTED"   ;                     // RETURN 
-  case LHCb::Track::PIDSelected :
-    return s << "TrPIDSELECTED"  ;                     // RETURN 
-  case LHCb::Track::Selected    :
-    return s << "TrSELECTED"     ;                     // RETURN  
-  case LHCb::Track::L0Candidate :
-    return s << "TrL0CANDIDATE"  ;                     // RETURN 
-  default :  
-    break  ;                                           // BREAK 
-  }
-  //
-  return   s << "TrISFLAG("  << (int) m_flag << ")" ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::CheckFlag::result_type
-LoKi::Tracks::CheckFlag::operator() 
-  ( LoKi::Tracks::CheckFlag::argument t ) const 
-{
-  //
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  //
-  return t->checkFlag ( m_flag )  ;
-}
-// ============================================================================
-// constructor form the tool 
-// ============================================================================
-LoKi::Tracks::Selector::Selector 
-( const ITrackSelector* tool ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Predicate() 
-  , m_tool ( const_cast<ITrackSelector*> ( tool ) ) 
-{
-  Assert ( m_tool.validPointer() , "ITrackSelector* point to NULL" );  
-}
-// ============================================================================
-// constructor form the tool 
-// ============================================================================
-LoKi::Tracks::Selector::Selector 
-( const LoKi::Interface<ITrackSelector>& tool ) 
-  : LoKi::BasicFunctors<const LHCb::Track*>::Predicate() 
-  , m_tool ( tool ) 
-{
-  Assert ( m_tool.validPointer() , "ITrackSelector* point to NULL" );  
-}
-// ============================================================================
-// the default constructor is protected
-// ============================================================================
-LoKi::Tracks::Selector::Selector ()     // the default constructor is protected
-  : LoKi::BasicFunctors<const LHCb::Track*>::Predicate() 
-  , m_tool ( s_SELECTOR ) 
-{}
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Selector::result_type 
-LoKi::Tracks::Selector::operator() 
-  ( LoKi::Tracks::Selector::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  return eval ( t ) ;
-}
-// ============================================================================
-// The only one essential method 
-// ============================================================================
-bool LoKi::Tracks::Selector::eval ( const LHCb::Track* t ) const 
-{
-  //
-  Assert ( m_tool.validPointer() , "ITrackSelector* points to NULL" );  
-  // use the tool 
-  return m_tool->accept ( *t ) ; 
-}
-// ============================================================================
-// set new selector tool 
-// ============================================================================
-void LoKi::Tracks::Selector::setSelector ( const ITrackSelector* selector ) const 
-{ m_tool = const_cast<ITrackSelector*> ( selector ) ; }
-// ============================================================================
-// OPTIONAL: the nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::Selector::fillStream( std::ostream& s ) const 
-{ return s << "TrSELECTOR" ; }
-// ============================================================================
 // constructor from the tool name 
 // ============================================================================
 LoKi::Tracks::Filter::Filter ( const std::string& nick ) 
@@ -318,551 +88,6 @@ std::ostream& LoKi::Tracks::Filter::fillStream( std::ostream& s ) const
 { return s << "TrFILTER('" << m_nick << "')" ; }
 // ============================================================================
 
-// ============================================================================
-/*  constructor from "info"
- *  @param key info index/mark/key
- */
-// ============================================================================
-// constructor from the key 
-// ============================================================================
-LoKi::Tracks::HasInfo:: HasInfo 
-( const int key ) 
-  : LoKi::AuxFunBase ( std::tie ( key ) ) 
-  , LoKi::ExtraInfo::CheckInfo<const LHCb::Track*> ( key ) 
-{}
-// ============================================================================
-// the specific printout 
-// ============================================================================
-std::ostream& 
-LoKi::Tracks::HasInfo::fillStream( std::ostream& s ) const 
-{ return s << "TrHASINFO(" << index() << ")" ; }
-// ============================================================================
-/* constructor from "info"
- *  @param key info index/mark/key
- *  @param def default value for missing key/invalid object 
- */
-// ============================================================================
-LoKi::Tracks::Info::Info
-( const int    key , const double def )
-  : LoKi::AuxFunBase ( std::tie ( key , def ) ) 
-  , LoKi::ExtraInfo::GetInfo<const LHCb::Track*> ( key , def ) 
-{}
-// ============================================================================
-// the specific printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::Info::fillStream( std::ostream& s ) const 
-{ return s << "TrINFO(" << index() << "," << value() << ")" ; }
-// ============================================================================
-/*  constructor from the function, key and update-flag
- *  @param index the key in LHCb::Track::extraInfo table 
- *  @param fun functionto be evaluated for missing keys 
- *  @param update the flag to allow the insert of mnissing information
- */
-// ============================================================================
-LoKi::Tracks::SmartInfo::SmartInfo
-( const int                                                index  , 
-  const LoKi::BasicFunctors<const LHCb::Track*>::Function& fun    , 
-  const bool                                               update ) 
-  : LoKi::AuxFunBase ( std::tie ( index , fun , update  ) ) 
-  , LoKi::ExtraInfo::GetSmartInfo<const LHCb::Track*> ( index , fun , update )
-{}
-// ============================================================================
-// the specific printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::SmartInfo::fillStream( std::ostream& s ) const 
-{ 
-  s << "TrSINFO(" << func () << "," << index() << "," ;
-  if ( update() ) { s << "True"  ; }
-  else            { s << "False" ; }
-  return s << ")" ;  
-}
-// ============================================================================
-// constructor with the state indicator 
-// ============================================================================
-LoKi::Tracks::StateZ::StateZ 
-( const LHCb::State::Location location )
-  : LoKi::AuxFunBase ( std::tie ( location ) )  
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function () 
-  , m_state ( location ) 
-  , m_bad   ( LoKi::Constants::InvalidDistance ) 
-{}
-// ============================================================================
-// constructor with the state indicator 
-// ============================================================================
-LoKi::Tracks::StateZ::StateZ 
-( const LHCb::State::Location location , 
-  const double                bad      )
-  : LoKi::AuxFunBase ( std::tie ( location , bad ) )  
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function () 
-  , m_state ( location ) 
-  , m_bad   ( bad      ) 
-{}
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::StateZ*
-LoKi::Tracks::StateZ::clone() const 
-{ return new LoKi::Tracks::StateZ ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::StateZ::result_type 
-LoKi::Tracks::StateZ::operator() 
-  ( LoKi::Tracks::StateZ::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'bad'") ;
-    return m_bad;
-  }
-  /// get the state:
-  const LHCb::State* s = t->stateAt( m_state ) ;
-  if ( 0 == s )  
-  {
-    Error ( "There is no state at " + state() + ", return 'bad' " ) ;
-    return m_bad ;
-  }
-  return s->z () ; 
-}
-// ============================================================================
-// get the string representation of the state 
-// ============================================================================
-const std::string& LoKi::Tracks::StateZ::state() const 
-{
-  if ( !m__state.empty() ) { return m__state ; }
-  std::ostringstream ss ;
-  ss << m_state ;
-  m__state = ss.str() ;
-  return m__state ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::StateZ::fillStream ( std::ostream& s ) const 
-{
-  switch ( m_state ) 
-  {
-  case LHCb::State::FirstMeasurement : 
-    return s << " TrFIRSTHITZ " ;
-  default : 
-    break ;
-  }
-  return s << " TrSTATEZ( LHCb.State." << state() << " ) " ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Chi2::result_type 
-LoKi::Tracks::Chi2::operator() 
-  ( LoKi::Tracks::Chi2::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvaildChi2'") ;
-    return LoKi::Constants::InvalidChi2 ;
-  }
-  return t->chi2() ; 
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Chi2PerDoF::result_type 
-LoKi::Tracks::Chi2PerDoF::operator() 
-  ( LoKi::Tracks::Chi2PerDoF::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvaildChi2'") ;
-    return LoKi::Constants::InvalidChi2 ;
-  }
-  return t->chi2PerDoF() ; 
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::ProbChi2::result_type 
-LoKi::Tracks::ProbChi2::operator() 
-  ( LoKi::Tracks::ProbChi2::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvaildChi2'") ;
-    return LoKi::Constants::InvalidChi2 ;
-  }
-  //
-  return t->probChi2() ; 
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::GhostProb::result_type 
-LoKi::Tracks::GhostProb::operator() 
-  ( LoKi::Tracks::GhostProb::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidChi2'") ;
-    return LoKi::Constants::InvalidChi2 ;
-  }
-  return t->ghostProbability() ; 
-}
-// ============================================================================
-// constructor 
-// ============================================================================
-LoKi::Tracks::HasStateAt::HasStateAt
-( const LHCb::State::Location& loc )
-  : LoKi::AuxFunBase ( std::tie ( loc ) )
-  , LoKi::BasicFunctors<const LHCb::Track*>::Predicate () 
-  , m_loc ( loc ) 
-{}
-// ============================================================================
-// mandatory: the only one essential method
-// ============================================================================
-LoKi::Tracks::HasStateAt::result_type 
-LoKi::Tracks::HasStateAt::operator() 
-  ( LoKi::Tracks::HasStateAt::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  //
-  return t->hasStateAt ( m_loc ) ; 
-}
-// ============================================================================
-// constructor 
-// ============================================================================
-LoKi::Tracks::IsOnTrack::IsOnTrack
-( const LHCb::LHCbID& id ) 
-  : LoKi::AuxFunBase ( std::tie ( id ) )
-  , LoKi::BasicFunctors<const LHCb::Track*>::Predicate () 
-  , m_id ( id ) 
-{}
-// ============================================================================
-// mandatory: the only one essential method
-// ============================================================================
-LoKi::Tracks::IsOnTrack::result_type 
-LoKi::Tracks::IsOnTrack::operator() 
-  ( LoKi::Tracks::HasStateAt::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  //
-  return t->isOnTrack( m_id ) ; 
-}
-// ============================================================================
-// mandatory: the only one essential method
-// ============================================================================
-LoKi::Tracks::Type::result_type 
-LoKi::Tracks::Type::operator() 
-  ( LoKi::Tracks::Type::argument t ) const 
-{ 
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return -1 ") ;
-    return -1 ;
-  }
-  //
-  return t->type() ; 
-}
-// ============================================================================
-
-
-// ============================================================================
-// constructor from indices
-// ============================================================================
-LoKi::Tracks::Cov2::Cov2 
-( const unsigned short i , 
-  const unsigned short j ) 
-  : LoKi::AuxFunBase ( std::tie ( i, j ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function() 
-  , m_case ( _First                        ) 
-  , m_z    ( -1 * Gaudi::Units::km         ) 
-  , m_loc  ( LHCb::State::FirstMeasurement ) 
-  , m_i    ( i ) 
-  , m_j    ( j ) 
-{
-  Assert ( m_i < 5 && m_j < 5 , "Invalid indices" ) ;
-}
-// ============================================================================
-// constructor from indices & state location 
-// ============================================================================
-LoKi::Tracks::Cov2::Cov2 
-( const LHCb::State::Location location , 
-  const unsigned short        i        , 
-  const unsigned short        j        ) 
-  : LoKi::AuxFunBase ( std::tie ( location , i, j ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function() 
-  , m_case ( _Location  ) 
-  , m_z    ( -1 * Gaudi::Units::km         ) 
-  , m_loc  ( location   ) 
-  , m_i    ( i ) 
-  , m_j    ( j ) 
-{
-  Assert ( m_i < 5 && m_j < 5 , "Invalid indices" ) ;
-}
-// ============================================================================
-// constructor from indices and Z-position: 
-// ============================================================================
-LoKi::Tracks::Cov2::Cov2    
-( const double                z , 
-  const unsigned short        i , 
-  const unsigned short        j ) 
-  : LoKi::AuxFunBase ( std::tie ( z , i, j ) ) 
-  , LoKi::BasicFunctors<const LHCb::Track*>::Function() 
-  , m_case ( _Z   ) 
-  , m_z    (  z   ) 
-  , m_loc  ( LHCb::State::FirstMeasurement ) 
-  , m_i    ( i ) 
-  , m_j    ( j ) 
-{
-  Assert ( m_i < 5 && m_j < 5 , "Invalid indices" ) ;
-}
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::Cov2* LoKi::Tracks::Cov2::clone() const 
-{ return new LoKi::Tracks::Cov2 ( *this ) ; }
-// ============================================================================
-// MANDATORY: the only one essential method 
-// ============================================================================
-LoKi::Tracks::Cov2::result_type 
-LoKi::Tracks::Cov2::operator()
-  ( LoKi::Tracks::Cov2::argument t ) const
-{
-  if ( 0 == t ) 
-  {
-    Error ( "LHCb::Track* points to NULL, return NegativeInfnity" ) ;
-    return LoKi::Constants::NegativeInfinity ;  
-  }
-  //
-  const LHCb::State* state = 0 ;
-  switch ( m_case ) 
-  {
-  case _Z         : 
-    state = &(t->closestState ( m_z   ) )  ; break ;
-  case _Location  :
-    state =   t->stateAt      ( m_loc )    ; break ;
-  default :
-    state =  &t->firstState () ;
-  }
-  //
-  if ( 0 == state ) 
-  {
-    Warning("LHCb::State* points to NULL, use 'FirstState'")  ;
-    state = &t->firstState() ;    
-  }
-  //
-  if ( 0 == state ) 
-  {
-    Error  ("LHCb::State* points to NULL, return 'NegativeInfinity'")  ;
-    return LoKi::Constants::NegativeInfinity ;  
-  }
-  //
-  return state -> covariance () ( m_i , m_j ) ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::Cov2::fillStream ( std::ostream& s ) const 
-{
-  s << "TrCOV2(" ;
-  //
-  switch ( m_case ) 
-  {
-  case _Z        : 
-    s << m_z << "," ; break ;
-  case _Location : 
-    s << "LHCb.State." << m_loc << "," ; break ;
-  default : 
-    s << "" ;
-  }
-  //
-  return s << m_i << "," << m_j << ")" ;
-}
-// ============================================================================
-
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::NVeloMissed*
-LoKi::Tracks::NVeloMissed::clone() const
-{ return new LoKi::Tracks::NVeloMissed ( *this ) ; }
-// ============================================================================
-// MANDATORY: theonbly one essential method
-// ============================================================================
-LoKi::Tracks::NVeloMissed::result_type 
-LoKi::Tracks::NVeloMissed::operator() 
-  ( LoKi::Tracks::NVeloMissed::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ( "LHCb::Track* points to NULL, return NegativeInfnity" ) ;
-    return LoKi::Constants::NegativeInfinity ;  
-  } 
-  //
-  if      ( t -> hasInfo ( LHCb::Track::nPRVelo3DExpect ) )
-  { return     t -> info ( LHCb::Track::nPRVelo3DExpect , -1 ) - t -> nLHCbIDs () ; }
-  else if ( t -> hasInfo ( LHCb::Track::nPRVeloRZExpect ) )
-  { return 2 * t -> info ( LHCb::Track::nPRVeloRZExpect , -1 ) - t -> nLHCbIDs () ; }
-  //
-  return -1 ;
-}
-// ============================================================================
-
-// ============================================================================
-// MANDATORY: clone method ("virtual constructor")
-// ============================================================================
-LoKi::Tracks::NTHits*
-LoKi::Tracks::NTHits::clone() const
-{ return new LoKi::Tracks::NTHits( *this ) ; }
-// ============================================================================
-// MANDATORY: theonbly one essential method
-// ============================================================================
-LoKi::Tracks::NTHits::result_type 
-LoKi::Tracks::NTHits::operator() 
-  ( LoKi::Tracks::NTHits::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ( "LHCb::Track* points to NULL, return -1000" ) ;
-    return -1000 ;  
-  } 
-  //
-  typedef LHCb::Track::LHCbIDContainer IDs ;
-  //
-  const IDs& ids = t->lhcbIDs() ;
-  // 
-  int nIDs = 0 ;
-  for ( IDs::const_iterator iid = ids.begin() ; ids.end() != iid ; ++iid ) 
-  {
-    if      ( iid -> isIT () ) {   nIDs += 2 ; }
-    else if ( iid -> isOT () ) { ++nIDs      ; } 
-  }
-  // 
-  return nIDs ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::NTHits::fillStream( std::ostream& s ) const 
-{ return s << "TrNTHITS" ; }
-// ============================================================================
-
-
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::MomentumX::result_type
-LoKi::Tracks::MomentumX::operator() 
-  ( LoKi::Tracks::MomentumX::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidMomentum'") ;
-    return LoKi::Constants::InvalidMomentum ;
-  }
-  return t -> momentum () . X () ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::MomentumY::result_type
-LoKi::Tracks::MomentumY::operator() 
-  ( LoKi::Tracks::MomentumY::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidMomentum'") ;
-    return LoKi::Constants::InvalidMomentum ;
-  }
-  return t -> momentum () . Y () ;
-}
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::MomentumZ::result_type
-LoKi::Tracks::MomentumZ::operator() 
-  ( LoKi::Tracks::MomentumZ::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'InvalidMomentum'") ;
-    return LoKi::Constants::InvalidMomentum ;
-  }
-  return t -> momentum () . Z () ;
-}
-
-
-
-
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::HasT::result_type
-LoKi::Tracks::HasT::operator() 
-  ( LoKi::Tracks::HasT::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  return t -> hasT ()  ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::HasT::fillStream( std::ostream& s ) const 
-{ return s << "TrHAST" ; }
-// ============================================================================
-
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::HasVelo::result_type
-LoKi::Tracks::HasVelo::operator() 
-  ( LoKi::Tracks::HasVelo::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  return t -> hasVelo ()  ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::HasVelo::fillStream( std::ostream& s ) const 
-{ return s << "TrHASVELO" ; }
-// ============================================================================
-
-
-// ============================================================================
-// mandatory: the only one essential method 
-// ============================================================================
-LoKi::Tracks::HasTT::result_type
-LoKi::Tracks::HasTT::operator() 
-  ( LoKi::Tracks::HasTT::argument t ) const 
-{
-  if ( 0 == t ) 
-  {
-    Error ("LHCb::Track* points to NULL, return 'false'") ;
-    return false ;
-  }
-  return t -> hasTT ()  ;
-}
-// ============================================================================
-// OPTIONAL: nice printout 
-// ============================================================================
-std::ostream& LoKi::Tracks::HasTT::fillStream( std::ostream& s ) const 
-{ return s << "TrHASTT" ; }
-// ============================================================================
 
 // ============================================================================
 // Constructor from bound
@@ -908,17 +133,6 @@ LoKi::Tracks::FastDOCAToBeamLine::operator()
   LoKi::FastVertex::distance( t, m_beamLine, doca );
   return doca;
 }
-// ============================================================================
-namespace 
-{
-  // hashing object 
-  const std::hash<const void*> s_hash {} ;
-}
-// ============================================================================
-// hash
-// ============================================================================
-std::size_t LoKi::Tracks::hash ( const LHCb::Track* track ) 
-{ return 0 ==  track ? 0 : s_hash ( track ) ; }
 
 // ============================================================================
 // The END 
diff --git a/Phys/LoKiTracks/src/VeloHitPatternFunctions.cpp b/Phys/LoKiTracks/src/VeloHitPatternFunctions.cpp
deleted file mode 100644
index 0207ec304..000000000
--- a/Phys/LoKiTracks/src/VeloHitPatternFunctions.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// ============================================================================
-// Include files
-// ============================================================================
-// Event
-// ============================================================================
-#include "Event/Track.h"
-// ============================================================================
-// LHCb
-// ============================================================================
-#include "Kernel/HitPattern.h"
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/VeloHitPatternFunctions.h"
-// ============================================================================
-/** @file
- *  Implementation file for classed form the file
- *  LoKi/VeloHitPatternFunctions.h
- *
- *  @author Wouter Hulsbergen
- *  @author Pieter David
- *  @date 2012-03-12
- */
-// ============================================================================
-
-
-
-// ============================================================================
-// MANDATORY: the only one essential method
-// ============================================================================
-LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints::result_type
-LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints::operator()
-  ( LoKi::Tracks::MaxNumConsecutiveVeloSpacePoints::argument t ) const
-{
-  LHCb::HitPattern p(t->lhcbIDs()) ;
-  // get the R and Phi hit patterns
-  std::bitset<LHCb::HitPattern::NumVelo> veloR = p.veloRA() | p.veloRC();
-  std::bitset<LHCb::HitPattern::NumVelo> veloPhi = p.veloPhiA() | p.veloPhiC();
-  // make a logical 'and' to get the number of stations with a cluster
-  std::bitset<LHCb::HitPattern::NumVelo> veloclusters = veloR & veloPhi;
-  // now count the number of consecutive stations with a cluster
-  int numconsecutive(0) ;
-  int maxnumconsecutive(0) ;
-  for(int i=0; i<LHCb::HitPattern::NumVelo; ++i) {
-    if( veloclusters.test(i) ) {
-      ++numconsecutive ;
-      if( maxnumconsecutive<numconsecutive)
-        maxnumconsecutive=numconsecutive ;
-    } else {
-      numconsecutive = 0 ;
-    }
-  }
-  return maxnumconsecutive ;
-
-}
-
-
-
-// ============================================================================
-// MANDATORY: the only one essential method
-// ============================================================================
-LoKi::Tracks::NumVeloSpacePoints::result_type
-LoKi::Tracks::NumVeloSpacePoints::operator()
-  ( LoKi::Tracks::NumVeloSpacePoints::argument t ) const
-{
-  LHCb::HitPattern p(t->lhcbIDs()) ;
-  return ( (p.veloRA()|p.veloRC()) & (p.veloPhiA()|p.veloPhiC()) ).count() ;
-}
-
-
-
-// ============================================================================
-// MANDATORY: the only one essential method
-// ============================================================================
-LoKi::Tracks::NumVeloACOverlapHits::result_type
-LoKi::Tracks::NumVeloACOverlapHits::operator()
-  ( LoKi::Tracks::NumVeloACOverlapHits::argument t ) const
-{
-  LHCb::HitPattern p(t->lhcbIDs()) ;
-  return p.numVeloStationsOverlap() ;
-}
-
-
-
-// ============================================================================
-// MANDATORY: the only one essential method
-// ============================================================================
-LoKi::Tracks::NumVeloACOverlapHitsR::result_type
-LoKi::Tracks::NumVeloACOverlapHitsR::operator()
-  ( LoKi::Tracks::NumVeloACOverlapHitsR::argument t ) const
-{
-  LHCb::HitPattern p(t->lhcbIDs()) ;
-  return ( p.veloRA() & p.veloRC() ).count() ;
-}
-
-
-
-// ============================================================================
-// MANDATORY: the only one essential method
-// ============================================================================
-LoKi::Tracks::NumVeloACOverlapHitsPhi::result_type
-LoKi::Tracks::NumVeloACOverlapHitsPhi::operator()
-  ( LoKi::Tracks::NumVeloACOverlapHitsPhi::argument t ) const
-{
-  LHCb::HitPattern p(t->lhcbIDs()) ;
-  return ( p.veloPhiA() & p.veloPhiC() ).count() ;
-}
-
-
-
-// ============================================================================
-// The END
-// ============================================================================
-- 
GitLab


From 9e3a8c08954d89ab50e8e49be12049226022198b Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Wed, 19 Oct 2016 19:28:04 +0200
Subject: [PATCH 04/18] adapt to Rec/LoKiTrack

---
 Phys/LoKiTracks/CMakeLists.txt | 16 ++--------------
 Phys/LoKiTracks/LoKi/Tracks.h  |  2 ++
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/Phys/LoKiTracks/CMakeLists.txt b/Phys/LoKiTracks/CMakeLists.txt
index b76f57781..bf4418138 100644
--- a/Phys/LoKiTracks/CMakeLists.txt
+++ b/Phys/LoKiTracks/CMakeLists.txt
@@ -4,6 +4,7 @@
 gaudi_subdir(LoKiTracks v3r8)
 
 gaudi_depends_on_subdirs(Event/TrackEvent
+                         Rec/LoKiTrack
                          Phys/KalmanFilter
                          Phys/LoKiCore
                          Phys/LoKiUtils
@@ -13,19 +14,6 @@ gaudi_add_library(LoKiTracksLib
                   src/*.cpp
                   PUBLIC_HEADERS LoKi
                   INCLUDE_DIRS Tr/TrackInterfaces
-                  LINK_LIBRARIES TrackEvent KalmanFilter LoKiCoreLib LoKiUtils)
+                  LINK_LIBRARIES TrackEvent LoKiTrackLib KalmanFilter LoKiCoreLib LoKiUtils)
 
-gaudi_add_module(LoKiTracks
-                 src/Components/*.cpp
-                 INCLUDE_DIRS Tr/TrackInterfaces
-                 LINK_LIBRARIES TrackEvent KalmanFilter LoKiCoreLib LoKiUtils LoKiTracksLib)
-
-gaudi_add_dictionary(LoKiTracks
-                     dict/LoKiTracksDict.h
-                     dict/LoKiTracks.xml
-                     INCLUDE_DIRS Tr/TrackInterfaces
-                     LINK_LIBRARIES TrackEvent KalmanFilter LoKiCoreLib LoKiUtils LoKiTracksLib
-                     OPTIONS " -U__MINGW32__ ")
-
-gaudi_install_python_modules()
 
diff --git a/Phys/LoKiTracks/LoKi/Tracks.h b/Phys/LoKiTracks/LoKi/Tracks.h
index 65bdfbc3e..c9374926a 100644
--- a/Phys/LoKiTracks/LoKi/Tracks.h
+++ b/Phys/LoKiTracks/LoKi/Tracks.h
@@ -18,6 +18,7 @@
 // ============================================================================
 // LoKi
 // ============================================================================
+#include "LoKi/Track.h"
 #include "LoKi/ExtraInfo.h"
 #include "LoKi/TrackTypes.h"
 #include "LoKi/Interface.h"
@@ -45,6 +46,7 @@ namespace LoKi
    */
   namespace Tracks
   {
+    using namespace LoKi::Track;
     // ========================================================================
     /** @class Filter
      *  Simple class GAUDI_API to use "track-selector"
-- 
GitLab


From 623dce8d937ed11d4c0d9494ecc3d67e81bd424d Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Wed, 19 Oct 2016 19:36:02 +0200
Subject: [PATCH 05/18] remove TrackCuts.h so it does not shadow the file with
 the same name in Rec

---
 Phys/LoKiTracks/LoKi/TrackCuts.h | 63 --------------------------------
 1 file changed, 63 deletions(-)
 delete mode 100644 Phys/LoKiTracks/LoKi/TrackCuts.h

diff --git a/Phys/LoKiTracks/LoKi/TrackCuts.h b/Phys/LoKiTracks/LoKi/TrackCuts.h
deleted file mode 100644
index 4f95436d9..000000000
--- a/Phys/LoKiTracks/LoKi/TrackCuts.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// ============================================================================
-#ifndef LOKI_TRACKCUTS_H
-#define LOKI_TRACKCUTS_H 1
-// ============================================================================
-// Include files
-// ============================================================================
-// LoKi
-// ============================================================================
-#include "LoKi/TrackTypes.h"
-#include "LoKi/Tracks.h"
-#include "LoKi/Primitives.h"
-#include "LoKi/Monitoring.h"
-// ============================================================================
-namespace LoKi
-{
-  // ==========================================================================
-  namespace Cuts
-  {
-    // ========================================================================
-    /** @typedef TrFILTER  
-     *  Simple predicate (wrapper) for ITrackSelector tool
-     *  
-     *  @code 
-     * 
-     *    const LHCb::Track&    track = ... ;
-     *    // create the function:
-     *    const TrCut accept = TrFILTER   ( "mytooltypename") ;
-     *    // use it!
-     *    const bool OK = accept ( track ) ;
-     *
-     *  @endcode 
-     *
-     *  @see LoKi::Tracks::Filter
-     *  @see LoKi::Cuts::TrSELECTOR
-     *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
-     *  @date   2011-01-20
-     */
-    typedef LoKi::Tracks::Filter                                   TrFILTER ;
-    // ========================================================================
-    /** @typedef  Tr_FASTDOCATOBEAMLINE
-     *  Fast DOCA to beam line using TTrDOCA and BEAMSPOT, similar to the
-     *  BEAMSPOTRHO cut
-     *  @see LoKi::Cuts::TTrDOCA
-     *  @see HltUtils::closestDistanceMod
-     *  @see LoKi::Tracks::DistanceOfClosestApproach
-     *  @see LoKi::BeamSpot
-     *  @see LoKi::Cuts::BEAMSPOT
-     *  @see LoKi::Vertices::BeamSpotRho
-     *  @see LoKi::Cuts::BEAMSPOTRHO
-     *  @author Pieter David pieter.david@cern.ch
-     *  @date 2012-02-24
-     */
-    typedef LoKi::Tracks::FastDOCAToBeamLine            Tr_FASTDOCATOBEAMLINE ;
-    // ========================================================================
-    // ========================================================================
- } //                                            end of namespace LoKi::Tracks
-  // ==========================================================================
-} //                                                      end of namespace LoKi 
-// ============================================================================
-// The END 
-// ============================================================================
-#endif // LOKI_TRACKCUTS_H
-// ============================================================================
-- 
GitLab


From 1252edc16dc2735e5a3ee4a7dc75004ceae555ea Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Wed, 19 Oct 2016 22:12:20 +0200
Subject: [PATCH 06/18] Restore Tr_FASTDOCABEAMLINE

both in LoKi::Cuts (now defined in LoKi/Tracks.h) and in python...
---
 Phys/LoKiTracks/CMakeLists.txt                |  1 +
 Phys/LoKiTracks/LoKi/Tracks.h                 | 18 ++++++++
 Phys/LoKiTracks/python/LoKitracks/__init__.py | 37 ++++++++++++++++
 .../LoKiTracks/python/LoKitracks/functions.py | 44 +++++++++++++++++++
 4 files changed, 100 insertions(+)
 create mode 100755 Phys/LoKiTracks/python/LoKitracks/__init__.py
 create mode 100644 Phys/LoKiTracks/python/LoKitracks/functions.py

diff --git a/Phys/LoKiTracks/CMakeLists.txt b/Phys/LoKiTracks/CMakeLists.txt
index bf4418138..109161b40 100644
--- a/Phys/LoKiTracks/CMakeLists.txt
+++ b/Phys/LoKiTracks/CMakeLists.txt
@@ -16,4 +16,5 @@ gaudi_add_library(LoKiTracksLib
                   INCLUDE_DIRS Tr/TrackInterfaces
                   LINK_LIBRARIES TrackEvent LoKiTrackLib KalmanFilter LoKiCoreLib LoKiUtils)
 
+gaudi_install_python_modules()
 
diff --git a/Phys/LoKiTracks/LoKi/Tracks.h b/Phys/LoKiTracks/LoKi/Tracks.h
index c9374926a..fbf3289fb 100644
--- a/Phys/LoKiTracks/LoKi/Tracks.h
+++ b/Phys/LoKiTracks/LoKi/Tracks.h
@@ -121,6 +121,24 @@ namespace LoKi
     } ;
     // ========================================================================
   } //                                            end of namespace LoKi::Tracks
+  namespace Cuts {
+    // ========================================================================
+    /** @typedef  Tr_FASTDOCATOBEAMLINE
+     *  Fast DOCA to beam line using TTrDOCA and BEAMSPOT, similar to the
+     *  BEAMSPOTRHO cut
+     *  @see LoKi::Cuts::TTrDOCA
+     *  @see HltUtils::closestDistanceMod
+     *  @see LoKi::Tracks::DistanceOfClosestApproach
+     *  @see LoKi::BeamSpot
+     *  @see LoKi::Cuts::BEAMSPOT
+     *  @see LoKi::Vertices::BeamSpotRho
+     *  @see LoKi::Cuts::BEAMSPOTRHO
+     *  @author Pieter David pieter.david@cern.ch
+     *  @date 2012-02-24
+     */
+    typedef LoKi::Tracks::FastDOCAToBeamLine            Tr_FASTDOCATOBEAMLINE ;
+    // ========================================================================
+  }
   // ==========================================================================
 } //                                                      end of namespace LoKi 
 // ============================================================================
diff --git a/Phys/LoKiTracks/python/LoKitracks/__init__.py b/Phys/LoKiTracks/python/LoKitracks/__init__.py
new file mode 100755
index 000000000..88d4c953b
--- /dev/null
+++ b/Phys/LoKiTracks/python/LoKitracks/__init__.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# =============================================================================
+## @file
+#  The set of basic objects from LoKiTracks library
+#
+#        This file is a part of LoKi project - 
+#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
+#
+#  The package has been designed with the kind help from
+#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+#  contributions and advices from G.Raven, J.van Tilburg, 
+#  A.Golutvin, P.Koppenburg have been used in the design.
+#
+#  @author Vanya BELYAEV ibelyaev@physics.syr.edu
+#  @date 2007-06-09
+# =============================================================================
+"""
+The set of basic objects from LoKiTracks library
+
+      This file is a part of LoKi project - 
+``C++ ToolKit  for Smart and Friendly Physics Analysis''
+
+The package has been designed with the kind help from
+Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+contributions and advices from G.Raven, J.van Tilburg, 
+A.Golutvin, P.Koppenburg have been used in the design.
+"""
+# =============================================================================
+__author__  = "Vanya BELYAEV  Ivan.Belyaev@nikhef.nl "
+__date__    = "2010-07-17"
+__version__ = "CVS tag $Name:$, version $Revision$ "
+# =============================================================================
+
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/LoKiTracks/python/LoKitracks/functions.py b/Phys/LoKiTracks/python/LoKitracks/functions.py
new file mode 100644
index 000000000..c124052bf
--- /dev/null
+++ b/Phys/LoKiTracks/python/LoKitracks/functions.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# =============================================================================
+## @file
+#  The set of basic objects from LoKiTracks library
+#
+#        This file is a part of LoKi project - 
+#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
+#
+#  The package has been designed with the kind help from
+#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+#  contributions and advices from G.Raven, J.van Tilburg, 
+#  A.Golutvin, P.Koppenburg have been used in the design.
+#
+#  @author Vanya BELYAEV ibelyaev@physics.syr.edu
+#  @date 2007-06-09
+# =============================================================================
+"""
+The set of basic objects from LoKiTracks library
+
+      This file is a part of LoKi project - 
+``C++ ToolKit  for Smart and Friendly Physics Analysis''
+
+The package has been designed with the kind help from
+Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+contributions and advices from G.Raven, J.van Tilburg, 
+A.Golutvin, P.Koppenburg have been used in the design.
+"""
+# =============================================================================
+__author__  = "Vanya BELYAEV  Ivan.Belyaev@nikhef.nl "
+__date__    = "2010-07-17"
+__version__ = "CVS tag $Name:$, version $Revision$ "
+# =============================================================================
+
+
+import LoKiCore.decorators as _LoKiCore
+
+# Namespaces:
+from LoKiCore.basic import cpp, std, LoKi
+LHCb     = cpp.LHCb
+
+## @see LoKi::Tracks::FastDOCAToBeamLine
+Tr_FASTDOCATOBEAMLINE = LoKi.Tracks.FastDOCAToBeamLine
+
+
-- 
GitLab


From d27fb55a3fa0af648f61e677d02945d96e68e0e9 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Thu, 20 Oct 2016 00:54:58 +0200
Subject: [PATCH 07/18] another LoKiTracks to LoKiTrack

---
 Phys/LoKiArrayFunctors/src/Components/HybridTool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/LoKiArrayFunctors/src/Components/HybridTool.cpp b/Phys/LoKiArrayFunctors/src/Components/HybridTool.cpp
index 730109419..716eded36 100644
--- a/Phys/LoKiArrayFunctors/src/Components/HybridTool.cpp
+++ b/Phys/LoKiArrayFunctors/src/Components/HybridTool.cpp
@@ -601,7 +601,7 @@ LoKi::Hybrid::Tool::Tool
   // ==========================================================================
   // C++
   // ==========================================================================
-  m_cpplines.push_back ( "#include \"LoKi/LoKiTracks.h\""         ) ;
+  m_cpplines.push_back ( "#include \"LoKi/LoKiTrack.h\""         ) ;
   m_cpplines.push_back ( "#include \"LoKi/LoKiProtoParticles.h\"" ) ;
   m_cpplines.push_back ( "#include \"LoKi/LoKiPhys.h\""           ) ;
   m_cpplines.push_back ( "#include \"LoKi/LoKiArrayFunctors.h\""  ) ;
-- 
GitLab


From c27b831f4f07d1b3cff046727faaee1521aa6335 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Thu, 20 Oct 2016 10:44:36 +0200
Subject: [PATCH 08/18] rename LoKitracks into LoKiTracks

---
 Phys/LoKiTracks/python/{LoKitracks => LoKiTracks}/__init__.py  | 0
 Phys/LoKiTracks/python/{LoKitracks => LoKiTracks}/functions.py | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename Phys/LoKiTracks/python/{LoKitracks => LoKiTracks}/__init__.py (100%)
 rename Phys/LoKiTracks/python/{LoKitracks => LoKiTracks}/functions.py (100%)

diff --git a/Phys/LoKiTracks/python/LoKitracks/__init__.py b/Phys/LoKiTracks/python/LoKiTracks/__init__.py
similarity index 100%
rename from Phys/LoKiTracks/python/LoKitracks/__init__.py
rename to Phys/LoKiTracks/python/LoKiTracks/__init__.py
diff --git a/Phys/LoKiTracks/python/LoKitracks/functions.py b/Phys/LoKiTracks/python/LoKiTracks/functions.py
similarity index 100%
rename from Phys/LoKiTracks/python/LoKitracks/functions.py
rename to Phys/LoKiTracks/python/LoKiTracks/functions.py
-- 
GitLab


From 55c61e52c5962992bbaa3e9277386b069bf1d1e6 Mon Sep 17 00:00:00 2001
From: Roel Aaij <raaij@nikhef.nl>
Date: Thu, 20 Oct 2016 15:54:05 +0200
Subject: [PATCH 09/18] Fix rejection stage plot for algorithms that both have
 subalgorithms and do work (like HltUnit).

---
 Kernel/SelectionLine/src/SelectionLine.cpp | 27 +++++++++++++++-------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/Kernel/SelectionLine/src/SelectionLine.cpp b/Kernel/SelectionLine/src/SelectionLine.cpp
index 72a0abd23..1e0794e88 100644
--- a/Kernel/SelectionLine/src/SelectionLine.cpp
+++ b/Kernel/SelectionLine/src/SelectionLine.cpp
@@ -461,17 +461,28 @@ StatusCode Selection::Line::execute()
 
   fill( m_errorHisto, report.errorBits(), 1.0);
   // make stair plot
-  auto last = m_subAlgo.begin();
+  auto last = m_subAlgo.begin(), seq = m_subAlgo.end();
   while ( last != m_subAlgo.end() ) {
     if (std::get<0>(*last)->filterPassed()) {
-      last+=std::get<1>(*last);
+      last += std::get<1>(*last);
+      // There are some algorithms that have subalgorithms, but are not pure sequences and
+      // fail even if all children have passed, make sure we record them as the point of failure.
+      // Note: it would be neat if this came after the children in the plot, but we cannot figure
+      // out which algorithms are like this at initialization without heuristics, so we do the best
+      // we can and at least fill the right bin number.
+      if (seq != end(m_subAlgo) && std::distance(seq, last) == std::get<1>(*seq)) {
+        last = seq;
+        break;
+      }
     } else {
-      if (std::get<1>(*last)==1) break; // don't have subalgos, so this is where we stopped
-      ++last; // descend into subalgorithms, figure out which one failed.....
-      // Note: what to do if subalgos pass, but parent failed??  (yes, this is possible!)
-      // actually need to invert parent/daughters, such that if daughters OK,
-      // but parent isn't, we enter the plot at the _parent_, but that should appear
-      // _after_ the daughters (which may be confusing)...
+      if (std::get<1>(*last) == 1) {
+        // don't have subalgos, so this is where we stopped
+        break;
+      } else {
+        // Do have subalgos remember where we start descending
+        seq = last;
+      }
+      ++last; // descend into subalgorithms to figure out which one failed.....
     }
   }
   fill( m_stepHisto, std::distance(m_subAlgo.begin(),last), 1.0);
-- 
GitLab


From 65bbf2db0cc2be35decf7cf67d5508edf25d32d1 Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Thu, 20 Oct 2016 16:14:35 +0200
Subject: [PATCH 10/18] PhsySelPython.Wrappers : add a sad typo in
 CheckPVSelection

---
 PhysSel/PhysSelPython/doc/release.notes       |  4 ++
 .../python/PhysSelPython/Wrappers.py          | 42 +------------------
 2 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/PhysSel/PhysSelPython/doc/release.notes b/PhysSel/PhysSelPython/doc/release.notes
index c4852d9aa..a8a608fd2 100644
--- a/PhysSel/PhysSelPython/doc/release.notes
+++ b/PhysSel/PhysSelPython/doc/release.notes
@@ -5,6 +5,10 @@
 ! Purpose     : Helper python classes for writing offline selections
 !-----------------------------------------------------------------------------
 
+! 2016-10-20 - Vanya Belyaev
+ - Wrappers.py
+   Fix a typo in CheckPVSelection
+
 ! 2016-05-09 - Vanya Belyaev
  - Wrappers.py:
     (re)add FilterSelections 
diff --git a/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py b/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
index ea68402fb..9513187d6 100644
--- a/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
+++ b/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
@@ -702,47 +702,7 @@ def CheckPVSelection ( input         ,
     else :
         raise TypeError, 'CheckPV: invalid setting: %s/%s' %( MinPVs, MaxPVs ) 
     ##
-    from GaudiConfUtils.ConfigurableGenerators import CheckPV as _CHECK_PV_
-    return PassThroughSelection (
-        name                        ,
-        Algorithm         = _CHECKPV_ ( MinPVs = MinPVs , MaxPVs = MaxPVs , **kwargs ) ,
-        RequiredSelection = input   )
-
-
-
-# ========================================================================#
-## special type of PassThroughSelection, that used CheckPV algorithm
-#  @code
-#  my_selection = ....
-#  my_selection_pv   = CheckPVSelection ( my_selection , MinPVs = 1 )
-#  another_selection = XXXSelection ( 'another_selection' ,
-#                                       ... ,
-#                       RequiredSelections = [ my_selection_pv ] )
-#  @endcode
-#  @see PassThroughSelection
-#  @see LimitSelection
-#  @see CheckPV 
-#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
-#  @date 2016-03-11
-def CheckPVSelection ( input         ,                     
-                       MinPVs   =  1 ,
-                       MaxPVs   = -1 ,
-                       **kwargs      ) :
-    """Special type of PassThroughSelection, that used CheckPV algorithm 
-    >>> my_selection = ....
-    >>> my_selection_pv = LimitSelection ( my_selection , MinPVs = 1  )
-    >>> another_selection  = XXXSelection ( 'another_selection' ,
-    ...                                        ... ,
-    ...                 RequiredSelections = [ my_selection_pv ] )
-    """
-    if   0 <= MinPVs <= MaxPVs : 
-        name = 'CHECKPV_%d_%d' %  ( MinPVs , MaxPVs )
-    elif 0 <= MinPVs : 
-        name = 'CHECKPV_%d'    %    MinPVs
-    else :
-        raise TypeError, 'CheckPV: invalid setting: %s/%s' %( MinPVs, MaxPVs ) 
-    ##
-    from GaudiConfUtils.ConfigurableGenerators import CheckPV as _CHECK_PV_
+    from GaudiConfUtils.ConfigurableGenerators import CheckPV as _CHECKPV_
     return PassThroughSelection (
         name                        ,
         Algorithm         = _CHECKPV_ ( MinPVs = MinPVs , MaxPVs = MaxPVs , **kwargs ) ,
-- 
GitLab


From 490cd75a8fa19fe11594c6d4eab205fa7113854a Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Fri, 21 Oct 2016 12:47:14 +0200
Subject: [PATCH 11/18] ! 2016-10-21 - Vanya Belyaev  - Wrappers.py    1. add
 new PayloadSelection: "pseudo-selection" where       some "extra" payload
 algorithm is embedded into the flow.       (with possible ignoring of
 algorithm decision)    2. reimplement MomentumScaling in terms of
 PayloadSelection

---
 PhysSel/PhysSelPython/doc/release.notes       |   7 +
 .../python/PhysSelPython/Selections.py        |   4 +-
 .../python/PhysSelPython/Wrappers.py          | 171 +++++++++++++-----
 3 files changed, 138 insertions(+), 44 deletions(-)

diff --git a/PhysSel/PhysSelPython/doc/release.notes b/PhysSel/PhysSelPython/doc/release.notes
index a8a608fd2..eecfde6b3 100644
--- a/PhysSel/PhysSelPython/doc/release.notes
+++ b/PhysSel/PhysSelPython/doc/release.notes
@@ -5,6 +5,13 @@
 ! Purpose     : Helper python classes for writing offline selections
 !-----------------------------------------------------------------------------
 
+! 2016-10-21 - Vanya Belyaev
+ - Wrappers.py
+   1. add new PayloadSelection: "pseudo-selection" where 
+      some "extra" payload algorithm is embedded into the flow.
+      (with possible ignoring of algorithm decision) 
+   2. reimlement MomentumScaling in terms of PayloadSelection
+
 ! 2016-10-20 - Vanya Belyaev
  - Wrappers.py
    Fix a typo in CheckPVSelection
diff --git a/PhysSel/PhysSelPython/python/PhysSelPython/Selections.py b/PhysSel/PhysSelPython/python/PhysSelPython/Selections.py
index 16d3ddd4a..9e42ce78c 100755
--- a/PhysSel/PhysSelPython/python/PhysSelPython/Selections.py
+++ b/PhysSel/PhysSelPython/python/PhysSelPython/Selections.py
@@ -49,7 +49,8 @@ Derived blocks:
 - PrintSelection           : helper selection for debugging purposes
 - LimitSelection           : limit selection 
 - CheckPVSelection         : embed CheckPV algorithm into selectiton sequence 
-- MomentumScaling          : insert momentum scaling into selectiton sequence 
+- MomentumScaling          : insert momentum scaling into selectiton sequence
+- PayloadSelection         : Pseudo-selection that insert certain algoritm into data flow
 """
 # =============================================================================
 __author__  = 'Juan PALACIOS, Vanya BELYAEV'
@@ -71,6 +72,7 @@ __all__     = ( 'AutomaticData'                 ,
                 'TupleSelection'                ,
                 ##
                 'CheckPVSelection'              ,  
+                'PayloadSelection'              ,  
                 ## 
                 'MomentumScaling' 
                 )
diff --git a/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py b/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
index 9513187d6..1853fe7e5 100644
--- a/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
+++ b/PhysSel/PhysSelPython/python/PhysSelPython/Wrappers.py
@@ -16,13 +16,14 @@ are available:
    - PrintSelection     Specialization of PassThroughSelection to print the objects
    - CheckPVSelection   Specialization of PassThroughSelection to limit the selection to use CheckPV 
    - LimitSelection     Specialization of PassThroughSelection to limit the selection 
-   - MomentumScaling    ``pseudo-selection'' that applyes (globally) Momentum calibration
    - SimpleSelection    simple compact 1-step way to create the selection 
    - FilterSelection    Specialization of SimpleSelection for filtering using FilterDesktop 
    - CombineSelection      Specialization of SimpleSelection for CombineParticles algorithm
    - Combine3BodySelection Specialization of SimpleSelection for DaVinci::N3BodyDecays algorithm
    - Combine4BodySelection Specialization of SimpleSelection for DaVinci::N4BodyDecays algorithm
    - TupleSelection        Specialization of SimpleSelection for DecayTreeTuple algorithm
+   - PayloadSelection   Pseudo-selection that insert certain algoritm into data flow
+   - MomentumScaling    Pseudo-selection that applyes (globally) Momentum calibration
    """
 __author__ = "Juan PALACIOS juan.palacios@nikhef.nl"
 
@@ -49,9 +50,10 @@ __all__ = ( 'DataOnDemand'                  ,
             'Combine4BodySelection'         ,
             'TupleSelection'                ,
             ##
-            'CheckPVSelection'              ,  
+            'CheckPVSelection'              ,
+            'PayloadSelection'              ,
             ## 
-            'MomentumScaling'   ## ``pseudo-selection'' to aplly (globaly) momentum sclaing         
+            'MomentumScaling'   ## ``pseudo-selection'' to aplly (globaly) momentum scaling        
             )
 
 from copy import copy
@@ -77,8 +79,9 @@ from SelPy.selection import EventSelection as EvtSel
 from SelPy.selection import PassThroughSelection as PassThroughSel
 from SelPy.selection import AutomaticData as autodata
 
-from GaudiConfUtils import configurableExists, isConfigurable
-from GaudiConfUtils import ConfigurableGenerators
+from GaudiKernel.Configurable import Configurable
+from GaudiConfUtils           import configurableExists, isConfigurable
+from GaudiConfUtils           import ConfigurableGenerators
 import Configurables
 
 def checkName(name) :
@@ -566,7 +569,6 @@ def SimpleSelection (
         Extension          = extension             
         )
 
-
 # =========================================================================
 ## helper utility to create 'Print'-selection, useful for debugging
 #  Such object can be easily inserted into selection flow
@@ -621,7 +623,7 @@ def PrintSelection (
         RequiredSelection = input           ,
         InputDataSetter   = InputDataSetter )
 
-# ========================================================================#
+# =========================================================================
 ## special type of PassThroughSelection, that
 #  "limits" the size of selection
 #  @code
@@ -952,34 +954,42 @@ def Combine4BodySelection ( name  , inputs    ,
                              MotherCut         = MotherCut         , **kwargs )
 
 
-
-
 # =============================================================================
 ## Useful shortcut for "selection" bases on DecayTreeTuple 
 #  @code
-#  charm    = .... ## some selectiton object 
+#  charm    = .... ## some selection object 
 #  my_tuple = TupleSelection (
 #     'charm'            , ## unique name 
 #      [ charm ]         , ## required selections
 #      Decay             = '[ D+ -> ^K- ^pi+ ^pi+]CC' ,
+#      Branches          = { ... } , 
 #      ToolList          = [ ... ]      
 #      )
 #  # get the congigurable (for subsequent modification, if needed)
 #  algo = mu_tuple.algorithm()
-#  # e.g. define the branches: 
-#  algo.addBranches ( ... )
 #  # make use of nice decoration yb Rob Lambert 
 #  tool1 = algo.addTupleTool ( .....  )
 #  ...
-#  @endcode 
+#  @endcode
+#
+#  Special keyword arguments  <code>'MCTools'</code> and/or
+#  <code>'MCToolList'</code> are *NOT* delegated to DecayTreeTuple,
+#  but (if present) are converted to following equivalent code:
+#  @code
+#  from Configurables import TupleToolMCTruth 
+#  tool = algorithm.addTupleTool( TupleToolMCTruth )
+#  tool.ToolList = [ ... here is the list from MCTools/MCToolList ... ] 
+#  @endcode
+#
 #  @see SimpleSelection
 #  @see Selection
 #  @see SelPy.Selection
-#  @see DecayTreeTuple 
+#  @see DecayTreeTuple
+#  @see TupleToolMCTruth 
 #
 #  @param name              unique selection name 
 #  @param inputs            list of input/required selection
-#  @param Decay              'Decay'-property of DecayTreeTuple 
+#  @param Decay             'Decay'-property of DecayTreeTuple 
 #  @param kwargs          additional arguments to be used for algorithm
 #  @return the selection object
 #
@@ -989,32 +999,117 @@ def TupleSelection ( name     ,
                      inputs   ,
                      Decay    , 
                      **kwargs ) :
-    """ Useful shortcut for selection with  
-    >>> charm    = .... ## some selectiton object 
+    """ Useful shortcut for selection with DecayTreeTuple as algorithm 
+    >>> charm    = .... ## some selection object 
     >>> my_tuple = TupleSelection (
     ...            'charm'          , ## unique name 
     ...           [ charm ]         , ## required selections
     ...             Decay             = '[ D+ -> ^K- ^pi+ ^pi+]CC' ,
+    ...             Branches          = {} , 
     ...             ToolList          = [ ... ]      
     ...             )
     >>> algo = mu_tuple.algorithm()
-    >>> algo.addBranches ( ... )
-    ##  make use of nice decoration yb Rob Lambert 
+    ##  make use of nice decoration by Rob Lambert 
     >>> tool1 = algo.addTupleTool ( .....  )
+    Special keyword arguments 'MCTools' and/or
+    'MCToolList' are *NOT* delegated to DecayTreeTuple,
+    but (if present) are converted to following equivalent code:
+    >>> from Configurables import TupleToolMCTruth 
+    >>> tool = algorithm.addTupleTool( TupleToolMCTruth )
+    >>> tool.ToolList = [ ... here is the list from MCTools/MCToolList ... ] 
     """
     #
     from   GaudiConfUtils.ConfigurableGenerators import DecayTreeTuple as _TUPLE_
     ## make use of nice decoration by Rob Lambert:
-    import DecayTreeTuple.Configuration 
+    import DecayTreeTuple.Configuration
+    ##
+    mc_tools = kwargs.pop ( 'MCTools'    , []      )
+    mc_tools = kwargs.pop ( 'MCToolList' , mc_tools )
+    # 
     ## create the selection    
-    return SimpleSelection ( name          ,
-                             _TUPLE_       ,
-                             inputs        ,
-                             Decay = Decay ,
-                             **kwargs      ) 
+    selection = SimpleSelection ( name          ,
+                                  _TUPLE_       ,
+                                  inputs        ,
+                                  Decay = Decay ,
+                                  **kwargs      )
+    
+    if mc_tools :
+        algorithm = selection.algorithm()
+        from Configurables import TupleToolMCTruth 
+        tt_mct          = algorithm.addTupleTool ( TupleToolMCTruth )
+        tt_mct.ToolList = mc_tools 
+
+    return selection 
+
 
+# =============================================================================
+## @class PayloadSelection
+#  Pseudo-selection that allows to "attach" sme useful payload (e.g. momentum scaling,
+#  mc-link resurrection, or simple "Hello,world!"  to selection sequence
+#  @code
+#  selection = ....  ## some selection
+#  algorthm  = ...   ## some algorithm ("ready-to-use" Configurable) 
+#  selection = PayloadSelection ( selection , algorithm )
+#  @endcode
+#  Few examples: 
+#  @code 
+#  from Configurable import LoKi__HelloWorld as HELLO 
+#  selection = PayloadSelection ( selection , HELLO('Hello') )  
+#  @endcode
+#  If decision from Payload algorithm should not be ignored, use switch 'IgnoreDecision = False'
+#  
+#  @attention "algorithm" is "ready-to-use" configurable here, not a generator
+#  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+#  @date 2016-02-25
+class PayloadSelection(UniquelyNamedObject ,
+                       ClonableObject      ,
+                       SelectionBase       ) :
+    """  Pseudo-selection that allows to embedd the momentum
+    scaling algorithm into the overall flow
+    
+    >>> selection = ...  ## some selection
+    >>> algorithm = ...  ## some algorithm (ready-to-use Configurable) 
+    >>> selection = PayloadSelection ( selection , algorithm )
+    ## one more payload: 
+    >>> from Configurable import LoKi__HelloWorld as HELLO
+    >>> selection = PayloadSelection ( selection , HELLO('Hello') )  
+    Attention: ``algorithm'' is ``ready-to-use'' Configurable here, not a generator
+    If decision from Payload algorithm should not be ignored, use switch 'IgnoreDecision = False'
+    """
+    def __init__( self                           ,
+                  RequiredSelection              , 
+                  What                           ,
+                  IgnoreDecision = True         ,
+                  NameFormat     = '%s_PAYLOAD' ) :  
 
+        ## construct more or less unique name 
+        try : 
+            name = NameFormat 
+            name = name % RequiredSelection.name()
+        except:
+            name = '%s_PAYLOAD'
+            name = name % RequiredSelection.name()
+            
+        UniquelyNamedObject . __init__( self , name     )
+        ClonableObject      . __init__( self , locals() )
+        
+        checkName(self.name())
+        
+        if IgnoreDecision : 
+            from Configurables import GaudiSequencer as SEQUENCER 
+            alg = SEQUENCER ( "PAYLOAD:%s_with_%s" % (  RequiredSelection.name() , What.name() ) , 
+                              Members            = [ What ]        ,
+                              ShortCircuit       = False           ,
+                              IgnoreFilterPassed = True            )
+        else :
+            alg = What 
+        
+        SelectionBase.__init__( self                     ,
+                                algorithm          = alg ,
+                                outputLocation     = RequiredSelection.outputLocation(),
+                                requiredSelections = [RequiredSelection] )
 
+ 
 # =============================================================================
 ## @class MomentumScaling
 #  Pseudo-selection that allows to embedd the momentum
@@ -1027,10 +1122,8 @@ def TupleSelection ( name     ,
 #  @attention it applies GLOBAL momentum scaling for *all* tracks!
 #  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
 #  @date 2016-02-25
-class MomentumScaling(UniquelyNamedObject ,
-                      ClonableObject      ,
-                      SelectionBase       ) :
-    """  Pseudo-selection that allows to embedd the momentum
+class MomentumScaling(PayloadSelection) :
+    """Pseudo-selection that allows to embedd the momentum
     scaling algorithm into the overall flow
     
     >>> selection = ....  ## some selection
@@ -1039,23 +1132,15 @@ class MomentumScaling(UniquelyNamedObject ,
     """
     def __init__(self              ,
                  RequiredSelection ) :
-
-        ## construct more or less unique name 
-        name = '%s_SCALE'
-        name = name % RequiredSelection.name()
-        
-        UniquelyNamedObject . __init__( self , name     )
-        ClonableObject      . __init__( self , locals() )
         
-        checkName(self.name())
-
         from Configurables import TrackScaleState as _SCALER         
-        _alg = _SCALER('SCALER')   ## NB: THE NAME is fixed, is COMMON INSTANCE
+        scaler = SCALER('SCALER')   ## NB: THE NAME is fixed, is COMMON INSTANCE
         
-        SelectionBase.__init__( self                      ,
-                                algorithm          = _alg ,
-                                outputLocation     = RequiredSelection.outputLocation(),
-                                requiredSelections = [RequiredSelection] )
+        PayloadSelection.__init__ ( self                         ,
+                                    RequiredSelection            ,
+                                    scaler                       ,
+                                    IgnoreDecision = False       , 
+                                    NameFormat     = '%s_SCALER' ) 
         
 # =============================================================================
 # The END 
-- 
GitLab


From 82026730e29b81969b2d5e9a2c9e7891038c939c Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Fri, 21 Oct 2016 12:47:52 +0200
Subject: [PATCH 12/18] ! 2016-10-21 - Vanya Belyaev  - Wrappers.py    1. add
 new PayloadSelection: "pseudo-selection" where       some "extra" payload
 algorithm is embedded into the flow.       (with possible ignoring of
 algorithm decision)    2. reimplement MomentumScaling in terms of
 PayloadSelection

---
 PhysSel/PhysSelPython/doc/release.notes | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PhysSel/PhysSelPython/doc/release.notes b/PhysSel/PhysSelPython/doc/release.notes
index eecfde6b3..766add669 100644
--- a/PhysSel/PhysSelPython/doc/release.notes
+++ b/PhysSel/PhysSelPython/doc/release.notes
@@ -10,7 +10,7 @@
    1. add new PayloadSelection: "pseudo-selection" where 
       some "extra" payload algorithm is embedded into the flow.
       (with possible ignoring of algorithm decision) 
-   2. reimlement MomentumScaling in terms of PayloadSelection
+   2. reimplement MomentumScaling in terms of PayloadSelection
 
 ! 2016-10-20 - Vanya Belyaev
  - Wrappers.py
-- 
GitLab


From bbe7b2c9be03cfe76a221b7e3c4ef1afc144ead1 Mon Sep 17 00:00:00 2001
From: Eduardo Rodrigues <eduardo.rodrigues@cern.ch>
Date: Sat, 22 Oct 2016 23:57:08 +0200
Subject: [PATCH 13/18] Obsolete algo RemoveDuplicates removed.

---
 .../src/RemoveDuplicates.cpp                  | 106 ------------------
 .../src/RemoveDuplicates.h                    |  45 --------
 2 files changed, 151 deletions(-)
 delete mode 100644 Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.cpp
 delete mode 100644 Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.h

diff --git a/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.cpp b/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.cpp
deleted file mode 100644
index 135ccaee6..000000000
--- a/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// $Id: RemoveDuplicates.cpp,v 1.1 2012-10-11 11:56:34 elsasser Exp $
-
-// local
-#include "RemoveDuplicates.h"
-
-//-----------------------------------------------------------------------------
-/// Implementation file for class : RemoveClones
-/**
- * 2011-10-11 : Christian Elsasser
- */
-//-----------------------------------------------------------------------------
-
-// Declaration of the Algorithm Factory
-DECLARE_ALGORITHM_FACTORY( RemoveDuplicates )
-
-//=============================================================================
-// Standard constructor, initializes variables
-//=============================================================================
-RemoveDuplicates::RemoveDuplicates( const std::string& name,
-                                    ISvcLocator* pSvcLocator)
-: DaVinciAlgorithm ( name , pSvcLocator )
-  , m_NpartIn(0)
-  , m_NpartOut(0)
-{
-}
-
-//=============================================================================
-// Destructor
-//=============================================================================
-RemoveDuplicates::~RemoveDuplicates() {}
-
-//#############################################################################
-// Execution
-//#############################################################################
-StatusCode RemoveDuplicates::execute() {
-
-  StatusCode sc=StatusCode::SUCCESS;
-
-  if (msgLevel(MSG::DEBUG)) debug() << "==> Execute" << endmsg;
-  ++counter("Event");
-  const LHCb::Particle::ConstVector mothers( this->particles().begin(),
-                                             this->particles().end()   );
-  if ( mothers.empty() )
-  {
-    setFilterPassed(false);
-    return StatusCode::SUCCESS;
-  }
-  if (msgLevel(MSG::VERBOSE)) verbose() << "I have " << mothers.size()
-                                        << " particles to handle" << endmsg;
-
-  if(!sc) return sc;
-  unsigned int NpartIn=0;
-  unsigned int NpartOut=0;
-
-  for(LHCb::Particle::ConstVector::const_iterator i=mothers.begin(); i<mothers.end(); ++i )
-  {
-    NpartIn++;
-    bool toBeRemoved = false;
-    for (LHCb::Particle::ConstVector::const_iterator j=i+1; j<mothers.end();++j )
-    {
-      const size_t hash1 = LHCb::HashIDs::hashID(*i);
-      const size_t hash2 = LHCb::HashIDs::hashID(*j);
-      if (msgLevel(MSG::VERBOSE)){
-        verbose() << "Particle 1 ID hash: " << hash1 << endmsg;
-        verbose() << "Particle 2 ID hash: " << hash2 << endmsg;
-      }
-      if(hash1==hash2 && i!=j){
-        if (msgLevel(MSG::VERBOSE)){
-          verbose() << "Particle have the same hash of ID! Remove first one from the list!" << endmsg;
-        }
-        toBeRemoved = true;
-      }else{
-        if (msgLevel(MSG::VERBOSE)){
-          verbose() << "Particles do not have the same hash of ID! Still checking with others!" << endmsg;
-        }
-      }
-    }
-    if(!toBeRemoved)
-    {
-      this->cloneAndMarkTree(*i);
-      ++NpartOut;
-      if (msgLevel(MSG::VERBOSE)){
-        verbose() << "Particle has no later duplicate --> Staying in TES!" << endmsg;
-      }
-    }
-  }
-
-  m_NpartIn  += NpartIn;
-  m_NpartOut += NpartOut;
-
-  setFilterPassed(NpartOut>0);
-  return sc;
-
-}
-
-//#############################################################################
-// Finalization
-//#############################################################################
-StatusCode RemoveDuplicates::finalize()
-{
-  if (msgLevel(MSG::DEBUG)) debug() << "==> Finalize" << endmsg;
-  info() << "Filtered " << m_NpartIn << " to " << m_NpartOut
-         << ", removing " << m_NpartIn-m_NpartOut << " duplicates" << endmsg ;
-
-  return DaVinciAlgorithm::finalize() ;
-}
diff --git a/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.h b/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.h
deleted file mode 100644
index e84023b71..000000000
--- a/Phys/DaVinciOverlapsAndClones/src/RemoveDuplicates.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// $Id: RemoveDuplicates.h,v 1.1 2012-10-11 11:56:34 elsasser Exp $
-#ifndef REMOVEDUPLICATES_H
-#define REMOVEDUPLICATES_H 1
-
-#include "Kernel/DaVinciAlgorithm.h"
-
-#include <algorithm>
-
-#include "Kernel/LHCbID.h"
-#include "Kernel/HashIDs.h"
-
-/** @class RemoveDuplicates RemoveDuplicates.h
- *
- *  Filter the local storage to remove all duplicated candidates
- *
- * RemoveDuplicates is a useful tool to be called on stripped candidates.
- * The Tool removes duplicates (built from the same final state particles)
- * within stripped candidates based on LHCb-ID hash.
- * If the candidates have the same hash only one is kept.
- * Output container for further processing is Phys/<toolname>/Particles
- *
- *  @author Christian U. Elsasser
- *  @date   2012-10-11
- */
-class RemoveDuplicates : public DaVinciAlgorithm
-{
-
-public:
-
-  /// Standard constructor
-  RemoveDuplicates( const std::string& name, ISvcLocator* pSvcLocator );
-
-  virtual ~RemoveDuplicates( ); ///< Destructor
-
-  virtual StatusCode execute   ();    ///< Algorithm execution
-  virtual StatusCode finalize  ();    ///< Algorithm finalization
-
-private:
-
-  unsigned int m_NpartIn;  ///<number of particles so far sent to the alg
-  unsigned int m_NpartOut; ///<number of unique particles so far written out by the alg
-
-};
-
-#endif // REMOVEDUPLICATES_H
-- 
GitLab


From 8959f53e5e2b54e19417ab30f19b3df3920c57c5 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Mon, 24 Oct 2016 00:38:19 +0200
Subject: [PATCH 14/18] add a LoKiTracks.decorators module for backwards
 compatibility...

---
 Phys/LoKiTracks/python/LoKiTracks/decorators.py | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 Phys/LoKiTracks/python/LoKiTracks/decorators.py

diff --git a/Phys/LoKiTracks/python/LoKiTracks/decorators.py b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
new file mode 100644
index 000000000..e4fbd3705
--- /dev/null
+++ b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+# for backwards compatibility...
+print "For backwards compatibility only -- please use LoKiTrack.decorators instead...!"
+from LoKiTrack.functions  import *
+from LoKiTrack.decorators import *
-- 
GitLab


From 6d23a7f039243ed3a60067d6d30b75797c5a4b80 Mon Sep 17 00:00:00 2001
From: Gerhard Raven <gerhard.raven@nikhef.nl>
Date: Mon, 24 Oct 2016 09:36:31 +0200
Subject: [PATCH 15/18] use warings.warn instead of print

---
 Phys/LoKiTracks/python/LoKiTracks/decorators.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Phys/LoKiTracks/python/LoKiTracks/decorators.py b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
index e4fbd3705..2f5550a40 100644
--- a/Phys/LoKiTracks/python/LoKiTracks/decorators.py
+++ b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 # for backwards compatibility...
-print "For backwards compatibility only -- please use LoKiTrack.decorators instead...!"
+from warnings import warn
+warn("For backwards compatibility only -- please use LoKiTrack.decorators instead of LoKiTracks.decorators",UserWarning,stacklevel=3)
 from LoKiTrack.functions  import *
 from LoKiTrack.decorators import *
-- 
GitLab


From 60783c1c1bf9339f8433a808475699b387a6a69e Mon Sep 17 00:00:00 2001
From: Andrea Contu <acontu@lxplus055.cern.ch>
Date: Mon, 24 Oct 2016 10:00:39 +0200
Subject: [PATCH 16/18] Added variable for new isolation tool

---
 Phys/DaVinciTypes/Kernel/RelatedInfoNamed.h | 22 +++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/Phys/DaVinciTypes/Kernel/RelatedInfoNamed.h b/Phys/DaVinciTypes/Kernel/RelatedInfoNamed.h
index 824c7a274..bb765a388 100644
--- a/Phys/DaVinciTypes/Kernel/RelatedInfoNamed.h
+++ b/Phys/DaVinciTypes/Kernel/RelatedInfoNamed.h
@@ -360,9 +360,18 @@ class RelatedInfoNamed : public LHCb::RelatedInfoMap {
 
       // muon chi2 with correlation
       MUONCORRCHI2PERDOF = ISOMUM5 +1,
-
+      
+      // velo track match
+      VTM_R = MUONCORRCHI2PERDOF+1,
+      VTM_NTRACKS = MUONCORRCHI2PERDOF+2,
+      VTM_TX = MUONCORRCHI2PERDOF+3,
+      VTM_TY = MUONCORRCHI2PERDOF+4,
+      VTM_TPX = MUONCORRCHI2PERDOF+5,
+      VTM_TPY = MUONCORRCHI2PERDOF+6,
+      VTM_TPZ = MUONCORRCHI2PERDOF+7,
+      VTM_IP = MUONCORRCHI2PERDOF+8,
       // END must be the highest enum+1
-      END = MUONCORRCHI2PERDOF+1
+      END = VTM_IP+1
 
     };
 
@@ -690,6 +699,15 @@ class RelatedInfoNamed : public LHCb::RelatedInfoMap {
       case RelatedInfoNamed::ISOMUM5     : return "ISOMUM5";
         
       case RelatedInfoNamed::MUONCORRCHI2PERDOF : return "MUONCORRCHI2PERDOF";
+      
+      case RelatedInfoNamed::VTM_R : return "VTM_R";
+      case RelatedInfoNamed::VTM_NTRACKS : return "VTM_NTRACKS";
+      case RelatedInfoNamed::VTM_TX : return "VTM_TX";
+      case RelatedInfoNamed::VTM_TY : return "VTM_TY";
+      case RelatedInfoNamed::VTM_TPX : return "VTM_TPX";
+      case RelatedInfoNamed::VTM_TPY : return "VTM_TPY";
+      case RelatedInfoNamed::VTM_TPZ : return "VTM_TPZ";
+      case RelatedInfoNamed::VTM_IP : return "VTM_IP";
         
       default : return "UNKNOWN"; 
       }
-- 
GitLab


From 887234088334beb60ed0cc55fd0780d8cb8ebb6c Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Tue, 25 Oct 2016 09:25:20 +0200
Subject: [PATCH 17/18] LoKiTrakcs: fix broken package

---
 Phys/LoKiTracks/CMakeLists.txt                |  7 +++
 Phys/LoKiTracks/dict/LoKiTracks.xml           | 17 ++++++
 Phys/LoKiTracks/dict/LoKiTracksDict.h         | 12 ++++
 Phys/LoKiTracks/doc/release.notes             |  3 +
 .../python/LoKiTracks/decorators.py           | 60 +++++++++++++++++--
 .../LoKiTracks/python/LoKiTracks/functions.py |  7 +++
 6 files changed, 101 insertions(+), 5 deletions(-)
 create mode 100644 Phys/LoKiTracks/dict/LoKiTracks.xml
 create mode 100644 Phys/LoKiTracks/dict/LoKiTracksDict.h

diff --git a/Phys/LoKiTracks/CMakeLists.txt b/Phys/LoKiTracks/CMakeLists.txt
index 109161b40..a73b10b9a 100644
--- a/Phys/LoKiTracks/CMakeLists.txt
+++ b/Phys/LoKiTracks/CMakeLists.txt
@@ -10,6 +10,13 @@ gaudi_depends_on_subdirs(Event/TrackEvent
                          Phys/LoKiUtils
                          Tr/TrackInterfaces)
 
+gaudi_add_dictionary(LoKiTracks
+                     dict/LoKiTracksDict.h
+                     dict/LoKiTracks.xml
+                     INCLUDE_DIRS Tr/TrackInterfaces Rec/LoKiTrack
+                     LINK_LIBRARIES TrackEvent LoKiCoreLib LoKiTrackLib LoKiTracksLib
+                     OPTIONS " -U__MINGW32__ ")
+
 gaudi_add_library(LoKiTracksLib
                   src/*.cpp
                   PUBLIC_HEADERS LoKi
diff --git a/Phys/LoKiTracks/dict/LoKiTracks.xml b/Phys/LoKiTracks/dict/LoKiTracks.xml
new file mode 100644
index 000000000..a90ff08ee
--- /dev/null
+++ b/Phys/LoKiTracks/dict/LoKiTracks.xml
@@ -0,0 +1,17 @@
+<!-- 
+     * ========================================================================
+     * @file
+     *
+     * The seleciton file to build Reflex dictionaries for Rec/LoKiTrack package
+     *
+     * @author Vanya BELYAEV ibelyaev@physics.syr.edu
+     * @date 2006-02-06
+     *
+     * ========================================================================
+-->
+
+<lcgdict>
+  
+  <class pattern   = "LoKi::Tracks::*"                      />
+  
+</lcgdict>
diff --git a/Phys/LoKiTracks/dict/LoKiTracksDict.h b/Phys/LoKiTracks/dict/LoKiTracksDict.h
new file mode 100644
index 000000000..9f2a2d7c7
--- /dev/null
+++ b/Phys/LoKiTracks/dict/LoKiTracksDict.h
@@ -0,0 +1,12 @@
+// ============================================================================
+#ifndef LOKI_LOKITRACKS1DICT_H 
+#define LOKI_LOKITRACKS1DICT_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+#include "LoKi/Tracks.h"
+// ============================================================================
+//                                                                      The END 
+// ============================================================================
+#endif // LOKI_LOKITRACK1SDICT_H
+// ============================================================================
diff --git a/Phys/LoKiTracks/doc/release.notes b/Phys/LoKiTracks/doc/release.notes
index d54e6c7c3..bc376dc49 100644
--- a/Phys/LoKiTracks/doc/release.notes
+++ b/Phys/LoKiTracks/doc/release.notes
@@ -5,6 +5,9 @@
 ! Purpose     : track-related functors for LoKi-framework
 ! -----------------------------------------------------------------------------
 
+! 2016-10-25 - Vanya Belyaev
+ - fix the broker package 
+
 !========================= LoKiTracks v3r8 2016-05-19 =========================
 
 ! 2016-04-27 - Vanya Belyaev
diff --git a/Phys/LoKiTracks/python/LoKiTracks/decorators.py b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
index 2f5550a40..06ab336dc 100644
--- a/Phys/LoKiTracks/python/LoKiTracks/decorators.py
+++ b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
@@ -1,7 +1,57 @@
 #!/usr/bin/env python
+# =============================================================================
+## @file
+#  The set of basic objects from LoKiTrack library
+#
+#        This file is a part of LoKi project - 
+#    "C++ ToolKit  for Smart and Friendly Physics Analysis"
+#
+#  The package has been designed with the kind help from
+#  Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+#  contributions and advices from G.Raven, J.van Tilburg,
+#  A.Golutvin, P.Koppenburg have been used in the design.
+#
+#  @author Vanya BELYAEV ibelyaev@itep.ru
+#  @date 2007-06-09
+# =============================================================================
+"""
+The set of basic objects from LoKiTrack library
 
-# for backwards compatibility...
-from warnings import warn
-warn("For backwards compatibility only -- please use LoKiTrack.decorators instead of LoKiTracks.decorators",UserWarning,stacklevel=3)
-from LoKiTrack.functions  import *
-from LoKiTrack.decorators import *
+      This file is a part of LoKi project - 
+``C++ ToolKit  for Smart and Friendly Physics Analysis''
+
+The package has been designed with the kind help from
+Galina PAKHLOVA and Sergey BARSUK.  Many bright ideas, 
+contributions and advices from G.Raven, J.van Tilburg, 
+A.Golutvin, P.Koppenburg have been used in the design.
+"""
+# =============================================================================
+__author__  = "Vanya BELYAEV  Ivan.Belyaev@itep.ru "
+__date__    = "2010-07-17"
+__version__ = "CVS tag $Name:$, version $Revision$ "
+# =============================================================================
+
+from LoKiTracks.functions import *
+from LoKiTrack.decorators import _decorate
+
+
+_decorated = _decorate( __name__ )
+
+
+from LoKiTracks.decorators import *
+
+# =============================================================================
+if '__main__' == __name__ :
+    
+    print '*'*120
+    print                      __doc__
+    print ' Author  : %s ' %   __author__    
+    print ' Version : %s ' %   __version__
+    print ' Date    : %s ' %   __date__
+    print ' Number of properly decorated types: %s'%len(_decorated)
+    print '*'*120
+    
+
+# =============================================================================
+# The END 
+# =============================================================================
diff --git a/Phys/LoKiTracks/python/LoKiTracks/functions.py b/Phys/LoKiTracks/python/LoKiTracks/functions.py
index c124052bf..fefab164b 100644
--- a/Phys/LoKiTracks/python/LoKiTracks/functions.py
+++ b/Phys/LoKiTracks/python/LoKiTracks/functions.py
@@ -41,4 +41,11 @@ LHCb     = cpp.LHCb
 ## @see LoKi::Tracks::FastDOCAToBeamLine
 Tr_FASTDOCATOBEAMLINE = LoKi.Tracks.FastDOCAToBeamLine
 
+## @see LoKi::Tracks::TrFILTER
+TrFILTER  = LoKi.Tracks.Filter
+## @see LoKi::Tracks::Tr_FILTER
+Tr_FILTER = LoKi.Tracks.Filter
 
+# =============================================================================
+# The END 
+# =============================================================================
-- 
GitLab


From 7353cdeec23f48a194933b9871d574139d4f8aa2 Mon Sep 17 00:00:00 2001
From: ibelyaev <Ivan.Belyaev@cern.ch>
Date: Thu, 27 Oct 2016 08:47:10 +0200
Subject: [PATCH 18/18] LoKiTrack/decorators.py: fix a sad typo

---
 Phys/LoKiTracks/python/LoKiTracks/decorators.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/LoKiTracks/python/LoKiTracks/decorators.py b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
index 06ab336dc..8057f619d 100644
--- a/Phys/LoKiTracks/python/LoKiTracks/decorators.py
+++ b/Phys/LoKiTracks/python/LoKiTracks/decorators.py
@@ -38,7 +38,7 @@ from LoKiTrack.decorators import _decorate
 _decorated = _decorate( __name__ )
 
 
-from LoKiTracks.decorators import *
+from LoKiTrack.decorators import *
 
 # =============================================================================
 if '__main__' == __name__ :
-- 
GitLab