EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QA_Draw_Utility.C File Reference
#include <TCanvas.h>
#include <TClass.h>
#include <TDirectory.h>
#include <TFile.h>
#include <TSystem.h>
#include <TGraphErrors.h>
#include <TH1F.h>
#include <TList.h>
#include <TObject.h>
#include <TString.h>
#include <TStyle.h>
#include <TTree.h>
#include <TLegend.h>
#include <TLegendEntry.h>
#include <TLine.h>
#include <TPad.h>
#include <cassert>
#include <cmath>
#include <iostream>
+ Include dependency graph for QA_Draw_Utility.C:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QA_Draw_Utility_C
 

Functions

void SavePad (TPad *p)
 Service function to SaveCanvas()
 
void SaveCanvas (TCanvas *c, TString name="", Bool_t bEPS=kTRUE)
 Save canvas to multiple formats.
 
double DrawReference (TH1 *hnew, TH1 *href, bool draw_href_error=false)
 
void DrawReference (TGraph *hnew, TGraph *href, bool draw_href_error=true)
 
TGraphErrors * FitResolution (const TH2F *h2, const bool normalize_mean=true)
 Fit for resolution of TH2F.
 
TGraphErrors * FitProfile (const TH2F *h2)
 Fit for profile along the Y direction of TH2F.
 
TH1 * GetBinominalRatio (TH1 *h_pass, TH1 *h_n_trial, bool process_zero_bins=false)
 ratio between two histograms with binominal error based on Wilson score interval. Assuming each histogram is count.
 
void PutInputFileName (TCanvas *c1, const double height, const char *new_file_name, const char *ref_file_name)
 

Detailed Description

Author
Jin Huang jhuan.nosp@m.g@bn.nosp@m.l.gov
Version
Revision:
Date
Date:

Definition in file QA_Draw_Utility.C.

Macro Definition Documentation

#define QA_Draw_Utility_C

Definition at line 12 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 12 of file QA_Draw_Utility.C

Function Documentation

double DrawReference ( TH1 *  hnew,
TH1 *  href,
bool  draw_href_error = false 
)

Draw 1D histogram along with its reference as shade

Parameters
[in]draw_href_errorwhether to draw error band for reference plot. Otherwise, it is a filled histogram (default)

Definition at line 125 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 125 of file QA_Draw_Utility.C

Referenced by QA_Draw_Calorimeter_Sum_Cluster(), QA_Draw_Calorimeter_Sum_TrackProj(), QA_Draw_Calorimeter_Sum_TrackProjEP(), QA_Draw_CEMC_G4Hit(), QA_Draw_CEMC_TowerCluster(), QA_Draw_HCALIN_G4Hit(), QA_Draw_HCALIN_TowerCluster(), QA_Draw_HCALOUT_G4Hit(), and QA_Draw_HCALOUT_TowerCluster().

+ Here is the caller graph for this function:

void DrawReference ( TGraph *  hnew,
TGraph *  href,
bool  draw_href_error = true 
)

Draw 1D TGraph along with its reference as shade

Parameters
[in]draw_href_errorwhether to draw error band for reference plot. Otherwise, it is a filled histogram (default)

Definition at line 212 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 212 of file QA_Draw_Utility.C

TGraphErrors* FitProfile ( const TH2F *  h2)

Fit for profile along the Y direction of TH2F.

Definition at line 312 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 312 of file QA_Draw_Utility.C

References f2(), h1, n, rand, x, and y.

+ Here is the call graph for this function:

TGraphErrors* FitResolution ( const TH2F *  h2,
const bool  normalize_mean = true 
)

Fit for resolution of TH2F.

Definition at line 259 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 259 of file QA_Draw_Utility.C

References f2(), h1, n, rand, x, and y.

+ Here is the call graph for this function:

TH1* GetBinominalRatio ( TH1 *  h_pass,
TH1 *  h_n_trial,
bool  process_zero_bins = false 
)

ratio between two histograms with binominal error based on Wilson score interval. Assuming each histogram is count.

Definition at line 374 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 374 of file QA_Draw_Utility.C

References p, x, y, and z.

void PutInputFileName ( TCanvas *  c1,
const double  height,
const char *  new_file_name,
const char *  ref_file_name 
)

Put input file name on the canvas

Parameters
[in]c1canvas pointer
[in]bottomheight fraction height of the canvas to be used for this label
[in]new_file_namenew file name being inspected
[in]ref_file_namereference file name

Definition at line 421 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 421 of file QA_Draw_Utility.C

References t.

void SaveCanvas ( TCanvas *  c,
TString  name = "",
Bool_t  bEPS = kTRUE 
)

Save canvas to multiple formats.

Parameters
[in]cpointer to the canvas
[in]nameBase of the file name. The default is the name of the cavas
[in]bEPStrue = save .eps and .pdf format too.

Definition at line 82 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 82 of file QA_Draw_Utility.C

References name, SavePad(), x, and y.

Referenced by QA_Draw_Calorimeter_Sum_Cluster(), QA_Draw_Calorimeter_Sum_TrackProj(), QA_Draw_Calorimeter_Sum_TrackProjEP(), QA_Draw_CEMC_G4Hit(), QA_Draw_CEMC_TowerCluster(), QA_Draw_HCALIN_G4Hit(), QA_Draw_HCALIN_TowerCluster(), QA_Draw_HCALOUT_G4Hit(), and QA_Draw_HCALOUT_TowerCluster().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SavePad ( TPad *  p)

Service function to SaveCanvas()

Definition at line 41 of file QA_Draw_Utility.C.

View newest version in sPHENIX GitHub at line 41 of file QA_Draw_Utility.C

References p.

Referenced by SaveCanvas().

+ Here is the caller graph for this function: