diff --git a/ForwardDetectors/AFP/Run3AFPMonitoring/Run3AFPMonitoring/AFPSiLayerAlgorithm.h b/ForwardDetectors/AFP/Run3AFPMonitoring/Run3AFPMonitoring/AFPSiLayerAlgorithm.h
index a880b0a101e74fa4d8bde24322add17d6462feaa..b245a2f57dd3a49686b599de0039a93f54e7ac52 100644
--- a/ForwardDetectors/AFP/Run3AFPMonitoring/Run3AFPMonitoring/AFPSiLayerAlgorithm.h
+++ b/ForwardDetectors/AFP/Run3AFPMonitoring/Run3AFPMonitoring/AFPSiLayerAlgorithm.h
@@ -25,10 +25,16 @@ private:
     std::vector<std::vector<int>> m_abGroups2;
     std::map<std::string,int> m_cGroups1;
     //std::map<std::string,std::map<std::string,std::map<std::string,int>>> m_HitmapGroups;
-    std::map<std::string,<std::map<std::string,int>> m_HitmapGroups;
+    std::map<std::string,std::map<std::string,int>> m_HitmapGroups;
     SG::ReadHandleKey<xAOD::AFPSiHitContainer> m_afpHitContainerKey;
+    
 //      m_HitmapGroups = buildToolMap<std::string,std::map<std::string,int>>
 protected:
+   std::vector<std::string> m_pixlayers = { "P0", "P1", "P2", "P3"};
+   std::vector<std::string> m_stationnames = { "farAside", "nearAside" , "nearCside" , "farCside"};
+
+
+
   static const int s_cNearStationIndex;
   static const int s_cFarStationIndex;
   const std::string m_histsDirectoryName;
diff --git a/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py b/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
index c22c115fb6c3f2e75c61cd738f1ff2435351ace0..50218c937f04024b6d74e4666f38787887cb6d12 100644
--- a/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
+++ b/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
@@ -80,16 +80,17 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
     # one might have an array of TH1's such as quantity[etaIndex][phiIndex][layerIndex].
     for alg in [afpSiLayerAlgorithm]:
 
-    # Using a map of groups
-        layerList = ['P0','P1', 'P2', 'P3'] ## TODO XXX adapt to the enum/xAOD namespace names
-        #stationList = ['FarStation','NearStation'] # TODO XXX
-        #sideList = ['Aside' , 'Cside' ]
-	combinedList = [ 0, 1, 2, 3 ]
-        #array = helper.addArray([sideList,stationList,layerList],alg,'AFPSiLayerTool')
-        array = helper.addArray([combinedList,layerList],alg,'AFPSiLayerTool')
-        array.defineHistogram(  'h_hitMap', title='Map of hits', type='TH2F', path='AFPSiLayer', xbins=80,xmin=0.5,xmax=80.5, ybins=336,ymin=0.5,ymax=336.5)
-        #array.defineHistogram('h_hitMap', title='hitmap for {0} {1} Layer {2}', path='Keys/{0}', xmax=3. )
-         array.defineHistogram('h_hitMap', title='hitmap for {0} Layer {1}', path='Keys/{0}', xmax=3. )
+       # Using a map of groups
+       layerList = ['P0','P1', 'P2', 'P3'] ## TODO XXX adapt to the enum/xAOD namespace names
+       #stationList = ['FarStation','NearStation'] # TODO XXX
+       #sideList = ['Aside' , 'Cside' ]        
+       combinedList = [ "farAside", "nearAside" , "nearCside" , "farCside" ]
+
+       #array = helper.addArray([sideList,stationList,layerList],alg,'AFPSiLayerTool')
+       array = helper.addArray([combinedList,layerList],alg,'AFPSiLayerTool')
+       array.defineHistogram(  'h_hitMap', title='Map of hits', type='TH2F', path='AFPSiLayer', xbins=80,xmin=0.5,xmax=80.5, ybins=336,ymin=0.5,ymax=336.5)
+       #array.defineHistogram('h_hitMap', title='hitmap for {0} {1} Layer {2}', path='Keys/{0}', xmax=3. )
+       array.defineHistogram('h_hitMap', title='hitmap for {0} Layer {1}', path='Keys/{0}', xmax=3. )
 
     ### STEP 6 ###
     # Finalize. The return value should be a tuple of the ComponentAccumulator
@@ -143,6 +144,6 @@ if __name__=='__main__':
 
     # If you want to turn on more detailed messages ...
     # exampleMonitorAcc.getEventAlgo('ExampleMonAlg').OutputLevel = 2 # DEBUG
-    cfg.printConfig(withDetails=False) # set True for exhaustive info
+ #   cfg.printConfig(withDetails=False) # set True for exhaustive info
 
-    cfg.run(1000) #use cfg.run(20) to only run on first 20 events
+    cfg.run(10) #use cfg.run(20) to only run on first 20 events
diff --git a/ForwardDetectors/AFP/Run3AFPMonitoring/src/AFPSiLayerAlgorithm.cxx b/ForwardDetectors/AFP/Run3AFPMonitoring/src/AFPSiLayerAlgorithm.cxx
index 79fc33eeb38911b8b1b01118fd7fd622eb724482..c68ae9dc1aabc9eaca15bd86447bfc6d074522ed 100644
--- a/ForwardDetectors/AFP/Run3AFPMonitoring/src/AFPSiLayerAlgorithm.cxx
+++ b/ForwardDetectors/AFP/Run3AFPMonitoring/src/AFPSiLayerAlgorithm.cxx
@@ -6,16 +6,7 @@
 //#include <xAODForward/AFPSiHit.h>
 //#include <xAODForward/AFPSiHitContainer.h>
 #include "StoreGate/ReadHandleKey.h"
-
-/* Old constructor:
-AFPHitsMonitorAlgorithm::AFPHitsMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
-:AthMonitorAlgorithm(name,pSvcLocator)
-,m_doRandom(true)
-{}
-*/
-
-const int s_cNearStationIndex = 2;
-const int s_cFarStationIndex = 3;
+#include "xAODForward/AFPStationID.h"
 
 
 AFPSiLayerAlgorithm::AFPSiLayerAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
@@ -36,14 +27,7 @@ AFPSiLayerAlgorithm::~AFPSiLayerAlgorithm() {}
 StatusCode AFPSiLayerAlgorithm::initialize() {
     using namespace Monitored;
  
-    std::vector<std::string> layers = { "P0", "P1", "P2", "P3"};
-    std::vector<int> combined = { 0, 1, 2, 3};
-    //std::vector<std::string> stations = { "FarStation" , "NearStation" };
-    //std::vector<std::string> sides = { "Aside" , "Cside" };
-
-
-    //m_HitmapGroups = buildToolMap<std::map<std::string,std::map<std::string,int>>>(m_tools,"AFPSiLayerTool",sides,stations,layers);
-      m_HitmapGroups = buildToolMap<std::map<int,int>>(m_tools,"AFPSiLayerTool",combined,layers);
+    m_HitmapGroups = buildToolMap<std::map<std::string,int>>(m_tools,"AFPSiLayerTool",m_stationnames,m_pixlayers);
 
 //  std::map<std::string,std::map<std::string,int>> <std::map<std::string,int>> 
      // We must declare to the framework in initialize what SG objects we are going to use
@@ -163,36 +147,25 @@ StatusCode AFPSiLayerAlgorithm::fillHistograms( const EventContext& ctx ) const
     nhits = afpHitContainer->size();
     fill("AFPSiLayerTool", lb, nhits);
 
+    auto pixelRowIDChip = Monitored::Scalar<int>("pixelRowIDChip", 0); // Nikola
+    auto pixelColIDChip = Monitored::Scalar<int>("pixelColIDChip", 0); // Nikola
+
     for(const xAOD::AFPSiHit *hitsItr: *afpHitContainer)
     {
-       //std::cout << hitsItr->stationID() << std::endl;
-
-	for ( auto& layer : std::vector<std::string>({"P0","P1", "P2", "P3"}) ) 
-	{
-	switch(hitsItr->stationID())
-	{
-	    case 0:
-		std::cout << "Case 0; Test" << std::endl;
-		fill(m_tools[m_HitmapGroups.at(layer).at(hitsItr)]);
-		break;
-	    case 1:
-		std::cout << "Case 1; Test" << std::endl;
-		fill(m_tools[m_HitmapGroups.at(layer).at(hitsItr)]);
-		break;
-	    case 2:
-		std::cout << "Case 2; Test" << std::endl;
-		fill(m_tools[m_HitmapGroups.at(layer).at(hitsItr)]);
-		break;
-	    case 3:
-		std::cout << "Case 3; Test" << std::endl;
-		fill(m_tools[m_HitmapGroups.at(layer).at(hitsItr)]);		
-		//m_cFarStation.fillHistograms(*hitsItr);
-		break;
-	    default:
-		ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
+      pixelRowIDChip=hitsItr->pixelRowIDChip();
+      pixelColIDChip = hitsItr->pixelColIDChip();
+      std::cout << hitsItr->stationID() << std::endl;
+      std::cout << hitsItr->pixelLayerID() << std::endl;
+	
+      if (hitsItr->stationID()<4 && hitsItr->stationID()>=0 
+	&& hitsItr->pixelLayerID()<4 && hitsItr->pixelLayerID()>=0) 
+      {
+         fill(m_tools[m_HitmapGroups.at( m_stationnames.at(hitsItr->stationID())).at( m_pixlayers.at(hitsItr->pixelLayerID()))] , pixelRowIDChip , pixelColIDChip);
 	}
+else ATH_MSG_WARNING("Unrecognised station index: " << hitsItr->stationID());
+
 	}
-    }
+    
 /*
     // Filling using a pre-defined map of groups.
     for ( auto& layer : std::vector<std::string>({"layer1","layer2"}) ) {