AliPhysics  3bba2fe (3bba2fe)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Scripts used in the analysis
Collaboration diagram for Scripts used in the analysis:

Modules

 Add tasks to manager
 
 Maker scripts
 
 Correction scripts
 
 Quality Assurance scripts
 
 Flow scripts
 
 Test scripts
 

Files

file  MakeChain.C
 Script to generate a chain of files.
 
file  UnfoldMult.C
 Bayesian Method Unfolding Script.
 

Functions

static Bool_t Scanner::IsFile (const char *path)
 
void Scanner::ScanDirectory (TSystemDirectory *dir, TList *list, const char *pattern, bool recursive)
 
Bool_t Compile (const char *script, Option_t *option="g")
 
void dndeta_final (Double_t max=6)
 
void DrawRubensCorr (const char *fname="rubensRatio.root", const char *hname="dNdEtaCor1D_cls")
 
TObjectGetObject (const TObject *l, const char *name)
 
TH1DGetHist (TDirectory *dir, const char *which, const char *sub, const char *hname)
 
TH1DGetHist (TDirectory *dir, const char *which, UShort_t rebin, const char *sub="all")
 
TH1Merge (const TH1 *cen, const TH1 *fwd, Double_t &xlow, Double_t &xhigh)
 
Double_t myFunc (Double_t *xp, Double_t *pp)
 
Double_t myRatio (Double_t *xp, Double_t *pp)
 
TF1 * FitMerged (TH1 *tmp, Double_t xlow, Double_t xhigh)
 
void MakeSysError (TH1 *tmp, TF1 *fit)
 
TH1Graph2Hist (const TGraphAsymmErrors *g)
 
TH1Ratio (TH1 *h, TF1 *f, const char *title)
 
TH1DGetUA5Data (UShort_t type, TH1 *&p, TH1 *&n, Double_t &xlow, Double_t &xhigh)
 
void DrawUA5Ratios (const char *fname="forward_dndeta.root", UShort_t rebin=5)
 
void LoadLibs (bool alsoBase=false, bool alsoHit=false)
 
Bool_t LoadPars (Int_t nWorkers=4)
 
Bool_t IsFile (const char *path)
 
void ScanDirectory (TSystemDirectory *dir, TChain *chain, const char *pattern, bool recursive)
 
TChainMakeChain (const char *what, const char *datadir, bool recursive=false)
 
THStack * GetStack (const TList *list, const char *name, Int_t rebin)
 
TH1GetHist (const TList *list, const char *name, Int_t rebin)
 
THStack * AddStack (THStack *p, const TList *list, const char *name, Int_t rebin)
 
void BuildCentLegend (const TAxis *c)
 
void BuildLegend (const THStack *stack, const TAxis *c)
 
TH1MakeSysError (const TH1 *cen, const TH1 *fwd, Double_t sysErr=0.7)
 
void SimpledNdeta (Int_t what=0x5, Int_t rebin=5, const char *filename="forward_dndeta.root")
 

Detailed Description

These scripts add tasks to the analysis train

Function Documentation

THStack* AddStack ( THStack *  p,
const TList list,
const char *  name,
Int_t  rebin 
)

Add histograms from one stack to another

Parameters
pParent stack to add to
listList to look for the stack in
nameName of stack to add
rebinOptional rebinning - must exists in list
Returns
Added stack or null

Definition at line 101 of file SimpledNdeta.C.

Referenced by SimpledNdeta().

void BuildCentLegend ( const TAxis c)

Build up a centrality legend

Parameters
cCentrality axis

Definition at line 121 of file SimpledNdeta.C.

Referenced by SimpledNdeta().

void BuildLegend ( const THStack *  stack,
const TAxis c 
)

Build a legend. Histograms a filtered for the same title

Parameters
stackStack of histograms
cCentrality axis. If present, markers are black

Definition at line 157 of file SimpledNdeta.C.

Referenced by SimpledNdeta().

Bool_t Compile ( const char *  script,
Option_t option = "g" 
)

Compile an FMD script using ACLic

Parameters
scriptScript to compile
optionCompile option
Returns
true on success

Definition at line 19 of file Compile.C.

Referenced by TestRunMakeELossFit().

void dndeta_final ( Double_t  max = 6)

Draw final plot for QM2011

Parameters
max

Definition at line 9 of file dndeta_final.C.

void DrawRubensCorr ( const char *  fname = "rubensRatio.root",
const char *  hname = "dNdEtaCor1D_cls" 
)

Draw Rubens corrections

Parameters
fname
hname

Definition at line 10 of file DrawRubensCorr.C.

void DrawUA5Ratios ( const char *  fname = "forward_dndeta.root",
UShort_t  rebin = 5 
)

Draw ratios to UA5 data

Parameters
fnameInput file name
rebinRe-binning factor
Deprecated:
Use new GSE based drawing

Definition at line 397 of file DrawUA5Ratios.C.

TF1* FitMerged ( TH1 tmp,
Double_t  xlow,
Double_t  xhigh 
)

Fit \(g(x;A_1,A_2,\sigma_1,\sigma_2)\) to histogram data

Parameters
tmpHistogram
xlowLower x bound
xhighUpper x bound
Returns
Fitted function

Definition at line 195 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios().

TH1D* GetHist ( TDirectory *  dir,
const char *  which,
const char *  sub,
const char *  hname 
)

Get histogram from directory/which/sub/hname

Parameters
dirDirectory
whichName of parent list
subName of sub-list
hnameName of histogram
Returns
Pointer to histogram or null

Definition at line 42 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios(), and GetHist().

TH1* GetHist ( const TList list,
const char *  name,
Int_t  rebin 
)

Get a histogram from a list

Parameters
listList
nameName of histogram
rebinRebinning factor
Returns
Histogram or null

Definition at line 66 of file SimpledNdeta.C.

Referenced by SimpledNdeta().

TH1D* GetHist ( TDirectory *  dir,
const char *  which,
UShort_t  rebin,
const char *  sub = "all" 
)

Get histogram from dir/whichResults/sub/dndetawhich[_rebinrebin]

Parameters
dirDirectory
whichName
rebinOptional rebinning
subSub-list name
Returns
Histogram pointer or null

Definition at line 79 of file DrawUA5Ratios.C.

TObject* GetObject ( const TObject l,
const char *  name 
)

Get an object with specified name from TCollection l

Parameters
lCollection
nameName of object to retrieve
Returns
Object, or null

Definition at line 13 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios(), and GetHist().

THStack* GetStack ( const TList list,
const char *  name,
Int_t  rebin 
)

A simple script to draw results from MakedNdeta.C (or similar) Get a stack from the passed list

Parameters
listList to get the stack from
nameName of stack
rebinOptional rebinning - must exists in list
Returns
Stack or null

Definition at line 37 of file SimpledNdeta.C.

Referenced by AddStack().

TH1D* GetUA5Data ( UShort_t  type,
TH1 *&  p,
TH1 *&  n,
Double_t xlow,
Double_t xhigh 
)

Get the UA5 data

Parameters
typeTrigger type (1: INEL, 4: NSD)
pOn return, positive part or null
nOn return, negative part or null
xlowOn return, lower X bound
xhighOn return, upper X bound
Returns
Merged histogram or null
Deprecated:
Use new GSE based drawing

Definition at line 352 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios().

TH1* Graph2Hist ( const TGraphAsymmErrors g)

Transform a graph into a histogram

Parameters
g
Returns

Definition at line 247 of file DrawUA5Ratios.C.

Referenced by GetUA5Data().

Bool_t IsFile ( const char *  path)

Check if a path points to a file

Parameters
pathPath
Returns
True if the path points to a regular file

Definition at line 20 of file MakeChain.C.

Referenced by MakeChain().

static Bool_t Scanner::IsFile ( const char *  path)
inlinestatic

Check if a path points to a file

Parameters
pathPath
Returns
True if the path points to a regular file

Definition at line 35 of file MigrateOADB.C.

Referenced by Scanner::Scan().

void LoadLibs ( bool  alsoBase = false,
bool  alsoHit = false 
)

Load the libraries of PWGLF/FORWARD/analsysis2

Definition at line 18 of file LoadLibs.C.

Bool_t LoadPars ( Int_t  nWorkers = 4)

Set-up for a PROOF analysis job. Make TProof object and load pars.

Parameters
nWorkersNumber of workers
Deprecated:
Use TrainSetup instead
Returns
True on success

Definition at line 13 of file LoadPars.C.

Referenced by MakeEvaluateTriggers().

TChain* MakeChain ( const char *  what,
const char *  datadir,
bool  recursive = false 
)

Make a chain of specified data

Parameters
whatWhat data to chain. Possible values are
  • ESD Event summary data (AliESD)
  • AOD Analysis object data (AliAOD)
  • MC Simulation data (galice)
datadirData directory to scan
recursiveWhether to recurse into sub-directories
Returns
Pointer to newly create chain, or null

Definition at line 151 of file MakeChain.C.

Referenced by MakeEvaluateTriggers(), and SPDComparison().

void MakeSysError ( TH1 tmp,
TF1 *  fit 
)

Make band of systematic errors

Parameters
tmpHistogram
fitFit

Definition at line 223 of file DrawUA5Ratios.C.

TH1* MakeSysError ( const TH1 cen,
const TH1 fwd,
Double_t  sysErr = 0.7 
)

Make systematic error band

Parameters
cenCentral result
fwdForward result
sysErrSystematic error (fractional)
Returns

Definition at line 322 of file SimpledNdeta.C.

Referenced by SimpledNdeta().

TH1* Merge ( const TH1 cen,
const TH1 fwd,
Double_t xlow,
Double_t xhigh 
)

Merge two histograms into one

Parameters
cenCentral part
fwdForward part
xlowOn return, lower eta bound
xhighOn return, upper eta bound
Returns
Newly allocated histogram or null

Definition at line 103 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios(), Merge::MakeBranch(), AliEmcalList::Merge(), AliTHnT< TemplateArray, TemplateType >::Merge(), and Merge::SetBranch().

Double_t myFunc ( Double_t xp,
Double_t pp 
)

Function to calculate

\[ g(x;A_1,A_2,\sigma_1,\sigma_2) = A_1\left(\frac{1}{2\pi\sigma_1}e^{(x/\sigma_1)^2} - A_2\frac{1}{2\pi\sigma_2}e^{(x/\sigma_2)^2}\right) \]

Parameters
xpPointer to x array
ppPointer to parameter array
Returns
\(g(x;A_1,A_2,\sigma_1,\sigma_2)\)

A function (double Gaussian)

Parameters
xpIndependent variables
ppParameters
Returns
Value of function

Definition at line 151 of file DrawUA5Ratios.C.

Referenced by FitMerged(), and myRatio().

Double_t myRatio ( Double_t xp,
Double_t pp 
)

Calculate

\[ r(x) = \frac{g(x;A_1,A_2,\sigma_1,\sigma_2)}{ g(x;A_1',A_2',\sigma'_1,\sigma'_2)} \]

Parameters
xpPointer to X array
ppPointer to parameter array (8 entries)
Returns
\(r(x)\)

Definition at line 175 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios().

TH1* Ratio ( TH1 h,
TF1 *  f,
const char *  title 
)

Calculate ratio of histogram to function

Parameters
hHistogram
fFunction
title(Optional) title
Returns
Ratio in a histogram

Definition at line 308 of file DrawUA5Ratios.C.

Referenced by DrawUA5Ratios().

void ScanDirectory ( TSystemDirectory *  dir,
TChain chain,
const char *  pattern,
bool  recursive 
)

Scan a directory (optionally recursive) for data files to add to the chain. Only ROOT files, and files which name contain the passed pattern are considered.

Parameters
dirDirectory to scan
chainChain to add data to
patternPattern that the file name must contain
recursiveWhether to scan recursively

Definition at line 72 of file MakeChain.C.

Referenced by MakeChain().

void Scanner::ScanDirectory ( TSystemDirectory *  dir,
TList list,
const char *  pattern,
bool  recursive 
)
inline

Scan a directory (optionally recursive) for data files to add to the chain. Only ROOT files, and files which name contain the passed pattern are considered.

Parameters
dirDirectory to scan
listList to add data to
patternPattern that the file name must contain
recursiveWhether to scan recursively

Definition at line 92 of file MigrateOADB.C.

Referenced by Scanner::Scan().

void SimpledNdeta ( Int_t  what = 0x5,
Int_t  rebin = 5,
const char *  filename = "forward_dndeta.root" 
)

Function to draw the results from forward_dndeta.root file

Parameters
whatWhat to draw
rebinRebinnig. Note, the data must be present in the file
filenameFile to open and draw stuff from >

Definition at line 383 of file SimpledNdeta.C.