From a1e5d7ca2a2e78e7c9f91fa6af5417c2e5212372 Mon Sep 17 00:00:00 2001
From: Johannes Elmsheuser <johannes.elmsheuser@cern.ch>
Date: Mon, 30 Jan 2017 09:34:55 +0100
Subject: [PATCH] Completely remove m_totSig - ATLJETMET-711
 (JetUtils-02-00-41)

	* Completely remove m_totSig - ATLJETMET-711
	* Tagging as JetUtils-02-00-41

2017-01-28  scott snyder  <snyder@bnl.gov>

	* Tagging JetUtils-02-00-40.
	* Update reference file to go with previous change.

2017-01-27  Johannes Elmsheuser  <Johannes.Elmsheuser@cern.ch>
	* Remove xAOD::CaloCluster::SIGNIFICANCE from JetCalcNegativeEnergy
	  ATLJETMET-711
	* Tagging as JetUtils-02-00-39

2016-11-04 Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
	* Updated the CMake configuration to work in AthAnalysisBase
	  as well.
	* Tagging as JetUtils-02-00-38
---
 Reconstruction/Jet/JetUtils/CMakeLists.txt    |   6 +-
 .../JetUtils/JetUtils/JetCaloQualityUtils.h   |   3 +-
 .../Jet/JetUtils/Root/JetCaloQualityUtils.cxx |  10 +-
 .../JetUtils/share/JetUtils_CaloQual_test.ref | 146 +-----------------
 .../JetUtils/src/JetCaloCellQualityUtils.cxx  |   1 -
 5 files changed, 14 insertions(+), 152 deletions(-)

diff --git a/Reconstruction/Jet/JetUtils/CMakeLists.txt b/Reconstruction/Jet/JetUtils/CMakeLists.txt
index 43a64902a3a..8246106a9a9 100644
--- a/Reconstruction/Jet/JetUtils/CMakeLists.txt
+++ b/Reconstruction/Jet/JetUtils/CMakeLists.txt
@@ -1,4 +1,4 @@
-# $Id: CMakeLists.txt 781548 2016-11-01 09:48:16Z elmsheus $
+# $Id: CMakeLists.txt 782306 2016-11-04 09:42:24Z krasznaa $
 ################################################################################
 # Package: JetUtils
 ################################################################################
@@ -7,7 +7,7 @@
 atlas_subdir( JetUtils )
 
 # Declare the package's dependencies:
-if( XAOD_STANDALONE )
+if( XAOD_STANDALONE OR XAOD_ANALYSIS )
    atlas_depends_on_subdirs(
       PUBLIC
       Event/xAOD/xAODCaloEvent
@@ -36,7 +36,7 @@ endif()
 find_package( ROOT COMPONENTS Core Tree RIO )
 
 # Component(s) in the package:
-if( XAOD_STANDALONE )
+if( XAOD_STANDALONE OR XAOD_ANALYSIS )
    atlas_add_library( JetUtils
       JetUtils/*.h JetUtils/*.icc Root/*.cxx
       PUBLIC_HEADERS JetUtils
diff --git a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h
index fda7f481ac9..e859567d49b 100644
--- a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h
+++ b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h
@@ -153,9 +153,8 @@ namespace jet {
   class JetCalcNegativeEnergy: virtual public JetCaloCalculator {
   protected:
     double m_totE;
-    double m_totSig ; // cluster level calculation
 
-    JETCALCFUNCDECL( JetCalcNegativeEnergy, JetAttribute::NegativeE, m_totE=0; m_totSig=0; );
+    JETCALCFUNCDECL( JetCalcNegativeEnergy, JetAttribute::NegativeE, m_totE=0; );
   };
 
   /* @brief total negative energy in a jet*/
diff --git a/Reconstruction/Jet/JetUtils/Root/JetCaloQualityUtils.cxx b/Reconstruction/Jet/JetUtils/Root/JetCaloQualityUtils.cxx
index 0b739a0a78a..eb46a11fc19 100644
--- a/Reconstruction/Jet/JetUtils/Root/JetCaloQualityUtils.cxx
+++ b/Reconstruction/Jet/JetUtils/Root/JetCaloQualityUtils.cxx
@@ -311,16 +311,14 @@ namespace jet {
   // ****************************************************************
   bool JetCalcNegativeEnergy::setupJet(const Jet* ){
     m_totE =0;
-    m_totSig = 0;
     return true;
   }
 
 
   double JetCalcNegativeEnergy::jetCalculation() const {  
 
-    if( m_totSig != 0) return m_totE / m_totSig;
+    return m_totE;
 
-    return 0.;
   }
 
   bool JetCalcNegativeEnergy::processConstituent(xAOD::JetConstituentVector::iterator& iter){
@@ -328,11 +326,7 @@ namespace jet {
    double e = iter->e() ;  // using iter since it is set at the expected scale by the JetCaloCalculations instance
      
     double epos= m_constitExtractor->moment(iter, xAOD::CaloCluster::ENG_POS);
-    double sig = m_constitExtractor->moment(iter, xAOD::CaloCluster::SIGNIFICANCE);
-
-
-    m_totE += (e - epos ) * fabs( sig  );
-    m_totSig += sig;
+    m_totE += (e - epos );
 
     return true;
   }
diff --git a/Reconstruction/Jet/JetUtils/share/JetUtils_CaloQual_test.ref b/Reconstruction/Jet/JetUtils/share/JetUtils_CaloQual_test.ref
index 0cd3deb158b..22ab36d60d0 100644
--- a/Reconstruction/Jet/JetUtils/share/JetUtils_CaloQual_test.ref
+++ b/Reconstruction/Jet/JetUtils/share/JetUtils_CaloQual_test.ref
@@ -1,135 +1,5 @@
-Warning in <TClass::TClass>: no dictionary for class DataHeader_p5 is available
-Warning in <TClass::TClass>: no dictionary for class DataHeaderElement_p5 is available
-Warning in <TClass::TClass>: no dictionary for class DataHeaderForm_p5 is available
-Warning in <TClass::TClass>: no dictionary for class IOVMetaDataContainer_p1 is available
-Warning in <TClass::TClass>: no dictionary for class IOVPayloadContainer_p1 is available
-Warning in <TClass::TClass>: no dictionary for class IOVPayloadContainer_p1::CondAttrListCollection_p1 is available
-Warning in <TClass::TClass>: no dictionary for class IOVPayloadContainer_p1::CondAttrListEntry_p1 is available
-Warning in <TClass::TClass>: no dictionary for class IOVPayloadContainer_p1::IOVRange_p1 is available
-Warning in <TClass::TClass>: no dictionary for class AttrListIndexes is available
-Warning in <TClass::TClass>: no dictionary for class EventInfo_p4 is available
-Warning in <TClass::TClass>: no dictionary for class EventID_p1 is available
-Warning in <TClass::TClass>: no dictionary for class EventType_p3 is available
-Warning in <TClass::TClass>: no dictionary for class TriggerInfo_p2 is available
-Warning in <TClass::TClass>: no dictionary for class TPCnvTokenList_p1 is available
-Warning in <TClass::TClass>: no dictionary for class TPObjRef is available
-Warning in <TClass::TClass>: no dictionary for class TPObjRef::typeID_t is available
-Warning in <TClass::TClass>: no dictionary for class SG::AuxVectorBase is available
-Warning in <TClass::TClass>: no dictionary for class SG::AuxVectorData is available
-Warning in <TClass::TClass>: no dictionary for class ILockable is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<CaloClusterCellLink> is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Vertex_v1 is available
-Warning in <TClass::TClass>: no dictionary for class SG::AuxElement is available
-Warning in <TClass::TClass>: no dictionary for class SG::IAuxElement is available
-Warning in <TClass::TClass>: no dictionary for class Trk::TrackCollection_tlp5 is available
-Warning in <TClass::TClass>: no dictionary for class TPCnvToken_p1 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::TrackCollection_p1 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::Track_p4 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::TrackStateOnSurface_p3 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::TrackParameters_p2 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::HepSymMatrix_p1 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::LocalParameters_p1 is available
-Warning in <TClass::TClass>: no dictionary for class InDet::Track_tlp2 is available
-Warning in <TClass::TClass>: no dictionary for class InDet::PixelClusterOnTrack_p2 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink_p1<unsigned int> is available
-Warning in <TClass::TClass>: no dictionary for class InDet::SCT_ClusterOnTrack_p2 is available
-Warning in <TClass::TClass>: no dictionary for class InDet::TRT_DriftCircleOnTrack_p2 is available
-Warning in <TClass::TClass>: no dictionary for class CaloClusterCellLinkContainer is available
-Warning in <TClass::TClass>: no dictionary for class CaloClusterCellLink is available
-Warning in <TClass::TClass>: no dictionary for class DataLink<CaloCellContainer> is available
-Warning in <TClass::TClass>: no dictionary for class DataLinkBase is available
-Warning in <TClass::TClass>: no dictionary for class pair<unsigned int,double> is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Photon_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Egamma_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::IParticle is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::CaloCluster_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Electron_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TrackParticle_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::CaloClusterAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::AuxContainerBase is available
-Warning in <TClass::TClass>: no dictionary for class SG::IAuxStore is available
-Warning in <TClass::TClass>: no dictionary for class SG::IConstAuxStore is available
-Warning in <TClass::TClass>: no dictionary for class SG::IAuxStoreIO is available
-Warning in <TClass::TClass>: no dictionary for class SG::IAuxStoreHolder is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::EventInfo_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::EventAuxInfo_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::AuxInfoBase is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthEvent_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthEventAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::TruthVertex_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLinkBase is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::TruthParticle_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthParticle_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthParticleAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthVertex_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TruthVertexAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TrackParticleAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::Vertex_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::VertexAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::TrackParticle_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MuonSegment_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MuonSegmentAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Jet_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::JetAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::IParticle> > is available
-Warning in <TClass::TClass>: no dictionary for class CaloCompactCellContainer is available
-Warning in <TClass::TClass>: no dictionary for class TileCellVec is available
-Warning in <TClass::TClass>: no dictionary for class TileMuContainer_p1 is available
-Warning in <TClass::TClass>: no dictionary for class TileMu_p1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingETComponent_v1 is available
-Warning in <TClass::TClass>: no dictionary for class RecoTimingObj_p1 is available
-Warning in <TClass::TClass>: no dictionary for class LArNoisyROSummary_p3 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingETAuxComponentMap_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<xAOD::MissingETContainer_v1> is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingET_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::ElectronAuxContainer_v2 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::CaloCluster_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MuonAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::MuonSegment_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TauJet_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::PFO_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::Muon_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::PFOAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingETAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::BTaggingAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::PhotonAuxContainer_v2 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::BTagging_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::TauJetAuxContainer_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::Jet_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::PFO_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class CaloCalibrationHitContainer_p3 is available
-Warning in <TClass::TClass>: no dictionary for class MuonCaloEnergyContainer_p1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::BTagging_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::BTagVertex_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::CaloClusterBadChannelData_v1 is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<Trk::Track> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<CaloClusterCellLinkContainer> is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<Trk::Segment> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::Muon_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::Electron_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class ElementLink<DataVector<xAOD::Photon_v1> > is available
-Warning in <TClass::TClass>: no dictionary for class Trk::PseudoMeasurementOnTrack_p2 is available
-Warning in <TClass::TClass>: no dictionary for class Trk::Surface_p2 is available
-Warning in <TClass::TClass>: no dictionary for class EventStreamInfo_p3 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::EventFormat_v1 is available
-Warning in <TClass::TClass>: no dictionary for class EventBookkeeperCollection_p2 is available
-Warning in <TClass::TClass>: no dictionary for class pair<unsigned int,string> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::Vertex_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::Jet_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::BTagging_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::Electron_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::Muon_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::TauJet_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::MuonSegment_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::CaloCluster_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::TruthEvent_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::TruthVertex_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::Photon_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::PFO_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::TrackParticle_v1> is available
-Warning in <TClass::TClass>: no dictionary for class DataVector<xAOD::TruthParticle_v1> is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingETComponentMap_v1 is available
-Warning in <TClass::TClass>: no dictionary for class xAOD::MissingETContainer_v1 is available
+/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 144, which is not a valid value for type 'bool'
+/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 80, which is not a valid value for type 'bool'
  cluster e=26832.6 eta=-0.92739  sig=56.6167
  cluster e=21128.1 eta=-0.974543  sig=47.631
  cluster e=16134 eta=0.640434  sig=64.9049
@@ -146,29 +16,29 @@ nLeadCell = 7
 ootFrac = 0
 avgLArQF = 63.6055
 hecQual = 0
-negE = -297.557
+negE = -3616.2
 nLeadCell = 4
 ootFrac = 0
 avgLArQF = 53.7166
 hecQual = 0
-negE = -561.101
+negE = -3395.96
 nLeadCell = 9
 ootFrac = 0.0929392
 avgLArQF = 87.5256
 hecQual = 0
-negE = -429.108
+negE = -5163.76
 nLeadCell = 6
 ootFrac = 0.00847961
 avgLArQF = 523.398
 hecQual = 0
-negE = -585.708
+negE = -6179.45
 nLeadCell = 10
 ootFrac = 0.0336657
 avgLArQF = 8762.78
 hecQual = 0
-negE = -465.821
+negE = -14333.7
 nLeadCell = 2
 ootFrac = 0
 avgLArQF = 73.1208
 hecQual = 0
-negE = -393.947
+negE = -727.051
diff --git a/Reconstruction/Jet/JetUtils/src/JetCaloCellQualityUtils.cxx b/Reconstruction/Jet/JetUtils/src/JetCaloCellQualityUtils.cxx
index fbf9757f005..16ed68576f1 100644
--- a/Reconstruction/Jet/JetUtils/src/JetCaloCellQualityUtils.cxx
+++ b/Reconstruction/Jet/JetUtils/src/JetCaloCellQualityUtils.cxx
@@ -215,7 +215,6 @@ namespace jet {
 
   bool JetCalcNegativeEnergy_fromCells::processCell(const CaloCell *theCell, weight_t)
   {
-    m_totSig=1;
     if(theCell->e()<-2500)
       m_totE += theCell->e();
     return true;
-- 
GitLab