AliPhysics  64f4410 (64f4410)
DrawCorrELoss.C
Go to the documentation of this file.
1 
8 void Setup(Bool_t compile)
9 {
10  const char* post = (compile ? "+g" : "");
11  const char* fwd = "$ALICE_PHYSICS/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_PHYSICS/include "
16  "-I$ALICE_ROOT/include",
17  fwd, fwd, fwd));
18  gROOT->LoadMacro(Form("%s/scripts/SummaryDrawer.C%s", fwd, post));
19  gROOT->LoadMacro(Form("%s/corrs/CorrDrawer.C%s", fwd, post));
20 
21 }
45 void
47  Bool_t mc=false, Bool_t sat=false,
48  const char* fname=0, Bool_t details=true)
49 {
50  // Load libraries and object
51  // const char* fwd = "$ALICE_PHYSICS/PWGLF/FORWARD/analysis2";
52  Setup(false);
53 
54  CorrDrawer d;
55  d.Summarize(AliForwardCorrectionManager::kELossFits, runNo, sys, sNN, field,
56  mc, sat, "", fname);
57 }
65 void
67  const char* file="forward_eloss.root",
68  const char* local="fmd_corrections.root")
69 {
70  Setup(true);
71 
73  mc, file, local, "LANDSCAPE FEW");
74 }
82 void
84  const char* file="forward_eloss_rerun.root")
85 {
86  Setup(true);
87 
88  Printf("Drawing fit results from %s", file);
89  TFile* hist = TFile::Open(file, "READ");
90  if (!hist) {
91  Error("DrawCorrELoss", "Failed to open %s", file);
92  return;
93  }
94  TList* res = static_cast<TList*>(hist->Get("ForwardELossResults"));
95  if (!res) {
96  Error("DrawCorrEloss", "Failed to get ForwardELossResults from %s", file);
97  return;
98  }
99  TList* ef = static_cast<TList*>(res->FindObject("fmdEnergyFitter"));
100  if (!ef) {
101  Error("DrawCorrEloss", "Failed to get fmdEnergyFitter from %s:/%s",
102  file, res->GetName());
103  return;
104  }
105 
106  AliFMDCorrELossFit* fits =
107  static_cast<AliFMDCorrELossFit*>(ef->FindObject("AliFMDCorrELossFit"));
108  if (!fits) {
109  Error("DrawCorrEloss", "Failed to get AliFMDCorrELossFit from %s:/%s/%s",
110  file, res->GetName(), ef->GetName());
111  return;
112  }
113 
114  CorrDrawer* cd = new CorrDrawer;
115  cd->fELossExtra = file;
117  // cd->fLandscape = true;
118  cd->Summarize(const_cast<const AliFMDCorrELossFit*>(fits), true);
119 }
120 
121 //
122 // EOF
123 //
UShort_t fMinQuality
Definition: CorrDrawer.C:27
TSystem * gSystem
unsigned long ULong_t
Definition: External.C:38
short Short_t
Definition: External.C:23
void Setup(Bool_t compile)
Definition: DrawCorrELoss.C:8
virtual void Summarize(const TString &what, ULong_t runNo, const Char_t *sys, UShort_t sNN, Short_t field, Bool_t mc=false, Bool_t sat=false, Option_t *options="", const char *local="")
Definition: CorrDrawer.C:262
const char * fwd
void DrawCorrELoss(ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field, Bool_t mc=false, Bool_t sat=false, const char *fname=0, Bool_t details=true)
Definition: DrawCorrELoss.C:46
TFile * file
TList with histograms for a given trigger.
unsigned short UShort_t
Definition: External.C:28
TList * ef
Definition: TestFitELoss.C:145
bool Bool_t
Definition: External.C:53
TString fELossExtra
Definition: CorrDrawer.C:26