diff --git a/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloClusterValidation.h b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloClusterValidation.h
new file mode 100644
index 0000000000000000000000000000000000000000..195f60172ea389e83605a37d091edd7dafbfaeef
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloClusterValidation.h
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef TRIGCALOCLUSTERVALIDATION_TRIGCALOCLUSTERVALIDATION_H
+#define TRIGCALOCLUSTERVALIDATION_TRIGCALOCLUSTERVALIDATION_H
+
+#include "GaudiKernel/Algorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/IToolSvc.h"
+
+class StoreGateSvc;
+class MsgStream;
+class IAlgToolEFCalo;
+
+class TrigCaloClusterValidation : public Algorithm
+{
+
+public:
+	TrigCaloClusterValidation(const std::string& name,
+		ISvcLocator* pSvcLocator);
+	~TrigCaloClusterValidation();
+
+	StatusCode initialize();
+	StatusCode finalize();
+	StatusCode execute();
+
+
+private:
+	StoreGateSvc* m_storeGate;
+	MsgStream* m_log;
+        std::string m_CaloClusterOfflineContainerName;
+        std::string m_CaloClusterL2OnlineContainerName;
+        std::string m_CaloClusterEFOnlineContainerName;
+	float m_EtCut;
+	float m_DeltaRCut;
+	float deltaR( float, float, float, float);
+	float deltaPhi( float, float);
+	/** EF Calorimeter tools for calorimeter data unpacking. */
+	ToolHandleArray<IAlgToolEFCalo>     m_tcrAlgTools;
+
+
+};
+
+#endif
diff --git a/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloValidation.h b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloValidation.h
new file mode 100644
index 0000000000000000000000000000000000000000..294a631badd289da4516956d675e552a15499a2a
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigCaloValidation.h
@@ -0,0 +1,39 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef TRIGCALOVALIDATION_TRIGCALOVALIDATION_H
+#define TRIGCALOVALIDATION_TRIGCALOVALIDATION_H
+
+#include "GaudiKernel/Algorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+
+
+class StoreGateSvc;
+class MsgStream;
+class IAlgToolEFCalo;
+
+class TrigCaloValidation : public Algorithm
+{
+
+public:
+	TrigCaloValidation(const std::string& name,
+		ISvcLocator* pSvcLocator);
+	~TrigCaloValidation();
+
+	StatusCode initialize();
+	StatusCode finalize();
+	StatusCode execute();
+
+private:
+	StoreGateSvc* m_storeGate;
+	MsgStream* m_log;
+
+	/** EF Calorimeter tools for calorimeter data unpacking. */
+	ToolHandleArray<IAlgToolEFCalo>     m_tcrAlgTools;
+
+
+};
+
+#endif
diff --git a/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigFEBValidation.h b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigFEBValidation.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d99c0241a797c0fd5590d25575d8363030536fe
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigFEBValidation.h
@@ -0,0 +1,71 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef TRIGCALOVALIDATION_TRIGFEBVALIDATION_H
+#define TRIGCALOVALIDATION_TRIGFEBVALIDATION_H
+
+#include "GaudiKernel/Algorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "LArRecEvent/LArFebEnergyCollection.h"
+
+
+class StoreGateSvc;
+class MsgStream;
+class ITrigDataAccess;
+class LArOnlineID;
+class LArCablingService;
+class ICaloNoiseTool;
+//class LArFebEnergyCollection;
+class IAlgToolEFCalo;
+class HWIdentifier;
+class LArFebEnergy;
+
+class TrigFEBValidation : public Algorithm
+{
+
+public:
+	TrigFEBValidation(const std::string& name,
+		ISvcLocator* pSvcLocator);
+	~TrigFEBValidation();
+
+	StatusCode initialize();
+	StatusCode finalize();
+	StatusCode execute();
+
+private:
+	StoreGateSvc* m_storeGate;
+	MsgStream* m_log;
+
+	/** TrigDataAccess for calorimeter data unpacking. */
+	//ToolHandle<ITrigDataAccess>     m_data;
+        ITrigDataAccess *m_data;
+	const LArOnlineID * m_onlineHelper;
+	ToolHandle<LArCablingService>     m_cablingSvc;
+	/** Noise tool for offline cell by cell check */
+	ToolHandle<ICaloNoiseTool> m_noisetool;
+
+	/** energy threshold used at the DSP */
+	float m_threshold;
+	/** number of sigma to check that a cell has signal (absolute threshold above used if sigma==0 */
+	float m_nsigma;
+
+        bool m_useloadfullcoll;
+
+        float m_difflimit;
+
+	LArFebEnergyCollection m_larfebcol;
+	LArFebEnergyCollection m_larfebcol_hec;
+	LArFebEnergyCollection m_larfebcol_em;
+	LArFebEnergyCollection m_larfebcol_fcal;
+	LArFebEnergyCollection::const_iterator tbegin;
+	LArFebEnergyCollection::const_iterator tend;
+	 /** EF Calorimeter tools for calorimeter data unpacking. */
+        ToolHandleArray<IAlgToolEFCalo>     m_tcrAlgTools;
+
+
+        void doComparison(LArFebEnergyCollection *febcoll, std::map<HWIdentifier,LArFebEnergy> *larfebmap,int &count,int &count_not_found,int &countp,double &total,double &totalx,double &totaly,double &totalz,double &x,double &y,double &z);
+};
+
+#endif
diff --git a/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigL2CaloValidation.h b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigL2CaloValidation.h
new file mode 100644
index 0000000000000000000000000000000000000000..402a985ab23e3227199a678309970cd03323ab5b
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/TrigCaloValidation/TrigL2CaloValidation.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef TRIGCALOVALIDATION_TRIGL2CALOVALIDATION_H
+#define TRIGCALOVALIDATION_TRIGL2CALOVALIDATION_H
+
+#include "GaudiKernel/Algorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+class StoreGateSvc;
+class MsgStream;
+
+class TrigL2CaloValidation : public Algorithm
+{
+
+public:
+	TrigL2CaloValidation(const std::string& name,
+		ISvcLocator* pSvcLocator);
+	~TrigL2CaloValidation();
+
+	StatusCode initialize();
+	StatusCode finalize();
+	StatusCode execute();
+
+private:
+	void LoopOver(const CaloCellContainer* L2Calo, const CaloCellContainer*
+	 AllCalo,int& count_tcellsL, int & count_tcellspL, int& count_tcellsT,
+	 int & count_tcellspT);
+	StoreGateSvc* m_storeGate;
+	MsgStream* m_log;
+	std::string m_L2egname;
+	std::string m_L2taname;
+	std::string m_L2jename;
+
+};
+
+#endif
diff --git a/Trigger/TrigValidation/TrigCaloValidation/cmt/requirements b/Trigger/TrigValidation/TrigCaloValidation/cmt/requirements
new file mode 100644
index 0000000000000000000000000000000000000000..ab9ddb9c3f31a43d0545348e93420bd68e3f59d1
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/cmt/requirements
@@ -0,0 +1,31 @@
+
+package TrigCaloValidation
+
+author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
+
+
+public
+use AtlasPolicy	AtlasPolicy-*
+use CaloEvent      CaloEvent-*      Calorimeter
+use TrigCaloEvent  TrigCaloEvent-* Trigger/TrigEvent
+use GaudiInterface GaudiInterface-* External
+use LArRecEvent	   LArRecEvent-*	LArCalorimeter
+
+
+private
+use CaloInterface  CaloInterface-*    Calorimeter
+use TrigCaloRec    TrigCaloRec-*          Trigger/TrigAlgorithms
+use TrigT2CaloCommon	TrigT2CaloCommon-*	Trigger/TrigAlgorithms
+use LArIdentifier	LArIdentifier-*		LArCalorimeter
+use AtlasROOT	AtlasROOT-*	External
+use StoreGate      StoreGate-*      Control
+use LArTools	LArTools-*	LArCalorimeter
+
+public
+
+apply_pattern dual_use_library files=*.cxx
+
+apply_pattern declare_joboptions files="*.txt *.py"
+
+apply_pattern declare_python_modules files="*.py"
+
diff --git a/Trigger/TrigValidation/TrigCaloValidation/python/TrigCaloValidationConfig.py b/Trigger/TrigValidation/TrigCaloValidation/python/TrigCaloValidationConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..68dae0542c9f822d61d44a777b858e590d561a13
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/python/TrigCaloValidationConfig.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+
+from TrigCaloValidation.TrigCaloValidationConf import TrigCaloValidation
+from TrigCaloRec.TrigCaloRecConf import RoILArEMCellContMaker
+from TrigCaloRec.TrigCaloRecConf import RoILArHadCellContMaker
+from TrigCaloRec.TrigCaloRecConf import RoITileCellContMaker
+from TrigCaloRec.TrigCaloRecConf import RoIFCalEmCellContMaker
+from TrigCaloRec.TrigCaloRecConf import RoIFCalHadCellContMaker
+from TrigCaloRec.TrigCaloRecConf import FullCaloCellContMaker
+
+class TrigCaloValidationConfig (TrigCaloValidation):
+   __slots__ = []
+   def __init__ (self,name="TrigCaloValidationConfig"):
+      super(TrigCaloValidationConfig,self).__init__(name)
+
+      from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
+      theCaloNoiseTool=CaloNoiseToolDefault()
+      from AthenaCommon.AppMgr import ToolSvc
+      ToolSvc+=theCaloNoiseTool
+
+      roilaremcellcontmaker  = RoILArEMCellContMaker()
+      roilaremcellcontmaker.CaloNoiseTool = theCaloNoiseTool
+      roilaremcellcontmaker.OutputLevel=0
+      roilarhadcellcontmaker = RoILArHadCellContMaker()
+      roilarhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool
+      roilarhadcellcontmaker.OutputLevel=0
+      roilaremcellcontmaker.DoLArCellsNoiseSuppression = 0
+      roilarhadcellcontmaker.DoLArCellsNoiseSuppression = 0
+      roifcalemcellcontmaker = RoIFCalEmCellContMaker()
+      roifcalemcellcontmaker.CaloNoiseTool = theCaloNoiseTool
+      roifcalemcellcontmaker.DoLArCellsNoiseSuppression = 0
+      roifcalhadcellcontmaker = RoIFCalHadCellContMaker()
+      roifcalhadcellcontmaker.CaloNoiseTool = theCaloNoiseTool
+      roifcalhadcellcontmaker.DoLArCellsNoiseSuppression = 0
+
+
+      self.TCRTools = [roilaremcellcontmaker,
+                         roilarhadcellcontmaker,
+                         roifcalemcellcontmaker,
+                         roifcalhadcellcontmaker,
+                         RoITileCellContMaker()]
+
+class TrigFullCaloValidationConfig (TrigCaloValidation):
+   __slots__ = []
+   def __init__ (self,name="TrigFullCaloValidationConfig"):
+      super(TrigFullCaloValidationConfig,self).__init__(name)
+
+      from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
+      theCaloNoiseTool=CaloNoiseToolDefault()
+      from AthenaCommon.AppMgr import ToolSvc
+      ToolSvc+=theCaloNoiseTool
+
+      fullcalocellcontmaker = FullCaloCellContMaker()
+      fullcalocellcontmaker.CaloNoiseTool = theCaloNoiseTool
+      fullcalocellcontmaker.OutputLevel = 0
+      fullcalocellcontmaker.DoLArCellsNoiseSuppression = 0
+
+      self.TCRTools = [fullcalocellcontmaker]
+
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloClusterValidation.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloClusterValidation.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ab5e77562c34e6536ca591aeaabc55c379825948
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloClusterValidation.cxx
@@ -0,0 +1,156 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "TrigCaloValidation/TrigCaloClusterValidation.h"
+#include "GaudiKernel/MsgStream.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "TrigCaloRec/IAlgToolEFCalo.h"
+#include "CaloEvent/CaloCellContainer.h"
+#include "CaloEvent/CaloClusterContainer.h"
+#include "TMath.h"
+#include "TrigCaloEvent/TrigEMCluster.h"
+#include "TrigCaloEvent/TrigEMClusterContainer.h"
+
+TrigCaloClusterValidation::TrigCaloClusterValidation(const std::string& name,
+	ISvcLocator* pSvcLocator) : Algorithm(name,pSvcLocator),
+	m_tcrAlgTools(this,"")
+{
+	declareProperty("CaloOfflineClusterContainer", m_CaloClusterOfflineContainerName = "egClusterCollection");
+	declareProperty("CaloEFOnlineClusterContainer", m_CaloClusterEFOnlineContainerName = "HLT_TrigCaloClusterMaker");
+	declareProperty("CaloL2OnlineClusterContainer", m_CaloClusterL2OnlineContainerName = "HLT_TrigT2CaloEgamma");
+	declareProperty ("TCRTools", m_tcrAlgTools);
+	declareProperty("EtCut", m_EtCut = 10000);
+	declareProperty("DeltaRCut", m_DeltaRCut =0.0375);
+
+
+	// Nothing for the moment
+	return;
+
+}
+
+
+TrigCaloClusterValidation::~TrigCaloClusterValidation() {}
+
+StatusCode TrigCaloClusterValidation::initialize(){
+
+	m_log = new MsgStream(messageService(),name());
+	(*m_log) << MSG::INFO << "Initializing" << endreq;
+
+	if ( service("StoreGateSvc",m_storeGate).isFailure() ){
+		(*m_log) << MSG::ERROR << "Problems to get StoreGateSvc"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+
+	if ( m_tcrAlgTools.retrieve().isFailure() ) {
+    		(*m_log) << MSG::ERROR << "Failed to retrieve helper tools: " << m_tcrAlgTools << endreq;
+		return StatusCode::FAILURE;
+	} else {
+		(*m_log) << MSG::INFO << "Retrieved " << m_tcrAlgTools << endreq;
+	}
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigCaloClusterValidation::execute(){
+
+        const CaloClusterContainer* caloOFF = 0;
+        StatusCode sc=m_storeGate->retrieve(caloOFF, m_CaloClusterOfflineContainerName);
+        if( sc.isFailure()  ||  !caloOFF ) {
+                       (*m_log) << MSG::DEBUG << "No OFFline Calo Cell Container found"
+                        << endreq;
+                return StatusCode::SUCCESS;
+        }
+        (*m_log) << MSG::INFO << "Got Offline container ";
+
+        const CaloClusterContainer* caloEFON = 0;
+        sc=m_storeGate->retrieve(caloEFON, m_CaloClusterEFOnlineContainerName);
+        if( sc.isFailure()  ||  !caloEFON ) {
+                       (*m_log) << MSG::DEBUG << "No EF  Calo Cell Container found"
+                        << endreq;
+                return StatusCode::SUCCESS;
+        }
+        const TrigEMClusterContainer* caloL2ON = 0;
+        sc=m_storeGate->retrieve(caloL2ON,m_CaloClusterL2OnlineContainerName);
+        if( sc.isFailure()  ||  !caloL2ON ) {
+                       (*m_log) << MSG::DEBUG << "No L2 Calo Cell Container found"
+                        << endreq;
+                return StatusCode::SUCCESS;
+        }
+        CaloClusterContainer::const_iterator ONEFbeg = caloEFON->begin();
+        CaloClusterContainer::const_iterator ONEFend = caloEFON->end();
+        TrigEMClusterContainer::const_iterator ONL2beg = caloL2ON->begin();
+        TrigEMClusterContainer::const_iterator ONL2end = caloL2ON->end();
+        CaloClusterContainer::const_iterator OFFbeg = caloOFF->begin();
+        CaloClusterContainer::const_iterator OFFend = caloOFF->end();
+        CaloClusterContainer::const_iterator MatchEF;
+        TrigEMClusterContainer::const_iterator MatchL2;
+ 
+	if(caloEFON->size()!=0&&caloOFF->size()!=0){
+		for(;OFFbeg!=OFFend;++OFFbeg){
+			MatchEF =caloEFON->begin();
+			ONEFbeg=caloEFON->begin();
+			for(;ONEFbeg!=ONEFend;++ONEFbeg){
+				if(deltaR((*ONEFbeg)->phi(),(*OFFbeg)->phi(),(*ONEFbeg)->eta(),(*OFFbeg)->eta())<deltaR((*MatchEF)->phi(),(*OFFbeg)->phi(),(*MatchEF)
+->eta(),(*OFFbeg)->eta())) MatchEF=ONEFbeg;
+			}
+			if((*OFFbeg)->et()>m_EtCut&&deltaR((*MatchEF)->phi(),(*OFFbeg)->phi(),(*MatchEF)->eta(),(*OFFbeg)->eta())<m_DeltaRCut){
+				(*m_log) << MSG::DEBUG << "\nREGTEST: ";
+				(*m_log) << "Offline cluster matched with online EF cluster";
+				(*m_log) << "\nREGTEST: Online EF energy : " << (*MatchEF)->et();
+				(*m_log) << "\nREGTEST: Offline energy : " << (*OFFbeg)->et();
+				(*m_log) << "\nREGTEST: Transverse energy fraction (on/off) : " << (*MatchEF)->et()/(*OFFbeg)->et();
+				(*m_log) << "\nREGTEST: Offline cluster eta : " << (*OFFbeg)->eta();
+				(*m_log) << "\nREGTEST: Offline cluster phi : " << (*OFFbeg)->phi();
+				(*m_log) << endreq;
+			}
+		}
+	}
+	if(caloL2ON->size()!=0&&caloOFF->size()!=0){
+		OFFbeg = caloOFF->begin();		
+		for(;OFFbeg!=OFFend;++OFFbeg){
+			MatchL2 =caloL2ON->begin();
+			ONL2beg=caloL2ON->begin();
+
+			for(;ONL2beg!=ONL2end;++ONL2beg){
+				if(deltaR((*ONL2beg)->phi(),(*OFFbeg)->phi(),(*ONL2beg)->eta(),(*OFFbeg)->eta())<deltaR((*MatchL2)->phi(),(*OFFbeg)->phi(),(*MatchL2)->eta(),(*OFFbeg)->eta())) MatchL2=ONL2beg;
+			}
+			if((*OFFbeg)->et()>m_EtCut&&deltaR((*MatchL2)->phi(),(*OFFbeg)->phi(),(*MatchL2)->eta(),(*OFFbeg)->eta())<m_DeltaRCut){
+				(*m_log) << MSG::DEBUG << "\nREGTEST: ";
+				(*m_log) << "Offline cluster matched with L2 online cluster";
+				(*m_log) << "\nREGTEST: Online energy : " << (*MatchL2)->et();
+				(*m_log) << "\nREGTEST: Offline energy : " << (*OFFbeg)->et();
+				(*m_log) << "\nREGTEST: Transverse energy fraction (on/off) : " << (*MatchL2)->et()/(*OFFbeg)->et();
+				(*m_log) << "\nREGTEST: Offline cluster eta : " << (*OFFbeg)->eta();
+				(*m_log) << "\nREGTEST: Offline cluster phi : " << (*OFFbeg)->phi();
+				(*m_log) << endreq;
+			}
+		}
+	}
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigCaloClusterValidation::finalize(){
+	(*m_log) << MSG::INFO << "Finishing" << endreq;
+	delete m_log;
+	return StatusCode::SUCCESS;
+}
+
+float TrigCaloClusterValidation::deltaR( float Phi1, float Phi2, float Eta1, float Eta2){
+	
+	return sqrt(pow(fabsf(Eta1-Eta2),2)+pow(deltaPhi(Phi1,Phi2),2));
+}
+float TrigCaloClusterValidation::deltaPhi( float PhiA, float PhiB){
+	double deltaphi=fabsf(PhiA-PhiB);
+	deltaphi=fabsf(TMath::Pi()-deltaphi);
+	deltaphi=fabsf(TMath::Pi()-deltaphi);
+	return deltaphi;
+}
+
+
+
+
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloValidation.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloValidation.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..43ebbba52385d2e422fbdf5f7bf78cc9788bb9c7
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/TrigCaloValidation.cxx
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "TrigCaloValidation/TrigCaloValidation.h"
+#include "GaudiKernel/MsgStream.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "TrigCaloRec/IAlgToolEFCalo.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+
+TrigCaloValidation::TrigCaloValidation(const std::string& name,
+	ISvcLocator* pSvcLocator) : Algorithm(name,pSvcLocator),
+	m_tcrAlgTools(this,"")
+{
+
+	declareProperty ("TCRTools", m_tcrAlgTools);
+	// Nothing for the moment
+	return;
+
+}
+
+
+TrigCaloValidation::~TrigCaloValidation() {}
+
+StatusCode TrigCaloValidation::initialize(){
+
+	m_log = new MsgStream(messageService(),name());
+	(*m_log) << MSG::INFO << "Initializing" << endreq;
+
+	if ( service("StoreGateSvc",m_storeGate).isFailure() ){
+		(*m_log) << MSG::ERROR << "Problems to get StoreGateSvc"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+
+	if ( m_tcrAlgTools.retrieve().isFailure() ) {
+    		(*m_log) << MSG::ERROR << "Failed to retrieve helper tools: " << m_tcrAlgTools << endreq;
+		return StatusCode::FAILURE;
+	} else {
+		(*m_log) << MSG::INFO << "Retrieved " << m_tcrAlgTools << endreq;
+	}
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigCaloValidation::execute(){
+
+	const DataHandle<CaloCellContainer> AllCalo;
+	if ( m_storeGate->retrieve(AllCalo,"AllCalo").isFailure() ){
+		(*m_log) << MSG::DEBUG << "No Calo Cell Container found"
+                        << endreq;
+		return StatusCode::SUCCESS;
+	}
+	(*m_log) << MSG::INFO << "Got container "; 
+	(*m_log) << "Size : " << AllCalo->size() << endreq;
+
+	CaloCellContainer* pCaloCellContainer
+		= new CaloCellContainer(SG::VIEW_ELEMENTS);
+	ToolHandleArray<IAlgToolEFCalo>::iterator itrtcr = m_tcrAlgTools.begin();
+	ToolHandleArray<IAlgToolEFCalo>::iterator endtcr = m_tcrAlgTools.end();
+	double etamin, etamax,phimin, phimax;
+	etamin=-4.8;
+	etamax=4.8;
+	for (; itrtcr!=endtcr; ++itrtcr) {
+
+	(*m_log) << MSG::VERBOSE << "Tool name : " 
+		<< (*itrtcr).name() << endreq;
+	phimin=-M_PI;
+	phimax=M_PI;
+	// Fix for stupid RS problem
+	if ( (*itrtcr).name().find("Tile")!=std::string::npos ){
+		phimin=0;
+		phimax=2*M_PI;
+	}
+	StatusCode sc;
+	if((*itrtcr).name() == "FullCaloCellContMaker") {
+		sc= (*itrtcr)->execute(*pCaloCellContainer);
+	} else {
+		sc = (*itrtcr)->execute(*pCaloCellContainer,etamin,etamax,phimin,phimax);
+	}
+	if ( sc.isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problem with filling the cont"
+			<< endreq;
+	}
+	} // End of loop over tools
+
+	(*m_log) << MSG::DEBUG << "REGTEST: HLT Container size : "
+		<< pCaloCellContainer->size() << endreq;
+	CaloCellContainer::const_iterator tbeg = pCaloCellContainer->begin();
+	CaloCellContainer::const_iterator tend = pCaloCellContainer->end();
+	int count_tcells=0;
+	int count_tcellsp=0;
+	for(; tbeg!=tend ; ++tbeg){
+		CaloCell* tcell = (*tbeg);
+		IdentifierHash tid = tcell->caloDDE()->calo_hash();
+		//if ( tid < AllCalo->size() ) {
+		float tenergy = tcell->energy();
+		CaloGain::CaloGain tgain = tcell->gain();
+		const CaloCell* cell = AllCalo->findCell(tid);
+		if ( cell && cell->caloDDE() ) {
+			float energy = cell->energy();
+			CaloGain::CaloGain gain = cell->gain();
+			float diff = fabsf(tenergy-energy);
+			float diffp = 0;
+			if ( fabsf (energy) > 0.2 )
+				diffp = 100*diff/energy;
+			if ( ( (diff>3&&diffp>1) || gain!= tgain) ) {
+				(*m_log) << MSG::VERBOSE << "REGTEST: ";
+				(*m_log) << "Offline cell found";
+				(*m_log) << " energy : " << cell->energy();
+				(*m_log) << " tenergy : " << tcell->energy();
+				(*m_log) << " gain : " << cell->gain();
+				(*m_log) << " tgain : " << tcell->gain();
+				(*m_log) << endreq;
+				count_tcellsp++;
+			}
+		}
+		count_tcells++;
+		//} // check if tcell caloDDE exists
+	}
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of cell found " << count_tcells << endreq;
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of cell w problems " << count_tcellsp << endreq;
+	delete pCaloCellContainer;
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigCaloValidation::finalize(){
+	(*m_log) << MSG::INFO << "Finishing" << endreq;
+	delete m_log;
+	return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/TrigFEBValidation.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/TrigFEBValidation.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8e92230afa223c1b14a79f9bc74a92c83306443d
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/TrigFEBValidation.cxx
@@ -0,0 +1,808 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "TrigCaloValidation/TrigFEBValidation.h"
+#include "GaudiKernel/MsgStream.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "TrigT2CaloCommon/ITrigDataAccess.h"
+#include "CaloEvent/CaloCellContainer.h"
+#include "LArIdentifier/LArIdManager.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArTools/LArCablingService.h"
+#include "CaloInterface/ICaloNoiseTool.h"
+#include "GaudiKernel/IToolSvc.h"
+#include "TrigCaloRec/IAlgToolEFCalo.h"
+#include "CaloEvent/CaloCellContainer.h"
+#include "CaloEvent/CaloSampling.h"
+
+
+
+TrigFEBValidation::TrigFEBValidation(const std::string& name,
+	ISvcLocator* pSvcLocator) : Algorithm(name,pSvcLocator),
+//	m_data("TrigDataAccess",this,"TrigDataAccess"),
+	m_onlineHelper(0),
+	m_cablingSvc("LArCablingService"),
+	m_noisetool("CaloNoiseTool/CaloNoiseToolDefault"),
+	m_threshold(100.0),
+	m_nsigma(5.0),
+	m_useloadfullcoll(false),
+	m_difflimit(0.)
+{
+
+//	declareProperty ("TrigDataAccess", m_data);
+	declareProperty("NoiseTool",m_noisetool);
+	declareProperty ("threshold", m_threshold);
+	declareProperty ("sigma", m_nsigma);
+	declareProperty ("useLoadFullCollection", m_useloadfullcoll);
+	declareProperty ("DiffLimit", m_difflimit);
+	declareProperty ("TCRTools", m_tcrAlgTools);
+	// Nothing for the moment
+	return;
+
+}
+
+
+TrigFEBValidation::~TrigFEBValidation() {}
+
+StatusCode TrigFEBValidation::initialize(){
+
+	m_log = new MsgStream(messageService(),name());
+	(*m_log) << MSG::INFO << "Initializing" << endreq;
+
+	if ( service("StoreGateSvc",m_storeGate).isFailure() ){
+		(*m_log) << MSG::ERROR << "Problems to get StoreGateSvc"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+
+//	if ( m_data.retrieve().isFailure() ) {
+	if ( toolSvc()->retrieveTool("TrigDataAccess",m_data).isFailure() ){
+    		(*m_log) << MSG::ERROR << "Failed to retrieve helper tools: " << m_data << endreq;
+		return StatusCode::FAILURE;
+	} else {
+		(*m_log) << MSG::INFO << "Retrieved " << m_data << endreq;
+	}
+
+	if ( m_cablingSvc.retrieve().isFailure() ) {
+    		(*m_log) << MSG::ERROR << "Failed to retrieve helper tools: " << m_cablingSvc << endreq;
+		return StatusCode::FAILURE;
+	} else {
+		(*m_log) << MSG::INFO << "Retrieved " << m_cablingSvc << endreq;
+	}
+
+	ServiceHandle<StoreGateSvc> detStore("DetectorStore",name());
+	if ( detStore.retrieve().isFailure() ) {
+		(*m_log) << MSG::ERROR << "Unable to retrieve DetectorStore" << endreq;
+		return StatusCode::FAILURE;
+	}
+	const LArIdManager* larMgr;
+	if ( (detStore->retrieve(larMgr)).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Unable to retrieve LArIdManager from DetectorStore" << endreq;
+		return StatusCode::FAILURE;
+	} else {
+		(*m_log) << MSG::DEBUG << "Successfully retrieved LArIdManager from DetectorStore" << endreq;
+	}
+	m_onlineHelper = larMgr->getOnlineID();
+	if (!m_onlineHelper) {
+		(*m_log) << MSG::ERROR << "Could not access LArOnlineID helper" << endreq;
+		return StatusCode::FAILURE;
+	} else {
+	(*m_log) << MSG::DEBUG << "Successfully accessed LArOnlineID helper" << endreq;
+	}
+
+   if (m_noisetool.retrieve().isFailure()) {
+     (*m_log) << MSG::ERROR << "Could not retrieve CaloNoiseTool " << m_noisetool << endreq;
+     return StatusCode::FAILURE;
+   }
+   else
+     (*m_log) << MSG::DEBUG << "Successfully retrieved CaloNoiseTool " << endreq;
+
+        if ( m_tcrAlgTools.retrieve().isFailure() ) {
+                (*m_log) << MSG::ERROR << "Failed to retrieve helper tools: " << m_tcrAlgTools << endreq;
+                return StatusCode::FAILURE;
+        } else {
+                (*m_log) << MSG::INFO << "Retrieved " << m_tcrAlgTools << endreq;
+        }
+
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigFEBValidation::execute(){
+
+	const DataHandle<CaloCellContainer> AllCalo;
+	if ( m_storeGate->retrieve(AllCalo,"AllCalo").isFailure() ){
+		(*m_log) << MSG::DEBUG << "No Calo Cell Container found"
+                        << endreq;
+		return StatusCode::SUCCESS;
+	}
+	(*m_log) << MSG::DEBUG << "Got container "; 
+	(*m_log) << "Size : " << AllCalo->size() << endreq;
+
+	CaloCellContainer* pCaloCellContainer
+                = new CaloCellContainer(SG::VIEW_ELEMENTS);
+        ToolHandleArray<IAlgToolEFCalo>::iterator itrtcr = m_tcrAlgTools.begin();
+        ToolHandleArray<IAlgToolEFCalo>::iterator endtcr = m_tcrAlgTools.end();
+        double etamin, etamax,phimin, phimax;
+        etamin=-4.8;
+        etamax=4.8;
+        for (; itrtcr!=endtcr; ++itrtcr) {
+
+        (*m_log) << MSG::VERBOSE << "Tool name : "
+                << (*itrtcr).name() << endreq;
+        phimin=-M_PI;
+        phimax=M_PI;
+        // Fix for stupid RS problem
+        if ( (*itrtcr).name().find("Tile")!=std::string::npos ){
+                phimin=0;
+                phimax=2*M_PI;
+        }
+        StatusCode sc;
+        if((*itrtcr).name() == "FullCaloCellContMaker") {
+                sc= (*itrtcr)->execute(*pCaloCellContainer);
+        } else {
+                sc = (*itrtcr)->execute(*pCaloCellContainer,etamin,etamax,phimin,phimax);
+        }
+        if ( sc.isFailure() ) {
+                (*m_log) << MSG::ERROR << "Problem with filling the cont"
+                        << endreq;
+        }
+        } // End of loop over tools
+
+	CaloCellContainer::const_iterator beg = pCaloCellContainer->begin();
+	CaloCellContainer::const_iterator end = pCaloCellContainer->end();
+
+	std::map<HWIdentifier,LArFebEnergy> larfebmap;
+	std::map<HWIdentifier,LArFebEnergy> larfebmap_fcal;
+	std::map<HWIdentifier,LArFebEnergy> larfebmap_hec, larfebmap_em;
+	std::map<HWIdentifier,LArFebEnergy>::iterator it;
+
+	for(; beg!=end ; ++beg){
+		CaloCell* cell = (*beg);
+		if ( cell && cell->caloDDE()
+			&& cell->caloDDE()->getSubCalo() < CaloCell_ID::TILE ){
+			Identifier idh = cell->ID();
+                        const CaloDetDescrElement *detdescr = cell->caloDDE();
+			//IdentifierHash idh = cell->caloDDE()->calo_hash();
+			HWIdentifier channel_hw = m_cablingSvc->createSignalChannelID(idh);
+			HWIdentifier feb_hw = m_onlineHelper->feb_Id(channel_hw);
+                        Identifier32::value_type feb_hw_n = feb_hw.get_identifier32().get_compact();
+			if ( m_nsigma != 0 )
+			m_threshold = m_nsigma * m_noisetool->totalNoiseRMS(cell->caloDDE(),cell->gain());
+                        //std::cout << "cell energy = " << cell->energy() << std::endl;
+			if ( cell->energy() > m_threshold ) {
+				int ienergy = (int) floorf(cell->energy()/64.0);
+				float energy = (float)(64.0*ienergy);
+				float et, ex, ey, ez;
+				et = energy * cell->caloDDE()->sinTh();
+				ex= et * cell->caloDDE()->cosPhi();
+				ey= et * cell->caloDDE()->sinPhi();
+				ez= et * cell->caloDDE()->cotTh();
+				std::cout << "just test " << cell->caloDDE()->sinTh() << " " << 1./cosh ( cell->eta() ) << " " << cell->caloDDE()->cosPhi() << " " << cos ( cell->phi() ) << " " << cell->caloDDE()->sinTh()* cell->caloDDE()->cotTh() << " " << tanh(cell->eta() ) << " " << m_threshold << std::endl;;
+#ifndef NDEBUG
+				if ( energy > 0 ) {
+					std::cout << " All cells that compose feb : ";
+					std::cout << std::hex;
+					std::cout << feb_hw << " ";
+					std::cout << idh << " ";
+					std::cout << channel_hw << " ";
+					std::cout << std::dec;
+					std::cout << energy << " ";
+					std::cout << cell->energy() << " ";
+					std::cout << et << " ";
+					std::cout << ex << " ";
+					std::cout << ey << " ";
+					std::cout << ez << std::endl;
+				}
+#endif
+				if ( (it = larfebmap.find(feb_hw)) != larfebmap.end() ){
+					// fill
+					/*std::cout << "filling created FEB " << std::endl;
+					std::cout << "with size = " << larfebmap.size() << std::endl;*/
+					LArFebEnergy* larfebenergy =
+						&((*it).second);
+					double tmpex = larfebenergy->getFebEx();
+					double tmpey = larfebenergy->getFebEy();
+					double tmpez = larfebenergy->getFebEz();
+                                        /*std::cout << "current ex = " << tmpex << std::endl;
+                                        std::cout << "current ey = " << tmpey << std::endl;
+                                        std::cout << "current ez = " << tmpez << std::endl;*/
+					larfebenergy->setFebEx(
+					  ex + tmpex);
+					larfebenergy->setFebEy(
+					  ey + tmpey);
+					larfebenergy->setFebEz(
+					  ez + tmpez);
+				} else {
+					LArFebEnergy larfebenergy =
+					  LArFebEnergy(feb_hw_n,ex,ey,ez,0.);
+					larfebmap.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy));
+				}
+                                CaloCell_ID::CaloSample s = detdescr->getSampling();
+	                        std::map<HWIdentifier,LArFebEnergy>::iterator myit;
+                                switch(s){
+                                  case CaloCell_ID::PreSamplerB:
+                                  case CaloCell_ID::PreSamplerE:
+                                  case CaloCell_ID::EMB1:
+                                  case CaloCell_ID::EMB2:
+                                  case CaloCell_ID::EMB3:
+                                  case CaloCell_ID::EME1:
+                                  case CaloCell_ID::EME2:
+                                  case CaloCell_ID::EME3:
+	                            //std::map<HWIdentifier,LArFebEnergy>::iterator myit;
+                                    if( (myit = larfebmap_em.find(feb_hw)) != larfebmap_em.end() ){
+                                        LArFebEnergy* larfebenergy =
+                                                &((*myit).second);
+                                        double tmpex = larfebenergy->getFebEx();
+                                        double tmpey = larfebenergy->getFebEy();
+                                        double tmpez = larfebenergy->getFebEz();
+                                        larfebenergy->setFebEx(
+                                          ex + tmpex);
+                                        larfebenergy->setFebEy(
+                                          ey + tmpey);
+                                        larfebenergy->setFebEz(
+                                          ez + tmpez);
+                                    } else {
+                                        LArFebEnergy larfebenergy =
+                                          LArFebEnergy(feb_hw_n,ex,ey,ez,0.);
+                                        larfebmap_em.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy));
+                                    }
+                                    break;
+                                  case CaloCell_ID::HEC0:
+                                  case CaloCell_ID::HEC1:
+                                  case CaloCell_ID::HEC2:
+                                  case CaloCell_ID::HEC3:
+	                            //std::map<HWIdentifier,LArFebEnergy>::iterator myit;
+                                    if( (myit = larfebmap_hec.find(feb_hw)) != larfebmap_hec.end() ){
+                                        LArFebEnergy* larfebenergy =
+                                                &((*myit).second);
+                                        double tmpex = larfebenergy->getFebEx();
+                                        double tmpey = larfebenergy->getFebEy();
+                                        double tmpez = larfebenergy->getFebEz();
+                                        larfebenergy->setFebEx(
+                                          ex + tmpex);
+                                        larfebenergy->setFebEy(
+                                          ey + tmpey);
+                                        larfebenergy->setFebEz(
+                                          ez + tmpez);
+                                    } else {
+                                        LArFebEnergy larfebenergy =
+                                          LArFebEnergy(feb_hw_n,ex,ey,ez,0.);
+                                        larfebmap_hec.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy));
+                                    }
+                                    break;
+                                  case CaloCell_ID::FCAL0:
+                                  case CaloCell_ID::FCAL1:
+                                  case CaloCell_ID::FCAL2:
+	                            //std::map<HWIdentifier,LArFebEnergy>::iterator myit;
+                                    if( (myit = larfebmap_fcal.find(feb_hw)) != larfebmap_fcal.end() ){
+                                        LArFebEnergy* larfebenergy =
+                                                &((*myit).second);
+                                        double tmpex = larfebenergy->getFebEx();
+                                        double tmpey = larfebenergy->getFebEy();
+                                        double tmpez = larfebenergy->getFebEz();
+                                        larfebenergy->setFebEx(
+                                          ex + tmpex);
+                                        larfebenergy->setFebEy(
+                                          ey + tmpey);
+                                        larfebenergy->setFebEz(
+                                          ez + tmpez);
+                                    } else {
+                                        LArFebEnergy larfebenergy =
+                                          LArFebEnergy(feb_hw_n,ex,ey,ez,0.);
+                                        larfebmap_fcal.insert(std::pair<HWIdentifier,LArFebEnergy>(feb_hw,larfebenergy));
+                                    }
+                                    break;
+                                  case CaloCell_ID::TileBar0:
+                                  case CaloCell_ID::TileBar1:
+                                  case CaloCell_ID::TileBar2:
+                                  case CaloCell_ID::TileExt0:
+                                  case CaloCell_ID::TileExt1:
+                                  case CaloCell_ID::TileExt2:
+                                  case CaloCell_ID::TileGap1:
+                                  case CaloCell_ID::TileGap2:
+                                  case CaloCell_ID::TileGap3:
+                                  case CaloCell_ID::MINIFCAL0:
+                                  case CaloCell_ID::MINIFCAL1:
+                                  case CaloCell_ID::MINIFCAL2:
+                                  case CaloCell_ID::MINIFCAL3:
+                                  case CaloCell_ID::Unknown:
+                                     break;
+                                }
+			}
+		} // End of basic cell checks
+		
+	}
+	(*m_log) << MSG::INFO << " Number of Offline FEBs : "
+		<< larfebmap.size() << endreq;
+	(*m_log) << MSG::DEBUG << "COMPARISON " << endreq;
+	//LArFebEnergyCollection m_larfebcol;
+        m_larfebcol.clear();
+        m_larfebcol_hec.clear();
+        m_larfebcol_em.clear();
+        m_larfebcol_fcal.clear();
+	//m_larfebcol.clear(SG::VIEW_ELEMENTS);
+	//LArFebEnergyCollection::const_iterator tit,tbegin,tend;
+	//LArFebEnergyCollection::const_iterator tit;
+        bool prepare=true;
+        if(m_useloadfullcoll){
+          if(m_data->LoadFullCollections(tbegin,tend,TTEM,prepare).isFailure()){
+             (*m_log) << MSG::ERROR << "Problems reading LoadFullCollection"
+                    << endreq;
+		return StatusCode::FAILURE;
+          }
+        } else {
+        double etamin = -4.8;
+        double etamax = 4.8;
+        double phimin = -M_PI;
+        double phimax = M_PI;
+	//if ( m_data->LoadFullCollections(tbegin,tend,TTEM).isFailure() ) {
+        m_data->RegionSelector(0,etamin,etamax,phimin,phimax, TTEM);
+	//LArFebEnergyCollection::const_iterator titem0,tbeginem0,tendem0;
+	if ( m_data->LoadCollections(tbegin,tend,0).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator tit= tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "TTEM 0 FEB ID = " << feb->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 0 FEB Ex = " << feb->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 0 FEB Ey = " << feb->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 0 FEB Ez = " << feb->getFebEz() << endreq;
+		m_larfebcol_em.push_back(feb);
+	}
+        m_data->RegionSelector(1,etamin,etamax,phimin,phimax,TTEM);
+	//LArFebEnergyCollection::const_iterator tbeginem1;
+	//LArFebEnergyCollection::const_iterator tendem1;
+	if ( m_data->LoadCollections(tbegin,tend,1).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator tit = tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "TTEM 1 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 1 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 1 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 1 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_em.push_back(feb);
+	}
+        m_data->RegionSelector(2,etamin,etamax,phimin,phimax, TTEM);
+	//LArFebEnergyCollection::const_iterator titem2,tbeginem2,tendem2;
+	if ( m_data->LoadCollections(tbegin,tend,2).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for( LArFebEnergyCollection::const_iterator tit= tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "TTEM 2 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 2 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 2 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 2 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_em.push_back(feb);
+	}
+        m_data->RegionSelector(3,etamin,etamax,phimin,phimax, TTEM);
+	//LArFebEnergyCollection::const_iterator titem3,tbeginem3,tendem3;
+	if ( m_data->LoadCollections(tbegin,tend,3).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator  tit= tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "TTEM 3 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 3 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 3 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTEM 3 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_em.push_back(feb);
+	}
+        m_data->RegionSelector(0,etamin,etamax,phimin,phimax, TTHEC);
+	//LArFebEnergyCollection::const_iterator tithec0,tbeginhec0,tendhec0;
+	if ( m_data->LoadCollections(tbegin,tend).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator  tit = tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "TTHEC 0 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTHEC 0 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTHEC 0 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "TTHEC 0 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		//m_larfebcol.push_back(feb);
+		m_larfebcol_hec.push_back(feb);
+	}
+        m_data->RegionSelector(0,etamin,etamax,phimin,phimax, FCALHAD);
+	if ( m_data->LoadCollections(tbegin,tend).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator tit = tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "FCALHAD 0 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 0 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 0 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 0 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_fcal.push_back(feb);
+	}
+        m_data->RegionSelector(1,etamin,etamax,phimin,phimax, FCALHAD);
+	if ( m_data->LoadCollections(tbegin,tend).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator tit = tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "FCALHAD 1 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 1 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 1 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALHAD 1 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_fcal.push_back(feb);
+	}
+        m_data->RegionSelector(0,etamin,etamax,phimin,phimax, FCALEM);
+	if ( m_data->LoadCollections(tbegin,tend).isFailure() ) {
+		(*m_log) << MSG::ERROR << "Problems to read FEB info"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+	for(LArFebEnergyCollection::const_iterator tit = tbegin; tit!=tend; ++tit) {
+                LArFebEnergy *feb = new LArFebEnergy((*tit)->getFebId());
+                feb->setFebEx((*tit)->getFebEx());
+                feb->setFebEy((*tit)->getFebEy());
+                feb->setFebEz((*tit)->getFebEz());
+                (*m_log) << MSG::VERBOSE << "FCALEM 0 FEB ID = " << (*tit)->getFebId() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALEM 0 FEB Ex = " << (*tit)->getFebEx() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALEM 0 FEB Ey = " << (*tit)->getFebEy() << endreq;
+                (*m_log) << MSG::VERBOSE << "FCALEM 0 FEB Ez = " << (*tit)->getFebEz() << endreq;
+		m_larfebcol_fcal.push_back(feb);
+	}
+	}
+/** start comparison between FEB and cells **/
+	/*int count = 0;
+	int count_not_found = 0;
+	int countp = 0;
+        double total = 0;
+        double totalx = 0;
+        double totaly = 0;
+        double totalz = 0;
+        doComparison(&m_larfebcol,&larfebmap,count,count_not_found,countp,total,totalx,totaly,totalz);
+        float totene = sqrt(pow(totalx,2) + pow(totaly,2) + pow(totalz,2));
+	(*m_log) << MSG::INFO << "HLT FEBs found : " << count << endreq;
+	(*m_log) << MSG::INFO << "FEB total energy = " << totene;
+	(*m_log) << MSG::INFO << "; FEB total energy x = " << totalx;
+	(*m_log) << MSG::INFO << "; FEB total energy y = " << totaly;
+	(*m_log) << MSG::INFO << "; FEB total energy z = " << totalz << endreq;
+        
+	(*m_log) << " not found : " << count_not_found << endreq;
+	(*m_log) << " with problems : " << countp << endreq;
+	(*m_log) << " using difflimit  : " << m_difflimit << endreq;*/
+	int counthec = 0;
+	int counthec_not_found = 0;
+	int countphec = 0;
+        double totalhec = 0;
+        double totalhecx = 0;
+        double totalhecy = 0;
+        double totalhecz = 0;
+        double offlinehecx = 0;
+        double offlinehecy = 0;
+        double offlinehecz = 0;
+	(*m_log) << MSG::INFO << "Compare FEBs in HEC" << endreq;
+        doComparison(&m_larfebcol_hec,&larfebmap_hec,counthec,counthec_not_found,countphec,totalhec,totalhecx,totalhecy,totalhecz, offlinehecx,offlinehecy,offlinehecz);
+        float tothecene = sqrt(pow(totalhecx,2) + pow(totalhecy,2) + pow(totalhecz,2));
+	(*m_log) << MSG::INFO << "HLT HEC FEBs found : " << counthec << endreq;
+	(*m_log) << "HEC FEBs not found : " << counthec_not_found << endreq;
+	(*m_log) << "HEC FEBs with problems : " << countphec << endreq;
+	(*m_log) << "HEC FEBs using difflimit  : " << m_difflimit << endreq;
+
+	(*m_log) << MSG::INFO << "HEC HLT FEB total energy = " << tothecene;
+	(*m_log) << MSG::INFO << "; HEC HLT FEB total energy x = " << totalhecx;
+	(*m_log) << MSG::INFO << "; HEC HLT FEB total energy y = " << totalhecy;
+	(*m_log) << MSG::INFO << "; HEC HLT FEB total energy z = " << totalhecz << endreq;
+        float offlinehecene = sqrt(offlinehecx*offlinehecx + offlinehecy*offlinehecy + offlinehecz*offlinehecz);
+	(*m_log) << MSG::INFO << "HEC offline FEB total energy = " << offlinehecene;
+	(*m_log) << MSG::INFO << "; HEC offline FEB total energy x = " << offlinehecx;
+	(*m_log) << MSG::INFO << "; HEC offline FEB total energy y = " << offlinehecy;
+	(*m_log) << MSG::INFO << "; HEC offline FEB total energy z = " << offlinehecz << endreq;
+// now do EM 
+	int countem = 0;
+	int countem_not_found = 0;
+	int countpem = 0;
+        double totalem = 0;
+        double totalemx = 0;
+        double totalemy = 0;
+        double totalemz = 0;
+        double offlineemx = 0;
+        double offlineemy = 0;
+        double offlineemz = 0;
+	(*m_log) << MSG::INFO << "Compare FEBs in EM " << endreq;
+        doComparison(&m_larfebcol_em,&larfebmap_em,countem,countem_not_found,countpem,totalem,totalemx,totalemy,totalemz,offlineemx,offlineemy,offlineemz);
+        float totemene = sqrt(pow(totalemx,2) + pow(totalemy,2) + pow(totalemz,2));
+	(*m_log) << MSG::INFO << "HLT EM FEBs found : " << countem << endreq;
+	(*m_log) << "EM FEBs not found : " << countem_not_found << endreq;
+	(*m_log) << "EM FEBs with problems : " << countpem << endreq;
+	(*m_log) << "EM FEBs using difflimit  : " << m_difflimit << endreq;
+	(*m_log) << MSG::INFO << "EM HLT FEB total energy = " << totemene;
+	(*m_log) << MSG::INFO << "; EM HLT FEB total energy x = " << totalemx;
+	(*m_log) << MSG::INFO << "; EM HLT FEB total energy y = " << totalemy;
+	(*m_log) << MSG::INFO << "; EM HLT FEB total energy z = " << totalemz << endreq;
+        float offlineemene = sqrt(offlineemx*offlineemx + offlineemy*offlineemy + offlineemz*offlineemz);
+	(*m_log) << MSG::INFO << "EM offline FEB total energy = " << offlineemene;
+	(*m_log) << MSG::INFO << "; EM offline FEB total energy x = " << offlineemx;
+	(*m_log) << MSG::INFO << "; EM offline FEB total energy y = " << offlineemy;
+	(*m_log) << MSG::INFO << "; EM offline FEB total energy z = " << offlineemz << endreq;
+        
+// now do FCAL
+	int countfcal = 0;
+	int countfcal_not_found = 0;
+	int countpfcal = 0;
+        double totalfcal = 0;
+        double totalfcalx = 0;
+        double totalfcaly = 0;
+        double totalfcalz = 0;
+        double offlinefcalx = 0;
+        double offlinefcaly = 0;
+        double offlinefcalz = 0;
+	(*m_log) << MSG::INFO << "Compare FEBs in FCAL " << endreq;
+        doComparison(&m_larfebcol_fcal,&larfebmap_fcal,countfcal,countfcal_not_found,countpfcal,totalfcal,totalfcalx,totalfcaly,totalfcalz,offlinefcalx,offlinefcaly,offlinefcalz);
+        float totfcalene = sqrt(pow(totalfcalx,2) + pow(totalfcaly,2) + pow(totalfcalz,2));
+	(*m_log) << MSG::INFO << "HLT FCAL FEBs found : " << countfcal << endreq;
+	(*m_log) << "FCAL FEBs not found : " << countfcal_not_found << endreq;
+	(*m_log) << "FCAL FEBs with problems : " << countpfcal << endreq;
+	(*m_log) << "FCAL FEBs using difflimit  : " << m_difflimit << endreq;
+	(*m_log) << MSG::INFO << "FCAL HLT FEB total energy = " << totfcalene;
+	(*m_log) << MSG::INFO << "; FCAL HLT FEB total energy x = " << totalfcalx;
+	(*m_log) << MSG::INFO << "; FCAL HLT FEB total energy y = " << totalfcaly;
+	(*m_log) << MSG::INFO << "; FCAL HLT FEB total energy z = " << totalfcalz << endreq;
+        float offlinefcalene = sqrt(offlinefcalx*offlinefcalx + offlinefcaly*offlinefcaly + offlinefcalz*offlinefcalz);
+	(*m_log) << MSG::INFO << "FCAL offline FEB total energy = " << offlinefcalene;
+	(*m_log) << MSG::INFO << "; FCAL offline FEB total energy x = " << offlinefcalx;
+	(*m_log) << MSG::INFO << "; FCAL offline FEB total energy y = " << offlinefcaly;
+	(*m_log) << MSG::INFO << "; FCAL offline FEB total energy z = " << offlinefcalz << endreq;
+        
+#ifndef NDEBUG
+        double febcellx = 0;
+        double febcelly = 0;
+        double febcellz = 0;
+	for( it = larfebmap.begin(); it!=larfebmap.end();++it){
+                LArFebEnergy larfebenergy = (*it).second;
+		(*m_log) << MSG::VERBOSE << "FEB from cell ID ";
+		(*m_log) << MSG::VERBOSE << std::hex;
+		(*m_log) << MSG::VERBOSE << larfebenergy.getFebId() << " ";
+		(*m_log) << MSG::VERBOSE << std::dec;
+		(*m_log) << MSG::VERBOSE << endreq;
+		(*m_log) << MSG::VERBOSE << "FEB from cell ex = " << larfebenergy.getFebEx();
+		(*m_log) << MSG::VERBOSE << "FEB from cell ey = " << larfebenergy.getFebEy();
+		(*m_log) << MSG::VERBOSE << "FEB from cell ez = " << larfebenergy.getFebEz() << endreq;
+                febcellx += larfebenergy.getFebEx();
+                febcelly += larfebenergy.getFebEy();
+                febcellz += larfebenergy.getFebEz();
+		// Delete the pointers now. Don't use after this point.
+		//delete larfebenergy;
+	}
+        double febcelltot = sqrt(pow(febcellx,2) + pow(febcelly,2) + pow(febcellz,2));
+        (*m_log) << MSG::INFO << "FEB from cell total ene = " << febcelltot;
+        (*m_log) << MSG::INFO << "; FEB from cell Ex = " << febcellx;
+        (*m_log) << MSG::INFO << "; FEB from cell Ey = " << febcelly;
+        (*m_log) << MSG::INFO << "; FEB from cell Ez = " << febcellz << endreq;
+
+#endif
+	//larfebmap.clear();
+        //m_larfebcol.clear();
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigFEBValidation::finalize(){
+	(*m_log) << MSG::INFO << "Finishing" << endreq;
+	delete m_log;
+	return StatusCode::SUCCESS;
+}
+
+void TrigFEBValidation::doComparison(LArFebEnergyCollection* febcoll,std::map<HWIdentifier,LArFebEnergy>* larfebmap,int &count,int &count_not_found,int &countp,double &total,double &totalx,double &totaly,double &totalz,double &offlinefebex, double &offlinefebey, double &offlinefebez){
+
+    std::map<HWIdentifier,LArFebEnergy>::iterator it;
+    for(it = larfebmap->begin(); it!=larfebmap->end();++it){
+         LArFebEnergy larfebenergy = (*it).second;
+         offlinefebex += larfebenergy.getFebEx();
+         offlinefebey += larfebenergy.getFebEy();
+         offlinefebez += larfebenergy.getFebEz();
+    }
+//
+    for( LArFebEnergyCollection::const_iterator tit= febcoll->begin(); tit!=febcoll->end(); ++tit) {
+                double ex = (*tit)->getFebEx();
+                double ey = (*tit)->getFebEy();
+                double ez = (*tit)->getFebEz();
+		total = ex*ex;
+		total += ey*ey;
+		total += ez*ez;
+		total = sqrt (total);
+                totalx += ex;
+                totaly += ey;
+                totalz += ez;
+		//if ( total > 1e3 ) {
+                if(!(ex==0&&ey==0&&ez==0)){
+                   count++;
+#ifdef DONTDO
+                   (*m_log) << MSG::VERBOSE << "validation FEB ID = " << std::hex << (*tit)->getFebId() << std::dec ;
+                   (*m_log) << MSG::VERBOSE << "FEB Ex = " << ex;
+                   (*m_log) << MSG::VERBOSE << "FEB Ey = " << ey;
+                   (*m_log) << MSG::VERBOSE << "FEB Ez = " << ez << endreq;
+#endif
+                }
+		bool found = false;
+                for(it = larfebmap->begin(); it!=larfebmap->end();++it){
+                        LArFebEnergy larfebenergy = (*it).second;
+                        unsigned int febid = (*tit)->getFebId();
+                        unsigned int febidshort = febid/0x1000000;
+                        if ( febid == larfebenergy.getFebId() ){
+                          found = true;
+                          float diffx = fabsf(larfebenergy.getFebEx()
+                                - (*tit)->getFebEx() );
+                          float diffxp = 0;
+                          if ( fabsf ((*tit)->getFebEx()) > 0.2 )
+                                diffxp = 100*diffx/(*tit)->getFebEx();
+                          float diffy = fabsf(larfebenergy.getFebEy()
+                                - (*tit)->getFebEy() );
+                          float diffyp = 0;
+                          if ( fabsf ((*tit)->getFebEy()) > 0.2 )
+                                diffyp = 100*diffy/(*tit)->getFebEy();
+                          float diffz = fabsf(larfebenergy.getFebEz()
+                                - (*tit)->getFebEz() );
+                          float diffzp = 0;
+                          if ( fabsf ((*tit)->getFebEz()) > 0.2 )
+                                diffzp = 100*diffz/(*tit)->getFebEz();
+                          if ( (diffx >= m_difflimit) ||
+                               (diffy >= m_difflimit) ||
+                               (diffz >= m_difflimit) ){
+                                countp++; 
+                                (*m_log) << MSG::DEBUG;
+                                (*m_log) << "Found Prob in : ";
+                                //(*m_log) << std::hex;
+                                (*m_log) << std::hex;
+                                (*m_log) << "Offline ID " << larfebenergy.getFebId() << " ";
+                                (*m_log) << "HLT ID " << (*tit)->getFebId() << " ";
+                                (*m_log) << std::dec;
+                                (*m_log) << "Offline Ex " << larfebenergy.getFebEx() << " ";
+                                (*m_log) << "Online Ex " << (*tit)->getFebEx() << " ";
+                                (*m_log) << "Offline Ey " << larfebenergy.getFebEy() << " ";
+                                (*m_log) << "Online Ey " << (*tit)->getFebEy() << " ";
+                                (*m_log) << "Offline Ez " << larfebenergy.getFebEz() << " ";
+                                (*m_log) << "Online Ez " << (*tit)->getFebEz() << " ";
+                                (*m_log) << endreq;
+                                if(febidshort == 0x38) 
+                                   (*m_log) << "This is in the C-side EM barrel" << endreq;
+                                else if(febidshort == 0x39)
+                                   (*m_log) << "This is in the A-side EM barrel" << endreq;
+                                else if(febidshort == 0x3a)
+                                   switch(febid){
+                                     case 0x3a300000:
+                                     case 0x3a308000:
+                                     case 0x3a310000:
+                                     case 0x3a318000:
+                                     case 0x3a320000:
+                                     case 0x3a328000:
+                                     case 0x3a330000:
+                                     case 0x3a340000:
+                                     case 0x3a348000:
+                                     case 0x3a350000:
+                                     case 0x3a358000:
+                                     case 0x3a360000:
+                                     case 0x3a368000:
+                                     case 0x3a370000:
+                                        (*m_log) << "This is in the C-side fcal" << endreq;
+                                        break;
+                                     case 0x3a520000:
+                                     case 0x3a528000:
+                                     case 0x3a1a0000:
+                                     case 0x3a1a8000:
+                                     case 0x3ab20000:
+                                     case 0x3ab28000:
+                                     case 0x3a820000:
+                                     case 0x3a828000:
+                                     case 0x3a530000:
+                                     case 0x3a538000:
+                                     case 0x3a1b0000:
+                                     case 0x3a1b8000:
+                                     case 0x3ab30000:
+                                     case 0x3ab38000:
+                                     case 0x3a830000:
+                                     case 0x3a838000:
+                                     case 0x3a540000:
+                                     case 0x3a548000:
+                                     case 0x3a1c0000:
+                                     case 0x3a1c8000:
+                                     case 0x3ab40000:
+                                     case 0x3ab48000:
+                                     case 0x3a840000:
+                                     case 0x3a848000:
+                                        (*m_log) << "This is in the C-side HEC " << endreq;
+                                        break;
+                                     default: 
+                                        (*m_log) << "This is in the C-side EM endcap" << endreq;
+                                        break;
+                                   }
+                                else if(febidshort == 0x3b)
+                                   switch(febid){
+                                     case 0x3b300000:
+                                     case 0x3b308000:
+                                     case 0x3b310000:
+                                     case 0x3b318000:
+                                     case 0x3b320000:
+                                     case 0x3b328000:
+                                     case 0x3b330000:
+                                     case 0x3b340000:
+                                     case 0x3b348000:
+                                     case 0x3b350000:
+                                     case 0x3b358000:
+                                     case 0x3b360000:
+                                     case 0x3b368000:
+                                     case 0x3b370000:
+                                        (*m_log) << "This is in the A-side fcal" << endreq;
+                                        break;
+                                     case 0x3b520000:
+                                     case 0x3b528000:
+                                     case 0x3b1a0000:
+                                     case 0x3b1a8000:
+                                     case 0x3bb20000:
+                                     case 0x3bb28000:
+                                     case 0x3b820000:
+                                     case 0x3b828000:
+                                     case 0x3b530000:
+                                     case 0x3b538000:
+                                     case 0x3b1b0000:
+                                     case 0x3b1b8000:
+                                     case 0x3bb30000:
+                                     case 0x3bb38000:
+                                     case 0x3b830000:
+                                     case 0x3b838000:
+                                     case 0x3b540000:
+                                     case 0x3b548000:
+                                     case 0x3b1c0000:
+                                     case 0x3b1c8000:
+                                     case 0x3bb40000:
+                                     case 0x3bb48000:
+                                     case 0x3b840000:
+                                     case 0x3b848000:
+                                        (*m_log) << "This is in the A-side HEC " << endreq;
+                                        break;
+                                     default: 
+                                        (*m_log) << "This is in the A-side EM endcap" << endreq;
+                                        break;
+                                   }
+                          } // end if matched FEB within limit
+                          break;
+                        } // enf if matching FEB Ids
+                } // end for loop over FEBs from offline
+           
+		if ( (!found)&&(ex!=0||ey!=0||ez!=0) ) count_not_found++;
+		//}
+	}
+}
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/TrigL2CaloValidation.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/TrigL2CaloValidation.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..0f861e83556ec6ffc0fb7116a9a54e30d713e96c
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/TrigL2CaloValidation.cxx
@@ -0,0 +1,128 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "TrigCaloValidation/TrigL2CaloValidation.h"
+#include "GaudiKernel/MsgStream.h"
+#include "StoreGate/StoreGateSvc.h"
+
+
+TrigL2CaloValidation::TrigL2CaloValidation(const std::string& name,
+	ISvcLocator* pSvcLocator) : Algorithm(name,pSvcLocator)
+{
+	declareProperty("L2EGACollectionName",m_L2egname="HLT_TrigT2CaloEgammaCells");
+	declareProperty("L2TAUCollectionName",m_L2taname="HLT_TrigT2CaloTauCells");
+	declareProperty("L2JETCollectionName",m_L2jename="HLT_TrigT2CaloJetCells");
+
+	// Nothing for the moment
+	return;
+
+}
+
+
+TrigL2CaloValidation::~TrigL2CaloValidation() {}
+
+StatusCode TrigL2CaloValidation::initialize(){
+
+	m_log = new MsgStream(messageService(),name());
+	(*m_log) << MSG::INFO << "Initializing" << endreq;
+
+	if ( service("StoreGateSvc",m_storeGate).isFailure() ){
+		(*m_log) << MSG::ERROR << "Problems to get StoreGateSvc"
+			<< endreq;
+		return StatusCode::FAILURE;
+	}
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2CaloValidation::execute(){
+
+	const DataHandle<CaloCellContainer> AllCalo;
+	if ( m_storeGate->retrieve(AllCalo,"AllCalo").isFailure() ){
+		(*m_log) << MSG::DEBUG << "No Calo Cell Container found"
+                        << endreq;
+		return StatusCode::SUCCESS;
+	}
+	(*m_log) << MSG::INFO << "Got container "; 
+	(*m_log) << "Size : " << AllCalo->size() << endreq;
+	int count_tcellsL=0;
+	int count_tcellspL=0;
+	int count_tcellsT=0;
+	int count_tcellspT=0;
+
+	const DataHandle<CaloCellContainer> L2EGCalo;
+	if ( m_storeGate->retrieve(L2EGCalo,m_L2egname).isFailure() ){
+		(*m_log) << MSG::DEBUG << "No T2CaloEgammaCells Container found"
+                        << endreq;
+	}else
+	LoopOver(L2EGCalo.cptr(),AllCalo.cptr(),count_tcellsL, count_tcellspL,count_tcellsT, count_tcellspT);
+	
+	const DataHandle<CaloCellContainer> L2TACalo;
+	if ( m_storeGate->retrieve(L2TACalo,m_L2taname).isFailure() ){
+		(*m_log) << MSG::DEBUG << "No T2CaloTauCells Container found"
+                        << endreq;
+	}else
+	LoopOver(L2TACalo.cptr(),AllCalo.cptr(),count_tcellsL, count_tcellspL,count_tcellsT, count_tcellspT);
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of LAr cell found " << count_tcellsL << endreq;
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of LAr cell w problems " << count_tcellspL << endreq;
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of Tile cell found " << count_tcellsT << endreq;
+	(*m_log) << MSG::DEBUG << "REGTEST: Number of Tile cell w problems " << count_tcellspT << endreq;
+
+	return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2CaloValidation::finalize(){
+	(*m_log) << MSG::INFO << "Finishing" << endreq;
+	delete m_log;
+	return StatusCode::SUCCESS;
+}
+
+void TrigL2CaloValidation::LoopOver(const CaloCellContainer* L2Calo, const CaloCellContainer* AllCalo,int& count_tcellsL, int & count_tcellspL, int& count_tcellsT,
+int & count_tcellspT){
+	(*m_log) << MSG::INFO << "Got container "; 
+	(*m_log) << "Size : " << L2Calo->size() << endreq;
+	CaloCellContainer::const_iterator tbeg = L2Calo->begin();
+	CaloCellContainer::const_iterator tend = L2Calo->end();
+
+	(*m_log) << MSG::DEBUG << "REGTEST: HLT Container size : "
+		<< L2Calo->size() << endreq;
+	for(; tbeg!=tend ; ++tbeg){
+		CaloCell* tcell = (*tbeg);
+		IdentifierHash tid = tcell->caloDDE()->calo_hash();
+		//if ( tid < AllCalo->size() ) {
+		float tenergy = tcell->energy();
+		CaloGain::CaloGain tgain = tcell->gain();
+		const CaloCell* cell = AllCalo->findCell(tid);
+		if ( cell && cell->caloDDE() ) {
+			float energy = cell->energy();
+			CaloGain::CaloGain gain = cell->gain();
+			float diff = fabsf(tenergy-energy);
+			float diffp = 0;
+			if ( fabsf (energy) > 0.2 )
+				diffp = 100*diff/energy;
+			if ( ( (diff>3&&diffp>1) || gain!= tgain) ) {
+				(*m_log) << MSG::VERBOSE << "REGTEST: ";
+				(*m_log) << "Offline cell found";
+				(*m_log) << " energy : " << cell->energy();
+				(*m_log) << " tenergy : " << tcell->energy();
+				(*m_log) << " gain : " << cell->gain();
+				(*m_log) << " tgain : " << tcell->gain();
+				(*m_log) << " is_tile : " << cell->caloDDE()->is_tile();
+				(*m_log) << endreq;
+				if ( cell->caloDDE()->is_tile() )
+				count_tcellspT++;
+				else
+				count_tcellspL++;
+			}
+		}
+		if ( cell->caloDDE()->is_tile() )
+		count_tcellsT++;
+		else
+		count_tcellsL++;
+		//}
+	}
+}
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_entries.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_entries.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..bb7cc11c34278a2fff4d802fe75022d8d493bcc3
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_entries.cxx
@@ -0,0 +1,18 @@
+
+#include "TrigCaloValidation/TrigCaloValidation.h"
+#include "TrigCaloValidation/TrigCaloClusterValidation.h"
+#include "TrigCaloValidation/TrigL2CaloValidation.h"
+#include "TrigCaloValidation/TrigFEBValidation.h"
+
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+DECLARE_ALGORITHM_FACTORY( TrigCaloValidation )
+DECLARE_ALGORITHM_FACTORY( TrigCaloClusterValidation )
+DECLARE_ALGORITHM_FACTORY( TrigL2CaloValidation )
+DECLARE_ALGORITHM_FACTORY( TrigFEBValidation )
+DECLARE_FACTORY_ENTRIES (TrigCaloValidation) {
+	DECLARE_ALGORITHM( TrigCaloValidation );
+	DECLARE_ALGORITHM( TrigCaloClusterValidation );
+	DECLARE_ALGORITHM( TrigL2CaloValidation );
+	DECLARE_ALGORITHM( TrigFEBValidation );
+}
diff --git a/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_load.cxx b/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_load.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..daf23f61346f736907e4d69ec4f2f74c588f8d11
--- /dev/null
+++ b/Trigger/TrigValidation/TrigCaloValidation/src/components/TrigCaloValidation_load.cxx
@@ -0,0 +1,5 @@
+
+#include "GaudiKernel/LoadFactoryEntries.h"
+
+LOAD_FACTORY_ENTRIES(TrigCaloValidation)
+