diff --git a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloCalculations.h b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloCalculations.h index ad7d7a1990ad73ad47a1d2d9212b5b11ff491899..2014380bc2f50ea127aa1120082f4720f5581d30 100644 --- a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloCalculations.h +++ b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloCalculations.h @@ -8,7 +8,6 @@ #define JETUTILS_JETCALOHELPER_H #include "xAODJet/JetConstituentVector.h" -#include "xAODJet/JetAttributes.h" #include <vector> @@ -112,8 +111,8 @@ namespace jet { protected: std::string m_name; - xAOD::JetAttribute::AttributeID m_id; // unused for now. - CaloConstitHelpers::CaloConstitExtractor *m_constitExtractor; // used to retrieve the cluster moment from the constituent (which can be a PFO object or a cluster) + xAOD::JetAttribute::AttributeID m_id{}; // unused for now. + CaloConstitHelpers::CaloConstitExtractor *m_constitExtractor{}; // used to retrieve the cluster moment from the constituent (which can be a PFO object or a cluster) }; diff --git a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h index e859567d49bcce80b479c6ae834d8efd5e8dfd9c..dd24210467a081a1f43ed61b63939dc81cfa7bdf 100644 --- a/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h +++ b/Reconstruction/Jet/JetUtils/JetUtils/JetCaloQualityUtils.h @@ -18,7 +18,8 @@ #include "JetUtils/JetCaloCalculations.h" #include "xAODJet/Jet.h" -#include "xAODJet/JetAttributes.h" +#include <vector> +//#include "xAODJet/JetAttributes.h" namespace jet { @@ -83,8 +84,8 @@ namespace jet { class JetCalcnLeadingCells: virtual public JetCaloCalculator { protected: std::vector<double> m_cell_energies; - double m_sumE_cells; - double m_threshold; + double m_sumE_cells{}; + double m_threshold{}; JETCALCFUNCDECL( JetCalcnLeadingCells, JetAttribute::N90Constituents, m_threshold = 0.9;); }; @@ -93,7 +94,7 @@ namespace jet { /* @brief Compute Out-Of-Time energy fraction */ class JetCalcOutOfTimeEnergyFraction: virtual public JetCaloCalculator { protected: - double m_sumE,m_sumE_OOT; + double m_sumE{},m_sumE_OOT{}; public: double timecut; bool onlyPosEnergy; @@ -104,7 +105,7 @@ namespace jet { class JetCalcTimeCells: virtual public JetCaloCalculator { protected: - double m_time,m_norm; + double m_time{},m_norm{}; JETCALCFUNCDECL( JetCalcTimeCells, JetAttribute::Timing, m_norm=0; ); @@ -114,7 +115,7 @@ namespace jet { /* @brief Compute the jet average quality factor */ class JetCalcAverageLArQualityF: virtual public JetCaloCalculator { protected: - double m_qf,m_norm; + double m_qf{},m_norm{}; bool m_useTile; JETCALCFUNCDECL( JetCalcAverageLArQualityF, JetAttribute::AverageLArQF, m_useTile=false; m_norm=0;); @@ -123,7 +124,7 @@ namespace jet { /* @brief Compute the jet quality factor information*/ class JetCalcQuality: virtual public JetCaloCalculator { protected: - double m_totE, m_badE; + double m_totE{}, m_badE{}; public: int LArQualityCut; @@ -152,7 +153,7 @@ namespace jet { /* @brief total negative energy in a jet*/ class JetCalcNegativeEnergy: virtual public JetCaloCalculator { protected: - double m_totE; + double m_totE{}; JETCALCFUNCDECL( JetCalcNegativeEnergy, JetAttribute::NegativeE, m_totE=0; ); }; @@ -160,7 +161,7 @@ namespace jet { /* @brief total negative energy in a jet*/ class JetCalcCentroid: virtual public JetCaloCalculator { protected: - double m_totE, m_centroid_x, m_centroid_y, m_centroid_z; + double m_totE{}, m_centroid_x{}, m_centroid_y{}, m_centroid_z{}; JETCALCFUNCDECL( JetCalcCentroid, JetAttribute::CentroidR, m_totE=0; ); @@ -169,8 +170,8 @@ namespace jet { /// Fraction of Bad energy in jet. From cluster moment ENG_BAD_CELLS class JetCalcBadCellsFrac : virtual public JetCaloCalculator { protected: - double m_totE; - double m_badE; + double m_totE{}; + double m_badE{}; JETCALCFUNCDECL( JetCalcBadCellsFrac, JetAttribute::BchCorrCell, setName("BchCorrCell");); }; diff --git a/Reconstruction/Jet/JetUtils/JetUtils/TiledEtaPhiMap.h b/Reconstruction/Jet/JetUtils/JetUtils/TiledEtaPhiMap.h index 41ccc8ab9d3e65e128c48a4e676c426d11fc6e54..f7a783b31e78a6d096f7832cda80e5a55548b839 100644 --- a/Reconstruction/Jet/JetUtils/JetUtils/TiledEtaPhiMap.h +++ b/Reconstruction/Jet/JetUtils/JetUtils/TiledEtaPhiMap.h @@ -20,9 +20,8 @@ #include <list> #include <vector> -#include <iostream> -#include <math.h> +#include <cmath> #include "JetUtils/JetDistances.h" @@ -32,7 +31,7 @@ namespace JetTiledMap { struct utils { static double DR2(double eta1, double phi1, double eta2,double phi2) { double deta = eta1 - eta2; - static double pi = acos(-1.0); + static double pi = std::acos(-1.0); static double twopi = 2.0*pi; double dphi = phi1 - phi2; while ( dphi > pi ) dphi -= twopi; @@ -106,13 +105,13 @@ namespace JetTiledMap { protected: - double m_etarange ; - double m_halfetarange; - double m_rmax; - size_t m_ndivX, m_ndivY; - double m_sizeX,m_sizeY; + double m_etarange{} ; + double m_halfetarange{}; + double m_rmax{}; + size_t m_ndivX{}, m_ndivY{}; + double m_sizeX{},m_sizeY{}; - unsigned int m_size; + unsigned int m_size{}; /// index of the tile containing p diff --git a/Reconstruction/Jet/JetUtils/Root/JetCaloCalculations.cxx b/Reconstruction/Jet/JetUtils/Root/JetCaloCalculations.cxx index 8b76f95509a9fcd6ab42fa9c4704d5d8f0133965..fcb24a21c08a1d10d7429ce536f987a9bbd86b62 100644 --- a/Reconstruction/Jet/JetUtils/Root/JetCaloCalculations.cxx +++ b/Reconstruction/Jet/JetUtils/Root/JetCaloCalculations.cxx @@ -3,14 +3,14 @@ */ -#include "xAODJet/Jet.h" + #include "xAODJet/JetAccessorMap.h" #include "xAODCaloEvent/CaloCluster.h" #include "xAODPFlow/PFO.h" #include "JetUtils/JetCaloCalculations.h" - +#include "xAODJet/JetAttributes.h" //////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////