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 );
15 TFile *reff = TFile::Open(reffile.c_str());
16 TFile *newf = TFile::Open(newfile.c_str());
28 TFile *outfilef =
new TFile(outfile.c_str(),
"recreate");
43 TCanvas*
Draw( TFile* qa_file_new, TFile* qa_file_ref,
const TString&
hist_name_prefix,
const TString& tag )
46 const TString
prefix = TString(
"h_") + hist_name_prefix + TString(
"_");
48 auto cv =
new TCanvas(
49 TString(
"QA_Draw_Intt_") + tag + TString(
"_") + hist_name_prefix,
50 TString(
"QA_Draw_Intt_") + tag + TString(
"_") + hist_name_prefix,
60 auto hnew =
static_cast<TH1*
>( qa_file_new->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) );
61 hnew->Scale( 1./hnew->GetEntries() );
65 auto href = qa_file_ref ?
static_cast<TH1*
>( qa_file_ref->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) ) :
nullptr;
68 href->Scale( 1./href->GetEntries() );