]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/corrs/DrawCorrELoss.C
a0e3e905eb6f74c4efd0a7b257418f2c3e1e5633
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / corrs / DrawCorrELoss.C
1 /**
2  * @file 
3  * 
4  * Scripts to draw energy loss fits from correction object file 
5  *
6  * @ingroup pwglf_forward_scripts_corr
7  */
8 /** 
9  * Draw energy loss fits to a multi-page PDF. 
10  *
11  * @par Input: 
12  * The input file is expected to contain a AliFMDCorrELossFit object
13  * named @c elossfits in the top level directory.
14  * 
15  * @par Output: 
16  * A multi-page PDF.  Note, that the PDF generated by ROOT in this way
17  * is broken (cannot be read by Acrobat Reader on Windows and MacOSX)
18  * and one should pass it through a filter to correct these problems.
19  * 
20  * @param fname   File name 
21  * @param option  Drawing options 
22  *
23  * @ingroup pwglf_forward_scripts_corr
24  */
25 void
26 DrawCorrELoss(ULong_t runNo, UShort_t sys, UShort_t sNN, Short_t field,
27               Bool_t mc=false, Bool_t sat=false, 
28               const char* fname=0, Bool_t details=true)
29 {
30   //__________________________________________________________________
31   // Load libraries and object 
32   // const char* fwd = "$ALICE_ROOT/PWGLF/FORWARD/analysis2";
33   const char* fwd = "$ALICE_ROOT/../trunk/PWGLF/FORWARD/analysis2";
34   gROOT->Macro(Form("%s/scripts/LoadLibs.C", fwd));
35   gROOT->LoadMacro(Form("%s/scripts/SummaryDrawer.C", fwd));
36   gROOT->LoadMacro(Form("%s/corrs/CorrDrawer.C", fwd));
37
38   // --- Set limits on fits the energy -------------------------------
39   // Maximum relative error on parameters 
40   AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
41   // Least weight to use 
42   AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
43   // Maximum value of reduced chi^2 
44   AliFMDCorrELossFit::ELossFit::fgMaxChi2nu   = 10;
45
46   CorrDrawer d;
47   d.Summarize(AliForwardCorrectionManager::kELossFits, runNo, sys, sNN, field, 
48               mc, sat, "", fname);
49 }
50 void
51 DrawCorrELoss(Bool_t      mc, 
52               const char* file="forward_eloss.root", 
53               const char* local="fmd_corrections.root")
54 {
55   const char* fwd = "$ALICE_ROOT/../trunk/PWGLF/FORWARD/analysis2";
56   gROOT->Macro(Form("%s/scripts/LoadLibs.C", fwd));
57   gROOT->LoadMacro(Form("%s/scripts/SummaryDrawer.C", fwd));
58   gROOT->LoadMacro(Form("%s/corrs/CorrDrawer.C", fwd));
59
60   // --- Set limits on fits the energy -------------------------------
61   // Maximum relative error on parameters 
62   AliFMDCorrELossFit::ELossFit::fgMaxRelError = .12;
63   // Least weight to use 
64   AliFMDCorrELossFit::ELossFit::fgLeastWeight = 1e-5;
65   // Maximum value of reduced chi^2 
66   AliFMDCorrELossFit::ELossFit::fgMaxChi2nu   = 10;
67
68   CorrDrawer::Summarize(AliForwardCorrectionManager::kELossFits, 
69                         mc, file, local);
70 }
71 //
72 // EOF
73 //