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 );
16 TFile *reff = TFile::Open(reffile.c_str());
17 TFile *newf = TFile::Open(newfile.c_str());
25 TFile *outfilef =
new TFile(outfile.c_str(),
"recreate");
35 TCanvas*
Draw( TFile* qa_file_new, TFile* qa_file_ref,
const TString&
hist_name_prefix,
const TString& tag )
38 const TString
prefix = TString(
"h_") + hist_name_prefix + TString(
"_");
40 auto cv =
new TCanvas(
41 TString(
"QA_Draw_Micromegas_") + tag + TString(
"_") + hist_name_prefix,
42 TString(
"QA_Draw_Micromegas_") + tag + TString(
"_") + hist_name_prefix,
52 auto hnew =
static_cast<TH1*
>( qa_file_new->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) );
53 hnew->Scale( 1./hnew->GetEntries() );
57 auto href = qa_file_ref ?
static_cast<TH1*
>( qa_file_ref->GetObjectChecked( Form(
"%s%s_%i", prefix.Data(), tag.Data(),
layer ),
"TH1" ) ) :
nullptr;
60 href->Scale( 1./href->GetEntries() );