CMS 3D CMS Logo

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 1655 of file Histograms.h.

Constructor & Destructor Documentation

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

Definition at line 1658 of file Histograms.h.

References mps_fire::i, and dataset::name.

1658  :
1660  {
1661  histoVarianceCheck_ = new TH1D**[totBinsX_];
1662  for( int i=0; i<totBinsX_; ++i ) {
1663  histoVarianceCheck_[i] = new TH1D*[totBinsY_];
1664  for( int j=0; j<totBinsY_; ++j ) {
1665  std::stringstream namei;
1666  std::stringstream namej;
1667  namei << i;
1668  namej << j;
1669  histoVarianceCheck_[i][j] = new TH1D(name+"_"+namei.str()+"_"+namej.str(), name, 100, 0., 1.);
1670  }
1671  }
1672  }
HFunctionResolution(TFile *outputFile, const TString &name, const double &ptMax=100, const int totBinsY=300)
Definition: Histograms.h:1474
HFunctionResolutionVarianceCheck::~HFunctionResolutionVarianceCheck ( )
inlineoverride

Definition at line 1673 of file Histograms.h.

References mps_fire::i.

1673  {
1674  for( int i=0; i<totBinsX_; ++i ) {
1675  for( int j=0; j<totBinsY_; ++j ) {
1676  delete histoVarianceCheck_[i][j];
1677  }
1678  delete[] histoVarianceCheck_;
1679  }
1680  delete[] histoVarianceCheck_;
1681  }

Member Function Documentation

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

Definition at line 1682 of file Histograms.h.

References HFunctionResolution::Fill().

1682  {
1683  if( resValue != resValue ) return;
1684  // Need to convert the (x,y) values to the array indeces
1685  int xIndex = getXindex(p4.Pt());
1686  int yIndex = getYindex(p4.Eta());
1687  // Only fill values if they are in the selected range
1688  if ( 0 <= xIndex && xIndex < totBinsX_ && 0 <= yIndex && yIndex < totBinsY_ ) {
1689  histoVarianceCheck_[xIndex][yIndex]->Fill(resValue);
1690  }
1691  // Call also the fill of the base class
1692  HFunctionResolution::Fill( p4, resValue, charge );
1693  }
void Fill(const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) override
Definition: Histograms.h:1532
int getYindex(const double &y) const
Definition: Histograms.h:1632
double p4[4]
Definition: TauolaWrapper.h:92
int getXindex(const double &x) const
Definition: Histograms.h:1629
void HFunctionResolutionVarianceCheck::Write ( )
inlineoverride

Definition at line 1694 of file Histograms.h.

References HFunctionResolution::Write(), and cuy::yBin.

1694  {
1695  if(histoDir_ != nullptr) histoDir_->cd();
1696  for( int xBin=0; xBin<totBinsX_; ++xBin ) {
1697  for( int yBin=0; yBin<totBinsY_; ++yBin ) {
1698  histoVarianceCheck_[xBin][yBin]->Write();
1699  }
1700  }
1702  }
void Write() override
Definition: Histograms.h:1573
yBin
Definition: cuy.py:892

Member Data Documentation

TH1D*** HFunctionResolutionVarianceCheck::histoVarianceCheck_
protected

Definition at line 1704 of file Histograms.h.