#include <Histograms.h>
Public Member Functions | |
virtual void | Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) |
HFunctionResolutionVarianceCheck (TFile *outputFile, const TString &name, const double ptMax=200) | |
void | Write () |
~HFunctionResolutionVarianceCheck () | |
Protected Attributes | |
TH1D *** | histoVarianceCheck_ |
Definition at line 1373 of file Histograms.h.
HFunctionResolutionVarianceCheck::HFunctionResolutionVarianceCheck | ( | TFile * | outputFile, |
const TString & | name, | ||
const double | ptMax = 200 |
||
) | [inline] |
Definition at line 1376 of file Histograms.h.
References histoVarianceCheck_, i, j, mergeVDriftHistosByStation::name, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.
: HFunctionResolution(outputFile, name, ptMax) { histoVarianceCheck_ = new TH1D**[totBinsX_]; for( int i=0; i<totBinsX_; ++i ) { histoVarianceCheck_[i] = new TH1D*[totBinsY_]; for( int j=0; j<totBinsY_; ++j ) { std::stringstream namei; std::stringstream namej; namei << i; namej << j; histoVarianceCheck_[i][j] = new TH1D(name+"_"+namei.str()+"_"+namej.str(), name, 100, 0., 1.); } } }
HFunctionResolutionVarianceCheck::~HFunctionResolutionVarianceCheck | ( | ) | [inline] |
Definition at line 1391 of file Histograms.h.
References histoVarianceCheck_, i, j, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.
{ for( int i=0; i<totBinsX_; ++i ) { for( int j=0; j<totBinsY_; ++j ) { delete histoVarianceCheck_[i][j]; } delete[] histoVarianceCheck_; } delete[] histoVarianceCheck_; }
virtual void HFunctionResolutionVarianceCheck::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const double & | resValue, | ||
const int | charge | ||
) | [inline, virtual] |
Reimplemented from HFunctionResolution.
Definition at line 1400 of file Histograms.h.
References HFunctionResolution::getXindex(), HFunctionResolution::getYindex(), histoVarianceCheck_, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.
{ if( resValue != resValue ) return; // Need to convert the (x,y) values to the array indeces int xIndex = getXindex(p4.Pt()); int yIndex = getYindex(p4.Eta()); // Only fill values if they are in the selected range if ( 0 <= xIndex && xIndex < totBinsX_ && 0 <= yIndex && yIndex < totBinsY_ ) { histoVarianceCheck_[xIndex][yIndex]->Fill(resValue); } // Call also the fill of the base class HFunctionResolution::Fill( p4, resValue, charge ); }
void HFunctionResolutionVarianceCheck::Write | ( | ) | [inline, virtual] |
Reimplemented from HFunctionResolution.
Definition at line 1412 of file Histograms.h.
References Histograms::histoDir_, histoVarianceCheck_, HFunctionResolution::totBinsX_, and HFunctionResolution::totBinsY_.
{ if(histoDir_ != 0) histoDir_->cd(); for( int xBin=0; xBin<totBinsX_; ++xBin ) { for( int yBin=0; yBin<totBinsY_; ++yBin ) { histoVarianceCheck_[xBin][yBin]->Write(); } } HFunctionResolution::Write(); }
TH1D*** HFunctionResolutionVarianceCheck::histoVarianceCheck_ [protected] |
Definition at line 1422 of file Histograms.h.
Referenced by Fill(), HFunctionResolutionVarianceCheck(), Write(), and ~HFunctionResolutionVarianceCheck().