]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/FLOW/Documentation/chapters/QuickStart.tex
Moving/split PWG2/FLOW to PWGCF/FLOW, PWG/FLOW/Base, PWG/FLOW/Tasks, PWG/Glauber
[u/mrichter/AliRoot.git] / PWGCF / FLOW / Documentation / chapters / QuickStart.tex
CommitLineData
fce173a1 1\chapter{A Quick Start}
2\label{quickstart}
8f5f3809 3The \textit{ALICE flow package}\footnote{\texttt{http://alisoft.cern.ch/viewvc/trunk/PWG2/FLOW/?root=AliRoot .}}
4contains most known flow analysis methods. In this chapter we give a few examples how to setup an
5analysis for the most common cases. The chapters that follow provide more detailed information on the structure of the code
6and settings of the various flow methods.
7This write-up is however not a complete listing of the methods, for this the reader is referred to the header files.
8
9\section{On the fly}
10The macro \texttt{Documentation/examples/runFlowOnTheFlyExample.C}
dd93cf24 11 is a basic example of how the flow package works.
12In this section we explain the main pieces of that macro.
13
14\begin{enumerate}
15\item
16To use the flow code the flow library needs to be loaded. In \textit{AliRoot}:\\
2e311896 17\texttt{gSystem->Load("libPWGflowBase");}\\
dd93cf24 18In \textit{root} additional libraries need to be loaded: \\
19\texttt{gSystem->Load("libGeom");}\\
20\texttt{gSystem->Load("libVMC");}\\
21\texttt{gSystem->Load("libXMLIO");}\\
22\texttt{gSystem->Load("libPhysics");}\\
2e311896 23\texttt{gSystem->Load("libPWGflowBase");}\\
dd93cf24 24\item
25We need to instantiate the flow analysis methods which we want to use. In this example we will
d5e5ac6a 26instantiate two methods: the first which calculates the flow versus the reaction plane of the Monte Carlo, which is our reference value (see section \ref{MC}),
27and second the so called Q-cumulant method (see section \ref{qvc}).
dd93cf24 28\texttt{AliFlowAnalysisWithMCEventPlane *mcep} \\
29\texttt{= new AliFlowAnalysisWithMCEventPlane();}\\
30\texttt{AliFlowAnalysisWithQCumulants *qc}\\
31 \texttt{ = new AliFlowAnalysisWithQCumulants();}\\
32 \item
33 Each of the methods needs to initialize (e.g. to define the histograms): \\
34 \texttt{mcep->Init(); }
35\texttt{qc->Init();}\\
36\item
2d2b680b 37To define the particles we are going to use as Reference Particles (RP's, particles
38used for the {\bf Q} vector) and the Particles Of Interest (POI's, the particles of which
39we calculate the differential flow) we have to define two trackcut objects:\\
dd93cf24 40\texttt{AliFlowTrackSimpleCuts *cutsRP = new AliFlowTrackSimpleCuts();}\\
41\texttt{AliFlowTrackSimpleCuts *cutsPOI = new AliFlowTrackSimpleCuts();}\\
42\texttt{cutsPOI->SetPtMin(0.2);}\\
43\texttt{cutsPOI->SetPtMax(2.0);}\\
44\item
45Now we are ready to start the analysis.
46For 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. \\
47\texttt{for(Int\textunderscore t i=0; i<nEvts; i++) \{}\\
48\texttt{ // make an event with mult particles }\\
87efe45e 49\texttt{ AliFlowEventSimple* event = new AliFlowEventSimple(mult,AliFlowEventSimple::kGenerate);}\\
dd93cf24 50\texttt{ // modify the tracks adding the flow value v2}\\
51\texttt{ event->AddV2(v2);}\\
52\texttt{ // select the particles for the reference flow}\\
53\texttt{ event->TagRP(cutsRP);}\\
54\texttt{ // select the particles for differential flow}\\
55\texttt{ event->TagPOI(cutsPOI);}\\
56\texttt{ // do flow analysis with various methods:}\\
57\texttt{ mcep->Make(event);}\\
58\texttt{ qc->Make(event);}\\
59\texttt{ \} // end of for(Int\textunderscore t i=0;i<nEvts;i++)}\\
60\item
61To fill the histograms which contain the final results we have to call Finish for each method:\\
62\texttt{ mcep->Finish(); } \texttt{ qc->Finish(); }\\
63\item
64This concludes the analysis and now we can write the results into a file:\\
65\texttt{ TFile *outputFile = new TFile("AnalysisResults.root","RECREATE");}\\
66\texttt{ mcep->WriteHistograms();}\\
67\texttt{ qc->WriteHistograms();}\\
68
2d2b680b 69\section{What is in the output file?}
70Now we have written the results into a file, but what is in there?
71
8f5f3809 72\section{Reading events from file}
d5e5ac6a 73The macro \texttt{Documentation/examples/runFlowReaderExample.C} is an example how to setup a flow analysis if the events are already generated and
8f5f3809 74for example are stored in ntuples.
75
76\section{A simple flow analysis in ALICE using Tasks}
d5e5ac6a 77The macro \texttt{Documentation/examples/runFlowTaskExample.C} is an example how to setup a flow analysis using the full ALICE Analysis Framework.
87efe45e 78\end{enumerate}