diff --git a/TileCalorimeter/TileExample/TileRecEx/share/DoTileOptimalFilteringAlgsRttHistograms.C b/TileCalorimeter/TileExample/TileRecEx/share/DoTileOptimalFilteringAlgsRttHistograms.C index 8c8179ff0884bd493703328631658a3e2327913d..893cb463cced22f2060451d9ebaf976481ce819f 100644 --- a/TileCalorimeter/TileExample/TileRecEx/share/DoTileOptimalFilteringAlgsRttHistograms.C +++ b/TileCalorimeter/TileExample/TileRecEx/share/DoTileOptimalFilteringAlgsRttHistograms.C @@ -1,3 +1,7 @@ +/* + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration +*/ + // This ROOT MACRO produces histograms representing distribution of output // quantities (energy, time, pedestal, chi2) from Optimal Filtering Algorithms // (TileOptATLAS, TileOpt2, TileFit) in the case of existence of corresponding @@ -273,6 +277,7 @@ class TileOFA: public TileOfaInterface { // "TileOfaDescription" which describes characteristics particular // Optimal Filtering Algorithm for particular gain. TileOFA(TileOfaDescription tileOfaDescr); + TileOFA(const TileOFA &) = delete; //delete copy virtual ~TileOFA(); virtual void SetEnergyUniGainThreshold(Float_t energyUniGainThreshold); virtual void SetEnergyLowGainThreshold(Float_t energyLowGainThreshold); @@ -282,6 +287,7 @@ class TileOFA: public TileOfaInterface { virtual void SetBadModules(TObjArray* modules); virtual void MakeAndFillRttHistogramsFromFile(TFile* inputFile); virtual void SaveRttHistogramsToFile(TFile* outputFile); + private: // Copy constructor are declared as private and have no definitions @@ -479,16 +485,16 @@ class TileOFA: public TileOfaInterface { Int_t runNumber_; // Two dimensional histogram representing average energy // distribution vis channel and module - TProfile2D* energyVsModuleAndChannel_[4]; + TProfile2D* energyVsModuleAndChannel_[4]={}; // Two dimensional histogram representing average time // distribution vis channel and module - TProfile2D* timeVsModuleAndChannel_[4]; + TProfile2D* timeVsModuleAndChannel_[4]={}; // Two dimensional histogram representing average pedestal // distribution vis channel and module - TProfile2D* pedestalVsModuleAndChannel_[4]; + TProfile2D* pedestalVsModuleAndChannel_[4]={}; // Two dimensional histogram representing average chi2 // distribution vis channel and module - TProfile2D* chi2VsModuleAndChannel_[4]; + TProfile2D* chi2VsModuleAndChannel_[4]={}; // Tree in input ntuple with name h2000_map. TTree* h2000_map_tree_; // Represents channel status from branch "bad" in tree "h2000_map" and @@ -528,6 +534,7 @@ class TileOfaCollection: public TileOfaInterface { // parameter is initial capacity of collection. TileOfaCollection(Int_t initialSize); virtual ~TileOfaCollection(); + TileOfaCollection(const TileOfaCollection &) = delete; // Adds to collection the object of type "TileOfaInterface". void Add(TileOfaInterface* algorithm); virtual void SetEnergyUniGainThreshold(Float_t energyUniGainThreshold); diff --git a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorSD.hh b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorSD.hh index 08501271ef53e3e9ce49eef2896b8862cb60b3a1..5290772c900b4196c18b2d2347e382f2ad3b38f4 100644 --- a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorSD.hh +++ b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/src/CombinedScintillatorSD.hh @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -22,7 +22,8 @@ class G4Step; class G4HCofThisEvent; class TileTBID; -class CombinedScintillatorDescription; +class TileSimHit; +class Identifier; class CombinedScintillatorSD : public G4VSensitiveDetector { @@ -40,9 +41,9 @@ private: static const int N_CELLS = 2; - int m_nhits[N_CELLS]; - TileSimHit* m_hit[N_CELLS]; - Identifier m_id[N_CELLS]; + int m_nhits[N_CELLS]={}; + TileSimHit* m_hit[N_CELLS]={}; + Identifier m_id[N_CELLS]={}; // The hits collections SG::WriteHandle<TileHitVector> m_HitColl; }; diff --git a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelSD.hh b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelSD.hh index 2dfb8050ad9cc9e6b0df5864a5e930490a07d13d..c833b093fbbb74578d098e79e5ff24c055d7602c 100644 --- a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelSD.hh +++ b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/src/PhantomBarrelSD.hh @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ //************************************************************ @@ -28,6 +28,8 @@ class G4TouchableHistory; class G4Step; class G4HCofThisEvent; class TileTBID; +class TileSimHit; +class Identifier; class PhantomBarrelSD: public G4VSensitiveDetector { public: @@ -45,9 +47,9 @@ class PhantomBarrelSD: public G4VSensitiveDetector { static const int N_CELLS = 8; - int m_nhits[N_CELLS]; - TileSimHit* m_hit[N_CELLS]; - Identifier m_id[N_CELLS]; + int m_nhits[N_CELLS]={}; + TileSimHit* m_hit[N_CELLS]={}; + Identifier m_id[N_CELLS]={}; // The hits collections SG::WriteHandle<TileHitVector> m_HitColl; }; diff --git a/TileCalorimeter/TileMonitoring/src/TileRawChannelMonTool.h b/TileCalorimeter/TileMonitoring/src/TileRawChannelMonTool.h index 261a28fc523d0bead57d3da7bb75b05a068ffa27..5dfc4b422f75e1f3f5184ca4af8cb403a22e3b16 100644 --- a/TileCalorimeter/TileMonitoring/src/TileRawChannelMonTool.h +++ b/TileCalorimeter/TileMonitoring/src/TileRawChannelMonTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ // ******************************************************************** @@ -172,7 +172,7 @@ class TileRawChannelMonTool: public TilePaterMonTool { bool m_is12bit{}; SG::ReadHandleKey<TileDQstatus> m_DQstatusKey; int m_intCalibUnit{}; - double m_dac2Charge[3]; + double m_dac2Charge[3]={}; }; #endif diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileFilterManager.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileFilterManager.h index 6542d00ae6e65c2786cef57f408230d04177a008..01143b8d21ffbbb6282b49dd1c0d3d873207a642 100644 --- a/TileCalorimeter/TileRecUtils/TileRecUtils/TileFilterManager.h +++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileFilterManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef TILERECUTILS_TILEFILTERMANAGER_H @@ -14,14 +14,19 @@ // ************************************************************************************ -#include "TileRecUtils/TileFitter.h" -#include "TileRecUtils/TileFilterResult.h" -#include <CLHEP/Matrix/Matrix.h> -#include <CLHEP/Matrix/Vector.h> +#include "TileRecUtils/TileFitter.h" //member vector template param + #include <string> #include <vector> +class TileFilterResult; + +namespace CLHEP{ + class HepVector; + class HepMatrix; +} + //using namespace CLHEP; /** Auxiliary class for TileRawChannelMakerManyAmps. */ diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelBuilderMF.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelBuilderMF.h index 594a0185f7d73219c9e5e1b5a1db58e2a4c64252..cb178d64d63ad8f8f89db9c8c3fd810ebcf316ee 100644 --- a/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelBuilderMF.h +++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileRawChannelBuilderMF.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ #ifndef TILERECUTILS_TILERAWCHANNELBUILDERMF_H @@ -21,13 +21,14 @@ ********************************************************************/ // Tile includes -#include "TileRecUtils/TileRawChannelBuilder.h" -#include "TileConditions/ITileCondToolOfc.h" -#include "TileConditions/TileCondToolTiming.h" -#include "TileConditions/TileCondToolNoiseSample.h" +#include "TileRecUtils/TileRawChannelBuilder.h" //base class +#include "TileConditions/ITileCondToolOfc.h" //ToolHandle template parameter +#include "TileConditions/TileCondToolNoiseSample.h" //ToolHandle template parameter +#include <vector> +#include <string> class TileHWID; -//class TileFilterManager; +class TileDigits; class TileRawChannelBuilderMF: public TileRawChannelBuilder { public: diff --git a/TileCalorimeter/TileRecUtils/src/TileFilterManager.cxx b/TileCalorimeter/TileRecUtils/src/TileFilterManager.cxx index 6032311fc7f0f10accbe9f472806a3f21cebfe5c..a133c2864f3febe405774aabf825eee59241591d 100644 --- a/TileCalorimeter/TileRecUtils/src/TileFilterManager.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileFilterManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ // ************************************************************************************** @@ -11,7 +11,9 @@ #include "TileRecUtils/TileFilterManager.h" #include "TileConditions/TileInfo.h" - +#include "TileRecUtils/TileFilterResult.h" +#include <CLHEP/Matrix/Matrix.h> +#include <CLHEP/Matrix/Vector.h> #include <algorithm> #include <iostream> #include "boost/io/ios_state.hpp" @@ -328,7 +330,7 @@ int TileFilterManager::fitDigits2(TileFilterResult &tResult, bool lDebug) { // double chiCutLow[4] = {chiCut, 1.50, 0.75, 0.}; const int Ndim = 12; double chiAmp[Ndim]; - int iAmp[Ndim]; + int iAmp[Ndim] = {}; int Npile = 0; for (int i = 2; i < Npar; i++) { chiAmp[Npile] = fitAmp[i] / fitErr[i]; @@ -346,8 +348,6 @@ int TileFilterManager::fitDigits2(TileFilterResult &tResult, bool lDebug) { // chiMin = chiCutLow[ndrop]; int idrop = -1; for (int i = 0; i < Npile; i++) { - // if(debug) std::cout << "drop candidate: i=" << i << ", iAmp=" << iAmp[i] - // << ", chiAmp=" << chiAmp[i] <<", chiMin=" << chiMin << std::endl; if (iAmp[i] < 0) continue; if (chiAmp[i] > chiMin) continue; chiMin = chiAmp[i]; diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilderMF.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilderMF.cxx index 609bc524ca801ef89083bcc78a5c280c6ee90690..a10756498d8f4a459e43f864798db88f1a3d15e8 100644 --- a/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilderMF.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelBuilderMF.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ // small hack to enable datapool usage @@ -23,8 +23,6 @@ #include <algorithm> #include <cmath> -// C++ STL includes -#include <vector> // for matrix treatment #include "CLHEP/Matrix/Matrix.h" @@ -214,8 +212,8 @@ TileRawChannel* TileRawChannelBuilderMF::rawChannel(const TileDigits* tiledigits // begin COF iteration for amplitude greater than m_ampMinThresh (15 ADC) and within +/- bunch spacing/2 int n = 7; CLHEP::HepMatrix A(n, n, 0); - int t; - double signalModel[7]; + int t=0; + double signalModel[7]={}; bool goodEne = true; t_ch = -phase; for (int it = 0; it < m_maxIterations; it++) { @@ -435,7 +433,7 @@ TileRawChannel* TileRawChannelBuilderMF::rawChannel(const TileDigits* tiledigits } } - // we know that time is zero here, put negagive chi^2 to indicate that + // we know that time is zero here, put negative chi^2 to indicate that for (k = 0; k < m_digits.size(); ++k) { double dqf = (signalModel[k] - (m_digits[k] - ped_ch)); MFchi2 += dqf * dqf;