CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Protected Attributes
HFunctionResolutionVarianceCheck Class Reference

#include <Histograms.h>

Inheritance diagram for HFunctionResolutionVarianceCheck:
HFunctionResolution

Public Member Functions

void Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) override
 
 HFunctionResolutionVarianceCheck (TFile *outputFile, const TString &name, const double ptMax=200)
 
void Write () override
 
 ~HFunctionResolutionVarianceCheck () override
 
- Public Member Functions inherited from HFunctionResolution
void Clear () override
 
void Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) override
 
 HFunctionResolution (TFile *outputFile, const TString &name, const double &ptMax=100, const int totBinsY=300)
 
void Write () override
 
 ~HFunctionResolution () override
 

Protected Attributes

TH1D *** histoVarianceCheck_
 
- Protected Attributes inherited from HFunctionResolution
double deltaX_
 
double deltaY_
 
TH1F * hReso_
 
TProfile * hResoVSEta_prof_
 
TProfile * hResoVSPhi_prof_
 
TProfile * hResoVSPhiMinus_prof_
 
TProfile * hResoVSPhiPlus_prof_
 
TProfile * hResoVSPt_Bar_prof_
 
TProfile * hResoVSPt_Endc_17_prof_
 
TProfile * hResoVSPt_Endc_20_prof_
 
TProfile * hResoVSPt_Endc_24_prof_
 
TProfile * hResoVSPt_Ovlap_prof_
 
TProfile * hResoVSPt_prof_
 
TH2F * hResoVSPtEta_
 
int ** resoCount_
 
double ** resoVsPtEta_
 
int totBinsX_
 
int totBinsY_
 
double xMin_
 
double yMin_
 

Additional Inherited Members

- Protected Member Functions inherited from HFunctionResolution
int getXindex (const double &x) const
 
int getYindex (const double &y) const
 

Detailed Description

Definition at line 1741 of file Histograms.h.

Constructor & Destructor Documentation

◆ HFunctionResolutionVarianceCheck()

HFunctionResolutionVarianceCheck::HFunctionResolutionVarianceCheck ( TFile *  outputFile,
const TString &  name,
const double  ptMax = 200 
)
inline

Definition at line 1743 of file Histograms.h.

1745  histoVarianceCheck_ = new TH1D**[totBinsX_];
1746  for (int i = 0; i < totBinsX_; ++i) {
1747  histoVarianceCheck_[i] = new TH1D*[totBinsY_];
1748  for (int j = 0; j < totBinsY_; ++j) {
1749  std::stringstream namei;
1750  std::stringstream namej;
1751  namei << i;
1752  namej << j;
1753  histoVarianceCheck_[i][j] = new TH1D(name + "_" + namei.str() + "_" + namej.str(), name, 100, 0., 1.);
1754  }
1755  }
1756  }

References histoVarianceCheck_, mps_fire::i, dqmiolumiharvest::j, Skims_PA_cff::name, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.

◆ ~HFunctionResolutionVarianceCheck()

HFunctionResolutionVarianceCheck::~HFunctionResolutionVarianceCheck ( )
inlineoverride

Definition at line 1757 of file Histograms.h.

1757  {
1758  for (int i = 0; i < totBinsX_; ++i) {
1759  for (int j = 0; j < totBinsY_; ++j) {
1760  delete histoVarianceCheck_[i][j];
1761  }
1762  delete[] histoVarianceCheck_;
1763  }
1764  delete[] histoVarianceCheck_;
1765  }

References histoVarianceCheck_, mps_fire::i, dqmiolumiharvest::j, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.

Member Function Documentation

◆ Fill()

void HFunctionResolutionVarianceCheck::Fill ( const reco::Particle::LorentzVector p4,
const double &  resValue,
const int  charge 
)
inlineoverride

Definition at line 1766 of file Histograms.h.

1766  {
1767  if (resValue != resValue)
1768  return;
1769  // Need to convert the (x,y) values to the array indeces
1770  int xIndex = getXindex(p4.Pt());
1771  int yIndex = getYindex(p4.Eta());
1772  // Only fill values if they are in the selected range
1773  if (0 <= xIndex && xIndex < totBinsX_ && 0 <= yIndex && yIndex < totBinsY_) {
1774  histoVarianceCheck_[xIndex][yIndex]->Fill(resValue);
1775  }
1776  // Call also the fill of the base class
1777  HFunctionResolution::Fill(p4, resValue, charge);
1778  }

References ALCARECOTkAlJpsiMuMu_cff::charge, HFunctionResolution::Fill(), HFunctionResolution::getXindex(), HFunctionResolution::getYindex(), histoVarianceCheck_, p4, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.

◆ Write()

void HFunctionResolutionVarianceCheck::Write ( )
inlineoverride

Definition at line 1779 of file Histograms.h.

1779  {
1780  if (histoDir_ != nullptr)
1781  histoDir_->cd();
1782  for (int xBin = 0; xBin < totBinsX_; ++xBin) {
1783  for (int yBin = 0; yBin < totBinsY_; ++yBin) {
1784  histoVarianceCheck_[xBin][yBin]->Write();
1785  }
1786  }
1788  }

References histoVarianceCheck_, HFunctionResolution::totBinsX_, HFunctionResolution::totBinsY_, HFunctionResolution::Write(), photonAnalyzer_cfi::xBin, and photonAnalyzer_cfi::yBin.

Member Data Documentation

◆ histoVarianceCheck_

TH1D*** HFunctionResolutionVarianceCheck::histoVarianceCheck_
protected
mps_fire.i
i
Definition: mps_fire.py:428
photonAnalyzer_cfi.xBin
xBin
Definition: photonAnalyzer_cfi.py:81
photonAnalyzer_cfi.yBin
yBin
Definition: photonAnalyzer_cfi.py:85
HFunctionResolutionVarianceCheck::histoVarianceCheck_
TH1D *** histoVarianceCheck_
Definition: Histograms.h:1791
download_sqlite_cfg.outputFile
outputFile
Definition: download_sqlite_cfg.py:5
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
HFunctionResolution::Write
void Write() override
Definition: Histograms.h:1659
HFunctionResolution::getYindex
int getYindex(const double &y) const
Definition: Histograms.h:1720
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
p4
double p4[4]
Definition: TauolaWrapper.h:92
HFunctionResolution::HFunctionResolution
HFunctionResolution(TFile *outputFile, const TString &name, const double &ptMax=100, const int totBinsY=300)
Definition: Histograms.h:1552
HFunctionResolution::totBinsX_
int totBinsX_
Definition: Histograms.h:1736
HFunctionResolution::Fill
void Fill(const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) override
Definition: Histograms.h:1617
HFunctionResolution::getXindex
int getXindex(const double &x) const
Definition: Histograms.h:1719
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HFunctionResolution::totBinsY_
int totBinsY_
Definition: Histograms.h:1736