1 #include "../CommonTools.h"
2 #include <sPhenixStyle.C>
4 TCanvas*
Draw( TFile* qa_file_new, TFile* qa_file_ref,
const TString&
hist_name_prefix,
const TString& tag );
12 TFile *reff = TFile::Open(reffile.c_str());
13 TFile *newf = TFile::Open(newfile.c_str());
25 TFile *outfilef =
new TFile(outfile.c_str(),
"recreate");
39 TCanvas*
Draw( TFile* qa_file_new, TFile* qa_file_ref,
const TString&
hist_name_prefix,
const TString& tag )
42 const TString
prefix = TString(
"h_") + hist_name_prefix + TString(
"_");
44 auto cv =
new TCanvas(
45 TString(
"QA_Draw_Mvtx_") + tag + TString(
"_") + hist_name_prefix,
46 TString(
"QA_Draw_Mvtx_") + tag + TString(
"_") + hist_name_prefix,
56 auto hnew =
static_cast<TH1*
>( qa_file_new->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) );
57 hnew->Scale( 1./hnew->GetEntries() );
59 hnew->GetXaxis()->SetMaxDigits(2);
62 auto href = qa_file_ref ?
static_cast<TH1*
>( qa_file_ref->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) ) :
nullptr;
65 href->Scale( 1./href->GetEntries() );
67 href->GetXaxis()->SetMaxDigits(2);
73 gPad->SetRightMargin(0.15);