]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/Documentation/FLOW.tex
restore accientally removed macro
[u/mrichter/AliRoot.git] / PWGCF / FLOW / Documentation / FLOW.tex
1 \documentclass[a4paper]{book}
2 \usepackage[nottoc,numbib]{tocbibind}
3 \usepackage[english]{babel}
4 \usepackage[pdftex]{graphics} %enable pdfgraphics support necessary for pdflatex
5 \usepackage{graphicx}
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
159 \begin{document}
160
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
178 Various authors, edited by Redmer Alexander Bertens (\texttt{rbertens@cern.ch})
179
180 \clearpage
181 \thispagestyle{empty}
182 \pagenumbering{roman}
183 \tableofcontents
184 \renewcommand{\thefootnote}{\alph{footnote}}
185 \mainmatter
186 \chapter{Introduction}
187 The intro to everything.
188 %-----------------------------------------------------------------------
189 \chapter{A Quick Start}
190 \section{The flow package}
191 \label{quickstart}
192 The \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}.} 
193 contains most known flow analysis methods.  In this chapter we give a few examples how to setup an
194 analysis for the most common cases. The chapters that follow provide more detailed information on the structure of the code 
195 and settings of the various flow methods. 
196 This write-up is however not a complete listing of the methods, for this the reader is referred to the header files.
197  
198 \section{On the fly - getting started on a Toy MC}
199 To 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}
209 In 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
211 The 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. 
212 In 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}
216 gSystem->Load("libPWGflowBase");\end{lstlisting}
217         In \texttt{root} additional libraries need to be loaded\index{libraries, ROOT}: 
218         \begin{lstlisting}
219 gSystem->Load("libGeom");
220 gSystem->Load("libVMC");
221 gSystem->Load("libXMLIO");
222 gSystem->Load("libPhysics");
223 gSystem->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}
227 AliFlowAnalysisWithMCEventPlane *mcep = new AliFlowAnalysisWithMCEventPlane();
228 AliFlowAnalysisWithQCumulants *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}
231 mcep->Init(); 
232 qc->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}
237 AliFlowTrackSimpleCuts *cutsRP = new AliFlowTrackSimpleCuts();
238 AliFlowTrackSimpleCuts *cutsPOI = new AliFlowTrackSimpleCuts();
239 cutsPOI->SetPtMin(0.2);
240 cutsPOI->SetPtMax(2.0); \end{lstlisting}
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         
252 Now we have all the ingredients to our first flow analysis      
253         
254         \begin{lstlisting}
255 // make an event with mult particles 
256 AliFlowEventSimple* event = new AliFlowEventSimple(mult,AliFlowEventSimple::kGenerate);
257 // modify the tracks adding the flow value v2
258 event->AddV2(diffv2);
259 for(Int_t i=0; i<nEvts; i++) { 
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);
267       // reset the event so we can re-use the allocated memory
268       event->ClearFast();
269       // fill the event with a fresh set of tracks
270       event->Generate(mult);
271 } \end{lstlisting}
272         \item To fill the histograms which contain the final results we have to call Finish for each method:
273         \begin{lstlisting}
274 mcep->Finish(); 
275 qc->Finish(); \end{lstlisting}
276         \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: 
277      \begin{itemize}
278      \item Create a new output file and write the output to this file
279      \begin{lstlisting}
280 TFile *outputFile = new TFile("outputMCEPanalysis.root","RECREATE");
281 mcep->WriteHistograms();
282 TFile *outputFile = new TFile("outputQCanalysis.root","RECREATE");
283 qc->WriteHistograms();
284 \end{lstlisting}
285
286 Please note that this will create a new output file, and overwrite any existing filse called \texttt{AnalysisResults.root}.
287
288 \item  To write the output of multiple analyses into subdirectories of one file, one can do the following:
289 \begin{lstlisting}
290 TFile *outputFile = new TFile("AnalysisResults.root","RECREATE");
291 TDirectoryFile* dirQC = new TDiretoryFile("outputQCanalysis", "outputQCanalysis");
292 qc->WriteHistograms(dirQC);
293 TDirectoryFile* dirMCEP = new TDiretoryFile("outputMCEPanalysis", "outputMCEPanalysis");
294 mcep->WriteHistograms(dirMCEP);
295 \end{lstlisting}
296
297
298 Note 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.
299
300 When done with running the analysis, do not forget to write the file to disk by calling
301 \begin{lstlisting}
302 TFile::Close(); // write the buffered file to disk \end{lstlisting}
303 \end{enumerate}
304
305 \section{What is in the output file ?}
306 \index{output file} Now we have written the results into a file, but what is in there? 
307
308 Although 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. 
309
310 \subsection{AliFlowCommonHists - Output objects}
311 Objects 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.}
312 \begin{enumerate}
313 \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:
314 \begin{lstlisting}
315   Bool_t    fBookOnlyBasic;       // book and fill only control histos needed for all methods
316   TH1F*     fHistMultRP;          // multiplicity for RP selection
317   TH1F*     fHistMultPOI;         // multiplicity for POI selection
318   TH2F*     fHistMultPOIvsRP;     // multiplicity for POI versus RP
319   TH1F*     fHistPtRP;            // pt distribution for RP selection
320   TH1F*     fHistPtPOI;           // pt distribution for POI selection
321   TH1F*     fHistPtSub0;          // pt distribution for subevent 0
322   TH1F*     fHistPtSub1;          // pt distribution for subevent 1
323   TH1F*     fHistPhiRP;           // phi distribution for RP selection
324   TH1F*     fHistPhiPOI;          // phi distribution for POI selection
325   TH1F*     fHistPhiSub0;         // phi distribution for subevent 0
326   TH1F*     fHistPhiSub1;         // phi distribution for subevent 1
327   TH1F*     fHistEtaRP;           // eta distribution for RP selection
328   TH1F*     fHistEtaPOI;          // eta distribution for POI selection
329   TH1F*     fHistEtaSub0;         // eta distribution for subevent 0
330   TH1F*     fHistEtaSub1;         // eta distribution for subevent 1
331   TH2F*     fHistPhiEtaRP;        // eta vs phi for RP selection
332   TH2F*     fHistPhiEtaPOI;       // eta vs phi for POI selection
333   TProfile* fHistProMeanPtperBin; // mean pt for each pt bin (for POI selection)
334   TH2F*     fHistWeightvsPhi;     // particle weight vs particle phi
335   TH1F*     fHistQ;               // Qvector distribution
336   TH1F*     fHistAngleQ;          // distribution of angle of Q vector
337   TH1F*     fHistAngleQSub0;      // distribution of angle of subevent 0 Q vector
338   TH1F*     fHistAngleQSub1;      // distribution of angle of subevent 1 Q vector
339   TProfile* fHarmonic;            // harmonic 
340   TProfile* fRefMultVsNoOfRPs;    // <reference multiplicity> versus # of RPs
341   TH1F*     fHistRefMult;         // reference multiplicity distribution
342   TH2F*     fHistMassPOI;         // mass distribution for POI selection \end{lstlisting}
343   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/}.}
344   \item \texttt{AliFlowCommonHistResults} is an object designed to hold the results of the flow analysis. The possible histograms stored in this object are
345   \begin{lstlisting}
346   TH1D* fHistIntFlow; // reference flow
347   TH1D* fHistChi;     // resolution
348   // RP = Reference Particles:  
349   TH1D* fHistIntFlowRP;     // integrated flow of RPs
350   TH1D* fHistDiffFlowPtRP;  // differential flow (Pt) of RPs
351   TH1D* fHistDiffFlowEtaRP; // differential flow (Eta) of RPs
352   // POI = Particles Of Interest:
353   TH1D* fHistIntFlowPOI;     // integrated flow of POIs
354   TH1D* fHistDiffFlowPtPOI;  // differential flow (Pt) of POIs
355   TH1D* fHistDiffFlowEtaPOI; // differential flow (Eta) of POIs \end{lstlisting}
356   
357   \end{enumerate}
358   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}).
359   \begin{lstlisting}
360   new TBrowser(); \end{lstlisting}
361 \begin{SCfigure}
362  \includegraphics[width=0.70\textwidth]{figs/browserExample.png}
363  \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.}
364  \label{fig:browserExample}
365 \end{SCfigure}
366 Analysis specific outputs will be discussed in later sections. 
367
368
369 \subsubsection{Comparing flow results}
370 A 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
371 \begin{lstlisting}
372 .L compareFlowResults.C
373 compareFlowResults(TSring(""))  // the empty suffix indicates on the fly events \end{lstlisting}
374
375 \begin{SCfigure}
376  \includegraphics[width=0.70\textwidth]{figs/compareFlowResults.png}
377  \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}.}
378  \label{fig:browserExample}
379 \end{SCfigure}
380
381
382 \subsection{AliFlowCommonConstants - The Common Constants class}
383 All 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
384 \begin{lstlisting}
385 static AliFlowCommonConstants* GetMaster(); \end{lstlisting} 
386 can 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
387 \begin{lstlisting}
388 AliFlowCommonConstants* cc = AliFlowCommonConstants::GetMaster();
389 cc->SetNbinsPt(10);
390 cc->SetPtMin(0);
391 cc->SetPtMax(10); \end{lstlisting}
392 will 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}}.
393
394
395 \subsection{redoFinish.C}
396 \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. 
397
398 The \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
399 \begin{lstlisting}
400 .L redoFinish.C
401 redoFinish(); \end{lstlisting}
402 \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. 
403
404 \section{Getting started on Data}
405
406 The 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
407 for example are stored in ntuples.
408  
409 \section{A simple flow analysis in ALICE using Tasks}
410 The 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.
411
412
413 \chapter{The Program}
414 The basic idea behind the flow package is that from whatever input you have, a \emph{flow event} is constructed, which is then passed to one or more flow analysis methods (e.g. the scalar product method or Q-cumulant method). The flow event is a collection of \emph{flow tracks}, which are simple objects carrying only the kinematic information that is necessary to do flow analysis. By setting up the flow package in this way, the flow analysis methods can analyze input from various sources, be it ALICE data, Monte Carlo events, STAR data, etc, etc, as long as the flow event is properly filled. This might all sound a bit abstract at this point; this chapter however will explain all details and relevant classes in detail. For those who are impatient and prefer seeing the flow package in action, section \ref{sec:example} gives a step-by-step example of doing a $\pi^{\pm}$ $v_2$ analysis in the \texttt{AliROOT} analysis framework. 
415
416 \section{Overview}
417 \begin{figure}
418 \begin{center}
419 \includegraphics[width=.75\textwidth]{figs/flowChart.png}
420 \caption{Schematic presentation of the organization of the flow package. Input, which can come from any kind of source, is converted to a generic \texttt{AliFlowEventSimple} object, which in turn is passed to the analysis methods.}
421 \label{fig:flowchart}
422 \end{center}
423 \end{figure}
424 Figure \ref{fig:flowchart} gives a simple schematic representation of the flow package. Input events (in the case of the figure this is either ESDs or AODs) pass a set of event cuts (the common cuts) and are then converted to a flow event (stored as an \texttt{AliFlowEventSimple} object). This flow event holds a collection of flow tracks (\texttt{AliFlowTrackSimple} objects) which are passed to flow analysis methods. The only steps of this flow chart which depend on \texttt{AliROOT} libraries are the ones handling \textt{ALICE} data types (the ESDs or AODs). The rest of the analysis chain (the \texttt{AliFlowEventSimle} and the analysis methods) have no specific \texttt{AliROOT} dependence and are just simple \texttt{c++} objects. Therefore, the flow package is split into two libraries
425 \begin{description}
426 \item [libPWGflowBase] The base library, which has no specific \texttt{AliROOT} dependencies. This library holds objects such as the \texttt{AliFlowEventSimple} and \texttt{AliFlowTrackSimple}, and analysis methods classes. The analysis methods classes follow the naming scheme: \texttt{AliFlowAnalysisWith$\ast$} where $\ast$ denotes a specific analysis method. All classes which end up in the \text{libPWGflowBase.so} shared object can be found in \texttt{\$ALICE\_ROOT/PWG/FLOW/Base};
427 \item [libPWGflowTasks] The tasks library, which has specific \texttt{AliROOT} dependencies. Contrary to what the name suggests, this library does not just hold tasks, but actually comprises all classes of the flow package which need to include \texttt{AliROOT} specific classes. This ranges from classes to read the AOD or ESD input data (important examples are the \texttt{AliFlowEvent} and \texttt{AliFlowTrackCuts}, which will be discussed later on in this chapter) and the \texttt{AliAnalysisTask$\ast$} classes, which are analysis tasks, derived from \texttt{AliAnalysisTaskSE} which can be used in the \texttt{AliROOT} analysis framework and are actually just interface classes to the underlying flow analysis methods of libPWGflowBase. The \text{libPWGflowTasks.so} shared object can be found in \texttt{\$ALICE\_ROOT/PWG/FLOW/Tasks};
428 \end{description}
429
430
431 \section{Flow Event}
432 Every flow analysis in the flow package starts with the flow event. As mentioned earlier, the flow event is a simple container class which holds a collection of flow tracks, which are in turn fed to the flow analysis methods. 
433 \subsection{Input data}
434 Before passing the flow event to the flow analysis methods, it needs to be filled with a set of flow tracks. In general, a distinction is made between \emph{reference particles} (or \emph{RP's}), which are particles that are used to build the \textbf{Q} vector(s), and \emph{particles of interest} (or \emph{POI's}), which are the particles of which you'll calculate the differential flow. The flow event and the flow analysis methods are designed to keep track of which flow tracks are POI's, RP's (or even both at the same time), which is important to avoid auto-correlation effects which can distort the $v_n$ measurement. The user of the flow package however is responsible for properly setting up the analysis! 
435
436 The flow event can be filled with input from many sources. In the second chapter of this manual, a simple method has been shown where the flow event (the \texttt{AliFlowEventSimple} object) fills itself by generating a set of Monte Carlo tracks by sampling kinematic variables from supplied p.d.f.'s. Using this method is a very effective tool for testing and developing new flow analysis methods (if you generate events with a certain $v_2(p_t)$ and then retrieve the same $v_2(p_t)$ from your flow analysis method, you can use that as a tool to proof the validation of your analysis method) but if you want to do a data analysis, a somewhat more advanced - but not difficult - approach is necessary. 
437
438 Filling a flow event from data can be performed either `by-hand' (which is covered in section \ref{sec:exotic} on more exotic analyses), but the most commonly used method of filling a flow event in the \texttt{AliROOT} analysis framework is using the dedicated task \texttt{AliAnalysisTaskFlowEvent}. 
439
440
441
442 or by using the class \texttt{AliFlowEvent}. \texttt{AliFlowEvent} is a derived class. Its  base class, \texttt{AliFlowEventSimple} 
443
444
445 \section{Track cuts and the track cuts object}
446 \subsection{ESD tracks as data source}
447 \subsection{AOD tracks as data source}
448 \subsection{Additional options}
449 \subsubsection{Identified particles}
450 \subsubsection{VZERO}
451
452 Calibration specifics - different for 10h and 11h!
453 \begin{description}
454 \item [LHC10h]
455 \begin{itemize}
456 \item Re-weighting of vzero signal per tile
457 \item Re-centering of q-vectors
458 \item Needs aodb 
459 \end{itemize}
460 \item [LHC11h]
461 \begin{itemize}
462 \item Dedicated VZERO-EP task
463 \item Q-vectors are read from event header
464 \item Needs dedicated task
465 \end{itemize}
466 \end{description}
467 Calibration procedure is selected by AliFlowEvent depending on runnumber
468 \begin{itemize}
469 \item User is responsible for enabling VZERO-EP task in case of 11h data!
470 \end{itemize}
471 See comments at AliFlowTrackCuts::GetStandardVZEROOnlyTrackCuts2011()
472 \begin{description}
473 \item [What is re-weighting ?]
474 \begin{itemize}
475 \item Take a TProfile with average multiplicity per cell (for each run)
476 \item Fit a constant line per disc (or ring) $x = a$ (see next slide for example)
477 \item The track weight for each VZERO cell is now calculated in a second iteration as
478 \end{itemize}
479 \begin{equation}
480 \mbox{track weight} = \frac{\mbox{cell multiplicity} * a}{\mbox{average multiplicity in a cell}} \nonumber
481 \end{equation}
482 \item [What is re-centering ?]
483 \begin{itemize}
484 \item Store the $Q$-vectors (component-wise) of a run in a TProfile
485 \item The corrected $Q$-vectors can now be obtained by doing
486 \begin{equation}
487 Q_n \longrightarrow \frac{Q_n - \langle Q_n \rangle }{\sigma_{Q_n}} \nonumber
488 \end{equation}
489 where brackets denote the one-run average, and $\sigma_{Q_n}$ the standard deviation of $Q_n$ in the sample
490 \end{itemize}
491 \end{description}
492
493 Several options for VZERO signal calibration in 10h system
494 \begin{itemize}
495 \item Per ring re-weighting (instead of full-disc reweighting) \\
496 \alert{AliFlowTrackCuts::SetV0gainEqualizationPerRing(bool)}
497 \end{itemize}
498 \begin{center}
499 \includegraphics[width=.4\textwidth]{figs/eg_disc.pdf}
500 \includegraphics[width=.4\textwidth]{figs/eg_ring.pdf}
501 \end{center}
502 \begin{itemize}
503 \item Toggle on or off the additional q-vector recentering \\
504 AliFlowTrackCuts::SetApplyRecentering(bool)
505 \item Toggle: disable or enable offending rings from the entire computation (will break re-centering) \\
506 AliFlowTrackCuts::SetUseVZERORing(int, bool)
507 \end{itemize}
508 In 11h, none of these options are available, \alert{everything is done in the VZERO-EP task}!
509
510
511 \section{The flow package in the ALICE analysis framework}
512 \subsection{AliAnalysisTaskSE}
513 \subsection{Analysis methods}
514
515 \begin{itemize}
516 \item AliFlowAnalysisWithCumulants.h             
517 \item AliFlowAnalysisWithMixedHarmonics.h
518 \item AliFlowAnalysisWithFittingQDistribution.h \item  AliFlowAnalysisWithMultiparticleCorrelations.h
519 \item AliFlowAnalysisWithLeeYangZeros.h          
520 \item AliFlowAnalysisWithNestedLoops.h
521 \item AliFlowAnalysisWithLYZEventPlane.h         
522 \item AliFlowAnalysisWithQCumulants.h
523 \item AliFlowAnalysisWithMCEventPlane.h          
524 \item AliFlowAnalysisWithScalarProduct.h
525 \end{itemize}
526
527
528 \subsection{Example: $\pi^{\pm}$ $v_2$}\label{sec:example}
529 As an example of how to do a flow analysis using the flow package within the \texttt{AliROOT} analysis framework, this section will guide you through the process of measuring $\pi^{\pm}$ $v_2$ step-by-step. Generally, doing an analysis in the \texttt{AliROOT} is a two-file process, where one runs a run.C script in \texttt{AliROOT}, which sets up the analysis framework and takes care of the interface to the analysis \texttt{GRID}, and calls an \texttt{AddTask$\ast$.C} macro which in turn creates and configures instances of the relevant analysis tasks. In this example, the distinction will not be so clear, but mentioned in the text. In practice of course, you would copy these steps into macros and launch the macros from the \texttt{AliROOT} command line when doing analysis. We will not run this test on \texttt{GRID}, but assume that you have some \texttt{AliAOD.root} files available on your local system. Note that this example is a guideline, there are many ways leading to Rome, and many ways of setting up an analysis. 
530
531 \begin{description}
532 \item [Preparing the session] First, we need to prepare the framework and root session (these steps would go into your run.C macro). Launch \texttt{AliROOT} and load the necessary libraries
533 \begin{lstlisting}
534   // load libraries
535   gSystem->Load("libCore.so");        
536   gSystem->Load("libGeom.so");
537   gSystem->Load("libVMC.so");
538   gSystem->Load("libPhysics.so");
539   gSystem->Load("libTree.so");
540   gSystem->Load("libSTEERBase.so");
541   gSystem->Load("libESD.so");
542   gSystem->Load("libAOD.so");
543   gSystem->Load("libANALYSIS.so");
544   gSystem->Load("libANALYSISalice.so");
545   gSystem->Load("libEventMixing.so");
546   gSystem->Load("libCORRFW.so");
547   gSystem->Load("libPWGTools.so");
548   gSystem->Load("libPWGCFebye.so");
549   gSystem->Load("libPWGflowBase.so");
550   gSystem->Load("libPWGflowTasks.so"); \end{lstlisting}
551 Create an analysis manager and create a \texttt{TChain} which we will point to the data you have stored locally on your machine
552 \begin{lstlisting}
553   // create the analysis manager
554   AliAnalysisManager* mgr = new AliAnalysisManager("MyManager");
555   // create a tchain which will point to an aod tree
556   TChain* chain = new TChain("aodTree");
557   // add a few files to the chain
558   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0003/AliAOD.root");
559   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0003/AliAOD.root");
560   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0004/AliAOD.root");
561   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0005/AliAOD.root");
562   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0006/AliAOD.root");
563   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0007/AliAOD.root");
564   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0008/AliAOD.root");
565   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0009/AliAOD.root");
566   chain->Add("/home/rbertens/Documents/CERN/ALICE_DATA/data/2010/LHC10h/000139510/ESDs/pass2/AOD086/0010/AliAOD.root");
567   // create an input handler
568   AliVEventHandler* inputH = new AliAODInputHandler();
569   // and connect it to the manager
570   mgr->SetInputEventHandler(inputH);\end{lstlisting}
571 Great, at this point we have created an analysis manager, which will read events from a chain of AliAOD.root files. 
572   
573 The next step will be adding specific analyses to the analysis manager. This is usually done by calling an \texttt{AddTask$\ast$.C} macro, which creates instances of analysis tasks, connects input (events from the analysis manager) to these tasks, and then connects output from the task back to the analysis manager (which will take care of writing the analysis to a common output file). These next steps show what would be in your \texttt{AddTask$\ast$.C} macro.
574   
575 The heart of our flow analysis will be the flow event. To fill a flow event from the input AOD events, we will use the \texttt{AliAnalysisTaskFlowEvent} class. The AOD input events have to be supplied by the analysis manager, so first things first, retrieve the manager to which you will connect your flow analysis tasks:
576
577 \begin{lstlisting}
578   // the manager is static, so get the existing manager via the static method
579   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
580   if (!mgr) {
581       printf("No analysis manager to connect to!\n");
582       return NULL;
583   }
584         
585   // just to see if all went well, check if the input event handler has been connected
586   if (!mgr->GetInputEventHandler()) {
587       printf("This task requires an input event handler!\n");
588       return NULL;
589     }\end{lstlisting}
590     
591 The manager and input data are present, so we can create the flow event task and do some basic configuration
592 \begin{lstlisting}
593   // create instance of the class
594   AliAnalysisTaskFlowEvent* taskFE = new AliAnalysisTaskFlowEvent("FlowEventTask");
595   // enable QA plots (will give you more insight into what you're doing)
596   taskFE->SetQAOn(kTRUE);
597   // set the trigger selection
598   taskFE->SelectCollisionCandidates(AliVEvent::kMB);
599 \end{lstlisting}
600 Note that in the last step you have set the trigger configuration. Always make sure that you run on a trigger that makes sense for your analysis. A general remark is that the non-uniform acceptance correction methods that are implemented in the flow package, assume a flat \textbf{Q} vector distribution. Specific triggers (e.g. EMCal triggers) result in a \textbf{Q} vector bias which should \emph{not} be corrected as they invalidate that assumption\footnote{The actual event selection based on triggers is done in the \texttt{AliAnalysisTaskSE} class (to be specific, the trigger is checked in \texttt{AliAnalysisTaskSE::Exec()}) from which the \texttt{AliAnalysisTaskFlowEvent} is derived. The full set of available triggers can be found in the virtual event header \texttt{AliVEvent.h}. }.
601
602 In addition to the trigger selection, one might want to do some more event selection. The flow package has a common event selection class, which we will add to your flow event
603
604 \begin{lstlisting}
605   // define the event cuts object
606   AliFlowEventCuts* cutsEvent = new AliFlowEventCuts("EventCuts");
607   // configure some event cuts, starting with centrality
608   cutsEvent->SetCentralityPercentileRange(20., 30.);
609   // method used for centrality determination
610   cutsEvent->SetCentralityPercentileMethod(AliFlowEventCuts::kV0);
611   // vertex-z cut
612   cutsEvent->SetPrimaryVertexZrange(-10.,10.);
613   // enable the qa plots
614   cutsEvent->SetQA(doQA);
615   // explicit multiplicity outlier cut
616   cutsEvent->SetCutTPCmultiplicityOutliersAOD(kTRUE);
617   cutsEvent->SetLHC10h(kTRUE);
618   
619   
620   // and, last but not least, pass these cuts to your flow event task
621   taskFE->SetCutsEvent(cutsEvent);\end{lstlisting}
622
623 Now that the flow event task has been created and some basic configuration has been done, it's time to specify the POI and RP selection. This is done by defining sets of track selection criteria for both POI's and RP's: tracks in an event that pass the track selection criteria are used as POI or RP. The track selection is defined in \texttt{AliFlowTrackCuts} objects which are passed to the \texttt{AliAnalysisTaskFlowEvent} task which does the actual selection based on the passed criteria. So, let's create some track selection objects!
624
625 Starting with the RP's, for which we'll just use a uniform selection of charged tracks,
626 \begin{lstlisting}
627   //create the track cuts object using a static function of AliFlowTrackCuts
628   AliFlowTrackCuts* cutsRP = AliFlowTrackCuts::GetAODTrackCutsForFilterBit(1);
629   // specify the pt range
630   cutsRP->SetPtRange(0.2, 5.);
631   // specify eta range
632   cutsRP->SetEtaRange(-0.8, 0.8);
633   // specify track type
634   cutsRP->SetParamType(kAOD);\end{lstlisting}
635   
636 The particles of which we want to measure the differential $v_2$ are the charted pions. The \texttt{AliFlowTrackCuts} will do the particle identification. 
637   
638 \begin{lstlisting}
639   //create the track cuts object using a static function of AliFlowTrackCuts
640   AliFlowTrackCuts* cutsPOI = AliFlowTrackCuts::GetAODTrackCutsForFilterBit(1);
641   
642   // specify the track type
643   cutsPOI->SetParamType(kAOD);\end{lstlisting}
644
645 \end{lstlisting}
646 \begin{lstlisting}
647
648 \end{lstlisting}
649 \begin{lstlisting}
650
651 \end{lstlisting}
652 \begin{lstlisting}
653
654 \end{lstlisting}
655 \begin{lstlisting}
656
657 \end{lstlisting}
658 \begin{lstlisting}
659
660 \end{lstlisting}
661 \begin{lstlisting}
662
663 \end{lstlisting}
664 \begin{lstlisting}
665
666 \end{lstlisting}
667 \begin{lstlisting}
668
669 \end{lstlisting}
670 \begin{lstlisting}
671
672 \end{lstlisting}
673 \begin{lstlisting}
674
675 \end{lstlisting}
676 \begin{lstlisting}
677
678 \end{lstlisting}
679 \begin{lstlisting}
680
681 \end{lstlisting}
682 \begin{lstlisting}
683
684 \end{lstlisting}
685 \begin{lstlisting}
686
687 \end{lstlisting}
688 \begin{lstlisting}
689
690 \end{lstlisting}
691
692
693
694 \begin{lstlisting}
695
696 \end{lstlisting}
697
698
699 \end{description}
700
701 \chapter{Methods}
702 \label{Methods}
703 The 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/}
704 \begin{itemize}
705         \item The Monte-Carlo Truth
706         \item Scalar Product Method \\ \hspace*{1cm} \texttt{EventPlaneMethod/FlowMethodsPV.pdf}
707         \item Generating Function Cumulants \\ \hspace*{1cm} \texttt{GFCumulants/Borghini\_GFCumulants\_PracticalGuide.pdf}
708         \item Q-vector Cumulant method \\ \hspace*{1cm} \texttt{QCumulants/QCpaperdraft.pdf} 
709         \item Lee-Yang Zero Method \\ \hspace*{1cm} \texttt{LeeYangZeroes/Borghini\_LYZ\_PracticalGuide.pdf}
710         \item Lee-Yang Zero Method \\ \hspace*{1cm} \texttt{LeeYangZeroesEP/LYZ\_RP.pdf}
711 \end{itemize}
712 The 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. 
713 %-----------------------------------------------------------------------
714
715 \section{AliFlowAnalysisWithCumulants}
716 \subsection{Theory}
717 \subsection{Implementation}
718 \begin{lstlisting}
719
720 \end{lstlisting}
721
722 \section{AliFlowAnalysisWithMixedHarmonics}
723 \subsection{Theory}
724 \subsection{Implementation}
725 \begin{lstlisting}
726
727 \end{lstlisting}
728
729 \section{AliFlowAnalysisWithFittingQDistribution}
730 \subsection{Theory}
731 \subsection{Implementation}
732 \begin{lstlisting}
733
734 \end{lstlisting}
735
736
737 \section{AliFlowAnalysisWithMultiparticleCorrelations}
738 \subsection{Theory}
739 \subsection{Implementation}
740 \begin{lstlisting}
741
742 \end{lstlisting}
743
744
745 \section{AliFlowAnalysisWithLeeYangZeros}
746 \subsection{Theory}
747 \subsection{Implementation}
748 \begin{lstlisting}
749
750 \end{lstlisting}
751
752
753 \section{AliFlowAnalysisWithNestedLoops}
754 \subsection{Theory}
755 \subsection{Implementation}
756 \begin{lstlisting}
757
758 \end{lstlisting}
759
760
761 \section{AliFlowAnalysisWithLYZEventPlane}
762 \subsection{Theory}
763 \subsection{Implementation}
764 \begin{lstlisting}
765
766 \end{lstlisting}
767
768
769 \section{AliFlowAnalysisWithQCumulants}
770
771         \label{qvc}
772         \subsection{Theory}
773         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. 
774                 
775         %\paragraph{Multiparticle correlations and anisotropic flow}
776         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:
777         \begin{equation}
778                 f(x_i, x_j) = f(x_i)f(x_j) + f_c (x_i, x_j)
779         \end{equation}
780         When taking as an observable azimuthal dependence,
781         \begin{align}
782                 x_i \equiv e^{i n \phi_i}, \hspace{.5in} x_j \equiv e^{i n \phi_j} 
783         \end{align}
784         the two-particle cumulant is expressed as the covariance of the expectation value:
785         \begin{equation}
786                 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]}).
787         \end{equation}
788         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:
789         \begin{align}
790                 E_C(e^{i n[\phi_i - \phi_j]}) & = E(e^{in[\phi_i]})E(e^{in[- \phi_j]})                                   \\
791                                               & = \left< e^{in[\phi_i]}\right> \left< e^{in[- \phi_j]} \right> \nonumber \\
792                                               & = \left< e^{in[\phi_i - \phi_j]} \right> \nonumber                       \\
793                                               & = \left< 2 \right>, \nonumber                                            
794         \end{align}
795         the all-event average of which is denoted by
796         \begin{equation}\label{twocul}
797                 c_n\{2\} = \left< \left< 2 \right> \right>
798         \end{equation}
799         where $c_n\{2\}$ is called the two-particle cumulant. For the four-particle case, one proceeds likewise:
800         \begin{align}
801                 E_c(e^{in[\phi_i + \phi_j - \phi_k -\phi_l]}) & = E(e^{in[\phi_i + \phi_j - \phi_k -\phi_l]})                     \\
802                                                               & - E(e^{in[\phi_i - \phi_k]})E(e^{in[\phi_j - \phi_l]})\nonumber   \\
803                                                               & - E(e^{in[\phi_i - \phi_l]})E(e^{in[\phi_j - \phi_k]}). \nonumber 
804         \end{align}
805         The four-particle cumulant can be expressed in terms of two- and four-particle correlations as well,
806         \begin{equation}\label{fourcul}
807                 c_n\{4\} = \left< \left< 4 \right> \right> - 2 \left< \left< 2 \right> \right>^2.
808         \end{equation}
809         From \ref{twocul} and \ref{fourcul} it follows that $v_n$ harmonics are related to cumulants following
810         \begin{align}\label{refFlowFromCumulants2nd}
811                 v_n\{2\} & = \sqrt{c_n\{2\}}                \\
812                 v_n\{4\} & = \sqrt[4]{-c_n\{4\}} \nonumber. 
813         \end{align}
814         where $v_n\{2\}$, $v_n\{4\}$ denote flow estimates obtained from two- and four-particle correlations.
815                 
816         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
817         \begin{align}
818                 d_n\{2\} & = \left< \left< 2^{\prime} \right> \right>                                                                                            \\
819                 d_n\{4\} & = \left< \left< 4^{\prime} \right> \right> - 2\cdotp \left< \left< 2^{\prime} \right> \right>\left< \left< 2 \right> \right>\nonumber 
820         \end{align}
821         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:
822         \begin{align}
823                 v_n^{\prime}\{2\} & = \frac{d_n\{2\}}{\sqrt{c_n\{2\}}}               \\
824                 v_n^{\prime}\{4\} & = - \frac{d_n\{4\}}{(-c_n\{2\})^{3/4}}.\nonumber 
825         \end{align}
826                 
827         \subsection{Implementation}
828 A how-to of the QC method in the flow-package is written by the author of the analysis software and is available on the FLOW-PAG twiki page (\href{https://twiki.cern.ch/twiki/bin/view/ALICE/FlowPackageHowto}{https://twiki.cern.ch/twiki/bin/view/ALICE/FlowPackageHowto}). This section is copied from the twiki page.
829
830  To get the first feeling how the FLOW package and QC output are organized, perhaps you can just trivially execute one 'on-the-fly' example 
831
832  Essentially, you have to do two things: 
833         \begin{lstlisting}
834 cp $ALICE_ROOT/PWGCF/FLOW/macros/runFlowAnalysisOnTheFly.C
835 aliroot runFlowAnalysisOnTheFly.C \end{lstlisting}
836
837  In the analysis on-the-fly particles are sampled from hardwired Fourier-like p.d.f, so input vn harmonics are completely under control. Please have a look at the steering macro runFlowAnalysisOnTheFly.C and corresponding class AliFlowEventSimpleMakerOnTheFly.cxx in the FLOW package, which are easily written (no fancy C++ features in my code!), and well documented. 
838
839  If you have landed successfully, you will get an output AnalysisResults.root, where the results from each method are structured in directories. 
840
841  To make a size of the file lighter (which matters a lot during merging!), you may want not to use all the methods. You can make your selection of the methods via:
842         \begin{lstlisting}
843 Bool_t MCEP = kTRUE; // Monte Carlo Event Plane
844 Bool_t SP = kTRUE; // Scalar Product (a.k.a 'flow analysis with eta gaps')
845 Bool_t GFC = kTRUE; // Generating Function Cumulants
846 Bool_t QC = kTRUE; // Q-cumulants
847 Bool_t FQD = kTRUE; // Fitted q-distribution
848 Bool_t LYZ1SUM = kTRUE; // Lee-Yang Zero (sum generating function), first pass over the data
849 Bool_t LYZ1PROD = kTRUE; // Lee-Yang Zero (product generating function), first pass over the data
850 Bool_t LYZ2SUM = kFALSE; // Lee-Yang Zero (sum generating function), second pass over the data
851 Bool_t LYZ2PROD = kFALSE; // Lee-Yang Zero (product generating function), second pass over the data
852 Bool_t LYZEP = kFALSE; // Lee-Yang Zero Event Plane
853 Bool_t MH = kFALSE; // Mixed Harmonics (used for strong parity violation studies) 
854 Bool_t NL = kFALSE; // Nested Loops (neeed for debugging, only for developers)  \end{lstlisting}
855  Next important remark, if you want to browse through AnalysisResults.root, make sure that in AliROOT prompt you have loaded the FLOW library:
856         \begin{lstlisting}
857 root [0] gSystem->Load("libPWGflowBase");       \end{lstlisting}
858  In the AnalysisResults.root, the QC output is stored in "outputQCanalysis". Just browse there, browse in "cobjQC", and you will see the directory structure.
859  "Integrated Flow" => contains all results needed for reference flow. Browse in, and explore the directory (in fact, TList) "Results". The names of the histos should be self-explanatory;
860  "Differential Flow" => browse further into "Results", and you will find a bunch of things that you can explore. For instance, in the directory "Differential Q-cumulants (POI,p$_{T}$)" you will find histos holding differential QC\{2\} vs pt, QC\{4\} vs p$_{T}$, etc. On the other hand, the flow estimates themselves, namely differential vn\{2\} vs pt, vn\{4\} vs pt you can fetch from TList "Differential Flow (POI,p$_{T}$)"
861  I hope that the names for all other things you might need are self-explanatory. 
862  You configure QC method in the steering macro via setters:
863         \begin{lstlisting}
864 qc->SetHarmonic(2);
865 qc->SetCalculateDiffFlow(kTRUE);
866 qc->SetCalculate2DDiffFlow(kFALSE); // vs (pt,eta)
867 qc->SetApplyCorrectionForNUA(kFALSE);
868 qc->SetFillMultipleControlHistograms(kFALSE); 
869 qc->SetMultiplicityWeight("combinations"); // default (other supported options are "unit" and "multiplicity")
870 qc->SetCalculateCumulantsVsM(kFALSE);
871 qc->SetCalculateAllCorrelationsVsM(kFALSE); // calculate all correlations in mixed harmonics "vs M"
872 qc->SetnBinsMult(10000);
873 qc->SetMinMult(0);
874 qc->SetMaxMult(10000); 
875 qc->SetBookOnlyBasicCCH(kFALSE); // book only basic common control histograms
876 qc->SetCalculateDiffFlowVsEta(kTRUE); // if you set kFALSE only differential flow vs pt is calculated
877 qc->SetCalculateMixedHarmonics(kFALSE); // calculate all multi-partice mixed-harmonics correlators      \end{lstlisting}
878  You can make QC output lighter by setting 
879         \begin{lstlisting}
880 qc->SetBookOnlyBasicCCH(kTRUE); \end{lstlisting} 
881 (to book only basic control histograms, and disabling lot of 2D beasts), and 
882         \begin{lstlisting}
883 qc->SetCalculateDiffFlowVsEta(kFALSE);  \end{lstlisting}
884 (if not interested in differential flow vs eta => this will make the final output smaller) 
885  In the "cobjQC" you might also consider "AliFlowCommonHistQC" to be useful thing, which contains a lot of trivial but still important control histograms (eg multiplicity distribution of RPs, POIs, etc). 
886  I think this is the best and fastest way for you to get familiar with the FLOW package => once you send the QC code over the real data, you get the output organized in the very same way. I will send you shortly an example set of macros which get be used for the analysis on Grid over the real data. 
887  Differential QC\{2\} and QC\{4\} implementation is generic. You can tag as RP and POI whatever you want, and it will give you results automatically decoupled from any autocorrelation effects. For this reason, it is important that if you have certain particles which is classified both as RP and POI, to be explicitly tagged also as RPs and POI once you are building the "flow event". 
888  The basic feature in the FLOW package is that from whichever input you start, we have to build the same intermediate step called "flow event", with which than we feed all methods (SP, QC, etc) in the very same way. 
889  To see what "flow event" does, and what does it need as an input, you may want to consult task AliAnalysisTaskFlowEvent.cxx and classes needed there-in. 
890
891
892
893 \section{AliFlowAnalysisWithMCEventPlane}
894 \subsection{Theory}
895 \subsection{Implementation}
896 \begin{lstlisting}
897
898 \end{lstlisting}
899
900
901
902 \section{AliFlowAnalysisWithScalarProduct}
903 \label{SP}
904 \subsection{Theory}
905 \subsubsection{The scalar product method}
906 The 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. 
907
908 To 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}. 
909
910 The reason for the division into RP's and POI's is the fact that the two particle correlator of POI's,
911 \begin{equation}\label{unstable}
912         v_n^{POI} = \sqrt{ \left< e^{i n (\phi^{POI}_i - \phi^{POI}_j)} \right> }
913 \end{equation}
914 is generally not stable statistically. Introducing reference flow, \ref{unstable} can be rewritten as
915 \begin{equation}\label{stable}
916         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}}}.
917 \end{equation}
918 By 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. 
919
920 \paragraph{The scalar product method}
921 In the scalar product method, POI's $u_k$,
922 \begin{equation}\label{spderiv}
923         u_k = e^{i n \phi_k},
924 \end{equation}
925 are 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,
926 \begin{equation}
927         u_k \cdotp \sum_{\substack{ j=1,\\j \neq k}}^{M_{RP, a}} u^*_j
928 \end{equation}
929 where $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:
930 \begin{equation}\label{rppoisp}
931         \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)
932 \end{equation}
933 where 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$
934 \begin{equation}
935         \sum a f(x) = a \sum f(x) 
936 \end{equation}
937 \ref{rppoisp} can be rewritten as
938 \begin{align}\label{sp_part2}
939         \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]} \\
940                                       & = M_{RP, a} v^{\prime}_n v_n^a \nonumber                                                                                   
941 \end{align}
942 where in the last step of \ref{sp_part2} it has been used that
943 \begin{equation}
944         v_n = \frac{\ds \sum_i^M e^{in[\phi_i - \Psi_n]} }{M}.
945 \end{equation}
946
947 To obtain the estimate of $v_n$, one must still disentangle the reference flow contribution from the event averaged correlation given in \ref{rppoisp}. 
948 Proceeding in a fashion similar to that presented in equation \ref{rppoisp}, it can be shown that
949 \begin{equation}
950         \left< \frac{Q_a}{M_a}\cdotp\frac{Q^*_b}{M_b} \right> = \left< v_n^{a}v_n^{b} \right>
951 \end{equation}
952 where $Q_a, Q_b$ are the Q-vectors of RP's in sub-event $a, b$. Under the assumption that
953 \begin{equation}\label{zerononflow}
954         \left< v_n^2 \right> = \left< v_n \right>^2,
955 \end{equation}
956 - 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
957 \begin{equation}\label{sp}
958         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>}}
959 \end{equation}
960 to obtain $v_n^{a}$. For equal multiplicity sub-events $M_a = M_b$, \ref{sp} is simplified to
961 \begin{equation}\label{spa}
962         v_n^{\prime} = \frac{\left< \left< u \cdotp Q^*_a \right>_t \right>}{ \sqrt{ \left< Q_a\cdotp Q^*_b \right>}}.
963 \end{equation}
964 $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$.
965 This principle can be generalized straightforwardly to allow for a selection of RP's which has been divided into three subevents. 
966 \begin{align}
967         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>}}                                                    \\
968               & = \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 
969 \end{align}
970 where 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)]}
971
972 \subsubsection{Extension to Event Plane method}
973 As 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:
974 \begin{equation}\label{phase}
975         \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}}.
976 \end{equation}
977 For a full event, the enumerator of \ref{sp} can be expressed as
978 \begin{equation}\label{epsp1}
979         \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>
980 \end{equation}
981 which corresponds to the all-event average of \ref{ep_first}. As shown in the previous subsection this expression equals $v_n^{obs}$. 
982
983 For normalized Q-vectors, the denominator of \ref{sp} reads (using \ref{phase}):
984 \begin{equation}\label{epsp2}
985         \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>)}
986         \end{equation}
987         from which the event plane resolution can be calculated using \ref{emeancos} or \ref{halfeventresolution}.
988
989 \subsection{Implementation}
990 \begin{lstlisting}
991    void SetHarmonic(Int_t iHarmonic)          { fHarmonic = iHarmonic; }
992    void SetApplyCorrectionForNUA(Bool_t iVal) { fApplyCorrectionForNUA = iVal?1:0; }
993    void SetNormalizationType(Int_t iVal)      { fNormalizationType = iVal; }
994    void SetDebug(Bool_t bVal)                 { fDebug = bVal; }
995    void SetBookOnlyBasicCCH(Bool_t bVal)           { fMinimalBook = bVal; }
996    void SetTotalQvector(Int_t iVal)           { fTotalQvector = iVal; }
997    void SetUsePhiWeights(Bool_t bVal)        { fUsePhiWeights = bVal; }
998    void SetWeightsList(TList* const aWeightsList)  { fWeightsList = (TList*)aWeightsList->Clone(); }\end{lstlisting}
999
1000                 \subsubsection{VZERO scalar product}
1001                 
1002 The VZEROA and VZEROC detectors have different $\eta$ coverage w.r.t the TPC, so to evaluate $v_2$ from VZERO-SP, do
1003 \begin{equation}
1004 v_n = \sqrt{\frac{\langle u_i \cdotp Q_A \rangle }{\sqrt{\langle Q_A \cdotp Q_B \rangle}} \cdotp \frac{\langle u_j \cdotp Q_B \rangle }{\sqrt{\langle Q_A \cdotp Q_B \rangle}}}
1005 \nonumber
1006 \end{equation}
1007 \begin{itemize}
1008 \item $Q_A$ and $Q_B$ are the VZEROC and VZEROA RP's
1009 \end{itemize}
1010 There has been some disscussion ...
1011 \begin{itemize}
1012 \item Take $u$ = full TPC = $u_j$ = $u_i$, or do $u_j$ = $\eta < 0$, $u_i$ = $\eta > 0$ ?
1013 \end{itemize}
1014 We should have a common approach to ensure uniform analyses and physics message!
1015 Majority vote has yielded the following:
1016 \begin{itemize}
1017 \item $u$ = full TPC = $u_j$ = $u_i$
1018 \end{itemize}
1019 \begin{equation}
1020 v_n = \sqrt{\frac{\langle u \cdotp Q_A \rangle }{\sqrt{\langle Q_A \cdotp Q_B \rangle}} \cdotp \frac{\langle u \cdotp Q_B \rangle }{\sqrt{\langle Q_A \cdotp Q_B \rangle}}}
1021 \nonumber
1022 \end{equation}
1023 This means we should think about the \alert{correlation} between terms in this equation!
1024         \subsubsection{Caveats}
1025                 
1026                 
1027 \chapter{More exotic uses}\ref{sec:exotic}
1028 \section{Flow analysis of resonances}   
1029
1030
1031 Reconstructing decayed particles
1032 %\item Invariant mass reconstruction, e.g.
1033 \begin{equation}
1034 \boxed{ \mbox{\Lambda} \longrightarrow \pi + \mbox{p} } \nonumber
1035 \end{equation}
1036 \begin{itemize}
1037 \item Take all the $\pi + \mbox{p}$ pairs in an event and plot their invariant mass
1038 \item Extract the signal yield \alert{$N^S$} and total yield \alert{$N^T$} from this distribution
1039 \item Measure $v_2$ of all $\pi + \mbox{p}$ pairs
1040 \end{itemize}
1041 Under the assumption that signal and background flow are additive, we can disentangle the two
1042 \begin{align}
1043 v_2^{T}(m_{inv})  = & \alert{v_2^{S}} \frac{N^{S} }{N^{S} + N^{B}}(m_{inv}) \nonumber \\ 
1044 & + v_2^{B}(m_{inv}) \frac{ N^{B}}{N^{S} + N^{B}}(m_{inv})\nonumber 
1045 \end{align}
1046 \column{.5\textwidth}
1047 \includegraphics[width=.9\textwidth]{figs/2012-Jul-25-oneOFtwo_16_18.pdf}\\
1048 \includegraphics[width=.9\textwidth]{figs/2012-Jul-25-twoOFtwo_16_18.pdf}
1049 \end{columns}
1050 \end{frame}
1051         
1052 \section{Flow analysis in the LEGO framework: re-tagging your POI and RP selections}
1053 \subsection{The problem at hand}
1054 \subsection{Re-tagging POI and RP selections}
1055                 
1056         \chapter{Summary}
1057         \label{Summary}
1058         This sums it all up.
1059         %-----------------------------------------------------------------------
1060                 
1061         \begin{thebibliography}{99}
1062                                 
1063                                   
1064                 \bibitem{Ollitrault:1992bk}
1065                 J.~Y.~Ollitrault,
1066                 %``Anisotropy as a signature of transverse collective flow,''
1067                 Phys.\ Rev.\ D {\bf 46} (1992) 229.
1068                 %%CITATION = PHRVA,D46,229;%%
1069                                 
1070                 \bibitem{Danielewicz:1999vh}
1071                 P.~Danielewicz,
1072                 %``Flow and equation of state in heavy-ion collisions,''
1073                 Nucl.\ Phys.\ A {\bf 661} (1999) 82.
1074                 %  [arXiv:nucl-th/9907098].
1075                 %%CITATION = NUCL-TH 9907098;%%
1076                                 
1077                 \bibitem{Rischke:1996nq}
1078                 D.~H.~Rischke,
1079                 %``Hydrodynamics and collective behavior in relativistic nuclear
1080                 %collisions,''
1081                 Nucl.\ Phys.\ A {\bf 610} (1996) 88C.
1082                 %  [arXiv:nucl-th/9608024].
1083                 %%CITATION = NUCL-TH 9608024;%%
1084                                 
1085                 \bibitem{Ollitrault:1997vz}
1086                 J.~Y.~Ollitrault,
1087                 %``Flow systematics from SIS to SPS energies,''
1088                 Nucl.\ Phys.\ A {\bf 638} (1998) 195.
1089                 %  [arXiv:nucl-ex/9802005].
1090                 %%CITATION = NUCL-EX 9802005;%%
1091                                 
1092                 \bibitem{Voloshin:1994mz}
1093                 S.~Voloshin and Y.~Zhang,
1094                 %``Flow study in relativistic nuclear collisions by Fourier expansion of
1095                 %Azimuthal particle distributions,''
1096                 Z.\ Phys.\ C {\bf 70} (1996) 665.
1097                 %  [arXiv:hep-ph/9407282].
1098                 %%CITATION = HEP-PH 9407282;%%
1099                                 
1100                 %\cite{Ackermann:2000tr}
1101                 \bibitem{Ackermann:2000tr}  
1102                 K.~H.~Ackermann {\it et al.}  [STAR Collaboration],
1103                 %``Elliptic flow in Au + Au collisions at s(N N)**(1/2) = 130-GeV,''
1104                 Phys.\ Rev.\ Lett.\  {\bf 86} (2001) 402
1105                 %[arXiv:nucl-ex/0009011].  
1106                 %%CITATION = NUCL-EX 0009011;%%
1107                                   
1108                 %\cite{Adler:2001nb}
1109                 \bibitem{Adler:2001nb}  
1110                 C.~Adler {\it et al.}  [STAR Collaboration],
1111                 % ``Identified particle elliptic flow in Au + Au collisions at  
1112                 %s(NN)**(1/2) =  130-GeV,''
1113                 Phys.\ Rev.\ Lett.\  {\bf 87} (2001) 182301  
1114                 %[arXiv:nucl-ex/0107003].  
1115                 %%CITATION = NUCL-EX 0107003;%%
1116                                 
1117                 %%% theory RHIC discoveries %%%
1118                 %\cite{Gyulassy:2004zy}
1119                 \bibitem{RHIC_Discoveries}
1120                 T.D.~Lee {\it et al.}, 
1121                 New Discoveries at RHIC: Case for the Strongly Interacting 
1122                 Quark-Gluon Plasma. 
1123                 Contributions from the RBRC Workshop held May 14-15, 2004.
1124                 Nucl.\ Phys.\ A {\bf 750} (2005) 1-171
1125                 %%% end theory white-papers
1126                                 
1127                                     
1128         \end{thebibliography}
1129                 
1130         %-----------------------------------------------------------------------
1131 %       \chapter*{Appendix I}
1132 %       \label{appendix1}
1133 %       Here we put short pieces of code.
1134         %-----------------------------------------------------------------------
1135         \printindex
1136 \end{document}