]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/FLOW/Documentation/FLOW.tex
[ST] flow package documentation updates
[u/mrichter/AliRoot.git] / PWGCF / FLOW / Documentation / FLOW.tex
CommitLineData
486fb24e 1\documentclass[a5paper]{book}
2\usepackage[nottoc,numbib]{tocbibind}
3\usepackage[english]{babel}
4\usepackage[pdftex]{graphics} %enable pdfgraphics support necessary for pdflatex
b4f8ce1e 5\usepackage{graphicx}
486fb24e 6\usepackage{tikz}
7\usepackage[small,bf]{caption}
8\usepackage{footmisc}
9\usepackage{sidecap}
10\usepackage{fancyvrb}
11\usepackage{color}
12\usepackage{rotating}
13\makeatletter
14\setlength{\@fptop}{0pt}
15\setlength{\@fpsep}{5pt}
16\makeatother
17\renewcommand{\dotfill}{\leaders\hbox to 5pt{\hss.\hss}\hfill}
18\usepackage[hmargin=1.2cm,vmargin=1.5cm]{geometry} %set custom margins
19\usepackage{fancyhdr} %enable hyperlinking, highlight page numbers
20\usepackage{amsmath}
21\usepackage{amssymb}
22\numberwithin{equation}{subsection}
23\usepackage{amsfonts}
24\usepackage{mathrsfs}
25\usepackage{tabularx}
26\usepackage{lastpage}
27\usepackage{subfigure}
28\usepackage{multicol}
29\usepackage{lipsum}
30\usepackage{xspace}
31\usepackage{latexsym}
32\usepackage{verbatim}
33\usepackage{listings}
34\usepackage{color}
35\usepackage[usenames,dvipsnames]{xcolor}
36\definecolor{listinggray}{gray}{0.9}
37\definecolor{lbcolor}{rgb}{0.9,0.9,0.9}
38\usepackage{listings}
39\usepackage{color}
40
41\definecolor{mygreen}{rgb}{0,0.6,0}
42\definecolor{mygray}{rgb}{0.5,0.5,0.5}
43\definecolor{mymauve}{rgb}{0.58,0,0.82}
44
45\lstset{ %
46 backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
47 basicstyle=\footnotesize, % the size of the fonts that are used for the code
48 breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
49 breaklines=true, % sets automatic line breaking
50% captionpos=b, % sets the caption-position to bottom
51 commentstyle=\color{mygreen}, % comment style
52 deletekeywords={...}, % if you want to delete keywords from the given language
53 escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
54 extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
55 frame=single, % adds a frame around the code
56 keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
57 keywordstyle=\color{blue}, % keyword style
58 language=Octave, % the language of the code
59 morekeywords={*,...}, % if you want to add more keywords to the set
60 numbers=left, % where to put the line-numbers; possible values are (none, left, right)
61 numbersep=5pt, % how far the line-numbers are from the code
62 numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
63 rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
64 showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
65 showstringspaces=false, % underline spaces within strings only
66 showtabs=false, % show tabs within strings adding particular underscores
67 stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
68 stringstyle=\color{mymauve}, % string literal style
69 tabsize=2, % sets default tabsize to 2 spaces
70% title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title
71}
72% tweak the the style a little bit
73\lstdefinestyle{customc}{
74% belowcaptionskip=1\baselineskip,
75 breaklines=true,
76 frame=single,
77 xleftmargin=\parindent,
78 language=C++,
79% showstringspaces=false,
80 basicstyle=\footnotesize\ttfamily,
81 keywordstyle=\bfseries\color{green!40!black},
82 commentstyle=\itshape\color{mygray},
83 identifierstyle=\color{blue},
84 stringstyle=\color{orange},
85 framexleftmargin=5mm,
86}
87
88\lstset{escapechar=@,style=customc}
89\usepackage[sort&compress,numbers]{natbib}
90
91\pagestyle{fancy} %enable custom headeres
92\fancyhead{}
93\fancyfoot{} %clear predefined headers, then create your own:
94\lhead{\footnotesize AliROOT Flow Package manual and documentation}
95\rhead{\footnotesize The FLOW team}
96\rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}}
97\lfoot{\footnotesize \rightmark}
98\usepackage[bookmarks=true,
99 bookmarksopen=true,
100 bookmarksnumbered=true, pdftex,
101 hyperindex=true,linktocpage]{hyperref}
102\hypersetup{
103 bookmarks=true, % show bookmarks bar?
104 unicode=false, % non-Latin characters in Acrobat’s bookmarks
105 pdftoolbar=true, % show Acrobat’s toolbar?
106 pdfmenubar=true, % show Acrobat’s menu?
107 pdffitwindow=false, % window fit to page when opened
108 pdfstartview={FitH}, % fits the width of the page to the window
109 pdftitle={AliROOT Flow Package manual and documentation}, % title
110 pdfauthor={Redmer Alexander Bertens}, % author
111 pdfsubject={AliROOT Flow Package manual and documentation}, % subject of the document
112 pdfcreator={Redmer Alexander Bertens}, % creator of the document
113 pdfproducer={Redmer Alexander Bertens}, % producer of the document
114 pdfkeywords={ALICE} {AliROOT} {ROOT} {manual} {flow} {package} {software}, % list of keywords
115 pdfnewwindow=true, % links in new window
116 colorlinks=true, % false: boxed links; true: colored links
117 linkcolor=blue, % color of internal links
118 citecolor=green, % color of links to bibliography
119 filecolor=blue, % color of file links
120 urlcolor=blue % color of external links
121}
122\usepackage{lineno}
123\usepackage{makeidx}
124\makeindex
125
126\sloppy
127\fancypagestyle{plain}
128 {
129 \fancyhead{}
130 \fancyfoot{}
131 } % clear header and footer of plain page because of ToC
132
133 % tikxstyle for integration of tikz graphics
134\tikzstyle{every node}=[font=\tiny]
135\tikzstyle{decision} = [rectangle, draw, fill=yellow!20,
136 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
137\tikzstyle{decision2} = [rectangle, draw, fill=red!20,
138 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
139\tikzstyle{decision3} = [rectangle, draw, fill=green!20,
140 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
141\tikzstyle{block} = [rectangle, draw, fill=blue!20,
142 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
143\tikzstyle{line} = [draw, -latex']
144\tikzstyle{cloud} = [draw, ellipse,fill=red!20,
145 minimum height=2em]
146\tikzstyle{sdecision} = [rectangle, draw, fill=yellow!20,
147 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
148\tikzstyle{sblock} = [rectangle, draw, fill=blue!20,
149 rounded corners, minimum height=1.5em, minimum width=2.5em, inner sep=3pt]
150\tikzstyle{scloud} = [draw, ellipse,fill=red!20,
151 minimum height=2em]
152\tikzstyle{ycloud} = [draw, ellipse,fill=yellow!20,
153 minimum height=2em]
154
155\renewcommand{\thefootnote}{\fnsymbol{footnote}}
156\frontmatter
157
158\linenumbers
b4f8ce1e 159\begin{document}
160
486fb24e 161\noindent
162\begin{center}
163 \vspace*{1.5cm}
164 {\LARGE \bf The FLOW Analysis Package}\\
165
166 \vspace{1.5cm}
167 \begin{figure}[hbt]
168 \includegraphics[width=1.\textwidth]{figs/daVinci.png}
169 \end{figure}
170
171 \vspace{1.5cm}
172 \noindent
173 {\large \bf a short writeup}\\
174 \today\\
175\end{center}
176\vfill
177\noindent
178Various authors, edited by Redmer Alexander Bertens (\texttt{rbertens@cern.ch})
179
180\clearpage
181\thispagestyle{empty}
182\pagenumbering{roman}
b4f8ce1e 183\tableofcontents
486fb24e 184\renewcommand{\thefootnote}{\alph{footnote}}
185\mainmatter
186\chapter{Introduction}
187The intro to everything.
b4f8ce1e 188%-----------------------------------------------------------------------
486fb24e 189\chapter{A Quick Start}
190\section{The flow package}
191\label{quickstart}
f3ba6c8e 192The \texttt{ALICE flow package}\index{flow package}\index{ALICE flow package|see{flow package}}\footnote{The \texttt{ALICE} flow package is part of \texttt{AliROOT}\index{AliROOT}, the ALICE extension of the \texttt{ROOT} framework, which can be obtained from \href{http://git.cern.ch/pub/AliRoot}{http://git.cern.ch/pub/AliRoot}. The flow package itself is located in the folder \texttt{\$ALICE\_ROOT/PWG/FLOW/}, where \texttt{\$ALICE\_ROOT} refers to the source directory of \texttt{AliROOT}.}
486fb24e 193contains most known flow analysis methods. In this chapter we give a few examples how to setup an
194analysis for the most common cases. The chapters that follow provide more detailed information on the structure of the code
195and settings of the various flow methods.
196This write-up is however not a complete listing of the methods, for this the reader is referred to the header files.
197
f3ba6c8e 198\section{On the fly - getting started on a Toy MC}
199To get started with the \texttt{flow package} we begin by generating a few simple Toy Monte Carlo events and performing a flow analysis on these simulated events. The steps which will be followed will be the same as when performing an analysis on data:
200\begin{enumerate}
201\item Prepare your \texttt{(Ali)ROOT} session by loaded the necessary libraries
202\item Create the analysis method objects
203\item Initialize the methods (which creates their histograms)
204\item Define track cuts
205\item Create flow events, which is a container class holding all necessary information (e.g. tracks) for the flow analysis of an event (collision) and actually do the analysis
206\item Finish the analysis, which will calculate the final $v_n$ values
207\item Write the results to an output file
208\end{enumerate}
209In this Monte Carlo exercise, the flow event class will not receive data from a detector (e.g. an \texttt{NTuple}) , but instead generate toy events itself.
210
211The macro \texttt{runFlowOnTheFlyExample.C}\index{On the fly}\index{runFlowOnTheFlyExample.C}\footnote{In aliroot, this macro can be found at \\ \texttt{\$ALICE\_ROOT/PWGCF/FLOW/Documentation/examples/runFlowOnTheFlyExample}} is a basic example of how the flow package works.
486fb24e 212In this section we explain the main pieces of that macro.
213\begin{enumerate}
214 \item To use the flow code the flow library needs to be loaded. In\index{libraries, AliROOT} \texttt{AliROOT}:
215 \begin{lstlisting}
216gSystem->Load("libPWGflowBase");\end{lstlisting}
217 In \texttt{root} additional libraries need to be loaded\index{libraries, ROOT}:
218 \begin{lstlisting}
219gSystem->Load("libGeom");
220gSystem->Load("libVMC");
221gSystem->Load("libXMLIO");
222gSystem->Load("libPhysics");
223gSystem->Load("libPWGflowBase");\end{lstlisting}
224 \item We need to instantiate the flow analysis methods which we want to use. In this example we will
225 instantiate two methods: the first which calculates the flow versus the reaction plane of the Monte Carlo, which is our reference value\index{reference value}\index{Monte Carlo Event Plane} (see section \ref{MC}), and second the so called Q-cumulant method (see section \ref{qvc}).
226 \begin{lstlisting}
227AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
228AliFlowAnalysisWithQCumulants *qc = new AliFlowAnalysisWithQCumulants();\end{lstlisting}
229 \item Each of the methods needs to initialize\index{initialize methods} (e.g. to define the histograms):
230 \begin{lstlisting}
231mcep->Init();
232qc->Init();\end{lstlisting}
233 \item To define the particles we are going to use as Reference Particles\index{reference particles} \index{RP|see{reference particles}} (RP's, particles
234 used for the {\bf Q} vector) and the Particles Of Interest\index{particles of interest} \index{POI|see{particles of interest}} (POI's, the particles of which
235 we calculate the differential flow) we have to define two track cut objects\index{track cut object, simple}:
236 \begin{lstlisting}
237AliFlowTrackSimpleCuts *cutsRP = new AliFlowTrackSimpleCuts();
238AliFlowTrackSimpleCuts *cutsPOI = new AliFlowTrackSimpleCuts();
239cutsPOI->SetPtMin(0.2);
240cutsPOI->SetPtMax(2.0); \end{lstlisting}
f3ba6c8e 241 \item Now we are ready to start the analysis. For a quick start we make an event on the fly, tag the reference particles and particles of interest and pass it to the two flow methods.
242
243 We do this in an event loop. First define the number of events that need to be created, their multiplicity, and a value $v_2$ value, which can either be supplied as a fixed number (no $p_t$ dependence) of a function (to generate $p_t$ differential flow\footnote{The on the fly event generator is not limited to the generation of the second harmonic $v_2$, but to get started, this is a nice example}
244
245 \begin{lstlisting}
246 Int_t nEvents = 1000; // generate 1000 events
247 Int_t mult = 2000; // use track multiplicity of 2000
248 Double_t v2 = .05; // 5 pct integrated flow
249 // or sample differential flow
250 TF1* diffv2 = new TF1("diffv2", "((x<1.)*(0.1/1.)*x+(x>=1.)*0.1)", 0., 20.); \end{lstlisting}
251
252Now we have all the ingredients to our first flow analysis
253
486fb24e 254 \begin{lstlisting}
255for(Int_t i=0; i<nEvts; i++) {
256 // make an event with mult particles
257 AliFlowEventSimple* event = new AliFlowEventSimple(mult,AliFlowEventSimple::kGenerate);
258 // modify the tracks adding the flow value v2
f3ba6c8e 259 event->AddV2(diffv2);
486fb24e 260 // select the particles for the reference flow
261 event->TagRP(cutsRP);
262 // select the particles for differential flow
263 event->TagPOI(cutsPOI);
264 // do flow analysis with various methods:
265 mcep->Make(event);
266 qc->Make(event);
f3ba6c8e 267} \end{lstlisting}
486fb24e 268 \item To fill the histograms which contain the final results we have to call Finish for each method:
269 \begin{lstlisting}
270mcep->Finish();
271qc->Finish(); \end{lstlisting}
dba835f0 272 \item This concludes the analysis and now we can write the results into a file. Two options for writing the input to a file are available:
273 \begin{itemize}
274 \item Create a new output file and write the output to this file
275 \begin{lstlisting}
f3ba6c8e 276TFile *outputFile = new TFile("outputMCEPanalysis.root","RECREATE");
486fb24e 277mcep->WriteHistograms();
f3ba6c8e 278TFile *outputFile = new TFile("outputQCanalysis.root","RECREATE");
279qc->WriteHistograms();
280\end{lstlisting}
281
282Please note that this will create a new output file, and overwrite any existing filse called \texttt{AnalysisResults.root}.
283
284\item To write the output of multiple analyses into subdirectories of one file, one can do the following:
285\begin{lstlisting}
286TFile *outputFile = new TFile("AnalysisResults.root","RECREATE");
287TDirectoryFile* dirQC = new TDiretoryFile("outputQCanalysis", "outputQCanalysis");
288qc->WriteHistograms(dirQC);
289TDirectoryFile* dirMCEP = new TDiretoryFile("outputMCEPanalysis", "outputMCEPanalysis");
290mcep->WriteHistograms(dirMCEP);
291\end{lstlisting}
292
293
294Note that \texttt{AnalysisResults.root} \index{AnalysisResults.root} is the default name given to analyses in \texttt{AliROOT}. Many macros in \texttt{AliROOT} will expect a file \texttt{AnalyisResults.root} as input, so for most users it will be convenient to follow this convention.
295
296When done with running the analysis, do not forget to write the file to disk by calling
297\begin{lstlisting}
298TFile::Close(); // write the buffered file to disk \end{lstlisting}
486fb24e 299\end{enumerate}
300
f3ba6c8e 301\section{What is in the output file ?}
302\index{output file} Now we have written the results into a file, but what is in there?
303
304Although the output of different flow analysis techniques might differ slightly as a result of their different approaches at estimating $v_2$, the output files containers are always built in a similar way.
305
306\subsection{AliFlowCommonHists - Output objects}
307Objects of two types are stored in the output of the flow analysis\footnote{Make sure that \texttt{libPWGflowBase.so} is loaded in your \texttt{(Ali)ROOT} session, otherwise these objects will be unknown.}
308\begin{enumerate}
309\item \texttt{AliFlowCommonHist}, which is a class that contains common histograms for the flow analysis (e.g. QA histograms and histograms that contain the analysis flags which were used). Depending on the type of flow analysis that was used, this object contains histograms from the following list:
310\begin{lstlisting}
311 Bool_t fBookOnlyBasic; // book and fill only control histos needed for all methods
312 TH1F* fHistMultRP; // multiplicity for RP selection
313 TH1F* fHistMultPOI; // multiplicity for POI selection
314 TH2F* fHistMultPOIvsRP; // multiplicity for POI versus RP
315 TH1F* fHistPtRP; // pt distribution for RP selection
316 TH1F* fHistPtPOI; // pt distribution for POI selection
317 TH1F* fHistPtSub0; // pt distribution for subevent 0
318 TH1F* fHistPtSub1; // pt distribution for subevent 1
319 TH1F* fHistPhiRP; // phi distribution for RP selection
320 TH1F* fHistPhiPOI; // phi distribution for POI selection
321 TH1F* fHistPhiSub0; // phi distribution for subevent 0
322 TH1F* fHistPhiSub1; // phi distribution for subevent 1
323 TH1F* fHistEtaRP; // eta distribution for RP selection
324 TH1F* fHistEtaPOI; // eta distribution for POI selection
325 TH1F* fHistEtaSub0; // eta distribution for subevent 0
326 TH1F* fHistEtaSub1; // eta distribution for subevent 1
327 TH2F* fHistPhiEtaRP; // eta vs phi for RP selection
328 TH2F* fHistPhiEtaPOI; // eta vs phi for POI selection
329 TProfile* fHistProMeanPtperBin; // mean pt for each pt bin (for POI selection)
330 TH2F* fHistWeightvsPhi; // particle weight vs particle phi
331 TH1F* fHistQ; // Qvector distribution
332 TH1F* fHistAngleQ; // distribution of angle of Q vector
333 TH1F* fHistAngleQSub0; // distribution of angle of subevent 0 Q vector
334 TH1F* fHistAngleQSub1; // distribution of angle of subevent 1 Q vector
335 TProfile* fHarmonic; // harmonic
336 TProfile* fRefMultVsNoOfRPs; // <reference multiplicity> versus # of RPs
337 TH1F* fHistRefMult; // reference multiplicity distribution
338 TH2F* fHistMassPOI; // mass distribution for POI selection \end{lstlisting}
339 This information is from the header file of the AliFlowCommonHist object\footnote{The headers of both output objects can be found in \texttt{\$ALICE\_ROOT/PWG/FLOW/Base/}.}
340 \item \texttt{AliFlowCommonHistResults} is an object designed to hold the results of the flow analysis. The possible histograms stored in this object are
341 \begin{lstlisting}
342 TH1D* fHistIntFlow; // reference flow
343 TH1D* fHistChi; // resolution
344 // RP = Reference Particles:
345 TH1D* fHistIntFlowRP; // integrated flow of RPs
346 TH1D* fHistDiffFlowPtRP; // differential flow (Pt) of RPs
347 TH1D* fHistDiffFlowEtaRP; // differential flow (Eta) of RPs
348 // POI = Particles Of Interest:
349 TH1D* fHistIntFlowPOI; // integrated flow of POIs
350 TH1D* fHistDiffFlowPtPOI; // differential flow (Pt) of POIs
351 TH1D* fHistDiffFlowEtaPOI; // differential flow (Eta) of POIs \end{lstlisting}
352
353 \end{enumerate}
354 The titles of the histograms in the output object differ from the names of the pointers given in the two lists printed above, but the lists give an overview of what is available; the easiest way however of getting acquainted with where to find histograms in the output is browsing them in \texttt{ROOT's TBrowser} (see figure \ref{fig:browserExample}).
355 \begin{lstlisting}
356 new TBrowser(); \end{lstlisting}
357\begin{SCfigure}
358 \includegraphics[width=0.70\textwidth]{figs/browserExample.png}
359 \caption[TBrowser with output file]{Example of output file opened in a TBrowser, results of differential $v_2$ analysis with second order Q-cumulant analysis are shown.}
360 \label{fig:browserExample}
361\end{SCfigure}
362Analysis specific outputs will be discussed in later sections.
363
364
365\subsubsection{Comparing flow results}
366A convenient way of comparing the results of the different flow analysis strategies that have been used is invoking the macro \texttt{compareFlowResults.C}\footnote{\texttt{\$ALICE\_ROOT/PWGCF/FLOW/macros/compareFlowResults.C}}. This macro will read the analysis output file \texttt{AnalysisResults.root}, extract the requested results from it and plot them. For a full overview of what can be done with the macro, the reader is referred to the macro itself and its ample documentation. To run the macro on the dataset that we have just generated, simply do
367\begin{lstlisting}
368.L compareFlowResults.C
369compareFlowResults(TSring("")) // the empty suffix indicates on the fly events \end{lstlisting}
370
371\begin{SCfigure}
372 \includegraphics[width=0.70\textwidth]{figs/compareFlowResults.png}
373 \caption[Comparing on the fly flow results]{Example of inspecting the output file of the on the fly analysis with the \texttt{compareFlowResults.C macro}.}
374 \label{fig:browserExample}
375\end{SCfigure}
376
377
378\subsection{AliFlowCommonConstants - The Common Constants class}
379All flow analysis use a common output container to store their histograms. To set the configuration for the histograms in these containers - e.g. the $p_t$ ranges of histograms, the number of bins, etc, etc - all flow analysis methods initialize their output containers using variables from a global instance of the \texttt{AliFlowCommonConstants}\index{AliFlowCommonConstants} class. This global object, which can be obtained via the a static function
380\begin{lstlisting}
381static AliFlowCommonConstants* GetMaster(); \end{lstlisting}
382can be tuned to the user's liking by requesting a pointer to it via the static access method, and using the available setter functions, e.g. the following
383\begin{lstlisting}
384AliFlowCommonConstants* cc = AliFlowCommonConstants::GetMaster();
385cc->SetNbinsPt(10);
386cc->SetPtMin(0);
387cc->SetPtMax(10); \end{lstlisting}
388will result in an analysis which is performed in 10 $p_t$ bins of 1 GeV/$c$ width. For a full overview of the available common constants the user is referred to the class header\footnote{\texttt{\$ALICE\_ROOT/PWG/FLOW/Base/AliFlowCommonConstants.h}}.
389
390
391\subsection{redoFinish.C}
392\index{redoFinish.C} When analysis is run in parallel, resulting in large, merged files (e.g. when running on \texttt{GRID}) the output of the flow analysis tasks in \texttt{AnalysisResults.root} is typically wrong, as merging files via \texttt{ROOT's} \texttt{TFileMerger} will trivially sum up results in all histograms.
393
394The \texttt{redoFinish.C}\footnote{\texttt{\$ALICE\_ROOT/PWGCF/FLOW/macros/refoFinish.C}} macro re-evaluates all output that cannot trivially be merged. To use \texttt{redoFinish.C}, make sure your analysis output file is called \texttt{mergedAnalysisResults.root} and simply run the macro
395\begin{lstlisting}
396.L redoFinish.C
397redoFinish(); \end{lstlisting}
398\texttt{redoFinish.C} will produce a new \texttt{AnalysisResults.root} file with the corrected results by calling the \texttt{::Finish()} function on all known output structures in the \texttt{mergedAnalysisResults.root} file. Additionally \texttt{redoFinish.C} can be used to repeat the call to \texttt{::Finish()} with different settings, which might alter the outcome of the flow analysis (e.g. use a different strategy to correct for non-uniform acceptance). This will be explained in more detail in the following sections.
399
400\section{Getting started on Data}
486fb24e 401
486fb24e 402The macro \texttt{Documentation/examples/runFlowReaderExample.C} \index{runFlowReaderExample.C}is an example how to setup a flow analysis if the events are already generated and
403for example are stored in ntuples.
404
405\section{A simple flow analysis in ALICE using Tasks}
f3ba6c8e 406The macro \texttt{Documentation/examples/runFlowTaskExample.C} \index{runFlowTaskExample.C}is an example how to setup a flow analysis using the full \texttt{ALICE} Analysis Framework.
486fb24e 407
408\chapter{The Flow Event}
409\label{flowevent}
410Here we describe the flowevent, flowtracks, general cuts and cuts for RPs POIs.
411OntheFly, AfterBurner. Filling with ESD, AOD, Ntuples, etc.
486fb24e 412
413\chapter{The Program}
414\label{The Program}
415\begin{center}
416 \includegraphics[width=1.\textwidth]{figs/flowChart.png}
417\end{center}
418Here we describe the program.
b4f8ce1e 419%-----------------------------------------------------------------------
486fb24e 420
421\chapter{Methods}
422\label{Methods}
423The flow package aims at providing the user with most of the known flow analysis methods. Detailed theoretical overview of the methods can be found in the following papers, which are included in the folder \texttt{\$ALICE\_ROOT/PWGCF/FLOW/Documentation/otherdocs/}
424\begin{itemize}
425 \item The Monte-Carlo Truth
426 \item Scalar Product Method \\ \hspace*{1cm} \texttt{EventPlaneMethod/FlowMethodsPV.pdf}
427 \item Generating Function Cumulants \\ \hspace*{1cm} \texttt{GFCumulants/Borghini\_GFCumulants\_PracticalGuide.pdf}
428 \item Q-vector Cumulant method \\ \hspace*{1cm} \texttt{QCumulants/QCpaperdraft.pdf}
429 \item Lee-Yang Zero Method \\ \hspace*{1cm} \texttt{LeeYangZeroes/Borghini\_LYZ\_PracticalGuide.pdf}
430 \item Lee-Yang Zero Method \\ \hspace*{1cm} \texttt{LeeYangZeroesEP/LYZ\_RP.pdf}
431\end{itemize}
432The structure of this chapter is as follows: of each of the available methods a short description is given in the \texttt{theory} subsection (for more detailed information, see the papers listed above) followed by details which are specific to the implementation in the subsection \texttt{implementation}. Caveats, possible issues, etc, are listed in the \texttt{caveats} subsections.
b4f8ce1e 433%-----------------------------------------------------------------------
486fb24e 434
435\section{The Monte-Carlo Truth}
436\label{MC}
437Here we describe the implementation of the monte-carlo truth.
b4f8ce1e 438%-----------------------------------------------------------------------
b4f8ce1e 439
486fb24e 440\section{Scalar Product Method}
441\label{SP}
442\subsection{Theory}
443\subsubsection{The scalar product method}
444The scalar product method - as well as the Q-cumulant method which will be described later - does not depend on explicit construction of an (sub)event plane, but estimates $v_n$ directly from multi-particle correlations.
445
446To do so, firstly all particles in an event are labeled either as \emph{reference particles} (RP's) or \emph{particles of interest} (POI's). The RP and POI selections are in turn divided into sub-events, which are again taken from different $\eta$ ranges, in analogy to the approach taken for the event plane method. Each POI is correlated with a sub-event Q-vector from the RP selection, which allows for the calculation of $v_n$ without any explicit reconstruction of an event plane\cite{sp}.
b4f8ce1e 447
486fb24e 448The reason for the division into RP's and POI's is the fact that the two particle correlator of POI's,
449\begin{equation}\label{unstable}
450 v_n^{POI} = \sqrt{ \left< e^{i n (\phi^{POI}_i - \phi^{POI}_j)} \right> }
451\end{equation}
452is generally not stable statistically. Introducing reference flow, \ref{unstable} can be rewritten as
453\begin{equation}\label{stable}
454 v_n^{POI} = \frac{ \left< e^{i n (\phi^{POI}_i - \phi^{RP}_j)} \right>}{\left< e^{i n (\phi^{RP}_i - \phi^{RP}_j)} \right>} = \frac{v_n^{POI} v_n^{RP} }{\sqrt{v_n^{RP} v_n^{RP}}}.
455\end{equation}
456By taking an abundant particle source as RP's - in the case of this study the RP selection comprises all charged particles - both correlators in \ref{stable} are statistically stable.
b4f8ce1e 457
486fb24e 458\paragraph{The scalar product method}
459In the scalar product method, POI's $u_k$,
460\begin{equation}\label{spderiv}
461 u_k = e^{i n \phi_k},
462\end{equation}
463are correlated with $Q^*_a$, the complex-conjugate Q-vector built from RP's in a given sub-event $a$. First, the scalar product of $u_k$ and $Q^*_a$ is taken,
464\begin{equation}
465 u_k \cdotp \sum_{\substack{ j=1,\\j \neq k}}^{M_{RP, a}} u^*_j
466\end{equation}
467where $M_{RP, a}$ denotes RP multiplicity for a given sub-event $a$ and the inequality $j \neq k$ removes auto-correlations. From this, differential $v_n$ of POI's ($v_n^{\prime}$) and $v_n$ of RP's ($v_n^a$) in sub-event $a$ can be obtained in a straightforward way from the correlation of POI's and RP's:
468\begin{equation}\label{rppoisp}
469 \left< u \cdotp Q^*_a \right> = \frac{1}{M_{RP, a}-k}\sum_{i=k}^{M_{RP, a}} \left( u_k \sum_{\substack{ j=1,\\j \neq k}}^{M_{RP, a}} u^*_j \right)
470\end{equation}
471where POI multiplicity is expressed in terms of $M_{RP, a}$; $M_{POI} = M_{RP, a} - k$. Since for any function $f(x)$ and constant $a$
472\begin{equation}
473 \sum a f(x) = a \sum f(x)
474\end{equation}
475\ref{rppoisp} can be rewritten as
476\begin{align}\label{sp_part2}
477 \left< u \cdotp Q^*_a \right> & = \frac{1}{M_{RP, a}-k}\sum_{i=k}^{M_{RP, a}} e^{i n [\phi_k - \Psi_n]} \sum_{j=1}^{M_{RP, a}} e^{- i n [\phi_j - \Psi_n]} \\
478 & = M_{RP, a} v^{\prime}_n v_n^a \nonumber
479\end{align}
480where in the last step of \ref{sp_part2} it has been used that
481\begin{equation}
482 v_n = \frac{\ds \sum_i^M e^{in[\phi_i - \Psi_n]} }{M}.
483\end{equation}
b4f8ce1e 484
486fb24e 485To obtain the estimate of $v_n$, one must still disentangle the reference flow contribution from the event averaged correlation given in \ref{rppoisp}.
486Proceeding in a fashion similar to that presented in equation \ref{rppoisp}, it can be shown that
487\begin{equation}
488 \left< \frac{Q_a}{M_a}\cdotp\frac{Q^*_b}{M_b} \right> = \left< v_n^{a}v_n^{b} \right>
489\end{equation}
490where $Q_a, Q_b$ are the Q-vectors of RP's in sub-event $a, b$. Under the assumption that
491\begin{equation}\label{zerononflow}
492 \left< v_n^2 \right> = \left< v_n \right>^2,
493\end{equation}
494- an assumption which will be spoiled in the case of flow fluctuations - and requiring that the $v_n$ estimates in both sub-events are equal, one simply evaluates
495\begin{equation}\label{sp}
496 v_n^{\prime} = \frac{\left< \left< u \cdotp \frac{Q^*_a}{M_a} \right>\right>}{\sqrt{ \left< \frac{Q_a}{M_a}\cdotp\frac{Q^*_b}{M_b} \right>}}
497\end{equation}
498to obtain $v_n^{a}$. For equal multiplicity sub-events $M_a = M_b$, \ref{sp} is simplified to
499\begin{equation}\label{spa}
500 v_n^{\prime} = \frac{\left< \left< u \cdotp Q^*_a \right>_t \right>}{ \sqrt{ \left< Q_a\cdotp Q^*_b \right>}}.
501\end{equation}
502$v_n^b$ can be obtained by switching indices $a$ and $b$ in expressions \ref{sp} and \ref{spa}, and should equal $v_n^a$.
503This principle can be generalized straightforwardly to allow for a selection of RP's which has been divided into three subevents.
504\begin{align}
505 v_n^a & = \frac{ \left< \left< u \cdotp \frac{Q^*_a}{M_a} \right> \right>}{\sqrt{\left< v_n^{\prime a} v_n^{\prime b} \right> \left< v_n^{\prime a}v_n^{\prime c} \right> / \left< v_n^{\prime b} v_n^{\prime c} \right>}} \\
506 & = \frac{\left< \left< u \cdotp \frac{Q^*_a}{M_a} \right> \right>}{\sqrt{\left< \frac{Q_a}{M_a} \cdotp \frac{Q_{b}^{*}}{M_b} \right> \left< \frac{Q_a}{M_a} \cdotp \frac{Q_{c}^{*}}{M_c} \right> / \left< \frac{Q_b}{M_b} \cdotp \frac{Q_c^*}{M_c}} \right>} \nonumber
507\end{align}
508where cyclic permutation of $a, b, c$ (in analogy to the switching of indices in \ref{3evsp} gives the estimates of $v_n^b$ and $v_n^c$.\textcolor{red}{[insert some discussion here: is this result actually true, and some light on va, vb, (vc)]}
509
510\subsection{Implementation}
511
512\subsubsection{Extension to Event Plane method}
513As explained earlier, the event plane analysis results in this study are actually obtained by normalizing the Q-vectors in the scalar product by their length $\vert Q_n \vert$. Consider the following:
514\begin{equation}\label{phase}
515 \frac{Q_n^*}{\vert Q_n^* \vert} = \frac{\vert Q_n^* \vert e^{- i n \Psi_{Q_n}}}{\vert Q_n^* \vert} = e^{- i n \Psi_{Q_n}}.
516\end{equation}
517For a full event, the enumerator of \ref{sp} can be expressed as
518\begin{equation}\label{epsp1}
519 \left< \left< u \cdotp e^{- i n \Psi_{Q_n}} \right> \right> = \left< \left< e^{i n \phi_i} \cdotp e^{- i n \Psi_{Q_n}} \right> \right> \nonumber = \left< \left< e^{i n (\phi_i - \Psi_{Q_n})} \right> \right> = \left< \left< \cos(n [\phi_i - \Psi_{Q_n}]) \right> \right>
520\end{equation}
521which corresponds to the all-event average of \ref{ep_first}. As shown in the previous subsection this expression equals $v_n^{obs}$.
522
523For normalized Q-vectors, the denominator of \ref{sp} reads (using \ref{phase}):
524\begin{equation}\label{epsp2}
525 \sqrt{\left< \frac{Q_a}{\vert Q_a\vert} \cdotp \frac{Q_b^*}{\vert Q_b^* \vert \right>}} = \sqrt{\left< e^{in[\Psi_{Q_{n_a}} - \Psi_{Q_{n_b}}}\right>} = \sqrt{\left< \cos(n[\Psi_{Q_{n_a}} - \Psi_{Q_{n_b}}]\right>)}
526 \end{equation}
527 from which the event plane resolution can be calculated using \ref{emeancos} or \ref{halfeventresolution}.
528
529 \subsubsection{Caveats}
530
531 %-----------------------------------------------------------------------
532
533 \section{Generating Function Cumulant Method}
534 \label{GFC}
535 Here we describe the generating function cumulant method and how it is implemented.
536 %-----------------------------------------------------------------------
537
538 \section{Q-vector Cumulant Method}
539 \label{qvc}
540 \subsection{Theory}
541 The Q-cumulant (QC) method\footnote{The overview given in this section is inspired by \cite{bilandzic-2011-83}, for further reading the reader is referred there. A full derivation of results that are relevant in this study is given in appendix \ref{qcapp}.} uses multi-particle correlations to estimate $v_n$ estimates for RP's and POI's, but does not limit itself to two-particle correlations. Although higher-order Q-cumulant calculations are available, this section will discuss the method using two- and four-particle correlations.
542
543 %\paragraph{Multiparticle correlations and anisotropic flow}
544 Multi-particle correlations in the QC method are expressed in terms of cumulants, which are the the expectation values of correlation terms in joint probability density functions. Consider the following: if two observables $f$ for particles $x_i$ and $x_j$ are correlated, the joint probability $f(x_i, x_j)$ is the sum of the factorization of the constituent probabilities and a covariance term:
545 \begin{equation}
546 f(x_i, x_j) = f(x_i)f(x_j) + f_c (x_i, x_j)
547 \end{equation}
548 When taking as an observable azimuthal dependence,
549 \begin{align}
550 x_i \equiv e^{i n \phi_i}, \hspace{.5in} x_j \equiv e^{i n \phi_j}
551 \end{align}
552 the two-particle cumulant is expressed as the covariance of the expectation value:
553 \begin{equation}
554 E_C(e^{i n[\phi_i - \phi_j]}) = E(e^{[i n(\phi_i - \phi_j]}) - E(e^{in[\phi_i]})E(e^{in[- \phi_j]}).
555 \end{equation}
556 Symmetry arguments (along the lines of those given in appendix \ref{sec:harmonic_derivation}) dictate that the product of separate expectation values is equals zero, from which a familiar expression for the two-particle correlation is obtained:
557 \begin{align}
558 E_C(e^{i n[\phi_i - \phi_j]}) & = E(e^{in[\phi_i]})E(e^{in[- \phi_j]}) \\
559 & = \left< e^{in[\phi_i]}\right> \left< e^{in[- \phi_j]} \right> \nonumber \\
560 & = \left< e^{in[\phi_i - \phi_j]} \right> \nonumber \\
561 & = \left< 2 \right>, \nonumber
562 \end{align}
563 the all-event average of which is denoted by
564 \begin{equation}\label{twocul}
565 c_n\{2\} = \left< \left< 2 \right> \right>
566 \end{equation}
567 where $c_n\{2\}$ is called the two-particle cumulant. For the four-particle case, one proceeds likewise:
568 \begin{align}
569 E_c(e^{in[\phi_i + \phi_j - \phi_k -\phi_l]}) & = E(e^{in[\phi_i + \phi_j - \phi_k -\phi_l]}) \\
570 & - E(e^{in[\phi_i - \phi_k]})E(e^{in[\phi_j - \phi_l]})\nonumber \\
571 & - E(e^{in[\phi_i - \phi_l]})E(e^{in[\phi_j - \phi_k]}). \nonumber
572 \end{align}
573 The four-particle cumulant can be expressed in terms of two- and four-particle correlations as well,
574 \begin{equation}\label{fourcul}
575 c_n\{4\} = \left< \left< 4 \right> \right> - 2 \left< \left< 2 \right> \right>^2.
576 \end{equation}
577 From \ref{twocul} and \ref{fourcul} it follows that $v_n$ harmonics are related to cumulants following
578 \begin{align}\label{refFlowFromCumulants2nd}
579 v_n\{2\} & = \sqrt{c_n\{2\}} \\
580 v_n\{4\} & = \sqrt[4]{-c_n\{4\}} \nonumber.
581 \end{align}
582 where $v_n\{2\}$, $v_n\{4\}$ denote flow estimates obtained from two- and four-particle correlations.
583
584 In a fashion similar to that explained in the previous subsection, the Q-cumulant method uses reference flow to obtain a statistically stable estimate of the differential flow of POI's. Differential POI flow, for the two- and four-particle case, can be expressed as
585 \begin{align}
586 d_n\{2\} & = \left< \left< 2^{\prime} \right> \right> \\
587 d_n\{4\} & = \left< \left< 4^{\prime} \right> \right> - 2\cdotp \left< \left< 2^{\prime} \right> \right>\left< \left< 2 \right> \right>\nonumber
588 \end{align}
589 where $d_n\{2\}, d_n\{4\}$ denotes the two-, four-particle differential flow and the $^{\prime}$ is used as an indicator for differential (p$_t$ dependent) results. Disentangling from this the reference flow contributions, one is left with the final expression for the estimate of differential $v_n$ for POI's:
590 \begin{align}
591 v_n^{\prime}\{2\} & = \frac{d_n\{2\}}{\sqrt{c_n\{2\}}} \\
592 v_n^{\prime}\{4\} & = - \frac{d_n\{4\}}{(-c_n\{2\})^{3/4}}.\nonumber
593 \end{align}
594
595 \subsection{Implementation}
596
597 Here we describe the Q-vector cumulant method and how it is implemented.
598 %-----------------------------------------------------------------------
599
600 \section{Lee-Yang Zero Method}
601 \label{LYZ}
602 Here we describe the Lee-Yang Zero method and how it is implemented.
603 %-----------------------------------------------------------------------
604
605 \section{Lee-Yang Zero Method}
606 \label{LYZ}
607 Here we describe the Lee-Yang Zero method and how it is implemented.
608 %-----------------------------------------------------------------------
609
610 \section{Fitting the Q-vector Distribution}
611 \label{qfit}
612 Here we describe how the fitting of the Q-vector distribution is implemented.
613 %-----------------------------------------------------------------------
614
615 \chapter{Summary}
616 \label{Summary}
617 This sums it all up.
618 %-----------------------------------------------------------------------
619
620 \begin{thebibliography}{99}
621
622
623 \bibitem{Ollitrault:1992bk}
624 J.~Y.~Ollitrault,
625 %``Anisotropy as a signature of transverse collective flow,''
626 Phys.\ Rev.\ D {\bf 46} (1992) 229.
627 %%CITATION = PHRVA,D46,229;%%
628
629 \bibitem{Danielewicz:1999vh}
630 P.~Danielewicz,
631 %``Flow and equation of state in heavy-ion collisions,''
632 Nucl.\ Phys.\ A {\bf 661} (1999) 82.
633 % [arXiv:nucl-th/9907098].
634 %%CITATION = NUCL-TH 9907098;%%
635
636 \bibitem{Rischke:1996nq}
637 D.~H.~Rischke,
638 %``Hydrodynamics and collective behavior in relativistic nuclear
639 %collisions,''
640 Nucl.\ Phys.\ A {\bf 610} (1996) 88C.
641 % [arXiv:nucl-th/9608024].
642 %%CITATION = NUCL-TH 9608024;%%
643
644 \bibitem{Ollitrault:1997vz}
645 J.~Y.~Ollitrault,
646 %``Flow systematics from SIS to SPS energies,''
647 Nucl.\ Phys.\ A {\bf 638} (1998) 195.
648 % [arXiv:nucl-ex/9802005].
649 %%CITATION = NUCL-EX 9802005;%%
650
651 \bibitem{Voloshin:1994mz}
652 S.~Voloshin and Y.~Zhang,
653 %``Flow study in relativistic nuclear collisions by Fourier expansion of
654 %Azimuthal particle distributions,''
655 Z.\ Phys.\ C {\bf 70} (1996) 665.
656 % [arXiv:hep-ph/9407282].
657 %%CITATION = HEP-PH 9407282;%%
658
659 %\cite{Ackermann:2000tr}
660 \bibitem{Ackermann:2000tr}
661 K.~H.~Ackermann {\it et al.} [STAR Collaboration],
662 %``Elliptic flow in Au + Au collisions at s(N N)**(1/2) = 130-GeV,''
663 Phys.\ Rev.\ Lett.\ {\bf 86} (2001) 402
664 %[arXiv:nucl-ex/0009011].
665 %%CITATION = NUCL-EX 0009011;%%
666
667 %\cite{Adler:2001nb}
668 \bibitem{Adler:2001nb}
669 C.~Adler {\it et al.} [STAR Collaboration],
670 % ``Identified particle elliptic flow in Au + Au collisions at
671 %s(NN)**(1/2) = 130-GeV,''
672 Phys.\ Rev.\ Lett.\ {\bf 87} (2001) 182301
673 %[arXiv:nucl-ex/0107003].
674 %%CITATION = NUCL-EX 0107003;%%
675
676 %%% theory RHIC discoveries %%%
677 %\cite{Gyulassy:2004zy}
678 \bibitem{RHIC_Discoveries}
679 T.D.~Lee {\it et al.},
680 New Discoveries at RHIC: Case for the Strongly Interacting
681 Quark-Gluon Plasma.
682 Contributions from the RBRC Workshop held May 14-15, 2004.
683 Nucl.\ Phys.\ A {\bf 750} (2005) 1-171
684 %%% end theory white-papers
685
686
687 \end{thebibliography}
688
689 %-----------------------------------------------------------------------
690 \chapter*{Appendix I}
691 \label{appendix1}
692 Here we put short pieces of code.
693 %-----------------------------------------------------------------------
694 \printindex
695\end{document}