CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PlotCompareUtility Class Reference

#include <PlotCompareUtility.h>

Public Types

enum  Axis { axisX, axisY }
 

Public Member Functions

HistoDataaddHistoData (std::string NewName, std::string RefName, int PlotType)
 
HistoDataaddHistoData (std::string Name, int PlotType)
 
HistoDataaddProjectionXData (HistoData *Parent, std::string Name, int PlotType, int Bin, TH1 *NewHisto, TH1 *RefHisto)
 
HistoDataaddProjectionYData (HistoData *Parent, std::string Name, int PlotType, int Bin, TH1 *NewHisto, TH1 *RefHisto)
 
void clearHistos ()
 
void clearProjectionsX (HistoData *Parent)
 
void clearProjectionsY (HistoData *Parent)
 
bool compare (HistoData *)
 
void dump ()
 
double getChi2Threshold () const
 
bool getFinalResult () const
 
std::vector< HistoData > * getHistos ()
 
double getKSThreshold () const
 
int getNumHistos () const
 
int getPlotsBottomMargin () const
 
int getPlotsHeight () const
 
int getPlotsLeftMargin () const
 
int getPlotsRightMargin () const
 
int getPlotsTopMargin () const
 
int getPlotsWidth () const
 
int getProjectionsBarsThickness () const
 
int getProjectionsBottomMargin () const
 
int getProjectionsHeight () const
 
int getProjectionsLeftMargin () const
 
int getProjectionsRightMargin () const
 
int getProjectionsTopMargin () const
 
int getProjectionsWidth () const
 
std::vector< HistoData > * getProjectionsX (HistoData *HD)
 
std::vector< HistoData > * getProjectionsY (HistoData *HD)
 
int getSummaryBarsThickness () const
 
int getSummaryBottomMargin () const
 
int getSummaryHeight () const
 
int getSummaryLeftMargin () const
 
int getSummaryRightMargin () const
 
int getSummaryTopMargin () const
 
int getSummaryWidth () const
 
double getThreshold () const
 
bool isValid () const
 
void makeDefaultPlots ()
 
void makeHTML (HistoData *)
 
void makePlots (HistoData *)
 
void makeSummary (std::string Name)
 
void makeSummaryHTML (std::string Name)
 
void makeSummaryPlot (std::string Name)
 
 PlotCompareUtility (std::string Reference, std::string New, std::string NewBasePath, std::string NewPrefix="", std::string RefBasePath="", std::string RefPrefix="")
 
void setChi2Threshold (double Threshold)
 
void setKSThreshold (double Threshold)
 
void setPlotsBottomMargin (int Pixels)
 
void setPlotsHeight (int Pixels)
 
void setPlotsLeftMargin (int Pixels)
 
void setPlotsRightMargin (int Pixels)
 
void setPlotsTopMargin (int Pixels)
 
void setPlotsWidth (int Pixels)
 
void setProjectionsBarsThickness (int Pixels)
 
void setProjectionsBottomMargin (int Pixels)
 
void setProjectionsHeight (int Pixels)
 
void setProjectionsiWidth (int Pixels)
 
void setProjectionsLeftMargin (int Pixels)
 
void setProjectionsRightMargin (int Pixels)
 
void setProjectionsTopMargin (int Pixels)
 
void setSummaryBarsThickness (int Pixels)
 
void setSummaryBottomMargin (int Pixels)
 
void setSummaryHeight (int Pixels)
 
void setSummaryLeftMargin (int Pixels)
 
void setSummaryRightMargin (int Pixels)
 
void setSummaryTopMargin (int Pixels)
 
void setSummaryWidth (int Pixels)
 
virtual ~PlotCompareUtility ()
 

Private Member Functions

void centerRebin (TH1 *, TH1 *)
 
template<>
bool compare (HistoData *HD)
 
template<>
bool compare (HistoData *HD)
 
template<int PlotType>
bool compare (HistoData *)
 
template<>
void makeHTML (HistoData *HD)
 
template<int PlotType>
void makeHTML (HistoData *)
 
template<>
void makeHTML (HistoData *HD)
 
template<>
void makePlots (HistoData *HD)
 
template<>
void makePlots (HistoData *HD)
 
template<int PlotType>
void makePlots (HistoData *)
 
void renormalize (TH1 *, TH1 *)
 

Private Attributes

double chi2Threshold
 
bool finalResult
 
std::vector< HistoDatahistos
 
double ksThreshold
 
std::string newBasePath
 
TFile * newFile
 
std::string newPrefix
 
int plotsBottomMargin
 
int plotsHeight
 
int plotsLeftMargin
 
int plotsRightMargin
 
int plotsTopMargin
 
int plotsWidth
 
int projectionsBarsThickness
 
int projectionsBottomMargin
 
int projectionsHeight
 
int projectionsLeftMargin
 
int projectionsRightMargin
 
int projectionsTopMargin
 
int projectionsWidth
 
std::map< HistoData *, std::vector< HistoData > > projectionsX
 
std::map< HistoData *, std::vector< HistoData > > projectionsY
 
std::string refBasePath
 
TFile * refFile
 
std::string refPrefix
 
int summaryBarsThickness
 
int summaryBottomMargin
 
int summaryHeight
 
int summaryLeftMargin
 
int summaryRightMargin
 
int summaryTopMargin
 
int summaryWidth
 

Detailed Description

Definition at line 17 of file PlotCompareUtility.h.

Member Enumeration Documentation

Enumerator
axisX 
axisY 

Definition at line 27 of file PlotCompareUtility.h.

Constructor & Destructor Documentation

PlotCompareUtility::PlotCompareUtility ( std::string  Reference,
std::string  New,
std::string  NewBasePath,
std::string  NewPrefix = "",
std::string  RefBasePath = "",
std::string  RefPrefix = "" 
)
virtual PlotCompareUtility::~PlotCompareUtility ( )
virtual

Member Function Documentation

HistoData* PlotCompareUtility::addHistoData ( std::string  NewName,
std::string  RefName,
int  PlotType 
)

Referenced by setPlotsBottomMargin().

HistoData* PlotCompareUtility::addHistoData ( std::string  Name,
int  PlotType 
)
inline

Definition at line 93 of file PlotCompareUtility.h.

References addHistoData(), addProjectionXData(), addProjectionYData(), globaldigis_analyze_cfi::Name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addHistoData().

93 { return addHistoData(Name,Name,PlotType); }
PlotType
HistoData * addHistoData(std::string NewName, std::string RefName, int PlotType)
HistoData* PlotCompareUtility::addProjectionXData ( HistoData Parent,
std::string  Name,
int  PlotType,
int  Bin,
TH1 *  NewHisto,
TH1 *  RefHisto 
)

Referenced by addHistoData().

HistoData* PlotCompareUtility::addProjectionYData ( HistoData Parent,
std::string  Name,
int  PlotType,
int  Bin,
TH1 *  NewHisto,
TH1 *  RefHisto 
)

Referenced by addHistoData().

void PlotCompareUtility::centerRebin ( TH1 *  ,
TH1 *   
)
private
void PlotCompareUtility::clearHistos ( )
inline

Definition at line 96 of file PlotCompareUtility.h.

References histos.

96 { histos.clear(); }
std::vector< HistoData > histos
void PlotCompareUtility::clearProjectionsX ( HistoData Parent)
inline

Definition at line 97 of file PlotCompareUtility.h.

References projectionsX.

97 { projectionsX[Parent].clear(); }
std::map< HistoData *, std::vector< HistoData > > projectionsX
void PlotCompareUtility::clearProjectionsY ( HistoData Parent)
inline

Definition at line 98 of file PlotCompareUtility.h.

References compare(), dump(), isValid(), makeDefaultPlots(), makeHTML(), makePlots(), makeSummary(), makeSummaryHTML(), makeSummaryPlot(), projectionsY, and AlCaHLTBitMon_QueryRunRegistry::string.

98 { projectionsY[Parent].clear(); }
std::map< HistoData *, std::vector< HistoData > > projectionsY
template<>
bool PlotCompareUtility::compare ( HistoData HD)
private

Definition at line 18 of file Plot1D.h.

References MessageLogger_cfi::cerr, NULL, and TriggerAnalyzer::passed.

18  {
19 
20  // get the reference and comparison histograms
21  TH1F *href = (TH1F *)HD->getRefHisto();
22  TH1F *hnew = (TH1F *)HD->getNewHisto();
23 
24  // do not run comparisons if either histogram is empty/broken
25  if (hnew == NULL || href == NULL || hnew->GetEntries() <= 1 || href->GetEntries() <= 1) {
26  //std::cerr << HD->getName() << " error: unable to retrieve histogram (or no entries)\n";
27  HD->setIsEmpty(true); return false;
28  }
29 
30  // rebin histograms and center on common range
31  if (HD->getDoAllow1DRebinning()) centerRebin(href,hnew);
32 
33  // run statistical comparisons
34  double ksScore = hnew->KolmogorovTest(href,"D");
35  double chi2Score = hnew->Chi2Test(href,"uup");
36 
37  // renormalize histograms for common display
38  renormalize(href,hnew);
39 
40  // set ks/chi2 and determine high/low scores
41  HD->setKSScore(ksScore); HD->setChi2Score(chi2Score);
42  if (ksThreshold > 0 && chi2Threshold > 0) {
43  HD->setLowScore(ksScore < chi2Score ? ksScore : chi2Score);
44  HD->setHighScore(ksScore > chi2Score ? ksScore : chi2Score);
45  }
46  else if (ksThreshold > 0) { HD->setLowScore(ksScore); HD->setHighScore(ksScore); }
47  else if (chi2Threshold > 0) { HD->setLowScore(chi2Score); HD->setHighScore(chi2Score); }
48  else std::cerr << "error: no test performed? chi2Threshold and ksThreshold <= 0\n";
49 
50  // check overall result
51  bool passed = (ksScore >= ksThreshold && chi2Score >= chi2Threshold);
52  HD->setResult(passed);
53 // if (!passed) std::cout << "NOTPASSED!!!!"; else std::cout << "YESPASSED!";
54  // returns true on test passed and false on test failed
55  HD->setIsEmpty(false);
56  return passed;
57 
58 }
void renormalize(TH1 *, TH1 *)
void setResult(bool Result)
#define NULL
Definition: scimark2.h:8
bool getDoAllow1DRebinning() const
Definition: HistoData.h:29
TH1 * getRefHisto() const
Definition: HistoData.h:23
void setIsEmpty(bool Toggle)
Definition: HistoData.h:80
void setKSScore(float Score)
Definition: HistoData.h:75
void setChi2Score(float Score)
Definition: HistoData.h:76
void setHighScore(float Score)
Definition: HistoData.h:78
TH1 * getNewHisto() const
Definition: HistoData.h:22
void centerRebin(TH1 *, TH1 *)
void setLowScore(float Score)
Definition: HistoData.h:77
template<>
bool PlotCompareUtility::compare ( HistoData HD)
private

Definition at line 21 of file Plot2D.h.

References stringResolutionProvider_cfi::bin, MessageLogger_cfi::cerr, gather_cfg::cout, HistoData::getHighScore(), HistoData::getLowScore(), createfilelist::int, NULL, and Plot1D.

21  {
22 
23  // get the reference and comparison histograms
24  TH2F *href2d = (TH2F *)HD->getRefHisto();
25  TH2F *hnew2d = (TH2F *)HD->getNewHisto();
26 
27  // do not run comparisons if either histogram is empty/broken
28  if (hnew2d == NULL || href2d == NULL || hnew2d->GetEntries() <= 1 || href2d->GetEntries() <= 1) {
29  //std::cerr << HD->getName() << " error: unable to retrieve histogram (or no entries)\n";
30  HD->setIsEmpty(true); return false;
31  }
32 
33  // prepare an overall result
34  bool projectionsPassed = true;
35 
36  // loop over axes (projections on one or both may be requested)
37  for (int axis = axisX; axis <= axisY; ++axis) {
38 
39  // for X: verify projections requested and proper Y binning of href2d and hnew2d
40  if (axis == axisX && !HD->getDoProjectionsX()) continue;
41  if (axis == axisX && href2d->GetNbinsY() != hnew2d->GetNbinsY()) {
42  std::cerr << HD->getName() << " error: incorrect number of bins for X projection tests\n";
43  projectionsPassed = false; continue;
44  }
45 
46  // for Y: verify projections requested and proper X binning of href2d and hnew2d
47  if (axis == axisY && !HD->getDoProjectionsY()) continue;
48  if (axis == axisY && href2d->GetNbinsX() != hnew2d->GetNbinsX()) {
49  std::cerr << HD->getName() << " error: incorrect number of bins for Y projection tests\n";
50  projectionsPassed = false; continue;
51  }
52 
53  // setup the rebinning variables
54  int nBins = (axis == axisX) ? href2d->GetNbinsY() : href2d->GetNbinsX();
55  int nProjections = (axis == axisX) ? HD->getMaxProjectionsX() : HD->getMaxProjectionsY();
56  int nGroups = (int)ceil(float(nBins) / nProjections);
57  bool rebinned = false;
58 
59  // for X projections: if required rebin a clone of href2d and hnew2d
60  if (axis == axisX && HD->getDoAllow2DRebinningX() && nGroups > 1) {
61  href2d = (TH2F *)(((TH2F *)(href2d->Clone()))->RebinY(nGroups));
62  hnew2d = (TH2F *)(((TH2F *)(hnew2d->Clone()))->RebinY(nGroups));
63  nBins = href2d->GetNbinsY();
64  rebinned = true;
65  }
66 
67  // for Y projections: if required rebin a clone of href2d and hnew2d
68  if (axis == axisY && HD->getDoAllow2DRebinningY() && nGroups > 1) {
69  href2d = (TH2F *)(((TH2F *)(href2d->Clone()))->RebinX(nGroups));
70  hnew2d = (TH2F *)(((TH2F *)(hnew2d->Clone()))->RebinX(nGroups));
71  nBins = href2d->GetNbinsX();
72  rebinned = true;
73  }
74 
75  // loop over bins in histograms (go backwords to keep in order)
76  //for (int bin = nBins; bin >= 1; --bin) {
77  for (int bin = 1; bin <= nBins; ++bin) {
78 
79  std::cout << "bin " << bin << " of " << nBins << std::endl;
80  // create some unique identifiers for the histogram names
81  TString projName = HD->getName() + (axis == axisX ? "_px" : "_py"); projName += bin;
82  TString newProjName = "new_"; newProjName += projName;
83  TString refProjName = "ref_"; refProjName += projName;
84 
85  // get the 1d projections for this bin out of the histogram
86  TH1D *hnew = (axis == axisX) ? hnew2d->ProjectionX(newProjName.Data(),bin,bin) : hnew2d->ProjectionY(newProjName.Data(),bin,bin);
87  TH1D *href = (axis == axisX) ? href2d->ProjectionX(refProjName.Data(),bin,bin) : href2d->ProjectionY(refProjName.Data(),bin,bin);
88 
89  // set histogram axis labels
90  hnew->GetXaxis()->SetTitle((axis == axisX ? hnew2d->GetXaxis()->GetTitle() : hnew2d->GetYaxis()->GetTitle()));
91  href->GetXaxis()->SetTitle((axis == axisX ? href2d->GetXaxis()->GetTitle() : href2d->GetYaxis()->GetTitle()));
92 
93  // allow Root to delete these histograms after display
94  hnew->SetBit(kCanDelete);
95  href->SetBit(kCanDelete);
96 
97  // create a new HistoData based on this projection
98  HistoData *proj = (axis == axisX) ? addProjectionXData(HD,projName.Data(),Plot1D,bin,hnew,href) \
99  : addProjectionYData(HD,projName.Data(),Plot1D,bin,hnew,href);
100 
101  // ignore empty bins
102  //if (hnew->Integral() == 0 || href->Integral() == 0) continue;
103  if (hnew->GetEntries() <= 1 || href->GetEntries() <= 1||hnew->Integral() == 0 || href->Integral() == 0) continue;
104 
105  // run this new HistoData through compare<Plot1D>
106  projectionsPassed &= compare<Plot1D>(proj);
107 
108  // get the high and low scores from this comparison
109  float lowScore = proj->getLowScore(); float highScore = proj->getHighScore();
110  if (lowScore < HD->getLowScore()) HD->setLowScore(lowScore);
111  if (highScore > HD->getHighScore()) HD->setHighScore(highScore);
112 
113  }
114 
115  // if 2d histograms were rebinned, delete the clone and re-get the original
116  if (rebinned) {
117  delete href2d; href2d = (TH2F *)HD->getRefHisto();
118  delete hnew2d; hnew2d = (TH2F *)HD->getNewHisto();
119  }
120 
121  }
122 
123  // check overall result
124  HD->setResult(projectionsPassed);
125  HD->setIsEmpty(false);
126 
127  // returns true on test passed and false on test failed
128  return projectionsPassed;
129 
130 }
bool getDoProjectionsX() const
Definition: HistoData.h:32
bool getDoAllow2DRebinningY() const
Definition: HistoData.h:31
void setResult(bool Result)
#define NULL
Definition: scimark2.h:8
std::string getName() const
Definition: HistoData.h:18
TH1 * getRefHisto() const
Definition: HistoData.h:23
void setIsEmpty(bool Toggle)
Definition: HistoData.h:80
float getLowScore() const
Definition: HistoData.h:41
bin
set the eta bin as selection string.
HistoData * addProjectionXData(HistoData *Parent, std::string Name, int PlotType, int Bin, TH1 *NewHisto, TH1 *RefHisto)
bool getDoProjectionsY() const
Definition: HistoData.h:33
bool getDoAllow2DRebinningX() const
Definition: HistoData.h:30
HistoData * addProjectionYData(HistoData *Parent, std::string Name, int PlotType, int Bin, TH1 *NewHisto, TH1 *RefHisto)
float getHighScore() const
Definition: HistoData.h:42
int getMaxProjectionsY() const
Definition: HistoData.h:35
int getMaxProjectionsX() const
Definition: HistoData.h:34
void setHighScore(float Score)
Definition: HistoData.h:78
TH1 * getNewHisto() const
Definition: HistoData.h:22
void setLowScore(float Score)
Definition: HistoData.h:77
bool PlotCompareUtility::compare ( HistoData )

Referenced by clearProjectionsY().

template<int PlotType>
bool PlotCompareUtility::compare ( HistoData )
private
void PlotCompareUtility::dump ( )

Referenced by clearProjectionsY().

double PlotCompareUtility::getChi2Threshold ( ) const
inline

Definition at line 39 of file PlotCompareUtility.h.

References chi2Threshold, and getThreshold().

39 { return chi2Threshold; }
bool PlotCompareUtility::getFinalResult ( ) const
inline

Definition at line 41 of file PlotCompareUtility.h.

References finalResult.

41 { return finalResult; }
std::vector<HistoData>* PlotCompareUtility::getHistos ( )
inline

Definition at line 30 of file PlotCompareUtility.h.

References histos.

30 { return &histos; }
std::vector< HistoData > histos
double PlotCompareUtility::getKSThreshold ( ) const
inline

Definition at line 38 of file PlotCompareUtility.h.

References ksThreshold.

38 { return ksThreshold; }
int PlotCompareUtility::getNumHistos ( ) const
inline

Definition at line 33 of file PlotCompareUtility.h.

References histos.

33 { return histos.size(); }
std::vector< HistoData > histos
int PlotCompareUtility::getPlotsBottomMargin ( ) const
inline

Definition at line 63 of file PlotCompareUtility.h.

References plotsBottomMargin.

int PlotCompareUtility::getPlotsHeight ( ) const
inline

Definition at line 58 of file PlotCompareUtility.h.

References plotsHeight.

58 { return plotsHeight; }
int PlotCompareUtility::getPlotsLeftMargin ( ) const
inline

Definition at line 61 of file PlotCompareUtility.h.

References plotsLeftMargin.

int PlotCompareUtility::getPlotsRightMargin ( ) const
inline

Definition at line 62 of file PlotCompareUtility.h.

References plotsRightMargin.

int PlotCompareUtility::getPlotsTopMargin ( ) const
inline

Definition at line 60 of file PlotCompareUtility.h.

References plotsTopMargin.

60 { return plotsTopMargin; }
int PlotCompareUtility::getPlotsWidth ( ) const
inline

Definition at line 59 of file PlotCompareUtility.h.

References plotsWidth.

59 { return plotsWidth; }
int PlotCompareUtility::getProjectionsBarsThickness ( ) const
inline

Definition at line 53 of file PlotCompareUtility.h.

References projectionsBarsThickness.

int PlotCompareUtility::getProjectionsBottomMargin ( ) const
inline

Definition at line 57 of file PlotCompareUtility.h.

References projectionsBottomMargin.

int PlotCompareUtility::getProjectionsHeight ( ) const
inline

Definition at line 51 of file PlotCompareUtility.h.

References projectionsHeight.

int PlotCompareUtility::getProjectionsLeftMargin ( ) const
inline

Definition at line 55 of file PlotCompareUtility.h.

References projectionsLeftMargin.

int PlotCompareUtility::getProjectionsRightMargin ( ) const
inline

Definition at line 56 of file PlotCompareUtility.h.

References projectionsRightMargin.

int PlotCompareUtility::getProjectionsTopMargin ( ) const
inline

Definition at line 54 of file PlotCompareUtility.h.

References projectionsTopMargin.

int PlotCompareUtility::getProjectionsWidth ( ) const
inline

Definition at line 52 of file PlotCompareUtility.h.

References projectionsWidth.

std::vector<HistoData>* PlotCompareUtility::getProjectionsX ( HistoData HD)
inline

Definition at line 31 of file PlotCompareUtility.h.

References projectionsX.

31 { return &projectionsX[HD]; }
std::map< HistoData *, std::vector< HistoData > > projectionsX
std::vector<HistoData>* PlotCompareUtility::getProjectionsY ( HistoData HD)
inline

Definition at line 32 of file PlotCompareUtility.h.

References projectionsY.

32 { return &projectionsY[HD]; }
std::map< HistoData *, std::vector< HistoData > > projectionsY
int PlotCompareUtility::getSummaryBarsThickness ( ) const
inline

Definition at line 46 of file PlotCompareUtility.h.

References summaryBarsThickness.

int PlotCompareUtility::getSummaryBottomMargin ( ) const
inline

Definition at line 50 of file PlotCompareUtility.h.

References summaryBottomMargin.

int PlotCompareUtility::getSummaryHeight ( ) const
inline

Definition at line 45 of file PlotCompareUtility.h.

References summaryHeight.

45 { return summaryHeight; }
int PlotCompareUtility::getSummaryLeftMargin ( ) const
inline

Definition at line 48 of file PlotCompareUtility.h.

References summaryLeftMargin.

int PlotCompareUtility::getSummaryRightMargin ( ) const
inline

Definition at line 49 of file PlotCompareUtility.h.

References summaryRightMargin.

int PlotCompareUtility::getSummaryTopMargin ( ) const
inline

Definition at line 47 of file PlotCompareUtility.h.

References summaryTopMargin.

int PlotCompareUtility::getSummaryWidth ( ) const
inline

Definition at line 44 of file PlotCompareUtility.h.

References summaryWidth.

44 { return summaryWidth; }
double PlotCompareUtility::getThreshold ( ) const

Referenced by getChi2Threshold().

bool PlotCompareUtility::isValid ( ) const
void PlotCompareUtility::makeDefaultPlots ( )

Referenced by clearProjectionsY().

void PlotCompareUtility::makeHTML ( HistoData )

Referenced by clearProjectionsY().

template<>
void PlotCompareUtility::makeHTML ( HistoData HD)
private

Definition at line 135 of file Plot1D.h.

135  {
136 
137  /* HTML is not presently required for 1D histograms -- do nothing
138 
139  // create HTML support code for this HistoData
140  std::string Name = hd->getName();
141  std::string gifName = Name + "_Results.gif";
142  std::string html = Name + "_Results.html";
143  ofstream fout(html.c_str());
144 
145  // simply link to the appropriate image overlay
146  fout << "<html><body><img src=\"" << gifName << "\"></body></html>" << endl;
147 
148  // close the file
149  fout.close();
150 
151  */
152 
153 }
template<int PlotType>
void PlotCompareUtility::makeHTML ( HistoData )
private
template<>
void PlotCompareUtility::makeHTML ( HistoData HD)
private

Definition at line 319 of file Plot2D.h.

References stringResolutionProvider_cfi::bin, objects.autophobj::float, groupFilesInBlocks::fout, createfilelist::int, globaldigis_analyze_cfi::Name, NULL, PFRecoTauDiscriminationByIsolation_cfi::offset, AlCaHLTBitMon_QueryRunRegistry::string, edmPickEvents::target, globals_cff::x1, and globals_cff::x2.

319  {
320 
321  /* at present, makeHTML<Plot1D> does nothing, so don't waste the CPU cycles
322  // loop over projections and produce HTML
323  std::vector<HistoData>::iterator hd;
324  for (hd = projectionsX[HD].begin(); hd != projectionsX[HD].end(); hd++) makePlots<Plot1D>(&(*hd));
325  for (hd = projectionsY[HD].begin(); hd != projectionsY[HD].end(); hd++) makePlots<Plot1D>(&(*hd));
326  */
327 
328  // get the HistoData name for later reuse
329  std::string Name = HD->getName();
330 
331  // loop over the axes to see if projections were produced
332  bool pfDone[2] = { false, false };
333  for (int axis = axisX; axis <= axisY; axis++) {
334 
335  // get the list of projections associated with this HistoData
336  std::vector<HistoData> *proj = (axis == axisX) ? &projectionsX[HD] : &projectionsY[HD];
337  if (proj == NULL || proj->size() == 0) continue; else pfDone[axis] = true;
338 
339  // setup some names, etc. for insertion into the HTML
340  std::string gifNameProjections = Name + (axis == axisX ? "_Results_px.gif" : "_Results_py.gif");
341  std::string gifNameAllProj = Name + (axis == axisX ? "_py_Results.gif" : "_px_Results.gif");
342  std::string gifNameProfile = Name + (axis == axisX ? "_pfx.gif" : "_pfy.gif");
343  std::string gifBinPrefix = Name + (axis == axisX ? "_px" : "_py");
344 
345  // setup some locations to put thumbnails, etc.
346  int offset = 10;
347  int thumbWidth = plotsWidth / 4;
348  int thumbHeight = plotsHeight / 4;
350  int leftThumbPos = offset + projectionsLeftMargin + bodyWidth / 4 - thumbWidth / 2;
351  int rightThumbPos = leftThumbPos + bodyWidth / 2;
352  int thumbsLoc = projectionsTopMargin + thumbHeight / 2;
353 
354  // create the profile's HTML document
355  std::string htmlNameProfile = Name + (axis == axisX ? "_Results_px.html" : "_Results_py.html");
356  std::ofstream fout(htmlNameProfile.c_str());
357 
358  // print top portion of document
359  fout << "<!DOCTYPE gif PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>" << std::endl
360  << "<html>" << std::endl
361  << " <head>" << std::endl
362  << " <title>Compatibility of Projections for " << HD->getRefHisto()->GetTitle() << "</title>" << std::endl
363  << " <script type='text/javascript'>" << std::endl << std::endl
364  << " function tn(target,image,class) {" << std::endl
365  << " clear()" << std::endl
366  << " document.getElementById('thumb_div').setAttribute('class',class)" << std::endl
367  << " document.getElementById('thumb_div').setAttribute('className',class)" << std::endl
368  << " document.getElementById('thumb_link').href = target" << std::endl
369  << " document.getElementById('thumb_img').src = image" << std::endl
370  << " document.getElementById('thumb_img').width = '" << thumbWidth << "'" << std::endl
371  << " document.getElementById('thumb_img').height = '" << thumbHeight << "'" << std::endl
372  << " document.getElementById('thumb_img').border = '1'" << std::endl
373  << " }" << std::endl << std::endl
374  << " function clear() {" << std::endl
375  << " document.getElementById('thumb_link').href = '#'" << std::endl
376  << " document.getElementById('thumb_img').src = ''" << std::endl
377  << " document.getElementById('thumb_img').width = '0'" << std::endl
378  << " document.getElementById('thumb_img').height = '0'" << std::endl
379  << " document.getElementById('thumb_img').border = '0'" << std::endl
380  << " }" << std::endl << std::endl
381  << " </script>" << std::endl
382  << " </head>" << std::endl
383  << " <body onClick=\"window.location.href='index.html'\">" << std::endl
384  // << "<a href='index.html'>"
385  << " <style type='text/css'>" << std::endl
386  << " #thumb_div {}" << std::endl
387  << " div.thumb_left {position: absolute; left: " << leftThumbPos << "px; top: " << thumbsLoc << "px;}" << std::endl
388  << " div.thumb_right {position: absolute; left: " << rightThumbPos << "px; top: " << thumbsLoc << "px;}" << std::endl
389  << " #main_d {position: absolute; left: " << offset << "px;}" << std::endl
390  << " a:link {color: #000000}" << std::endl
391  << " a:visited {color: #000000}" << std::endl
392  << " a:hover {color: #000000}" << std::endl
393  << " a:active {color: #000000}" << std::endl
394  << " </style>" << std::endl
395  << " <div id='main_d'>" << std::endl
396  // << " <p>" << HD->getRefHisto()->GetTitle() << "</p>" //include the Title of the Plot as a title of the page
397  << " <img src='" << gifNameProjections << "' usemap='#results' alt=''"
398  << " height=" << projectionsHeight << " width=" << projectionsWidth << " border=0>" << std::endl
399  << " <map id='#results' name='results' onMouseOut=\"clear()\">" << std::endl;
400 
401  // loop over projections
402  std::vector<HistoData>::iterator pd;
403  for (pd = proj->begin(); pd != proj->end(); pd++) {
404 
405  // determine map coordinates for this bin (1 pixel offset due to borders?)
406  int bin = pd->getBin();
407  int x1 = projectionsLeftMargin + int(float(bin * 1.5 - 1.25) * projectionsBarsThickness);
408  int x2 = x1 + projectionsBarsThickness;
409  int y1 = projectionsTopMargin + 1;
411  std::string image = pd->getResultImage();
412  std::string target = pd->getResultTarget();
413 
414  // add coordinates area to image map
415  std::string tnClass = (bin - 1 >= float(proj->size()) / 2 ? "thumb_left" : "thumb_right");
416  fout << " <area shape='rect' alt='' coords='" << x1 << "," << y1 << "," << x2 << "," << y2 << "'"
417  << " href='" << target << "' onMouseOver=\"tn('" << target << "','" << image << "','" << tnClass
418  << "')\" "
419  << "onMouseDown=\"window.location.href='" << target << "'\">" << std::endl;
420 
421  }
422 
423  fout << " <area shape='default' nohref='nohref' onMouseDown='window.location.reload()' alt=''>" << std::endl
424  << " </map>" << std::endl
425  << " <br><img src=\"" << gifNameAllProj << "\">" << std::endl
426  << " </div>" << std::endl
427  << " <div id='thumb_div'><a href='#' id='thumb_link'><img src='' id='thumb_img' width=0 height=0 border=0></a></div>" << std::endl
428  // << " </a>"
429  << " </body>" << std::endl
430  << "</html>" << std::endl;
431 
432  // close the file
433  HD->setResultTarget(htmlNameProfile);
434  fout.close();
435 
436  }
437 
438  // if both profile dimensions were filled, we need an additional HTML document
439  if (pfDone[axisX] && pfDone[axisY]) {
440 
441  // create HTML support code for this HistoData
442  std::string html = Name + "_Results_Profiles.html";
443  std::ofstream fout(html.c_str());
444 
445  // make a simple frames portal to show both profile
446  fout << "<html>" << std::endl
447  << " <frameset rows=\"50%,50%\">" << std::endl
448  << " <frame src=\"" << Name << "_Results_py.html\">" << std::endl
449  << " <frame src=\"" << Name << "_Results_px.html\">" << std::endl
450  << " <noframes><body>" << std::endl
451  << " unable to display frames -- click to select desired page" << std::endl
452  << " <br><a href =\"" << Name << "_Results_py.html\">Y Projections</a>" << std::endl
453  << " <br><a href =\"" << Name << "_Results_px.html\">X Projections</a>" << std::endl
454  << " </body></noframes>" << std::endl
455  << " </frameset>" << std::endl
456  << "</html>" << std::endl;
457 
458  // close the file
459  HD->setResultTarget(html);
460  fout.close();
461 
462  }
463 
464 }
std::map< HistoData *, std::vector< HistoData > > projectionsY
std::map< HistoData *, std::vector< HistoData > > projectionsX
#define NULL
Definition: scimark2.h:8
std::string getName() const
Definition: HistoData.h:18
Definition: html.py:1
void setResultTarget(std::string Target)
Definition: HistoData.h:61
TH1 * getRefHisto() const
Definition: HistoData.h:23
bin
set the eta bin as selection string.
template<>
void PlotCompareUtility::makePlots ( HistoData HD)
private

Definition at line 61 of file Plot1D.h.

References MessageLogger_cfi::cerr, WDecay::kNone, listHistos::legend, AlCaHLTBitMon_QueryRunRegistry::string, and fftjetcommon_cfi::title.

61  {
62 
63  std::cerr << HD->getName() << "makePlots<Plot1D>\n";
64 
65  // do not make any new plot if empty
66  if (HD->getIsEmpty()) {
67  HD->setResultImage("NoData_Results.gif");
68  HD->setResultTarget("NoData_Results.gif");
69  return;
70  }
71 
72  // get the reference and comparison histograms
73  TH1F *href = (TH1F *)HD->getRefHisto();
74  TH1F *hnew = (TH1F *)HD->getNewHisto();
75 
76  // set drawing options on the reference histogram
77  href->SetStats(0);
78  href->SetLineWidth(2);
79  href->SetLineColor(14);
80  href->SetMarkerColor(14);
81  href->SetFillColor(18);
82 
83  // set drawing options on the new histogram
84  hnew->SetStats(0);
85  hnew->SetLineWidth(2);
86  hnew->SetLineColor(HD->getShadedLineColor());
87  hnew->SetFillStyle(HD->getShadedFillStyle());
88  hnew->SetFillColor(HD->getShadedFillColor());
89 
90  // place the test results as the title
91  TString title = HD->getName();
92  if (ksThreshold > 0) {title += " KS Score = "; title += HD->getKSScore();}
93  if (chi2Threshold > 0) { title += " Chi^2 Score = "; title += HD->getChi2Score();}
94 
95  // the canvas is rescaled during gif conversion, so add padding to Canvas dimensions
96  int plotsCanvasWidth = plotsWidth + 4;
97  int plotsCanvasHeight = plotsHeight + 28;
98 
99  // setup canvas for displaying the compared histograms
100  TCanvas hCanvas("hCanvas","hCanvas",plotsCanvasWidth,plotsCanvasHeight);
101  hCanvas.SetTopMargin(float(plotsTopMargin) / plotsHeight);
102  hCanvas.SetLeftMargin(float(plotsLeftMargin) / plotsWidth);
103  hCanvas.SetRightMargin(float(plotsRightMargin) / plotsWidth);
104  hCanvas.SetBottomMargin(float(plotsBottomMargin) / plotsHeight);
105  hCanvas.SetFrameFillColor(10);
106  hCanvas.SetGrid();
107  hCanvas.SetLogy(1);
108  hCanvas.Draw();
109 
110  TText canvasTitle(0.1,0.97,title.Data());
111  canvasTitle.Draw("SAME");
112 
113  // draw the histograms
114  href->Draw();
115  hnew->Draw("SAME");
116  if (HD->getDoDrawErrorBars()) hnew->Draw("E1SAME");
117 
118  // draw a legend
119  TLegend legend(0.15,0.01,0.3, 0.08);
120  legend.AddEntry(hnew,"New","lF");
121  legend.AddEntry(href,"Reference","lF");
122  legend.SetFillColor(kNone);
123  legend.Draw("SAME");
124 
125  // create the plots overlay image
126  std::string gifName = HD->getName() + "_Results.gif";
127  if (HD->getResultImage() == "") HD->setResultImage(gifName);
128  if (HD->getResultTarget() == "") HD->setResultTarget(gifName);
129  std::cerr << "About to print" << gifName << "\n";
130  hCanvas.Print(gifName.c_str());
131 
132 }
float getKSScore() const
Definition: HistoData.h:39
std::string getName() const
Definition: HistoData.h:18
int getShadedLineColor() const
Definition: HistoData.h:51
void setResultTarget(std::string Target)
Definition: HistoData.h:61
bool getDoDrawErrorBars() const
Definition: HistoData.h:28
TH1 * getRefHisto() const
Definition: HistoData.h:23
float getChi2Score() const
Definition: HistoData.h:40
bool getIsEmpty() const
Definition: HistoData.h:44
void setResultImage(std::string Image)
Definition: HistoData.h:60
int getShadedFillStyle() const
Definition: HistoData.h:53
TH1 * getNewHisto() const
Definition: HistoData.h:22
std::string getResultImage() const
Definition: HistoData.h:24
std::string getResultTarget() const
Definition: HistoData.h:25
int getShadedFillColor() const
Definition: HistoData.h:52
void PlotCompareUtility::makePlots ( HistoData )

Referenced by clearProjectionsY().

template<>
void PlotCompareUtility::makePlots ( HistoData HD)
private

Definition at line 133 of file Plot2D.h.

References begin, createfilelist::int, NULL, Plot1D, HistoData::setIsEmpty(), HistoData::setShadedFillColor(), HistoData::setShadedFillStyle(), HistoData::setShadedLineColor(), AlCaHLTBitMon_QueryRunRegistry::string, MuonErrorMatrixValues_cff::xAxis, anotherprimaryvertexanalyzer_cfi::xMax, anotherprimaryvertexanalyzer_cfi::xMin, MuonErrorMatrixValues_cff::yAxis, CMSBoostedTauSeedingParameters_cfi::yMax, and CMSBoostedTauSeedingParameters_cfi::yMin.

133  {
134 
135  // do not make any new plot if empty
136  if (HD->getIsEmpty()) {
137  HD->setResultImage("NoData_Results.gif");
138  HD->setResultTarget("NoData_Results.gif");
139  return;
140  }
141 
142  // loop over the projections to make 1D plots
143  std::vector<HistoData>::iterator hd;
144  for (hd = projectionsX[HD].begin(); hd != projectionsX[HD].end(); hd++) makePlots<Plot1D>(&(*hd));
145  for (hd = projectionsY[HD].begin(); hd != projectionsY[HD].end(); hd++) makePlots<Plot1D>(&(*hd));
146 
147  // make projection summaries
148  for (int axis = axisX; axis <= axisY; ++axis) {
149 
150  // get the list of projections associated with this HistoData
151  std::vector<HistoData> *proj = (axis == axisX) ? &projectionsX[HD] : &projectionsY[HD];
152  if (proj == NULL || proj->size() == 0) continue;
153 
154  // get the 2d histograms
155  TH2F *hnew2d = (TH2F *)HD->getNewHisto();
156  TH2F *href2d = (TH2F *)HD->getRefHisto();
157 
158  // generate a reasonable width for the projections summary
159  int numHistos = proj->size();
160  int bodyWidth = int(float(numHistos * projectionsBarsThickness) * 1.5);
162 
163  // the canvas is rescaled during gif conversion, so add padding to Canvas dimensions
164  int projectionsCanvasWidth = projectionsWidth + 4;
165  int projectionsCanvasHeight = projectionsHeight + 28;
166 
167  // create and setup projections canvas
168  TCanvas projectionsCanvas("projectionsCanvas","projectionsCanvas",projectionsCanvasWidth,projectionsCanvasHeight);
169  projectionsCanvas.SetFrameFillColor(10);
170  projectionsCanvas.SetLogy(1);
171  projectionsCanvas.SetTopMargin(float(projectionsTopMargin) / projectionsHeight);
172  projectionsCanvas.SetLeftMargin(float(projectionsLeftMargin) / projectionsWidth);
173  projectionsCanvas.SetRightMargin(float(projectionsRightMargin) / projectionsWidth);
174  projectionsCanvas.SetBottomMargin(float(projectionsBottomMargin) / projectionsHeight);
175  projectionsCanvas.Draw();
176 
177  // create and setup the summary histogram
178  TH1F projectionsSummary("projectionsSummary","Compatibility with Reference Histograms",numHistos,1,numHistos+1);
179  projectionsSummary.GetYaxis()->SetRangeUser(getThreshold()/10,2);
180  projectionsSummary.SetStats(0);
181 
182  // display histogram (take axis from original histogram)
183  projectionsSummary.Draw("AH");
184 
185  // draw X axis
186  float xMin = hnew2d->GetXaxis()->GetXmin();
187  float xMax = hnew2d->GetXaxis()->GetXmax();
188  int ticksNDiv = numHistos * 20 + bodyWidth / 50;//formerly *20
189  TGaxis *xAxis = new TGaxis(1,0,numHistos + 1,0,xMin,xMax,ticksNDiv,"");
190  if (axis == axisX) xAxis->SetTitle(hnew2d->GetYaxis()->GetTitle());
191  if (axis == axisY) xAxis->SetTitle(hnew2d->GetXaxis()->GetTitle());
192  xAxis->Draw();
193 
194  // draw Y axis
195  float yMin = getThreshold()/10;
196  float yMax = 2;
197  TGaxis *yAxis = new TGaxis(1,yMin,1,yMax,yMin,yMax,510,"G");
198  yAxis->SetTitle("Compatibility");
199  yAxis->Draw();
200 
201  // loop over projections and draw result
202  std::vector<HistoData>::iterator pd;
203  for (pd = proj->begin(); pd != proj->end(); pd++)
204  pd->drawResult(&projectionsSummary,true,false);
205 
206  // draw the pass/fail cutoff line
207  TLine passLine(1, getThreshold(), numHistos + 1, getThreshold());
208  passLine.SetLineColor(kRed);
209  passLine.SetLineWidth(2);
210  passLine.SetLineStyle(2);
211  passLine.Draw("SAME");
212 
213  // create the summary image
214  std::string gifName = HD->getName() + (axis == axisX ? "_Results_px.gif" : "_Results_py.gif");
215  projectionsCanvas.Print(gifName.c_str());
216 
217  // make overall projection plot of the original 2d histogram
218  std::string projName = HD->getName() + (axis == axisX ? "_py" : "_px");
219  std::string newBinsProj = projName + "_new";
220  std::string refBinsProj = projName + "_ref";
221  TH1D *href = (axis == axisX) ? href2d->ProjectionY(refBinsProj.c_str()) : href2d->ProjectionX(refBinsProj.c_str());
222  TH1D *hnew = (axis == axisX) ? hnew2d->ProjectionY(newBinsProj.c_str()) : hnew2d->ProjectionX(newBinsProj.c_str());
223 
224  // allow Root to delete these histograms after display
225  href->SetBit(kCanDelete);
226  hnew->SetBit(kCanDelete);
227 
228  // create a new HistoData based on this projection and plot it
229  HistoData allBins(projName,Plot1D,0,hnew,href);
230  allBins.setIsEmpty(false);
231  allBins.setShadedFillColor(HD->getShadedFillColor());
232  allBins.setShadedFillStyle(HD->getShadedFillStyle());
233  allBins.setShadedLineColor(HD->getShadedLineColor());
234  makePlots<Plot1D>(&allBins);
235 
236  // set the default image (axisY takes priority by default)
237  if (HD->getResultImage() == "" || axis == axisY) HD->setResultImage(projName + "_Results.gif");
238 
239  // set the default target (in case additional HTML code is/was not produced)
240  std::string currentTarget = HD->getResultTarget();
241  std::string xImgTarget = HD->getName() + "_px_Results.gif";
242  if (currentTarget == "" || (axis == axisY && currentTarget == xImgTarget)) HD->setResultTarget(projName + "_Results.gif");
243 
244  }
245 
246  /*
247  // make overall profile plot of the original 2d histogram
248  for (int axis = axisX; axis <= axisY; ++axis) {
249 
250  // make profile plots out of original 2D histograms
251  TProfile *pref = (axis == axisX) ? ((TH2F *)HD->getRefHisto())->ProfileY() : ((TH2F *)HD->getRefHisto())->ProfileX();
252  TProfile *pnew = (axis == axisX) ? ((TH2F *)HD->getNewHisto())->ProfileY() : ((TH2F *)HD->getNewHisto())->ProfileX();
253 
254  // renormalize results for display
255  renormalize(pref,pnew);
256 
257  // do not allow Root to deallocate this memory after drawing (tries to free twice?)
258  pref->SetBit(kCanDelete);
259  pnew->SetBit(kCanDelete);
260 
261  // set drawing options on the reference histogram
262  pref->SetStats(0);
263  pref->SetLineColor(kBlack);
264  pref->SetMarkerColor(kBlack);
265 
266  // set drawing options on the new histogram
267  pnew->SetStats(0);
268  pnew->SetLineColor(HD->getSolidLineColor());
269 
270  // place the test results as the title
271  TString title = HD->getName();
272 
273  // the canvas is rescaled during gif conversion, so add padding to Canvas dimensions
274  int plotsCanvasWidth = plotsWidth + 4;
275  int plotsCanvasHeight = plotsHeight + 28;
276 
277  // setup canvas for displaying the compared histograms
278  TCanvas hCanvas("hCanvas",title.Data(),plotsCanvasWidth,plotsCanvasHeight);
279  hCanvas.SetTopMargin(float(plotsTopMargin) / plotsHeight);
280  hCanvas.SetLeftMargin(float(plotsLeftMargin) / plotsWidth);
281  hCanvas.SetRightMargin(float(plotsRightMargin) / plotsWidth);
282  hCanvas.SetBottomMargin(float(plotsBottomMargin) / plotsHeight);
283  hCanvas.SetFrameFillColor(10);
284  hCanvas.SetGrid();
285  //hCanvas.SetLogy(1);
286  hCanvas.Draw();
287 
288  // draw the profiles
289  pref->Draw();
290  pnew->Draw("SAME");
291  if (HD->getDoDrawErrorBars()) pnew->Draw("E1SAME");
292 
293  // draw a legend
294  TLegend legend(0.15,0.01,0.3, 0.08);
295  legend.AddEntry(pnew,"New","lF");
296  legend.AddEntry(pref,"Reference","lF");
297  legend.SetFillColor(kNone);
298  legend.Draw("SAME");
299 
300  // create the plots overlay image
301  std::string gifName = HD->getName() + (axis == axisX ? "_pfx.gif" : "_pfy.gif");
302  hCanvas.Print(gifName.c_str());
303 
304  // set the default image (axisY takes priority by default)
305  if (HD->getResultImage() == "" || axis == axisY) HD->setResultImage(gifName);
306 
307  // set the default target (in case additional HTML code is/was not produced)
308  std::string currentTarget = HD->getResultTarget();
309  std::string xImgTarget = HD->getName() + "_pfx.gif";
310  if (currentTarget == "" || (axis == axisY && currentTarget == xImgTarget)) HD->setResultTarget(gifName);
311 
312  }
313  */
314 
315 
316 }
std::map< HistoData *, std::vector< HistoData > > projectionsY
std::map< HistoData *, std::vector< HistoData > > projectionsX
#define NULL
Definition: scimark2.h:8
std::string getName() const
Definition: HistoData.h:18
int getShadedLineColor() const
Definition: HistoData.h:51
void setResultTarget(std::string Target)
Definition: HistoData.h:61
TH1 * getRefHisto() const
Definition: HistoData.h:23
double getThreshold() const
bool getIsEmpty() const
Definition: HistoData.h:44
void setResultImage(std::string Image)
Definition: HistoData.h:60
#define begin
Definition: vmac.h:32
int getShadedFillStyle() const
Definition: HistoData.h:53
TH1 * getNewHisto() const
Definition: HistoData.h:22
std::string getResultImage() const
Definition: HistoData.h:24
std::string getResultTarget() const
Definition: HistoData.h:25
int getShadedFillColor() const
Definition: HistoData.h:52
template<int PlotType>
void PlotCompareUtility::makePlots ( HistoData )
private
void PlotCompareUtility::makeSummary ( std::string  Name)

Referenced by clearProjectionsY().

void PlotCompareUtility::makeSummaryHTML ( std::string  Name)

Referenced by clearProjectionsY().

void PlotCompareUtility::makeSummaryPlot ( std::string  Name)

Referenced by clearProjectionsY().

void PlotCompareUtility::renormalize ( TH1 *  ,
TH1 *   
)
private
void PlotCompareUtility::setChi2Threshold ( double  Threshold)
inline
void PlotCompareUtility::setKSThreshold ( double  Threshold)
inline
void PlotCompareUtility::setPlotsBottomMargin ( int  Pixels)
inline
void PlotCompareUtility::setPlotsHeight ( int  Pixels)
inline

Definition at line 84 of file PlotCompareUtility.h.

References plotsHeight.

84 { plotsHeight = Pixels; }
void PlotCompareUtility::setPlotsLeftMargin ( int  Pixels)
inline

Definition at line 87 of file PlotCompareUtility.h.

References plotsLeftMargin.

87 { plotsLeftMargin = Pixels; }
void PlotCompareUtility::setPlotsRightMargin ( int  Pixels)
inline

Definition at line 88 of file PlotCompareUtility.h.

References plotsRightMargin.

88 { plotsRightMargin = Pixels; }
void PlotCompareUtility::setPlotsTopMargin ( int  Pixels)
inline

Definition at line 86 of file PlotCompareUtility.h.

References plotsTopMargin.

86 { plotsTopMargin = Pixels; }
void PlotCompareUtility::setPlotsWidth ( int  Pixels)
inline

Definition at line 85 of file PlotCompareUtility.h.

References plotsWidth.

85 { plotsWidth = Pixels; }
void PlotCompareUtility::setProjectionsBarsThickness ( int  Pixels)
inline

Definition at line 79 of file PlotCompareUtility.h.

References projectionsBarsThickness.

void PlotCompareUtility::setProjectionsBottomMargin ( int  Pixels)
inline

Definition at line 83 of file PlotCompareUtility.h.

References projectionsBottomMargin.

void PlotCompareUtility::setProjectionsHeight ( int  Pixels)
inline

Definition at line 78 of file PlotCompareUtility.h.

References projectionsHeight.

78 { projectionsHeight = Pixels; }
void PlotCompareUtility::setProjectionsiWidth ( int  Pixels)
inline

Definition at line 77 of file PlotCompareUtility.h.

References projectionsWidth.

77 { projectionsWidth = Pixels; }
void PlotCompareUtility::setProjectionsLeftMargin ( int  Pixels)
inline

Definition at line 81 of file PlotCompareUtility.h.

References projectionsLeftMargin.

void PlotCompareUtility::setProjectionsRightMargin ( int  Pixels)
inline

Definition at line 82 of file PlotCompareUtility.h.

References projectionsRightMargin.

void PlotCompareUtility::setProjectionsTopMargin ( int  Pixels)
inline

Definition at line 80 of file PlotCompareUtility.h.

References projectionsTopMargin.

80 { projectionsTopMargin = Pixels; }
void PlotCompareUtility::setSummaryBarsThickness ( int  Pixels)
inline

Definition at line 72 of file PlotCompareUtility.h.

References summaryBarsThickness.

72 { summaryBarsThickness = Pixels; }
void PlotCompareUtility::setSummaryBottomMargin ( int  Pixels)
inline

Definition at line 76 of file PlotCompareUtility.h.

References summaryBottomMargin.

76 { summaryBottomMargin = Pixels; }
void PlotCompareUtility::setSummaryHeight ( int  Pixels)
inline

Definition at line 71 of file PlotCompareUtility.h.

References summaryHeight.

71 { summaryHeight = Pixels; }
void PlotCompareUtility::setSummaryLeftMargin ( int  Pixels)
inline

Definition at line 74 of file PlotCompareUtility.h.

References summaryLeftMargin.

74 { summaryLeftMargin = Pixels; }
void PlotCompareUtility::setSummaryRightMargin ( int  Pixels)
inline

Definition at line 75 of file PlotCompareUtility.h.

References summaryRightMargin.

75 { summaryRightMargin = Pixels; }
void PlotCompareUtility::setSummaryTopMargin ( int  Pixels)
inline

Definition at line 73 of file PlotCompareUtility.h.

References summaryTopMargin.

73 { summaryTopMargin = Pixels; }
void PlotCompareUtility::setSummaryWidth ( int  Pixels)
inline

Definition at line 70 of file PlotCompareUtility.h.

References summaryWidth.

70 { summaryWidth = Pixels; }

Member Data Documentation

double PlotCompareUtility::chi2Threshold
private

Definition at line 131 of file PlotCompareUtility.h.

Referenced by getChi2Threshold(), and setChi2Threshold().

bool PlotCompareUtility::finalResult
private

Definition at line 167 of file PlotCompareUtility.h.

Referenced by getFinalResult().

std::vector<HistoData> PlotCompareUtility::histos
private

Definition at line 117 of file PlotCompareUtility.h.

Referenced by clearHistos(), getHistos(), and getNumHistos().

double PlotCompareUtility::ksThreshold
private

Definition at line 130 of file PlotCompareUtility.h.

Referenced by getKSThreshold(), and setKSThreshold().

std::string PlotCompareUtility::newBasePath
private

Definition at line 124 of file PlotCompareUtility.h.

TFile* PlotCompareUtility::newFile
private
std::string PlotCompareUtility::newPrefix
private

Definition at line 125 of file PlotCompareUtility.h.

int PlotCompareUtility::plotsBottomMargin
private

Definition at line 164 of file PlotCompareUtility.h.

Referenced by getPlotsBottomMargin(), and setPlotsBottomMargin().

int PlotCompareUtility::plotsHeight
private

Definition at line 160 of file PlotCompareUtility.h.

Referenced by getPlotsHeight(), and setPlotsHeight().

int PlotCompareUtility::plotsLeftMargin
private

Definition at line 162 of file PlotCompareUtility.h.

Referenced by getPlotsLeftMargin(), and setPlotsLeftMargin().

int PlotCompareUtility::plotsRightMargin
private

Definition at line 163 of file PlotCompareUtility.h.

Referenced by getPlotsRightMargin(), and setPlotsRightMargin().

int PlotCompareUtility::plotsTopMargin
private

Definition at line 161 of file PlotCompareUtility.h.

Referenced by getPlotsTopMargin(), and setPlotsTopMargin().

int PlotCompareUtility::plotsWidth
private

Definition at line 159 of file PlotCompareUtility.h.

Referenced by getPlotsWidth(), and setPlotsWidth().

int PlotCompareUtility::projectionsBarsThickness
private
int PlotCompareUtility::projectionsBottomMargin
private

Definition at line 156 of file PlotCompareUtility.h.

Referenced by getProjectionsBottomMargin(), and setProjectionsBottomMargin().

int PlotCompareUtility::projectionsHeight
private

Definition at line 151 of file PlotCompareUtility.h.

Referenced by getProjectionsHeight(), and setProjectionsHeight().

int PlotCompareUtility::projectionsLeftMargin
private

Definition at line 154 of file PlotCompareUtility.h.

Referenced by getProjectionsLeftMargin(), and setProjectionsLeftMargin().

int PlotCompareUtility::projectionsRightMargin
private

Definition at line 155 of file PlotCompareUtility.h.

Referenced by getProjectionsRightMargin(), and setProjectionsRightMargin().

int PlotCompareUtility::projectionsTopMargin
private

Definition at line 153 of file PlotCompareUtility.h.

Referenced by getProjectionsTopMargin(), and setProjectionsTopMargin().

int PlotCompareUtility::projectionsWidth
private

Definition at line 150 of file PlotCompareUtility.h.

Referenced by getProjectionsWidth(), and setProjectionsiWidth().

std::map<HistoData *,std::vector<HistoData> > PlotCompareUtility::projectionsX
private

Definition at line 118 of file PlotCompareUtility.h.

Referenced by clearProjectionsX(), and getProjectionsX().

std::map<HistoData *,std::vector<HistoData> > PlotCompareUtility::projectionsY
private

Definition at line 119 of file PlotCompareUtility.h.

Referenced by clearProjectionsY(), and getProjectionsY().

std::string PlotCompareUtility::refBasePath
private

Definition at line 126 of file PlotCompareUtility.h.

TFile* PlotCompareUtility::refFile
private

Definition at line 122 of file PlotCompareUtility.h.

std::string PlotCompareUtility::refPrefix
private

Definition at line 127 of file PlotCompareUtility.h.

int PlotCompareUtility::summaryBarsThickness
private

Definition at line 143 of file PlotCompareUtility.h.

Referenced by getSummaryBarsThickness(), and setSummaryBarsThickness().

int PlotCompareUtility::summaryBottomMargin
private

Definition at line 147 of file PlotCompareUtility.h.

Referenced by getSummaryBottomMargin(), and setSummaryBottomMargin().

int PlotCompareUtility::summaryHeight
private

Definition at line 142 of file PlotCompareUtility.h.

Referenced by getSummaryHeight(), and setSummaryHeight().

int PlotCompareUtility::summaryLeftMargin
private

Definition at line 145 of file PlotCompareUtility.h.

Referenced by getSummaryLeftMargin(), and setSummaryLeftMargin().

int PlotCompareUtility::summaryRightMargin
private

Definition at line 146 of file PlotCompareUtility.h.

Referenced by getSummaryRightMargin(), and setSummaryRightMargin().

int PlotCompareUtility::summaryTopMargin
private

Definition at line 144 of file PlotCompareUtility.h.

Referenced by getSummaryTopMargin(), and setSummaryTopMargin().

int PlotCompareUtility::summaryWidth
private

Definition at line 141 of file PlotCompareUtility.h.

Referenced by getSummaryWidth(), and setSummaryWidth().