From 1eac125fff40332fdc2892b9afeb47ebbfd3261a Mon Sep 17 00:00:00 2001 From: scott snyder Date: Fri, 8 Feb 2019 05:34:41 +0100 Subject: [PATCH] HitAnalysis: Comply with ATLAS naming conventions. Private data members should start with m_. --- .../Tools/HitAnalysis/src/TGCHitAnalysis.cxx | 182 +++++++++--------- .../Tools/HitAnalysis/src/TGCHitAnalysis.h | 44 ++--- 2 files changed, 113 insertions(+), 113 deletions(-) diff --git a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx index d6e6282615c..b87d33aa52d 100755 --- a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx +++ b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TGCHitAnalysis.h" @@ -23,24 +23,24 @@ TGCHitAnalysis::TGCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator) - , h_hits_x(0) - , h_hits_y(0) - , h_hits_z(0) - , h_hits_r(0) - , h_xy(0) - , h_rz(0) - , h_hits_eta(0) - , h_hits_phi(0) - , h_hits_lx(0) - , h_hits_ly(0) - , h_hits_lz(0) - , h_hits_dcx(0) - , h_hits_dcy(0) - , h_hits_dcz(0) - , h_hits_time(0) - , h_hits_edep(0) - , h_hits_kine(0) - , h_hits_step(0) + , m_h_hits_x(0) + , m_h_hits_y(0) + , m_h_hits_z(0) + , m_h_hits_r(0) + , m_h_xy(0) + , m_h_rz(0) + , m_h_hits_eta(0) + , m_h_hits_phi(0) + , m_h_hits_lx(0) + , m_h_hits_ly(0) + , m_h_hits_lz(0) + , m_h_hits_dcx(0) + , m_h_hits_dcy(0) + , m_h_hits_dcz(0) + , m_h_hits_time(0) + , m_h_hits_edep(0) + , m_h_hits_kine(0) + , m_h_hits_step(0) , m_hits_x(0) , m_hits_y(0) , m_hits_z(0) @@ -74,77 +74,77 @@ StatusCode TGCHitAnalysis::initialize() { CHECK(m_thistSvc.retrieve()); /** Histograms**/ - h_hits_x = new TH1D("h_hits_tgc_x","hits_x", 100,-5000, 5000); - h_hits_x->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_x->GetName(), h_hits_x)); + m_h_hits_x = new TH1D("h_hits_tgc_x","hits_x", 100,-5000, 5000); + m_h_hits_x->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_x->GetName(), m_h_hits_x)); - h_hits_y = new TH1D("h_hits_tgc_y", "hits_y", 100,-5000,5000); - h_hits_y->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_y->GetName(), h_hits_y)); + m_h_hits_y = new TH1D("h_hits_tgc_y", "hits_y", 100,-5000,5000); + m_h_hits_y->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_y->GetName(), m_h_hits_y)); - h_hits_z = new TH1D("h_hits_tgc_z", "hits_z", 100,-12000,12000); - h_hits_z->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_z->GetName(), h_hits_z)); + m_h_hits_z = new TH1D("h_hits_tgc_z", "hits_z", 100,-12000,12000); + m_h_hits_z->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_z->GetName(), m_h_hits_z)); - h_hits_r = new TH1D("h_hits_tgc_r", "hits_r", 100,2000,10000); - h_hits_r->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_r->GetName(), h_hits_r)); + m_h_hits_r = new TH1D("h_hits_tgc_r", "hits_r", 100,2000,10000); + m_h_hits_r->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_r->GetName(), m_h_hits_r)); - h_xy = new TH2D("h_tgc_xy", "xy", 100,-5000.,5000.,100, -5000., 5000.); - h_xy->StatOverflows(); - CHECK(m_thistSvc->regHist( m_path+h_xy->GetName(), h_xy)); + m_h_xy = new TH2D("h_tgc_xy", "xy", 100,-5000.,5000.,100, -5000., 5000.); + m_h_xy->StatOverflows(); + CHECK(m_thistSvc->regHist( m_path+m_h_xy->GetName(), m_h_xy)); - h_rz = new TH2D("h_tgc_rz", "rz", 100,2000.,10000.,100, -12000., 12000.); - h_rz->StatOverflows(); - CHECK(m_thistSvc->regHist( m_path+h_rz->GetName(), h_rz)); + m_h_rz = new TH2D("h_tgc_rz", "rz", 100,2000.,10000.,100, -12000., 12000.); + m_h_rz->StatOverflows(); + CHECK(m_thistSvc->regHist( m_path+m_h_rz->GetName(), m_h_rz)); - h_hits_eta = new TH1D("h_hits_tgc_eta", "hits_eta", 100,-10.0,10.0); - h_hits_eta->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_eta->GetName(), h_hits_eta)); + m_h_hits_eta = new TH1D("h_hits_tgc_eta", "hits_eta", 100,-10.0,10.0); + m_h_hits_eta->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_eta->GetName(), m_h_hits_eta)); - h_hits_phi = new TH1D("h_hits_tgc_phi", "hits_phi", 100,-3.2,3.2); - h_hits_phi->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_phi->GetName(), h_hits_phi)); + m_h_hits_phi = new TH1D("h_hits_tgc_phi", "hits_phi", 100,-3.2,3.2); + m_h_hits_phi->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_phi->GetName(), m_h_hits_phi)); - h_hits_lx = new TH1D("h_hits_tgc_lx","hits_lx", 100,-800, 800); - h_hits_lx->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_lx->GetName(), h_hits_lx)); + m_h_hits_lx = new TH1D("h_hits_tgc_lx","hits_lx", 100,-800, 800); + m_h_hits_lx->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_lx->GetName(), m_h_hits_lx)); - h_hits_ly = new TH1D("h_hits_tgc_ly", "hits_ly", 100,-800,800); - h_hits_ly->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_ly->GetName(), h_hits_ly)); + m_h_hits_ly = new TH1D("h_hits_tgc_ly", "hits_ly", 100,-800,800); + m_h_hits_ly->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_ly->GetName(), m_h_hits_ly)); - h_hits_lz = new TH1D("h_hits_tgc_lz", "hits_lz", 100,-800,800); - h_hits_lz->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_lz->GetName(), h_hits_lz)); + m_h_hits_lz = new TH1D("h_hits_tgc_lz", "hits_lz", 100,-800,800); + m_h_hits_lz->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_lz->GetName(), m_h_hits_lz)); - h_hits_dcx = new TH1D("h_hits_tgc_dcx","hits_dcx", 100,-1, 1); - h_hits_dcx->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_dcx->GetName(), h_hits_dcx)); + m_h_hits_dcx = new TH1D("h_hits_tgc_dcx","hits_dcx", 100,-1, 1); + m_h_hits_dcx->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_dcx->GetName(), m_h_hits_dcx)); - h_hits_dcy = new TH1D("h_hits_tgc_dcy", "hits_dcy", 100,-1,1); - h_hits_dcy->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_dcy->GetName(), h_hits_dcy)); + m_h_hits_dcy = new TH1D("h_hits_tgc_dcy", "hits_dcy", 100,-1,1); + m_h_hits_dcy->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_dcy->GetName(), m_h_hits_dcy)); - h_hits_dcz = new TH1D("h_hits_tgc_dcz", "hits_dcz", 100,-1,1); - h_hits_dcz->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_dcz->GetName(), h_hits_dcz)); + m_h_hits_dcz = new TH1D("h_hits_tgc_dcz", "hits_dcz", 100,-1,1); + m_h_hits_dcz->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_dcz->GetName(), m_h_hits_dcz)); - h_hits_time = new TH1D("h_hits_tgc_time","hits_time", 100,0, 250); - h_hits_time->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_time->GetName(), h_hits_time)); + m_h_hits_time = new TH1D("h_hits_tgc_time","hits_time", 100,0, 250); + m_h_hits_time->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_time->GetName(), m_h_hits_time)); - h_hits_edep = new TH1D("h_hits_tgc_edep", "hits_edep", 100,0,0.5); - h_hits_edep->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_edep->GetName(), h_hits_edep)); + m_h_hits_edep = new TH1D("h_hits_tgc_edep", "hits_edep", 100,0,0.5); + m_h_hits_edep->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_edep->GetName(), m_h_hits_edep)); - h_hits_kine = new TH1D("h_hits_tgc_kine", "hits_kine", 100,0,1000); - h_hits_kine->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_kine->GetName(), h_hits_kine)); + m_h_hits_kine = new TH1D("h_hits_tgc_kine", "hits_kine", 100,0,1000); + m_h_hits_kine->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_kine->GetName(), m_h_hits_kine)); - h_hits_step = new TH1D("h_hits_tgc_step", "hits_step", 100,0,50); - h_hits_step->StatOverflows(); - CHECK(m_thistSvc->regHist(m_path + h_hits_step->GetName(), h_hits_step)); + m_h_hits_step = new TH1D("h_hits_tgc_step", "hits_step", 100,0,50); + m_h_hits_step->StatOverflows(); + CHECK(m_thistSvc->regHist(m_path + m_h_hits_step->GetName(), m_h_hits_step)); /** now add branches and leaves to the tree */ m_tree = new TTree("TGC", "TGC"); @@ -206,24 +206,24 @@ StatusCode TGCHitAnalysis::execute() { if (!ghit) continue; Amg::Vector3D p = ghit.getGlobalPosition(); - h_hits_x->Fill(p.x()); - h_hits_y->Fill(p.y()); - h_hits_z->Fill(p.z()); - h_hits_r->Fill(p.perp()); - h_xy->Fill(p.x(), p.y()); - h_rz->Fill(p.perp(), p.z()); - h_hits_eta->Fill(p.eta()); - h_hits_phi->Fill(p.phi()); - h_hits_lx->Fill((*i_hit).localPosition().x()); - h_hits_ly->Fill((*i_hit).localPosition().y()); - h_hits_lz->Fill((*i_hit).localPosition().z()); - h_hits_dcx->Fill((*i_hit).localDireCos().x()); - h_hits_dcy->Fill((*i_hit).localDireCos().y()); - h_hits_dcz->Fill((*i_hit).localDireCos().z()); - h_hits_edep->Fill((*i_hit).energyDeposit()); - h_hits_time->Fill((*i_hit).globalTime()); - h_hits_step->Fill((*i_hit).stepLength()); - h_hits_kine->Fill((*i_hit).kineticEnergy()); + m_h_hits_x->Fill(p.x()); + m_h_hits_y->Fill(p.y()); + m_h_hits_z->Fill(p.z()); + m_h_hits_r->Fill(p.perp()); + m_h_xy->Fill(p.x(), p.y()); + m_h_rz->Fill(p.perp(), p.z()); + m_h_hits_eta->Fill(p.eta()); + m_h_hits_phi->Fill(p.phi()); + m_h_hits_lx->Fill((*i_hit).localPosition().x()); + m_h_hits_ly->Fill((*i_hit).localPosition().y()); + m_h_hits_lz->Fill((*i_hit).localPosition().z()); + m_h_hits_dcx->Fill((*i_hit).localDireCos().x()); + m_h_hits_dcy->Fill((*i_hit).localDireCos().y()); + m_h_hits_dcz->Fill((*i_hit).localDireCos().z()); + m_h_hits_edep->Fill((*i_hit).energyDeposit()); + m_h_hits_time->Fill((*i_hit).globalTime()); + m_h_hits_step->Fill((*i_hit).stepLength()); + m_h_hits_kine->Fill((*i_hit).kineticEnergy()); m_hits_x->push_back(p.x()); m_hits_y->push_back(p.y()); diff --git a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h index e27066d14b0..09f8fc4b901 100755 --- a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h +++ b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TGC_HIT_ANALYSIS_H @@ -26,32 +26,32 @@ class TGCHitAnalysis : public AthAlgorithm { public: TGCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator); - ~TGCHitAnalysis(){} + virtual ~TGCHitAnalysis(){} - virtual StatusCode initialize(); - virtual StatusCode execute(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; private: /** Some variables**/ - TH1* h_hits_x; - TH1* h_hits_y; - TH1* h_hits_z; - TH1* h_hits_r; - TH2* h_xy; - TH2* h_rz; - TH1* h_hits_eta; - TH1* h_hits_phi; - TH1* h_hits_lx; - TH1* h_hits_ly; - TH1* h_hits_lz; - TH1* h_hits_dcx; - TH1* h_hits_dcy; - TH1* h_hits_dcz; - TH1* h_hits_time; - TH1* h_hits_edep; - TH1* h_hits_kine; - TH1* h_hits_step; + TH1* m_h_hits_x; + TH1* m_h_hits_y; + TH1* m_h_hits_z; + TH1* m_h_hits_r; + TH2* m_h_xy; + TH2* m_h_rz; + TH1* m_h_hits_eta; + TH1* m_h_hits_phi; + TH1* m_h_hits_lx; + TH1* m_h_hits_ly; + TH1* m_h_hits_lz; + TH1* m_h_hits_dcx; + TH1* m_h_hits_dcy; + TH1* m_h_hits_dcz; + TH1* m_h_hits_time; + TH1* m_h_hits_edep; + TH1* m_h_hits_kine; + TH1* m_h_hits_step; std::vector* m_hits_x; std::vector* m_hits_y; -- GitLab