diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IPadTriggerLogicTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IPadTriggerLogicTool.h
index 7d16bbe769e8c642683f2b78ff66a91cba06aa57..bd7b57013fcea6edaa33f8c9052507325de830b8 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IPadTriggerLogicTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IPadTriggerLogicTool.h
@@ -1,7 +1,7 @@
 //  -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef NSWL1_IPADTDSTOOL_H
@@ -29,9 +29,6 @@ namespace NSWL1 {
     Note to self: Sandro's original design was to have an interface and
     then an "Offline" and an "Online" tool. I don't know whether this
     is still what we want...to be discussed.
-
-    davide.gerbaudo@gmail.com
-    Oct 2015
     */
 
     class IPadTriggerLogicTool: public virtual IAlgTool {
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripClusterTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripClusterTool.h
index 716781603153aed2df98b5c3cbc9b114fb25ffff..9ef4a7e6785f6bbe665384410fb4aedf48df3a5d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripClusterTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripClusterTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ISTRIPCLUSTERTOOL_H
@@ -8,7 +8,7 @@
 //basic includes
 #include "GaudiKernel/IAlgTool.h"
 //local includes
-#include "TriggerTypes.h"
+#include "TrigT1NSWSimTools/TriggerTypes.h"
 #include "TrigT1NSWSimTools/StripData.h"
 #include "TrigT1NSWSimTools/StripClusterData.h"
 #include <vector>
@@ -26,7 +26,6 @@ namespace NSWL1 {
    * This class implements the public interface of the Strip clustering Tools.
    * It Current unclear what it will output to input the StripTrigger simulation.
    *
-   *  @author Jacob Searcy <jsearcy@umich.edu>
    *
    *
    */
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripSegmentTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripSegmentTool.h
index c056f23e682dde4db96acd01bdb36da2f14edaea..e070a1611fa04df459551f2f9e5c985662462262 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripSegmentTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripSegmentTool.h
@@ -22,7 +22,6 @@ namespace NSWL1 {
    * This class implements the public interface of the Strip Segmentfinding tool Tools.
    * It Current unclear what it will output to input the StripTrigger simulation.
    *
-   *  @author Jacob Searcy <jsearcy@umich.edu>
    *
    *
    */
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripTdsTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripTdsTool.h
index 240bc946ac628704f15184d31b1dcff399e23469..905d0e7f6fed69851e8fe5e8985a50bf821f4b56 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripTdsTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IStripTdsTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef ISTRIPTDSTOOL_H
@@ -22,7 +22,6 @@ class StripOfflineData;
    * This class implements the public interface of the TDS Tools.
    * It returns a vector of StripData to input the StripTrigger simulation.
    *
-   *  @author Jacob Searcy <jsearcy@umich.edu>
    *
    *
    */
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h
index 3d9a180aa221012b9ffdde333ceb9b77f79a9791..83f6a80f8221a79da4e761a7d8c7ae598dd5b293 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef NSW_L1TDRSTGCTRIGGERLOGIC_H
@@ -10,11 +10,14 @@
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 #include "TrigT1NSWSimTools/SectorTriggerCandidate.h"
 #include "TrigT1NSWSimTools/SingleWedgePadTrigger.h"
-#include "GaudiKernel/MsgStream.h"
-#include "TRandom.h"
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "AthenaKernel/MsgStreamMember.h"
 #include <string>
 #include <vector>
+#include "TRandom.h"
 
+//forward declarations
+class MsgStream;
 
 namespace NSWL1 {
     
@@ -39,14 +42,13 @@ namespace NSWL1 {
  
   Based on the original implementation by Shikma, sTGCTriggerLogic.
  
-  davide.gerbaudo@gmail.com
   April 2013
 */
 class L1TdrStgcTriggerLogic {
 
     public:
         
-        L1TdrStgcTriggerLogic(IMessageSvc* svc , std::string);//get svc from parent class / messaging level is set automatically/ via setMsgLvl
+        L1TdrStgcTriggerLogic();//get svc from parent class
         virtual ~L1TdrStgcTriggerLogic();
         /**
         @brief main function to compute trigger candidates
@@ -101,15 +103,22 @@ class L1TdrStgcTriggerLogic {
                                                             const std::vector< size_t > &padIndicesLayer1,
                                                             const std::vector< size_t > &padIndicesLayer2,
                                                             const std::vector< size_t > &padIndicesLayer3);
-        MsgStream& msgStream(){return m_msg;}
+
+    protected:
+        /// Log a message using the Athena controlled logging system
+        MsgStream& msg(MSG::Level lvl) const { return m_msg.get() << lvl; }
+   
+        /// Check whether the logging system is active at the provided verbosity level
+        bool msgLvl(MSG::Level lvl) { return m_msg.get().level() <= lvl; }
+   
+        /// Private message stream member
+        mutable Athena::MsgStreamMember m_msg;
         
     private:
-        TRandom rand;
+        TRandom m_rand;
         std::vector< SectorTriggerCandidate > m_secTrigCand;        
         bool m_writePickle; /// after computing the triggers, write the canditates to 'pickle' files (for event display)
         std::string m_picklePrefix; /// path where the pickle files will be written
-        int m_msglvl;        
-        mutable MsgStream m_msg;
         
     };
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMFPGAOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMFPGAOfflineTool.h
index bbb6cc8f6716c5a59e0a2a95d0c59b10ca3ad46d..e268a342612ed455911f8916fda00a40fc9b9eb3 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMFPGAOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMFPGAOfflineTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MMFPGAOFFLINETOOL_H
@@ -18,13 +18,8 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
 class TTree;
 
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
 
@@ -82,8 +77,6 @@ namespace NSWL1 {
 
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-    ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-    CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
 
     // hidden variables
     std::vector< std::vector<MMCandidateData*> > 
@@ -92,12 +85,8 @@ namespace NSWL1 {
     int     m_mmcandidate_cache_eventNumber;                //!< event number associated to the current MM Strip cache
     cStatus m_mmcandidate_cache_status[32];                 //!< status of the current cache
 
-    
-
-    // properties: container and service names
-    StringProperty   m_rndmEngineName;                      //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    BooleanProperty  m_doNtuple;                            //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-
+    //properties
+    BooleanProperty  m_doNtuple;
 
     // analysis ntuple
     TTree* m_tree;                                          //!< ntuple for analysis
@@ -105,6 +94,7 @@ namespace NSWL1 {
     // analysis variable to be put into the ntuple
     int  m_nMMCandidates;                                   //!< number of Candidates delivered
 
+
   };  // end of MMFPGAOfflineTool class
 
 } // namespace NSWL1
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripOfflineData.h
index 0971b86bb99800e8eaea4a974e5c90bc4b3d4aae..91e256a2077581b821811b93c337ae830454d273 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripOfflineData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MMSTRIPOFFLINEDATA_H
@@ -12,10 +12,6 @@
 // local includes
 #include "TrigT1NSWSimTools/MMStripData.h" 
 
-// forward declarations
-class TVector3;
-
-
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
 
@@ -45,7 +41,6 @@ namespace NSWL1 {
     MMStripOfflineData(Identifier id, const MmIdHelper* helper);
     ~MMStripOfflineData();
 
-    //void setStripCharge(float charge);   //!< set the strip charge
     void setTrigBCID(int bcid);          //!< set the trig BCID        
 
     //! methods for retrieving the bare data
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripTdsOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripTdsOfflineTool.h
index e1ce1230063daa7bfa04541ce0fbb9ad599a8f5b..c5b35855516323d41df3bcf28b4269b832abae43 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripTdsOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMStripTdsOfflineTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MMSTRIPTDSOFFLINETOOL_H
@@ -18,57 +18,21 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
-class MmIdHelper;
-class MmDigit;
-class TTree;
 
 //MMT_Loader includes
 
 //C++ language libararies
-#include <dirent.h>
 #include <map>
 #include <vector>
 #include <string>
-#include <fstream>
-#include <cmath>
-#include <cstdlib>
-#include <cstdio>
-#include <iostream>
 
 //ROOT libraries
-#include "TMultiGraph.h"
-#include "TCanvas.h"
-#include "TColor.h"
-#include "TGraphErrors.h"
-#include "TLatex.h"
-#include "TStyle.h"
-#include "TH2D.h"
-#include "Rtypes.h"
 #include "TTree.h"
-#include "TFile.h"
-#include "TObject.h"
-#include "TROOT.h"
-#include "TH1F.h"
-#include "TRandom3.h"
-#include "TF1.h"
-#include "TLorentzVector.h"
+
+//local includes
 #include "MMT_struct.h" 
 #include "MMT_Finder.h" 
 #include "MMT_Fitter.h" 
-//#include "/afs/cern.ch/user/m/mkhader/mm_trig/MM_Trigger/plots/mmt_plot/atlasstyle-00-03-05/AtlasStyle.h"
-
-
-
-
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
-namespace MuonGM {
-  class MuonDetectorManager;
-}
-
 
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
@@ -106,37 +70,25 @@ namespace NSWL1 {
     //MMTrigger stuff
     int eta_bin(double theta) const;
     string eta_str(int eta) const;
-    int n_etabins;
-    int correct_bcid;
+    int m_n_etabins;
     vector<double> m_etabins;
-    double etalo,etahi;
-    
-    string nom;
+    double m_etalo,m_etahi;
 
     //MMT_Loader stuff
     //debug stuff
-    vector<vector<vector<double> > >strip_poss,yvals;
-    map<int,double> strip500;
-    map<int,int> zplanes;
-    vector<TH1D*> m_diff_xuv;
     MMT_Parameters *m_par;
-    //MMT_Finder m_find;
 
     //load event stuff
     vector<hitData_entry> event_hitDatas(int find_event) const;
     vector<hitData_key> event_hitData_keys(int find_event) const;
 
-    map<int,evFit_entry> Event_Fit;//key is event no.
-    map<int,evInf_entry> Event_Info;//key is event no.
-    map<int,evAna_entry> Event_Analysis;//key is event no.
-    map<hitData_key,hitData_entry> Hits_Data_Set_Time;//key is hit_index? <BC_time,time>?
+    map<hitData_key,hitData_entry> m_Hits_Data_Set_Time;//key is hit_index? <BC_time,time>?
 
     //VMM info
-    vector<vector<bool> > VMM_chip_status;
-    vector<vector<int> > VMM__chip_last_hit_time;
+    vector<vector<bool> > m_VMM_chip_status;
+    vector<vector<int> > m_VMM__chip_last_hit_time;
     bool Mimic_VMM_Chip_Deadtime(hitData_entry& candy);
-    double VMM_deadtime;
-    int num_VMM_per_plane;
+    double m_VMM_deadtime;
 
     //Import_Athena..._.m stuff
     double phi_shift(double athena_phi) const;
@@ -145,20 +97,10 @@ namespace NSWL1 {
     int Get_Strip_ID(double X,double Y,int plane) const;
 
     //x <---> u/v switches
-    bool uvxxmod;
     void xxuv_to_uvxx(TVector3& hit,int plane)const;
     void hit_rot_stereo_fwd(TVector3& hit)const;//x to v, u to x
     void hit_rot_stereo_bck(TVector3& hit)const;//x to u, v to x
 
-    //Hist stuff
-    //TH1::SetDefaultSumw2();
-    //TH1D *m_fit_the;
-    //event counter should be fixed when code is better understood
-    int evtcount = 0;
-
-    
-
-
     //MMT_Loader stuff end
 
     enum cStatus {OK, FILL_ERROR, CLEARED};
@@ -191,10 +133,6 @@ namespace NSWL1 {
 
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-    ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-    CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
-    const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
-    const MmIdHelper*                  m_MmIdHelper;        //!< MM offline Id helper
 
     // hidden variables
     std::vector< std::vector<MMStripData*> > m_mmstrip_cache; //!< cache for the MM Strip hit data in the event
@@ -204,13 +142,6 @@ namespace NSWL1 {
     
 
     // properties: container and service names
-    StringProperty   m_rndmEngineName;                      //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    StringProperty   m_MmDigitContainer;                    //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    StringProperty   m_MmSdoContainer;                      //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    StringProperty   m_MmHitContainer;
-    StringProperty   m_Truth_ContainerName;
-    StringProperty   m_MuEntry_ContainerName;
-
     BooleanProperty  m_doNtuple;                            //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
 
 
@@ -222,37 +153,18 @@ namespace NSWL1 {
     std::vector<double>* m_fitThe;
     std::vector<double>* m_fitPhi;
     std::vector<double>* m_fitDth;
-    std::vector<double>* tru_etarange;
-    std::vector<double>* tru_ptrange;
-    std::vector<double>* fit_etarange;
-    std::vector<double>* fit_ptrange;
-    std::vector<double>* res_the;
-    std::vector<double>* res_phi;
-    std::vector<double>* res_dth;
-
-
-    /*
-    int m_nMMStripHits;                                         //!< number of Strip hit delivered
-    std::vector<int>* m_MMhitPDGId;                             //!< PDG id of particles creating the hits
-    std::vector<float>* m_MMhitDepositEnergy;                   //!< energy deposited by particles
-    std::vector<float>* m_MMhitKineticEnergy;                   //!< kinetic energy of particles
-    std::vector<float>* m_mmstripGlobalX;                       //!< global position X of the Strip hit
-    std::vector<float>* m_mmstripGlobalY;                       //!< global position Y of the Strip hit
-    std::vector<float>* m_mmstripGlobalZ;                       //!< global position Z of the Strip hit
-    std::vector<float>* m_mmstripTruthHitGlobalX;               //!< global position X of the truth hit associated to the Strip hit
-    std::vector<float>* m_mmstripTruthHitGlobalY;               //!< global position Y of the truth hit associated to the Strip hit
-    std::vector<float>* m_mmstripTruthHitGlobalZ;               //!< global position Z of the truth hit associated to the Strip hit
-    */
-
-    //std::vector<float>* m_mmstripGlobalX;                       //!< global position X of the Strip hit
-    //std::vector<float>* m_mmstripGlobalY;                       //!< global position Y of the Strip hit
-    //std::vector<float>* m_mmstripGlobalZ;
-    //These are not in MMDigitvariables, need to find what they correspond to in previous ntuple
+    std::vector<double>* m_tru_etarange;
+    std::vector<double>* m_tru_ptrange;
+    std::vector<double>* m_fit_etarange;
+    std::vector<double>* m_fit_ptrange;
+    std::vector<double>* m_res_the;
+    std::vector<double>* m_res_phi;
+    std::vector<double>* m_res_dth;
+
 
     // Variables from MMDigitVariables for ntuple (maybe keep)
 
 
-    //int m_NSWMM_nDigits;
     std::vector<std::string> *m_NSWMM_dig_stationName;
     std::vector<int> *m_NSWMM_dig_stationEta;
     std::vector<int> *m_NSWMM_dig_stationPhi;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
index cbb1095430dfb365a2a1943b6f18f6e665698a43..1e6efdaa073a15f5526642431d6b25f334baa605 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
@@ -7,13 +7,14 @@
 
 
 #include "AthenaKernel/MsgStreamMember.h"
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 #include "MMT_struct.h"
 
 
 class MMT_Finder{
  public:
-  MMT_Finder(MMT_Parameters *par, int nUVRoads = 1, int outputLevel = MSG::WARNING);
+  MMT_Finder(MMT_Parameters *par, int nUVRoads = 1);
   ~MMT_Finder(){}
   int Coincidence_Gate(const vector<bool>& plane_hits) const;
   void set_roads(int _roads) { m_nRoads=_roads; }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
index 6746281dec3fb90fe999425bef724163dff30dfd..4d6527857b350ec0dd35faee27814c0174da1dd4 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MMT_FITTER_H
@@ -16,10 +16,9 @@ class MMT_Fitter{
   ~MMT_Fitter(){}
   void Get_Fit(vector<Hit>& track, map<int,evFit_entry>& Event_Fit, map<hitData_key,hitData_entry>& Hits_Data_Set_Time);
   evFit_entry fit_event(int event, vector<Hit>& track, vector<hitData_entry>& hitDatas, int& nfit, vector<pair<double,double> >&mxmy, double& mxl, double& mv, double& mu) const;
-  int get_last() const {return last;}
-  int SC_ROI_n_x() const {return m_par->n_x;}
-  int SC_ROI_n_y() const {return m_par->n_y;}
-/*   vector<int> xent,yent; */
+  int get_last() const {return m_last;}
+  int SC_ROI_n_x() const {return m_par->m_n_x;}
+  int SC_ROI_n_y() const {return m_par->m_n_y;}
   int find_hitData(const vector<hitData_entry>& hitDatas, const hitData_key& key) const;
 
 
@@ -29,7 +28,7 @@ class MMT_Fitter{
   bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; }
 
  protected:
-  int last;
+  int m_last;
   //some variables
   MMT_Parameters *m_par;
 
@@ -66,8 +65,8 @@ class MMT_Fitter{
   vector<Hit> q_hits(const string& type,const vector<Hit>& hits) const;
 
   //Fitter components
-  int number_LG_regions,n_fit;
-  float32fixed<2> LG_min,LG_max;
+  int m_number_LG_regions,m_n_fit;
+  float32fixed<2> m_LG_min,m_LG_max;
   vector<int> q_planes(char type) const;//return position of what planes are where
 
   /// Private message stream member
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
index 79f4826ccbbb762149a9bdcb72654dc7b4a3a733..60adabedd44e547333eb6b3125d91d1f322fdab8 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
@@ -1,12 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MM_STRUCT_H
 #define MM_STRUCT_H
 
 #include <fstream>
-// #include "fixed_point.h"
 
 #include "MuonReadoutGeometry/MMReadoutElement.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
@@ -16,15 +15,10 @@
 #include "AthenaKernel/MsgStreamMember.h"
 
 
-#include "TTree.h"
-#include "TH1F.h"
 #include "TLorentzVector.h"
 #include "TMath.h"
 
-#include<cmath>
-
 using namespace std;
-// using namespace fpml;
 
 //flags
 const double crep_pt=200.;
@@ -36,8 +30,7 @@ const double crep_pt=200.;
 */
 
 //constants and convsersions
-const int yzdex=2,bkdex=13,zbardex=2;
-// double store_const;
+const int m_yzdex=2,m_bkdex=13,m_zbardex=2;
 
 
 template<unsigned char T> class float32fixed
@@ -69,7 +62,6 @@ public:
     //=== return input value with fixed point precision
     return ::roundf(fixp_content * std::pow(2., scale)) / std::pow(2., scale);
 
-    // return fixedPointPrecision(T, fixp_content);
   }
 
 
@@ -191,7 +183,6 @@ struct par_par{
   double h;
   int ctx,ctuv;
   double uverr;
-  //fixed_point<int,1> uverr; //need int here
   string setup;
   bool islarge,q_dlm,genbg;
   double qt;
@@ -206,9 +197,6 @@ struct par_par{
 
 };
 
-// const par_par standard=par_par(0.0009,4,4,0.0035,"xxuvxxuv",true);
-// const par_par dlm=par_par(0.0009,4,4,0.007,"xxuvuvxx",true,true); //.0035 for uv_tol before...
-
 class MMT_Parameters{
  public:
   MMT_Parameters(par_par inputParams,char wedgeSize, const MuonGM::MuonDetectorManager* m_detManager);
@@ -218,22 +206,21 @@ class MMT_Parameters{
   int is_u(int plane);
   int is_v(int plane);
 
-  unsigned int n_multiplets = 2;
-  unsigned int n_layers     = 4;
+  unsigned int m_n_multiplets = 2;
+  unsigned int m_n_layers     = 4;
 
   // start counting at 1 to be consistent with mmIdHelper.
-  std::vector<unsigned int> planes_x = {1, 2, 7, 8};
-  std::vector<unsigned int> planes_u = {3, 5};
-  std::vector<unsigned int> planes_v = {4, 6};
+  std::vector<unsigned int> m_planes_x = {1, 2, 7, 8};
+  std::vector<unsigned int> m_planes_u = {3, 5};
+  std::vector<unsigned int> m_planes_v = {4, 6};
 
   vector<int> q_planes(const string& type) const;
   par_par param_par() const;
   double y_from_eta_wedge(double eta,int plane)const;
   double eta_wedge_from_y(double y,int plane)const;
   int ybin(float32fixed<18> y,int plane=0)const;
-  int ybin(float32fixed<yzdex> y,int plane=0)const;
+  int ybin(float32fixed<m_yzdex> y,int plane=0)const;
   int ybin(double y,int plane=0)const;
-  // double ymid_eta_bin(int bin,int plane)const;
 
   //fill the tables
   void Local_Slope_A_B();
@@ -269,63 +256,61 @@ class MMT_Parameters{
   string bool_to_hit_str(const vector<bool>&track)const;
 
   //table
-  map<vector<int>,pair<float32fixed<2>,float32fixed<2> > > AB_k_local;
-  vector<vector<vector<float32fixed<zbardex> > > > Ak_local_slim;//[x_hit combo][ybin][case #]
-  vector<vector<vector<float32fixed<bkdex> > > > Bk_local_slim;//[x_hit combo][ybin][case #]
-  vector<vector<vector<float32fixed<4> > > > Slope_to_ROI;
-  vector<vector<float32fixed<2> > > DT_Factors;
+  map<vector<int>,pair<float32fixed<2>,float32fixed<2> > > m_AB_k_local;
+  vector<vector<vector<float32fixed<m_zbardex> > > > m_Ak_local_slim;//[x_hit combo][ybin][case #]
+  vector<vector<vector<float32fixed<m_bkdex> > > > m_Bk_local_slim;//[x_hit combo][ybin][case #]
+  vector<vector<vector<float32fixed<4> > > > m_Slope_to_ROI;
+  vector<vector<float32fixed<2> > > m_DT_Factors;
   //theta, phi, hit code, theta/phi/dtheta
   //hit code: binary stuff....
   //old hit code...%mis X, %mis UV: 2-4 X, 1-4 UV possible fractions: 0,1/2,1/3,2/3,1/4,(3/4,not possible with only one misaligned multiplet), 1: 0,3,4,6,8,12
-  vector<vector<vector<vector<float> > > >crep_table;
-  vector<vector<vector<float32fixed<yzdex> > > >ymod,zmod;
+  vector<vector<vector<vector<float> > > >m_crep_table;
+  vector<vector<vector<float32fixed<m_yzdex> > > >m_ymod,m_zmod;
 
   //a toggle
-  bool fill0;
+  bool m_fill0;
 
   //how many etabins (of equal size) for algorithm results
-  int n_etabins,n_phibins;
+  int m_n_etabins,m_n_phibins;
   vector<double>m_etabins,m_phibins;
   //currently configurable parameters
-  bool diag,dlm_new;
-  float32fixed<2> h;
-  int CT_x,CT_uv;
-  float32fixed<2> uv_error;
-  double dtheta_cut;
-  string setup;
-  bool islarge,genbg;
-  double chargeThreshold;
+  bool m_diag,m_dlm_new;
+  float32fixed<2> m_h;
+  int m_CT_x,m_CT_uv;
+  float32fixed<2> m_uv_error;
+  double m_dtheta_cut;
+  string m_setup;
+  bool m_islarge,m_genbg;
+  double m_chargeThreshold;
   //new, standardized, misalignment and correction information
-  std_align misal,correct;
+  std_align m_misal,m_correct;
 
   //misalignment parameters
-  int ybins,n_stations_eta;
-  bool misalign,val_tbl;
+  int m_ybins,m_n_stations_eta;
+  bool m_misalign,m_val_tbl;
 
   //dimensions
-  float32fixed<18> w1, w2, w3, h1, h2, h3, H, Hnom, L, wedge_opening_angle;
-  float32fixed<4> strip_width;
-  float32fixed<4> stereo_degree;
-  double stereo_strip_separation_top;
-  double stereo_strip_separation_bottom;
+  float32fixed<18> m_w1, m_w2, m_w3, m_h1, m_H, m_Hnom, m_wedge_opening_angle;
+  float32fixed<4> m_strip_width;
+  float32fixed<4> m_stereo_degree;
 
-  vector<float32fixed<18> > z_nominal;
-  vector<vector<float32fixed<18> > > z_large;//[y bin][plane]
-  vector<vector<float32fixed<18> > > ybases;//by stationEta--saved from file, hardcoded, alternative is equally spaced, in MMT_Loader::Get_Strip_Id
-  float32fixed<2> m_x_min,m_x_max,m_y_min,m_y_max,h_mx, h_my;
-  int n_x,n_y;
+  vector<float32fixed<18> > m_z_nominal;
+  vector<vector<float32fixed<18> > > m_z_large;//[y bin][plane]
+  vector<vector<float32fixed<18> > > m_ybases;//by stationEta--saved from file, hardcoded, alternative is equally spaced, in MMT_Loader::Get_Strip_Id
+  float32fixed<2> m_x_min,m_x_max,m_y_min,m_y_max,m_h_mx, m_h_my;
+  int m_n_x,m_n_y;
 
-  float32fixed<3> slope_min, slope_max;
-  float32fixed<2> x_error;
-  int CT, CT_u, CT_v;
+  float32fixed<3> m_slope_min, m_slope_max;
+  float32fixed<2> m_x_error;
+  int m_CT, m_CT_u, m_CT_v;
 
-  float32fixed<4> minimum_large_theta, maximum_large_theta;
-  float32fixed<4> minimum_large_phi, maximum_large_phi;
+  float32fixed<4> m_minimum_large_theta, m_maximum_large_theta;
+  float32fixed<4> m_minimum_large_phi, m_maximum_large_phi;
 
-  int n_theta_rois, n_phi_rois, BC_window;
+  int m_n_theta_rois, m_n_phi_rois, m_BC_window;
 
-  float32fixed<18> mid_plane_large_X, mid_plane_large, mid_plane_large_UV;
-  float32fixed<4> vertical_strip_width_UV;
+  float32fixed<18> m_mid_plane_large_X, m_mid_plane_large, m_mid_plane_large_UV;
+  float32fixed<4> m_vertical_strip_width_UV;
 
   /// Log a message using the Athena controlled logging system
   MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; }
@@ -432,25 +417,14 @@ struct hitData_info{
   //members
   int plane;
   //char addc,vmm,strip;//strip is in a vmm (0-63); char for storage as a byte
-  float32fixed<yzdex> y,z;//actual values divided by store_const() to make fixed point calculations doable--all this stuff is dimensionless in the end, so it's okay.
+  float32fixed<m_yzdex> y,z;//actual values divided by store_const() to make fixed point calculations doable--all this stuff is dimensionless in the end, so it's okay.
   float32fixed<2> slope;
 
-
-  // /// Log a message using the Athena controlled logging system
-  // MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; }
-  // /// Check whether the logging system is active at the provided verbosity level
-  // bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; }
-
-  // private:
-  //   /// Private message stream member
-  //   mutable Athena::MsgStreamMember m_msg;
 };
 
 struct Hit{
   //make a well-behaved constructor
-/*   Hit(int _plane=-1, int _strip=0, int _station_eta=0, double _slope=0, int bct=0, double t=0, double gt=0, int vmm=0); */
   Hit(const hitData_key&k=hitData_key(),const hitData_info&i=hitData_info());
-/*   double slope()const {return info.slope();} */
   bool operator==(const Hit& rhs) const;
   void print_track(const vector<Hit>& track) const;
   void print() const;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
index 6e88bc51bd56af487c85ce25e6f614c02f5494f1..01021086edf986d67670091c75bc63c4b016790d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MMTRIGGERTOOL_H
@@ -13,14 +13,12 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
 class MmIdHelper;
 class MmDigit;
 class TTree;
 
 #include "MMLoadVariables.h"
 #include "MuonDigitContainer/MmDigitContainer.h"
-#include "MuonDigitContainer/MmDigit.h"
 
 
 namespace MuonGM {
@@ -73,12 +71,7 @@ namespace NSWL1 {
 
 
     // properties: container and service names
-    StringProperty   m_rndmEngineName;                      //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
     StringProperty   m_MmDigitContainer;                    //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    StringProperty   m_MmSdoContainer;                      //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
-    StringProperty   m_MmHitContainer;
-    StringProperty   m_Truth_ContainerName;
-    StringProperty   m_MuEntry_ContainerName;
 
     BooleanProperty  m_doNtuple;                            //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadData.h
index 0ad0289d1648806c9ca675c2216ad63a832b0b2d..66a9815e22e88f494004e33b9b06b708639cf126 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*-
@@ -8,7 +8,6 @@
 
 
 // local includes
-#include <stdint.h>
 #include <ostream>
 
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
index fc064438a52aaae2612160c8704ae52e68d1f58d..9f57bda5e367a62aaf761d4451b98bc062a5af0d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadOfflineData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef PADOFFLINEDATA_H
@@ -12,11 +12,6 @@
 // local includes
 #include "TrigT1NSWSimTools/PadData.h"
 
-
-// forward declarations
-class TVector3;
-
-
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
 
@@ -44,15 +39,12 @@ namespace NSWL1 {
 
   public:
     PadOfflineData(Identifier id, float time, uint16_t bc_tag, const sTgcIdHelper* helper);
-    //PadOfflineData(Identifier id, float time, uint16_t bc_tag, bool isdead, bool ispileup, const sTgcIdHelper* helper);
     ~PadOfflineData();
 
     //! methods for retrieving the bare data
     uint32_t id()              const;  //!< get the 32 bit word identifing the fragment
     uint16_t BC_Tag()          const;  //!< get the BCID
     float    time()            const;  //!< get the arrival time after the delay is applied
-    //bool     isDead()          const;  //!< get the isDead bool 
-    //bool     isPileup()        const;  //!< get the isPileup bool
 
     //! helper  methods decoding the hit fragment position within the NSW detector
     int sideId()               const;  //!< get the side            (0==sideC, 1==sideA)
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
index dccbd94667bb611cea15c83a01594462a49fc6a3..b162e1d75b763cf38a1eae69321fc8f82902dbc3 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTdsOfflineTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*-
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTrigger.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTrigger.h
index 30e741c7b4985d7cdd91cb11b1b5dac33173260b..427a253479007c8b0449601c2b9e9855d5e1584d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTrigger.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTrigger.h
@@ -1,7 +1,7 @@
 //  -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef NSWL1_PADDATA_H
@@ -9,7 +9,6 @@
 
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 #include "TrigT1NSWSimTools/GeoUtils.h"
-#include <ostream>
 #include <vector>
 
 
@@ -79,7 +78,5 @@ namespace NSWL1 {
 
 } // namespace NSWL1
 
-/// \todo
-// std::ostream& operator<<(std::ostream& stream, NSWL1::PadTrigger& pt);
 
 #endif
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
index 8a0f66754038c860ef903de9b3a712159a01e469..c80e9300dba111752bbacd9aa88d74a7575e6a6b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerLogicOfflineTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*-
@@ -21,13 +21,7 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
 class TTree;
-class sTgcDigitContainer;
-
-namespace CLHEP {
-class HepRandomEngine;
-}
 
 namespace MuonGM {
 class MuonDetectorManager;
@@ -52,7 +46,6 @@ namespace NSWL1 {
     // DG--todo
     // DG--todo It returns a vector of PadData to input the PadTrigger simulation.
 
-    davide.gerbaudo@gmail.com
     Oct 2015
 
     */
@@ -78,8 +71,6 @@ namespace NSWL1 {
         See test/test_4on4padTrigger.cxx
         */
         static std::vector<std::unique_ptr<PadTrigger>> build4of4SingleWedgeTriggers(const std::vector<std::shared_ptr<PadData>> &pads);
-        ///// from PadData to the TDR-style PadWithHits
-        //static PadWithHits convert(const PadData &pd);
         /**
         @brief transfer the geometric info from PadData to PadWithHits
         Note: it needs to access the MuonDetectorManager
@@ -93,32 +84,16 @@ namespace NSWL1 {
     private:
         /// get the output tree from the athena histogram service
         TTree* get_tree_from_histsvc();
-        // // methods implementing the internal data processing
-        // CacheStatus fill_pad_cache();                           //!< loop over the digit container, apply the additional processing then fill the cache
-        // void clear_cache();                                     //!< clear the pad hit cache deleting the PadData pointers
 
         // needed Servives, Tools and Helpers
         ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-        ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-        CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
         const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
-        // DG-2015-10-02 probably not needed
-        // const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
-
-        // \todo
-        // DG-2015-10-02 : can probably get rid of all this caching below
 
         // hidden variables
-        // std::vector< std::vector<PadData*> > m_pad_cache;       //!< cache for the PAD hit data in the event (one per sector)
         int     m_pad_cache_runNumber;                          //!< run number associated to the current PAD cache
         int     m_pad_cache_eventNumber;                        //!< event number associated to the current PAD cache
-        // CacheStatus m_pad_cache_status;                         //!< status of the current cache
 
 
-        // properties: container and service names
-        StringProperty   m_rndmEngineName;                      //!< property, todo
-        StringProperty   m_sTgcDigitContainer;                  //!< property, todo
-        StringProperty   m_sTgcSdoContainer;                    //!< property, todo
         // properties: configuration
         FloatProperty    m_PadEfficiency;                       //!< property, todo
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerValidationTree.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerValidationTree.h
index 05a6e993c4c53eb52de7657150316fefe18c1215..f452faf83cd4008975931dcc65313ffe4182d4b8 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerValidationTree.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadTriggerValidationTree.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*-
@@ -9,7 +9,6 @@
 #include "GeoPrimitives/GeoPrimitives.h" // Amg::Vector3D (cannot fw declare typedef)
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 #include <string>
-#include <utility> // pair
 #include <vector>
 
 class TTree;
@@ -43,11 +42,6 @@ public:
     void clear_ntuple_variables(); ///< set to 0 all pointers of internal containers
     void fill_num_pad_triggers(size_t num);                                  ///< store the number of pad triggers per event
     void fill_pad_trigger_basics(const std::vector<std::unique_ptr<PadTrigger>> &triggers);  ///< store basic information about the pad triggers 
-    /*
-    void fill_num_pad_hits(size_t num); ///< store the number of hits for one pad
-    void fill_hit_global_pos(const Amg::Vector3D& pos); ///< store global position of a hit
-    void fill_truth_hit_global_pos(const Amg::Vector3D& pos); ///< store global position of a truth-matched hit
-    */
 private:
     std::string m_treename;
     TTree* m_tree;                                          ///< ntuple for analysis
@@ -71,21 +65,6 @@ private:
     
     std::vector<std::vector<float>>* m_padTriggerlocalminY;
     std::vector<std::vector<float>>* m_padTriggerlocalmaxY;
-    // int m_nPadHits;                                         ///< number of PAD hit delivered
-    // std::vector<float>* m_padGlobalX;                       ///< global position X of the PAD hit
-    // std::vector<float>* m_padGlobalY;                       ///< global position Y of the PAD hit
-    // std::vector<float>* m_padGlobalZ;                       ///< global position Z of the PAD hit
-    // std::vector<float>* m_padTruthHitGlobalX;               ///< global position X of the truth hit associated to the PAD hit
-    // std::vector<float>* m_padTruthHitGlobalY;               ///< global position Y of the truth hit associated to the PAD hit
-    // std::vector<float>* m_padTruthHitGlobalZ;               ///< global position Z of the truth hit associated to the PAD hit
-    // std::vector<int>*   m_padEtaIdFromOfflineId;            ///< PAD eta Id from the offline Id
-    // std::vector<int>*   m_padPhiIdFromOfflineId;            ///< PAD phi Id from the offline Id
-    // std::vector<int>*   m_padSectorFromOfflineId;           ///< PAD sector Id from the offline Id
-    // std::vector<int>*   m_padLayerFromOfflineId;            ///< PAD layer Id from the offline Id
-    // std::vector<int>*   m_offlineIdPadEtaConverted;         ///< PAD eta Id from the offline Id that were converted
-    // std::vector<int>*   m_offlineIdPadPhiConverted;         ///< PAD phi Id from the offline Id that were converted
-    // std::vector<int>*   m_padEtaIdFromOldSimu;              ///< PAD eta Id from the standalone simulation code
-    // std::vector<int>*   m_padPhiIdFromOldSimu;              ///< PAD phi Id from the standalone simulation code
 };  // PadTriggerValidationTree
 
 } // NSWL1
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadUtil.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadUtil.h
index 7a8cae20aba7292ec50fcab77ed2218c30da81e0..e837062dd0cc30d5ca6b388e746f39247ad37fe7 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadUtil.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadUtil.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // -*-c++-*-
@@ -10,7 +10,7 @@
 
 // forward declarations
 class MsgStream;
-class TVcetor3;
+class TVector3;
 class PadOfflineData;
 
 namespace std {
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadWithHits.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadWithHits.h
index c50de1ac4ff9ab4a17c65d331374efa847a7ac77..f85960d73e9646cd96e89e79a04322553b851aaa 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadWithHits.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/PadWithHits.h
@@ -1,26 +1,19 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 //S.I 26-07-18 : This class and the structure is too problematic in terms of memory management while using raw pointers
 #ifndef NSW_PADWITHITS_H
 #define NSW_PADWITHITS_H
 
-#include "TVector3.h"
-
-#include <cstring> //memset
-#include <iostream>
 #include <string>
 #include <vector>
 
 #include "TrigT1NSWSimTools/PadData.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
 
-//namespace NSWL1 {
-//class PadData;
-//}
 namespace NSWL1 {
 
   struct Pad {
@@ -36,7 +29,6 @@ namespace NSWL1 {
     float m_cornerXyz[4][3]; //!< (x,y,z) coordinates of the 4 pad corners (in the order low to high phi, low to high R)
     
     
-     //const NSWL1::PadData *m_padData; ///< if this pad was created from a PadData object, pointer to it
     std::shared_ptr<PadData> m_padData;
     
     Pad(const int &eta, const int &phi,
@@ -62,24 +54,7 @@ namespace NSWL1 {
   float midSectorPhi(int sector);         //!< angle phi at the center of the sector
   float phi_mpi_pi(const double &val);    //!< bring phi to [-pi,+pi)
   float phi_zero_2pi(const double &val);  //!< bring phi to [0, +2pi)
-  // //! function to determine the pad coordinates from the hit information
-  // /*!
-  //   Return false if the position is not consistent with our geometry
-  //  */
-  // bool determinePadFromPos(TVector3 pos, Pad &result, bool verbose=false);
-  // //! both determinePadFromHit and determinePadFromPos rely on determinePad
-  // /*!
-  //   In general, one should not call determinePad directly
-  // */
-  // bool determinePad(int layer, int wedgeId, int wedgeType, int sector, int detectorNumber,
-  //                   TVector3 pos, Pad &result, bool verbose=false);
-  //! scale a H value to account for the difference between the z-pos in the official geom and Daniel's geom
-  /*! N.B. the layer is _not_ a int, but it starts from 0.
-   */
-  // float adjustHforZdifference(const float &h, const int &s, const int &layer);
- 
-    //bool operator== (const Pad &lhs, const Pad &rhs);
-    //std::ostream& operator<<( std::ostream& oo, const Pad &p);
+
 /**
   @brief Class that holds two pieces of information: pad geometry and hit indices.
   
@@ -119,7 +94,6 @@ namespace NSWL1 {
                 const int &multiplet,
                 const int &layerType, const int &sector, const int &sectortype, const int &side, const int &module);
     PadWithHits(const Pad &p);
-    //PadWithHits(const NSWL1::PadData &pData);
     
     PadWithHits(std::shared_ptr<PadData> pData);
     
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SectorTriggerCandidate.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SectorTriggerCandidate.h
index c1a909a792434a6c5e9ecaeb366f15665f189941..f6f55e6ab29b3b39c311f0140bcf11e29a1e2f4b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SectorTriggerCandidate.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SectorTriggerCandidate.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -15,7 +15,7 @@
 
 /*!
 
-A trigger trigger candidate for a stgc sector
+A trigger candidate for a stgc sector
 
 davide.gerbaudo@gmail.com, April 2013
 */
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SingleWedgePadTrigger.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SingleWedgePadTrigger.h
index 319ff16479e61a8685d72e05c3360057e8ab5540..fb923cb870c5ec63e41c82b4ddb529c9245e601e 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SingleWedgePadTrigger.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/SingleWedgePadTrigger.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -11,13 +11,17 @@
 #include "TrigT1NSWSimTools/PadWithHits.h"
 #include "TrigT1NSWSimTools/GeoUtils.h"
 #include "TrigT1NSWSimTools/TriggerTypes.h"
-
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "AthenaKernel/MsgStreamMember.h"
 
 #include "TVector3.h"
 
 #include <string>
 #include <vector>
 
+//forward declarations
+class MsgStream;
+
 /*!
 
 A trigger with coincident hits in at least 3 out of 4 layers within a wedge.
@@ -75,6 +79,17 @@ namespace NSWL1 {
     std::string pickle() const; //!< simple dict-like representation
     const std::vector<PadWithHits>& pads() const {return m_pads;}
     TVector3 direction() const;
+
+  protected:
+    /// Log a message using the Athena controlled logging system
+    MsgStream& msg(MSG::Level lvl) const { return m_msg.get() << lvl; }
+
+    /// Check whether the logging system is active at the provided verbosity level
+    bool msgLvl(MSG::Level lvl) { return m_msg.get().level() <= lvl; }
+
+    /// Private message stream member
+    mutable Athena::MsgStreamMember m_msg;
+
   private:
     std::string m_pattern;
     EtaPhiHalf m_halfPadIndices;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterData.h
index 627ae8d39b7a0cee251db39db592672e59d6dfb7..e14fa140ef910a4f4f6cdb4ec368f9221f6324b7 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterData.h
@@ -1,17 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPCLUSTERDATA_H
 #define STRIPCLUSTERDATA_H
 
-
-// local includes
-#include <stdint.h>
-#include <ostream>
-
-
-class Identifier;
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
index 60469c76b9854572ce6bb756479376efd638cd2f..42a4c897978ecbb6098a36efa881db2b9963f023 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterOfflineData.h
@@ -1,17 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPCLUSTEROFFLINEDATA_H
 #define STRIPCLUSTEROFFLINEDATA_H
 
-// Identifier includes
-#include "Identifier/Identifier.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonDigitContainer/sTgcDigit.h"
 // local includes
 #include "TrigT1NSWSimTools/StripClusterData.h"
-#include <string.h>
 
 // namespace for the NSW LVL1 related classes
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
index 670631b0d3f49b8cdb2ba44566349f2e4ebe86cc..7aa5a93ba63254c1d26ff3cb125780dda6348ff7 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripClusterTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPCLUSTERTOOL_H
@@ -22,15 +22,10 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
 class sTgcIdHelper;
 class sTgcDigit;
 class TTree;
 
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
 namespace MuonGM {
   class MuonDetectorManager;
 }
@@ -77,8 +72,6 @@ namespace NSWL1 {
 
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-    ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-    CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
     const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
 
@@ -124,8 +117,6 @@ namespace NSWL1 {
     // 2d-vector for eta/phi station coordinates
     // map from BandID to a set of strips
     
-    std::vector< std::vector < std::map<uint16_t, std::set<int> > > > *bandID_cache ;
-    //std::vector< std::vector<std::unique_ptr<StripData> >* > m_clusters;
     std::vector< std::shared_ptr<std::vector<std::unique_ptr<StripData> >>  > m_clusters;
 
   };  // end of StripClusterTool class
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripData.h
index 3d081d12cd90c24d85c964811f7645bfa23e6028..ddd4f588f69815c23c1e856acb8c48c494fdadd1 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPDATA_H
@@ -7,7 +7,6 @@
 
 
 // local includes
-#include <stdint.h>
 #include <ostream>
 
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripOfflineData.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripOfflineData.h
index 48d3407c6bcce80c3b41b5f26560341bb8805f72..0edc96e829e1960b2455e0a0e93b402822b0e33b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripOfflineData.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripOfflineData.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPOFFLINEDATA_H
@@ -11,7 +11,7 @@
 #include "MuonDigitContainer/sTgcDigit.h"
 // local includes
 #include "TrigT1NSWSimTools/StripData.h"
-#include <string.h>
+#include <string>
 
 // namespace for the NSW LVL1 related classes
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
index 21353e770d7662ee56689655019439ec06b89a52..1fa2193a894e0bde5ef05c8e475ea36c14d2bccb 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripSegmentTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPSEGMENTTOOL_H
@@ -20,20 +20,8 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
-class sTgcIdHelper;
-class sTgcDigit;
 class TTree;
 
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
-namespace MuonGM {
-  class MuonDetectorManager;
-}
-
-
 // namespace for the NSW LVL1 related classes
 namespace NSWL1 {
 
@@ -75,15 +63,10 @@ namespace NSWL1 {
 
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-    ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-    CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
-    const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
-    const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
 
     // analysis ntuple
     TTree* m_tree;                                          //!< ntuple for analysis
     BooleanProperty  m_doNtuple;                            //!< property, see @link StripTdsOfflineTool::StripTdsOfflineTool @endlink                         
-    StringProperty   m_sTgcSdoContainer;                    //!< property, see @link PadTdsOfflineTool::PadTdsOfflineTool @endlink                          
     // analysis variable to be put into the ntuple
     int m_seg_n;                                            //!< number of Segments found
     std::vector<int> *m_seg_wedge1_size;                        //!< theta
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
index 3d4d48866194cd464a4a6e38f2dd3cdb37f27796..49bc39e134de2bda7d4e78a097673ac56c2addef 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/StripTdsOfflineTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef STRIPTDSOFFLINETOOL_H
@@ -20,15 +20,10 @@
 
 //forward declarations
 class IIncidentSvc;
-class IAtRndmGenSvc;
 class sTgcIdHelper;
 class sTgcDigit;
 class TTree;
 
-namespace CLHEP {
-  class HepRandomEngine;
-}
-
 namespace MuonGM {
   class MuonDetectorManager;
 }
@@ -93,8 +88,6 @@ namespace NSWL1 {
 
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
-    ServiceHandle< IAtRndmGenSvc >     m_rndmSvc;           //!< Athena random number service
-    CLHEP::HepRandomEngine*            m_rndmEngine;        //!< Random number engine
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
     const sTgcIdHelper*                m_sTgcIdHelper;      //!< sTgc offline Id helper
 
@@ -106,7 +99,6 @@ namespace NSWL1 {
     BooleanProperty  m_doNtuple;                            //!< property, see @link StripTdsOfflineTool::StripTdsOfflineTool @endlink  
 
     // properties: container and service names
-    StringProperty   m_rndmEngineName;                      //!< property, see @link PadTdsOfflineTool::PadTdsOfflineTool @endlink
     StringProperty   m_sTgcDigitContainer;                  //!< property, see @link PadTdsOfflineTool::PadTdsOfflineTool @endlink
     StringProperty   m_sTgcSdoContainer;                    //!< property, see @link PadTdsOfflineTool::PadTdsOfflineTool @endlink
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/TriggerTypes.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/TriggerTypes.h
index 9d0000d8bbee6e081d98d8964e2db80a25e665e7..5a358f50d652dcde62ca66c0b6d1b016e27a71cf 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/TriggerTypes.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/TriggerTypes.h
@@ -1,14 +1,13 @@
 //  -*- c++ -*-
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef NSWL1_TRIGGERTYPES_H
 #define NSWL1_TRIGGERTYPES_H
 #include <memory>
-#include <stdint.h>
-#include<vector>
+
 //S.I 20.08.18
 //Merged tdr_typedefs.h and This file(TriggerTypes.h) inside the common namespace NSWL1
 //to avoid namespace inflation.
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCenumeration.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCenumeration.h
index a09f7168bccfd09f5a4cd8716c82beac7c7680a6..44ea6cc073ef49e7abf81348d4df3706fa419f31 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCenumeration.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCenumeration.h
@@ -1,95 +1,95 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef sTGCenumeration_h
-#define sTGCenumeration_h
-
-static const float VERY_LARGE               =      999999.
-                 , UNDEF                    =  -VERY_LARGE
-                 , DEFAULT_VALUE            =        UNDEF
-                 ; 
-
-enum selectorType     { NONE                =  -1
-                      , ALL                 =  -2
-                      , DEFAULT             =  -3
-                      , TOO_SMALL           =  -4
-                      , TOO_LARGE           =  -5
-                      , UNDEFINED           =  -999999
-                      } ;
-
-enum STGCModuleType   { STGC_MODULE_1       =  1
-                      , STGC_MODULE_2   
-                      , STGC_MODULE_3   
-                      , STGC_MODULES        =  3
-                      } ; 
-
-enum STGCDetectorType { STGC_DETECTOR_0 
-                      , STGC_DETECTOR_1    
-                      , STGC_DETECTOR_2
-                      , STGC_DETECTOR_3
-                      , STGC_DETECTORS 
-                      } ;
-
-enum PivotConfirmType { PIVOT              
-                      , CONFIRM 
-                      , STGC_WEDGES 
-                      } ;
-
-enum SectorType       { SMALL                
-                      , LARGE 
-                      , SECTORS_IN_OCTANT
-                      , TOY                 =  SECTORS_IN_OCTANT  // 2
-                      , SECTOR_TYPES
-                      } ;
-
-enum STGCType         { SMALL_PIVOT    
-                      , SMALL_CONFIRM      
-                      , LARGE_PIVOT       
-                      , LARGE_CONFIRM    
-                      , TOY_PIVOT           
-                      , TOY_CONFIRM                         
-                      , STGC_TYPES   
-                      } ;
-
-enum LayerType        { NO_LAYER            = -1 
-                      , STGC_LAYER_1        =  1         
-                      , STGC_LAYER_2         
-                      , STGC_LAYER_3          
-                      , STGC_LAYER_4        
-                      , STGC_LAYERS         =  5
-                      } ;
-
-enum MMType           { REGULAR      
-                      , CORNERED              
-                      , EXTRUDED            
-                      , MM_TYPES       
-                      } ;
-
-enum MMModule         { MM_MODULE_1         =  1
-                      , MM_MODULE_2  
-                      , MM_MODULE_3 
-                      , MM_MODULE_4  
-                      , MM_MODULES          =  4
-                      } ;
-
-enum MDTModule        { MDT_MODULE_1         =  1
-                      , MDT_MODULE_2  
-                      , MDT_MODULE_3 
-                      , MDT_MODULE_4  
-                      , MDT_MODULES          =  4
-                      } ;
-
-// description of the trigger patterns
-
-enum triggerPattern   { TRPAT_NBITS_LAYER =  8 
-                      , TRPAT_PHI_BITS    =  0 
-                      , TRPAT_R_BITS      =  4 
-                      , TRPAT_MASK        =  0x7
-                      , TRPAT_DRMIN       =  0 
-                      , TRPAT_DRMAX       =  1 
-                      , TRPAT_DPHIMIN     =  0 
-                      , TRPAT_DPHIMAX     =  1 
-                      } ;
-
-#endif
+#ifndef sTGCenumeration_h
+#define sTGCenumeration_h
+
+static const float VERY_LARGE               =      999999.
+                 , UNDEF                    =  -VERY_LARGE
+                 , DEFAULT_VALUE            =        UNDEF
+                 ; 
+
+enum selectorType     { NONE                =  -1
+                      , ALL                 =  -2
+                      , DEFAULT             =  -3
+                      , TOO_SMALL           =  -4
+                      , TOO_LARGE           =  -5
+                      , UNDEFINED           =  -999999
+                      } ;
+
+enum STGCModuleType   { STGC_MODULE_1       =  1
+                      , STGC_MODULE_2   
+                      , STGC_MODULE_3   
+                      , STGC_MODULES        =  3
+                      } ; 
+
+enum STGCDetectorType { STGC_DETECTOR_0 
+                      , STGC_DETECTOR_1    
+                      , STGC_DETECTOR_2
+                      , STGC_DETECTOR_3
+                      , STGC_DETECTORS 
+                      } ;
+
+enum PivotConfirmType { PIVOT              
+                      , CONFIRM 
+                      , STGC_WEDGES 
+                      } ;
+
+enum SectorType       { SMALL                
+                      , LARGE 
+                      , SECTORS_IN_OCTANT
+                      , TOY                 =  SECTORS_IN_OCTANT  // 2
+                      , SECTOR_TYPES
+                      } ;
+
+enum STGCType         { SMALL_PIVOT    
+                      , SMALL_CONFIRM      
+                      , LARGE_PIVOT       
+                      , LARGE_CONFIRM    
+                      , TOY_PIVOT           
+                      , TOY_CONFIRM
+                      , STGC_TYPES
+                      } ;
+
+enum LayerType        { NO_LAYER            = -1 
+                      , STGC_LAYER_1        =  1
+                      , STGC_LAYER_2
+                      , STGC_LAYER_3
+                      , STGC_LAYER_4
+                      , STGC_LAYERS         =  5
+                      } ;
+
+enum MMType           { REGULAR
+                      , CORNERED
+                      , EXTRUDED
+                      , MM_TYPES
+                      } ;
+
+enum MMModule         { MM_MODULE_1         =  1
+                      , MM_MODULE_2
+                      , MM_MODULE_3
+                      , MM_MODULE_4
+                      , MM_MODULES          =  4
+                      } ;
+
+enum MDTModule        { MDT_MODULE_1         =  1
+                      , MDT_MODULE_2
+                      , MDT_MODULE_3
+                      , MDT_MODULE_4
+                      , MDT_MODULES          =  4
+                      } ;
+
+// description of the trigger patterns
+
+enum triggerPattern   { TRPAT_NBITS_LAYER =  8 
+                      , TRPAT_PHI_BITS    =  0
+                      , TRPAT_R_BITS      =  4
+                      , TRPAT_MASK        =  0x7
+                      , TRPAT_DRMIN       =  0
+                      , TRPAT_DRMAX       =  1
+                      , TRPAT_DPHIMIN     =  0
+                      , TRPAT_DPHIMAX     =  1
+                      } ;
+
+#endif
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCgeometry.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCgeometry.h
index 3bc43a47712f3bc0f74dfa6280ac40157ba36bd9..8fd4acab46cb57f61c8a012b0760c2e824ed91da 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCgeometry.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/sTGCgeometry.h
@@ -1,947 +1,944 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
-//1234567890123901234 123456789023456 123456789023456123123456789023456123 1234567890123 1234567890123 1234565 4444412344326567890
-#ifndef STGCgeometry_h
-#define STGCgeometry_h
-
-// NSW STGC (c) Daniel.Lellouch@cern.ch April 11, 2013
-
-static const float H1[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 1019.4, 1019.4, 1019.4, 1019.4} //D0
-, { 1681.4, 1651.4, 1621.4, 1591.4} //D1
-, { 2541.4, 2541.4, 2541.4, 2541.4} //D2
-, { 3510.9, 3510.9, 3510.9, 3510.9} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 1019.4, 1019.4, 1019.4, 1019.4} //D0
-, { 1681.4, 1651.4, 1621.4, 1591.4} //D1
-, { 2541.4, 2541.4, 2541.4, 2541.4} //D2
-, { 3510.9, 3510.9, 3510.9, 3510.9} //D3
-}
-,
-{ // LARGE_PIVOT
- { 982.0, 982.0, 982.0, 982.0} //D0
-, { 1678.0, 1648.0, 1618.0, 1588.0} //D1
-, { 2538.0, 2538.0, 2538.0, 2538.0} //D2
-, { 3598.0, 3598.0, 3598.0, 3598.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 982.0, 982.0, 982.0, 982.0} //D0
-, { 1678.0, 1648.0, 1618.0, 1588.0} //D1
-, { 2538.0, 2538.0, 2538.0, 2538.0} //D2
-, { 3598.0, 3598.0, 3598.0, 3598.0} //D3
-}
-,
-{ //TOY_PIVOT
- { -413.5, -413.5, -413.5, -413.5} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { -413.5, -413.5, -413.5, -413.5} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-
-};
-
-static const float H2[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 1681.4, 1651.4, 1621.4, 1591.4} //D0
-, { 2531.4, 2531.4, 2531.4, 2531.4} //D1
-, { 3500.9, 3500.9, 3500.9, 3500.9} //D2
-, { 4470.4, 4470.4, 4470.4, 4470.4} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 1681.4, 1651.4, 1621.4, 1591.4} //D0
-, { 2531.4, 2531.4, 2531.4, 2531.4} //D1
-, { 3500.9, 3500.9, 3500.9, 3500.9} //D2
-, { 4470.4, 4470.4, 4470.4, 4470.4} //D3
-}
-,
-{ // LARGE_PIVOT
- { 1678.0, 1648.0, 1618.0, 1588.0} //D0
-, { 2528.0, 2528.0, 2528.0, 2528.0} //D1
-, { 3588.0, 3588.0, 3588.0, 3588.0} //D2
-, { 4398.0, 4398.0, 4398.0, 4398.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 1678.0, 1648.0, 1618.0, 1588.0} //D0
-, { 2528.0, 2528.0, 2528.0, 2528.0} //D1
-, { 3588.0, 3588.0, 3588.0, 3588.0} //D2
-, { 4398.0, 4398.0, 4398.0, 4398.0} //D3
-}
-,
-{ //TOY_PIVOT
- { 413.5, 413.5, 413.5, 413.5} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 413.5, 413.5, 413.5, 413.5} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-static const float H3[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
-}
-,
-{ // SMALL_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
-}
-,
-{ // LARGE_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { 4648.0, 4648.0, 4648.0, 4648.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { 4648.0, 4648.0, 4648.0, 4648.0} //D3
-}
-,
-{ //TOY_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-static const float A[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 384.0, 384.0, 384.0, 384.0} //D0
-, { 677.5, 664.2, 650.9, 637.6} //D1
-, { 1056.5, 1056.5, 1056.5, 1056.5} //D2
-, { 1260.3, 1260.3, 1260.3, 1260.3} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 420.0, 420.0, 420.0, 420.0} //D0
-, { 713.5, 700.2, 686.9, 673.6} //D1
-, { 1092.5, 1092.5, 1092.5, 1092.5} //D2
-, { 1296.3, 1296.3, 1296.3, 1296.3} //D3
-}
-,
-{ // LARGE_PIVOT
- { 598.0, 598.0, 598.0, 598.0} //D0
-, { 843.4, 832.8, 822.2, 811.7} //D1
-, { 1149.1, 1149.1, 1149.1, 1149.1} //D2
-, { 1777.1, 1777.1, 1777.1, 1777.1} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 634.0, 634.0, 634.0, 634.0} //D0
-, { 879.4, 868.8, 858.2, 847.7} //D1
-, { 1185.1, 1185.1, 1185.1, 1185.1} //D2
-, { 1813.1, 1813.1, 1813.1, 1813.1} //D3
-}
-,
-{ //TOY_PIVOT
- { 834.0, 834.0, 834.0, 834.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 834.0, 834.0, 834.0, 834.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-static const float B[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 677.5, 664.2, 650.9, 637.6} //D0
-, { 1054.4, 1054.4, 1054.4, 1054.4} //D1
-, { 1258.2, 1258.2, 1258.2, 1258.2} //D2
-, { 1462.0, 1462.0, 1462.0, 1462.0} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 713.5, 700.2, 686.9, 673.6} //D0
-, { 1090.4, 1090.4, 1090.4, 1090.4} //D1
-, { 1294.2, 1294.2, 1294.2, 1294.2} //D2
-, { 1498.0, 1498.0, 1498.0, 1498.0} //D3
-}
-,
-{ // LARGE_PIVOT
- { 843.4, 832.8, 822.2, 811.7} //D0
-, { 1143.2, 1143.2, 1143.2, 1143.2} //D1
-, { 1771.1, 1771.1, 1771.1, 1771.1} //D2
-, { 2251.0, 2251.0, 2251.0, 2251.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 879.4, 868.8, 858.2, 847.7} //D0
-, { 1179.2, 1179.2, 1179.2, 1179.2} //D1
-, { 1807.1, 1807.1, 1807.1, 1807.1} //D2
-, { 2287.0, 2287.0, 2287.0, 2287.0} //D3
-}
-,
-{ //TOY_PIVOT
- { 834.0, 834.0, 834.0, 834.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 834.0, 834.0, 834.0, 834.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-
-static const float H1_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 1032.9, 1032.9, 1032.9, 1032.9} //D0
-, { 1694.9, 1664.9, 1634.9, 1604.9} //D1
-, { 2554.9, 2554.9, 2554.9, 2554.9} //D2
-, { 3524.4, 3524.4, 3524.4, 3524.4} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 1032.9, 1032.9, 1032.9, 1032.9} //D0
-, { 1694.9, 1664.9, 1634.9, 1604.9} //D1
-, { 2554.9, 2554.9, 2554.9, 2554.9} //D2
-, { 3524.4, 3524.4, 3524.4, 3524.4} //D3
-}
-,
-{ // LARGE_PIVOT
- { 995.5, 995.5, 995.5, 995.5} //D0
-, { 1691.5, 1661.5, 1631.5, 1601.5} //D1
-, { 2551.5, 2551.5, 2551.5, 2551.5} //D2
-, { 3611.5, 3611.5, 3611.5, 3611.5} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 995.5, 995.5, 995.5, 995.5} //D0
-, { 1691.5, 1661.5, 1631.5, 1601.5} //D1
-, { 2551.5, 2551.5, 2551.5, 2551.5} //D2
-, { 3611.5, 3611.5, 3611.5, 3611.5} //D3
-}
-,
-{ //TOY_PIVOT
- { -400.0, -400.0, -400.0, -400.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { -400.0, -400.0, -400.0, -400.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-static const float H2_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 1667.9, 1637.9, 1607.9, 1577.9} //D0
-, { 2517.9, 2517.9, 2517.9, 2517.9} //D1
-, { 3470.9, 3470.9, 3470.9, 3470.9} //D2
-, { 4440.4, 4440.4, 4440.4, 4440.4} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 1667.9, 1637.9, 1607.9, 1577.9} //D0
-, { 2517.9, 2517.9, 2517.9, 2517.9} //D1
-, { 3470.9, 3470.9, 3470.9, 3470.9} //D2
-, { 4440.4, 4440.4, 4440.4, 4440.4} //D3
-}
-,
-{ // LARGE_PIVOT
- { 1664.5, 1634.5, 1604.5, 1574.5} //D0
-, { 2514.5, 2514.5, 2514.5, 2514.5} //D1
-, { 3558.0, 3558.0, 3558.0, 3558.0} //D2
-, { 4368.0, 4368.0, 4368.0, 4368.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 1664.5, 1634.5, 1604.5, 1574.5} //D0
-, { 2514.5, 2514.5, 2514.5, 2514.5} //D1
-, { 3558.0, 3558.0, 3558.0, 3558.0} //D2
-, { 4368.0, 4368.0, 4368.0, 4368.0} //D3
-}
-,
-{ //TOY_PIVOT
- { 400.0, 400.0, 400.0, 400.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 400.0, 400.0, 400.0, 400.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-static const float H3_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
-}
-,
-{ // SMALL_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
-}
-,
-{ // LARGE_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { 4618.0, 4618.0, 4618.0, 4618.0} //D3
-}
-,
-{ // LARGE_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
-, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
-, { 4618.0, 4618.0, 4618.0, 4618.0} //D3
-}
-,
-{ //TOY_PIVOT
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { UNDEF , UNDEF , UNDEF , UNDEF } //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-static const float A_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 356.8, 356.8, 356.8, 356.8} //D0
-, { 650.3, 637.0, 623.7, 610.4} //D1
-, { 1025.5, 1025.5, 1025.5, 1025.5} //D2
-, { 1229.3, 1229.3, 1229.3, 1229.3} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 392.8, 392.8, 392.8, 392.8} //D0
-, { 686.3, 673.0, 659.7, 646.4} //D1
-, { 1061.5, 1061.5, 1061.5, 1061.5} //D2
-, { 1265.3, 1265.3, 1265.3, 1265.3} //D3
-}
-,
-{ // LARGE_PIVOT
- { 569.2, 569.2, 569.2, 569.2} //D0
-, { 814.7, 804.1, 793.5, 782.9} //D1
-, { 1124.5, 1124.5, 1124.5, 1124.5} //D2
-, { 1752.5, 1752.5, 1752.5, 1752.5} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 605.2, 605.2, 605.2, 605.2} //D0
-, { 850.7, 840.1, 829.5, 818.9} //D1
-, { 1160.5, 1160.5, 1160.5, 1160.5} //D2
-, { 1788.5, 1788.5, 1788.5, 1788.5} //D3
-}
-,
-{ //TOY_PIVOT
- { 800.0, 800.0, 800.0, 800.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 800.0, 800.0, 800.0, 800.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-static const float B_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 638.3, 625.0, 611.7, 598.4} //D0
-, { 1015.2, 1015.2, 1015.2, 1015.2} //D1
-, { 1218.1, 1218.1, 1218.1, 1218.1} //D2
-, { 1421.9, 1421.9, 1421.9, 1421.9} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ 674.3, 661.0, 647.7, 634.4} //D0
-, { 1051.2, 1051.2, 1051.2, 1051.2} //D1
-, { 1254.1, 1254.1, 1254.1, 1254.1} //D2
-, { 1457.9, 1457.9, 1457.9, 1457.9} //D3
-}
-,
-{ // LARGE_PIVOT
- { 805.2, 794.6, 784.0, 773.4} //D0
-, { 1104.9, 1104.9, 1104.9, 1104.9} //D1
-, { 1720.8, 1720.8, 1720.8, 1720.8} //D2
-, { 2200.6, 2200.6, 2200.6, 2200.6} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ 841.2, 830.6, 820.0, 809.4} //D0
-, { 1140.9, 1140.9, 1140.9, 1140.9} //D1
-, { 1756.8, 1756.8, 1756.8, 1756.8} //D2
-, { 2236.6, 2236.6, 2236.6, 2236.6} //D3
-}
-,
-{ //TOY_PIVOT
- { 800.0, 800.0, 800.0, 800.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 800.0, 800.0, 800.0, 800.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-
-static const float A_ADAPTERS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 428.0, 428.0, 428.0, 428.0} //D0
-, { 787.5, 774.2, 760.9, 747.6} //D1
-, { 1136.5, 1136.5, 1136.5, 1136.5} //D2
-, { 1340.3, 1340.3, 1340.3, 1340.3} //D3
-}
-,
-{ // SMALL_CONFIRM
- { 464.0, 464.0, 464.0, 464.0} //D0
-, { 823.5, 810.2, 796.9, 783.6} //D1
-, { 1172.5, 1172.5, 1172.5, 1172.5} //D2
-, { 1376.3, 1376.3, 1376.3, 1376.3} //D3
-}
-,
-{ // LARGE_PIVOT
- { 642.0, 642.0, 642.0, 642.0} //D0
-, { 953.4, 942.8, 932.2, 921.7} //D1
-, { 1229.1, 1229.1, 1229.1, 1229.1} //D2
-, { 1857.1, 1857.1, 1857.1, 1857.1} //D3
-}
-,
-{ // LARGE_CONFIRM
- { 678.0, 678.0, 678.0, 678.0} //D0
-, { 989.4, 978.8, 968.2, 957.7} //D1
-, { 1265.1, 1265.1, 1265.1, 1265.1} //D2
-, { 1893.1, 1893.1, 1893.1, 1893.1} //D3
-}
-,
-{ //TOY_PIVOT
- { 878.0, 878.0, 878.0, 878.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 878.0, 878.0, 878.0, 878.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-static const float B_ADAPTERS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 721.5, 708.2, 694.9, 681.6} //D0
-, { 1098.4, 1098.4, 1098.4, 1098.4} //D1
-, { 1338.2, 1338.2, 1338.2, 1338.2} //D2
-, { 1542.0, 1542.0, 1542.0, 1542.0} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ 757.5, 744.2, 730.9, 717.6} //D0
-, { 1134.4, 1134.4, 1134.4, 1134.4} //D1
-, { 1374.2, 1374.2, 1374.2, 1374.2} //D2
-, { 1578.0, 1578.0, 1578.0, 1578.0} //D3
-}
-,
-{ // LARGE_PIVOT
- { 887.4, 876.8, 866.2, 855.7} //D0
-, { 1187.2, 1187.2, 1187.2, 1187.2} //D1
-, { 1851.1, 1851.1, 1851.1, 1851.1} //D2
-, { 2331.0, 2331.0, 2331.0, 2331.0} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ 923.4, 912.8, 902.2, 891.7} //D0
-, { 1223.2, 1223.2, 1223.2, 1223.2} //D1
-, { 1887.1, 1887.1, 1887.1, 1887.1} //D2
-, { 2367.0, 2367.0, 2367.0, 2367.0} //D3
-}
-,
-{ //TOY_PIVOT
- { 878.0, 878.0, 878.0, 878.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { 878.0, 878.0, 878.0, 878.0} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-
-static const float PAD_PHI_SUBDIVISION = 1.5; // Module 1 wrt Modules 2 and 3
-static const float PAD_PHI_DIVISION = 0.130900; // Modules 2 and 3 in radians
-
-
-static const float H_PAD_ROW_0[STGC_TYPES][STGC_LAYERS]={
- { 922.5, 883.9, 920.3, 881.5} // SMALL_PIVOT
- ,{ 867.0, 829.9, 865.0, 827.7} // SMALL_CONFIRM
- ,{ 939.3, 899.9, 937.0, 897.5} // LARGE_PIVOT
- ,{ 954.4, 913.4, 951.8, 910.7} // LARGE_CONFIRM
- ,{ -397.5, -437.5, -402.5, -442.5} //TOY_PIVOT
- ,{ -417.5, -457.5, -422.5, -462.5} // TOY_CONFIRM
- };
-
-
-static const float PAD_HEIGHT[STGC_TYPES][STGC_LAYERS]={
- { 80.000, 80.123, 80.246, 80.368} // SMALL_PIVOT
- ,{ 76.855, 76.978, 77.101, 77.224} // SMALL_CONFIRM
- ,{ 81.453, 81.576, 81.699, 81.821} // LARGE_PIVOT
- ,{ 84.598, 84.721, 84.843, 84.966} // LARGE_CONFIRM
- ,{ 80.000, 80.000, 80.000, 80.000} //TOY_PIVOT
- ,{ 80.000, 80.000, 80.000, 80.000} // TOY_CONFIRM
- };
-
-static const float Z_DANIEL[STGC_TYPES][STGC_LAYERS]={
- { 7377.5, 7388.8, 7400.2, 7411.5} // SMALL_PIVOT
- ,{ 7087.5, 7098.8, 7110.2, 7121.5} // SMALL_CONFIRM
- ,{ 7511.5, 7522.8, 7534.2, 7545.5} // LARGE_PIVOT
- ,{ 7801.5, 7812.8, 7824.2, 7835.5} // LARGE_CONFIRM
- ,{ -1, -1, -1, -1} //TOY_PIVOT
- ,{ -1, -1, -1, -1} // TOY_CONFIRM
- };
-
-static const float Z_CURRENT_LAYOUT[STGC_TYPES][STGC_LAYERS]={
- { 7323.1, 7334.2, 7345.3, 7356.4} // SMALL_PIVOT
- ,{ 7058.2, 7069.3, 7080.4, 7091.5} // SMALL_CONFIRM
- ,{ 7420.2, 7431.3, 7442.4, 7453.5} // LARGE_PIVOT
- ,{ 7685.1, 7696.2, 7707.3, 7718.4} // LARGE_CONFIRM
- ,{ -397.5, -437.5, -402.5, -442.5} //TOY_PIVOT
- ,{ -417.5, -457.5, -422.5, -462.5} // TOY_CONFIRM
-};
-
-static const int FIRST_PAD_ROW_DIVISION[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 2, 3, 2, 3} //D0
-, { 10, 10, 10, 10} //D1
-, { 21, 22, 21, 22} //D2
-, { 33, 34, 33, 34} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ 3, 3, 3, 3} //D0
-, { 11, 12, 11, 11} //D1
-, { 23, 23, 23, 23} //D2
-, { 35, 36, 35, 36} //D3
-}
-,
-{ // LARGE_PIVOT
- { 1, 2, 1, 2} //D0
-, { 10, 10, 9, 9} //D1
-, { 21, 21, 20, 21} //D2
-, { 34, 34, 33, 34} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ 1, 2, 1, 2} //D0
-, { 9, 10, 9, 9} //D1
-, { 20, 20, 20, 20} //D2
-, { 32, 33, 32, 32} //D3
-}
-,
-{ //TOY_PIVOT
- { 1, 1, 1, 1} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-,
-{ // TOY_CONFIRM
- { 1, 1, 1, 1} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-};
-
-static const int PAD_ROWS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 9, 8, 8, 7} //D0
-, { 11, 12, 11, 12} //D1
-, { 12, 12, 12, 12} //D2
-, { 12, 12, 12, 12} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ 9, 9, 8, 8} //D0
-, { 12, 11, 12, 12} //D1
-, { 12, 13, 12, 13} //D2
-, { 13, 12, 13, 12} //D3
-}
-,
-{ // LARGE_PIVOT
- { 9, 8, 8, 8} //D0
-, { 11, 11, 12, 12} //D1
-, { 12, 13, 13, 13} //D2
-, { 12, 13, 13, 13} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ 9, 8, 8, 7} //D0
-, { 11, 10, 11, 11} //D1
-, { 12, 13, 12, 12} //D2
-, { 13, 12, 13, 13} //D3
-}
-,
-{ //TOY_PIVOT
- { 10, 11, 10, 11} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-,
-{ // TOY_CONFIRM
- { 11, 11, 11, 11} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-};
-
-
-
-static const float PAD_COL_PHI0[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 0.002717, -0.040916, -0.002717, -0.046351} //D0
-, { 0.002717, -0.040916, -0.002717, -0.046351} //D1
-, { 0.002717, -0.062732, -0.002717, -0.068167} //D2
-, { 0.002717, -0.062732, -0.002717, -0.068167} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ -0.019099, -0.062732, -0.024534, -0.068167} //D0
-, { -0.019099, -0.062732, -0.024534, -0.068167} //D1
-, { -0.030008, -0.095457, -0.035442, -0.100892} //D2
-, { -0.030008, -0.095457, -0.035442, -0.100892} //D3
-}
-,
-{ // LARGE_PIVOT
- { 0.002717, -0.040916, -0.002717, -0.046351} //D0
-, { 0.002717, -0.040916, -0.002717, -0.046351} //D1
-, { 0.002717, -0.062732, -0.002717, -0.068167} //D2
-, { 0.002717, -0.062732, -0.002717, -0.068167} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ -0.019099, -0.062732, -0.024534, -0.068167} //D0
-, { -0.019099, -0.062732, -0.024534, -0.068167} //D1
-, { -0.030008, -0.095457, -0.035442, -0.100892} //D2
-, { -0.030008, -0.095457, -0.035442, -0.100892} //D3
-}
-,
-{ //TOY_PIVOT
- { -317.5, -357.5, -322.5, -362.5} //D0 actually X (mm)
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-,
-{ // TOY_CONFIRM
- { -337.5, -377.5, -342.5, -382.5} //D0
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-}
-};
-
-static const int INDEX_LEFTMOST_COL[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { -1, -1, -1, -1} //D0
-, { -1, -1, -1, -1} //D1
-, { -1, 0, -1, 0} //D2
-, { -1, 0, -1, 0} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ -1, -1, -1, -1} //D0
-, { -1, -1, -1, -1} //D1
-, { -1, 0, -1, 0} //D2
-, { -1, 0, -1, 0} //D3
-}
-,
-{ // LARGE_PIVOT
- { -2, -1, -2, -1} //D0
-, { -2, -1, -2, -1} //D1
-, { -1, 0, -1, 0} //D2
-, { -1, 0, -1, 0} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ -2, -1, -2, -1} //D0
-, { -2, -1, -2, -1} //D1
-, { -1, 0, -1, 0} //D2
-, { -1, 0, -1, 0} //D3
-}
-,
-{ //TOY_PIVOT
- { 1, 1, 1, 1} //D0 actually 1st column
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-,
-{ // TOY_CONFIRM
- { 1, 1, 1, 1} //D0 actually 1st column
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-};
-
-
-
-static const int INDEX_RIGHTMOST_COL[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
-{ // SMALL_PIVOT
- { 1, 2, 1, 2} //D0
-, { 1, 2, 1, 2} //D1
-, { 1, 1, 1, 1} //D2
-, { 1, 1, 1, 1} //D3
-}
-,
-{ // SMALL_CONFIRM
-{ 1, 2, 1, 2} //D0
-, { 1, 2, 1, 2} //D1
-, { 1, 1, 1, 1} //D2
-, { 1, 1, 1, 1} //D3
-}
-,
-{ // LARGE_PIVOT
- { 2, 2, 2, 2} //D0
-, { 2, 2, 2, 2} //D1
-, { 1, 1, 1, 1} //D2
-, { 1, 1, 1, 1} //D3
-}
-,
-{ // LARGE_CONFIRM
-{ 2, 2, 2, 2} //D0
-, { 2, 2, 2, 2} //D1
-, { 1, 1, 1, 1} //D2
-, { 1, 1, 1, 1} //D3
-}
-,
-{ //TOY_PIVOT
- { 9, 10, 9, 10} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-,
-{ // TOY_CONFIRM
- { 10, 10, 10, 10} //D0
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
-}
-};
-
-static const float Z_CENTER_STGC_DETECTOR[STGC_TYPES][STGC_LAYERS]={
- { 7377.5, 7388.8, 7400.2, 7411.5} // SMALL_PIVOT
-, { 7087.5, 7098.8, 7110.2, 7121.5} // SMALL_CONFIRM
-, { 7511.5, 7522.8, 7534.2, 7545.5} // LARGE_PIVOT
-, { 7801.5, 7812.8, 7824.2, 7835.5} // LARGE_CONFIRM
-, { 18.0, 29.3, 40.7, 52.0} // TOY_PIVOT
-, { 308.0, 319.3, 330.7, 342.0} // TOY_CONFIRM
-};
-
-static const std::string STGC_LAYER_NAMES[STGC_LAYERS]={
- "Layer 1"
-, "Layer 2"
-, "Layer 3"
-, "Layer 4"
-};
-
-static const std::string STGC_DETECTOR_NAMES[STGC_DETECTORS]={
- "STGC Detector 0"
-, "STGC Detector 1"
-, "STGC Detector 2"
-, "STGC Detector 3"
-};
-
-static const std::string STGC_MODULE_NAMES[STGC_MODULES]={
- "STGC Module 1"
-, "STGC Module 2"
-, "STGC Module 3"
-};
-
-static const std::string PIVOT_CONFIRM_NAMES[STGC_WEDGES]={
- "Pivot"
-, "Confirm"
-};
-
-static const std::string SECTOR_NAMES[SECTOR_TYPES]={
- "Small"
-, "Large"
-, "Toy"
-};
-
-static const std::string WEDGE_NAMES[STGC_TYPES]={
- "SmallPivot"
-, "SmallConfirm"
-, "LargePivot"
-, "LargeConfirm"
-, "ToyPivot"
-, "ToyConfirm"
-};
-
-static const std::string SHORT_WEDGE_NAMES[STGC_TYPES]={ "SP" , "SC"
- , "LP" , "LC"
- , "TP" , "TC" };
-static const int MM_TYPE[SECTORS_IN_OCTANT][MM_MODULES]={
- { REGULAR , CORNERED , REGULAR , REGULAR }
-, { REGULAR , REGULAR , REGULAR , EXTRUDED }
-};
-
-static const float MM_H0[SECTORS_IN_OCTANT][MM_MODULES]={
- { UNDEF , 1966.0, UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-};
-
-static const float MM_H1[SECTORS_IN_OCTANT][MM_MODULES]={
- { 1016.0, 2056.3, 2816.0, 3666.0}
-, { 982.0, 1932.0, 2882.0, 3832.0}
-};
-
-static const float MM_H2[SECTORS_IN_OCTANT][MM_MODULES]={
- { 1946.0, 2796.0, 3646.0, 4471.0}
-, { 1912.0, 2862.0, 3812.0, 4287.0}
-};
-
-static const float MM_H3[SECTORS_IN_OCTANT][MM_MODULES]={
- { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , 4742.0}
-};
-
-static const float MM_D[SECTORS_IN_OCTANT][MM_MODULES]={
- { UNDEF , 1158.4, UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , UNDEF }
-};
-
-static const float MM_A[SECTORS_IN_OCTANT][MM_MODULES]={
- { 371.4, 1233.2, 1392.9, 1571.6}
-, { 582.3, 1145.1, 1707.9, 2270.7}
-};
-
-static const float MM_B[SECTORS_IN_OCTANT][MM_MODULES]={
- { 1141.8, 1388.7, 1567.4, 1740.8}
-, { 1133.3, 1696.1, 2258.9, 2540.3}
-};
-
-static const float MM_C[SECTORS_IN_OCTANT][MM_MODULES]={
- { UNDEF , UNDEF , UNDEF , UNDEF }
-, { UNDEF , UNDEF , UNDEF , 2220.0}
-};
-
-static const float MM_ZMIN[SECTORS_IN_OCTANT] ={ 7104.5, 7528.5};
-static const float MM_ZMAX[SECTORS_IN_OCTANT] ={ 7394.5, 7818.5};
-
-static const std::string MM_MODULE_NAMES[MM_MODULES]={
- "MM Module 1"
-, "MM Module 2"
-, "MM Module 3"
-, "MM Module 4"
-};
-
-static const std::string MM_TYPE_NAMES[MM_TYPES]={
- "Regular"
-, "Cornered"
-, "Extruded"
-};
-
-static const float MDT_LOST = 72.0;
-static const float MDT_ZMIN[SECTORS_IN_OCTANT] ={ 14458.0, 14049.0};
-static const float MDT_ZMAX[SECTORS_IN_OCTANT] ={ 14124.0, 13715.0};
-
-static const float MDT_HMIN[SECTORS_IN_OCTANT][MDT_MODULES] ={
-{ 1770.0, 3725.0, 5680.0, 7635.0}
-,{ 1770.0, 3485.0, 5440.0, 7395.0}
-};
-
-static const float MDT_HMAX[SECTORS_IN_OCTANT][MDT_MODULES] ={
-{ 3690.0, 5645.0, 7600.0, 9555.0}
-,{ 3450.0, 5405.0, 7360.0, 9315.0}
-};
-
-static const float MDT_HALF_B[SECTORS_IN_OCTANT] ={ 417.5, 593.3};
-static const float MDT_HALF_OPENING[SECTORS_IN_OCTANT] ={ 8.5, 14.0};
-
-
-
-
-#endif
+#ifndef STGCgeometry_h
+#define STGCgeometry_h
+
+// NSW STGC
+
+static const float H1[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 1019.4, 1019.4, 1019.4, 1019.4} //D0
+, { 1681.4, 1651.4, 1621.4, 1591.4} //D1
+, { 2541.4, 2541.4, 2541.4, 2541.4} //D2
+, { 3510.9, 3510.9, 3510.9, 3510.9} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 1019.4, 1019.4, 1019.4, 1019.4} //D0
+, { 1681.4, 1651.4, 1621.4, 1591.4} //D1
+, { 2541.4, 2541.4, 2541.4, 2541.4} //D2
+, { 3510.9, 3510.9, 3510.9, 3510.9} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 982.0, 982.0, 982.0, 982.0} //D0
+, { 1678.0, 1648.0, 1618.0, 1588.0} //D1
+, { 2538.0, 2538.0, 2538.0, 2538.0} //D2
+, { 3598.0, 3598.0, 3598.0, 3598.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 982.0, 982.0, 982.0, 982.0} //D0
+, { 1678.0, 1648.0, 1618.0, 1588.0} //D1
+, { 2538.0, 2538.0, 2538.0, 2538.0} //D2
+, { 3598.0, 3598.0, 3598.0, 3598.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { -413.5, -413.5, -413.5, -413.5} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { -413.5, -413.5, -413.5, -413.5} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+
+};
+
+static const float H2[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 1681.4, 1651.4, 1621.4, 1591.4} //D0
+, { 2531.4, 2531.4, 2531.4, 2531.4} //D1
+, { 3500.9, 3500.9, 3500.9, 3500.9} //D2
+, { 4470.4, 4470.4, 4470.4, 4470.4} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 1681.4, 1651.4, 1621.4, 1591.4} //D0
+, { 2531.4, 2531.4, 2531.4, 2531.4} //D1
+, { 3500.9, 3500.9, 3500.9, 3500.9} //D2
+, { 4470.4, 4470.4, 4470.4, 4470.4} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 1678.0, 1648.0, 1618.0, 1588.0} //D0
+, { 2528.0, 2528.0, 2528.0, 2528.0} //D1
+, { 3588.0, 3588.0, 3588.0, 3588.0} //D2
+, { 4398.0, 4398.0, 4398.0, 4398.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 1678.0, 1648.0, 1618.0, 1588.0} //D0
+, { 2528.0, 2528.0, 2528.0, 2528.0} //D1
+, { 3588.0, 3588.0, 3588.0, 3588.0} //D2
+, { 4398.0, 4398.0, 4398.0, 4398.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { 413.5, 413.5, 413.5, 413.5} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 413.5, 413.5, 413.5, 413.5} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+static const float H3[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
+}
+,
+{ // SMALL_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
+}
+,
+{ // LARGE_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { 4648.0, 4648.0, 4648.0, 4648.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { 4648.0, 4648.0, 4648.0, 4648.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const float A[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 384.0, 384.0, 384.0, 384.0} //D0
+, { 677.5, 664.2, 650.9, 637.6} //D1
+, { 1056.5, 1056.5, 1056.5, 1056.5} //D2
+, { 1260.3, 1260.3, 1260.3, 1260.3} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 420.0, 420.0, 420.0, 420.0} //D0
+, { 713.5, 700.2, 686.9, 673.6} //D1
+, { 1092.5, 1092.5, 1092.5, 1092.5} //D2
+, { 1296.3, 1296.3, 1296.3, 1296.3} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 598.0, 598.0, 598.0, 598.0} //D0
+, { 843.4, 832.8, 822.2, 811.7} //D1
+, { 1149.1, 1149.1, 1149.1, 1149.1} //D2
+, { 1777.1, 1777.1, 1777.1, 1777.1} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 634.0, 634.0, 634.0, 634.0} //D0
+, { 879.4, 868.8, 858.2, 847.7} //D1
+, { 1185.1, 1185.1, 1185.1, 1185.1} //D2
+, { 1813.1, 1813.1, 1813.1, 1813.1} //D3
+}
+,
+{ //TOY_PIVOT
+ { 834.0, 834.0, 834.0, 834.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 834.0, 834.0, 834.0, 834.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+static const float B[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 677.5, 664.2, 650.9, 637.6} //D0
+, { 1054.4, 1054.4, 1054.4, 1054.4} //D1
+, { 1258.2, 1258.2, 1258.2, 1258.2} //D2
+, { 1462.0, 1462.0, 1462.0, 1462.0} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 713.5, 700.2, 686.9, 673.6} //D0
+, { 1090.4, 1090.4, 1090.4, 1090.4} //D1
+, { 1294.2, 1294.2, 1294.2, 1294.2} //D2
+, { 1498.0, 1498.0, 1498.0, 1498.0} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 843.4, 832.8, 822.2, 811.7} //D0
+, { 1143.2, 1143.2, 1143.2, 1143.2} //D1
+, { 1771.1, 1771.1, 1771.1, 1771.1} //D2
+, { 2251.0, 2251.0, 2251.0, 2251.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 879.4, 868.8, 858.2, 847.7} //D0
+, { 1179.2, 1179.2, 1179.2, 1179.2} //D1
+, { 1807.1, 1807.1, 1807.1, 1807.1} //D2
+, { 2287.0, 2287.0, 2287.0, 2287.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { 834.0, 834.0, 834.0, 834.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 834.0, 834.0, 834.0, 834.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const float H1_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 1032.9, 1032.9, 1032.9, 1032.9} //D0
+, { 1694.9, 1664.9, 1634.9, 1604.9} //D1
+, { 2554.9, 2554.9, 2554.9, 2554.9} //D2
+, { 3524.4, 3524.4, 3524.4, 3524.4} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 1032.9, 1032.9, 1032.9, 1032.9} //D0
+, { 1694.9, 1664.9, 1634.9, 1604.9} //D1
+, { 2554.9, 2554.9, 2554.9, 2554.9} //D2
+, { 3524.4, 3524.4, 3524.4, 3524.4} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 995.5, 995.5, 995.5, 995.5} //D0
+, { 1691.5, 1661.5, 1631.5, 1601.5} //D1
+, { 2551.5, 2551.5, 2551.5, 2551.5} //D2
+, { 3611.5, 3611.5, 3611.5, 3611.5} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 995.5, 995.5, 995.5, 995.5} //D0
+, { 1691.5, 1661.5, 1631.5, 1601.5} //D1
+, { 2551.5, 2551.5, 2551.5, 2551.5} //D2
+, { 3611.5, 3611.5, 3611.5, 3611.5} //D3
+}
+,
+{ //TOY_PIVOT
+ { -400.0, -400.0, -400.0, -400.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { -400.0, -400.0, -400.0, -400.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const float H2_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 1667.9, 1637.9, 1607.9, 1577.9} //D0
+, { 2517.9, 2517.9, 2517.9, 2517.9} //D1
+, { 3470.9, 3470.9, 3470.9, 3470.9} //D2
+, { 4440.4, 4440.4, 4440.4, 4440.4} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 1667.9, 1637.9, 1607.9, 1577.9} //D0
+, { 2517.9, 2517.9, 2517.9, 2517.9} //D1
+, { 3470.9, 3470.9, 3470.9, 3470.9} //D2
+, { 4440.4, 4440.4, 4440.4, 4440.4} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 1664.5, 1634.5, 1604.5, 1574.5} //D0
+, { 2514.5, 2514.5, 2514.5, 2514.5} //D1
+, { 3558.0, 3558.0, 3558.0, 3558.0} //D2
+, { 4368.0, 4368.0, 4368.0, 4368.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 1664.5, 1634.5, 1604.5, 1574.5} //D0
+, { 2514.5, 2514.5, 2514.5, 2514.5} //D1
+, { 3558.0, 3558.0, 3558.0, 3558.0} //D2
+, { 4368.0, 4368.0, 4368.0, 4368.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { 400.0, 400.0, 400.0, 400.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 400.0, 400.0, 400.0, 400.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const float H3_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
+}
+,
+{ // SMALL_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D3
+}
+,
+{ // LARGE_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { 4618.0, 4618.0, 4618.0, 4618.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D1
+, { UNDEF , UNDEF , UNDEF , UNDEF } //D2
+, { 4618.0, 4618.0, 4618.0, 4618.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { UNDEF , UNDEF , UNDEF , UNDEF } //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const float A_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 356.8, 356.8, 356.8, 356.8} //D0
+, { 650.3, 637.0, 623.7, 610.4} //D1
+, { 1025.5, 1025.5, 1025.5, 1025.5} //D2
+, { 1229.3, 1229.3, 1229.3, 1229.3} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 392.8, 392.8, 392.8, 392.8} //D0
+, { 686.3, 673.0, 659.7, 646.4} //D1
+, { 1061.5, 1061.5, 1061.5, 1061.5} //D2
+, { 1265.3, 1265.3, 1265.3, 1265.3} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 569.2, 569.2, 569.2, 569.2} //D0
+, { 814.7, 804.1, 793.5, 782.9} //D1
+, { 1124.5, 1124.5, 1124.5, 1124.5} //D2
+, { 1752.5, 1752.5, 1752.5, 1752.5} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 605.2, 605.2, 605.2, 605.2} //D0
+, { 850.7, 840.1, 829.5, 818.9} //D1
+, { 1160.5, 1160.5, 1160.5, 1160.5} //D2
+, { 1788.5, 1788.5, 1788.5, 1788.5} //D3
+}
+,
+{ //TOY_PIVOT
+ { 800.0, 800.0, 800.0, 800.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 800.0, 800.0, 800.0, 800.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+static const float B_ACTIVE[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 638.3, 625.0, 611.7, 598.4} //D0
+, { 1015.2, 1015.2, 1015.2, 1015.2} //D1
+, { 1218.1, 1218.1, 1218.1, 1218.1} //D2
+, { 1421.9, 1421.9, 1421.9, 1421.9} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ 674.3, 661.0, 647.7, 634.4} //D0
+, { 1051.2, 1051.2, 1051.2, 1051.2} //D1
+, { 1254.1, 1254.1, 1254.1, 1254.1} //D2
+, { 1457.9, 1457.9, 1457.9, 1457.9} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 805.2, 794.6, 784.0, 773.4} //D0
+, { 1104.9, 1104.9, 1104.9, 1104.9} //D1
+, { 1720.8, 1720.8, 1720.8, 1720.8} //D2
+, { 2200.6, 2200.6, 2200.6, 2200.6} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ 841.2, 830.6, 820.0, 809.4} //D0
+, { 1140.9, 1140.9, 1140.9, 1140.9} //D1
+, { 1756.8, 1756.8, 1756.8, 1756.8} //D2
+, { 2236.6, 2236.6, 2236.6, 2236.6} //D3
+}
+,
+{ //TOY_PIVOT
+ { 800.0, 800.0, 800.0, 800.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 800.0, 800.0, 800.0, 800.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+
+static const float A_ADAPTERS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 428.0, 428.0, 428.0, 428.0} //D0
+, { 787.5, 774.2, 760.9, 747.6} //D1
+, { 1136.5, 1136.5, 1136.5, 1136.5} //D2
+, { 1340.3, 1340.3, 1340.3, 1340.3} //D3
+}
+,
+{ // SMALL_CONFIRM
+ { 464.0, 464.0, 464.0, 464.0} //D0
+, { 823.5, 810.2, 796.9, 783.6} //D1
+, { 1172.5, 1172.5, 1172.5, 1172.5} //D2
+, { 1376.3, 1376.3, 1376.3, 1376.3} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 642.0, 642.0, 642.0, 642.0} //D0
+, { 953.4, 942.8, 932.2, 921.7} //D1
+, { 1229.1, 1229.1, 1229.1, 1229.1} //D2
+, { 1857.1, 1857.1, 1857.1, 1857.1} //D3
+}
+,
+{ // LARGE_CONFIRM
+ { 678.0, 678.0, 678.0, 678.0} //D0
+, { 989.4, 978.8, 968.2, 957.7} //D1
+, { 1265.1, 1265.1, 1265.1, 1265.1} //D2
+, { 1893.1, 1893.1, 1893.1, 1893.1} //D3
+}
+,
+{ //TOY_PIVOT
+ { 878.0, 878.0, 878.0, 878.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 878.0, 878.0, 878.0, 878.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+static const float B_ADAPTERS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 721.5, 708.2, 694.9, 681.6} //D0
+, { 1098.4, 1098.4, 1098.4, 1098.4} //D1
+, { 1338.2, 1338.2, 1338.2, 1338.2} //D2
+, { 1542.0, 1542.0, 1542.0, 1542.0} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ 757.5, 744.2, 730.9, 717.6} //D0
+, { 1134.4, 1134.4, 1134.4, 1134.4} //D1
+, { 1374.2, 1374.2, 1374.2, 1374.2} //D2
+, { 1578.0, 1578.0, 1578.0, 1578.0} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 887.4, 876.8, 866.2, 855.7} //D0
+, { 1187.2, 1187.2, 1187.2, 1187.2} //D1
+, { 1851.1, 1851.1, 1851.1, 1851.1} //D2
+, { 2331.0, 2331.0, 2331.0, 2331.0} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ 923.4, 912.8, 902.2, 891.7} //D0
+, { 1223.2, 1223.2, 1223.2, 1223.2} //D1
+, { 1887.1, 1887.1, 1887.1, 1887.1} //D2
+, { 2367.0, 2367.0, 2367.0, 2367.0} //D3
+}
+,
+{ //TOY_PIVOT
+ { 878.0, 878.0, 878.0, 878.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { 878.0, 878.0, 878.0, 878.0} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+
+static const float PAD_PHI_SUBDIVISION = 1.5; // Module 1 wrt Modules 2 and 3
+static const float PAD_PHI_DIVISION = 0.130900; // Modules 2 and 3 in radians
+
+
+static const float H_PAD_ROW_0[STGC_TYPES][STGC_LAYERS]={
+ { 922.5, 883.9, 920.3, 881.5} // SMALL_PIVOT
+ ,{ 867.0, 829.9, 865.0, 827.7} // SMALL_CONFIRM
+ ,{ 939.3, 899.9, 937.0, 897.5} // LARGE_PIVOT
+ ,{ 954.4, 913.4, 951.8, 910.7} // LARGE_CONFIRM
+ ,{ -397.5, -437.5, -402.5, -442.5} //TOY_PIVOT
+ ,{ -417.5, -457.5, -422.5, -462.5} // TOY_CONFIRM
+ };
+
+
+static const float PAD_HEIGHT[STGC_TYPES][STGC_LAYERS]={
+ { 80.000, 80.123, 80.246, 80.368} // SMALL_PIVOT
+ ,{ 76.855, 76.978, 77.101, 77.224} // SMALL_CONFIRM
+ ,{ 81.453, 81.576, 81.699, 81.821} // LARGE_PIVOT
+ ,{ 84.598, 84.721, 84.843, 84.966} // LARGE_CONFIRM
+ ,{ 80.000, 80.000, 80.000, 80.000} //TOY_PIVOT
+ ,{ 80.000, 80.000, 80.000, 80.000} // TOY_CONFIRM
+ };
+
+static const float Z_DANIEL[STGC_TYPES][STGC_LAYERS]={
+ { 7377.5, 7388.8, 7400.2, 7411.5} // SMALL_PIVOT
+ ,{ 7087.5, 7098.8, 7110.2, 7121.5} // SMALL_CONFIRM
+ ,{ 7511.5, 7522.8, 7534.2, 7545.5} // LARGE_PIVOT
+ ,{ 7801.5, 7812.8, 7824.2, 7835.5} // LARGE_CONFIRM
+ ,{ -1, -1, -1, -1} //TOY_PIVOT
+ ,{ -1, -1, -1, -1} // TOY_CONFIRM
+ };
+
+static const float Z_CURRENT_LAYOUT[STGC_TYPES][STGC_LAYERS]={
+ { 7323.1, 7334.2, 7345.3, 7356.4} // SMALL_PIVOT
+ ,{ 7058.2, 7069.3, 7080.4, 7091.5} // SMALL_CONFIRM
+ ,{ 7420.2, 7431.3, 7442.4, 7453.5} // LARGE_PIVOT
+ ,{ 7685.1, 7696.2, 7707.3, 7718.4} // LARGE_CONFIRM
+ ,{ -397.5, -437.5, -402.5, -442.5} //TOY_PIVOT
+ ,{ -417.5, -457.5, -422.5, -462.5} // TOY_CONFIRM
+};
+
+static const int FIRST_PAD_ROW_DIVISION[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 2, 3, 2, 3} //D0
+, { 10, 10, 10, 10} //D1
+, { 21, 22, 21, 22} //D2
+, { 33, 34, 33, 34} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ 3, 3, 3, 3} //D0
+, { 11, 12, 11, 11} //D1
+, { 23, 23, 23, 23} //D2
+, { 35, 36, 35, 36} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 1, 2, 1, 2} //D0
+, { 10, 10, 9, 9} //D1
+, { 21, 21, 20, 21} //D2
+, { 34, 34, 33, 34} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ 1, 2, 1, 2} //D0
+, { 9, 10, 9, 9} //D1
+, { 20, 20, 20, 20} //D2
+, { 32, 33, 32, 32} //D3
+}
+,
+{ //TOY_PIVOT
+ { 1, 1, 1, 1} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+,
+{ // TOY_CONFIRM
+ { 1, 1, 1, 1} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+};
+
+static const int PAD_ROWS[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 9, 8, 8, 7} //D0
+, { 11, 12, 11, 12} //D1
+, { 12, 12, 12, 12} //D2
+, { 12, 12, 12, 12} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ 9, 9, 8, 8} //D0
+, { 12, 11, 12, 12} //D1
+, { 12, 13, 12, 13} //D2
+, { 13, 12, 13, 12} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 9, 8, 8, 8} //D0
+, { 11, 11, 12, 12} //D1
+, { 12, 13, 13, 13} //D2
+, { 12, 13, 13, 13} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ 9, 8, 8, 7} //D0
+, { 11, 10, 11, 11} //D1
+, { 12, 13, 12, 12} //D2
+, { 13, 12, 13, 13} //D3
+}
+,
+{ //TOY_PIVOT
+ { 10, 11, 10, 11} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+,
+{ // TOY_CONFIRM
+ { 11, 11, 11, 11} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+};
+
+
+
+static const float PAD_COL_PHI0[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 0.002717, -0.040916, -0.002717, -0.046351} //D0
+, { 0.002717, -0.040916, -0.002717, -0.046351} //D1
+, { 0.002717, -0.062732, -0.002717, -0.068167} //D2
+, { 0.002717, -0.062732, -0.002717, -0.068167} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ -0.019099, -0.062732, -0.024534, -0.068167} //D0
+, { -0.019099, -0.062732, -0.024534, -0.068167} //D1
+, { -0.030008, -0.095457, -0.035442, -0.100892} //D2
+, { -0.030008, -0.095457, -0.035442, -0.100892} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 0.002717, -0.040916, -0.002717, -0.046351} //D0
+, { 0.002717, -0.040916, -0.002717, -0.046351} //D1
+, { 0.002717, -0.062732, -0.002717, -0.068167} //D2
+, { 0.002717, -0.062732, -0.002717, -0.068167} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ -0.019099, -0.062732, -0.024534, -0.068167} //D0
+, { -0.019099, -0.062732, -0.024534, -0.068167} //D1
+, { -0.030008, -0.095457, -0.035442, -0.100892} //D2
+, { -0.030008, -0.095457, -0.035442, -0.100892} //D3
+}
+,
+{ //TOY_PIVOT
+ { -317.5, -357.5, -322.5, -362.5} //D0 actually X (mm)
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+,
+{ // TOY_CONFIRM
+ { -337.5, -377.5, -342.5, -382.5} //D0
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+}
+};
+
+static const int INDEX_LEFTMOST_COL[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { -1, -1, -1, -1} //D0
+, { -1, -1, -1, -1} //D1
+, { -1, 0, -1, 0} //D2
+, { -1, 0, -1, 0} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ -1, -1, -1, -1} //D0
+, { -1, -1, -1, -1} //D1
+, { -1, 0, -1, 0} //D2
+, { -1, 0, -1, 0} //D3
+}
+,
+{ // LARGE_PIVOT
+ { -2, -1, -2, -1} //D0
+, { -2, -1, -2, -1} //D1
+, { -1, 0, -1, 0} //D2
+, { -1, 0, -1, 0} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ -2, -1, -2, -1} //D0
+, { -2, -1, -2, -1} //D1
+, { -1, 0, -1, 0} //D2
+, { -1, 0, -1, 0} //D3
+}
+,
+{ //TOY_PIVOT
+ { 1, 1, 1, 1} //D0 actually 1st column
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+,
+{ // TOY_CONFIRM
+ { 1, 1, 1, 1} //D0 actually 1st column
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+};
+
+
+
+static const int INDEX_RIGHTMOST_COL[STGC_TYPES][STGC_DETECTORS][STGC_LAYERS]={
+{ // SMALL_PIVOT
+ { 1, 2, 1, 2} //D0
+, { 1, 2, 1, 2} //D1
+, { 1, 1, 1, 1} //D2
+, { 1, 1, 1, 1} //D3
+}
+,
+{ // SMALL_CONFIRM
+{ 1, 2, 1, 2} //D0
+, { 1, 2, 1, 2} //D1
+, { 1, 1, 1, 1} //D2
+, { 1, 1, 1, 1} //D3
+}
+,
+{ // LARGE_PIVOT
+ { 2, 2, 2, 2} //D0
+, { 2, 2, 2, 2} //D1
+, { 1, 1, 1, 1} //D2
+, { 1, 1, 1, 1} //D3
+}
+,
+{ // LARGE_CONFIRM
+{ 2, 2, 2, 2} //D0
+, { 2, 2, 2, 2} //D1
+, { 1, 1, 1, 1} //D2
+, { 1, 1, 1, 1} //D3
+}
+,
+{ //TOY_PIVOT
+ { 9, 10, 9, 10} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+,
+{ // TOY_CONFIRM
+ { 10, 10, 10, 10} //D0
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+, { UNDEFINED , UNDEFINED , UNDEFINED , UNDEFINED }
+}
+};
+
+static const float Z_CENTER_STGC_DETECTOR[STGC_TYPES][STGC_LAYERS]={
+ { 7377.5, 7388.8, 7400.2, 7411.5} // SMALL_PIVOT
+, { 7087.5, 7098.8, 7110.2, 7121.5} // SMALL_CONFIRM
+, { 7511.5, 7522.8, 7534.2, 7545.5} // LARGE_PIVOT
+, { 7801.5, 7812.8, 7824.2, 7835.5} // LARGE_CONFIRM
+, { 18.0, 29.3, 40.7, 52.0} // TOY_PIVOT
+, { 308.0, 319.3, 330.7, 342.0} // TOY_CONFIRM
+};
+
+static const std::string STGC_LAYER_NAMES[STGC_LAYERS]={
+ "Layer 1"
+, "Layer 2"
+, "Layer 3"
+, "Layer 4"
+};
+
+static const std::string STGC_DETECTOR_NAMES[STGC_DETECTORS]={
+ "STGC Detector 0"
+, "STGC Detector 1"
+, "STGC Detector 2"
+, "STGC Detector 3"
+};
+
+static const std::string STGC_MODULE_NAMES[STGC_MODULES]={
+ "STGC Module 1"
+, "STGC Module 2"
+, "STGC Module 3"
+};
+
+static const std::string PIVOT_CONFIRM_NAMES[STGC_WEDGES]={
+ "Pivot"
+, "Confirm"
+};
+
+static const std::string SECTOR_NAMES[SECTOR_TYPES]={
+ "Small"
+, "Large"
+, "Toy"
+};
+
+static const std::string WEDGE_NAMES[STGC_TYPES]={
+ "SmallPivot"
+, "SmallConfirm"
+, "LargePivot"
+, "LargeConfirm"
+, "ToyPivot"
+, "ToyConfirm"
+};
+
+static const std::string SHORT_WEDGE_NAMES[STGC_TYPES]={ "SP" , "SC"
+ , "LP" , "LC"
+ , "TP" , "TC" };
+static const int MM_TYPE[SECTORS_IN_OCTANT][MM_MODULES]={
+ { REGULAR , CORNERED , REGULAR , REGULAR }
+, { REGULAR , REGULAR , REGULAR , EXTRUDED }
+};
+
+static const float MM_H0[SECTORS_IN_OCTANT][MM_MODULES]={
+ { UNDEF , 1966.0, UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+};
+
+static const float MM_H1[SECTORS_IN_OCTANT][MM_MODULES]={
+ { 1016.0, 2056.3, 2816.0, 3666.0}
+, { 982.0, 1932.0, 2882.0, 3832.0}
+};
+
+static const float MM_H2[SECTORS_IN_OCTANT][MM_MODULES]={
+ { 1946.0, 2796.0, 3646.0, 4471.0}
+, { 1912.0, 2862.0, 3812.0, 4287.0}
+};
+
+static const float MM_H3[SECTORS_IN_OCTANT][MM_MODULES]={
+ { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , 4742.0}
+};
+
+static const float MM_D[SECTORS_IN_OCTANT][MM_MODULES]={
+ { UNDEF , 1158.4, UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , UNDEF }
+};
+
+static const float MM_A[SECTORS_IN_OCTANT][MM_MODULES]={
+ { 371.4, 1233.2, 1392.9, 1571.6}
+, { 582.3, 1145.1, 1707.9, 2270.7}
+};
+
+static const float MM_B[SECTORS_IN_OCTANT][MM_MODULES]={
+ { 1141.8, 1388.7, 1567.4, 1740.8}
+, { 1133.3, 1696.1, 2258.9, 2540.3}
+};
+
+static const float MM_C[SECTORS_IN_OCTANT][MM_MODULES]={
+ { UNDEF , UNDEF , UNDEF , UNDEF }
+, { UNDEF , UNDEF , UNDEF , 2220.0}
+};
+
+static const float MM_ZMIN[SECTORS_IN_OCTANT] ={ 7104.5, 7528.5};
+static const float MM_ZMAX[SECTORS_IN_OCTANT] ={ 7394.5, 7818.5};
+
+static const std::string MM_MODULE_NAMES[MM_MODULES]={
+ "MM Module 1"
+, "MM Module 2"
+, "MM Module 3"
+, "MM Module 4"
+};
+
+static const std::string MM_TYPE_NAMES[MM_TYPES]={
+ "Regular"
+, "Cornered"
+, "Extruded"
+};
+
+static const float MDT_LOST = 72.0;
+static const float MDT_ZMIN[SECTORS_IN_OCTANT] ={ 14458.0, 14049.0};
+static const float MDT_ZMAX[SECTORS_IN_OCTANT] ={ 14124.0, 13715.0};
+
+static const float MDT_HMIN[SECTORS_IN_OCTANT][MDT_MODULES] ={
+{ 1770.0, 3725.0, 5680.0, 7635.0}
+,{ 1770.0, 3485.0, 5440.0, 7395.0}
+};
+
+static const float MDT_HMAX[SECTORS_IN_OCTANT][MDT_MODULES] ={
+{ 3690.0, 5645.0, 7600.0, 9555.0}
+,{ 3450.0, 5405.0, 7360.0, 9315.0}
+};
+
+static const float MDT_HALF_B[SECTORS_IN_OCTANT] ={ 417.5, 593.3};
+static const float MDT_HALF_OPENING[SECTORS_IN_OCTANT] ={ 8.5, 14.0};
+
+
+
+
+#endif
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/L1TdrStgcTriggerLogic.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/L1TdrStgcTriggerLogic.cxx
index 0d90a12666c71be5b0c545b92e5c70a2a6ec7088..ed010f10ed867df06c824ff592db0cd9bd13a3d5 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/L1TdrStgcTriggerLogic.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/L1TdrStgcTriggerLogic.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/L1TdrStgcTriggerLogic.h"
@@ -10,15 +10,8 @@
 #include "TrigT1NSWSimTools/vector_utils.h"
 #include "TrigT1NSWSimTools/GeoUtils.h"
 
-#include <algorithm>
-#include <cassert>
-#include <cstdio>
 #include <fstream>
 #include <functional>
-#include <iostream>
-#include <sstream>
-#include <string>
-#include <vector>
 #include <numeric>//iota
 
 using std::distance;
@@ -26,14 +19,13 @@ using std::set_intersection;
 
 namespace {
     const double padTimingEfficiency = 0.95; // set to -1 to disable
-    MsgStream& operator>>(MsgStream& m, const MSG::Color&c) {m.setColor(c, MSG::BLACK);return m;}
 }
 
 namespace NSWL1{
     
     
-    L1TdrStgcTriggerLogic::L1TdrStgcTriggerLogic(IMessageSvc*  M,  std::string source):
-         m_writePickle(false), m_picklePrefix("./"),m_msglvl(-1), m_msg(M, source){
+  L1TdrStgcTriggerLogic::L1TdrStgcTriggerLogic():
+    m_msg("L1TdrStgcTriggerLogic"), m_writePickle(false), m_picklePrefix("./"){
     }
     //-------------------------------------
     L1TdrStgcTriggerLogic::~L1TdrStgcTriggerLogic() {}
@@ -164,9 +156,9 @@ namespace NSWL1{
             patternEta.push_back(sl3.at(0));
             patternEta.push_back(sl4.at(0));
 
-            int    multipletid ;
-            int    moduleid ;
-            int    sectortype ;
+            int    multipletid=-1 ;
+            int    moduleid=-1 ;
+            int    sectortype=-1 ;
 
 //Please mind the indentation
             if (sl1 == "11") {
@@ -305,7 +297,7 @@ namespace NSWL1{
         std::vector< size_t > out;
         out.reserve(padIndices.size());
         for (size_t i = 0; i < padIndices.size(); ++i) {
-            if (rand.Uniform(1) < padTimingEfficiency)
+            if (m_rand.Uniform(1) < padTimingEfficiency)
             out.push_back(padIndices.at(i));
         }
         return out;
@@ -388,11 +380,11 @@ namespace NSWL1{
         remove3of4Redundant4of4(i4of4trig, i3of4trig);
         remove3of4Redundant4of4(o4of4trig, o3of4trig);
         
-        m_msg>>MSG::CYAN<<MSG::DEBUG <<  "SingleWedge triggers :"
-                << " inner : " << i3of4trig.size() << "(3/4) " << i4of4trig.size()
-                << "(4/4)"
-                << " outer : " << o3of4trig.size() << "(3/4) " << o4of4trig.size()
-                << "(4/4)" << endmsg;
+        ATH_MSG_DEBUG("SingleWedge triggers :"
+		      << " inner : " << i3of4trig.size() << "(3/4) " << i4of4trig.size()
+		      << "(4/4)"
+		      << " outer : " << o3of4trig.size() << "(3/4) " << o4of4trig.size()
+		      << "(4/4)");
         
         std::vector< SingleWedgePadTrigger > innerTrigs, outerTrigs; // merge 4/4 and 3/4
         innerTrigs.insert(innerTrigs.end(), i3of4trig.begin(), i3of4trig.end());
@@ -423,7 +415,7 @@ namespace NSWL1{
                     
                     Polygon inoutovl=largestIntersection(innerArea,Project(outerArea,Z1,Z0));
                     float overlap=area(inoutovl);
-                     m_msg>>MSG::CYAN <<"OVERLAP  "<<overlap<<" Inner "<<area(innerArea)<<" Outer "<<area(outerArea)<<endmsg;
+		    ATH_MSG_DEBUG("OVERLAP  "<<overlap<<" Inner "<<area(innerArea)<<" Outer "<<area(outerArea));
                     if (overlap >0) {
                         m_secTrigCand.emplace_back(it.setCombined(), ot.setCombined());
                     }
@@ -435,7 +427,7 @@ namespace NSWL1{
             if (acceptSingleWedgeInTransition) {
                 for ( auto& it : innerTrigs){
                     if (it.alreadyCombined()){
-                         m_msg>>MSG::CYAN<<MSG::DEBUG<<"Inner SingleWedge trigger already combined, skipping"<<endmsg;
+		      ATH_MSG_DEBUG("Inner SingleWedge trigger already combined, skipping");
                         continue;
                     }
                     else if (it.is4outOf4Layers() && it.isInTransitionRegion()){
@@ -444,7 +436,7 @@ namespace NSWL1{
                 }
                 for ( auto& ot : outerTrigs) {
                     if (ot.alreadyCombined()){
-                         m_msg>>MSG::CYAN<<MSG::DEBUG<<"Outer SingleWedge trigger already combined, skipping"<<endmsg;                        
+		      ATH_MSG_DEBUG("Outer SingleWedge trigger already combined, skipping");
                         continue;
                     }
                     else if (ot.is4outOf4Layers() && ot.isInTransitionRegion()){
@@ -455,9 +447,9 @@ namespace NSWL1{
         }   // if(not skipInnerOuterMatchHack)
         //m_secTrigCand = trigCandidates;
         
-         m_msg>>MSG::CYAN<<MSG::DEBUG <<  "found " << m_secTrigCand.size() << " triggerCandidates from "<< pads.size() << " pads" << endmsg;
+	ATH_MSG_DEBUG("found " << m_secTrigCand.size() << " triggerCandidates from "<< pads.size() << " pads");
         for (const auto& tc : m_secTrigCand) {
-                 m_msg>>MSG::CYAN<<MSG::DEBUG<<"trigger region area : " << area(tc.triggerRegion3())<<endmsg;
+	  ATH_MSG_DEBUG("trigger region area : " << area(tc.triggerRegion3()));
         }
 
         if (m_writePickle) {
@@ -486,22 +478,6 @@ namespace NSWL1{
     */
 
     std::vector<std::string> L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaUp() {
-        /*
-        std::vector<std::string> patterns;
-        patterns.push_back("1111");
-        patterns.push_back("1122");
-        patterns.push_back("3111");
-        patterns.push_back("3122");
-        patterns.push_back("1311");
-        patterns.push_back("1322");
-        patterns.push_back("1131");
-        patterns.push_back("1132");
-        patterns.push_back("1113");
-        patterns.push_back("1123");
-
-        return patterns;
-        */
-        //at least write it like this... all the below
         //why dont we make these members ? 
         return std::vector<std::string>{"1111","1122","3111","3122","1311","1322","1131","1132","1113","1123"};
     }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMFPGAOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMFPGAOfflineTool.cxx
index d4a2a33c9783de52dd1566722e457219b32ad5d9..5d77ca3a2252e719009730bd9f907f62eb273f2c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMFPGAOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMFPGAOfflineTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -15,33 +15,23 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
-
 // local includes
 #include "TTree.h"
 #include "TVector3.h"
 
-#include <functional>
-#include <algorithm>
-#include <map>
-#include <utility>
+//#include <functional>
+//#include <algorithm>
 
 using namespace std;
 
 
 namespace NSWL1 {
 
-    MMFPGAOfflineTool::MMFPGAOfflineTool( const std::string& type, const std::string& name, const IInterface* parent) :
+    MMFPGAOfflineTool::MMFPGAOfflineTool( const string& type, const string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
       m_mmcandidate_cache_runNumber(-1),
       m_mmcandidate_cache_eventNumber(-1),
-      m_rndmEngineName(""),
       m_doNtuple(false),
       m_tree(0)
 
@@ -50,13 +40,12 @@ namespace NSWL1 {
 
       declareInterface<NSWL1::IMMFPGATool>(this);
 
-      declareProperty("RndmEngineName", m_rndmEngineName = "MMStripTdsOfflineTool", "the name of the random engine");
       declareProperty("DoNtuple", m_doNtuple = false, "input the MMStripTds branches into the analysis ntuple"); 
 
       // reserve enough slots for the trigger sectors and fills empty vectors
       m_trigger_candidates.reserve(32);
-      std::vector< std::vector<MMCandidateData*> >::iterator it = m_trigger_candidates.begin();
-      m_trigger_candidates.insert(it,32,std::vector<MMCandidateData*>());
+      vector< vector<MMCandidateData*> >::iterator it = m_trigger_candidates.begin();
+      m_trigger_candidates.insert(it,32,vector<MMCandidateData*>());
     }
 
     MMFPGAOfflineTool::~MMFPGAOfflineTool() {
@@ -67,7 +56,6 @@ namespace NSWL1 {
       ATH_MSG_INFO( "initializing " << name() ); 
 
       ATH_MSG_INFO( name() << " configuration:");
-      ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_rndmEngineName.name() << m_rndmEngineName.value());
       ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_doNtuple.name() << ((m_doNtuple)? "[True]":"[False]")
                        << setfill(' ') << setiosflags(ios::right) );
 
@@ -75,7 +63,7 @@ namespace NSWL1 {
 
       const IInterface* parent = this->parent();
       const INamedInterface* pnamed = dynamic_cast<const INamedInterface*>(parent);
-      std::string algo_name = pnamed->name();
+      string algo_name = pnamed->name();
 
       if ( m_doNtuple && algo_name=="NSWL1Simulation" ) {
         ITHistSvc* tHistSvc;
@@ -114,21 +102,6 @@ namespace NSWL1 {
       }
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-      // retrieve the Random Service
-      if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-      }
-
-      // retrieve the random engine
-      m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-      if (m_rndmEngine==0) {
-        ATH_MSG_FATAL("Could not retrieve the random engine " << m_rndmEngineName);
-        return StatusCode::FAILURE;
-      }
-
       return StatusCode::SUCCESS;
     }
 
@@ -142,7 +115,7 @@ namespace NSWL1 {
 
     void MMFPGAOfflineTool::clear_cache() {
       for (unsigned int i=0; i<m_trigger_candidates.size(); i++) {
-        std::vector<MMCandidateData*>& sector_candidates = m_trigger_candidates.at(i);
+        vector<MMCandidateData*>& sector_candidates = m_trigger_candidates.at(i);
         for (unsigned int c=0; c< sector_candidates.size(); c++) {
           delete sector_candidates.at(c);
         }
@@ -155,7 +128,7 @@ namespace NSWL1 {
       m_nMMCandidates = 0;
 
       if (m_tree) {
-        std::string ToolName = name().substr(  name().find("::")+2,std::string::npos );
+        string ToolName = name().substr(  name().find("::")+2,string::npos );
         const char* n = ToolName.c_str();
         m_tree->Branch(TString::Format("%s_nMMCandidates",n).Data(),&m_nMMCandidates,TString::Format("%s_nMMCandidates/i",n).Data());
       } else { 
@@ -180,8 +153,8 @@ namespace NSWL1 {
     }
 
   
-    StatusCode MMFPGAOfflineTool::gather_mmcandidate_data(std::vector<MMStripData*>& mmstrips,
-                                                          std::vector<MMCandidateData*>& mmcandidates,
+    StatusCode MMFPGAOfflineTool::gather_mmcandidate_data(vector<MMStripData*>& mmstrips,
+                                                          vector<MMCandidateData*>& mmcandidates,
                                                           int side, int sector) {
       ATH_MSG_DEBUG( "gather_mmcandidate_data: start gathering the String hits for side " << side << ", sector " << sector );
 
@@ -246,7 +219,7 @@ namespace NSWL1 {
       return StatusCode::SUCCESS;
     }
 
-    MMFPGAOfflineTool::cStatus MMFPGAOfflineTool::apply_trigger_logic(std::vector<MMStripData*>& mmstrips) {
+    MMFPGAOfflineTool::cStatus MMFPGAOfflineTool::apply_trigger_logic(vector<MMStripData*>& mmstrips) {
 
       for (int side=0; side<2; side++) {
         for (int sector=0; sector<16; sector++) {
@@ -255,13 +228,12 @@ namespace NSWL1 {
           int tsector = side*16 + sector;
 
           /** Filter the data that belong to this trigger sector */
-          std::vector<MMStripData*> strips_in_tsector;
+          vector<MMStripData*> strips_in_tsector;
           for (unsigned int i=0;i<mmstrips.size();i++) {
             if ( (mmstrips[i]->sideId()==side)&&(mmstrips[i]->sectorId()==sector) ) {
               strips_in_tsector.push_back(mmstrips[i]);
             }
           }
-          //std::copy_if(mmstrips.begin(),mmstrips.end(),strips_in_tsector.begin(),[](MMStripData* strip){ return (strip->sideId()==side)&&(strip->sectorId()==sector);} );
 
           if (strips_in_tsector.size()!=0) {
 
@@ -273,10 +245,6 @@ namespace NSWL1 {
 
             /** process the trigger logic and fille the relative candidate cache */
 
-            // this->perform_pattern_recognition(pass_the_data)
-            // this->perform_track_fit()
-            // this->build_canddiate()
-
           }
         }  
       }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
index 77bef1f94034aa3ea2406625bde4643b5d9599ba..5e1b5478b1d7758fe1e77aa061bd40107404f3b1 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
@@ -427,7 +427,7 @@ MMLoadVariables::~MMLoadVariables() {
       entries = dummy;
       int min_hits = 1,max_hits = 10000,nent=entries.size();
 
-      uvxxmod=(m_par->setup.compare("xxuvuvxx")==0);
+      uvxxmod=(m_par->m_setup.compare("xxuvuvxx")==0);
       //Number of hits cut
       if(!particle_info.bad_wedge)     particle_info.pass_cut=true; //default is false
       if(nent<min_hits||nent>max_hits) particle_info.pass_cut=false;
@@ -492,7 +492,7 @@ MMLoadVariables::~MMLoadVariables() {
           thisSignal.strip_gpos.Y()-thisSignal.truth_lpos.Y(),
           thisSignal.strip_gpos.Z());
 
-        if(m_par->dlm_new){
+        if(m_par->m_dlm_new){
           athena_tru.SetX(thisSignal.strip_gpos.X()-thisSignal.strip_lpos.X());
         }
 
@@ -553,14 +553,14 @@ MMLoadVariables::~MMLoadVariables() {
 
       //*** FIGURE OUT WHAT TO DO WITH THE TIES--IS MIMIC VMM BUSTED? DO WE PLACE THE HIT REQUIREMENTS HERE? (PROBABLY)
       int xhit=0,uvhit=0,strip_X_tot=0,strip_UV_tot=0;
-      vector<bool>plane_hit(m_par->setup.size(),false);
+      vector<bool>plane_hit(m_par->m_setup.size(),false);
 
       for(map<hitData_key,hitData_entry>::iterator it=hit_info.begin(); it!=hit_info.end(); ++it){
         int plane=it->second.plane;
         plane_hit[plane]=true;
         particle_info.N_hits_postVMM++;
         Hits_Data_Set_Time[it->first]=it->second;
-        if(m_par->setup.substr(plane,1).compare("x")==0){//if(debug)cout<<"ADD X STRIP VALUE "<<it->second.strip<<endl;
+        if(m_par->m_setup.substr(plane,1).compare("x")==0){//if(debug)cout<<"ADD X STRIP VALUE "<<it->second.strip<<endl;
           strip_X_tot+=it->second.strip;
         }
         else{
@@ -570,8 +570,8 @@ MMLoadVariables::~MMLoadVariables() {
 
       for(unsigned int ipl=0;ipl<plane_hit.size();ipl++){
         if(plane_hit[ipl]){
-          if(m_par->setup.substr(ipl,1)=="x") xhit++;
-          else if(m_par->setup.substr(ipl,1)=="u"||m_par->setup.substr(ipl,1)=="v") uvhit++;
+          if(m_par->m_setup.substr(ipl,1)=="x") xhit++;
+          else if(m_par->m_setup.substr(ipl,1)=="u"||m_par->m_setup.substr(ipl,1)=="v") uvhit++;
         }
       }
       if(xhit==4&&uvhit==4){
@@ -581,8 +581,8 @@ MMLoadVariables::~MMLoadVariables() {
       particle_info.N_X_hits=xhit;
       particle_info.N_UV_hits=uvhit;
       //X and UV hits minumum cut
-      if(xhit<m_par->CT_x) particle_info.pass_cut=false;//return;
-      if(uvhit<m_par->CT_uv) particle_info.pass_cut=false;//return;
+      if(xhit<m_par->m_CT_x) particle_info.pass_cut=false;//return;
+      if(uvhit<m_par->m_CT_uv) particle_info.pass_cut=false;//return;
       // if(!particle_info.pass_cut) cout<<"event FAIL at CT cut"<<endl;
       //*** place any cuts on n_x, n_uv, n_postvmm here...
 
@@ -624,7 +624,7 @@ MMLoadVariables::~MMLoadVariables() {
   }
 
   void MMLoadVariables::hit_rot_stereo_fwd(TVector3& hit)const{
-    double degree=TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+    double degree=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
     if(striphack) hit.SetY(hit.Y()*cos(degree));
     else{
       double xnew=hit.X()*cos(degree)+hit.Y()*sin(degree),ynew=-hit.X()*sin(degree)+hit.Y()*cos(degree);
@@ -633,7 +633,7 @@ MMLoadVariables::~MMLoadVariables() {
   }
 
   void MMLoadVariables::hit_rot_stereo_bck(TVector3& hit)const{
-    double degree=-TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+    double degree=-TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
     if(striphack) hit.SetY(hit.Y()*cos(degree));
     else{
       double xnew=hit.X()*cos(degree)+hit.Y()*sin(degree),ynew=-hit.X()*sin(degree)+hit.Y()*cos(degree);
@@ -644,8 +644,8 @@ MMLoadVariables::~MMLoadVariables() {
 
   int MMLoadVariables::Get_Strip_ID(double X,double Y,int plane) const{  //athena_strip_id,module_y_center,plane)
     if(Y==-9999) return -1;
-    string setup(m_par->setup);
-    double strip_width=m_par->strip_width.getFixed(), degree=TMath::DegToRad()*(m_par->stereo_degree.getFixed());//,vertical_strip_width_UV = strip_width/cos(degree);
+    string setup(m_par->m_setup);
+    double strip_width=m_par->m_strip_width.getFixed(), degree=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());//,vertical_strip_width_UV = strip_width/cos(degree);
     double y_hit=Y;
     int setl=setup.length();
     if(plane>=setl||plane<0){
@@ -678,12 +678,12 @@ MMLoadVariables::~MMLoadVariables() {
   int MMLoadVariables::strip_number(int station,int plane,int spos)const{
     //assert(station>0&&station<=m_par->n_stations_eta);
     //assert(plane>=0&&plane<(int)m_par->setup.size());
-    if (station<=0||station>m_par->n_stations_eta) {
+    if (station<=0||station>m_par->m_n_stations_eta) {
       int base_strip = 0;
 
       return base_strip;
     }
-    if (plane<0||plane>(int)m_par->setup.size()) {
+    if (plane<0||plane>(int)m_par->m_setup.size()) {
       int base_strip = 0;
 
       return base_strip;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripOfflineData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripOfflineData.cxx
index 23d154822edafd21d3da2176b27f791c5c751b83..95ccbb6ebba339ad0dd0c91a6e3ead47e359537a 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripOfflineData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripOfflineData.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -13,7 +13,7 @@ namespace NSWL1 {
 
     MMStripOfflineData::MMStripOfflineData(Identifier id, const MmIdHelper* helper) : 
     MMStripData(),
-    m_id(id), m_helper(helper) //,m_mmstrip_charge(charge)
+    m_id(id), m_helper(helper)
     {}
 
     MMStripOfflineData::~MMStripOfflineData() {
@@ -25,10 +25,6 @@ namespace NSWL1 {
     }
 
 
-  //void MMStripOfflineData::setStripCharge(float charge) {
-  //  m_mmstrip_charge = charge;
-  // }
-
     //! methods for retrieving the bare data
     uint32_t MMStripOfflineData::id()     const { return m_id.get_identifier32().get_compact(); }
     float MMStripOfflineData::charge()    const { return m_mmstrip_charge; }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripTdsOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripTdsOfflineTool.cxx
index 494b72281bdad5b3dd292f6d88e0f57cfbdfca9f..78b9f8e8c321984fa44dffb84b7d66e2bef46ddb 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripTdsOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMStripTdsOfflineTool.cxx
@@ -1,10 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/IIncidentSvc.h"
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 // local includes
 #include "TrigT1NSWSimTools/MMStripTdsOfflineTool.h"
@@ -14,45 +15,9 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 
-//#include "HitManagement/TimedHitPtr.h"
-
-// Muon software includes
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonReadoutGeometry/MMReadoutElement.h"
-#include "MuonIdHelpers/MmIdHelper.h"
-#include "MuonDigitContainer/MmDigitContainer.h"
-#include "MuonDigitContainer/MmDigit.h"
-#include "MuonSimData/MuonSimDataCollection.h"
-#include "MuonSimData/MuonSimData.h"
-#include "MuonSimEvent/GenericMuonSimHitCollection.h"
-#include "MuonSimEvent/MM_SimIdToOfflineId.h"
-//#include "MuonReadoutGeometry/NSWenumeration.h"
-//#include "MuonReadoutGeometry/NSWgeometry.h"
-#include "GeneratorObjects/McEventCollection.h"
-#include "HepMC/GenEvent.h"
-#include "HepMC/GenVertex.h"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-#include "TrackRecord/TrackRecordCollection.h"
-#include "CLHEP/Vector/ThreeVector.h"
-
-
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
-
-// local includes
-#include "TTree.h"
+// ROOT includes
 #include "TVector3.h"
 #include "TMath.h"
-//#include "MMStripUtil.h"
-
-#include <functional>
-#include <algorithm>
-#include <map>
-#include <utility>
-
-using namespace std;
 
 const bool striphack=true;
 
@@ -75,16 +40,9 @@ namespace NSWL1 {
     MMStripTdsOfflineTool::MMStripTdsOfflineTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
-      m_detManager(0),
-      m_MmIdHelper(0),
       m_mmstrip_cache_runNumber(-1),
       m_mmstrip_cache_eventNumber(-1),
       m_mmstrip_cache_status(CLEARED),
-      m_rndmEngineName(""),
-      m_MmDigitContainer(""),
-      m_MmSdoContainer(""),
       m_doNtuple(false),
       m_tree(0)
 
@@ -92,13 +50,7 @@ namespace NSWL1 {
     {
       declareInterface<NSWL1::IMMStripTdsTool>(this);
 
-      declareProperty("RndmEngineName", m_rndmEngineName = "MMStripTdsOfflineTool", "the name of the random engine");
-      declareProperty("MM_DigitContainerName", m_MmDigitContainer = "MM_DIGITS", "the name of the MM digit container");
-      declareProperty("MM_SdoContainerName"  , m_MmSdoContainer = "MM_SDO", "the name of the MM SDO container");
-      declareProperty("MM_HitContainerName"  , m_MmHitContainer = "MicromegasSensitiveDetector", "the name of the MM hits container");
       declareProperty("DoNtuple", m_doNtuple = true, "input the MMStripTds branches into the analysis ntuple");
-      declareProperty("Truth_ContainerName", m_Truth_ContainerName="TruthEvent","name of truth container");
-      declareProperty("MuonEntryLayer_ContainerName", m_MuEntry_ContainerName="MuonEntryLayer", "name of muon entry container");
 
       // reserve enough slots for the trigger sectors and fills empty vectors
       m_mmstrip_cache.reserve(32);
@@ -127,9 +79,6 @@ namespace NSWL1 {
       ATH_MSG_INFO( "initializing " << name() );
 
       ATH_MSG_INFO( name() << " configuration:");
-      ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_rndmEngineName.name() << m_rndmEngineName.value());
-      ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_MmDigitContainer.name() << m_MmDigitContainer.value());
-      ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_MmSdoContainer.name() << m_MmSdoContainer.value());
       ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_doNtuple.name() << ((m_doNtuple)? "[True]":"[False]")
                        << setfill(' ') << setiosflags(ios::right) );
 
@@ -176,37 +125,6 @@ namespace NSWL1 {
       }
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-      // retrieve the Random Service
-      if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-      }
-
-      // retrieve the random engine
-      m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-      if (m_rndmEngine==0) {
-        ATH_MSG_FATAL("Could not retrieve the random engine " << m_rndmEngineName);
-        return StatusCode::FAILURE;
-      }
-
-      //  retrieve the MuonDetectormanager
-      if( detStore()->retrieve( m_detManager ).isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the MuonDetectorManager");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("MuonDetectorManager successfully retrieved");
-      }
-
-      //  retrieve the Mm offline Id helper
-      if( detStore()->retrieve( m_MmIdHelper ).isFailure() ){
-        ATH_MSG_FATAL("Failed to retrieve MmIdHelper");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("MmIdHelper successfully retrieved");
-      }
-
       return StatusCode::SUCCESS;
     }
 
@@ -224,13 +142,13 @@ namespace NSWL1 {
       m_fitThe = new std::vector<double>();
       m_fitPhi = new std::vector<double>();
       m_fitDth = new std::vector<double>();
-      tru_etarange = new std::vector<double>();
-      tru_ptrange = new std::vector<double>();
-      fit_etarange = new std::vector<double>();
-      fit_ptrange = new std::vector<double>();
-      res_the = new std::vector<double>();
-      res_phi =  new std::vector<double>();
-      res_dth = new std::vector<double>();
+      m_tru_etarange = new std::vector<double>();
+      m_tru_ptrange = new std::vector<double>();
+      m_fit_etarange = new std::vector<double>();
+      m_fit_ptrange = new std::vector<double>();
+      m_res_the = new std::vector<double>();
+      m_res_phi =  new std::vector<double>();
+      m_res_dth = new std::vector<double>();
 
       m_NSWMM_dig_stationName = new std::vector<std::string>();
       m_NSWMM_dig_stationEta  = new std::vector<int>();
@@ -265,11 +183,6 @@ namespace NSWL1 {
       m_NSWMM_dig_truth_globalPosY = new std::vector<double>;
       m_NSWMM_dig_truth_globalPosZ = new std::vector<double>;
 
-      //m_NSWMM_dig_stripForTrigger     = new std::vector<int>;
-      //m_NSWMM_dig_stripTimeForTrigger = new std::vector<float>;
-
-
-
       m_NSWMM_trackId  = new std::vector<int>;
       m_NSWMM_truthEl  = new std::vector<int>;
       m_NSWMM_globalTime = new std::vector<double>;
@@ -319,16 +232,6 @@ namespace NSWL1 {
       m_NSWMM_off_multiplet   = new std::vector<int>;
       m_NSWMM_off_gas_gap     = new std::vector<int>;
       m_NSWMM_off_channel     = new std::vector<int>;
-      /*m_nMMStripHits = 0;
-      m_MMhitPDGId  = new std::vector<int>();
-      m_MMhitDepositEnergy = new std::vector<float>();
-      m_MMhitKineticEnergy = new std::vector<float>();
-      m_mmstripGlobalX = new std::vector<float>();
-      m_mmstripGlobalY = new std::vector<float>();
-      m_mmstripGlobalZ = new std::vector<float>();
-      m_mmstripTruthHitGlobalX = new std::vector<float>();
-      m_mmstripTruthHitGlobalY = new std::vector<float>();
-      m_mmstripTruthHitGlobalZ = new std::vector<float>(); */
 
       if (m_tree) {
         std::string ToolName = name().substr(  name().find("::")+2,std::string::npos );
@@ -336,33 +239,14 @@ namespace NSWL1 {
         m_tree->Branch(TString::Format("%s_fitThe",n).Data(),&m_fitThe);
         m_tree->Branch(TString::Format("%s_fitPhi",n).Data(),&m_fitPhi);
         m_tree->Branch(TString::Format("%s_fitDth",n).Data(),&m_fitDth);
-        m_tree->Branch(TString::Format("%s_tru_etarange",n).Data(),&tru_etarange);
-        m_tree->Branch(TString::Format("%s_tru_ptrange",n).Data(),&tru_ptrange);
-        m_tree->Branch(TString::Format("%s_fit_etarange",n).Data(),&fit_etarange);
-        m_tree->Branch(TString::Format("%s_fit_ptrange",n).Data(),&fit_ptrange);
-        m_tree->Branch(TString::Format("%s_res_the",n).Data(),&res_the);
-        m_tree->Branch(TString::Format("%s_res_phi",n).Data(),&res_phi);
-        m_tree->Branch(TString::Format("%s_res_dth",n).Data(),&res_dth);
-
-        /*
-        m_tree->Branch(TString::Format("%s_nMMStripHits",n).Data(),&m_nMMStripHits,TString::Format("%s_nMMStripHits/i",n).Data());
-
-        m_tree->Branch(TString::Format("%s_MMhitPDGId",n).Data(),&m_MMhitPDGId);
-        m_tree->Branch(TString::Format("%s_MMhitDepositEnergy",n).Data(),&m_MMhitDepositEnergy);
-        m_tree->Branch(TString::Format("%s_MMhitKineticEnergy",n).Data(),&m_MMhitKineticEnergy);
-        m_tree->Branch(TString::Format("%s_mmstripGlobalX",n).Data(),&m_mmstripGlobalX);
-        m_tree->Branch(TString::Format("%s_mmstripGlobalY",n).Data(),&m_mmstripGlobalY);
-        m_tree->Branch(TString::Format("%s_mmstripGlobalZ",n).Data(),&m_mmstripGlobalZ);
-        m_tree->Branch(TString::Format("%s_mmstripTruthHitGlobalX",n).Data(),&m_mmstripTruthHitGlobalX);
-        m_tree->Branch(TString::Format("%s_mmstripTruthHitGlobalY",n).Data(),&m_mmstripTruthHitGlobalY);
-        m_tree->Branch(TString::Format("%s_mmstripTruthHitGlobalZ",n).Data(),&m_mmstripTruthHitGlobalZ);
-        */
-
-       // m_tree->Branch(TString::Format("%s_mmstripGlobalX",n).Data(),&m_mmstripGlobalX);
-       // m_tree->Branch(TString::Format("%s_mmstripGlobalY",n).Data(),&m_mmstripGlobalY);
-       // m_tree->Branch(TString::Format("%s_mmstripGlobalZ",n).Data(),&m_mmstripGlobalZ);
-
-       // m_tree->Branch("Digits_MM",    &m_NSWMM_nDigits, "Digits_MM_n/i");
+        m_tree->Branch(TString::Format("%s_tru_etarange",n).Data(),&m_tru_etarange);
+        m_tree->Branch(TString::Format("%s_tru_ptrange",n).Data(),&m_tru_ptrange);
+        m_tree->Branch(TString::Format("%s_fit_etarange",n).Data(),&m_fit_etarange);
+        m_tree->Branch(TString::Format("%s_fit_ptrange",n).Data(),&m_fit_ptrange);
+        m_tree->Branch(TString::Format("%s_res_the",n).Data(),&m_res_the);
+        m_tree->Branch(TString::Format("%s_res_phi",n).Data(),&m_res_phi);
+        m_tree->Branch(TString::Format("%s_res_dth",n).Data(),&m_res_dth);
+
         m_tree->Branch("Digits_MM_stationName", &m_NSWMM_dig_stationName);
         m_tree->Branch("Digits_MM_stationEta",  &m_NSWMM_dig_stationEta);
         m_tree->Branch("Digits_MM_stationPhi",  &m_NSWMM_dig_stationPhi);
@@ -447,12 +331,6 @@ namespace NSWL1 {
         m_tree->Branch("Hits_MM_off_gas_gap", &m_NSWMM_off_gas_gap);
         m_tree->Branch("Hits_MM_off_channel", &m_NSWMM_off_channel);
 
-
-        //m_tree->Branch("Digits_MM_stripForTrigger",     &m_NSWMM_dig_stripForTrigger);
-       // m_tree->Branch("Digits_MM_stripTimeForTrigger", &m_NSWMM_dig_stripTimeForTrigger);
-
-
-
       } else {
         return StatusCode::FAILURE;
       }
@@ -468,17 +346,6 @@ namespace NSWL1 {
       //reset the ntuple variables
 
       clear_ntuple_variables();
-      /*
-      m_nMMStripHits = 0;
-      m_MMhitPDGId->clear();
-      m_MMhitDepositEnergy->clear();
-      m_MMhitKineticEnergy->clear();
-      m_mmstripGlobalX->clear();
-      m_mmstripGlobalY->clear();
-      m_mmstripGlobalZ->clear();
-      m_mmstripTruthHitGlobalX->clear();
-      m_mmstripTruthHitGlobalY->clear();
-      m_mmstripTruthHitGlobalZ->clear();*/
     }
 
     void MMStripTdsOfflineTool::clear_ntuple_variables() {
@@ -488,31 +355,13 @@ namespace NSWL1 {
       m_fitThe->clear();
       m_fitPhi->clear();
       m_fitDth->clear();
-      tru_etarange->clear();
-      tru_ptrange->clear();
-      fit_etarange->clear();
-      fit_ptrange->clear();
-      res_the->clear();
-      res_phi->clear();
-      res_dth->clear();
-      /*
-      m_MMhitPDGId->clear();
-      m_MMhitDepositEnergy->clear();
-      m_MMhitKineticEnergy->clear();
-      m_mmstripGlobalX->clear();
-      m_mmstripGlobalY->clear();
-      m_mmstripGlobalZ->clear();
-      m_mmstripTruthHitGlobalX->clear();
-      m_mmstripTruthHitGlobalY->clear();
-      m_mmstripTruthHitGlobalZ->clear();
-      */
-
-
-    //  m_mmstripGlobalX->clear();
-    //  m_mmstripGlobalY->clear();
-    //  m_mmstripGlobalZ->clear();
-
-    //  m_NSWMM_nDigits = 0;
+      m_tru_etarange->clear();
+      m_tru_ptrange->clear();
+      m_fit_etarange->clear();
+      m_fit_ptrange->clear();
+      m_res_the->clear();
+      m_res_phi->clear();
+      m_res_dth->clear();
 
       // information of the module down to the channel closest to the initial G4 hit
       // size of vector is m_NSWMM_nDigits
@@ -588,10 +437,6 @@ namespace NSWL1 {
       m_NSWMM_hitToRsurfacePositionY->clear();
       m_NSWMM_hitToRsurfacePositionZ->clear();
 
-      //m_NSWMM_FastDigitRsurfacePositionX->clear();
-      //m_NSWMM_FastDigitRsurfacePositionY->clear();
-
-
       m_NSWMM_particleEncoding->clear();
       m_NSWMM_kineticEnergy->clear();
       m_NSWMM_depositEnergy->clear();
@@ -612,30 +457,6 @@ namespace NSWL1 {
       m_NSWMM_off_gas_gap->clear();
       m_NSWMM_off_channel->clear();
 
-      // more information (size is m_NSWMM_nDigits)
-     // m_NSWMM_dig_stripForTrigger->clear();
-     // m_NSWMM_dig_stripTimeForTrigger->clear();
-
-
-
-      // Caused seg fault when calling push_back on any of these vectors, not sure why?
-
-      //m_fitThe = nullptr;
-      //m_fitPhi = nullptr;
-      //m_fitDth = nullptr;
-
-      /*m_nMMStripHits = 0;
-      m_MMhitPDGId = 0;
-      m_MMhitDepositEnergy = 0;
-      m_MMhitKineticEnergy = 0;
-      m_mmstripGlobalX = 0;
-      m_mmstripGlobalY = 0;
-      m_mmstripGlobalZ = 0;
-      m_mmstripTruthHitGlobalX = 0;
-      m_mmstripTruthHitGlobalX->push_back( 0 );
-        std::cout << "BLAHBLAH3";
-      m_mmstripTruthHitGlobalY = nullptr;
-      m_mmstripTruthHitGlobalZ = nullptr;*/
     }
 
 
@@ -660,7 +481,6 @@ namespace NSWL1 {
       // retrieve the current run number and event number
       const EventInfo* pevt = 0;
       StatusCode sc = evtStore()->retrieve(pevt);
-      // int event = pevt->event_ID()->event_number();
 
       if ( !sc.isSuccess() ) {
         ATH_MSG_WARNING( "Could not retrieve the EventInfo, so cannot associate run and event number to the current Strip cache" );
@@ -723,7 +543,6 @@ namespace NSWL1 {
       }
 
       ATH_MSG_DEBUG( "delivered n. " << mmstrips.size() << " MM Strip hits." );
-      // cout << "CHECKCHECK!";
        //comment out end
       return StatusCode::SUCCESS;
     }
@@ -750,7 +569,7 @@ namespace NSWL1 {
   }
 
   void MMStripTdsOfflineTool::hit_rot_stereo_fwd(TVector3& hit)const{
-    double degree=TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+    double degree=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
     if(striphack) hit.SetY(hit.Y()*cos(degree));
     else{
       double xnew=hit.X()*cos(degree)+hit.Y()*sin(degree),ynew=-hit.X()*sin(degree)+hit.Y()*cos(degree);
@@ -759,7 +578,7 @@ namespace NSWL1 {
   }
 
   void MMStripTdsOfflineTool::hit_rot_stereo_bck(TVector3& hit)const{
-    double degree=-TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+    double degree=-TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
     if(striphack) hit.SetY(hit.Y()*cos(degree));
     else{
       double xnew=hit.X()*cos(degree)+hit.Y()*sin(degree),ynew=-hit.X()*sin(degree)+hit.Y()*cos(degree);
@@ -770,7 +589,7 @@ namespace NSWL1 {
   vector<hitData_key> MMStripTdsOfflineTool::event_hitData_keys(int find_event) const{
     vector<hitData_key> ravel;
     int fnd_entries=0;
-    for(map<hitData_key,hitData_entry>::const_iterator entry=Hits_Data_Set_Time.begin(); entry!=Hits_Data_Set_Time.end(); ++entry){
+    for(map<hitData_key,hitData_entry>::const_iterator entry=m_Hits_Data_Set_Time.begin(); entry!=m_Hits_Data_Set_Time.end(); ++entry){
       if(entry->second.event==find_event){
         ravel.push_back(entry->first);
         fnd_entries++;
@@ -783,15 +602,13 @@ namespace NSWL1 {
 
   int MMStripTdsOfflineTool::Get_Strip_ID(double X,double Y,int plane) const{  //athena_strip_id,module_y_center,plane)
     if(Y==-9999) return -1;
-    //cout<<"Strip (width="<<m_par->strip_width<<") for (X,Y,pl)=("<<X<<","<<Y<<","<<plane<<") is ";
-    string setup(m_par->setup);
-    double strip_width=m_par->strip_width.getFixed(), degree=TMath::DegToRad()*(m_par->stereo_degree.getFixed());//,vertical_strip_width_UV = strip_width/cos(degree);
+    string setup(m_par->m_setup);
+    double strip_width=m_par->m_strip_width.getFixed(), degree=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());//,vertical_strip_width_UV = strip_width/cos(degree);
     double y_hit=Y;
     int setl=setup.length();
     if(plane>=setl||plane<0){
       cerr<<"Pick a plane in [0,"<<setup.length()<<"] not "<<plane<<endl; exit(1);
     }
-  //   if(debug) cout<<"SUBSTR CALL MMT_L--2\n";
     string xuv=setup.substr(plane,1);
     if(xuv=="u"){//||xuv=="v"){
       if(striphack)return ceil(Y*cos(degree)/strip_width);
@@ -800,13 +617,11 @@ namespace NSWL1 {
     else if(xuv=="v"){
       if(striphack)return ceil(Y*cos(degree)/strip_width);
       y_hit = -X*sin(degree)+Y*cos(degree);
-      // cout<<"-X*sin("<<degree<<")+Y*cos(degree) is"<<-X*sin(degree)+Y*cos(degree)<<endl;
     }
     else if(xuv!="x"){
       cerr<<"Invalid plane option " << xuv << endl; exit(2);
     }
     double strip_hit = ceil(y_hit*1./strip_width);
-    // cout <<"(y_hit="<<y_hit<<"), "<< strip_hit<<endl;
     return strip_hit;
   }
 
@@ -816,34 +631,31 @@ namespace NSWL1 {
   }
 
   int MMStripTdsOfflineTool::strip_number(int station,int plane,int spos)const{
-    //assert(station>0&&station<=m_par->n_stations_eta);
-    //assert(plane>=0&&plane<(int)m_par->setup.size());
-    if (station<=0||station>m_par->n_stations_eta) {
+    if (station<=0||station>m_par->m_n_stations_eta) {
       int base_strip = 0;
 
       return base_strip;
     }
-    if (plane<0||plane>(int)m_par->setup.size()) {
+    if (plane<0||plane>(int)m_par->m_setup.size()) {
       int base_strip = 0;
 
       return base_strip;
     }
     bool do_auto=false;
     //if true do strip # (ceil(Y/strip_width); what's currently fed into the algorithm)  calculation based on evenly spaced eta assumption of stations
-    double H=m_par->H.getFixed()/*,h=m_par->h1,z=m_par->z_nominal[plane],z0=m_par->z_nominal.front()*/,ybase=m_par->ybases[plane][station-1].getFixed();
+    double H=m_par->m_H.getFixed()/*,h=m_par->m_h1,z=m_par->m_z_nominal[plane],z0=m_par->m_z_nominal.front()*/,ybase=m_par->m_ybases[plane][station-1].getFixed();
     if(do_auto){
       //-log(tan(0.5(atan(y/z))))=eta
       //this is the even y spacing
-      if(m_par->dlm_new) ybase=H+1100.*(station-1);
+      if(m_par->m_dlm_new) ybase=H+1100.*(station-1);
       else ybase=H+950.*(station-1);
       /*//this is the even eta spacing version
-      double etalo=-log(tan(0.5*atan((h+H)/z))),etahi=-log(tan(0.5*atan(H/z))),inc=(etahi-etalo)/m_par->n_stations_eta;
-      double this_eta=etalo+inc*(station-1);
+      double m_etalo=-log(tan(0.5*atan((h+H)/z))),m_etahi=-log(tan(0.5*atan(H/z))),inc=(m_etahi-m_etalo)/m_par->m_n_stations_eta;
+      double this_eta=m_etalo+inc*(station-1);
       ybase=z*tan(2*atan(exp(-1.*this_eta)));
       */
     }
-    double width=m_par->strip_width.getFixed(); string plane_char=m_par->setup.substr(plane,1);
-  //   if(plane_char.compare("u")==0||plane_char.compare("v")==0) width/=cos(TMath::DegToRad()*(m_par->stereo_degree));
+    double width=m_par->m_strip_width.getFixed(); string plane_char=m_par->m_setup.substr(plane,1);
     int base_strip=ceil(ybase/width)+spos;
     return base_strip;
   }
@@ -857,20 +669,20 @@ namespace NSWL1 {
     }
     else{
       int VMM_chip=candy.VMM_chip-1,plane=candy.plane,time=candy.time;  //true time in sub ns from simulation
-      if(!VMM_chip_status[VMM_chip][plane]){ //is the chip active?
-        if(VMM__chip_last_hit_time[VMM_chip][plane] + VMM_deadtime <= time){  //if not, should the chip be active?
-    VMM__chip_last_hit_time[VMM_chip][plane]=0;
-    VMM_chip_status[VMM_chip][plane]=true;
+      if(!m_VMM_chip_status[VMM_chip][plane]){ //is the chip active?
+        if(m_VMM__chip_last_hit_time[VMM_chip][plane] + m_VMM_deadtime <= time){  //if not, should the chip be active?
+    m_VMM__chip_last_hit_time[VMM_chip][plane]=0;
+    m_VMM_chip_status[VMM_chip][plane]=true;
         }
         else{
     candy.VMM_chip=0;
     return false;
         }
       }
-      if(VMM_chip_status[VMM_chip][plane]){ //is the chip active?
+      if(m_VMM_chip_status[VMM_chip][plane]){ //is the chip active?
 
-        VMM_chip_status[VMM_chip][plane]=false;
-        VMM__chip_last_hit_time[VMM_chip][plane]=time;
+        m_VMM_chip_status[VMM_chip][plane]=false;
+        m_VMM__chip_last_hit_time[VMM_chip][plane]=time;
       }
     }
     return true;
@@ -879,7 +691,7 @@ namespace NSWL1 {
   vector<hitData_entry> MMStripTdsOfflineTool::event_hitDatas(int find_event) const{
     vector<hitData_entry> bolero;
     int fnd_entries=0;
-    for(map<hitData_key,hitData_entry>::const_iterator entry=Hits_Data_Set_Time.begin(); entry!=Hits_Data_Set_Time.end(); ++entry){
+    for(map<hitData_key,hitData_entry>::const_iterator entry=m_Hits_Data_Set_Time.begin(); entry!=m_Hits_Data_Set_Time.end(); ++entry){
       if(entry->second.event==find_event){
         bolero.push_back(entry->second);
         fnd_entries++;
@@ -891,12 +703,8 @@ namespace NSWL1 {
 
   int MMStripTdsOfflineTool::eta_bin(double theta) const{
     int ebin=-999; double eta=-log(tan(0.5*theta));
-    //cout << "WOAH";
-    //cout << n_etabins;
-    //cout << "WOAH1";
-    for(int i=0;i<=n_etabins;i++){
+    for(int i=0;i<=m_n_etabins;i++){
       if(eta<m_etabins[i]){
-        //cout << "WOAH2";
         ebin=i-1;
         break;
       }
@@ -904,12 +712,7 @@ namespace NSWL1 {
       //we want the histograms binned on truth eta
     //event selection eta cuts are done on theta_ip, not theta_pos
     if(ebin==-1) return 0;
-    else if(ebin==-999) return n_etabins-1;
-    /*
-    if(ebin==-1){
-      cerr<<"Theta of "<<theta<<" yields eta of "<<eta<<" not in ["<<etalo<<","<<etahi<<"]...exiting"<<endl;
-      exit(6);
-      }*/
+    else if(ebin==-999) return m_n_etabins-1;
     return ebin;
   }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
index 1dc1b1038988c55544051e2ba08084000a17e193..07004328dbd579e31d46babdd293699de9ef339e 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
@@ -1,32 +1,30 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/MMT_Finder.h"
 
-MMT_Finder::MMT_Finder(MMT_Parameters *par, int nUVRoads, int outputLevel){
+MMT_Finder::MMT_Finder(MMT_Parameters *par, int nUVRoads){
 
-  m_msg.get().setLevel(outputLevel);
-
-  msg(MSG::DEBUG) << "MMT_Finder::building finder" << endmsg;
+  ATH_MSG_DEBUG("MMT_Finder::building finder");
 
   m_par = par;
   m_nUVRoads = nUVRoads;
 
-  m_nRoads = ceil(  ( ( m_par->slope_max - m_par->slope_min ) / m_par->h.getFixed()  ).getFixed()  ); //initialization, can use floats
+  m_nRoads = ceil(  ( ( m_par->m_slope_max - m_par->m_slope_min ) / m_par->m_h.getFixed()  ).getFixed()  ); //initialization, can use floats
 
   if(m_nUVRoads>1){
     m_nRoads *= m_nUVRoads; // This should probably be configurable and dynamic based on the geometry of the chamber
   }
 
-  int nplanes=m_par->setup.size();
+  int nplanes=m_par->m_setup.size();
 
-  msg(MSG::DEBUG) << "MMT_Find::finder entries " << m_nRoads << " " << m_par->slope_max.getFixed() << " " << m_par->slope_min.getFixed() << " " << m_par->h.getFixed() << endmsg;
+  ATH_MSG_DEBUG("MMT_Find::finder entries " << m_nRoads << " " << m_par->m_slope_max.getFixed() << " " << m_par->m_slope_min.getFixed() << " " << m_par->m_h.getFixed());
 
   m_gateFlags = vector<vector<double> >(m_nRoads,(vector<double>(2,0)));// sloperoad,
   m_finder    = vector<vector<finder_entry> >(m_nRoads,(vector<finder_entry>(nplanes,finder_entry())));  //[strip,slope,hit_index];
 
-  msg(MSG::DEBUG) << "MMT_Find::built finder" << endmsg;
+  ATH_MSG_DEBUG("MMT_Find::built finder");
 
   return;
 
@@ -38,27 +36,27 @@ void MMT_Finder::fillHitBuffer( map< pair<int,int> , finder_entry > & hitBuffer,
 
   //Get initial parameters: tolerance, step size (h), slope of hit
   float32fixed<3> tol;
-  float32fixed<3> h=m_par->h.getFixed();
+  float32fixed<3> h=m_par->m_h.getFixed();
 
   //Conver hit to slope here
   float32fixed<3> slope=hit.info.slope.getFixed();
-  msg(MSG::DEBUG) << "SLOPE " << hit.info.slope.getFixed() << endmsg;
+  ATH_MSG_DEBUG("SLOPE " << hit.info.slope.getFixed());
 
   //Plane and key info of the hit
   int plane=hit.info.plane;
 
-  string plane_type=m_par->setup.substr(plane,1);
+  string plane_type=m_par->m_setup.substr(plane,1);
 
-  if(plane_type=="x") tol=m_par->x_error.getFixed();
-  else if(plane_type=="u"||plane_type=="v") tol=m_par->uv_error.getFixed();
+  if(plane_type=="x") tol=m_par->m_x_error.getFixed();
+  else if(plane_type=="u"||plane_type=="v") tol=m_par->m_uv_error.getFixed();
   else return;  //if it's an unsupported plane option, don't fill
 
 
   //---slope road boundaries based on hit_slope +/- tolerance---; if min or max is out of bounds, put it at the limit
   float32fixed<3> s_min = slope - tol, s_max = slope + tol;
 
-  int road_min = round( (  (s_min - m_par->slope_min)/h  ).getFixed() );
-  int road_max = round( (  (s_max - m_par->slope_min)/h  ).getFixed() );
+  int road_min = round( (  (s_min - m_par->m_slope_min)/h  ).getFixed() );
+  int road_max = round( (  (s_max - m_par->m_slope_min)/h  ).getFixed() );
 
   if( road_min < 0 ) road_min = 0 ;
   if( road_max >= (m_nRoads/m_nUVRoads) ){ road_max = (m_nRoads/m_nUVRoads) - 1 ; }
@@ -141,7 +139,7 @@ void MMT_Finder::checkBufferForHits(vector<bool>& plane_is_hit,
                                     ) const{
   //Loops through the buffer which should have entries = nplanes
   //Takes the hit and bool for each plane (if it exists)
-  int nplanes=m_par->setup.size();
+  int nplanes=m_par->m_setup.size();
 
   pair<int,int> key (road,0);
 
@@ -163,7 +161,7 @@ int MMT_Finder::Coincidence_Gate(const vector<bool>& plane_hits) const{
 
   //8 for eight detector planes
   if(plane_hits.size()!=8){
-    msg(MSG::DEBUG) << "Coincidence_Gate: Don't have 8 plane hit!" << endmsg;
+    ATH_MSG_DEBUG("Coincidence_Gate: Don't have 8 plane hit!");
   }
   //Might want to establish a heirarchy of gates
   //Eg, 4X+4UV > 3+3.   Also,
@@ -180,16 +178,16 @@ int MMT_Finder::Coincidence_Gate(const vector<bool>& plane_hits) const{
   for(unsigned int ip=0;ip<u_planes.size();ip++) U_count+=plane_hits[u_planes[ip]];
   for(unsigned int ip=0;ip<v_planes.size();ip++) V_count+=plane_hits[v_planes[ip]];
   int UV_count = U_count + V_count;
-  bool xpass=X_count>=m_par->CT_x,uvpass=UV_count>=m_par->CT_uv,fbpass=front&&back;
+  bool xpass=X_count>=m_par->m_CT_x,uvpass=UV_count>=m_par->m_CT_uv,fbpass=front&&back;
   value = 10*X_count+UV_count;
   if(!xpass||!uvpass){
     value*=-1;
-    if(value<-10) msg(MSG::DEBUG) << "Coincidence_Gate: hit count fail with value: "<<value<< endmsg;
+    if(value<-10) ATH_MSG_DEBUG("Coincidence_Gate: hit count fail with value: "<<value);
   }
   else if(!fbpass&&X_count+UV_count>0){
     if(value>0)value*=-1;
     value-=5;
-    msg(MSG::DEBUG) << "Coincidence_Gate: quadruplet fail with value: "<<value<< endmsg;
+    ATH_MSG_DEBUG("Coincidence_Gate: quadruplet fail with value: "<<value);
   }
   return value;
 }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
index 6665a5410f78d8ab9cdf4cbd0eef320f40895110..4ee10e3eabed16cb4716ee023b046df0d6daabc6 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -9,18 +9,18 @@
 
 
 
-MMT_Fitter::MMT_Fitter(MMT_Parameters *par, int nlg, double lgmin, double lgmax): /*m_par(par),*/ number_LG_regions(nlg), LG_min(lgmin), LG_max(lgmax), m_msg("MMT_Fitter")
+MMT_Fitter::MMT_Fitter(MMT_Parameters *par, int nlg, double lgmin, double lgmax): /*m_par(par),*/ m_number_LG_regions(nlg), m_LG_min(lgmin), m_LG_max(lgmax), m_msg("MMT_Fitter")
 {
-  msg(MSG::DEBUG) << "MMT_F::building fitter"<< endmsg;
+  ATH_MSG_DEBUG("MMT_F::building fitter");
   m_par=par;
-  last=0;
-  n_fit=0;
-  msg(MSG::DEBUG) << "MMT_F::built fitter"<< endmsg;
+  m_last=0;
+  m_n_fit=0;
+  ATH_MSG_DEBUG("MMT_F::built fitter");
 }
 
 
 evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_entry>& hitDatas, int& nfit,vector<pair<double,double> >&mxmy, double& mxl, double& mv, double& mu) const{
-  msg(MSG::DEBUG) << "Begin fit event!"<< endmsg;
+  ATH_MSG_DEBUG("Begin fit event!");
   bool did_fit=false;
   int check=Filter_UV(track);
   vector<int> xpl=m_par->q_planes("x");
@@ -47,8 +47,8 @@ evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_
 
   mxl = M_x_local.getFixed();
 
-  if(dtheta_idl-Delta_Theta_division.fabs()>2.e-3)m_par->fill0=true;
-  msg(MSG::DEBUG) << "Mxg="<<M_x_global.getFixed()<<",Mug="<<M_u_global.getFixed()<<",Mvg="<<M_v_global.getFixed()<<",Mxl="<<M_x_local.getFixed()<<",dth="<<Delta_Theta.getFixed()<< endmsg;
+  if(dtheta_idl-Delta_Theta_division.fabs()>2.e-3)m_par->m_fill0=true;
+  ATH_MSG_DEBUG("Mxg="<<M_x_global.getFixed()<<",Mug="<<M_u_global.getFixed()<<",Mvg="<<M_v_global.getFixed()<<",Mxl="<<M_x_local.getFixed()<<",dth="<<Delta_Theta.getFixed());
   //@@@@@@@@ Begin Info Storage for Later Analysis @@@@@@@@@@@@@@@@@@@@@@@
   vector<bool> planes_hit_tr(8,false),planes_hit_bg(8,false);
   for(unsigned int ihit=0; ihit<track.size(); ihit++){
@@ -76,22 +76,20 @@ evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_
       n_uvpl_bg+=planes_hit_bg[plane];
     }
   }
-//   return evFit_entry(event,ROI.theta,ROI.phi,Delta_Theta_division,ROI.roi,n_xpl_tr,n_uvpl_tr,n_xpl_bg,n_uvpl_bg,Delta_Theta);
 
   //FINISH ME!!!!!!!
   float32fixed<4> candtheta=ROI.theta,candphi=ROI.phi;
   /* I think this bit appears redundant but could end up being stupid; the fitter shouldn't care about CT stuff (beyond having min num hits to do fit, which the -999 or w/e is responsible for taking care of)
-  bool xfail=(n_xpl_tr+n_xpl_bg<m_par->CT_x),uvfail= (n_uvpl_tr+n_uvpl_bg<m_par->CT_uv);
+  bool xfail=(n_xpl_tr+n_xpl_bg<m_par->m_CT_x),uvfail= (n_uvpl_tr+n_uvpl_bg<m_par->m_CT_uv);
   msg(MSG::DEBUG) << n_xpl_tr+n_xpl_bg<<" x hits");
   if(xfail)candtheta=-999.;
   if(uvfail)candphi=-999.;
   */
   bool fitkill=(ROI.theta==-999 || Delta_Theta==-999||Delta_Theta==-4);// ||xfail||uvfail);
-  msg(MSG::DEBUG) << "HIT CODE: "<<track_to_index(track)<< endmsg;
+  ATH_MSG_DEBUG("HIT CODE: "<<track_to_index(track));
   evFit_entry aemon(event,candtheta,candphi,Delta_Theta_division,ROI.roi,n_xpl_tr,n_uvpl_tr,n_xpl_bg,n_uvpl_bg,Delta_Theta,track_to_index(track));
   if(fitkill) return aemon;
-//   msg(MSG::DEBUG) << " aemon fit_theta="<<aemon.fit_theta.getFixed()<<", fit_phi="<<aemon.fit_phi.getFixed()<<"...";
-  int nplanes=m_par->setup.size();
+  int nplanes=m_par->m_setup.size();
   for(int plane=0; plane<nplanes; plane++){
     if(track[plane].info.slope==-999) continue; //&& Delta_Theta_division~=-999
     int hitData_pos=find_hitData(hitDatas,track[plane].key);
@@ -99,13 +97,10 @@ evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_
     did_fit=true;
     hitDatas[hitData_pos].fit_fill(ROI.theta,ROI.phi,Delta_Theta,M_x_global,M_u_global,M_v_global,M_x_local,ROI.m_x,ROI.m_y,ROI.roi);
     aemon.fit_hit_keys.push_back(track[plane].key);
-//     msg(MSG::DEBUG) << "hitData fit_theta="<<hitDatas[hitData_pos].fit_theta<<"...";
     if(hitDatas[hitData_pos].truth_nbg) aemon.truth_planes_hit+=pow(10,nplanes-plane-1);
     else aemon.bg_planes_hit+=pow(10,nplanes-plane-1);
   }
   if(did_fit) nfit++;
-//   msg(MSG::DEBUG) << "aemon has "<<aemon.fit_hit_keys.size()<<" keys");
-//   if(event==2997||event==2800) aemon.print();
   return aemon;
 }
 
@@ -119,7 +114,7 @@ int MMT_Fitter::find_hitData(const vector<hitData_entry>& hitDatas, const hitDat
 
 int MMT_Fitter::Filter_UV(vector<Hit>& track) const{
   return 0;
-  float32fixed<2> h=m_par->h, tolerance = h;//*2;  //Can be optimized...
+  float32fixed<2> h=m_par->m_h, tolerance = h;//*2;  //Can be optimized...
   vector<int> u_planes=m_par->q_planes("u"),v_planes=m_par->q_planes("v");
   vector<Hit> u_hits=q_hits("u",track),v_hits=q_hits("v",track);
   bool pass_u=!u_hits.empty(),pass_v=!v_hits.empty();
@@ -148,7 +143,6 @@ float32fixed<2> MMT_Fitter::Get_Global_Slope (const vector<Hit>& track, const st
   float32fixed<2> sum = 0.;
   if(qhits.size()==0) return -999;
   float32fixed<2> nhitdiv= 1./qhits.size();
-//   msg(MSG::DEBUG) << "Calculating global slope of type "<<type<<"---adding "<< qhits.size() <<" slopes: ";
   for(int ihit=0;ihit<(int)qhits.size();ihit++){
     sum+=(qhits[ihit].info.slope*nhitdiv);
   }
@@ -164,22 +158,22 @@ float32fixed<2> MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double the
     ybin_hits[ipl]=((Track[x_planes[ipl]].info.slope==-999||Track[x_planes[ipl]].info.slope==-4)?-1:m_par->ybin(Track[x_planes[ipl]].info.y));
   }
   bool hit=false;
-  float32fixed<yzdex> yzsum=0;
+  float32fixed<m_yzdex> yzsum=0;
   float mxlf=0;
   int xdex=-1;
   int ybin=-1;
   int which=-1;
   m_par->key_to_indices(ybin_hits,xdex,ybin,which);
   if(xdex<0||ybin<0||which<0) return -999;
-  float32fixed<zbardex> zbar=m_par->Ak_local_slim[xdex][ybin][which];
-  float32fixed<bkdex>bk=m_par->Bk_local_slim[xdex][ybin][which];
-  msg(MSG::DEBUG) << "zbar is "<<zbar.getFixed()<<", and bk is "<<bk.getFixed()<< endmsg;
+  float32fixed<m_zbardex> zbar=m_par->m_Ak_local_slim[xdex][ybin][which];
+  float32fixed<m_bkdex>bk=m_par->m_Bk_local_slim[xdex][ybin][which];
+  ATH_MSG_DEBUG("zbar is "<<zbar.getFixed()<<", and bk is "<<bk.getFixed());
   int ebin=m_par->eta_bin(theta),pbin=m_par->phi_bin(phi);
   for(int ipl=0; ipl<nxp; ipl++){
-    float32fixed<yzdex> z=Track[x_planes[ipl]].info.z,y=Track[x_planes[ipl]].info.y;
+    float32fixed<m_yzdex> z=Track[x_planes[ipl]].info.z,y=Track[x_planes[ipl]].info.y;
     if(ebin!=-1){
-      z=z+m_par->zmod[ebin][pbin][ipl];
-      y=y+m_par->ymod[ebin][pbin][ipl];
+      z=z+m_par->m_zmod[ebin][pbin][ipl];
+      y=y+m_par->m_ymod[ebin][pbin][ipl];
     }
     if(Track[x_planes[ipl]].info.slope==-999||Track[x_planes[ipl]].info.slope==-4) continue;
     hit=true;
@@ -188,22 +182,21 @@ float32fixed<2> MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double the
   }
   float32fixed<2> mxl=float32fixed<2>(bk.getFixed()*yzsum.getFixed());
   if(!hit) {return float32fixed<2>(999);}
-  // if(log10(abs(mxl.getFixed()-mxlf))>-3.&&xdex!=5&&xdex!=10)cout<<setprecision(20)<<"*****AVENGE ME! *******fixed: "<<mxl.getFixed()<<", float:"<<mxlf<<",    (ERROR: "<<mxlf-mxl.getFixed()<<")");
   return mxl;
 }
 
 int MMT_Fitter::track_to_index(const vector<Hit>&track)const{
-  vector<bool>hits(m_par->setup.size(),false);
+  vector<bool>hits(m_par->m_setup.size(),false);
   for(int ihit=0;ihit<(int)track.size();ihit++)hits[track[ihit].info.plane]=(hits[track[ihit].info.plane]?true:track[ihit].info.slope>-2.);
   return m_par->bool_to_index(hits);
 }
 
 double MMT_Fitter::ideal_local_slope(const vector<Hit>& Track)const{
   vector<vector<double> > z_hit;
-  for(unsigned int i = 0; i<m_par->z_large.size(); i++){
+  for(unsigned int i = 0; i<m_par->m_z_large.size(); i++){
     vector<double> temp;
-    for(unsigned int j = 0; j<m_par->z_large[i].size(); j++)
-      temp.push_back(m_par->z_large[i][j].getFixed());
+    for(unsigned int j = 0; j<m_par->m_z_large[i].size(); j++)
+      temp.push_back(m_par->m_z_large[i][j].getFixed());
     z_hit.push_back(temp);
   }
   vector<int> x_planes=m_par->q_planes("x");
@@ -217,18 +210,16 @@ double MMT_Fitter::ideal_local_slope(const vector<Hit>& Track)const{
     hit=true;
     sum_xy += ak_idl*z*y;
     sum_y  += bk_idl*y;
-//     msg(MSG::DEBUG) << "...z="<<z<<",y="<<y<<",sum_y="<<sum_y<<",sum_xy="<<sum_xy;
   }
   if(!hit) return -10.;
   double ls_idl=sum_xy-sum_y;
-//   msg(MSG::DEBUG) << endl<<"ak_idl="<<ak_idl<<",bk_idl="<<bk_idl<<",sum_xy"<<sum_xy<<",sum_y="<<sum_y<<",ls_idl="<<ls_idl);
   return ls_idl;
 }
 
 double MMT_Fitter::ideal_z(const Hit& hit)const{
   int plane=hit.info.plane;
-  double tilt=(plane<4?m_par->correct.rotate.X():0),dz=(plane<4?m_par->correct.translate.Z():0),
-    nominal=m_par->z_nominal[plane].getFixed(),y=hit.info.y.getFixed()-m_par->ybases[plane].front().getFixed(),z=nominal+dz+y*tan(tilt);
+  double tilt=(plane<4?m_par->m_correct.rotate.X():0),dz=(plane<4?m_par->m_correct.translate.Z():0),
+    nominal=m_par->m_z_nominal[plane].getFixed(),y=hit.info.y.getFixed()-m_par->m_ybases[plane].front().getFixed(),z=nominal+dz+y*tan(tilt);
   return z;
 }
 
@@ -242,7 +233,7 @@ double MMT_Fitter::ideal_ak(const vector<Hit>& Track)const{
     hits++;//there's a hit
     sum_x  += addme;
     sum_xx += addme*addme;
-    msg(MSG::DEBUG) << "z["<<ip<<"]="<<addme<<", sum_x="<<sum_x<<", sum_xx="<<sum_xx<<", hits="<<hits<< endmsg;
+    ATH_MSG_DEBUG("z["<<ip<<"]="<<addme<<", sum_x="<<sum_x<<", sum_xx="<<sum_xx<<", hits="<<hits);
   }
   double diff = hits*sum_xx-sum_x*sum_x;
   return hits/diff;
@@ -260,9 +251,8 @@ double MMT_Fitter::ideal_zbar(const vector<Hit>& Track)const{
 
 float32fixed<2> MMT_Fitter::Get_Delta_Theta(float32fixed<2> M_local, float32fixed<2> M_global) const{
   int region=-1;
-  // if(div_hack)return Get_Delta_Theta_division(M_local,M_global);
   float32fixed<2> LG = M_local * M_global;
-  for(int j=0;j<number_LG_regions;j++){   //number_LG_regions
+  for(int j=0;j<m_number_LG_regions;j++){   //number_LG_regions
     if(LG <= DT_Factors_val(j,0)){
       region = j;
       break;
@@ -273,20 +263,20 @@ float32fixed<2> MMT_Fitter::Get_Delta_Theta(float32fixed<2> M_local, float32fixe
 }
 
 float32fixed<2> MMT_Fitter::DT_Factors_val(int i, int j) const{
-  if(m_par->val_tbl){
-    return m_par->DT_Factors[i][j];
+  if(m_par->m_val_tbl){
+    return m_par->m_DT_Factors[i][j];
   }
   if(j<0||j>1){
     ATH_MSG_WARNING("DT_Factors only has two entries on the second index (for LG and mult_factor); you inputed an index of " << j );
     exit(1);
   }
-  if(i<0||i>=number_LG_regions){
-    ATH_MSG_WARNING("There are " << number_LG_regions << " in DT_Factors(_val); you inputed an index of " << i );
+  if(i<0||i>=m_number_LG_regions){
+    ATH_MSG_WARNING("There are " << m_number_LG_regions << " in DT_Factors(_val); you inputed an index of " << i );
     exit(1);
   }
   double a=1.;//not sure what this is for, so hard to choose fixed_point algebra
-  if(j==0) return mult_factor_lgr(i,a,number_LG_regions,LG_min,LG_max);
-  return LG_lgr(i,a,number_LG_regions,LG_min,LG_max);
+  if(j==0) return mult_factor_lgr(i,a,m_number_LG_regions,m_LG_min,m_LG_max);
+  return LG_lgr(i,a,m_number_LG_regions,m_LG_min,m_LG_max);
 }
 
 float32fixed<2> MMT_Fitter::LG_lgr(int ilgr, double a, int number_LG_regions, float32fixed<2> _min, float32fixed<2> _max) const{
@@ -299,10 +289,6 @@ float32fixed<2> MMT_Fitter::mult_factor_lgr(int ilgr, double a, int number_LG_re
 }
 
 float32fixed<2> MMT_Fitter::Get_Delta_Theta_division(float32fixed<2> M_local, float32fixed<2> M_global, float32fixed<4> a) const{
-//delta_theta = theta_local_slope - theta_global_fit
-// a=1;  // Really sin(phi), but I use small angles about phi=pi/2
-
-
   //we could use 2 bits for the numerator and 3 for the denominator, but then
   //fixed_point doesn't know how to do the algebra. Assume we know how to do
   //this division (we don't, efficiently, thus the method Get_Delta_Theta
@@ -310,7 +296,7 @@ float32fixed<2> MMT_Fitter::Get_Delta_Theta_division(float32fixed<2> M_local, fl
 }
 
 vector<Hit> MMT_Fitter::q_hits(const string& type,const vector<Hit>& track) const{
-  string setup(m_par->setup);
+  string setup(m_par->m_setup);
   if(setup.length()!=track.size()){
     ATH_MSG_WARNING("Setup has length: "<<setup.length()<<", but there are "<<track.size()<<" hits in the track");
     exit(2);
@@ -327,10 +313,10 @@ vector<Hit> MMT_Fitter::q_hits(const string& type,const vector<Hit>& track) cons
 //change this to take u and/or v out of the roi calculation
 ROI MMT_Fitter::Get_ROI(float32fixed<2> M_x,float32fixed<2> M_u,float32fixed<2> M_v,const vector<Hit>&track) const{
   //M_* are all global slopes
-  msg(MSG::DEBUG) << "\nGet_ROI("<<M_x.getFixed()<<","<<M_u.getFixed()<<","<<M_v.getFixed()<<") "<< endmsg;
+  ATH_MSG_DEBUG("\nGet_ROI("<<M_x.getFixed()<<","<<M_u.getFixed()<<","<<M_v.getFixed()<<") ");
 
   //--- calc constants ------
-  float32fixed<2> b=TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+  float32fixed<2> b=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
   float32fixed<7> A=1./tan(b.getFixed());
   float32fixed<7> B=1./tan(b.getFixed());
 
@@ -353,38 +339,34 @@ ROI MMT_Fitter::Get_ROI(float32fixed<2> M_x,float32fixed<2> M_u,float32fixed<2>
   //--- average of 2 mx slope values ----if both u and v were bad, give it a -999 value to know not to use m_x
   //*** check to see if U and V are necessary for fit
   float32fixed<2> m_x = (nu+nv==0?0:(m_xv+m_xu)/(nu+nv));
-  if(m_par->correct.translate.X()!=0&&m_par->correct.type==2){
-    m_x+=phi_correct_factor(track)*m_par->correct.translate.X()/m_par->z_nominal[3].getFixed();
+  if(m_par->m_correct.translate.X()!=0&&m_par->m_correct.type==2){
+    m_x+=phi_correct_factor(track)*m_par->m_correct.translate.X()/m_par->m_z_nominal[3].getFixed();
   }
-  //if(debug)
-    msg(MSG::DEBUG) << "(b,A,B,my,mxu,mxv,mx)=("<<b.getFixed()<<","<<A.getFixed()<<","<<B.getFixed()<<","<<m_y.getFixed()<<","<<m_xu.getFixed()<<","<<m_xv.getFixed()<<","<<m_x.getFixed()<<")\n"<< endmsg;
-  //mfits.push_back(pair<double,double>(m_x.getFixed(),m_y.getFixed()));
+  ATH_MSG_DEBUG("(b,A,B,my,mxu,mxv,mx)=("<<b.getFixed()<<","<<A.getFixed()<<","<<B.getFixed()<<","<<m_y.getFixed()<<","<<m_xu.getFixed()<<","<<m_xv.getFixed()<<","<<m_x.getFixed()<<")\n");
 
   //Get m_x and m_y in parameterized values
-  int a_x = round((m_x.getFixed()-m_par->m_x_min.getFixed())/m_par->h_mx.getFixed()), a_y = round((m_y.getFixed()-m_par->m_y_min.getFixed())/m_par->h_my.getFixed());
+  int a_x = round((m_x.getFixed()-m_par->m_x_min.getFixed())/m_par->m_h_mx.getFixed()), a_y = round((m_y.getFixed()-m_par->m_y_min.getFixed())/m_par->m_h_my.getFixed());
   // Generally, this offers a reality check or cut.  The only reason a slope
   // should be "out of bounds" is because it represents a weird UV combination
   // -- ie. highly background influenced
-  if(a_y>m_par->n_y || a_y<0){
-    msg(MSG::DEBUG) << "y slope (theta) out of bounds in Get_ROI....(a_x,a_y,m_par->n_x,m_par->n_y)=("<<a_x<<","<<a_y<<","<<m_par->n_x<<","<<m_par->n_y<<")"<< endmsg;
+  if(a_y>m_par->m_n_y || a_y<0){
+    ATH_MSG_DEBUG("y slope (theta) out of bounds in Get_ROI....(a_x,a_y,m_par->n_x,m_par->n_y)=("<<a_x<<","<<a_y<<","<<m_par->m_n_x<<","<<m_par->m_n_y<<")");
     return ROI(-999,-999,-999,-999,-999);
   }
 
-  if(a_x>m_par->n_x || a_x<0){
-    msg(MSG::DEBUG) << "x slope (phi) out of bounds in Get_ROI....(a_x,a_y,m_par->n_x,m_par->n_y)=("<<a_x<<","<<a_y<<","<<m_par->n_x<<","<<m_par->n_y<<")"<< endmsg;
+  if(a_x>m_par->m_n_x || a_x<0){
+    ATH_MSG_DEBUG("x slope (phi) out of bounds in Get_ROI....(a_x,a_y,m_par->n_x,m_par->n_y)=("<<a_x<<","<<a_y<<","<<m_par->m_n_x<<","<<m_par->m_n_y<<")");
     return ROI(-999,-999,-999,-999,-999);
   }
 
-//   xent.push_back(a_x);yent.push_back(a_y);
-  msg(MSG::DEBUG) << "fv_angles...(a_x,a_y)=("<<a_x<<","<<a_y<<")"<< endmsg;
+  ATH_MSG_DEBUG("fv_angles...(a_x,a_y)=("<<a_x<<","<<a_y<<")");
   double phicor=0.;
-  if(m_par->correct.rotate.Z()!=0&&m_par->correct.type==2){
-//     phicor=-1.*phi_correct_factor(track)*m_par->correct.rotate.Z();
-    phicor=-0.2*m_par->correct.rotate.Z();
+  if(m_par->m_correct.rotate.Z()!=0&&m_par->m_correct.type==2){
+    phicor=-0.2*m_par->m_correct.rotate.Z();
   }
 
   float32fixed<4> fv_theta=Slope_Components_ROI_theta(a_y,a_x), fv_phi=(m_x.getFixed()==0?-999:Slope_Components_ROI_phi(a_y,a_x).getFixed()+phicor);
-  msg(MSG::DEBUG) << "fv_theta="<<fv_theta.getFixed()<<", fv_phi="<<fv_phi.getFixed()<< endmsg;
+  ATH_MSG_DEBUG("fv_theta="<<fv_theta.getFixed()<<", fv_phi="<<fv_phi.getFixed());
 
   //--- More hardware realistic approach but need fine tuning ----
   int roi = Rough_ROI_temp(fv_theta,fv_phi);
@@ -394,10 +376,10 @@ ROI MMT_Fitter::Get_ROI(float32fixed<2> M_x,float32fixed<2> M_u,float32fixed<2>
 }
 
 double MMT_Fitter::phi_correct_factor(const vector<Hit>&track)const{
-  if((m_par->correct.rotate.Z()==0&&m_par->correct.translate.X()==0)||m_par->correct.type!=2)return 0.;
+  if((m_par->m_correct.rotate.Z()==0&&m_par->m_correct.translate.X()==0)||m_par->m_correct.type!=2)return 0.;
   int nxmis=0,nx=0,numis=0,nu=0,nvmis=0,nv=0;
   double xpart=0.5,upart=0.5,vpart=0.5;
-  string set=m_par->setup;
+  string set=m_par->m_setup;
   for(int ihit=0;ihit<(int)track.size();ihit++){
     int n_pln=track[ihit].info.plane;
     bool ismis=n_pln<4;
@@ -414,8 +396,8 @@ double MMT_Fitter::phi_correct_factor(const vector<Hit>&track)const{
 }
 
 float32fixed<4> MMT_Fitter::Slope_Components_ROI_val(int jy, int ix, int thetaphi) const{
-  if(m_par->val_tbl){
-    return m_par->Slope_to_ROI[jy][ix][thetaphi];
+  if(m_par->m_val_tbl){
+    return m_par->m_Slope_to_ROI[jy][ix][thetaphi];
   }
   if(thetaphi<0||thetaphi>1){
     ATH_MSG_WARNING("Slope_Components_ROI only has two entries on the third index (for theta and phi); you inputed an index of " << thetaphi);
@@ -427,54 +409,46 @@ float32fixed<4> MMT_Fitter::Slope_Components_ROI_val(int jy, int ix, int thetaph
 
 float32fixed<4> MMT_Fitter::Slope_Components_ROI_theta(int jy, int ix) const{
   //get some parameter information
-  if(jy<0||jy>=m_par->n_y){
-    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_theta; there are only " << m_par->n_y << " of these.\n");
-    if(jy>=m_par->n_y)jy=m_par->n_y-1;
+  if(jy<0||jy>=m_par->m_n_y){
+    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_theta; there are only " << m_par->m_n_y << " of these.\n");
+    if(jy>=m_par->m_n_y)jy=m_par->m_n_y-1;
     else jy=0;
-//     exit(2);
   }
-  if(ix<0||ix>=m_par->n_x){
-    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_theta; there are only " << m_par->n_x << " of these.\n");
-    if(ix>=m_par->n_x)ix=m_par->n_x-1;
+  if(ix<0||ix>=m_par->m_n_x){
+    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_theta; there are only " << m_par->m_n_x << " of these.\n");
+    if(ix>=m_par->m_n_x)ix=m_par->m_n_x-1;
     else ix=0;
-//     exit(2);
   }
   int xdex=ix,ydex=jy+1;
   if(xdex==0)xdex++;
-  float32fixed<2> m_x=m_par->m_x_min+m_par->h_mx*xdex, m_y=m_par->m_y_min+m_par->h_my*ydex;
+  float32fixed<2> m_x=m_par->m_x_min+m_par->m_h_mx*xdex, m_y=m_par->m_y_min+m_par->m_h_my*ydex;
   float32fixed<4> theta=atan(sqrt( (m_x*m_x+m_y*m_y).getFixed()  ));
-//   cout<<"in slope componets roi theta, theta must be in ["<<m_par->minimum_large_theta<<","<<m_par->maximum_large_theta<<"]");
-  if(theta<m_par->minimum_large_theta || theta>m_par->maximum_large_theta){
-//     cout << "Our theta of "<<theta<<" is not in ["<<m_par->minimum_large_theta<<","<<m_par->maximum_large_theta<<"]");
+  if(theta<m_par->m_minimum_large_theta || theta>m_par->m_maximum_large_theta){
     theta=0;
   }
   return theta;
 }
 
 float32fixed<4> MMT_Fitter::Slope_Components_ROI_phi(int jy, int ix) const{
-  if(jy<0||jy>=m_par->n_y){
-    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_phi; there are only " << m_par->n_y << " of these.\n");
-    if(jy>=m_par->n_y)jy=m_par->n_y-1;
+  if(jy<0||jy>=m_par->m_n_y){
+    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_phi; there are only " << m_par->m_n_y << " of these.\n");
+    if(jy>=m_par->m_n_y)jy=m_par->m_n_y-1;
     else jy=0;
-//    exit(2);
   }
-  if(ix<0||ix>=m_par->n_x){
-    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_phi; there are only " << m_par->n_x << " of these.\n");
+  if(ix<0||ix>=m_par->m_n_x){
+    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_phi; there are only " << m_par->m_n_x << " of these.\n");
     //right now we're assuming these are cases just on the edges and so put the values to the okay limits
-    if(ix>=m_par->n_x)ix=m_par->n_x-1;
+    if(ix>=m_par->m_n_x)ix=m_par->m_n_x-1;
     else ix=0;
-//     exit(2);
   }
   int xdex=ix,ydex=jy+1;
-  float32fixed<2> m_x=m_par->m_x_min+m_par->h_mx*xdex, m_y=m_par->m_y_min+m_par->h_my*ydex;
-  //if(debug)
-    msg(MSG::DEBUG) << "m_par->m_x_min+m_par->h_mx*xdex="<<m_par->m_x_min.getFixed()<<"+"<<m_par->h_mx.getFixed()<<"*"<<xdex<<"="<<m_x.getFixed()<<", "<< endmsg;
-  //if(debug)
-    msg(MSG::DEBUG) << "m_par->m_y_min+m_par->h_my*ydex="<<m_par->m_y_min.getFixed()<<"+"<<m_par->h_my.getFixed()<<"*"<<ydex<<"="<<m_y.getFixed()<<", "<< endmsg;
+  float32fixed<2> m_x=m_par->m_x_min+m_par->m_h_mx*xdex, m_y=m_par->m_y_min+m_par->m_h_my*ydex;
+  ATH_MSG_DEBUG("m_par->m_x_min+m_par->h_mx*xdex="<<m_par->m_x_min.getFixed()<<"+"<<m_par->m_h_mx.getFixed()<<"*"<<xdex<<"="<<m_x.getFixed()<<", ");
+  ATH_MSG_DEBUG("m_par->m_y_min+m_par->h_my*ydex="<<m_par->m_y_min.getFixed()<<"+"<<m_par->m_h_my.getFixed()<<"*"<<ydex<<"="<<m_y.getFixed()<<", ");
   float32fixed<4> phi(atan2(m_x.getFixed(),m_y.getFixed()));//the definition is flipped from what you'd normally think
-  msg(MSG::DEBUG) << "for a phi of "<<phi.getFixed()<< endmsg;
-  if(phi<m_par->minimum_large_phi || phi>m_par->maximum_large_phi){
-    msg(MSG::DEBUG) << "Chucking phi of " << phi.getFixed()<<" which registers as not in ["<<m_par->minimum_large_phi.getFixed()<<","<<m_par->maximum_large_phi.getFixed()<<"]"<< endmsg;
+  ATH_MSG_DEBUG("for a phi of "<<phi.getFixed());
+  if(phi<m_par->m_minimum_large_phi || phi>m_par->m_maximum_large_phi){
+    ATH_MSG_DEBUG("Chucking phi of " << phi.getFixed()<<" which registers as not in ["<<m_par->m_minimum_large_phi.getFixed()<<","<<m_par->m_maximum_large_phi.getFixed()<<"]");
     phi=999;
   }
   return phi;
@@ -482,7 +456,7 @@ float32fixed<4> MMT_Fitter::Slope_Components_ROI_phi(int jy, int ix) const{
 
 int MMT_Fitter::Rough_ROI_temp(float32fixed<4> theta, float32fixed<4> phi) const{
   //temporary function to identify areas of the wedge.
-  float32fixed<4> minimum_large_theta=m_par->minimum_large_theta, maximum_large_theta=m_par->maximum_large_theta,minimum_large_phi=m_par->minimum_large_phi, maximum_large_phi=m_par->maximum_large_phi;
+  float32fixed<4> minimum_large_theta=m_par->m_minimum_large_theta, maximum_large_theta=m_par->m_maximum_large_theta,minimum_large_phi=m_par->m_minimum_large_phi, maximum_large_phi=m_par->m_maximum_large_phi;
   int n_theta_rois=32, n_phi_rois=16;//*** ASK BLC WHAT THESE VALUES OUGHT TO BE!
 
   float32fixed<4> h_theta = (maximum_large_theta - minimum_large_theta)/n_theta_rois;
@@ -494,13 +468,6 @@ int MMT_Fitter::Rough_ROI_temp(float32fixed<4> theta, float32fixed<4> phi) const
   if(theta<minimum_large_theta || theta>maximum_large_theta) roi_t = 0;
   if(phi<minimum_large_phi || phi>maximum_large_phi) roi_p = 0;
   int ret_val=roi_t * 1000 + roi_p;
-  /*
-  cout<<"ret_val:"<<ret_val);
-  if(ret_val<1){
-    cout << "ROI theta of "<<theta<<" is not in ["<<m_par->minimum_large_theta<<","<<m_par->maximum_large_theta<<"]");
-    cout << "ROI phi of "<<phi<<" is not in ["<<m_par->minimum_large_phi<<","<<m_par->maximum_large_phi<<"]");
-  }
-  */
   return ret_val;
 }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
index 74503c96547fd9f9ce4c6bd883c7d155d4c2f9a0..295206603968781a3e41e8711810e2766f09f504 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/MMT_struct.h"
@@ -9,12 +9,9 @@
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MMReadoutElement.h"
 
-
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
 
-// double MMTStructConst{return 8192.;}
-
 float MMTStructConst = 8192.;
 
 std_align::std_align(int qcm,const TVector3& trans,const TVector3& ang):type(qcm),translate(trans),rotate(ang){
@@ -32,7 +29,6 @@ string std_align::par_title(int par_num,bool small_unit)const{
   else if(par_num==4) par_title="#beta_{z}";
   else if(par_num==5) par_title="#alpha_{t}";
   else{
-    // ATH_MSG_DEBUG("Parameter number "<<par_num<<" not in [0,"<<parmax()<<"]; returning...");
     exit(3);
   }
   if(par_num>2){
@@ -51,7 +47,6 @@ string std_align::par_name(int par_num)const{
   else if(par_num==4) par_name="drz";
   else if(par_num==5) par_name="drt";
   else{
-    // ATH_MSG_DEBUG("Parameter number "<<par_num<<" not in [0,"<<parmax()<<"]; returning...");
     exit(3);
   }
   return par_name;
@@ -100,7 +95,6 @@ string std_align::print()const{
   }
   for(int imal=0; imal<maxpar;imal++){
     ostringstream addme;
-//     if(par_val(imal)!=0)addme<<(logan.compare("")==0?"":", ")<<par_title(imal)<<"="<<par_val(imal);
     if(par_val(imal)!=0){
       addme<<"_"<<par_name(imal)<<par_val(imal);
     }
@@ -139,7 +133,6 @@ string std_align::detail()const{
   else if(type==2) logan+="COR";
   for(int imal=0; imal<parmax();imal++){
     ostringstream addme;
-//     if(par_val(imal)!=0)addme<<(logan.compare("")==0?"":", ")<<par_title(imal)<<"="<<par_val(imal);
     if(par_val(imal)!=0)addme<<", "<<par_title(imal)<<"="<<par_val(imal);
     logan+=addme.str();
   }
@@ -149,7 +142,6 @@ string std_align::detail()const{
 
 bool std_align::is_nominal()const{
   for(int i=0;i<parmax();i++){
-//     if(log10(abs(par_val(i)))>-6) return false;//sometimes doubles as zero get set to really small but not zero values...
     if(par_val(i)!=0) return false;//sometimes doubles as zero get set to really small but not zero values...
   }
   return true;
@@ -241,29 +233,26 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   if(inputParams.misal.is_nominal())inputParams.misal.type=0;
   //can still do sim_corrections for nominal
   if(inputParams.corr.is_nominal()&&inputParams.corr.type==2)inputParams.corr.type=0;
-  n_etabins=2;
-  n_etabins=10;
-  n_phibins=10;
-  dtheta_cut=0.016;//16 mrad dtheta cut (VMM limitation...may revise)
-  diag=true;
-  fill0=false;
+  m_n_etabins=10;
+  m_n_phibins=10;
+  m_dtheta_cut=0.016;//16 mrad dtheta cut (VMM limitation...may revise)
+  m_diag=true;
+  m_fill0=false;
   //stuff pulled from the inputParams
-  //h=float32fixed<2>
-  h=float32fixed<2>(inputParams.h);
-  CT_x=inputParams.ctx;
-  CT_uv=inputParams.ctuv;
-  uv_error=float32fixed<2>(inputParams.uverr);
-  setup=(inputParams.setup);
-  islarge=inputParams.islarge;
-  dlm_new=inputParams.q_dlm;
-  chargeThreshold=inputParams.qt;
-  genbg=inputParams.genbg;
-  misal=inputParams.misal;
-  misalign=(misal.type==1);
-  correct=inputParams.corr;
-//   if(correct.type==2)n_phibins*=2;
-  ybins=8; n_stations_eta=(dlm_new?2:4);
-  val_tbl=inputParams.fill_val;
+  m_h=float32fixed<2>(inputParams.h);
+  m_CT_x=inputParams.ctx;
+  m_CT_uv=inputParams.ctuv;
+  m_uv_error=float32fixed<2>(inputParams.uverr);
+  m_setup=(inputParams.setup);
+  m_islarge=inputParams.islarge;
+  m_dlm_new=inputParams.q_dlm;
+  m_chargeThreshold=inputParams.qt;
+  m_genbg=inputParams.genbg;
+  m_misal=inputParams.misal;
+  m_misalign=(m_misal.type==1);
+  m_correct=inputParams.corr;
+  m_ybins=8; m_n_stations_eta=(m_dlm_new?2:4);
+  m_val_tbl=inputParams.fill_val;
 
   // Get the modules for each multiplet, the sector and side arguement (third and fifth argument, respectively) shouldn't matter
   // since the algorithm computes locally
@@ -275,22 +264,6 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   MMDetectorDescription* mm_bottom_mult1 = aHelper.Get_MMDetector(sector, 1, 5, 1, side);
   MMDetectorDescription* mm_bottom_mult2 = aHelper.Get_MMDetector(sector, 1, 5, 2, side);
 
-  // float sWidth_bottom  = mm_bottom_mult1->sWidth();
-  // float sWidth_top     = mm_top_mult1->sWidth();
-  // float lWidth_bottom  = mm_bottom_mult1->lWidth();
-  // float lWidth_top     = mm_top_mult1->lWidth();
-  // float length_bottom  = mm_bottom_mult1->Length();
-  // float length_top     = mm_top_mult1->Length();
-
-  // float minYSize_top      = sWidth_top;// - 2.*xFrame_top;
-  // float minYSize_bottom   = sWidth_bottom;// - 2.*xFrame_bottom;
-
-  // float maxYSize_top      = lWidth_top;// - 2.*xFrame_top;
-  // float maxYSize_bottom   = lWidth_bottom;// - 2.*xFrame_bottom;
-
-  // float xSize_top         = length_top;
-  // float xSize_bottom      = length_bottom;
-
   MMReadoutParameters roParam_top_mult1    = mm_top_mult1->GetReadoutParameters();
   MMReadoutParameters roParam_top_mult2    = mm_top_mult2->GetReadoutParameters();
   MMReadoutParameters roParam_bottom_mult1 = mm_bottom_mult1->GetReadoutParameters();
@@ -300,16 +273,8 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   //Only changes for small or large and per module. Phi, layer, etc don't matter (just set to 1)
 //const MuonGM::MuonDetectorManager* m_MuonGeoMgr;
   std::string wedgeString = (wedgeSize=='L' ? "MML" : "MMS");
-  // Identifier id_top    = m_detManager->mmIdHelper()->channelID(wedgeString,/*eta*/ 2,1,1, 1, 1);
-  // Identifier id_bottom = m_detManager->mmIdHelper()->channelID(wedgeString,/*eta*/ 1,1,1, 1, 1);
-
-  // int chMax_top    = m_detManager->mmIdHelper()->channelMax(id_top);
-  // int chMax_bottom = m_detManager->mmIdHelper()->channelMax(id_bottom);
-
-  // double dY_top    = 0.5*(maxYSize_top-minYSize_top);//-2.*design_top->deadS);
-  // double dY_bottom = 0.5*(maxYSize_bottom-minYSize_bottom);//-2.*design_top->deadS);
 
-  if(!islarge){
+  if(!m_islarge){
     ATH_MSG_WARNING("We haven't configured the small wedge parameters yet!  Go bother the developer...kindly...this will likely crash now!\n");
     return;
   }
@@ -317,54 +282,50 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   //z = into wedge along beamline
   //x = horizontal distance from beam looking down
   ////////////  Define the large wedge /////////////////
-  w1=float32fixed<18>(mm_top_mult1->lWidth());   //top
-  w2=float32fixed<18>(mm_top_mult1->lWidth()*1./(cos(roParam_top_mult1.stereoAngle.at(3))));  //determined by 33deg angle   //shelves part
-  w3=float32fixed<18>(mm_bottom_mult1->sWidth());//582.3);  //bottom
-  h1=float32fixed<18>(roParam_top_mult1.roLength+roParam_bottom_mult1.roLength+5.0); //how tall wedge is at w1, ie total height
+  m_w1=float32fixed<18>(mm_top_mult1->lWidth());   //top
+  m_w2=float32fixed<18>(mm_top_mult1->lWidth()*1./(cos(roParam_top_mult1.stereoAngle.at(3))));  //determined by 33deg angle   //shelves part
+  m_w3=float32fixed<18>(mm_bottom_mult1->sWidth());//582.3);  //bottom
+  m_h1=float32fixed<18>(roParam_top_mult1.roLength+roParam_bottom_mult1.roLength+5.0); //how tall wedge is at w1, ie total height
 
-  wedge_opening_angle = float32fixed<18>(33.);  //degree
+  m_wedge_opening_angle = float32fixed<18>(33.);  //degree
 
-  z_large=vector<vector<float32fixed<18> > >(ybins,vector<float32fixed<18> >(setup.length(),float32fixed<18>(0.)));
+  m_z_large=vector<vector<float32fixed<18> > >(m_ybins,vector<float32fixed<18> >(m_setup.length(),float32fixed<18>(0.)));
 
   // retrieve the z-position of the planes
-  z_nominal.clear();
+  m_z_nominal.clear();
   int eta = 1;
   for (auto pos: MM_firststrip_positions(m_detManager, wedgeString, eta)){
-    z_nominal.push_back(float32fixed<18>(pos.z()));
+    m_z_nominal.push_back(float32fixed<18>(pos.z()));
   }
 
-  if(z_nominal.size() != setup.size()){
-    ATH_MSG_WARNING( "Number of planes in setup is "<< setup.size()
-              << ", but we have a nominal "     << z_nominal.size() << " planes.");
+  if(m_z_nominal.size() != m_setup.size()){
+    ATH_MSG_WARNING( "Number of planes in setup is "<< m_setup.size()
+              << ", but we have a nominal "     << m_z_nominal.size() << " planes.");
     exit(9);
   }
 
-  mid_plane_large=float32fixed<18>(0.);
-  for(unsigned int iz=0; iz<z_nominal.size(); iz++) mid_plane_large+=z_nominal[iz].getFixed();
-  mid_plane_large/=z_nominal.size();
+  m_mid_plane_large=float32fixed<18>(0.);
+  for(unsigned int iz=0; iz<m_z_nominal.size(); iz++) m_mid_plane_large+=m_z_nominal[iz].getFixed();
+  m_mid_plane_large/=m_z_nominal.size();
 
   vector<int> xp=q_planes("x"),up=q_planes("u"),vp=q_planes("v");
-//   ATH_MSG_DEBUG(<<"MMT_s::MMT_Parameters() mp_large_X ("<<xp.size()<<" planes)\n";
-  mid_plane_large_X=float32fixed<18>(0.);
-  for(unsigned int ix=0;ix<xp.size();ix++) mid_plane_large_X+=z_nominal[xp[ix]].getFixed();
-  mid_plane_large_X /= 1.*xp.size();
-
-//   ATH_MSG_DEBUG(<<"MMT_s::MMT_Parameters() mp_large_UV ("<<up.size()+vp.size()<<" planes)\n";
-  mid_plane_large_UV=float32fixed<18>(0.);
-  for(unsigned int iu=0;iu<up.size();iu++) mid_plane_large_UV+=z_nominal[up[iu]].getFixed();
-  for(unsigned int iv=0;iv<vp.size();iv++) mid_plane_large_UV+=z_nominal[vp[iv]].getFixed();
-  mid_plane_large_UV /= 1.*(up.size()+vp.size());
-
-  H=float32fixed<18>(roParam_bottom_mult1.distanceFromZAxis);//982.); //bottom of wedge to the beamline
-  Hnom=float32fixed<18>(roParam_bottom_mult1.distanceFromZAxis);//982.); //bottom of wedge to the beamline
-  //L=float32fixed<18>(7536.);//7500.); //distance from IP to front side of wedge
-
-  strip_width = float32fixed<4>(roParam_top_mult1.stripPitch);  // 0.5;
-  stereo_degree = float32fixed<4>(TMath::RadToDeg()*roParam_top_mult1.stereoAngle.at(2)); //0.75 //3 in degrees!
+  m_mid_plane_large_X=float32fixed<18>(0.);
+  for(unsigned int ix=0;ix<xp.size();ix++) m_mid_plane_large_X+=m_z_nominal[xp[ix]].getFixed();
+  m_mid_plane_large_X /= 1.*xp.size();
+
+  m_mid_plane_large_UV=float32fixed<18>(0.);
+  for(unsigned int iu=0;iu<up.size();iu++) m_mid_plane_large_UV+=m_z_nominal[up[iu]].getFixed();
+  for(unsigned int iv=0;iv<vp.size();iv++) m_mid_plane_large_UV+=m_z_nominal[vp[iv]].getFixed();
+  m_mid_plane_large_UV /= 1.*(up.size()+vp.size());
+
+  m_H=float32fixed<18>(roParam_bottom_mult1.distanceFromZAxis);//982.); //bottom of wedge to the beamline
+  m_Hnom=float32fixed<18>(roParam_bottom_mult1.distanceFromZAxis);//982.); //bottom of wedge to the beamline
+
+  m_strip_width = float32fixed<4>(roParam_top_mult1.stripPitch);  // 0.5;
+  m_stereo_degree = float32fixed<4>(TMath::RadToDeg()*roParam_top_mult1.stereoAngle.at(2)); //0.75 //3 in degrees!
   float32fixed<2> degree=roParam_top_mult1.stereoAngle.at(2);
-  // std::cout << "DEGREE" << degree.getFixed()  << " " << stereo_degree.getFixed() << std::endl;
-  vertical_strip_width_UV = strip_width.getFixed()/cos(degree.getFixed());
-  ybases=vector<vector<float32fixed<18> > >(setup.size(),vector<float32fixed<18> >(n_stations_eta,float32fixed<18>(0.)));
+  m_vertical_strip_width_UV = m_strip_width.getFixed()/cos(degree.getFixed());
+  m_ybases=vector<vector<float32fixed<18> > >(m_setup.size(),vector<float32fixed<18> >(m_n_stations_eta,float32fixed<18>(0.)));
 
   //gposx for X1; gpos-lpos X2,UV1,UV2
   vector<float32fixed<18> > xeta,ueta,veta;
@@ -376,7 +337,6 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   float sin_rotation = sin(-2*TMath::Pi() / 16.0);
   float x_rotated = 0.0;
   float y_rotated = 0.0;
-  // float z_rotated = 0.0;
 
   float st_angle = 0.0;
 
@@ -391,16 +351,14 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
       if (wedgeString=="MMS"){
         x_rotated = pos.x()*cos_rotation - pos.y()*sin_rotation;
         y_rotated = pos.x()*sin_rotation + pos.y()*cos_rotation;
-        // z_rotated = pos.z();
       }
       else{
         x_rotated = pos.x();
         y_rotated = pos.y();
-        // z_rotated = pos.z();
       }
 
-      if      (is_u(layer)) st_angle = -1*abs(stereo_degree.getFixed());
-      else if (is_v(layer)) st_angle =    abs(stereo_degree.getFixed());
+      if      (is_u(layer)) st_angle = -1*abs(m_stereo_degree.getFixed());
+      else if (is_v(layer)) st_angle =    abs(m_stereo_degree.getFixed());
       else                  st_angle = 0;
 
       // walk from the center of the strip to the position of the strip at the center of the wedge.
@@ -419,116 +377,102 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
   // store radial positions as fixed point
   std::vector< float32fixed<18> > radial_pos_xx = {float32fixed<18>(radial_pos_xx_1), float32fixed<18>(radial_pos_xx_2)};
   std::vector< float32fixed<18> > radial_pos_uv = {float32fixed<18>(radial_pos_uv_1), float32fixed<18>(radial_pos_uv_2)};
-  ybases[0] = radial_pos_xx;
-  ybases[1] = radial_pos_xx;
-  ybases[2] = radial_pos_uv;
-  ybases[3] = radial_pos_uv;
-  ybases[4] = radial_pos_uv;
-  ybases[5] = radial_pos_uv;
-  ybases[6] = radial_pos_xx;
-  ybases[7] = radial_pos_xx;
+  m_ybases[0] = radial_pos_xx;
+  m_ybases[1] = radial_pos_xx;
+  m_ybases[2] = radial_pos_uv;
+  m_ybases[3] = radial_pos_uv;
+  m_ybases[4] = radial_pos_uv;
+  m_ybases[5] = radial_pos_uv;
+  m_ybases[6] = radial_pos_xx;
+  m_ybases[7] = radial_pos_xx;
 
 
   //now put in the positions at `ly spaced points for a y dependent z
-  // bool sho=true&&debug;
   bool hack=false;
-  // bool fancy=false;
-  z_large=vector<vector<float32fixed<18> > >(ybins,z_nominal);
-  double pitch_f=1.*sin(correct.rotate.X())*h1.getFixed()/ybins,pitch_b=0,bumper_up=0.0;
+  m_z_large=vector<vector<float32fixed<18> > >(m_ybins,m_z_nominal);
+  double pitch_f=1.*sin(m_correct.rotate.X())*m_h1.getFixed()/m_ybins,pitch_b=0,bumper_up=0.0;
   if(hack){double factor=-1;pitch_f*=factor;pitch_b*=factor;}
-  ATH_MSG_DEBUG("Specs: correct.rotate.X()="<<correct.rotate.X()<<",correct.translate.Z()="<<correct.translate.Z()<<",pitch_f="<<pitch_f);
-  for(int iy=0;iy<ybins;iy++){
+  ATH_MSG_DEBUG("Specs: correct.rotate.X()="<<m_correct.rotate.X()<<",correct.translate.Z()="<<m_correct.translate.Z()<<",pitch_f="<<pitch_f);
+  for(int iy=0;iy<m_ybins;iy++){
     //z axis in misalignment line points in the opposite direction....TOO LATE! (right handed coordinate system the way we expect for x and y makes this happen)
-    double over_f=pitch_f*(iy+bumper_up)-correct.translate.Z(),over_b=0;//pitch_b*(iy+bumper_up)+correct.dzb;
+    double over_f=pitch_f*(iy+bumper_up)-m_correct.translate.Z(),over_b=0;//pitch_b*(iy+bumper_up)+correct.dzb;
     ATH_MSG_DEBUG("iy="<<iy<<"over_f="<<over_f<<",over_b="<<over_b);
     for(int jp=0;jp<8;jp++){
-      ATH_MSG_DEBUG("z_large["<<iy<<"]["<<jp<<"]"<<z_large[iy][jp].getFixed()<<"--->");
-      if(jp<4)z_large[iy][jp]+=over_f;
-      else z_large[iy][jp]+=over_b;
-      ATH_MSG_DEBUG(z_large[iy][jp].getFixed());
+      ATH_MSG_DEBUG("m_z_large["<<iy<<"]["<<jp<<"]"<<m_z_large[iy][jp].getFixed()<<"--->");
+      if(jp<4)m_z_large[iy][jp]+=over_f;
+      else m_z_large[iy][jp]+=over_b;
+      ATH_MSG_DEBUG(m_z_large[iy][jp].getFixed());
     }
   }
 
   //////// TABLE GENERATORS ///////////////  //size of cartesian steps
-  h_mx = float32fixed<2>(0.0001); // 0.005;  //0.001;
-  h_my = float32fixed<2>(0.0001); //0.005;  //0.001;
-  m_y_max = ( (Hnom+h1)/z_nominal.front() );
-  m_y_min = ( H/z_nominal.back() );
-  m_x_max = (w2/2.)/z_nominal.front();
-  m_x_min = (w2/-2.)/z_nominal.back(); //-2;
-
-  n_x = ceil((m_x_max - m_x_min).getFixed()/h_mx.getFixed());
-  n_y = ceil((m_y_max - m_y_min).getFixed()/h_my.getFixed());
+  m_h_mx = float32fixed<2>(0.0001); // 0.005;  //0.001;
+  m_h_my = float32fixed<2>(0.0001); //0.005;  //0.001;
+  m_y_max = ( (m_Hnom+m_h1)/m_z_nominal.front() );
+  m_y_min = ( m_H/m_z_nominal.back() );
+  m_x_max = (m_w2/2.)/m_z_nominal.front();
+  m_x_min = (m_w2/-2.)/m_z_nominal.back(); //-2;
+
+  m_n_x = ceil((m_x_max - m_x_min).getFixed()/m_h_mx.getFixed());
+  m_n_y = ceil((m_y_max - m_y_min).getFixed()/m_h_my.getFixed());
   /////////////////////////////////////////
 
   //////////  for cut applications  /////////////////
   double tol = 0;  //0.02;
-  //   minimum_large_theta = atan((cos(TMath::Pi()/2-TMath::Pi()/180*wedge_opening_angle/2)*w3+H)/z_nominal.front())+tol;
-  //   ATH_MSG_DEBUG("Old min theta has dist_T of "<<(cos(TMath::Pi()/2-TMath::Pi()/180*wedge_opening_angle/2)*w3+H)<<" for a min angle of "<<minimum_large_theta<<" eta="<<-log(tan(0.5*minimum_large_theta)));
-  //   maximum_large_theta = atan((H+h1)/z_nominal.back())-tol;
 
   //BLC had some interesting bounds...let's do the ones that make sense to me
-  minimum_large_theta = float32fixed<4>(atan(H.getFixed()/z_nominal.back().getFixed())+tol);
-  maximum_large_theta = float32fixed<4>(atan(sqrt(pow( (Hnom+h1).getFixed(),2)+0.25*pow(w1.getFixed(),2))/z_nominal.back().getFixed())-tol);
-  //   minimum_large_phi = float32fixed<4>(TMath::Pi()/2-TMath::DegToRad(0.5*wedge_opening_angle.getFixed())+tol);  maximum_large_phi = float32fixed<4>(TMath::Pi()/2+TMath::DegToRad(0.5*wedge_opening_angle.getFixed())-tol);
-  minimum_large_phi = float32fixed<4>(-TMath::DegToRad()*0.5*wedge_opening_angle.getFixed())+tol;  maximum_large_phi = float32fixed<4>(TMath::DegToRad()*(0.5*wedge_opening_angle.getFixed())-tol);
+  m_minimum_large_theta = float32fixed<4>(atan(m_H.getFixed()/m_z_nominal.back().getFixed())+tol);
+  m_maximum_large_theta = float32fixed<4>(atan(sqrt(pow( (m_Hnom+m_h1).getFixed(),2)+0.25*pow(m_w1.getFixed(),2))/m_z_nominal.back().getFixed())-tol);
+  m_minimum_large_phi = float32fixed<4>(-TMath::DegToRad()*0.5*m_wedge_opening_angle.getFixed())+tol;  m_maximum_large_phi = float32fixed<4>(TMath::DegToRad()*(0.5*m_wedge_opening_angle.getFixed())-tol);
   ///////////////////////////////////////////////////
 
-  double phiseg= ((maximum_large_phi-minimum_large_phi)/n_phibins).getFixed();
+  double phiseg= ((m_maximum_large_phi-m_minimum_large_phi)/m_n_phibins).getFixed();
   m_phibins.clear();
-  for(int i=0;i<=n_phibins;i++)  m_phibins.push_back(  (minimum_large_phi+phiseg*i).getFixed()   );
-  double etalo=-log(tan(0.5*maximum_large_theta.getFixed())),etahi=-log(tan(0.5*minimum_large_theta.getFixed()));bool custom=false;
+  for(int i=0;i<=m_n_phibins;i++)  m_phibins.push_back(  (m_minimum_large_phi+phiseg*i).getFixed()   );
+  double etalo=-log(tan(0.5*m_maximum_large_theta.getFixed())),etahi=-log(tan(0.5*m_minimum_large_theta.getFixed()));bool custom=false;
   if(custom){
     //these custom eta bins have the top station as one bin (since that has normal shape for the phi resolutions)
     //and separates the old part from gap to 2.5 (where the simulation used to be limited) and then one bin from 2.5 to max (new stuff)
     m_etabins.clear();
     m_etabins.push_back(etalo);
-    double etamid=asinh(  (z_nominal.front()/ybases.front()[1] ).getFixed()  );
+    double etamid=asinh(  (m_z_nominal.front()/m_ybases.front()[1] ).getFixed()  );
     double intermid=(2.5-etamid)/8.;
     for(int i=0;i<8;i++)m_etabins.push_back(etamid+intermid*i);
     m_etabins.push_back(2.5);
     m_etabins.push_back(etahi);
-    n_etabins=m_etabins.size()-1;
+    m_n_etabins=m_etabins.size()-1;
   }
-  else if(n_etabins==(int)xeta.size()){
+  else if(m_n_etabins==(int)xeta.size()){
     m_etabins.push_back(etalo);
-    for(int i=n_etabins-1;i>=0;i--){
-      m_etabins.push_back(asinh( (z_nominal.front()/xeta[i]).getFixed() ));
+    for(int i=m_n_etabins-1;i>=0;i--){
+      m_etabins.push_back(asinh( (m_z_nominal.front()/xeta[i]).getFixed() ));
     }
   }
   else{
-    double increment=(etahi-etalo)/n_etabins*1.;
-    for(int i=0;i<=n_etabins;i++)m_etabins.push_back(etalo+increment*i);
+    double increment=(etahi-etalo)/m_n_etabins*1.;
+    for(int i=0;i<=m_n_etabins;i++)m_etabins.push_back(etalo+increment*i);
   }
 
   ///////   Rough ROI  ////////////
-  n_theta_rois = 32;
-  n_phi_rois = 16;
+  m_n_theta_rois = 32;
+  m_n_phi_rois = 16;
   //////////////////////////////
 
   /////// Front Filter /////////////
-  double theta_max=maximum_large_theta.getFixed();
-  double theta_min=minimum_large_theta.getFixed();
-
-  slope_max = float32fixed<3>(tan(theta_max));
-  slope_min = float32fixed<3>(tan(theta_min));
-
-  //--- the following slope road and thresholds are often re-defined immediately in any master script running the file
-  //   h = 0.0009;//2.5e-4;  //10^(-3);
-  //   CT_x = 3;
-
-  CT_u = 0;
-  CT_v = 0;
-  //   CT_uv = 2;//3 in Run_File.m
-  CT = CT_x + CT_uv;
-  x_error = .0035;//h*0.5;
-  //uv_error = 0.0035;//3.5e-3;
-  BC_window = 2;
+  double theta_max=m_maximum_large_theta.getFixed();
+  double theta_min=m_minimum_large_theta.getFixed();
+
+  m_slope_max = float32fixed<3>(tan(theta_max));
+  m_slope_min = float32fixed<3>(tan(theta_min));
+
+  m_CT_u = 0;
+  m_CT_v = 0;
+  m_CT = m_CT_x + m_CT_uv;
+  m_x_error = .0035;//h*0.5;
+  m_BC_window = 2;
   //////////////////////////////////
   //tables--with parameters set, we can now generate them
-  /*DT_Factors=vector<vector<double> >();
-  Slope_to_ROI=vector<vector<vector<double> > >();*/
-  if(val_tbl){
+  if(m_val_tbl){
     //Reference for local slope least squares fit
     Local_Slope_A_B();
 
@@ -539,7 +483,7 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
     Delta_theta_optimization_LG();
 
     //simulation-based correction fill...if available
-    if(correct.type==3)fill_crep_table(inputParams.pcrep_dir,inputParams.tag);
+    if(m_correct.type==3)fill_crep_table(inputParams.pcrep_dir,inputParams.tag);
     fill_yzmod();
   }
 }
@@ -552,8 +496,8 @@ std::vector<Amg::Vector3D> MMT_Parameters::MM_firststrip_positions(const MuonGM:
   Identifier strip_id;
   int        phi = 1, strip = 1;
 
-  for (unsigned int mult = 1; mult <= n_multiplets; mult++) {
-    for (unsigned int layer = 1; layer <= n_layers; layer++) {
+  for (unsigned int mult = 1; mult <= m_n_multiplets; mult++) {
+    for (unsigned int layer = 1; layer <= m_n_layers; layer++) {
 
       Amg::Vector3D pos(0.0, 0.0, 0.0);
       strip_id = m_detManager->mmIdHelper()->channelID(wedge, eta, phi, mult, layer, strip);
@@ -572,9 +516,9 @@ std::vector<Amg::Vector3D> MMT_Parameters::MM_firststrip_positions(const MuonGM:
    return positions;
 }
 
-int MMT_Parameters::is_x(int plane){ return (std::find(planes_x.begin(), planes_x.end(), plane) != planes_x.end()) ? 1 : 0; }
-int MMT_Parameters::is_u(int plane){ return (std::find(planes_u.begin(), planes_u.end(), plane) != planes_u.end()) ? 1 : 0; }
-int MMT_Parameters::is_v(int plane){ return (std::find(planes_v.begin(), planes_v.end(), plane) != planes_v.end()) ? 1 : 0; }
+int MMT_Parameters::is_x(int plane){ return (std::find(m_planes_x.begin(), m_planes_x.end(), plane) != m_planes_x.end()) ? 1 : 0; }
+int MMT_Parameters::is_u(int plane){ return (std::find(m_planes_u.begin(), m_planes_u.end(), plane) != m_planes_u.end()) ? 1 : 0; }
+int MMT_Parameters::is_v(int plane){ return (std::find(m_planes_v.begin(), m_planes_v.end(), plane) != m_planes_v.end()) ? 1 : 0; }
 
 vector<int> MMT_Parameters::q_planes(const string& type) const{
   if(type.length()!=1) exit(0);
@@ -583,45 +527,42 @@ vector<int> MMT_Parameters::q_planes(const string& type) const{
     exit(0);
   }
   vector<int> q_planes;
-  for(unsigned int ip=0;ip<setup.size();ip++){
-    if(setup.compare(ip,1,type)==0){ q_planes.push_back(ip);
+  for(unsigned int ip=0;ip<m_setup.size();ip++){
+    if(m_setup.compare(ip,1,type)==0){ q_planes.push_back(ip);
       }
   }
   return q_planes;
 }
 
 par_par MMT_Parameters::param_par() const{
-  return par_par(h.getFixed(),CT_x,CT_uv,uv_error.getFixed(),setup,islarge,dlm_new,genbg,chargeThreshold,misal,correct,val_tbl);
+  return par_par(m_h.getFixed(),m_CT_x,m_CT_uv,m_uv_error.getFixed(),m_setup,m_islarge,m_dlm_new,m_genbg,m_chargeThreshold,m_misal,m_correct,m_val_tbl);
 }
 
 double MMT_Parameters::y_from_eta_wedge(double eta,int plane)const{
   //assumes wedge geometry--average x^2, is 1/3 y^2*tan^2(stereo_degree), for eta/y correspondence
-  double z=z_nominal[plane].getFixed(),zeta=TMath::DegToRad()*(0.5*stereo_degree.getFixed());
+  double z=m_z_nominal[plane].getFixed(),zeta=TMath::DegToRad()*(0.5*m_stereo_degree.getFixed());
   return z*tan(2*atan(exp(-1.*eta)))/sqrt(1+tan(zeta)*tan(zeta)/3.);
 }
 
 double MMT_Parameters::eta_wedge_from_y(double y,int plane)const{
-  double z=z_nominal[plane].getFixed(),zeta=TMath::DegToRad()*(0.5*stereo_degree.getFixed());
+  double z=m_z_nominal[plane].getFixed(),zeta=TMath::DegToRad()*(0.5*m_stereo_degree.getFixed());
   return -1.*log(tan(0.5*atan(y/z*sqrt(1+tan(zeta)*tan(zeta)/3.))));
 }
 
 int MMT_Parameters::ybin(double y,int plane)const{
-//   return 0;
-  double base=ybases[plane].front().getFixed(),seg_len=h1.getFixed()/ybins;
+  double base=m_ybases[plane].front().getFixed(),seg_len=m_h1.getFixed()/m_ybins;
   //if it's over, just keep it...for now--if it's below keep it, too: perhaps necessary for larger slope road sizes
   //update: DON'T keep the below ones....terrible things for drs
-  int the_bin=ybases.front().size()-1;
-  for(int i=0;i<=ybins;i++){
+  int the_bin=m_ybases.front().size()-1;
+  for(int i=0;i<=m_ybins;i++){
     if(y<base+seg_len*i)return i-1;
   }
-//   if(the_bin<0)return 0;
   return the_bin;
 
-  double eta_min_y=eta_wedge_from_y(base+h1.getFixed(),plane),eta_max_y=eta_wedge_from_y(base,plane),eta_y=eta_wedge_from_y(y,plane);
-  double segment_length=(eta_max_y-eta_min_y)/ybins;
-  for(int i=ybins;i>=0;i--){
+  double eta_min_y=eta_wedge_from_y(base+m_h1.getFixed(),plane),eta_max_y=eta_wedge_from_y(base,plane),eta_y=eta_wedge_from_y(y,plane);
+  double segment_length=(eta_max_y-eta_min_y)/m_ybins;
+  for(int i=m_ybins;i>=0;i--){
     if(eta_y>(eta_max_y-segment_length*i)){
-//       ATH_MSG_DEBUG(<<"y="<<y<<" is less than H+l*i="<<H<<"+"<<segment_length<<"*"<<i<<"="<<H+segment_length*i<<" returns a YBIN of "<<i-1);
       return i-1;
     }
   }
@@ -630,30 +571,21 @@ int MMT_Parameters::ybin(double y,int plane)const{
 int MMT_Parameters::ybin(float32fixed<18> y,int plane)const{
   return ybin(y.getFixed()*MMTStructConst,plane);
 }
-int MMT_Parameters::ybin(float32fixed<yzdex> y,int plane)const{
+int MMT_Parameters::ybin(float32fixed<m_yzdex> y,int plane)const{
   return ybin(y.getFixed()*MMTStructConst,plane);
 }
 
-// double MMT_Parameters::ymid_eta_bin(int bin,int plane)const{
-//   double base=ybases[plane].front().getFixed();
-//   double eta_min_y=eta_wedge_from_y(base+h1.getFixed(),plane),eta_max_y=eta_wedge_from_y(base,plane);
-//   if(bin<0)return eta_max_y;
-//   if(bin>ybins)return eta_min_y;
-//   double eta=eta_min_y+(eta_max_y-eta_min_y)/ybins*(bin+0.0);
-//   return y_from_eta_wedge(eta,plane);
-// }
-
 //make the local slope ab for all ybins
 //track percent in number of same bin
 //maybe do a th2d scatter in bins for all/for a given ybin in plane 0
 
 void MMT_Parameters::fill_full_Ak_Bk(){
-  AB_k_local.clear();
+  m_AB_k_local.clear();
   vector<int> x_planes=q_planes("x"); int nx=x_planes.size();
   vector<int> variable_key(nx,-1);//a grid with all possible
   do{
-    AB_k_local[variable_key]=ak_bk_hit_bins(variable_key);
-  }while(!toggle_key(variable_key,-1,ybins-1));
+    m_AB_k_local[variable_key]=ak_bk_hit_bins(variable_key);
+  }while(!toggle_key(variable_key,-1,m_ybins-1));
 }
 
 //The problem is this: we don't a priori know how many X planes there will be (configured at run time)
@@ -662,7 +594,6 @@ void MMT_Parameters::fill_full_Ak_Bk(){
 //We need to toggle through all possible values; the idea is to start with the lowest entry (-1,-1,...,-1) and increment right to left
 //We start at the rightmost entry and check values until we get a value != highest possible value and then
 // increment this up, resetting all values to the right of it to lo_value.
-//Shut up, this is the first time I've ever needed variable for numbers loops that wasn't obviously covered by vector sizes.
 bool MMT_Parameters::toggle_key(vector<int>& key,int lo_value,int hi_value)const{
   for(int idex=(int)(key.size()-1);idex>=0;idex--){
     if(key[idex]==hi_value) continue;
@@ -678,7 +609,7 @@ bool MMT_Parameters::toggle_key(vector<int>& key,int lo_value,int hi_value)const
 int MMT_Parameters::eta_bin(double theta) const{
   int ebin=-999; double eta=-log(tan(0.5*theta));
   if(theta==-999||theta==-16)return -1;
-  for(int i=0;i<=n_etabins;i++){
+  for(int i=0;i<=m_n_etabins;i++){
     if(eta<m_etabins[i]){
       ebin=i-1;
       break;
@@ -687,25 +618,21 @@ int MMT_Parameters::eta_bin(double theta) const{
   //we want the histograms binned on truth eta
   //event selection eta cuts are done on theta_ip, not theta_pos
   if(ebin==-1) return 0;
-  else if(ebin==-999) return n_etabins-1;
-  /*
-  if(ebin==-1){
-    exit(6);
-    }*/
+  else if(ebin==-999) return m_n_etabins-1;
   return ebin;
 }
 
 string MMT_Parameters::eta_str(int eta) const{
   ostringstream what; what<<"_eta";
-  if(eta>=0&&eta<n_etabins) what<<m_etabins[eta]<<"_"<<m_etabins[eta+1];
+  if(eta>=0&&eta<m_n_etabins) what<<m_etabins[eta]<<"_"<<m_etabins[eta+1];
   else what << "all";
   return what.str();
 }
 
 int MMT_Parameters::phi_bin(double phi) const{
   int pbin=-999;
-  if(phi==-999||phi==-16)return n_phibins*0.5;
-  for(int i=0;i<=n_phibins;i++){
+  if(phi==-999||phi==-16)return m_n_phibins*0.5;
+  for(int i=0;i<=m_n_phibins;i++){
     if(phi<m_phibins[i]){
       pbin=i-1;
       break;
@@ -714,13 +641,13 @@ int MMT_Parameters::phi_bin(double phi) const{
   //we want the histograms binned on truth phi
   //event selection eta cuts are done on phi_ip, not phi_pos
   if(pbin==-1) return 0;
-  else if(pbin==-999) return n_phibins-1;
+  else if(pbin==-999) return m_n_phibins-1;
   return pbin;
 }
 
 string MMT_Parameters::phi_str(int phi) const{
   ostringstream what; what<<"_phi";
-  if(phi>=0&&phi<n_phibins) what<<m_phibins[phi]<<"_"<<m_phibins[phi+1];
+  if(phi>=0&&phi<m_n_phibins) what<<m_phibins[phi]<<"_"<<m_phibins[phi+1];
   else what << "all";
   return what.str();
 }
@@ -734,8 +661,8 @@ pair<double,double> MMT_Parameters::ak_bk_hit_bins(const vector<int>& hits)const
   assert(hits.size()==x_planes.size());
   int nhits=0; double sum_x=0,sum_xx=0;
   for(int ih=0;ih<(int)(hits.size());ih++){
-    if(hits[ih]<0||hits[ih]>=ybins)continue;
-    double addme=z_large[hits[ih]][x_planes[ih]].getFixed()/MMTStructConst;
+    if(hits[ih]<0||hits[ih]>=m_ybins)continue;
+    double addme=m_z_large[hits[ih]][x_planes[ih]].getFixed()/MMTStructConst;
     sum_x  += addme;
     sum_xx += addme*addme;
     nhits++;
@@ -745,44 +672,43 @@ pair<double,double> MMT_Parameters::ak_bk_hit_bins(const vector<int>& hits)const
 }
 
 void MMT_Parameters::fill_slims(){
-  Ak_local_slim=vector<vector<vector<float32fixed<zbardex> > > >(11,vector<vector<float32fixed<zbardex> > >(ybins,vector<float32fixed<zbardex> >()));
-  Bk_local_slim=vector<vector<vector<float32fixed<bkdex> > > >(11,vector<vector<float32fixed<bkdex> > >(ybins,vector<float32fixed<bkdex> >()));
+  m_Ak_local_slim=vector<vector<vector<float32fixed<m_zbardex> > > >(11,vector<vector<float32fixed<m_zbardex> > >(m_ybins,vector<float32fixed<m_zbardex> >()));
+  m_Bk_local_slim=vector<vector<vector<float32fixed<m_bkdex> > > >(11,vector<vector<float32fixed<m_bkdex> > >(m_ybins,vector<float32fixed<m_bkdex> >()));
   for(int xdex=0;xdex<11;xdex++){
     vector<bool>xhits(lcl_int_to_xhits(xdex));
     int ntru=0;
     for(int k=0;k<(int)xhits.size();k++)ntru+=xhits[k];
     ATH_MSG_DEBUG("xdex="<<xdex<<" ("<<ntru<<" hits)");
-    for(int ybin=0;ybin<ybins;ybin++){
+    for(int ybin=0;ybin<m_ybins;ybin++){
       ATH_MSG_DEBUG("\tybin="<<ybin );
-      if(ybin==ybins-1)ntru=1;
+      if(ybin==m_ybins-1)ntru=1;
       for(int which=0;which<ntru;which++){
  	ATH_MSG_DEBUG("\t\twhich="<<which);
 	vector<int>indices(indices_to_key(xdex,ybin,which));
   for(int i=0;i<(int)indices.size();i++)  ATH_MSG_DEBUG(indices[i]);
 	pair<double,double>howdy(ak_bk_hit_bins(indices));
  	ATH_MSG_DEBUG(setprecision(8)<<"---akbk.first="<<howdy.first<<", second="<<howdy.second);
-	Ak_local_slim[xdex][ybin].push_back(howdy.first);
-	Bk_local_slim[xdex][ybin].push_back(howdy.second);
+	m_Ak_local_slim[xdex][ybin].push_back(howdy.first);
+	m_Bk_local_slim[xdex][ybin].push_back(howdy.second);
       }
     }
   }
-//   index_key_test();
 }
 
 void MMT_Parameters::fill_crep_table(const string&dir,const string&tag){
   par_par bill=param_par();
   bill.ctx=2;bill.ctuv=1;
   bill.corr.type=0;
-  double fudge_factor=(correct.translate.Z()!=0||correct.rotate.X()!=0?0.5:1.);
+  double fudge_factor=(m_correct.translate.Z()!=0||m_correct.rotate.X()!=0?0.5:1.);
   int nk=nsimmax_1d();
   ostringstream crep_nom;
   crep_nom<<dir<<(dir.substr(dir.length()-1)=="/"?"":"/")<<"pcrep"<<bill.print_pars()<<"_"<<tag<<".txt";
   std::ifstream crep(crep_nom.str().c_str());
-  crep_table=vector<vector<vector<vector<float> > > >(n_etabins,vector<vector<vector<float> > >(n_phibins,vector<vector<float> >(nk,vector<float>(3,0))));
+  m_crep_table=vector<vector<vector<vector<float> > > >(m_n_etabins,vector<vector<vector<float> > >(m_n_phibins,vector<vector<float> >(nk,vector<float>(3,0))));
   if(crep.good()){
-    for(int i=0;i<n_etabins;i++){
+    for(int i=0;i<m_n_etabins;i++){
       string estr=eta_str(i);
-      for(int j=0;j<n_phibins;j++){
+      for(int j=0;j<m_n_phibins;j++){
 	string pstr=phi_str(i);
 	for(int k=0;k<nk;k++){
 	string title;double the,phi,dth;
@@ -792,7 +718,7 @@ void MMT_Parameters::fill_crep_table(const string&dir,const string&tag){
 	  exit(2);
 	}
 	crep>>the>>phi>>dth;
-	crep_table[i][j][k][0]=the*fudge_factor;crep_table[i][j][k][1]=phi;crep_table[i][j][k][2]=dth*fudge_factor;
+	m_crep_table[i][j][k][0]=the*fudge_factor;m_crep_table[i][j][k][1]=phi;m_crep_table[i][j][k][2]=dth*fudge_factor;
 	}
       }
     }
@@ -802,31 +728,30 @@ void MMT_Parameters::fill_crep_table(const string&dir,const string&tag){
 void MMT_Parameters::fill_yzmod(){
   vector<int> x_planes=q_planes("x");//this tells us which planes are x planes
   int nxp=x_planes.size();
-  ymod=vector<vector<vector<float32fixed<yzdex> > > >(n_etabins,vector<vector<float32fixed<yzdex> > >(n_phibins,vector<float32fixed<yzdex> >(nxp,float32fixed<yzdex>(0.))));
-  zmod=vector<vector<vector<float32fixed<yzdex> > > >(n_etabins,vector<vector<float32fixed<yzdex> > >(n_phibins,vector<float32fixed<yzdex> >(nxp,float32fixed<yzdex>(0.))));
-  double pbump=0.5*(maximum_large_phi.getFixed()-minimum_large_phi.getFixed())/(n_phibins);
-  for(int et=0;et<n_etabins;et++){
+  m_ymod=vector<vector<vector<float32fixed<m_yzdex> > > >(m_n_etabins,vector<vector<float32fixed<m_yzdex> > >(m_n_phibins,vector<float32fixed<m_yzdex> >(nxp,float32fixed<m_yzdex>(0.))));
+  m_zmod=vector<vector<vector<float32fixed<m_yzdex> > > >(m_n_etabins,vector<vector<float32fixed<m_yzdex> > >(m_n_phibins,vector<float32fixed<m_yzdex> >(nxp,float32fixed<m_yzdex>(0.))));
+  double pbump=0.5*(m_maximum_large_phi.getFixed()-m_minimum_large_phi.getFixed())/(m_n_phibins);
+  for(int et=0;et<m_n_etabins;et++){
     double theta=2*atan(exp(-1.*m_etabins[et]));
-    for(int ph=0;ph<n_phibins;ph++){
+    for(int ph=0;ph<m_n_phibins;ph++){
       double phi=m_phibins[ph]+pbump;
       for(int pl=0;pl<nxp;pl++){
-        if(correct.type!=2||x_planes[pl]>3)continue;//if we don't correct or if it's the back multiplet, just leave these as zero
+        if(m_correct.type!=2||x_planes[pl]>3)continue;//if we don't correct or if it's the back multiplet, just leave these as zero
 
         double yadd=0.;
         double zadd=0.;
-        double zflt=z_nominal[x_planes[pl]].getFixed();
+        double zflt=m_z_nominal[x_planes[pl]].getFixed();
         double x=zflt*tan(theta)*sin(phi);
         double yflt=zflt*tan(theta)*cos(phi);
-        double yup=yflt-ybases[x_planes[pl]][0].getFixed();
+        double yup=yflt-m_ybases[x_planes[pl]][0].getFixed();
 
-        double alpha=correct.rotate.Z();
-        double beta=correct.rotate.Y();
+        double alpha=m_correct.rotate.Z();
+        double beta=m_correct.rotate.Y();
         // double gamma=correct.rotate.X();
         //gamma--do here if necessary...problematic if so
 
         //beta angle--rotation around the y axis; the x coordinate or phi taken care of in correction to slope road limits in x in constructor
-        //z is changed, and so y must be scaled (should it?): THIS SHIT DOESN'T WORK....
-        // 	zadd-=1.*x*sin(beta)/MMTStructConst;yadd+=yup*zadd/zflt/MMTStructConst;
+        //z is changed, and so y must be scaled (should it?)
         zadd-=tan(beta)*tan(theta)*sin(phi)*zflt/MMTStructConst;
         yadd-=tan(beta)*tan(theta)*sin(phi)*yflt/MMTStructConst;
 
@@ -834,7 +759,7 @@ void MMT_Parameters::fill_yzmod(){
         yadd+=((cos(alpha)-1.)*yup+x*sin(alpha))/MMTStructConst;
 
         //add the entries
-        ymod[et][ph][pl]=float32fixed<yzdex>(yadd);zmod[et][ph][pl]=float32fixed<yzdex>(zadd);
+        m_ymod[et][ph][pl]=float32fixed<m_yzdex>(yadd);m_zmod[et][ph][pl]=float32fixed<m_yzdex>(zadd);
       }
     }
   }
@@ -845,8 +770,8 @@ void MMT_Parameters::index_key_test(){
     vector<bool>xhits(lcl_int_to_xhits(xdex));
     int ntru=0;
     for(int k=0;k<(int)xhits.size();k++)ntru+=xhits[k];
-    for(int ybin=0;ybin<ybins;ybin++){
-      if(ybin==ybins-1)ntru=1;
+    for(int ybin=0;ybin<m_ybins;ybin++){
+      if(ybin==m_ybins-1)ntru=1;
       for(int which=0;which<ntru;which++){
 	ATH_MSG_DEBUG("Let's start with ["<<xdex<<"]["<<ybin<<"]["<<which<<"] makes ");
 	vector<int>key(indices_to_key(xdex,ybin,which));
@@ -862,7 +787,7 @@ void MMT_Parameters::index_key_test(){
 void MMT_Parameters::key_to_indices(const vector<int>& key,int& xdex,int& ybin,int& which)const{
   vector<bool> boogah;vector<int> was_hit;
   for(unsigned int i=0;i<key.size();i++){
-    boogah.push_back(key[i]>=0&&key[i]<ybins);
+    boogah.push_back(key[i]>=0&&key[i]<m_ybins);
     if(boogah.back())was_hit.push_back(key[i]);
   }
   bool even=true;int dev_pos=0,dev_bin=-1;
@@ -909,31 +834,29 @@ void MMT_Parameters::Local_Slope_A_B(){
 
 void MMT_Parameters::Slope_Components_ROI(){
   //these are mm/mm i.e. not units of strip #
-//   double angle=max(correct.dt0,correct.dt1);
-//   double m_y_max = (H+h1*cos(angle))/z_hit.front(); //2;
 
-  Slope_to_ROI=vector<vector<vector<float32fixed<4> > > >(n_y,vector<vector<float32fixed<4> > >(n_x,vector<float32fixed<4> >(2,float32fixed<4>(0.))));
-  for(int ix=0;ix<n_x;ix++){
-    for(int jy=0;jy<n_y;jy++){
+  m_Slope_to_ROI=vector<vector<vector<float32fixed<4> > > >(m_n_y,vector<vector<float32fixed<4> > >(m_n_x,vector<float32fixed<4> >(2,float32fixed<4>(0.))));
+  for(int ix=0;ix<m_n_x;ix++){
+    for(int jy=0;jy<m_n_y;jy++){
       int xdex=ix,ydex=jy+1;
       if(xdex==0)xdex++;
 
-      double m_x = ( m_x_min + h_mx * xdex ).getFixed();
-      double m_y = ( m_y_min + h_my * ydex ).getFixed();
+      double m_x = ( m_x_min + m_h_mx * xdex ).getFixed();
+      double m_y = ( m_y_min + m_h_my * ydex ).getFixed();
 
       double theta = atan(sqrt(m_x*m_x+m_y*m_y));
       double phi=atan2(m_y,m_x);
-      if(minimum_large_phi>phi || maximum_large_phi<phi) phi=999;
-      if(minimum_large_theta>theta || maximum_large_theta<theta) theta=0;
-      Slope_to_ROI[jy][ix][0] = theta;
-      Slope_to_ROI[jy][ix][1] = phi;
+      if(m_minimum_large_phi>phi || m_maximum_large_phi<phi) phi=999;
+      if(m_minimum_large_theta>theta || m_maximum_large_theta<theta) theta=0;
+      m_Slope_to_ROI[jy][ix][0] = theta;
+      m_Slope_to_ROI[jy][ix][1] = phi;
     }
   }
   ATH_MSG_DEBUG( "return Slope_Components_ROI" );
 }
 
 void MMT_Parameters::Delta_theta_optimization_LG(){
-  DT_Factors.clear();
+  m_DT_Factors.clear();
   double a=1.;   //sin(pi/2+TMath::DegToRad(28/4));  //sin(phi);
   int number_LG_regions = 256;
   double LG_min = 0;
@@ -944,7 +867,7 @@ void MMT_Parameters::Delta_theta_optimization_LG(){
     vector<float32fixed<2> > tmpVector;
     tmpVector.push_back(LG_min+LG_region_width *ilgr);//LG
     tmpVector.push_back(  float32fixed<2>(1.) / (tmpVector.front()/a  +  a));//mult_factor
-    DT_Factors.push_back(tmpVector);
+    m_DT_Factors.push_back(tmpVector);
   }
   ATH_MSG_DEBUG( "return Delta_theta_optimization_LG" );
 }
@@ -968,11 +891,11 @@ int MMT_Parameters::xhits_to_lcl_int(const vector<bool>& xhits) const{
 }
 
 int MMT_Parameters::nsimmax_1d()const{
-  return pow(2.,setup.size());
+  return pow(2.,m_setup.size());
 }
 
 int MMT_Parameters::bool_to_index(const vector<bool>&track)const{
-  assert(track.size()==setup.size());
+  assert(track.size()==m_setup.size());
   int index=0;
   for(int plane=0;plane<(int)track.size();plane++){
     if(!track[plane])continue;
@@ -982,7 +905,7 @@ int MMT_Parameters::bool_to_index(const vector<bool>&track)const{
 }
 
 vector<bool> MMT_Parameters::index_to_bool(int index)const{
-  vector<bool>code(setup.size(),false);
+  vector<bool>code(m_setup.size(),false);
   for(int i=0;i<(int)code.size();i++)code[i]=(index&int(pow(2.,i)));
   return code;
 }
@@ -1087,35 +1010,25 @@ void hitData_key::print()const{
 
 hitData_info::hitData_info(int pl,int station_eta,int strip,MMT_Parameters *m_par,const TVector3&tru,double tpos,double ppos):plane(pl){
   (void) tru;
-  // ATH_MSG_DEBUG( "BEGIN hitData_info construtor for plane "<<pl<<", esta "<<station_eta<<", m_par: "<<m_par<<", (truth theta: "<<tpos<<",phi: "<<ppos<<") print tru....");
-  // ATH_MSG_DEBUG(tru.Print() );
   //The idea here is to calculate/assign a y and a z to a given hit based on its pl/station/strip, the geometry of the detector (in m_par), and misalignment based on position.
   //We start by assigning the plane dependent strip width (the stereo planes come in skew and so get divided by cos(stereo_angle)
-  char schar=m_par->setup[plane];
+  char schar=m_par->m_setup[plane];
   bool horizontal=(schar=='x'||schar=='X');
-  // ATH_MSG_DEBUG("We have a "<<(horizontal?"horizontal":"stereo")<<" hit in plane "<<plane<<", station_eta "<<station_eta<<", strip# "<<strip);
-  double swidth=m_par->strip_width.getFixed();
-  double base=m_par->ybases[plane][station_eta-1].getFixed();
-  // double zplane=m_par->z_nominal[plane].getFixed();
-  // double planebase=m_par->ybases[plane].front().getFixed();
-  if(!horizontal)swidth/=cos(TMath::DegToRad()*(m_par->stereo_degree.getFixed()));
+  double swidth=m_par->m_strip_width.getFixed();
+  double base=m_par->m_ybases[plane][station_eta-1].getFixed();
+  if(!horizontal)swidth/=cos(TMath::DegToRad()*(m_par->m_stereo_degree.getFixed()));
   //Next, we initialize some constants--y will eventually be calculated as y=base+scale*(width*strip+delta_y(misalignment,correction)).
   //The correction portion of delta_y is done in in the calculations on the ybases object in m_par
   //yup, or "y up" is the portion of y above the base of the plane (i.e. in the detector)
   double delta_y=mis_dy(pl,m_par,tpos,ppos),yup_scale=1.;
-//   if(plane<4&&m_par->correct.type==2){yup_scale*=cos(m_par->correct.rotate.X());delta_y+=m_par->correct.translate.Y();}
-  // ATH_MSG_DEBUG("and a delta_y of "<<delta_y);
   double yflt=-999;
   yflt=base+(strip*swidth+delta_y)*yup_scale;
-  // ATH_MSG_DEBUG("Naively, y="<<base<<"+"<<strip<<"*"<<swidth<<"="<<base+strip*swidth<<", but dy(mis,corr)="<<delta_y<<", and yup_scale="<<yup_scale<<", so y="<<yflt);
   //Note that ybin should be calculated on the basis of a misaligned y, not a corrected one (to get the position on the wedge just right),
   //but the difference for this part of the calculation should be negligible (an effect of <~ misal/(bin length) ~ (5 mm/(3600 mm/15)) ~ %.
-  // double bozoY = sqrt(tru.X()*tru.X() + tru.Y()*tru.Y());
   int bin=m_par->ybin(yflt,plane);
-  // ATH_MSG_DEBUG("....which leads to finding a bin in y of "<<bin<<"....");
 
   //We have here both the "perfect" and binned z calculations/lookups; the commented out one is there for reference
-  double zflt=m_par->z_large[bin][plane].getFixed();
+  double zflt=m_par->m_z_large[bin][plane].getFixed();
 //   if(m_par->correct.type==2&&plane<4&&m_par->correct.rotate.X()!=0){
 //     // double fltyup=(base+(strip*swidth+delta_y)-planebase);
 //     double angle=m_par->correct.rotate.X();
@@ -1126,38 +1039,27 @@ hitData_info::hitData_info(int pl,int station_eta,int strip,MMT_Parameters *m_pa
 //   z = zflt / MMTStructConst;
 
   slope =  (zflt!=0.) ? yflt / zflt : 0.;
-  // double oslope=(base+(strip)*swidth)/zplane,mslope=yflt/zplane;
-  // ATH_MSG_DEBUG("....after correction for a y value of "<<yflt<<", with a z of "<<zflt<<" for slopes....");
-  // ATH_MSG_DEBUG("an ORIGINAL slope: "<<oslope );
-  // ATH_MSG_DEBUG(", an ALGORITHM (corr) slope "<<slope.getFixed()<<" (diff_ratio "<<slope.getFixed()/oslope-1.<<")" );
-  // ATH_MSG_DEBUG(", a MISAL slope: "<<mslope<<" (diff_ratio "<<mslope/oslope-1.<<")");
 
 }
 
 double hitData_info::mis_dy(int plane,MMT_Parameters *m_par,double tpos,double ppos)const{
-  // bool quack=false&&debug;
-  if(m_par->misal.type!=1||plane>3)return 0.;
-  // double swidth=m_par->strip_width.getFixed();
-  double zplane=m_par->z_nominal[plane].getFixed();
-  double base=m_par->ybases[plane].front().getFixed();
+  if(m_par->m_misal.type!=1||plane>3)return 0.;
+  double zplane=m_par->m_z_nominal[plane].getFixed();
+  double base=m_par->m_ybases[plane].front().getFixed();
 
-  // double s_z0=zplane;
   double s_x0=zplane*tan(tpos)*sin(ppos);
   double s_y0=zplane*tan(tpos)*cos(ppos);//initial position
 
-  // ATH_MSG_DEBUG("Projected truth position ("<<s_x0<<","<<s_y0<<","<<s_z0<<") or, in local coordinates, ("<<s_x0<<","<<s_y0-base<<","<<s_z0-zplane<<")");
   double hats_z0=cos(tpos),hats_x0=sin(tpos)*sin(ppos),hats_y0=sin(tpos)*cos(ppos);//muon track unit vector
   double zeta_y0=s_y0-base;//height in y in the wedge local coordinates--this is what we have to compare in the end
-  double alpha=m_par->misal.rotate.Z(),beta=m_par->misal.rotate.Y(),gamma=m_par->misal.rotate.X();//rotation angles
-  double ds=m_par->misal.translate.X(),dz=m_par->misal.translate.Y(),dt=-1.*m_par->misal.translate.Z();//t comes in -z
-  // ATH_MSG_DEBUG("MISALIGNMENT PARAMETERS: (ds,dz,dt;gamma,beta,alpha)=("<<ds<<","<<dz<<","<<dt<<";"<<gamma<<","<<beta<<","<<alpha<<")");
+  double alpha=m_par->m_misal.rotate.Z(),beta=m_par->m_misal.rotate.Y(),gamma=m_par->m_misal.rotate.X();//rotation angles
+  double ds=m_par->m_misal.translate.X(),dz=m_par->m_misal.translate.Y(),dt=-1.*m_par->m_misal.translate.Z();//t comes in -z
   double O_bxf=ds,O_byf=base+dz,O_bzf=zplane+dt;//position of bottom of the wedge in global coordinates; subtract this from the final y position (s_yf) for final zeta (comparison to add to y position)
-  // ATH_MSG_DEBUG("MISALIGNMENT plane base moves from: ("<<0<<","<<base<<","<<zplane<<") to ("<<O_bxf<<","<<O_byf<<","<<O_bzf<<")...");
   double yhat_x=-1.*sin(alpha)*cos(beta),yhat_y=(cos(alpha)*cos(gamma)-sin(alpha)*sin(beta)*sin(gamma)),yhat_z=(cos(alpha)*sin(gamma)+sin(alpha)*sin(beta)*cos(gamma));//new y direction after rotations; horizontal case
-  char schar=m_par->setup[plane];
+  char schar=m_par->m_setup[plane];
   if(!(schar=='x'||schar=='X')){
     //if we're in a stereo plane, calculate different coefficients.
-    double omega=TMath::DegToRad()*(m_par->stereo_degree.getFixed());
+    double omega=TMath::DegToRad()*(m_par->m_stereo_degree.getFixed());
     double pm=(schar=='u'||schar=='U'?1.:-1.);
     yhat_x=pm*cos(alpha)*cos(beta)*sin(omega)-sin(alpha)*cos(beta)*cos(omega);
     yhat_y=pm*sin(omega)*(sin(alpha)*cos(gamma)+cos(alpha)*sin(beta)*sin(gamma))+cos(omega)*(cos(alpha)*cos(gamma)-sin(alpha)*sin(beta)*sin(gamma));
@@ -1165,18 +1067,7 @@ double hitData_info::mis_dy(int plane,MMT_Parameters *m_par,double tpos,double p
     zeta_y0=pm*sin(omega)*s_x0+cos(omega)*(s_y0-base);
   }
   double kprime=(sin(beta)*O_bxf-cos(beta)*sin(gamma)*O_byf+cos(beta)*cos(gamma)*O_bzf)/(sin(beta)*hats_x0-cos(beta)*sin(gamma)*hats_y0+cos(beta)*cos(gamma)*hats_z0);
-  // ATH_MSG_DEBUG("MISALIGNMENT for plane "<<
-    // schar<<" makes a kprime/k of "<<
-    // kprime*cos(tpos)/zplane<<
-    // " and a yhat of ("<<yhat_x<<","<<yhat_y<<","<<yhat_z<<")...");
   double zeta_xf=kprime*hats_x0-O_bxf,zeta_yf=kprime*hats_y0-O_byf,zeta_zf=kprime*hats_z0-O_bzf;
-  // ATH_MSG_DEBUG("which leads to, in the old local coordinates, a new intersection point at ("<<
-  //   zeta_xf<<","<<
-  //   zeta_yf<<","<<
-  //   zeta_zf<<")---and in the new global coordinates at ("<<
-  //   kprime*hats_x0<<","<<
-  //   kprime*hats_y0<<","<<
-  //   kprime*hats_z0<<")!");
   double zetayf_yhatf=zeta_xf*yhat_x+zeta_yf*yhat_y+zeta_zf*yhat_z;
   return zetayf_yhatf-zeta_y0;
 }
@@ -1283,20 +1174,6 @@ ROI::ROI(double _theta, double _phi, double _m_x, double _m_y, int _roi):
 athena_header::athena_header(const TLorentzVector& par, int tpn, double etp, double ete, double php, double phe, int mun, const TVector3& ver):
   the_part(par),trupart_n(tpn),etapos(etp),etaent(ete),phipos(php),phient(phe),muent_n(mun),vertex(ver) {}
 
-// digitWrapper::digitWrapper(int multiplet, 
-//                            int gasGap, 
-//                            double gTime, 
-//                            double time, 
-//                            const TVector3& truthLPos, 
-//                            const TVector3& stripLPos, 
-//                            const TVector3& stripGPos, 
-//                            double charge,
-//                            int stripPos,
-//                            int etaStation,
-//                            int phiStation
-//                            ):
-
-
 digitWrapper::digitWrapper(const MmDigit* digit,
                            double tmpGTime,
                            const TVector3& truthLPos,
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
index 7f3fe007bfddda3d8276415564f691d2a9ca0249..7bf6bcaaf636d10d9fb4466bc1ce87c21ae7d217 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -8,6 +8,8 @@
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
+//Muon software includes
+#include "MuonDigitContainer/MmDigit.h"
 
 // local includes
 #include "TrigT1NSWSimTools/MMTriggerTool.h"
@@ -16,17 +18,8 @@
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventID.h"
 
-// Muon software includes
-
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
-
 // local includes
 #include "TTree.h"
-#include "TVector3.h"
-
 
 namespace NSWL1 {
 
@@ -36,17 +29,12 @@ namespace NSWL1 {
     m_detManager(0),
     m_MmIdHelper(0),
     m_MmDigitContainer(""),
-    m_MmSdoContainer(""),
     m_doNtuple(false),
     m_tree(0)
   {
     declareInterface<NSWL1::IMMTriggerTool>(this);
     declareProperty("MM_DigitContainerName", m_MmDigitContainer = "MM_DIGITS", "the name of the MM digit container");
-    declareProperty("MM_SdoContainerName"  , m_MmSdoContainer = "MM_SDO", "the name of the MM SDO container");
-    declareProperty("MM_HitContainerName"  , m_MmHitContainer = "MicromegasSensitiveDetector", "the name of the MM hits container");
     declareProperty("DoNtuple", m_doNtuple = true, "input the MMStripTds branches into the analysis ntuple");
-    declareProperty("Truth_ContainerName", m_Truth_ContainerName="TruthEvent","name of truth container");
-    declareProperty("MuonEntryLayer_ContainerName", m_MuEntry_ContainerName="MuonEntryLayer", "name of muon entry container");
 
   }
 
@@ -59,9 +47,7 @@ namespace NSWL1 {
     ATH_MSG_INFO( "initializing -- " << name() );
 
     ATH_MSG_INFO( name() << " configuration:");
-    //ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_rndmEngineName.name() << m_rndmEngineName.value());
     ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_MmDigitContainer.name() << m_MmDigitContainer.value());
-    ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_MmSdoContainer.name() << m_MmSdoContainer.value());
     ATH_MSG_INFO(" " << setw(32) << setfill('.') << setiosflags(ios::left) << m_doNtuple.name() << ((m_doNtuple)? "[True]":"[False]")
                      << setfill(' ') << setiosflags(ios::right) );
 
@@ -164,12 +150,10 @@ namespace NSWL1 {
       double trueta = truth_info.eta_ip;
       double trupt = truth_info.pt;
 
-      // evInf_entry truth_info(Event_Info.find(pevt->event_ID()->event_number())->second);
 
       double tent=truth_info.theta_ent;
       double tpos=truth_info.theta_pos;
       double ppos=truth_info.phi_pos;
-      // double pent=truth_info.phi_ent;
       double dt=truth_info.dtheta;
       m_trigger_trueThe->push_back(tent);
       m_trigger_truePhi->push_back(ppos);
@@ -233,7 +217,6 @@ namespace NSWL1 {
         //First loop over the roads and planes and apply the fitter
         int fits_occupied=0;
         const int nfit_max=1;  //MOVE THIS EVENTUALLY
-        // int correct_bcid=2;    //THIS TOO
         int nRoads = m_find.get_roads();
 
         vector<evFit_entry> road_fits = vector<evFit_entry>(nRoads,evFit_entry());
@@ -285,7 +268,6 @@ namespace NSWL1 {
         //////////////////////////////////////////////////////////////
 
 
-        // bool did_clean_fit=false,did_bg_fit=false,has_6hits=false;
         if(road_fits.size()==0 and hitDatas.size()==8 ) {
           ATH_MSG_DEBUG( "TruthRF0 " << tpos     << " " << ppos   << " " << dt << " " << trueta );
         }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerToolTree.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerToolTree.cxx
index 0df17f0daa8e9662cff9bcd28fc8961a518f6c1f..e1ff94985271d0f54df1d1bf00ed596aa8b75091 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerToolTree.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerToolTree.cxx
@@ -14,14 +14,6 @@
 
 // local includes
 #include "TTree.h"
-#include "TVector3.h"
-
-#include <functional>
-#include <algorithm>
-#include <map>
-#include <utility>
-
-using namespace std;
 
 namespace NSWL1 {
 
@@ -306,10 +298,6 @@ namespace NSWL1 {
         m_tree->Branch("Hits_MM_off_channel", &m_NSWMM_off_channel);
 
 
-        //m_tree->Branch("Digits_MM_stripForTrigger",     &m_NSWMM_dig_stripForTrigger);
-       // m_tree->Branch("Digits_MM_stripTimeForTrigger", &m_NSWMM_dig_stripTimeForTrigger);
-
-
 
       } else {
         return StatusCode::FAILURE;
@@ -443,9 +431,6 @@ namespace NSWL1 {
       m_NSWMM_hitToRsurfacePositionY->clear();
       m_NSWMM_hitToRsurfacePositionZ->clear();
 
-      //m_NSWMM_FastDigitRsurfacePositionX->clear();
-      //m_NSWMM_FastDigitRsurfacePositionY->clear();
-
 
       m_NSWMM_particleEncoding->clear();
       m_NSWMM_kineticEnergy->clear();
@@ -499,10 +484,6 @@ namespace NSWL1 {
       *m_NSWMM_dig_truth_globalPosY = loadedVariables.histVars.NSWMM_dig_truth_globalPosY;
       *m_NSWMM_dig_truth_globalPosZ = loadedVariables.histVars.NSWMM_dig_truth_globalPosZ;
 
-      //m_NSWMM_dig_stripForTrigger     = new std::vector<int>;
-      //m_NSWMM_dig_stripTimeForTrigger = new std::vector<float>;
-
-
 
       *m_NSWMM_trackId  = loadedVariables.histVars.NSWMM_trackId;
       *m_NSWMM_truthEl  = loadedVariables.histVars.NSWMM_truthEl;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadData.cxx
index ead6f1b6a4efd45ae7e200f116d0e0ec3571d557..5594cb6c6fb7a858a00062df54f12bd83c073fc4 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadData.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadOfflineData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadOfflineData.cxx
index d113d0fed847ce24e7ba1728570be2e1a9c9a7ab..2afe0d745152379afc0b83c8458d14e6427eb7b8 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadOfflineData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadOfflineData.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -7,8 +7,6 @@
 #include "TrigT1NSWSimTools/PadOfflineData.h"
 #include "TrigT1NSWSimTools/sTGCenumeration.h"
 
-#include "TVector3.h"
-
 #include <string>
 
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
index 2dd42defedeb4555775b94cd121b1f56127a3940..65067f82af09ec7ce456fd91b1ea5ef7192134e5 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTdsOfflineTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -34,14 +34,10 @@
 
 
 #include "TTree.h"
-#include "TVector3.h"
-#include <functional>
-#include <algorithm>
 #include <map>
 #include <utility>
 
 
-
 namespace NSWL1 {
     
     struct PadHits {
@@ -79,11 +75,6 @@ namespace NSWL1 {
         m_VMMDeadTime(0.),
         m_triggerCaptureWindow(0.),
         m_timeJitter(0.),
-        //m_applyTDS_TofSubtraction(false),
-        //m_applyTDS_TimeJitterSubtraction(false),
-        //m_applyVMM_ToT(false),
-        //m_applyVMM_ShapingTime(false),
-        //m_applyVMM_DeadTime(false),
         m_doNtuple(false)
     {
         declareInterface<NSWL1::IPadTdsTool>(this);
@@ -95,16 +86,10 @@ namespace NSWL1 {
         declareProperty("VMM_DeadTime", m_VMMDeadTime = 50., "the dead time of the VMM chip to produce another signal on the same channel");
         declareProperty("TriggerCaptureWindow", m_triggerCaptureWindow = 30., "time window for valid hit coincidences");
         declareProperty("TimeJitter", m_timeJitter = 2., "the time jitter");
-        //declareProperty("ApplyTDS_TofSubtraction", m_applyTDS_TofSubtraction = true, "if true remove the time of flight from the PAD digit time before the BC tag");
-        //declareProperty("ApplyTDS_TimeJitterSubtraction", m_applyTDS_TimeJitterSubtraction = true, "if true remove random jitter from the PAD digit time before the BC tag");
-        //declareProperty("ApplyVMM_ToT", m_applyVMM_ToT = false, "if true apply special processing for the Time Over Threshold in the TDS");
-        //declareProperty("ApplyVMM_ShapingTime", m_applyVMM_ShapingTime = false, "if true apply special processing for the shaping time in the TDS");
-        //declareProperty("ApplyVMM_DeatTime", m_applyVMM_DeadTime = true, "if true apply the VMM Dead Time simulation in the TDS");
         declareProperty("DoNtuple", m_doNtuple = false, "input the PadTds branches into the analysis ntuple");
 
         // reserve enough slots for the trigger sectors and fills empty vectors
         m_pad_cache.reserve(PadTdsOfflineTool::numberOfSectors());
-        //std::vector< std::vector<std::shared_ptr<PadData>> >::iterator it = m_pad_cache.begin();
         auto it = m_pad_cache.begin();
         m_pad_cache.insert(it, PadTdsOfflineTool::numberOfSectors(), std::vector<std::shared_ptr<PadData>>());
     }
@@ -344,7 +329,6 @@ namespace NSWL1 {
         sTgcDigitContainer::const_iterator it_e = digit_container->end();
         ATH_MSG_DEBUG("retrieved sTGC Digit Container with size "<<digit_container->digit_size());
 
-        //int pad_hit_number = 0;
         std::vector<PadHits> pad_hits;
         for(; it!=it_e; ++it) {
             const sTgcDigitCollection* coll = *it;
@@ -369,20 +353,14 @@ namespace NSWL1 {
                         uint16_t BCP1 = 1, BC0 = 0, BCM1 = ~BCP1;
                         if(digit->bcTag()==BCM1 || digit->bcTag()==BC0 || digit->bcTag()==BCP1) { 
                             print_digit(digit);
-                            //PadOfflineData* pad = new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper);
-                            //S.I
-                            //std::shared_ptr<PadOfflineData> pad(new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper));
                             auto pad=std::make_shared<PadOfflineData>(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper);
-                            //pad_hits.push_back(PadHits(Id, pad, cache_index(digit)));
                             pad_hits.emplace_back(Id, pad, cache_index(digit));//avoids extra copy
-                            //S.I
                         }
                     }
                 } 
                 //////////////////////////////////////////////////////////////////////////////////////////
             } //for(item)
         } // for(it)
-        //std::sort(pad_hits.begin(),pad_hits.end(),order_padHits_with_increasing_time);
 
         ////////////////////////////////////////////////////////////////////////////////////////////
         //// ASM - 01/3/2017 - testing timing 
@@ -437,19 +415,6 @@ namespace NSWL1 {
         PAD_MAP_IT it = channel_map.begin();
         while ( it!=channel_map.end() ) {
             
-            /*
-            std::vector<PadHits>& hits = (*it).second;
-            std::vector<PadHits>::iterator p = hits.begin();
-            while ( p!=hits.end() ) {
-                std::vector<PadHits>::iterator p_next = p+1;
-                if ( p_next!=hits.end() &&
-                    std::fabs((*p_next).t_pad->time()-(*p).t_pad->time())<=m_VMMDeadTime) {
-                    p = hits.erase(p_next);
-                    p = hits.begin();  // restart from the beginning
-                } else ++p;
-            }
-            ++it;
-            */
             std::vector<PadHits>& hits = (*it).second;
             std::vector<PadHits>::iterator p_next = hits.begin();
             std::vector<PadHits>::iterator p = p_next++;
@@ -605,7 +570,6 @@ namespace NSWL1 {
     void PadTdsOfflineTool::store_pads(const std::vector<PadHits> &pad_hits)
     {
         for (unsigned int i=0; i<pad_hits.size(); i++) {
-            //m_pad_cache.at(pad_hits[i].t_cache_index).push_back(pad_hits[i].t_pad);
             ////////////////////
             // ASM-2017-06-21
             const std::vector<std::shared_ptr<PadData>>& pads = m_pad_cache.at(pad_hits[i].t_cache_index);
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTrigger.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTrigger.cxx
index 6bfb4a5b814a0327f5caaadbf7fe37954eda4e9f..47430112d76f5ef0b8f03b9ea2e322ab1f629b62 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTrigger.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTrigger.cxx
@@ -1,12 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/PadTrigger.h"
 #include "TrigT1NSWSimTools/SectorTriggerCandidate.h"
 
 #include "TrigT1NSWSimTools/PadData.h"
-#include <iostream>
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
 namespace NSWL1 {
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
index cab614e4358f1737e66bc6c5aee73eda70750797..29de0618e56648fd0c38d87db40b2b91f58f3125 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerLogicOfflineTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include <boost/geometry.hpp>
@@ -26,21 +26,12 @@
 // Muon software includes
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonDigitContainer/sTgcDigitContainer.h"
-#include "MuonDigitContainer/sTgcDigit.h"
-#include "MuonSimData/MuonSimDataCollection.h"
-#include "MuonSimData/MuonSimData.h"
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
 // trk
 #include "TrkSurfaces/PlaneSurface.h"
 #include "TrkSurfaces/TrapezoidBounds.h"
 
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
 // local includes
 #include "TrigT1NSWSimTools/PadUtil.h"
 #include "TrigT1NSWSimTools/vector_utils.h"
@@ -49,9 +40,6 @@
 #include "TTree.h"
 #include "TVector3.h"
 // std
-#include <functional>
-#include <algorithm>
-#include <map>
 #include <utility> // make_pair
 
 
@@ -62,27 +50,17 @@ PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool( const std::string& type,
                                                         const IInterface* parent) :
     AthAlgTool(type,name,parent),
     m_incidentSvc("IncidentSvc",name),
-    m_rndmSvc("AtRndmGenSvc",name),
-    m_rndmEngine(0),
     m_detManager(0),
-    // m_sTgcIdHelper(0),
     m_pad_cache_runNumber(-1),
     m_pad_cache_eventNumber(-1),
-    // m_pad_cache_status(CLEARED),
-    m_rndmEngineName(""),
-    m_sTgcDigitContainer(""),
-    m_sTgcSdoContainer(""),
     m_PadEfficiency(0.0),
     m_useSimple4of4(false),
     m_doNtuple(false),
     m_missingDetectorManagerErrorCounter(0),
     m_missingReadoutElementErrorCounter(0),
-    m_tdrLogic(msgSvc(),"L1StgcTdrLogic")
+    m_tdrLogic()
 {
     declareInterface<NSWL1::IPadTriggerLogicTool>(this);
-    declareProperty("RndmEngineName", m_rndmEngineName = "PadTriggerLogicOfflineTool", "the name of the random engine");
-    declareProperty("sTGC_DigitContainerName", m_sTgcDigitContainer = "sTGC_DIGITS", "the name of the sTGC digit container");
-    declareProperty("sTGC_SdoContainerName", m_sTgcSdoContainer = "sTGC_SDO", "the name of the sTGC SDO container");
     declareProperty("TimeJitter", m_PadEfficiency = 1.0, "pad trigger efficiency (tmp placeholder)");
     declareProperty("UseSimple4of4", m_useSimple4of4 = false, "use simplified logic requiring 4 hits on 4 gas gaps");
     declareProperty("DoNtuple", m_doNtuple = false, "save the trigger outputs in an analysis ntuple");
@@ -94,25 +72,11 @@ PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool( const std::string& type,
 }
 //------------------------------------------------------------------------------
 PadTriggerLogicOfflineTool::~PadTriggerLogicOfflineTool() {
-    // clear the internal cache
-    // this->clear_cache();
 }
-//------------------------------------------------------------------------------
-// void PadTriggerLogicOfflineTool::clear_cache() {
-//     for (std::vector<PadData*> &sector_pads : m_pad_cache) {
-//         for (unsigned int p=0; p< sector_pads.size(); p++) {
-//             delete sector_pads.at(p);
-//         }
-//         sector_pads.clear();
-//     }
-// }
-//------------------------------------------------------------------------------
+
 StatusCode PadTriggerLogicOfflineTool::initialize() {
     ATH_MSG_INFO( "initializing " << name() );
     ATH_MSG_INFO( name() << " configuration:");
-    ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left)<< m_rndmEngineName.name() << m_rndmEngineName.value());
-    ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left)<< m_sTgcDigitContainer.name() << m_sTgcDigitContainer.value());
-    ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left)<< m_sTgcSdoContainer.name() << m_sTgcSdoContainer.value());
     // DG-todo print out other parameters
 
     const IInterface* parent = this->parent();
@@ -135,21 +99,6 @@ StatusCode PadTriggerLogicOfflineTool::initialize() {
     }
     m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-    // retrieve the Random Service
-    if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-    } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-    }
-
-    // retrieve the random engine
-    m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-    if (m_rndmEngine==0) {
-        ATH_MSG_FATAL("Could not retrieve the random engine " << m_rndmEngineName);
-        return StatusCode::FAILURE;
-    }
-
     //  retrieve the MuonDetectormanager
     if( detStore()->retrieve( m_detManager ).isFailure() ) {
         ATH_MSG_FATAL("Failed to retrieve the MuonDetectorManager");
@@ -158,31 +107,15 @@ StatusCode PadTriggerLogicOfflineTool::initialize() {
     else {
         ATH_MSG_INFO("MuonDetectorManager successfully retrieved");
     }
-    m_tdrLogic.msgStream().setLevel(this->msg().level());
     
     return StatusCode::SUCCESS;
 }
 //------------------------------------------------------------------------------
 void PadTriggerLogicOfflineTool::handle(const Incident& inc) {
     if( inc.type()==IncidentType::BeginEvent ) {
-        // this->clear_cache();
         m_validation_tree.reset_ntuple_variables();
-        // m_pad_cache_status = CLEARED;
     }
 }
-//------------------------------------------------------------------------------
-
-// //! filter a vector (remove elements for which Predicate is true)
-// template < template <typename, typename> class Container,
-//            typename Predicate,
-//            typename Allocator,
-//            typename A
-//            >
-// Container<A, Allocator> filter(Container<A, Allocator> const & container, Predicate const & pred) {
-//     Container<A, Allocator> filtered(container);
-//     filtered.erase(remove_if(filtered.begin(), filtered.end(), pred), filtered.end());
-//     return filtered;
-// }
 
 ///! helper function: copy pads with a given multiplet
 std::vector<std::shared_ptr<PadData>> filterByMultiplet(const std::vector<std::shared_ptr<PadData>> &pads_in, const int &multiplet) {
@@ -244,16 +177,7 @@ std::vector<std::unique_ptr<PadTrigger>> PadTriggerLogicOfflineTool::build4of4Si
     } // for(p0)
     return triggers;
 }
-////------------------------------------------------------------------------------
-//PadWithHits PadTriggerLogicOfflineTool::convert(const PadData &pd)
-//{
-//    PadWithHits pwh(pd);
-//    //PadWithHits pwh(pd.padEtaId(), pd.padPhiId(),
-//    //                pd.multipletId(),
-//    //                pd.gasGapId(), pd.sectorId(), pd.sideId());
-//    return pwh;
-//}
-//------------------------------------------------------------------------------
+
 StatusCode PadTriggerLogicOfflineTool::compute_pad_triggers(const std::vector<std::shared_ptr<PadData>>& pads,
                                                             std::vector<std::unique_ptr<PadTrigger>> &triggers)
 {
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerValidationTree.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerValidationTree.cxx
index d634bc5b37f1c32ab1875c9aba47877aa1b6eb83..63345efd16a5d191d601cb16771150911e1bc044 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerValidationTree.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadTriggerValidationTree.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/PadTriggerValidationTree.h"
@@ -33,21 +33,6 @@ namespace NSWL1{
         m_padTriggerPhimax(nullptr),
         m_padTriggerlocalminY(nullptr),
         m_padTriggerlocalmaxY(nullptr)
-        // m_nPadHits(0),
-        // m_padGlobalX(nullptr),
-        // m_padGlobalY(nullptr),
-        // m_padGlobalZ(nullptr),
-        // m_padTruthHitGlobalX(nullptr),
-        // m_padTruthHitGlobalY(nullptr),
-        // m_padTruthHitGlobalZ(nullptr),
-        // m_padEtaIdFromOfflineId(nullptr),
-        // m_padPhiIdFromOfflineId(nullptr),
-        // m_padSectorFromOfflineId(nullptr),
-        // m_padLayerFromOfflineId(nullptr),
-        // m_offlineIdPadEtaConverted(nullptr),
-        // m_offlineIdPadPhiConverted(nullptr),
-        // m_padEtaIdFromOldSimu(nullptr),
-        // m_padPhiIdFromOldSimu(nullptr)
     {
     }
     //------------------------------------------------------------------------------
@@ -80,21 +65,6 @@ namespace NSWL1{
             m_padTriggerPhimax      =new std::vector<float>();
             m_padTriggerlocalminY   =new std::vector<std::vector<float>>();
             m_padTriggerlocalmaxY   =new std::vector<std::vector<float>>();
-            // m_nPadHits = 0;
-            // m_padGlobalX = new std::vector<float>();
-            // m_padGlobalY = new std::vector<float>();
-            // m_padGlobalZ = new std::vector<float>();
-            // m_padTruthHitGlobalX = new std::vector<float>();
-            // m_padTruthHitGlobalY = new std::vector<float>();
-            // m_padTruthHitGlobalZ = new std::vector<float>();
-            // m_padEtaIdFromOfflineId = new std::vector<int>();
-            // m_padPhiIdFromOfflineId = new std::vector<int>();
-            // m_padSectorFromOfflineId = new std::vector<int>();
-            // m_padLayerFromOfflineId = new std::vector<int>();
-            // m_offlineIdPadEtaConverted = new std::vector<int>();
-            // m_offlineIdPadPhiConverted = new std::vector<int>();
-            // m_padEtaIdFromOldSimu   = new std::vector<int>();
-            // m_padPhiIdFromOldSimu   = new std::vector<int>();
 
             m_tree->Branch("nPadTriggers",                 &m_nPadTriggers,"nPadTriggers/i");
             m_tree->Branch("padTriggerBCID",               &m_padTriggerBCID);
@@ -116,21 +86,6 @@ namespace NSWL1{
             
             m_tree->Branch("padTriggerlocalminY",           &m_padTriggerlocalminY);
             m_tree->Branch("padTriggerlocalmaxY",           &m_padTriggerlocalmaxY);
-            // m_tree->Branch("nPadHits",                  &m_nPadHits,"nPadHits/i");
-            // m_tree->Branch("padGlobalX",                &m_padGlobalX);
-            // m_tree->Branch("padGlobalY",                &m_padGlobalY);
-            // m_tree->Branch("padGlobalZ",                &m_padGlobalZ);
-            // m_tree->Branch("padTruthHitGlobalX",        &m_padTruthHitGlobalX);
-            // m_tree->Branch("padTruthHitGlobalY",        &m_padTruthHitGlobalY);
-            // m_tree->Branch("padTruthHitGlobalZ",        &m_padTruthHitGlobalZ);
-            // m_tree->Branch("padEtaIdFromOfflineId",     &m_padEtaIdFromOfflineId);
-            // m_tree->Branch("padPhiIdFromOfflineId",     &m_padPhiIdFromOfflineId);
-            // m_tree->Branch("padSectorIdFromOfflineId",  &m_padSectorFromOfflineId);
-            // m_tree->Branch("padLayerFromOfflineId",     &m_padLayerFromOfflineId);
-            // m_tree->Branch("offlineIdPadEtaIdConverted",&m_offlineIdPadEtaConverted);
-            // m_tree->Branch("offlineIdPadPhiIdConverted",&m_offlineIdPadPhiConverted);
-            // m_tree->Branch("padEtaIdFromOldSimu",       &m_padEtaIdFromOldSimu);
-            // m_tree->Branch("padPhiIdFromOldSimu",       &m_padPhiIdFromOldSimu);
             success = true;
         }
         return success;
@@ -157,21 +112,6 @@ namespace NSWL1{
             m_padTriggerPhimax->clear();
             m_padTriggerlocalminY->clear();
             m_padTriggerlocalmaxY->clear();
-            // m_nPadHits = 0;
-            // m_padGlobalX->clear();
-            // m_padGlobalY->clear();
-            // m_padGlobalZ->clear();
-            // m_padTruthHitGlobalX->clear();
-            // m_padTruthHitGlobalY->clear();
-            // m_padTruthHitGlobalZ->clear();
-            // m_padEtaIdFromOfflineId->clear();
-            // m_padPhiIdFromOfflineId->clear();
-            // m_padSectorFromOfflineId->clear();
-            // m_padLayerFromOfflineId->clear();
-            // m_offlineIdPadEtaConverted->clear();
-            // m_offlineIdPadPhiConverted->clear();
-            // m_padEtaIdFromOldSimu->clear();
-            // m_padPhiIdFromOldSimu->clear();
         }
     }
     //------------------------------------------------------------------------------
@@ -195,21 +135,6 @@ namespace NSWL1{
         m_padTriggerPhimax=nullptr;
         m_padTriggerlocalminY=nullptr;
         m_padTriggerlocalmaxY=nullptr;
-        // m_nPadHits = 0;
-        // m_padGlobalX = nullptr;
-        // m_padGlobalY = nullptr;
-        // m_padGlobalZ = nullptr;
-        // m_padTruthHitGlobalX = nullptr;
-        // m_padTruthHitGlobalY = nullptr;
-        // m_padTruthHitGlobalZ = nullptr;
-        // m_padEtaIdFromOfflineId    = nullptr;
-        // m_padPhiIdFromOfflineId    = nullptr;
-        // m_padSectorFromOfflineId   = nullptr;
-        // m_padLayerFromOfflineId    = nullptr;
-        // m_offlineIdPadEtaConverted = nullptr;
-        // m_offlineIdPadPhiConverted = nullptr;
-        // m_padEtaIdFromOldSimu      = nullptr;
-        // m_padPhiIdFromOldSimu      = nullptr;
     }
     //------------------------------------------------------------------------------
     void PadTriggerValidationTree::fill_num_pad_triggers(size_t num)
@@ -240,24 +165,4 @@ namespace NSWL1{
     }
     }
 
-    // //------------------------------------------------------------------------------
-    // void PadTriggerValidationTree::fill_num_pad_hits(size_t num)
-    // {
-    //     m_nPadHits = num;
-    // }
-    // //------------------------------------------------------------------------------
-    // void PadTriggerValidationTree::fill_hit_global_pos(const Amg::Vector3D &pos)
-    // {
-    //     m_padGlobalX->push_back(pos.x());
-    //     m_padGlobalY->push_back(pos.y());
-    //     m_padGlobalZ->push_back(pos.z());
-    // }
-    // //------------------------------------------------------------------------------
-    // void PadTriggerValidationTree::fill_truth_hit_global_pos(const Amg::Vector3D &pos)
-    // {
-    //     m_padTruthHitGlobalX->push_back(pos.x());
-    //     m_padTruthHitGlobalY->push_back(pos.y());
-    //     m_padTruthHitGlobalZ->push_back(pos.z());
-    // }
-    // //------------------------------------------------------------------------------
 }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadUtil.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadUtil.cxx
index 384e07687245abcc46f0acef63b4185c19668031..769925b61381965f24ed662780806395f01afb3b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadUtil.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadUtil.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Gaudi/Athena basic includes
@@ -11,7 +11,6 @@
 #include "TrigT1NSWSimTools/PadOfflineData.h"
 
 #include "TMath.h"
-#include "TRotation.h"
 #include "TVector3.h"
 
 #include <utility>
@@ -153,14 +152,6 @@ namespace NSWL1 {
 
     result.first  = ieta;
     result.second = iphi;
-    //result.ieta   = ieta;
-    //result.iphi   = iphi;
-    //result.det    = sdt;
-    //result.stgc   = st;
-    //result.layer  = lt;
-    //result.sector = sn;
-    //result.side   = side;
-    //result.setLowPhi(loPhi).setHighPhi(hiPhi).setLowH(loHei).setHighH(hiHei).fillCornerCoords(pos.Z(), phiSectorFive - phiCenterSector);
     return true;
   }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadWithHits.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadWithHits.cxx
index 9a1fe12ad784a218f087ce5f47abdf96b1ce2992..1fc82c121e148b0b2b9bdcb37903e9c8bc3577e4 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/PadWithHits.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/PadWithHits.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/PadWithHits.h"
@@ -8,19 +8,12 @@
 #include "TVector3.h"
 
 #include "TrigT1NSWSimTools/TriggerTypes.h"
-// #include "NSWNtuple/sTGCgeometry.h"
 #include "TrigT1NSWSimTools/vector_utils.h"
-// #include "NSWNtuple/NSW_sTGCHitPosition.h"
 
-#include <algorithm>
 #include <cassert>
-#include <functional>
 #include <float.h> // FLT_MIN/FLT_MAX
-#include <iostream>
-#include <math.h>  // M_PI
 #include <sstream>
 
-
 namespace NSWL1 {
  std::string Pad::pickle() const
   {
@@ -36,27 +29,6 @@ namespace NSWL1 {
     return oo.str();
   }
 
-/*
-  //-------------------------------------
-  bool operator== (const Pad &lhs, const Pad &rhs) {
-    return lhs.ieta  ==rhs.ieta
-      &&   lhs.iphi  ==rhs.iphi
-      &&   lhs.multiplet ==rhs.multiplet
-      &&   lhs.layer ==rhs.layer
-      &&   lhs.sector==rhs.sector
-      &&   lhs.sectortype==rhs.sectortype
-      &&   lhs.side  ==rhs.side
-      &&   lhs.module ==rhs.module;
-  }
-  //-------------------------------------
-  std::ostream& operator<<( std::ostream& oo, const Pad &p){
-    oo<<"pad["<<p.ieta<<","<<p.iphi<<"] :"
-      " (m="<<p.multiplet<<", l="<<p.layer<<", s="<<p.sector<<", st="<<p.sectortype
-      <<", side="<<(p.side==0 ? "A" : "C")<<", m="<<p.module
-      <<")";
-    return oo;
-  }
-  */
   //-------------------------------------
   
   //S.I : A lot of cleaning up can be done in this file. Most of the methods below are never used..
@@ -69,15 +41,15 @@ namespace NSWL1 {
   //--------------------------------------------------------------
   float phi_mpi_pi(const double &val) {
     double value(val);
-    while(value <= -M_PI) value += 2.*M_PI;
-    while(value >  +M_PI) value -= 2.*M_PI;
+    while(value <= -TMath::Pi()) value += 2.*TMath::Pi();
+    while(value >  +TMath::Pi()) value -= 2.*TMath::Pi();
     return value;
   }
   //--------------------------------------------------------------
   float phi_zero_2pi(const double &val) {
     double value(val);
-    while(value <= 0.     ) value += 2.*M_PI;
-    while(value >  2.*M_PI) value -= 2.*M_PI;
+    while(value <= 0.     ) value += 2.*TMath::Pi();
+    while(value >  2.*TMath::Pi()) value -= 2.*TMath::Pi();
     return value;
   }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/SectorTriggerCandidate.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/SectorTriggerCandidate.cxx
index 65823a019d49cb977346ce0cf6fde24ebdeb0e6a..5bf3a352597ec311014a255fd84f502272228a74 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/SectorTriggerCandidate.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/SectorTriggerCandidate.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/SectorTriggerCandidate.h"
@@ -32,7 +32,7 @@ namespace NSWL1{
             //project the outer overlap into first one's plane
             float Z1=outer.pads()[0].m_cornerXyz[1][2];
             float Z0=inner.pads()[0].m_cornerXyz[1][2];
-            //write the outer overlap in Z0 and overlap inner+outer to calculate the overall overlap laplaplap
+            //write the outer overlap in Z0 and overlap inner+outer to calculate the overall overlap
     
             //mproject ? from Z1->Z0
             return largestIntersection(inner_overlap,Project(outer_overlap,Z1,Z0));
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/SingleWedgePadTrigger.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/SingleWedgePadTrigger.cxx
index d3b26f49b3fb7ad1bc83e2abcdac623832cfacf1..56cdfb8f51a5bdcc5514d37a76cb721b18a4c25d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/SingleWedgePadTrigger.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/SingleWedgePadTrigger.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/SingleWedgePadTrigger.h"
@@ -7,14 +7,10 @@
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
 #include <algorithm>
 #include <cassert>
-#include <cmath>
-#include <iostream>
 #include <sstream>
 
 namespace NSWL1{
 
-    //using SingleWedgePadTrigger=SingleWedgePadTrigger;
-
     bool sortByLayer(const PadWithHits &p0, const PadWithHits& p1) {
         return p0.layer<p1.layer;
     }
@@ -39,7 +35,7 @@ namespace NSWL1{
         size_t nPads(pads.size());
         bool haveEnoughPads(nPads>2);
         if(not haveEnoughPads)
-        std::cerr<<"SingleWedgePadTrigger::halfPadCoordinates: need at least 3 pads"<<std::endl;
+	  ATH_MSG_ERROR("SingleWedgePadTrigger::halfPadCoordinates: need at least 3 pads");
         assert(haveEnoughPads);
         
         const PadWithHits &pad0=pads[0], &pad1=pads[1], &pad2=pads[2];
@@ -116,7 +112,7 @@ namespace NSWL1{
         size_t nPads(pads.size());
         bool haveEnoughPads(nPads>2);
         if(not haveEnoughPads){
-            std::cerr<<"SingleWedgePadTrigger::halfPadCoordinates: need at least 3 pads"<<std::endl;
+	  std::cerr<<"SingleWedgePadTrigger::halfPadCoordinates: need at least 3 pads"<<std::endl;
         }
         assert(haveEnoughPads);
         const PadWithHits &pad0=pads[0], &pad1=pads[1], &pad2=pads[2];
@@ -127,7 +123,6 @@ namespace NSWL1{
         bool hasL2L3(l0==STGC_LAYER_2 && l1==STGC_LAYER_3);
         bool validLayerCombination(hasL1L2 || hasL1L4 || hasL2L3);
         //S.I if buggy combination so ??
-        //if(!validLayerCombination) cout<<"buggy layer combination? layers: "<<l0<<","<<l1<<","<<l2<<endl;
         assert(validLayerCombination); // probably got a pattern we don't know how to interpret
         (void) validLayerCombination;//not o.k
         
@@ -177,14 +172,12 @@ namespace NSWL1{
     bool SingleWedgePadTrigger::areInnerOuterConsistent(const EtaPhiHalf &inner, const EtaPhiHalf &outer, bool verbose) {
         // ASM-2016-10-4 : Figure out the logic behind this, the staggering changed now relaxing this a bit
         //S.I : Relaxing?  what is "this"?
-        //  bool mismatchEta(outer.ieta < inner.ieta || outer.ieta > inner.ieta + 1);
-        //  bool mismatchPhi(outer.iphi < inner.iphi || outer.iphi > inner.iphi + 1);
         bool mismatchEta(outer.ieta < inner.ieta - 4 || outer.ieta > inner.ieta + 4);
         bool mismatchPhi(outer.iphi < inner.iphi - 4 || outer.iphi > inner.iphi + 4);
         bool mismatch(mismatchEta || mismatchPhi);
         //S.I a remnant of verbose plague... will cleanup later
         (void) verbose;
-        //
+
         return !mismatch;
     }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterOfflineData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterOfflineData.cxx
index 7fab8e30439790a006513858706b4857e2863415..261e75c9f8540143b0e979d1fab15901b68b7254 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterOfflineData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterOfflineData.cxx
@@ -1,14 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 
 //Local includes
 #include "TrigT1NSWSimTools/StripClusterOfflineData.h"
 
-#include <string>
-
-
 namespace NSWL1 {
 
   StripClusterOfflineData::StripClusterOfflineData(int bandId,
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
index 2b017370a5751fc94cc13720f33722219900d89d..57549dfdb2d6b42b63d05b40a2bbd6ae592cfa4c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripClusterTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -10,32 +10,14 @@
 #include "TrigT1NSWSimTools/StripClusterTool.h"
 #include "TrigT1NSWSimTools/StripOfflineData.h"
 
-//Event info includes
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-
 // Muon software includes
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/sTgcReadoutElement.h"
 #include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonDigitContainer/sTgcDigitContainer.h"
-#include "MuonDigitContainer/sTgcDigit.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
 
-// local includes
 #include "TTree.h"
-#include "TVector3.h"
-
-#include <functional>
-#include <algorithm>
-#include <map>
-#include <utility>
-
 
 
 namespace NSWL1 {
@@ -43,8 +25,6 @@ namespace NSWL1 {
     StripClusterTool::StripClusterTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
       m_detManager(0),
       m_sTgcIdHelper(0),
       m_tree(0),
@@ -114,14 +94,6 @@ namespace NSWL1 {
       }
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-      // retrieve the Random Service
-      if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-      }
-
       //  retrieve the MuonDetectormanager
       if( detStore()->retrieve( m_detManager ).isFailure() ) {
         ATH_MSG_FATAL("Failed to retrieve the MuonDetectorManager");
@@ -269,11 +241,6 @@ namespace NSWL1 {
       m_cl_module->clear();
       m_cl_layer->clear();
       m_cl_bandId->clear();
-      /*
-      for( auto cl: m_clusters){
-	    delete (cl);
-      }
-      */
       m_clusters.clear();
     }
 void StripClusterTool::fill_strip_validation_id(std::vector<std::unique_ptr<StripClusterData>>& clusters) {
@@ -306,7 +273,6 @@ void StripClusterTool::fill_strip_validation_id(std::vector<std::unique_ptr<Stri
       int n_strip=0;
       ATH_MSG_DEBUG(" Start cl " << cl_i  << " OF " << m_clusters.size());
 
-      //std::vector< std::unique_ptr<StripData> >* this_cl=m_clusters.at(cl_i);
       auto this_cl=m_clusters.at(cl_i);
       ATH_MSG_DEBUG(" Start cl " << cl_i  << " OF " << m_clusters.size());
 
@@ -360,10 +326,10 @@ void StripClusterTool::fill_strip_validation_id(std::vector<std::unique_ptr<Stri
       	    ATH_MSG_DEBUG("Cluster hit, truth globalPosX="   << truth_globalPosX
       			  << ", truth globalPosY="   << truth_globalPosY
       			  << ", truth globalPosZ="   << truth_globalPosZ
-      			  << ", truth enegy deposit ="   << truth_energy << std::endl);
+      			  << ", truth enegy deposit ="   << truth_energy);
       	    ATH_MSG_DEBUG("Cluster hit, truth localPosX="   << lpos.x()
       			  << ", truth localPosY="   <<  lpos.y()
-      			  << ", truth enegy deposit ="   << truth_energy << std::endl);
+      			  << ", truth enegy deposit ="   << truth_energy);
 
 	        m_cl_truth_x->push_back( hit_gpos.x() );
       	    m_cl_truth_y->push_back( hit_gpos.y() );
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripData.cxx
index 9f0b3385ee38ac1c29d2d73ec852650bf98210b8..d8b9cc158cd4ac92a1dda43a394e90a45359f49c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripData.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigT1NSWSimTools/StripData.h"
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripOfflineData.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripOfflineData.cxx
index 1435e491fd86a779ae7f67b3b02dec2cbc88463e..71e0024d897ed1e77da99e91bb87de5f6a2e1d05 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripOfflineData.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripOfflineData.cxx
@@ -6,9 +6,6 @@
 //Local includes
 #include "TrigT1NSWSimTools/StripOfflineData.h"
 
-#include <string>
-
-
 namespace NSWL1 {
 
   StripOfflineData::StripOfflineData(Identifier id, const sTgcIdHelper* helper, const sTgcDigit* digit) : 
@@ -77,10 +74,7 @@ namespace NSWL1 {
 
     int StripOfflineData::sectorId()    const {
       if (m_helper) {
-	//      std::string stName = m_helper->stationNameString(m_helper->stationName(m_id));
-        //    bool isSmall = stName[2]=='S';
 	return  m_helper->stationPhi(m_id);
-	    //    return (isSmall)? m_helper->stationPhi(m_id)*2 - 1 : m_helper->stationPhi(m_id)*2 - 2;
       }
       return -1;
     }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
index e7d43c2a4ee0487e6c6c9113591aaab4544bb723..29317638c5f3e8faf8f6cdc346ecfae4e8e30228 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripSegmentTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 // Athena/Gaudi includes
@@ -11,59 +11,25 @@
 #include "TrigT1NSWSimTools/StripOfflineData.h"
 #include "TrigT1NSWSimTools/tdr_compat_enum.h"
 
-//Event info includes
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-
-// Muon software includes
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonReadoutGeometry/sTgcReadoutElement.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonDigitContainer/sTgcDigitContainer.h"
-#include "MuonDigitContainer/sTgcDigit.h"
-#include "MuonSimData/MuonSimDataCollection.h"
-#include "MuonSimData/MuonSimData.h"
-// random numbers
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
-
-// local includes
 #include "TTree.h"
-#include "TVector3.h"
 
-#include <functional>
-#include <algorithm>
 #include <map>
-#include <utility>
-#include <math.h>      
 
 namespace NSWL1 {
 
     StripSegmentTool::StripSegmentTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
-      m_detManager(0),
-      m_sTgcIdHelper(0),
       m_tree(0)
 
     {
       declareInterface<NSWL1::IStripSegmentTool>(this);
 
       declareProperty("DoNtuple", m_doNtuple = true, "input the StripTds branches into the analysis ntuple"); 
-      declareProperty("sTGC_SdoContainerName", m_sTgcSdoContainer = "sTGC_SDO", "the name of the sTGC SDO container");
     }
 
     StripSegmentTool::~StripSegmentTool() {
 
-      // Clear Ntuple variables
-      //      if(m_cl_charge) delete m_cl_charge;
-      //if(m_cl_eta) delete m_cl_eta;
-      //if(m_cl_phi) delete m_cl_phi;
-
-
     }
 
  
@@ -86,7 +52,6 @@ namespace NSWL1 {
         }
 
         char ntuple_name[40]={'\0'};
-        //memset(ntuple_name,'\0',40*sizeof(char));
         sprintf(ntuple_name,"%sTree",algo_name.c_str());
 
         m_tree = 0;
@@ -115,30 +80,6 @@ namespace NSWL1 {
       }
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-      // retrieve the Random Service
-      if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-      }
-
-      //  retrieve the MuonDetectormanager
-      if( detStore()->retrieve( m_detManager ).isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the MuonDetectorManager");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("MuonDetectorManager successfully retrieved");
-      }
-
-      //  retrieve the sTGC offline Id helper
-      if( detStore()->retrieve( m_sTgcIdHelper ).isFailure() ){
-        ATH_MSG_FATAL("Failed to retrieve sTgcIdHelper");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("sTgcIdHelper successfully retrieved");
-      }
- 
       return StatusCode::SUCCESS;
     }
 
@@ -221,7 +162,6 @@ namespace NSWL1 {
 	    float avg_r=(r1+r2)/2.;
 	    float avg_z=(z1+z2)/2.;
 	    float inf_slope=(avg_r/avg_z);
-	    //float dR=slope-inf_slope;
 	    float theta_inf=atan(inf_slope);
 	    float theta=atan(slope);
 	    float dtheta=(theta_inf-theta)*1000;//In Milliradian
@@ -273,8 +213,6 @@ namespace NSWL1 {
     }
 
     StatusCode StripSegmentTool::book_branches() {
-      // m_cl_n= 0;
-      // m_cl_charge = new std::vector< int >();
 
       m_seg_theta = new std::vector< float >();    
       m_seg_dtheta = new std::vector< float >();
@@ -315,9 +253,6 @@ namespace NSWL1 {
 
 
        }
-      // else { 
-      //    return StatusCode::FAILURE;
-      // }
       return StatusCode::SUCCESS;
     }
 
@@ -354,5 +289,3 @@ namespace NSWL1 {
 
 
 }
-
-//  LocalWords:  pos lpos
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
index aa2bc88fd9f634b2e1df7e112460e5a9fb52dea7..99a1c93a1196e6f732473a9a761e45cc1f6cd4ea 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/StripTdsOfflineTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "GaudiKernel/ITHistSvc.h"
@@ -21,15 +21,8 @@
 #include "MuonAGDDDescription/sTGCDetectorDescription.h"
 #include "MuonAGDDDescription/sTGCDetectorHelper.h"
 
-#include "AthenaKernel/IAtRndmGenSvc.h"
-#include "CLHEP/Random/RandFlat.h"
-#include "CLHEP/Random/RandGauss.h"
-
 #include "TTree.h"
-#include "TVector3.h"
 
-#include <functional>
-#include <algorithm>
 #include <map>
 #include <utility>
 
@@ -52,8 +45,6 @@ namespace NSWL1 {
     StripTdsOfflineTool::StripTdsOfflineTool( const std::string& type, const std::string& name, const IInterface* parent) :
       AthAlgTool(type,name,parent),
       m_incidentSvc("IncidentSvc",name),
-      m_rndmSvc("AtRndmGenSvc",name),
-      m_rndmEngine(0),
       m_detManager(0),
       m_sTgcIdHelper(0),
       m_strip_cache_runNumber(-1),
@@ -64,14 +55,10 @@ namespace NSWL1 {
     {
       declareInterface<NSWL1::IStripTdsTool>(this);
 
-      declareProperty("RndmEngineName", m_rndmEngineName = "StripTdsOfflineTool", "the name of the random engine");
       declareProperty("sTGC_DigitContainerName", m_sTgcDigitContainer = "sTGC_DIGITS", "the name of the sTGC digit container");
       declareProperty("sTGC_SdoContainerName", m_sTgcSdoContainer = "sTGC_SDO", "the name of the sTGC SDO container");
       declareProperty("DoNtuple", m_doNtuple = false, "input the StripTds branches into the analysis ntuple"); 
 
-      // reserve enough slots for the trigger sectors and fills empty vectors
-      // std::vector< std::vector<StripData*> >::iterator it = m_strip_cache.begin();
-      //std::vector<std::unique_ptr<StripData>>::iterator it = m_strip_cache.begin();
     }
 
     StripTdsOfflineTool::~StripTdsOfflineTool() {
@@ -87,8 +74,6 @@ namespace NSWL1 {
 
     void StripTdsOfflineTool::clear_cache() {
       ATH_MSG_INFO( "Clearing Strip Cache"); 
-      for(unsigned int i = 0; i < m_strip_cache.size(); ++i)
-	    //delete m_strip_cache[i];
       m_strip_cache.clear();     
     }
   
@@ -96,7 +81,6 @@ namespace NSWL1 {
     ATH_MSG_INFO( "initializing " << name() ); 
     
     ATH_MSG_INFO( name() << " configuration:");
-    ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_rndmEngineName.name() << m_rndmEngineName.value());
     ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_sTgcDigitContainer.name() << m_sTgcDigitContainer.value());
     ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_sTgcSdoContainer.name() << m_sTgcSdoContainer.value());
     ATH_MSG_INFO(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_doNtuple.name() << ((m_doNtuple)? "[True]":"[False]")
@@ -117,7 +101,6 @@ namespace NSWL1 {
         }
 
         char ntuple_name[40]={'\0'};
-        //memset(ntuple_name,'\0',40*sizeof(char));
         sprintf(ntuple_name,"%sTree",algo_name.c_str());
 
         m_tree = 0;
@@ -145,21 +128,6 @@ namespace NSWL1 {
       }
       m_incidentSvc->addListener(this,IncidentType::BeginEvent);
 
-      // retrieve the Random Service
-      if( m_rndmSvc.retrieve().isFailure() ) {
-        ATH_MSG_FATAL("Failed to retrieve the Random Number Service");
-        return StatusCode::FAILURE;
-      } else {
-        ATH_MSG_INFO("Random Number Service successfully retrieved");
-      }
-
-      // retrieve the random engine
-      m_rndmEngine = m_rndmSvc->GetEngine(m_rndmEngineName);
-      if (m_rndmEngine==0) {
-        ATH_MSG_FATAL("Could not retrieve the random engine " << m_rndmEngineName);
-        return StatusCode::FAILURE;
-      }
-
       //  retrieve the MuonDetectormanager
       if( detStore()->retrieve( m_detManager ).isFailure() ) {
         ATH_MSG_FATAL("Failed to retrieve the MuonDetectorManager");
@@ -234,25 +202,6 @@ namespace NSWL1 {
 	m_tree->Branch(TString::Format("%s_BCID",n).Data(),&m_strip_BCID);
 	m_tree->Branch(TString::Format("%s_wedge",n).Data(),&m_strip_wedge);
 	m_tree->Branch(TString::Format("%s_time",n).Data(),&m_strip_time);
-
-
-//	m_tree->Branch(TString::Format("%s_stripTruthHitGlobalX",n).Data(),&m_stripTruthHitGlobalX);
-//	m_tree->Branch(TString::Format("%s_stripTruthHitGlobalY",n).Data(),&m_stripTruthHitGlobalY);
-//	m_tree->Branch(TString::Format("%s_stripTruthHitGlobalZ",n).Data(),&m_stripTruthHitGlobalZ);
-
-      
-
-      //   m_tree->Branch(TString::Format("%s_stripGlobalY",n).Data(),&m_stripGlobalY);
-      //   m_tree->Branch(TString::Format("%s_stripGlobalZ",n).Data(),&m_stripGlobalZ);
-      //  m_tree->Branch(TString::Format("%s_stripTruthHitGlobal",n).Data(),&m_stripTruthHitGlobalZ);
-      //   m_tree->Branch(TString::Format("%s_stripEtaIdFromOfflineId",n).Data(),&m_stripEtaIdFromOfflineId);
-      //   m_tree->Branch(TString::Format("%s_stripPhiIdFromOfflineId",n).Data(),&m_stripPhiIdFromOfflineId);
-      //   m_tree->Branch(TString::Format("%s_stripIsSmallIdFromOfflineId",n).Data(),&m_stripIsSmallFromOfflineId);
-      //   m_tree->Branch(TString::Format("%s_stripLayerFromOfflineId",n).Data(),&m_stripLayerFromOfflineId);
-      //   m_tree->Branch(TString::Format("%s_offlineIdStripEtaIdConverted",n).Data(),&m_offlineIdStripEtaConverted);
-      //   m_tree->Branch(TString::Format("%s_offlineIdStripPhiIdConverted",n).Data(),&m_offlineIdStripPhiConverted);
-      //   m_tree->Branch(TString::Format("%s_stripEtaIdFromOldSimu",n).Data(),&m_stripEtaIdFromOldSimu);
-      //   m_tree->Branch(TString::Format("%s_stripPhiIdFromOldSimu",n).Data(),&m_stripPhiIdFromOldSimu);
       }
       else { 
          return StatusCode::FAILURE;
@@ -401,10 +350,7 @@ namespace NSWL1 {
 	  rdoEl->stripPosition(Id,strip_lpos);
 	  Amg::Vector3D pos(strip_lpos.x(),strip_lpos.y(),0.0);
 	  
-	  //	  ATH_MSG_DEBUG( "Grabbed local pos" );
 	  rdoEl->surface(Id).localToGlobal(strip_lpos, strip_gpos, strip_gpos);
-	  //strip_gpos = rdoEl->localToGlobalCoords(pos,Id);
-
 
 
 	  std::string stName = m_sTgcIdHelper->stationNameString(m_sTgcIdHelper->stationName(Id));
@@ -465,7 +411,6 @@ namespace NSWL1 {
 
 
       //S.I
-	  //StripOfflineData* strip = new StripOfflineData(Id,m_sTgcIdHelper,digit);
 	  auto strip=std::make_unique<StripOfflineData>(Id,m_sTgcIdHelper,digit);
       //S.I
       strip->set_locX(strip_lpos.x());
@@ -475,11 +420,6 @@ namespace NSWL1 {
 	  bool read_strip=false;
 	  bool _tmp=false;
 	  for( const auto& p : padTriggers){
-	    //	    if(p->sectorId()!=stationPhi)
-	    //  {
-	    //		ATH_MSG_INFO("ReadStrip Trigger Candidate in different sector " << p->sectorId() << "  " <<stationPhi );
-	    //		continue; //Only take triggers in the same sector
-	    //  }
 
 	    if(p->sideId()!=strip->sideId()){
 	      ATH_MSG_DEBUG(" ReadStrip Trigger Candidate in different side " << p->sideId() << "  " <<strip->sideId() );
@@ -562,7 +502,6 @@ namespace NSWL1 {
     //Get_sTGCDetector's 2nd input value can range from eta=1 to eta=3
     //moduleID() provides the values -1 to -3 and 1 to 3, so we need abs value
     sTGC = sTGC_helper.Get_sTGCDetector(type,std::abs(strip->moduleId()),strip->sectorId(),strip->wedge(),side);
-    //sTGCDetectorDescription *sTGC = sTGC_helper.Get_sTGCDetector(strip->stationName());
 
     if (!sTGC){
       ATH_MSG_WARNING("StripTdsOfflineTool:ReadStrip: Could not find detector with:\n" <<
@@ -608,14 +547,6 @@ namespace NSWL1 {
     return false;
   }
 
-    /*   else { ATH_MSG_DEBUG("StripCluster:ReadStrip Found detector with:\n" <<
-			"type:" << type << "\n"
-			<<"moduleID:"<< strip->moduleId() << "\n"
-			<<"sectiorID:"<< strip->sectorId()<< "\n"
-			<<"layer:"<<layer<< "\n"
-			<<"side:"<<side<< "\n");}*/
-
-
     /* Code for when pand id is fixed*/
 
   //   sTGCReadoutParameters  roParams=sTGC->GetReadoutParameters();
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/vector_utils.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/vector_utils.cxx
index e2870f3f7f52eac8ee9debd8539951aa5a53b113..807663f08e3f73390d1e1da10384b3021968ec16 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/vector_utils.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/vector_utils.cxx
@@ -20,12 +20,5 @@ std::string vec2str(const std::vector< size_t > &vec){
     oss<<"]";
     return oss.str();
 }
-/*
-std::string vec2str(const std::vector<PadWithHits> &vec){
-    std::ostringstream oss;
-    for(std::vector<PadWithHits>::const_iterator it=vec.begin(); it!=vec.end(); ++it)
-        oss<<(*it)<<", ";
-    return oss.str();
-}
-*/
+
 } // nsw