/*************************************************************** processHFEQAtask: Post Processing of HF QA task in Analysis QA train Modification Done // sjena To save file and putting an unique naming convention ***************************************************************/ void processHFEQAtask(const char *fnamedata = "AnalysisResults.root", TString suffix = "eps", const char * outfile = "HFEQAtask_output.root") { const char *fnamedir = "t131073f16s0p1TPC110r60p80ITS4Pi2DCAr100z200TOF30TPCe50V0D2er8i0t-20t50"; const char *fnamelist = "list_t131073f16s0p1TPC110r60p80ITS4Pi2DCAr100z200TOF30TPCe50V0D2er8i0t-20t50"; gSystem->Load("libANALYSIS.so"); gSystem->Load("libANALYSISalice.so"); gSystem->Load("libCORRFW.so"); gSystem->Load("libTender.so"); gSystem->Load("libPWGPP.so"); gSystem->Load("libPWGflowBase.so"); gSystem->Load("libPWGflowTasks.so"); gSystem->Load("libPWGHFhfe.so"); gStyle->SetPalette(1); gStyle->SetOptStat(1111); gStyle->SetPadBorderMode(0); gStyle->SetCanvasColor(10); gStyle->SetPadLeftMargin(0.13); gStyle->SetPadRightMargin(0.13); gStyle->SetPadBottomMargin(0.13); gStyle->SetPadTopMargin(0.13); ////////////////////// // Data ////////////////////// TFile *indata = TFile::Open(fnamedata); indata->ls(); TDirectoryFile *d = (TDirectoryFile *) indata->Get(fnamedir); if(!d) { Printf("FATAL: %s : Not found", fnamedir); Printf("Exiting <<<<<<<<<<<<<<<< processHFEQAtask >>>>>>>>>>>>>"); return; } TList *qadata = (TList *) d->Get(fnamelist); if(!qadata) { Printf("FATAL: %s : Not found", fnamelist); Printf("Exiting <<<<<<<<<<<<<<<< processHFEQAtask >>>>>>>>>>>>>"); return; } TList *qaadata = (TList *)qadata->FindObject("HFEpidQA"); if(!qaadata) { Printf("FATAL: HFEpidQA Not found"); Printf("Exiting <<<<<<<<<<<<<<<< processHFEQAtask >>>>>>>>>>>>>"); return; } // Make Plots for TPC AliHFEtpcPIDqa *tpcqadata = (AliHFEtpcPIDqa *)qaadata->FindObject("TPCQA"); AliHFEcollection *collectiontpc = tpcqadata->GetHistograms(); THnSparseF *tpcsparseF = (THnSparseF *) collectiontpc->Get("tpcnSigma"); // Make Plots for TOF AliHFEtofPIDqa *tofqadata = (AliHFEtofPIDqa *)qaadata->FindObject("TOFQA"); AliHFEcollection *collectiontof = tofqadata->GetHistoCollection(); THnSparseF *tofsparseF = (THnSparseF *) collectiontof->Get("tofnSigma"); THnSparseF *toftpcsparseF = (THnSparseF *) collectiontof->Get("tofMonitorTPC"); //////////////// // Projection ///////////////// TAxis *pidaxistpc = tpcsparseF->GetAxis(0); TAxis *pidaxistof = tofsparseF->GetAxis(0); TAxis *pidaxistoftpc = toftpcsparseF->GetAxis(0); TAxis *stepaxistpc = tpcsparseF->GetAxis(3); TAxis *stepaxistof = tofsparseF->GetAxis(3); TAxis *stepaxistoftpc = toftpcsparseF->GetAxis(3); TAxis *centralityaxistpc = tpcsparseF->GetAxis(4); TAxis *centralityaxistof = tofsparseF->GetAxis(4); TAxis *centralityaxistoftpc = toftpcsparseF->GetAxis(4); stepaxistpc->SetRange(1,1); stepaxistof->SetRange(1,1); stepaxistoftpc->SetRange(2,2); Int_t nbinsc = centralityaxistpc->GetNbins(); printf("There are %d centrality bins \n",nbinsc); // centralityaxistpc->SetRange(8,9); centralityaxistof->SetRange(8,9); centralityaxistoftpc->SetRange(8,9); stepaxistoftpc->SetRange(1,1); TH2D *toftpc2Dsumper = toftpcsparseF->Projection(2,1); toftpc2Dsumper->SetName("toftpc2Dsumper_21"); TH2D *tof2Dsumper = tofsparseF->Projection(2,1); tof2Dsumper->SetName("tof2Dsumper_21"); stepaxistof->SetRange(2,2); TH2D *tof2Dsumbper = tofsparseF->Projection(2,1); tof2Dsumbper->SetName("tof2Dsumbper_21"); TH2D *tpc2Dsumper = tpcsparseF->Projection(2,1); tpc2Dsumper->SetName("toftpc2Dsumper_21"); stepaxistpc->SetRange(2,2); TH2D *tpc2Dsumbper = tpcsparseF->Projection(2,1); tpc2Dsumbper->SetName("tpc2Dsumbper_21"); // centralityaxistpc->SetRange(0,1); centralityaxistof->SetRange(0,1); centralityaxistoftpc->SetRange(0,1); stepaxistpc->SetRange(1,1); stepaxistof->SetRange(1,1); stepaxistoftpc->SetRange(1,1); TH2D *toftpc2Dsumc = toftpcsparseF->Projection(2,1); toftpc2Dsumc->SetName("toftpc2Dsumc_21"); TH2D *tof2Dsumc = tofsparseF->Projection(2,1); tof2Dsumc->SetName("tof2Dsumc_21"); stepaxistof->SetRange(2,2); TH2D *tof2Dsumbc = tofsparseF->Projection(2,1); tof2Dsumbc->SetName("tof2Dsumbc_21"); TH2D *tpc2Dsumc = tpcsparseF->Projection(2,1); tpc2Dsumc->SetName("tpc2Dsumc_21"); stepaxistpc->SetRange(2,2); TH2D *tpc2Dsumbc = tpcsparseF->Projection(2,1); tpc2Dsumbc->SetName("tpc2Dsumbc_21"); /////////////// // Plots /////////////// //added by sjena TFile *fout = TFile::Open(outfile,"UPDATE"); fout->ls(); TDirectoryFile *cdd = NULL; cdd = (TDirectoryFile*)fout->Get("HF"); if(!cdd) { Printf("Warning: HF