diff --git a/Trigger/TrigT1/TrigT1NSW/src/NSWL1Simulation.cxx b/Trigger/TrigT1/TrigT1NSW/src/NSWL1Simulation.cxx
index 99e2e1731aa8bb885c5b2912aadd8f05197f92a9..e465f8a5bb62b5ec85218fe80793a7fbebea84ec 100644
--- a/Trigger/TrigT1/TrigT1NSW/src/NSWL1Simulation.cxx
+++ b/Trigger/TrigT1/TrigT1NSW/src/NSWL1Simulation.cxx
@@ -95,7 +95,6 @@ namespace NSWL1 {
     
     if(m_doMM ){
       ATH_CHECK(m_mmtrigger.retrieve());
-      if(m_doMMDiamonds) ATH_CHECK( m_mmtrigger->initDiamondAlgorithm() );
     }
 
     // Connect to Monitoring Service
@@ -162,7 +161,6 @@ namespace NSWL1 {
     for ( auto& mon :  m_monitors ) {
       ATH_CHECK(mon->finalHists());
     }
-    if(m_doMM) ATH_CHECK( m_mmtrigger->finalizeDiamondAlgorithm(m_doMMDiamonds) );
     return StatusCode::SUCCESS;
   }
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IMMTriggerTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IMMTriggerTool.h
index dc45f7af1a01f77de1bbdcf51b36c350c2dd4fca..8de5a0ca69d7271d472addaae03d834316400b7c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IMMTriggerTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/IMMTriggerTool.h
@@ -24,8 +24,6 @@ namespace NSWL1 {
     virtual ~IMMTriggerTool() {}
 
     virtual StatusCode runTrigger(const bool do_MMDiamonds) = 0;
-    virtual StatusCode initDiamondAlgorithm() = 0;
-    virtual StatusCode finalizeDiamondAlgorithm(const bool do_MMDiamonds) = 0;
 
     static const InterfaceID& interfaceID() {
         static const InterfaceID IID_IMMTriggerTool("NSWL1::IMMTriggerTool", 1 ,0);
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMLoadVariables.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMLoadVariables.h
index af03f93404497b66f7ea0ad1c36585cf5d07e53d..dfee188ab4024bbd322dc46b70d7d34a46d87755 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMLoadVariables.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMLoadVariables.h
@@ -27,20 +27,21 @@ namespace MuonGM {
 
   public:
 
-    MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetectorManager* detManager, const MmIdHelper* idhelper, std::map<std::string,MMT_Parameters*> pars);
+    MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetectorManager* detManager, const MmIdHelper* idhelper);
 
     StatusCode getMMDigitsInfo(std::map<std::pair<int,unsigned int>,std::vector<digitWrapper> >& entries,
                          std::map<std::pair<int,unsigned int>,std::map<hitData_key,hitData_entry> >& Hits_Data_Set_Time,
-                         std::map<std::pair<int,unsigned int>,evInf_entry>& Event_Info);
+                         std::map<std::pair<int,unsigned int>,evInf_entry>& Event_Info,
+                         std::map<std::string,std::shared_ptr<MMT_Parameters> > &pars);
     //Import_Athena..._.m stuff
     double phi_shift(double athena_phi,const std::string& wedgeType, int stationPhi) const;
     int Get_VMM_chip(int strip) const;  //*** Not Finished... Rough
-    int strip_number(int station, int plane, int spos, const MMT_Parameters *par)const;
+    int strip_number(int station, int plane, int spos, std::shared_ptr<MMT_Parameters> par)const;
     int Get_Strip_ID(double X,double Y,int plane) const;
     bool Mimic_VMM_Chip_Deadtime(hitData_entry& candy);
-    void xxuv_to_uvxx(ROOT::Math::XYZVector& hit, int plane, const MMT_Parameters *par)const;
-    void hit_rot_stereo_fwd(ROOT::Math::XYZVector& hit, const MMT_Parameters *par)const;//x to v, u to x
-    void hit_rot_stereo_bck(ROOT::Math::XYZVector& hit, const MMT_Parameters *par)const;//x to u, v to x
+    void xxuv_to_uvxx(ROOT::Math::XYZVector& hit, int plane, std::shared_ptr<MMT_Parameters> par)const;
+    void hit_rot_stereo_fwd(ROOT::Math::XYZVector& hit, std::shared_ptr<MMT_Parameters> par)const;//x to v, u to x
+    void hit_rot_stereo_bck(ROOT::Math::XYZVector& hit, std::shared_ptr<MMT_Parameters> par)const;//x to u, v to x
 
     struct histogramVariables{
         std::vector<std::string> *m_NSWMM_dig_stationName;
@@ -143,9 +144,7 @@ namespace MuonGM {
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
     const MmIdHelper* m_MmIdHelper;        //!< MM offline Id helper
     StoreGateSvc* m_evtStore;
-    std::map<std::string, MMT_Parameters*> m_pars{};
     bool m_striphack{};
-    std::string getWedgeType(const MmDigitContainer *nsw_MmDigitContainer);
 
 
   };
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Diamond.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Diamond.h
index 2c7082833c7d1b75c167a1981750242ca6266193..6fd2661f25246d9e4c2fc604045738321d663de9 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Diamond.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Diamond.h
@@ -40,9 +40,9 @@ struct diamond_t {
   unsigned int wedgeCounter;
   char sector;
   int phi;
-  std::vector<MMT_Road*> ev_roads;
+  std::vector<std::shared_ptr<MMT_Road> > ev_roads;
   std::vector<slope_t> slopes;
-  std::vector<MMT_Hit*> ev_hits;
+  std::vector<std::shared_ptr<MMT_Hit> > ev_hits;
 };
 
 class MMT_Diamond : public AthMessaging {
@@ -50,13 +50,13 @@ class MMT_Diamond : public AthMessaging {
     MMT_Diamond(const MuonGM::MuonDetectorManager* detManager);
 
     void clearEvent();
-    void createRoads_fillHits(const unsigned int iterator, std::vector<hitData_entry> &hitDatas, const MuonGM::MuonDetectorManager* detManager, MMT_Parameters *par, const int phi);
+    void createRoads_fillHits(const unsigned int iterator, std::vector<hitData_entry> &hitDatas, const MuonGM::MuonDetectorManager* detManager, std::shared_ptr<MMT_Parameters> par, const int phi);
     void findDiamonds(const unsigned int iterator, const double &sm_bc, const int &event);
     double phiShift(const int &n, const double &phi, const char &side);
     std::vector<diamond_t> getDiamondVector() const { return m_diamonds; }
     diamond_t getDiamond(const unsigned int iterator) const { return m_diamonds.at(iterator); }
     std::vector<double> getHitSlopes() const { return m_hitslopes; }
-    std::vector<MMT_Hit*> getHitVector(const unsigned int iterator) const { return m_diamonds.at(iterator).ev_hits; }
+    std::vector<std::shared_ptr<MMT_Hit> > getHitVector(const unsigned int iterator) const { return m_diamonds.at(iterator).ev_hits; }
     std::vector<slope_t> getSlopeVector(const unsigned int iterator) const { return m_diamonds.at(iterator).slopes; }
     unsigned int getDiamondSize() const { return m_diamonds.size(); }
     int getUVfactor() const { return m_uvfactor; }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
index 764936c7934167e21aae74c2e9caeab47cf424e8..738e10c1a5ac81e2e82d0bf95a739b4f201bd952 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Finder.h
@@ -12,13 +12,12 @@
 
 class MMT_Finder : public AthMessaging {
  public:
-  MMT_Finder(MMT_Parameters *par, int nUVRoads = 1);
-  ~MMT_Finder(){}
-  int Coincidence_Gate(const std::vector<bool>& plane_hits) const;
+  MMT_Finder(std::shared_ptr<MMT_Parameters> par, int nUVRoads = 1);
+  int Coincidence_Gate(const std::vector<bool>& plane_hits, std::shared_ptr<MMT_Parameters> par) const;
   void set_roads(int roads) { m_nRoads=roads; }
   int get_roads() const {return m_nRoads;}
-  void fillHitBuffer(std::map<std::pair<int,int>,finder_entry>& hitBuffer, const Hit& hit) const;
-  void checkBufferForHits(std::vector<bool>& plane_is_hit, std::vector<Hit>& track, int road, std::map<std::pair<int,int>,finder_entry> hitBuffer) const;
+  void fillHitBuffer(std::map<std::pair<int,int>,finder_entry>& hitBuffer, const Hit& hit, std::shared_ptr<MMT_Parameters> par) const;
+  void checkBufferForHits(std::vector<bool>& plane_is_hit, std::vector<Hit>& track, int road, std::map<std::pair<int,int>,finder_entry> hitBuffer, std::shared_ptr<MMT_Parameters> par) const;
 
  private:
   std::vector<int> q_planes(const std::string& type) const;
@@ -29,7 +28,6 @@ class MMT_Finder : public AthMessaging {
   double m_slope_max;
   std::vector<std::vector<double> > m_gateFlags;
   std::vector<std::vector<finder_entry> > m_finder;
-  MMT_Parameters* m_par;
 
   int m_nUVRoads;
 };
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
index 1ba687f7b3dede7335a5ea39c03afceaf8c44128..70bcaaa42930868248a9090a2739ee082235902d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Fitter.h
@@ -12,50 +12,48 @@
 
 class MMT_Fitter : AthMessaging {
  public:
-  MMT_Fitter(MMT_Parameters *par, int nlg=256, double LG_min=0., double LG_max=0.5);
+  MMT_Fitter(int nlg=256, double LG_min=0., double LG_max=0.5);
   void Get_Fit(std::vector<Hit>& track, std::map<int,evFit_entry>& Event_Fit, std::map<hitData_key,hitData_entry>& Hits_Data_Set_Time);
-  evFit_entry fit_event(int event, std::vector<Hit>& track, std::vector<hitData_entry>& hitDatas, int& nfit, std::vector<std::pair<double,double> >&mxmy, double& mxl, double& mv, double& mu) const;
+  evFit_entry fit_event(int event, std::vector<Hit>& track, std::vector<hitData_entry>& hitDatas, int& nfit, std::vector<std::pair<double,double> >&mxmy, double& mxl, double& mv, double& mu, std::shared_ptr<MMT_Parameters> par) const;
   int get_last() const {return m_last;}
-  int SC_ROI_n_x() const {return m_par->n_x;}
-  int SC_ROI_n_y() const {return m_par->n_y;}
+  int SC_ROI_n_x(std::shared_ptr<MMT_Parameters> par) const {return par->n_x;}
+  int SC_ROI_n_y(std::shared_ptr<MMT_Parameters> par) const {return par->n_y;}
   int find_hitData(const std::vector<hitData_entry>& hitDatas, const hitData_key& key) const;
 
  protected:
   int m_last;
-  //some variables
-  MMT_Parameters *m_par;
 
   //functions translated
-  int Filter_UV(std::vector<Hit>& track) const;
-  double Get_Global_Slope(const std::vector<Hit>& track, const std::string& type) const;
-  double Get_Local_Slope(const std::vector<Hit>& Track,double theta=-999.,double phi=-999.) const;
-  ROI Get_ROI(double M_x,double M_u,double M_v,const std::vector<Hit>&track) const;
-  double phi_correct_factor(const std::vector<Hit>&track)const;
-  double Get_Delta_Theta(double M_local,double M_global) const;
-  double Get_Delta_Theta_division(double M_local,double M_global, double a=1.) const;
-  int Rough_ROI_temp(double theta, double phi) const;
+  int Filter_UV(std::vector<Hit>& track, std::shared_ptr<MMT_Parameters> par) const;
+  double Get_Global_Slope(const std::vector<Hit>& track, const std::string& type, std::shared_ptr<MMT_Parameters> par) const;
+  double Get_Local_Slope(const std::vector<Hit>& Track,double theta, double phi, std::shared_ptr<MMT_Parameters> par) const;
+  ROI Get_ROI(double M_x,double M_u,double M_v,const std::vector<Hit>&track, std::shared_ptr<MMT_Parameters> par) const;
+  double phi_correct_factor(const std::vector<Hit>&track, std::shared_ptr<MMT_Parameters> par)const;
+  double Get_Delta_Theta(double M_local,double M_global, std::shared_ptr<MMT_Parameters> par) const;
+  double Get_Delta_Theta_division(double M_local,double M_global, double a) const;
+  int Rough_ROI_temp(double theta, double phi, std::shared_ptr<MMT_Parameters> par) const;
 
   //sim hit code stuff
-  int track_to_index(const std::vector<Hit>&track)const;
+  int track_to_index(const std::vector<Hit>&track, std::shared_ptr<MMT_Parameters> par)const;
 
   //ideal local slope for debugging purposes
-  double ideal_local_slope(const std::vector<Hit>& Track)const;
-  double ideal_z(const Hit& hit)const;
-  double ideal_ak(const std::vector<Hit>& Track)const;
-  double ideal_zbar(const std::vector<Hit>& Track)const;
+  double ideal_local_slope(const std::vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const;
+  double ideal_z(const Hit& hit, std::shared_ptr<MMT_Parameters> par)const;
+  double ideal_ak(const std::vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const;
+  double ideal_zbar(const std::vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const;
 
   //translated from Table_Generators.m
   double LG_lgr(int ilgr, double a, int number_LG_regions, double min, double max) const;
   double mult_factor_lgr(int ilgr, double a, int number_LG_regions, double min, double max) const;
-  double Slope_Components_ROI_val(int jy, int ix, int thetaphi) const;
-  double Slope_Components_ROI_theta(int jy, int ix) const;
-  double Slope_Components_ROI_phi(int jy, int ix) const;
-  double DT_Factors_val(int i, int j) const;
+  double Slope_Components_ROI_val(int jy, int ix, int thetaphi, std::shared_ptr<MMT_Parameters> par) const;
+  double Slope_Components_ROI_theta(int jy, int ix, std::shared_ptr<MMT_Parameters> par) const;
+  double Slope_Components_ROI_phi(int jy, int ixi, std::shared_ptr<MMT_Parameters> par) const;
+  double DT_Factors_val(int i, int j, std::shared_ptr<MMT_Parameters> par) const;
 
 
  private:
   //some functions
-  std::vector<Hit> q_hits(const std::string& type,const std::vector<Hit>& hits) const;
+  std::vector<Hit> q_hits(const std::string& type,const std::vector<Hit>& hits,std::shared_ptr<MMT_Parameters> par) const;
 
   //Fitter components
   int m_number_LG_regions,m_n_fit;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Hit.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Hit.h
index 86e0057b8c0fadef3860acb4ad58eaa9729057ce..2dd9f06071a97b6b7b66d56c8694ab14078c6c98 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Hit.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Hit.h
@@ -52,7 +52,7 @@ class MMT_Hit : public AthMessaging {
     void setYZSlope(double slope) { m_YZslope = slope; }
     void setY(double y) { m_Y = y; }
     void setZ(double z) { m_Z = z; }
-    void updateHitProperties(const MMT_Parameters *par);
+    void updateHitProperties(std::shared_ptr<MMT_Parameters> par);
     bool verifyHit();
 
   private:
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Road.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Road.h
index 635b9f778414888c42aed64e6c635139f4e10277..c6aa9ba1f5b95a6f3b4753b3834bbd04ddfb8d0c 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Road.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_Road.h
@@ -42,7 +42,7 @@ class MMT_Road : public AthMessaging {
     MMT_Road(const char sector, const MuonGM::MuonDetectorManager* detManager, const micromegas_t mm, int xthr, int uvthr, int iroadx, int iroadu = -1, int iroadv = -1);
     ~MMT_Road();
 
-    void addHits(std::vector<MMT_Hit*> &hits);
+    void addHits(std::vector<std::shared_ptr<MMT_Hit> > &hits);
     double avgSofX();
     double avgSofUV(const int uv1, const int uv2);
     double avgZofUV(const int uv1, const int uv2);
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
index 8605a8d949f1ebe066339332fdacfebe0b37ff40..def43cbaac509ed4e0f96ce9236cd79c06be1d70 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMT_struct.h
@@ -397,9 +397,9 @@ struct evAna_entry{
 };
 
 struct hitData_info{
-  hitData_info(int plane,int station_eta,int strip,MMT_Parameters *par,const ROOT::Math::XYZVector& tru,double tpos,double ppos);
+  hitData_info(int plane,int station_eta,int strip,std::shared_ptr<MMT_Parameters> par,const ROOT::Math::XYZVector& tru,double tpos,double ppos);
   hitData_info(int the_pl=0,double the_y=0,double the_z=-999);
-  double mis_dy(int pl,MMT_Parameters *m_par,double tpos,double ppos)const;
+  double mis_dy(int pl,std::shared_ptr<MMT_Parameters> par,double tpos,double ppos)const;
   std::string hdr()const;
   std::string str()const;
   void print()const;
@@ -430,9 +430,9 @@ struct hitData_entry{
 	     double fit_the=0, double fit_phi=0, double fit_dth=0, double tru_dth=0,// double tru_thl=0, double tru_thg=0,
 	     double mxg=0, double mug=0, double mvg=0, double mxl=0, double the_mx=0, double the_my=0, int the_roi=0);
 
-  Hit entry_hit(MMT_Parameters *m_par)const;
+  Hit entry_hit(std::shared_ptr<MMT_Parameters> par)const;
   hitData_key entry_key() const;
-  hitData_info entry_info(MMT_Parameters *m_par)const;
+  hitData_info entry_info(std::shared_ptr<MMT_Parameters> par)const;
   void fit_fill(double fthe,double fphi, double fdth, double mxg=0., double mug=0., double mvg=0., double mxl=0., double m_x=0., double m_y=0., int king=0);
   void print() const;
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
index 6a841f0fe9b49bbabd824f5f0e449a73dffc3aaf..39b5f13d46e9b7242db517498acb387159561bd2 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/TrigT1NSWSimTools/MMTriggerTool.h
@@ -40,11 +40,8 @@ namespace NSWL1 {
     //load event stuff
     std::vector<hitData_entry> event_hitDatas(int find_event, std::map<hitData_key,hitData_entry>& Hits_Data_Set_Time) const;
     std::vector<hitData_key> event_hitData_keys(int find_event, std::map<hitData_key,hitData_entry>& Hits_Data_Set_Time) const;
-    MMT_Parameters *m_par;
-    MMT_Parameters *m_par_large;
-    MMT_Parameters *m_par_small;
-
-    MMT_Diamond *diamond;
+    std::shared_ptr<MMT_Parameters> m_par_large;
+    std::shared_ptr<MMT_Parameters> m_par_small;
 
     //MMT_Loader stuff end
 
@@ -58,13 +55,10 @@ namespace NSWL1 {
 
     virtual void handle (const Incident& inc);
 
-    StatusCode initDiamondAlgorithm();
     StatusCode runTrigger(const bool do_MMDiamonds);
-    StatusCode finalizeDiamondAlgorithm(const bool do_MMDiamonds);
 
   private:
 
-    std::string getWedgeType(const MmDigitContainer *nsw_MmDigitContainer);
     // needed Servives, Tools and Helpers
     ServiceHandle< IIncidentSvc >      m_incidentSvc;       //!< Athena/Gaudi incident Service
     const MuonGM::MuonDetectorManager* m_detManager;        //!< MuonDetectorManager
@@ -75,8 +69,6 @@ namespace NSWL1 {
     void clear_ntuple_variables();                          //!< clear the variables used in the analysis ntuple
     void fillNtuple(const MMLoadVariables& loadedVariables);
 
-    void storeEventProperties(const unsigned int iterator); //!< Store event variable for Diamond Road algorithm
-
     // properties: container and service names
     StringProperty   m_MmDigitContainer;                    //!< property, see @link MMStripTdsOfflineTool::MMStripTdsOfflineTool @endlink
 
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
index 87569d3664fa2b756db4edfeea3e429beda364f8..ccc7ace4843fb37618ed0dc7375b5a7c8223c5cf 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMLoadVariables.cxx
@@ -30,17 +30,17 @@ using std::map;
 using std::vector;
 using std::string;
 
-MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetectorManager* detManager, const MmIdHelper* idhelper, std::map<std::string,MMT_Parameters*> pars):
+MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetectorManager* detManager, const MmIdHelper* idhelper):
    AthMessaging(Athena::getMessageSvc(), "MMLoadVariables") {
-      m_pars = pars;
       m_evtStore = evtStore;
       m_detManager = detManager;
       m_MmIdHelper = idhelper;
 }
 
-  StatusCode MMLoadVariables::getMMDigitsInfo(map<std::pair<int,unsigned int>,std::vector<digitWrapper> >& entries,
-                                        map<std::pair<int,unsigned int>,map<hitData_key,hitData_entry> >& Hits_Data_Set_Time,
-                                        map<std::pair<int,unsigned int>,evInf_entry>& Event_Info) {
+  StatusCode MMLoadVariables::getMMDigitsInfo(std::map<std::pair<int,unsigned int>,std::vector<digitWrapper> >& entries,
+                                        std::map<std::pair<int,unsigned int>,map<hitData_key,hitData_entry> >& Hits_Data_Set_Time,
+                                        std::map<std::pair<int,unsigned int>,evInf_entry>& Event_Info,
+                                        std::map<std::string, std::shared_ptr<MMT_Parameters> > &pars) {
       //*******Following MuonPRD code to access all the variables**********
 
       histogramVariables fillVars;
@@ -60,6 +60,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
       // get digit container (a container corresponds to a multilayer of a module)
       const MmDigitContainer *nsw_MmDigitContainer = nullptr;
       ATH_CHECK( m_evtStore->retrieve(nsw_MmDigitContainer,"MM_DIGITS") );
+      if (nsw_MmDigitContainer->digit_size() == 0) return StatusCode::SUCCESS;
 
       std::vector<ROOT::Math::PtEtaPhiEVector> truthParticles, truthParticles_ent, truthParticles_pos;
       std::vector<int> pdg;
@@ -351,7 +352,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
         }
 
         std::string station = it->second[0].stName;
-        m_uvxxmod=(m_pars[station]->setup.compare("xxuvuvxx")==0);
+        m_uvxxmod=(pars[station]->setup.compare("xxuvuvxx")==0);
 
         map<hitData_key,hitData_entry> hit_info;
         vector<hitData_key> keys;
@@ -381,7 +382,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
           ROOT::Math::XYZVector recon(athena_rec.Y(),-athena_rec.X(),athena_rec.Z());
 
           if(m_uvxxmod){
-            xxuv_to_uvxx(recon,thisPlane,m_pars[station]);
+            xxuv_to_uvxx(recon,thisPlane,pars[station]);
           }
 
           //We're doing everything by the variable known as "athena_event" to reflect C++ vs MATLAB indexing
@@ -428,7 +429,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
         m_VMM_ChipLastHitTime=vector<vector<int> >(m_numVMM_PerPlane,vector<int>(8,0));
 
         int xhit=0,uvhit=0;
-        vector<bool>plane_hit(m_pars[station]->setup.size(),false);
+        vector<bool>plane_hit(pars[station]->setup.size(),false);
 
         for(map<hitData_key,hitData_entry>::iterator it=hit_info.begin(); it!=hit_info.end(); ++it){
           int plane=it->second.plane;
@@ -439,8 +440,8 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
 
         for(unsigned int ipl=0;ipl<plane_hit.size();ipl++){
           if(plane_hit[ipl]){
-            if(m_pars[station]->setup.substr(ipl,1)=="x") xhit++;
-            else if(m_pars[station]->setup.substr(ipl,1)=="u" || m_pars[station]->setup.substr(ipl,1)=="v") uvhit++;
+            if(pars[station]->setup.substr(ipl,1)=="x") xhit++;
+            else if(pars[station]->setup.substr(ipl,1)=="u" || pars[station]->setup.substr(ipl,1)=="v") uvhit++;
           }
         }
 
@@ -462,7 +463,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
     else return athena_phi;
 
   }
-  void MMLoadVariables::xxuv_to_uvxx(ROOT::Math::XYZVector& hit,const int plane, const MMT_Parameters *par) const{
+  void MMLoadVariables::xxuv_to_uvxx(ROOT::Math::XYZVector& hit,const int plane, std::shared_ptr<MMT_Parameters> par) const{
     if(plane<4)return;
     else if(plane==4)hit_rot_stereo_bck(hit, par);//x to u
     else if(plane==5)hit_rot_stereo_fwd(hit, par);//x to v
@@ -470,7 +471,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
     else if(plane==7)hit_rot_stereo_bck(hit, par);//v to x
   }
 
-  void MMLoadVariables::hit_rot_stereo_fwd(ROOT::Math::XYZVector& hit, const MMT_Parameters *par)const{
+  void MMLoadVariables::hit_rot_stereo_fwd(ROOT::Math::XYZVector& hit, std::shared_ptr<MMT_Parameters> par)const{
     double degree=TMath::DegToRad()*(par->stereo_degree);
     if(m_striphack) hit.SetY(hit.Y()*cos(degree));
     else{
@@ -479,7 +480,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
     }
   }
 
-  void MMLoadVariables::hit_rot_stereo_bck(ROOT::Math::XYZVector& hit, const MMT_Parameters *par)const{
+  void MMLoadVariables::hit_rot_stereo_bck(ROOT::Math::XYZVector& hit, std::shared_ptr<MMT_Parameters> par)const{
     double degree=-TMath::DegToRad()*(par->stereo_degree);
     if(m_striphack) hit.SetY(hit.Y()*std::cos(degree));
     else{
@@ -495,7 +496,7 @@ MMLoadVariables::MMLoadVariables(StoreGateSvc* evtStore, const MuonGM::MuonDetec
   }
 
   int 
-  MMLoadVariables::strip_number(int station, int plane, int spos, const MMT_Parameters *par)const{
+  MMLoadVariables::strip_number(int station, int plane, int spos, std::shared_ptr<MMT_Parameters> par)const{
     if (station<=0||station>par->n_stations_eta) {
       int base_strip = 0;
       return base_strip;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Diamond.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Diamond.cxx
index c3ba01156d0b7cb41d4971200daf5f892630b4f4..e0bf038f3187eb3eb443e070839bc4a2843a48b8 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Diamond.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Diamond.cxx
@@ -10,21 +10,15 @@ MMT_Diamond::MMT_Diamond(const MuonGM::MuonDetectorManager* detManager): AthMess
 void MMT_Diamond::clearEvent() {
   if (!m_diamonds.empty()) {
     for (auto &diam : m_diamonds) {
-      if (!diam.ev_roads.empty()) {
-        for (auto &road : diam.ev_roads) delete road;
-        diam.ev_roads.clear();
-      }
-      if (!diam.ev_hits.empty()) {
-        for (auto &hit : diam.ev_hits) delete hit;
-        diam.ev_hits.clear();
-      }
+      if (!diam.ev_roads.empty()) diam.ev_roads.clear();
+      if (!diam.ev_hits.empty()) diam.ev_hits.clear();
       diam.slopes.clear();
     }
     m_diamonds.clear();
   }
 }
 
-void MMT_Diamond::createRoads_fillHits(const unsigned int iterator, std::vector<hitData_entry> &hitDatas, const MuonGM::MuonDetectorManager* detManager, MMT_Parameters *par, const int phi) {
+void MMT_Diamond::createRoads_fillHits(const unsigned int iterator, std::vector<hitData_entry> &hitDatas, const MuonGM::MuonDetectorManager* detManager, std::shared_ptr<MMT_Parameters> par, const int phi) {
   ATH_MSG_DEBUG("createRoads_fillHits: Feeding hitDatas Start");
 
   diamond_t entry;
@@ -93,40 +87,40 @@ void MMT_Diamond::createRoads_fillHits(const unsigned int iterator, std::vector<
   this->setUVfactor(uvfactor);
 
   for (int ihds = 0; ihds < (int)hitDatas.size(); ihds++) {
-    MMT_Hit *myhit = new MMT_Hit(par->getSector(), hitDatas[ihds], detManager);
+    auto myhit = std::make_shared<MMT_Hit>(par->getSector(), hitDatas[ihds], detManager);
     myhit->updateHitProperties(par);
     if (myhit->verifyHit()) {
       m_hitslopes.push_back(myhit->getRZSlope());
       entry.ev_hits.push_back(myhit);
-    } else delete myhit;
+    }
   }
 
-  std::vector<MMT_Road*> temp_roads;
+  std::vector<std::shared_ptr<MMT_Road> > temp_roads;
   for (int i = 0; i < nroad; i++) {
 
-    MMT_Road* myroad = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i);
+    auto myroad = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i);
     temp_roads.push_back(myroad);
 
     int nuv = (this->getUV()) ? this->getUVfactor() : 0;
     for (int uv = 1; uv <= nuv; uv++) {
       if (i-uv < 0) continue;
 
-      MMT_Road* myroad_0 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv, i-uv);
+      auto myroad_0 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv, i-uv);
       temp_roads.push_back(myroad_0);
 
-      MMT_Road* myroad_1 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv, i+uv);
+      auto myroad_1 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv, i+uv);
       temp_roads.push_back(myroad_1);
 
-      MMT_Road* myroad_2 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv-1, i-uv);
+      auto myroad_2 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv-1, i-uv);
       temp_roads.push_back(myroad_2);
 
-      MMT_Road* myroad_3 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv, i+uv-1);
+      auto myroad_3 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv, i+uv-1);
       temp_roads.push_back(myroad_3);
 
-      MMT_Road* myroad_4 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv+1, i+uv);
+      auto myroad_4 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i-uv+1, i+uv);
       temp_roads.push_back(myroad_4);
 
-      MMT_Road* myroad_5 = new MMT_Road(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv, i-uv+1);
+      auto myroad_5 = std::make_shared<MMT_Road>(par->getSector(), detManager, micromegas, this->getXthreshold(), this->getUVthreshold(), i, i+uv, i-uv+1);
       temp_roads.push_back(myroad_5);
     }
   }
@@ -166,14 +160,14 @@ void MMT_Diamond::findDiamonds(const unsigned int iterator, const double &sm_bc,
   m_diamonds[iterator].slopes.clear();
 
   // Comparison with lambda function (easier to implement)
-  std::sort(m_diamonds[iterator].ev_hits.begin(), m_diamonds[iterator].ev_hits.end(), [](MMT_Hit *h1, MMT_Hit *h2){ return h1->getAge() < h2->getAge(); });
+  std::sort(m_diamonds[iterator].ev_hits.begin(), m_diamonds[iterator].ev_hits.end(), [](auto h1, auto h2){ return h1->getAge() < h2->getAge(); });
   bc_start = m_diamonds[iterator].ev_hits.front()->getAge() - bc_wind*2;
   bc_end = m_diamonds[iterator].ev_hits.back()->getAge() + bc_wind*2;
   ATH_MSG_DEBUG("Window Start: " << bc_start << " - Window End: " << bc_end);
 
   for (const auto &road : m_diamonds[iterator].ev_roads) road->reset();
 
-  std::vector<MMT_Hit*> hits_now = {};
+  std::vector<std::shared_ptr<MMT_Hit> > hits_now = {};
   std::vector<int> vmm_same  = {};
   std::vector< std::pair<int, int> > addc_same = {};
   std::vector<int> to_erase = {};
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
index e91416e5237b4805ce51709e36e28b1161bccfb5..04dab1021a548dd1de599f0a647a72a5e44e1f59 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Finder.cxx
@@ -10,40 +10,39 @@ using std::map;
 using std::pair;
 using std::string;
 
-MMT_Finder::MMT_Finder(MMT_Parameters *par, int nUVRoads) :
+MMT_Finder::MMT_Finder(std::shared_ptr<MMT_Parameters> par, int nUVRoads) :
   AthMessaging(Athena::getMessageSvc(), "MMT_Finder") {
 
   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  )  ); //initialization, can use floats
+  m_nRoads = std::ceil(  ( ( par->slope_max - par->slope_min ) / par->h  )  ); //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=par->setup.size();
 
-  ATH_MSG_DEBUG( "MMT_Find::finder entries " << m_nRoads << " " << m_par->slope_max << " " << m_par->slope_min << " " << m_par->h << " " << nplanes );
+  ATH_MSG_DEBUG( "MMT_Finder entries " << m_nRoads << " " << par->slope_max << " " << par->slope_min << " " << par->h << " " << nplanes );
 
   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];
 
-  ATH_MSG_DEBUG("MMT_Find::built finder");
+  ATH_MSG_DEBUG("MMT_Finder built");
 
   return;
 
 }
 
 void MMT_Finder::fillHitBuffer( map< pair<int,int> , finder_entry > & hitBuffer, // Map (road,plane) -> Finder entry
-                                const Hit& hit) const {
+                                const Hit& hit, std::shared_ptr<MMT_Parameters> par) const {
   // This function takes in the Hit object and places it into the hit buffer hitBuffer, putting it in any relevant (road,plane)
 
   //Get initial parameters: tolerance, step size (h), slope of hit
   double tol;
-  double h=m_par->h;
+  double h=par->h;
 
   //Conver hit to slope here
   double slope=hit.info.slope;
@@ -52,10 +51,10 @@ void MMT_Finder::fillHitBuffer( map< pair<int,int> , finder_entry > & hitBuffer,
   //Plane and key info of the hit
   int plane=hit.info.plane;
 
-  string plane_type=m_par->setup.substr(plane,1);
+  string plane_type=par->setup.substr(plane,1);
 
-  if(plane_type=="x") tol=m_par->x_error;
-  else if(plane_type=="u"||plane_type=="v") tol=m_par->uv_error;
+  if(plane_type=="x") tol=par->x_error;
+  else if(plane_type=="u"||plane_type=="v") tol=par->uv_error;
   else {
     ATH_MSG_WARNING("WARNING: unsupported plane option!");
     return;
@@ -65,8 +64,8 @@ void MMT_Finder::fillHitBuffer( map< pair<int,int> , finder_entry > & hitBuffer,
   //---slope road boundaries based on hit_slope +/- tolerance---; if min or max is out of bounds, put it at the limit
   double s_min = slope - tol, s_max = slope + tol;
 
-  int road_min = round( (  (s_min - m_par->slope_min)/h  ) );
-  int road_max = round( (  (s_max - m_par->slope_min)/h  ) );
+  int road_min = std::round( (  (s_min - par->slope_min)/h  ) );
+  int road_max = std::round( (  (s_max - par->slope_min)/h  ) );
 
   if( road_min < 0 ) road_min = 0 ;
   if( road_max >= (m_nRoads/m_nUVRoads) ){ road_max = (m_nRoads/m_nUVRoads) - 1 ; }
@@ -145,11 +144,12 @@ void MMT_Finder::fillHitBuffer( map< pair<int,int> , finder_entry > & hitBuffer,
 void MMT_Finder::checkBufferForHits(vector<bool>& plane_is_hit,
                                     vector<Hit>& track,
                                     int road,
-                                    map<pair<int,int>,finder_entry> hitBuffer
+                                    map<pair<int,int>,finder_entry> hitBuffer,
+                                    std::shared_ptr<MMT_Parameters> par
                                     ) 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=par->setup.size();
 
   pair<int,int> key (road,0);
 
@@ -165,7 +165,7 @@ void MMT_Finder::checkBufferForHits(vector<bool>& plane_is_hit,
   }
 }
 
-int MMT_Finder::Coincidence_Gate(const vector<bool>& plane_hits) const{
+int MMT_Finder::Coincidence_Gate(const vector<bool>& plane_hits, std::shared_ptr<MMT_Parameters> par) const{
 
   // This function should be updated to include the clock and age of the hits...
 
@@ -177,7 +177,7 @@ int MMT_Finder::Coincidence_Gate(const vector<bool>& plane_hits) const{
   //Eg, 4X+4UV > 3+3.   Also,
   int X_count=0,U_count=0,V_count=0,value=0;bool front=false,back=false;
   //search the string
-  vector<int> u_planes=m_par->q_planes("u"), x_planes=m_par->q_planes("x"), v_planes=m_par->q_planes("v");
+  vector<int> u_planes=par->q_planes("u"), x_planes=par->q_planes("x"), v_planes=par->q_planes("v");
   for(unsigned int ip=0;ip<x_planes.size();ip++){
     if(plane_hits[x_planes[ip]]){
       X_count++;
@@ -188,7 +188,7 @@ 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>=par->CT_x,uvpass=UV_count>=par->CT_uv,fbpass=front&&back;
   value = 10*X_count+UV_count;
   if(!xpass||!uvpass){
     value*=-1;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
index d2dd972d7a464b961cbd2e3013838028adc65281..6c7ca95b5e739c421ea7852320ea48f77284f685 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Fitter.cxx
@@ -14,32 +14,31 @@ using std::pair;
 using std::string;
 
 
-MMT_Fitter::MMT_Fitter(MMT_Parameters *par, int nlg, double lgmin, double lgmax):
+MMT_Fitter::MMT_Fitter(int nlg, double lgmin, double lgmax):
   AthMessaging(Athena::getMessageSvc(), "MMT_Fitter"),
   m_number_LG_regions(nlg), m_LG_min(lgmin), m_LG_max(lgmax)
 {
-  ATH_MSG_DEBUG("MMT_F::building fitter");
-  m_par=par;
+  ATH_MSG_DEBUG("MMT_Fitter start building");
   m_last=0;
   m_n_fit=0;
-  ATH_MSG_DEBUG("MMT_F::built fitter");
+  ATH_MSG_DEBUG("MMT_Fitter built");
 }
 
 
-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{
+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, std::shared_ptr<MMT_Parameters> par) const{
   ATH_MSG_DEBUG("Begin fit event!");
   bool did_fit=false;
-  int check=Filter_UV(track);
-  vector<int> xpl=m_par->q_planes("x");
-  vector<int> upl=m_par->q_planes("u");
-  vector<int> vpl=m_par->q_planes("v");
+  int check=Filter_UV(track,par);
+  vector<int> xpl=par->q_planes("x");
+  vector<int> upl=par->q_planes("u");
+  vector<int> vpl=par->q_planes("v");
   //---- Calc global slopes and local X slope -----
-  double M_x_global = Get_Global_Slope(track,"x");
-  double M_u_global = (check>=10?(-999.):Get_Global_Slope(track,"u"));
-  double M_v_global = (check%10==1?(-999.):Get_Global_Slope(track,"v"));
+  double M_x_global = Get_Global_Slope(track,"x",par);
+  double M_u_global = (check>=10?(-999.):Get_Global_Slope(track,"u",par));
+  double M_v_global = (check%10==1?(-999.):Get_Global_Slope(track,"v",par));
   //----  Calc delta theta ----------
   //----- Calc ROI ----------
-  ROI ROI = Get_ROI(M_x_global,M_u_global,M_v_global,track);
+  ROI ROI = Get_ROI(M_x_global,M_u_global,M_v_global,track,par);
   mxmy.push_back(pair<double,double>(ROI.m_x,ROI.m_y));
   mu  = M_u_global;
   mv  = M_v_global;
@@ -47,20 +46,20 @@ evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_
   if(ROI.theta==-999){
     for(unsigned int i=0;i<track.size();i++)  track[i].print();
     ATH_MSG_WARNING("SOMETHING IS OFF!  fit_event, ROI has theta=-999 (bad reconstruction) \n");
-    evFit_entry empty(event,-999,-999,-999,ROI.roi,-999,-999,-999,-999,-999,track_to_index(track));
+    evFit_entry empty(event,-999,-999,-999,ROI.roi,-999,-999,-999,-999,-999,track_to_index(track, par));
     return empty;
     //throw std::runtime_error("MMT_Fitter::fit_event: invalid ROI.theta");
   }
   static_assert(std::is_trivially_copyable<double>::value);
   static_assert(std::is_trivially_destructible<double>::value);
-  double M_x_local   = Get_Local_Slope(track, ROI.theta, ROI.phi);
+  double M_x_local   = Get_Local_Slope(track, ROI.theta, ROI.phi, par);
   double Delta_Theta_division = Get_Delta_Theta_division(M_x_local, M_x_global, 1.);
-  double Delta_Theta = Get_Delta_Theta(M_x_local, M_x_global);
-  double dtheta_idl  = Get_Delta_Theta_division(ideal_local_slope(track), M_x_global);
+  double Delta_Theta = Get_Delta_Theta(M_x_local, M_x_global, par);
+  double dtheta_idl  = Get_Delta_Theta_division(ideal_local_slope(track,par), M_x_global, 1.);
 
   mxl = M_x_local;
 
-  if(dtheta_idl-std::abs(Delta_Theta_division) > 2.e-3) m_par->fill0 = true;
+  if(dtheta_idl-std::abs(Delta_Theta_division) > 2.e-3) par->fill0 = true;
   ATH_MSG_DEBUG("Mxg=" << M_x_global << ", Mug=" << M_u_global << ", Mvg=" << M_v_global << ", Mxl=" << M_x_local << ", dth=" <<Delta_Theta);
   //@@@@@@@@ Begin Info Storage for Later Analysis @@@@@@@@@@@@@@@@@@@@@@@
   vector<bool> planes_hit_tr(8,false), planes_hit_bg(8,false);
@@ -94,17 +93,17 @@ evFit_entry MMT_Fitter::fit_event(int event, vector<Hit>& track, vector<hitData_
   //FINISH ME!!!!!!!
   double 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<par->CT_x),uvfail= (n_uvpl_tr+n_uvpl_bg<par->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);
-  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));
+  ATH_MSG_DEBUG("HIT CODE: " << track_to_index(track, par));
+  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, par));
   if(fitkill) return aemon;
 
-  int nplanes = m_par->setup.size();
+  int nplanes = par->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);
@@ -127,11 +126,11 @@ int MMT_Fitter::find_hitData(const vector<hitData_entry>& hitDatas, const hitDat
 }
 
 
-int MMT_Fitter::Filter_UV(vector<Hit>& track) const{
+int MMT_Fitter::Filter_UV(vector<Hit>& track, std::shared_ptr<MMT_Parameters> par) const{
   return 0;
-  double h=m_par->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);
+  double h=par->h, tolerance = h;//*2;  //Can be optimized...
+  vector<int> u_planes = par->q_planes("u"), v_planes = par->q_planes("v");
+  vector<Hit> u_hits = q_hits("u",track,par), v_hits = q_hits("v",track,par);
   bool pass_u =! u_hits.empty(), pass_v =! v_hits.empty();
 
   //if the difference in slope between the first and last u/v planes is too great don't pass, set track hits to zero
@@ -153,9 +152,9 @@ int MMT_Fitter::Filter_UV(vector<Hit>& track) const{
   return return_val;
 }
 
-double MMT_Fitter::Get_Global_Slope (const vector<Hit>& track, const string& type) const
+double MMT_Fitter::Get_Global_Slope (const vector<Hit>& track, const string& type, std::shared_ptr<MMT_Parameters> par) const
 {
-  vector<Hit> qhits = q_hits(type,track);
+  vector<Hit> qhits = q_hits(type,track,par);
   double sum = 0.;
   if(qhits.size()==0) return -999;
   double nhitdiv= 1./qhits.size();
@@ -166,12 +165,12 @@ double MMT_Fitter::Get_Global_Slope (const vector<Hit>& track, const string& typ
 }
 
 //CHANGE!
-double MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double theta,double phi) const
+double MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double theta,double phi,std::shared_ptr<MMT_Parameters> par) const
 {
-  vector<int> x_planes = m_par->q_planes("x"), ybin_hits(x_planes.size(),-1);
+  vector<int> x_planes = par->q_planes("x"), ybin_hits(x_planes.size(),-1);
   int nxp=x_planes.size();
   for(int ipl=0; ipl<nxp; ipl++){
-    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,x_planes[ipl]));
+    ybin_hits[ipl]=(((Track[x_planes[ipl]].info.slope==-999) || (Track[x_planes[ipl]].info.slope==-4)) ? -1 : par->ybin(Track[x_planes[ipl]].info.y,x_planes[ipl]));
   }
   bool hit=false;
   double yzsum=0;
@@ -181,22 +180,22 @@ double MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double theta,double
   int xdex=-1;
   int ybin=-1;
   int which=-1;
-  m_par->key_to_indices(ybin_hits, xdex, ybin, which);
+  par->key_to_indices(ybin_hits, xdex, ybin, which);
   if(xdex<0 || ybin<0 || which<0) return -999;
 
-  double zbar=m_par->Ak_local_slim[xdex][ybin][which];
-  double bk=m_par->Bk_local_slim[xdex][ybin][which];
+  double zbar=par->Ak_local_slim[xdex][ybin][which];
+  double bk=par->Bk_local_slim[xdex][ybin][which];
   ATH_MSG_DEBUG("zbar is " << zbar << ", and bk is " << bk);
-  int ebin = m_par->eta_bin(theta);
-  int pbin = m_par->phi_bin(phi);
+  int ebin = par->eta_bin(theta);
+  int pbin = par->phi_bin(phi);
   for(int ipl=0; ipl<nxp; ipl++){
     double z = Track[x_planes[ipl]].info.z;
     double y = Track[x_planes[ipl]].info.y;
     double zfirst = Track[x_planes[0]].info.z;
     double yfirst = Track[x_planes[0]].info.y;
     if(ebin != -1){
-      z = z+m_par->zmod[ebin][pbin][ipl];
-      y = y+m_par->ymod[ebin][pbin][ipl];
+      z = z+par->zmod[ebin][pbin][ipl];
+      y = y+par->ymod[ebin][pbin][ipl];
     }
     if(Track[x_planes[ipl]].info.slope == -999 || Track[x_planes[ipl]].info.slope == -4) continue;
     hit=true;
@@ -212,25 +211,25 @@ double MMT_Fitter::Get_Local_Slope (const vector<Hit>& Track,double theta,double
   return mxl;
 }
 
-int MMT_Fitter::track_to_index(const vector<Hit>&track)const{
-  vector<bool>hits(m_par->setup.size(),false);
+int MMT_Fitter::track_to_index(const vector<Hit>&track, std::shared_ptr<MMT_Parameters> par)const{
+  vector<bool>hits(par->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);
+  return par->bool_to_index(hits);
 }
 
-double MMT_Fitter::ideal_local_slope(const vector<Hit>& Track)const{
+double MMT_Fitter::ideal_local_slope(const vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const{
   vector<vector<double> > z_hit;
-  for(unsigned int i = 0; i<m_par->z_large.size(); i++){
+  for(unsigned int i = 0; i<par->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]);
+    for(unsigned int j = 0; j<par->z_large[i].size(); j++) temp.push_back(par->z_large[i][j]);
     z_hit.push_back(temp);
   }
-  vector<int> x_planes=m_par->q_planes("x");
+  vector<int> x_planes=par->q_planes("x");
   int nxp=x_planes.size();
   bool hit=false;
   double sum_xy=0, sum_y=0;
-  double ak_idl = ideal_ak(Track);
-  double bk_idl = ak_idl*ideal_zbar(Track);
+  double ak_idl = ideal_ak(Track, par);
+  double bk_idl = ak_idl*ideal_zbar(Track,par);
   for(int ipl=0; ipl<nxp; ipl++){
     double y = Track[x_planes[ipl]].info.y;
     double z = Track[x_planes[ipl]].info.z;
@@ -244,23 +243,23 @@ double MMT_Fitter::ideal_local_slope(const vector<Hit>& Track)const{
   return ls_idl;
 }
 
-double MMT_Fitter::ideal_z(const Hit& hit)const{
+double MMT_Fitter::ideal_z(const Hit& hit, std::shared_ptr<MMT_Parameters> par)const{
   int plane=hit.info.plane;
-  double tilt = (plane<4 ? m_par->correct.rotate.X() : 0);
-  double dz   = (plane<4 ? m_par->correct.translate.Z() : 0);
-  double nominal = m_par->z_nominal[plane];
-  double y = hit.info.y - m_par->ybases[plane].front();
+  double tilt = (plane<4 ? par->correct.rotate.X() : 0);
+  double dz   = (plane<4 ? par->correct.translate.Z() : 0);
+  double nominal = par->z_nominal[plane];
+  double y = hit.info.y - par->ybases[plane].front();
   double z = nominal+dz+y*std::tan(tilt);
   return z;
 }
 
-double MMT_Fitter::ideal_ak(const vector<Hit>& Track)const{
-  vector<int> x_planes=m_par->q_planes("x");//this tells us which planes are x planes
+double MMT_Fitter::ideal_ak(const vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const{
+  vector<int> x_planes=par->q_planes("x");//this tells us which planes are x planes
   int n_xplanes=x_planes.size(),hits=0;
   double sum_x=0,sum_xx=0;
   for(int ip=0; ip<n_xplanes; ip++){
     if(Track[x_planes[ip]].info.slope==-999) continue;
-    double addme=ideal_z(Track[x_planes[ip]]);//z_hit[x_planes[plane]];
+    double addme=ideal_z(Track[x_planes[ip]],par);//z_hit[x_planes[plane]];
     hits++;//there's a hit
     sum_x  += addme;
     sum_xx += addme*addme;
@@ -270,34 +269,34 @@ double MMT_Fitter::ideal_ak(const vector<Hit>& Track)const{
   return hits/diff;
 }
 
-double MMT_Fitter::ideal_zbar(const vector<Hit>& Track)const{
-  vector<int> x_planes = m_par->q_planes("x");//this tells us which planes are x planes
+double MMT_Fitter::ideal_zbar(const vector<Hit>& Track, std::shared_ptr<MMT_Parameters> par)const{
+  vector<int> x_planes = par->q_planes("x");//this tells us which planes are x planes
   double ztot=0;
   int nhit=0;
   for(unsigned int ip=0; ip<x_planes.size(); ip++) {
     if(Track[x_planes[ip]].info.slope == -999) continue;
     nhit++;
-    ztot += ideal_z(Track[x_planes[ip]]);
+    ztot += ideal_z(Track[x_planes[ip]],par);
   }
   return ztot/nhit;
 }
 
-double MMT_Fitter::Get_Delta_Theta(double M_local, double M_global) const{
+double MMT_Fitter::Get_Delta_Theta(double M_local, double M_global, std::shared_ptr<MMT_Parameters> par) const{
   int region=-1;
   double LG = M_local * M_global;
   for(int j=0;j<m_number_LG_regions;j++){   //m_number_LG_regions
-    if(LG <= DT_Factors_val(j,0)){
+    if(LG <= DT_Factors_val(j,0,par)){
       region = j;
       break;
     }
   }
   if(region==-1) return -999;
-  return DT_Factors_val(region,1)*(M_local - M_global);
+  return DT_Factors_val(region,1,par)*(M_local - M_global);
 }
 
-double MMT_Fitter::DT_Factors_val(int i, int j) const{
-  if(m_par->val_tbl){
-    return m_par->DT_Factors[i][j];
+double MMT_Fitter::DT_Factors_val(int i, int j, std::shared_ptr<MMT_Parameters> par) const{
+  if(par->val_tbl){
+    return par->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 );
@@ -329,13 +328,13 @@ double MMT_Fitter::Get_Delta_Theta_division(double M_local, double M_global, dou
   return double( (M_local - M_global) / ( (M_local*M_global) / a  +  a  ));
 }
 
-vector<Hit> MMT_Fitter::q_hits(const string& type,const vector<Hit>& track) const{
-  string setup(m_par->setup);
+vector<Hit> MMT_Fitter::q_hits(const string& type,const vector<Hit>& track, std::shared_ptr<MMT_Parameters> par) const{
+  string setup(par->setup);
   if(setup.length()!=track.size()){
     ATH_MSG_WARNING("Setup has length: "<<setup.length()<<", but there are "<<track.size()<<" hits in the track");
     throw std::runtime_error("MMT_Fitter::q_hits: inconsistent setup");
   }
-  vector<int> qpl(m_par->q_planes(type));
+  vector<int> qpl(par->q_planes(type));
   vector<Hit> q_hits;
   for(unsigned int ihit=0; ihit<qpl.size(); ihit++){
     if( !(track[qpl[ihit]].info.slope==-999) )  {q_hits.push_back(track[qpl[ihit]]);
@@ -345,12 +344,12 @@ 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(double M_x, double M_u, double M_v, const vector<Hit>&track) const{
+ROI MMT_Fitter::Get_ROI(double M_x, double M_u, double M_v, const vector<Hit>&track, std::shared_ptr<MMT_Parameters> par) const{
   //M_* are all global slopes
   ATH_MSG_DEBUG("\nGet_ROI(" << M_x << "," << M_u << "," << M_v << ") ");
 
   //--- calc constants ------
-  double b=TMath::DegToRad()*(m_par->stereo_degree);
+  double b=TMath::DegToRad()*(par->stereo_degree);
   double A=1./std::tan(b);
   double B=1./std::tan(b);
 
@@ -375,49 +374,49 @@ ROI MMT_Fitter::Get_ROI(double M_x, double M_u, double M_v, const vector<Hit>&tr
   //--- 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
   double mx = (nu+nv==0 ? 0 : (mxv+mxu)/(nu+nv));
-  if(m_par->correct.translate.X()!=0 && m_par->correct.type==2){
-    mx += phi_correct_factor(track)*m_par->correct.translate.X()/m_par->z_nominal[3];
+  if(par->correct.translate.X()!=0 && par->correct.type==2){
+    mx += phi_correct_factor(track,par)*par->correct.translate.X()/par->z_nominal[3];
   }
   ATH_MSG_DEBUG("(b,A,B,my,mxu,mxv,mx)=(" << b << "," << A << "," << B << "," << my << "," << mxu << "," << mxv << "," << mx << ")\n");
 
   //Get mx and my in parameterized values
-  int a_x = round((mx-m_par->m_x_min)/m_par->h_mx);
-  int a_y = round((my-m_par->m_y_min)/m_par->h_my);
+  int a_x = std::round((mx-par->m_x_min)/par->h_mx);
+  int a_y = std::round((my-par->m_y_min)/par->h_my);
   // 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){
-    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->n_x << "," << m_par->n_y << ")");
+  if(a_y>par->n_y || a_y<0){
+    ATH_MSG_DEBUG( "y slope (theta) out of bounds in Get_ROI....(a_x,a_y,par->n_x,par->n_y)=("<< a_x << "," << a_y << "," << par->n_x << "," << par->n_y << ")");
     return ROI(-999,-999,-999,-999,-999);
   }
 
-  if(a_x>m_par->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->n_x << "," <<m_par->n_y << ")");
+  if(a_x>par->n_x || a_x<0){
+    ATH_MSG_DEBUG( "x slope (phi) out of bounds in Get_ROI....(a_x,a_y,par->n_x,par->n_y)=(" << a_x << "," << a_y << "," << par->n_x << "," <<par->n_y << ")");
     return ROI(-999,-999,-999,-999,-999);
   }
 
   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=-0.2*m_par->correct.rotate.Z();
+  if(par->correct.rotate.Z()!=0 && par->correct.type==2){
+    phicor=-0.2*par->correct.rotate.Z();
   }
 
-  double fv_theta = Slope_Components_ROI_theta(a_y,a_x);
-  double fv_phi = (mx==0) ? -999 : Slope_Components_ROI_phi(a_y,a_x)+phicor;
+  double fv_theta = Slope_Components_ROI_theta(a_y,a_x,par);
+  double fv_phi = (mx==0) ? -999 : Slope_Components_ROI_phi(a_y,a_x,par)+phicor;
   ATH_MSG_DEBUG("fv_theta=" << fv_theta << ", fv_phi=" << fv_phi);
 
   //--- More hardware realistic approach but need fine tuning ----
-  int roi = Rough_ROI_temp(fv_theta,fv_phi);
+  int roi = Rough_ROI_temp(fv_theta,fv_phi,par);
 
   //--- current "roi" which is not an actual roi but an approx phi and theta
   return ROI(fv_theta,fv_phi,mx,my,roi);
 }
 
-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.;
+double MMT_Fitter::phi_correct_factor(const vector<Hit>&track, std::shared_ptr<MMT_Parameters> par)const{
+  if((par->correct.rotate.Z()==0 && par->correct.translate.X()==0) || par->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=par->setup;
   for(int ihit=0;ihit<(int)track.size();ihit++){
     int n_pln=track[ihit].info.plane;
     bool ismis=n_pln<4;
@@ -440,74 +439,74 @@ double MMT_Fitter::phi_correct_factor(const vector<Hit>&track)const{
   return xpart*1.*nxmis/nx+upart*1.*numis/nu+vpart*1.*nvmis/nv;
 }
 
-double 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];
+double MMT_Fitter::Slope_Components_ROI_val(int jy, int ix, int thetaphi, std::shared_ptr<MMT_Parameters> par) const{
+  if(par->val_tbl){
+    return par->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);
     throw std::runtime_error("MMT_Fitter::Slope_Components_ROI_val: invalid number of entries");
   }
-  if(thetaphi==0) return Slope_Components_ROI_theta(jy,ix);
-  return Slope_Components_ROI_phi(jy,ix);
+  if(thetaphi==0) return Slope_Components_ROI_theta(jy,ix,par);
+  return Slope_Components_ROI_phi(jy,ix,par);
 }
 
-double MMT_Fitter::Slope_Components_ROI_theta(int jy, int ix) const{
+double MMT_Fitter::Slope_Components_ROI_theta(int jy, int ix, std::shared_ptr<MMT_Parameters> par) 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>=par->n_y){
+    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_theta; there are only " << par->n_y << " of these.\n");
+    if(jy >= par->n_y) jy=par->n_y-1;
     else jy=0;
   }
-  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>=par->n_x){
+    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_theta; there are only " << par->n_x << " of these.\n");
+    if(ix >= par->n_x) ix=par->n_x-1;
     else ix=0;
   }
   int xdex=ix, ydex=jy+1;
   if(xdex==0) xdex++;
-  double mx = m_par->m_x_min+m_par->h_mx*xdex;
-  double my = m_par->m_y_min+m_par->h_my*ydex;
+  double mx = par->m_x_min+par->h_mx*xdex;
+  double my = par->m_y_min+par->h_my*ydex;
   double theta = std::atan(sqrt( (mx*mx+my*my) ));
-  if(theta<m_par->minimum_large_theta || theta>m_par->maximum_large_theta){
+  if(theta<par->minimum_large_theta || theta>par->maximum_large_theta){
     theta=0;
   }
   return theta;
 }
 
-double 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;
+double MMT_Fitter::Slope_Components_ROI_phi(int jy, int ix, std::shared_ptr<MMT_Parameters> par) const{
+  if(jy<0 || jy>=par->n_y){
+    ATH_MSG_WARNING("You picked a y slope road index of " << jy << " in Slope_Components_ROI_phi; there are only " << par->n_y << " of these.\n");
+    if(jy >= par->n_y) jy=par->n_y-1;
     else jy=0;
   }
-  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>=par->n_x){
+    ATH_MSG_WARNING("You picked an x slope road index of " << ix << " in Slope_Components_ROI_phi; there are only " << par->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 >= par->n_x) ix=par->n_x-1;
     else ix=0;
   }
   int xdex=ix, ydex=jy+1;
-  double mx=m_par->m_x_min+m_par->h_mx*xdex;
-  double my=m_par->m_y_min+m_par->h_my*ydex;
-  ATH_MSG_DEBUG("m_par->m_x_min+m_par->h_mx*xdex=" << m_par->m_x_min << "+" << m_par->h_mx << "*" << xdex << "=" << mx << ", ");
-  ATH_MSG_DEBUG("m_par->m_y_min+m_par->h_my*ydex=" << m_par->m_y_min << "+" << m_par->h_my << "*" << ydex << "=" << my << ", ");
+  double mx=par->m_x_min+par->h_mx*xdex;
+  double my=par->m_y_min+par->h_my*ydex;
+  ATH_MSG_DEBUG("par->m_x_min+par->h_mx*xdex=" << par->m_x_min << "+" << par->h_mx << "*" << xdex << "=" << mx << ", ");
+  ATH_MSG_DEBUG("par->m_y_min+par->h_my*ydex=" << par->m_y_min << "+" << par->h_my << "*" << ydex << "=" << my << ", ");
 
   double phi = std::atan2(mx,my);//the definition is flipped from what you'd normally think
   ATH_MSG_DEBUG("for a phi of " << phi);
-  if(phi < m_par->minimum_large_phi || phi > m_par->maximum_large_phi){
-    ATH_MSG_DEBUG("Chucking phi of " << phi <<" which registers as not in [" << m_par->minimum_large_phi << "," << m_par->maximum_large_phi << "]");
+  if(phi < par->minimum_large_phi || phi > par->maximum_large_phi){
+    ATH_MSG_DEBUG("Chucking phi of " << phi <<" which registers as not in [" << par->minimum_large_phi << "," << par->maximum_large_phi << "]");
     phi=999;
   }
   return phi;
 }
 
-int MMT_Fitter::Rough_ROI_temp(double theta, double phi) const{
+int MMT_Fitter::Rough_ROI_temp(double theta, double phi, std::shared_ptr<MMT_Parameters> par) const{
   //temporary function to identify areas of the wedge.
-  double minimum_large_theta = m_par->minimum_large_theta;
-  double maximum_large_theta = m_par->maximum_large_theta;
-  double minimum_large_phi = m_par->minimum_large_phi;
-  double maximum_large_phi = m_par->maximum_large_phi;
+  double minimum_large_theta = par->minimum_large_theta;
+  double maximum_large_theta = par->maximum_large_theta;
+  double minimum_large_phi = par->minimum_large_phi;
+  double maximum_large_phi = par->maximum_large_phi;
   int n_theta_rois=32, n_phi_rois=16;//*** ASK BLC WHAT THESE VALUES OUGHT TO BE!
 
   double h_theta = (maximum_large_theta - minimum_large_theta)/n_theta_rois;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Hit.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Hit.cxx
index 0ed24ee33d8650cef66d6eefb5512ea416152159..3203438e0c3bfe21f1de694629404201aaf47c30 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Hit.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Hit.cxx
@@ -58,7 +58,7 @@ MMT_Hit::MMT_Hit(const MMT_Hit &hit) : AthMessaging(Athena::getMessageSvc(), "MM
   m_RZslope = hit.m_RZslope;
   m_YZslope = hit.m_YZslope;
   m_isNoise = hit.m_isNoise;
-  m_detManager = NULL;
+  m_detManager = nullptr;
 }
 
 MMT_Hit& MMT_Hit::operator=(const MMT_Hit& hit) {
@@ -84,7 +84,7 @@ MMT_Hit& MMT_Hit::operator=(const MMT_Hit& hit) {
   m_RZslope = hit.m_RZslope;
   m_YZslope = hit.m_YZslope;
   m_isNoise = hit.m_isNoise;
-  m_detManager = NULL;
+  m_detManager = nullptr;
 
   return *this;
 }
@@ -130,7 +130,7 @@ void MMT_Hit::setHitProperties(const Hit &hit) {
   m_Z = hit.info.z;
 }
 
-void MMT_Hit::updateHitProperties(const MMT_Parameters *par) {
+void MMT_Hit::updateHitProperties(std::shared_ptr<MMT_Parameters> par) {
   Identifier strip_id = this->getDetManager()->mmIdHelper()->channelID(this->getStationName(), this->getStationEta(), this->getStationPhi(), this->getMultiplet(), this->getGasGap(), this->getChannel());
   const MuonGM::MMReadoutElement* readout = this->getDetManager()->getMMReadoutElement(strip_id);
   Amg::Vector3D globalPos(0.0, 0.0, 0.0);
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Road.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Road.cxx
index a89be54c507823150b40acb2e9e67a3dc044124a..bfc70b4f1a3a1a578b85ff0b3682b93c0a834e2b 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Road.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_Road.cxx
@@ -27,7 +27,7 @@ MMT_Road::~MMT_Road() {
   this->reset();
 }
 
-void MMT_Road::addHits(std::vector<MMT_Hit*> &hits) {
+void MMT_Road::addHits(std::vector<std::shared_ptr<MMT_Hit> > &hits) {
   for (auto hit_i : hits) {
     int bo = hit_i->getPlane();
     bool has_hit = false;
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
index 3a3578b397f005e0aadff6df31b8550c488c9ad0..31021f7accbd2742bd28f3f3b304978d1246a61d 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMT_struct.cxx
@@ -333,7 +333,7 @@ MMT_Parameters::MMT_Parameters(par_par inputParams, char wedgeSize, const MuonGM
                  "\t\t\t\t dlStereoTop/Bottom: " << roParam_top_mult1.dlStereoTop << " " << roParam_top_mult1.dlStereoBottom << "\n" <<
                  "\t\t\t\t Active area --> (Top, Bottom, Height) : (" << roParam_top_mult1.activeTopLength << ", " << roParam_top_mult1.activeBottomLength << ", " << roParam_top_mult1.activeH << ")");
   } else if (sector == 'S') {
-    ATH_MSG_INFO("SM2 " <<
+    ATH_MSG_INFO("SM2 \n" <<
                  "\t\t\t\t KO strips TopEta: " << roParam_top_mult1.nMissedTopEta << " - BottomEta: " << roParam_top_mult1.nMissedBottomEta << "\n" <<
                  "\t\t\t\t KO strips TopStereo: " << roParam_top_mult1.nMissedTopStereo << " - BottomStereo: " << roParam_top_mult1.nMissedBottomStereo << "\n" <<
                  "\t\t\t\t (Top, Bottom, Length): (" << mm_top_mult1->lWidth() << ", " << mm_top_mult1->sWidth() << ", " << mm_top_mult1->Length() << ")\n" <<
@@ -1084,7 +1084,7 @@ void hitData_key::print()const{
 }
 
 
-hitData_info::hitData_info(int pl,int station_eta,int strip,MMT_Parameters *par,const ROOT::Math::XYZVector &tru,double tpos,double ppos):plane(pl){
+hitData_info::hitData_info(int pl,int station_eta,int strip,std::shared_ptr<MMT_Parameters> par,const ROOT::Math::XYZVector &tru,double tpos,double ppos):plane(pl){
   (void) tru;
   //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 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)
@@ -1120,7 +1120,7 @@ hitData_info::hitData_info(int pl,int station_eta,int strip,MMT_Parameters *par,
   slope =  (zflt!=0.) ? yflt / zflt : 0.;
 }
 
-double hitData_info::mis_dy(int plane,MMT_Parameters *par,double tpos,double ppos)const{
+double hitData_info::mis_dy(int plane,std::shared_ptr<MMT_Parameters> par,double tpos,double ppos)const{
   if(par->misal.type!=1 || plane>3) return 0.;
   double zplane=par->z_nominal[plane];
   double base=par->ybases[plane].front();
@@ -1208,14 +1208,14 @@ hitData_entry::hitData_entry(int ev, double gt, double q, int vmm, int mmfe, int
   event(ev),gtime(gt),charge(q),VMM_chip(vmm),MMFE_VMM(mmfe),plane(pl),strip(st),station_eta(est),station_phi(phi),multiplet(mult),gasgap(gg),localX(locX),tru_theta_ip(tr_the),tru_phi_ip(tru_phi),truth_nbg(q_tbg),BC_time(bct),time(t),truth(tru),recon(rec),fit_theta(fit_the),fit_phi(fit_ph),fit_dtheta(fit_dth),tru_dtheta(tru_dth),
   /*tru_theta_local(tru_thl),tru_theta_global(tru_thg),*/M_x_global(mxg),M_u_global(mug),M_v_global(mvg),M_x_local(mxl),mx(the_mx),my(the_my),roi(the_roi) {}
 
-Hit hitData_entry::entry_hit(MMT_Parameters *par)const{
+Hit hitData_entry::entry_hit(std::shared_ptr<MMT_Parameters> par)const{
   return Hit(entry_key(),entry_info(par));
 }
 hitData_key hitData_entry::entry_key() const{
   return hitData_key(BC_time,time,gtime,VMM_chip,event);
 }
 
-hitData_info hitData_entry::entry_info(MMT_Parameters *par)const{
+hitData_info hitData_entry::entry_info(std::shared_ptr<MMT_Parameters> par)const{
   hitData_info spade(plane,station_eta,strip,par,recon,tru_theta_ip,tru_phi_ip);//truth or recon? doesn't matter too much--it's for misalignment
   return spade;
 }
diff --git a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
index c19b9565be82f701a3db38d8f3c06f6edcc7f945..76966ab1a8cc1d350c94c39aac37b7a35b509bf0 100644
--- a/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
+++ b/Trigger/TrigT1/TrigT1NSWSimTools/src/MMTriggerTool.cxx
@@ -45,8 +45,6 @@ namespace NSWL1 {
     declareInterface<NSWL1::IMMTriggerTool>(this);
     declareProperty("MM_DigitContainerName", m_MmDigitContainer = "MM_DIGITS", "the name of the MM digit container");
     declareProperty("DoNtuple", m_doNtuple = true, "input the MMStripTds branches into the analysis ntuple");
-
-    diamond = nullptr;
   }
 
   MMTriggerTool::~MMTriggerTool() {
@@ -107,29 +105,12 @@ namespace NSWL1 {
     }
 
     //Calculate and retrieve wedge geometry, defined in MMT_struct
+    const par_par standard = par_par(0.0009,4,4,0.0035,"xxuvxxuv",true);
+    const par_par xxuvuvxx = par_par(0.0009,4,4,0.007,"xxuvuvxx",true,true); //.0035 for uv_tol before...
+    const par_par xxuvuvxx_uvroads = par_par(0.0009,4,4,0.0035,"xxuvuvxx",true,true); //.0035 for uv_tol before...
 
-    const par_par standard=par_par(0.0009,4,4,0.0035,"xxuvxxuv",true);
-    const par_par xxuvuvxx=par_par(0.0009,4,4,0.007,"xxuvuvxx",true,true); //.0035 for uv_tol before...
-    const par_par xxuvuvxx_uvroads=par_par(0.0009,4,4,0.0035,"xxuvuvxx",true,true); //.0035 for uv_tol before...
-
-    // par_par pars=dlm;
-    m_par_large = new MMT_Parameters(xxuvuvxx,'L', m_detManager); // Need to figure out where to delete this!! It's needed once per run
-    m_par_small = new MMT_Parameters(xxuvuvxx,'S', m_detManager); // Need to figure out where to delete this!! It's needed once per run
-
-    return StatusCode::SUCCESS;
-  }
-
-  StatusCode MMTriggerTool::initDiamondAlgorithm() {
-    diamond = new MMT_Diamond(m_detManager);
-    diamond->setTrapezoidalShape(true);
-    diamond->setXthreshold(2);
-    diamond->setUV(true);
-    diamond->setUVthreshold(2);
-    diamond->setRoadSize(8);
-    diamond->setRoadSizeUpX(4);
-    diamond->setRoadSizeDownX(0);
-    diamond->setRoadSizeUpUV(4);
-    diamond->setRoadSizeDownUV(0);
+    m_par_large = std::make_shared<MMT_Parameters>(xxuvuvxx,'L', m_detManager);
+    m_par_small = std::make_shared<MMT_Parameters>(xxuvuvxx,'S', m_detManager);
 
     return StatusCode::SUCCESS;
   }
@@ -150,22 +131,37 @@ namespace NSWL1 {
     const MmDigitContainer *nsw_MmDigitContainer = nullptr;
     ATH_CHECK( evtStore()->retrieve(nsw_MmDigitContainer,"MM_DIGITS") );
 
-    std::map<std::string, MMT_Parameters*> pars;
+    std::map<std::string, std::shared_ptr<MMT_Parameters> > pars;
     pars["MML"] = m_par_large;
     pars["MMS"] = m_par_small;
-    MMLoadVariables load = MMLoadVariables(&(*(evtStore())), m_detManager, m_MmIdHelper, pars);
+    MMLoadVariables load = MMLoadVariables(&(*(evtStore())), m_detManager, m_MmIdHelper);
 
     std::map<std::pair<int, unsigned int>,std::vector<digitWrapper> > entries;
-    std::map<std::pair<int, unsigned int>,map<hitData_key,hitData_entry> > Hits_Data_Set_Time;
+    std::map<std::pair<int, unsigned int>,std::map<hitData_key,hitData_entry> > Hits_Data_Set_Time;
     std::map<std::pair<int, unsigned int>,evInf_entry> Event_Info;
-    ATH_CHECK( load.getMMDigitsInfo(entries, Hits_Data_Set_Time, Event_Info) );
+    ATH_CHECK( load.getMMDigitsInfo(entries, Hits_Data_Set_Time, Event_Info, pars) );
     this->fillNtuple(load);
 
     unsigned int particles = entries.rbegin()->first.second +1, nskip=0;
 
     if (entries.empty()) {
-      ATH_MSG_ERROR("No entries available, something is going wrong");
-      return StatusCode::FAILURE;
+      ATH_MSG_WARNING("No digits available for processing, exiting");
+      Hits_Data_Set_Time.clear();
+      Event_Info.clear();
+      return StatusCode::SUCCESS;
+    }
+
+    auto diamond = std::unique_ptr<MMT_Diamond>(new MMT_Diamond(m_detManager));
+    if (do_MMDiamonds) {
+      diamond->setTrapezoidalShape(true);
+      diamond->setXthreshold(2);
+      diamond->setUV(true);
+      diamond->setUVthreshold(2);
+      diamond->setRoadSize(8);
+      diamond->setRoadSizeUpX(4);
+      diamond->setRoadSizeDownX(0);
+      diamond->setRoadSizeUpUV(4);
+      diamond->setRoadSizeDownUV(0);
     }
 
     for (unsigned int i=0; i<particles; i++) {
@@ -183,10 +179,10 @@ namespace NSWL1 {
           m_trigger_truePtRange->push_back(trupt);
 
           tpos=truth_info.theta_pos;
-          m_trigger_trueThe->push_back(truth_info.theta_ip);
+          m_trigger_trueThe->push_back(truth_info.theta_ent);
 
           ppos=truth_info.phi_pos;
-          m_trigger_truePhi->push_back(truth_info.phi_ip);
+          m_trigger_truePhi->push_back(ppos);
 
           dt=truth_info.dtheta;
           m_trigger_trueDth->push_back(dt);
@@ -208,7 +204,7 @@ namespace NSWL1 {
       if (reco_it != Hits_Data_Set_Time.end()) {
         if (!reco_it->second.empty()) {
           std::vector<hitData_entry> hitDatas;
-          for (auto hit_it = reco_it->second.begin(); hit_it != reco_it->second.end(); hit_it++) hitDatas.push_back(hit_it->second);
+          for (const auto &hit_it : reco_it->second) hitDatas.push_back(hit_it.second);
           if (do_MMDiamonds) {
             /*
              * Filling hits for each event: a new class, MMT_Hit, is called in
@@ -221,10 +217,10 @@ namespace NSWL1 {
               else if (hitDatas[ihds].BC_time < smallest_bc) smallest_bc = hitDatas[ihds].BC_time;
 
               // The PrintHits function below gives identical results to the following one: hitDatas[ihds].print();
-	      m_trigger_VMM->push_back(hitDatas[ihds].VMM_chip);
-	      m_trigger_plane->push_back(hitDatas[ihds].plane);
-	      m_trigger_station->push_back(hitDatas[ihds].station_eta);
-	      m_trigger_strip->push_back(hitDatas[ihds].strip);
+              m_trigger_VMM->push_back(hitDatas[ihds].VMM_chip);
+              m_trigger_plane->push_back(hitDatas[ihds].plane);
+              m_trigger_station->push_back(hitDatas[ihds].station_eta);
+              m_trigger_strip->push_back(hitDatas[ihds].strip);
             }
             diamond->printHits(i-nskip);
             std::vector<double> slopes = diamond->getHitSlopes();
@@ -236,7 +232,34 @@ namespace NSWL1 {
              */
             if (diamond->getHitVector(i-nskip).size() >= (diamond->getXthreshold()+diamond->getUVthreshold())) {
               diamond->findDiamonds(i-nskip, smallest_bc, event);
-              storeEventProperties(i-nskip);
+
+              if (!diamond->getSlopeVector(i-nskip).empty()) {
+                m_trigger_diamond_ntrig->push_back(diamond->getSlopeVector(i-nskip).size());
+                for (const auto &slope : diamond->getSlopeVector(i-nskip)) {
+                  m_trigger_diamond_stationPhi->push_back(diamond->getDiamond(i-nskip).phi);
+                  m_trigger_diamond_sector->push_back(diamond->getDiamond(i-nskip).sector);
+                  m_trigger_diamond_bc->push_back(slope.BC);
+                  m_trigger_diamond_totalCount->push_back(slope.totalCount);
+                  m_trigger_diamond_realCount->push_back(slope.realCount);
+                  m_trigger_diamond_XbkgCount->push_back(slope.xbkg);
+                  m_trigger_diamond_UVbkgCount->push_back(slope.uvbkg);
+                  m_trigger_diamond_XmuonCount->push_back(slope.xmuon);
+                  m_trigger_diamond_UVmuonCount->push_back(slope.uvmuon);
+                  m_trigger_diamond_iX->push_back(slope.iRoad);
+                  m_trigger_diamond_iU->push_back(slope.iRoadu);
+                  m_trigger_diamond_iV->push_back(slope.iRoadv);
+                  m_trigger_diamond_age->push_back(slope.age);
+                  m_trigger_diamond_Xavg->push_back(slope.xavg);
+                  m_trigger_diamond_Uavg->push_back(slope.uavg);
+                  m_trigger_diamond_Vavg->push_back(slope.vavg);
+                  m_trigger_diamond_mxl->push_back(slope.mxl);
+                  m_trigger_diamond_theta->push_back(slope.theta);
+                  m_trigger_diamond_eta->push_back(slope.eta);
+                  m_trigger_diamond_dtheta->push_back(slope.dtheta);
+                  m_trigger_diamond_phi->push_back(slope.phi);
+                  m_trigger_diamond_phiShf->push_back(slope.phiShf);
+                }
+              } else ATH_MSG_WARNING("No output slopes to store");
             }
           } else {
             //////////////////////////////////////////////////////////////
@@ -246,18 +269,18 @@ namespace NSWL1 {
             //////////////////////////////////////////////////////////////
 
             //Initialization of the finder: defines all the roads
-	    MMT_Finder find = MMT_Finder(pars[station], 1);
-	    ATH_MSG_DEBUG(  "Number of Roads Configured " <<  find.get_roads()  );
+            auto find = std::unique_ptr<MMT_Finder>(new MMT_Finder(pars[station], 1));
+            ATH_MSG_DEBUG(  "Number of Roads Configured " <<  find->get_roads()  );
 
             std::map<pair<int,int>,finder_entry> hitBuffer;
-            for (auto hit_it = reco_it->second.begin(); hit_it != reco_it->second.end(); hit_it++) {
-              find.fillHitBuffer( hitBuffer, hit_it->second.entry_hit(pars[station]) ); // Hit object, Map (road,plane) -> Finder entry
+            for (const auto &hit_it : reco_it->second) {
+              find->fillHitBuffer( hitBuffer, hit_it.second.entry_hit(pars[station]), pars[station] ); // Hit object, Map (road,plane) -> Finder entry
   
-              hitData_info hitInfo = hit_it->second.entry_hit(pars[station]).info;
-              m_trigger_VMM->push_back(hit_it->second.VMM_chip);
-              m_trigger_plane->push_back(hit_it->second.plane);
-              m_trigger_station->push_back(hit_it->second.station_eta);
-              m_trigger_strip->push_back(hit_it->second.strip);
+              hitData_info hitInfo = hit_it.second.entry_hit(pars[station]).info;
+              m_trigger_VMM->push_back(hit_it.second.VMM_chip);
+              m_trigger_plane->push_back(hit_it.second.plane);
+              m_trigger_station->push_back(hit_it.second.station_eta);
+              m_trigger_strip->push_back(hit_it.second.strip);
               m_trigger_slope->push_back(hitInfo.slope);
             }
             if (reco_it->second.size() > 7) {
@@ -273,18 +296,18 @@ namespace NSWL1 {
               }
             }
 
-            //////////////////////////////////////////////////////////////
-            //                                                          //
-            //                 Fitter Applied Here                      //
-            //                                                          //
-            //////////////////////////////////////////////////////////////
+            ////////////////////////////////////////////////////////////////
+            ////                                                          //
+            ////                 Fitter Applied Here                      //
+            ////                                                          //
+            ////////////////////////////////////////////////////////////////
 
-            MMT_Fitter fit = MMT_Fitter(pars[station]);
+            auto fit = std::unique_ptr<MMT_Fitter>(new MMT_Fitter());
 
             //First loop over the roads and planes and apply the fitter
             int fits_occupied = 0;
             const int nfit_max = 1;  //MOVE THIS EVENTUALLY
-            int nRoads = find.get_roads();
+            int nRoads = find->get_roads();
 
             vector<evFit_entry> road_fits = vector<evFit_entry>(nRoads,evFit_entry());
 
@@ -300,23 +323,24 @@ namespace NSWL1 {
               vector<Hit> track;
 
               //Check if there are hits in the buffer
-              find.checkBufferForHits(  plane_is_hit, // Empty, To be filled by function.
-                                        track,        // Empty, To be filled by function.
-                                        iRoad,        // roadID
-                                        hitBuffer     // All hits. Map ( (road,plane) -> finder_entry  )
+              find->checkBufferForHits(  plane_is_hit, // Empty, To be filled by function.
+                                         track,        // Empty, To be filled by function.
+                                         iRoad,        // roadID
+                                         hitBuffer,    // All hits. Map ( (road,plane) -> finder_entry  )
+                                         pars[station] // Pointer to geometrical info class
                                       );
 
               //Look for coincidences
-              int road_num = find.Coincidence_Gate(plane_is_hit);
+              int road_num = find->Coincidence_Gate(plane_is_hit, pars[station]);
               if (road_num > 0) {
                 if (fits_occupied >= nfit_max) break;
 
                 //Perform the fit -> calculate local, global X, UV slopes -> calculate ROI and TriggerTool signal (theta, phi, deltaTheta)
-                evFit_entry candidate = fit.fit_event(event,track,hitDatas,fits_occupied,mxmy,mxl,mvGlobal,muGlobal);
+                evFit_entry candidate = fit->fit_event(event,track,hitDatas,fits_occupied,mxmy,mxl,mvGlobal,muGlobal,pars[station]);
 
                 ATH_MSG_DEBUG( "THETA " << candidate.fit_theta << " PHI " << candidate.fit_phi << " DTH " << candidate.fit_dtheta );
                 road_fits[iRoad] = candidate;
-                fillmxl = mxl; 
+                fillmxl = mxl;
                 fits_occupied++;
               }
               road_fits[iRoad].hcode = road_num;
@@ -400,48 +424,4 @@ namespace NSWL1 {
 
     return StatusCode::SUCCESS;
   }
-
-  void MMTriggerTool::storeEventProperties(const unsigned int iterator) {
-    if (diamond->getDiamond(iterator).wedgeCounter == iterator) {
-      if (diamond->getSlopeVector(iterator).empty()) return;
-      m_trigger_diamond_ntrig->push_back(diamond->getSlopeVector(iterator).size());
-
-      for (const auto &slope : diamond->getSlopeVector(iterator)) {
-        m_trigger_diamond_stationPhi->push_back(diamond->getDiamond(iterator).phi);
-        m_trigger_diamond_sector->push_back(diamond->getDiamond(iterator).sector);
-        m_trigger_diamond_bc->push_back(slope.BC);
-        m_trigger_diamond_totalCount->push_back(slope.totalCount);
-        m_trigger_diamond_realCount->push_back(slope.realCount);
-        m_trigger_diamond_XbkgCount->push_back(slope.xbkg);
-        m_trigger_diamond_UVbkgCount->push_back(slope.uvbkg);
-        m_trigger_diamond_XmuonCount->push_back(slope.xmuon);
-        m_trigger_diamond_UVmuonCount->push_back(slope.uvmuon);
-        m_trigger_diamond_iX->push_back(slope.iRoad);
-        m_trigger_diamond_iU->push_back(slope.iRoadu);
-        m_trigger_diamond_iV->push_back(slope.iRoadv);
-        m_trigger_diamond_age->push_back(slope.age);
-        m_trigger_diamond_Xavg->push_back(slope.xavg);
-        m_trigger_diamond_Uavg->push_back(slope.uavg);
-        m_trigger_diamond_Vavg->push_back(slope.vavg);
-        m_trigger_diamond_mxl->push_back(slope.mxl);
-        m_trigger_diamond_theta->push_back(slope.theta);
-        m_trigger_diamond_eta->push_back(slope.eta);
-        m_trigger_diamond_dtheta->push_back(slope.dtheta);
-        m_trigger_diamond_phi->push_back(slope.phi);
-        m_trigger_diamond_phiShf->push_back(slope.phiShf);
-      }
-    }
-    else ATH_MSG_FATAL( "Iterators don't match! Cannot retrieve corresponding variables" );
-  }
-
-  StatusCode MMTriggerTool::finalizeDiamondAlgorithm(const bool do_MMDiamonds) {
-   /*
-    * Place here all the cleaning stuff: pointer deletion etc...
-    */
-    if(do_MMDiamonds) delete diamond;
-    delete m_par_large;
-    delete m_par_small;
-
-    return StatusCode::SUCCESS;
-  }
 }//end namespace