4 * Scripts to draw energy loss fits from correction object file
6 * @ingroup pwglf_forward_scripts_corr
8 void Setup(Bool_t compile)
10 const char* post = (compile ? "++g" : "");
11 const char* fwd = "$ALICE_ROOT/PWGLF/FORWARD/analysis2";
12 if (!gROOT->GetClass("AliFMDCorrELossFit"))
13 gROOT->Macro(Form("%s/scripts/LoadLibs.C", fwd));
14 gSystem->AddIncludePath(Form("-I%s/scripts -I%s/corrs -I%s "
15 "-I$ALICE_ROOT/include", fwd, fwd, fwd));
16 gROOT->LoadMacro(Form("%s/scripts/SummaryDrawer.C%s", fwd, post));
17 gROOT->LoadMacro(Form("%s/corrs/CorrDrawer.C%s", fwd, post));
21 * Draw energy loss fits to a multi-page PDF.
24 * The input file is expected to contain a AliFMDCorrELossFit object
25 * named @c elossfits in the top level directory.
28 * A multi-page PDF. Note, that the PDF generated by ROOT in this way
29 * is broken (cannot be read by Acrobat Reader on Windows and MacOSX)
30 * and one should pass it through a filter to correct these problems.
32 * @param runNo Run number
33 * @param sys Collision system
34 * @param sNN Collision energy in GeV
35 * @param field L3 field strength
36 * @param mc For simulation input
37 * @param sat For satellite interactions
38 * @param fname File name
39 * @param details Drawing options
41 * @ingroup pwglf_forward_scripts_corr
44 DrawCorrELoss(ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field,
45 Bool_t mc=false, Bool_t sat=false,
46 const char* fname=0, Bool_t details=true)
48 // Load libraries and object
49 // const char* fwd = "$ALICE_ROOT/PWGLF/FORWARD/analysis2";
53 d.Summarize(AliForwardCorrectionManager::kELossFits, runNo, sys, sNN, field,
57 * Draw the energy loss correction
60 * @param file Input file with the full fits
61 * @param local Local correction database
64 DrawCorrELoss(Bool_t mc,
65 const char* file="forward_eloss.root",
66 const char* local="fmd_corrections.root")
70 CorrDrawer::Summarize(AliForwardCorrectionManager::kELossFits,
71 mc, file, local, "LANDSCAPE FEW");
74 * Draw the energy loss correction
77 * @param dummy Not used
78 * @param file Input file with the full fits
81 DrawCorrELoss(Bool_t mc, Bool_t dummy,
82 const char* file="forward_eloss_rerun.root")
86 Printf("Drawing fit results from %s", file);
87 TFile* hist = TFile::Open(file, "READ");
89 Error("DrawCorrELoss", "Failed to open %s", file);
92 TList* res = static_cast<TList*>(hist->Get("ForwardELossResults"));
94 Error("DrawCorrEloss", "Failed to get ForwardELossResults from %s", file);
97 TList* ef = static_cast<TList*>(res->FindObject("fmdEnergyFitter"));
99 Error("DrawCorrEloss", "Failed to get fmdEnergyFitter from %s:/%s",
100 file, res->GetName());
104 AliFMDCorrELossFit* fits =
105 static_cast<AliFMDCorrELossFit*>(ef->FindObject("AliFMDCorrELossFit"));
107 Error("DrawCorrEloss", "Failed to get AliFMDCorrELossFit from %s:/%s/%s",
108 file, res->GetName(), ef->GetName());
112 CorrDrawer* cd = new CorrDrawer;
113 cd->fELossExtra = file;
115 // cd->fLandscape = true;
116 cd->Summarize(const_cast<const AliFMDCorrELossFit*>(fits), true);