Skip to content
Snippets Groups Projects
Commit f5f6b9ac authored by scott snyder's avatar scott snyder
Browse files

SemileptonicCorr: Comply with ATLAS naming conventions.

Private data members should start with m_.
parent 4b1b8b0b
No related branches found
No related tags found
No related merge requests found
...@@ -6,15 +6,15 @@ ...@@ -6,15 +6,15 @@
using namespace std; using namespace std;
semilCorr::semilCorr(TString fIn, string suffix, bool DebugIn){ semilCorr::semilCorr(TString fIn, string /*suffix*/, bool DebugIn){
Debug = DebugIn; m_Debug = DebugIn;
f = TFile::Open(fIn); m_f = TFile::Open(fIn);
etas.push_back(0); m_etas.push_back(0);
etas.push_back(0.8); m_etas.push_back(0.8);
etas.push_back(1.2); m_etas.push_back(1.2);
etas.push_back(1.7); m_etas.push_back(1.7);
etas.push_back(2.1); m_etas.push_back(2.1);
etas.push_back(2.5); m_etas.push_back(2.5);
vector<string> etastr; vector<string> etastr;
etastr.push_back("_e0"); etastr.push_back("_e0");
...@@ -37,7 +37,7 @@ semilCorr::semilCorr(TString fIn, string suffix, bool DebugIn){ ...@@ -37,7 +37,7 @@ semilCorr::semilCorr(TString fIn, string suffix, bool DebugIn){
for(unsigned int j = 0; j<prefix.size(); j++){ for(unsigned int j = 0; j<prefix.size(); j++){
vector<TH1F*> corr; vector<TH1F*> corr;
for(unsigned int i = 0; i<etastr.size(); i++){ for(unsigned int i = 0; i<etastr.size(); i++){
corr.push_back((TH1F*) f->Get((prefix[j]+etastr[i]).c_str())); corr.push_back((TH1F*) m_f->Get((prefix[j]+etastr[i]).c_str()));
} }
m_histos.push_back(corr); m_histos.push_back(corr);
} }
...@@ -50,8 +50,8 @@ semilCorr::~semilCorr(){ ...@@ -50,8 +50,8 @@ semilCorr::~semilCorr(){
delete m_histos[i][j]; // TH2F's that store response info delete m_histos[i][j]; // TH2F's that store response info
} }
} }
f->Close(); m_f->Close();
delete f; delete m_f;
} }
float semilCorr::getSemilCorrToIncl(TLorentzVector jet, TLorentzVector mu) float semilCorr::getSemilCorrToIncl(TLorentzVector jet, TLorentzVector mu)
...@@ -105,8 +105,8 @@ float semilCorr::getResponse(float pt, float eta, vector<TH1F*> h) ...@@ -105,8 +105,8 @@ float semilCorr::getResponse(float pt, float eta, vector<TH1F*> h)
{ {
float usePt = pt; float usePt = pt;
int histbin = -1; int histbin = -1;
for(unsigned int i = 0; i<etas.size()-1; i++){ for(unsigned int i = 0; i<m_etas.size()-1; i++){
if(fabs(eta)>=etas[i] && fabs(eta)<etas[i+1]) if(fabs(eta)>=m_etas[i] && fabs(eta)<m_etas[i+1])
histbin = i; histbin = i;
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/ */
#ifndef __SEMIL_CORR__ #ifndef SEMILEPTONICCORR_SEMILCORR_H
#define __SEMIL_CORR__ #define SEMILEPTONICCORR_SEMILCORR_H
#include "TH2F.h" #include "TH2F.h"
#include "TFile.h" #include "TFile.h"
...@@ -29,11 +29,11 @@ public: ...@@ -29,11 +29,11 @@ public:
private: private:
vector<vector<TH1F*> > m_histos; vector<vector<TH1F*> > m_histos;
vector<float> etas; vector<float> m_etas;
TFile* f; TFile* m_f;
bool Debug; bool m_Debug;
float getResponse(float pt, float eta, vector<TH1F*> h); float getResponse(float pt, float eta, vector<TH1F*> h);
float getSemilCorrToIncl(TLorentzVector jet, TLorentzVector mu, float getSemilCorrToIncl(TLorentzVector jet, TLorentzVector mu,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment