1 \chapter{A Quick Start}
3 The \textit{ALICE flow package}\footnote{\texttt{http://alisoft.cern.ch/viewvc/trunk/PWG2/FLOW/?root=AliRoot .}}
4 contains most known flow analysis methods. In this chapter we give a few examples how to setup an
5 analysis for the most common cases. The chapters that follow provide more detailed information on the structure of the code
6 and settings of the various flow methods.
7 This write-up is however not a complete listing of the methods, for this the reader is referred to the header files.
10 The macro \texttt{Documentation/examples/runFlowOnTheFlyExample.C}
11 is a basic example of how the flow package works.
12 In this section we explain the main pieces of that macro.
16 To use the flow code the flow library needs to be loaded. In \textit{AliRoot}:\\
17 \texttt{gSystem->Load("libPWG2flowCommon");}\\
18 In \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");}\\
23 \texttt{gSystem->Load("libPWG2flowCommon");}\\
25 We need to instantiate the flow analysis methods which we want to use. In this example we will
26 instantiate 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}),
27 and second the so called Q-cumulant method (see section \ref{qvc}).
28 \texttt{AliFlowAnalysisWithMCEventPlane *mcep} \\
29 \texttt{= new AliFlowAnalysisWithMCEventPlane();}\\
30 \texttt{AliFlowAnalysisWithQCumulants *qc}\\
31 \texttt{ = new AliFlowAnalysisWithQCumulants();}\\
33 Each of the methods needs to initialize (e.g. to define the histograms): \\
34 \texttt{mcep->Init(); }
35 \texttt{qc->Init();}\\
37 To define the particles we are going to use as Reference Particles (RP's, particles
38 used for the {\bf Q} vector) and the Particles Of Interest (POI's, the particles of which
39 we calculate the differential flow) we have to define two trackcut objects:\\
40 \texttt{AliFlowTrackSimpleCuts *cutsRP = new AliFlowTrackSimpleCuts();}\\
41 \texttt{AliFlowTrackSimpleCuts *cutsPOI = new AliFlowTrackSimpleCuts();}\\
42 \texttt{cutsPOI->SetPtMin(0.2);}\\
43 \texttt{cutsPOI->SetPtMax(2.0);}\\
45 Now we are ready to start the analysis.
46 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. \\
47 \texttt{for(Int\textunderscore t i=0; i<nEvts; i++) \{}\\
48 \texttt{ // make an event with mult particles }\\
49 \texttt{ AliFlowEventSimple* event = new AliFlowEventSimple(mult,AliFlowEventSimple::kGenerate);}\\
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++)}\\
61 To fill the histograms which contain the final results we have to call Finish for each method:\\
62 \texttt{ mcep->Finish(); } \texttt{ qc->Finish(); }\\
64 This 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();}\\
69 \section{What is in the output file?}
70 Now we have written the results into a file, but what is in there?
72 \section{Reading events from file}
73 The macro \texttt{Documentation/examples/runFlowReaderExample.C} is an example how to setup a flow analysis if the events are already generated and
74 for example are stored in ntuples.
76 \section{A simple flow analysis in ALICE using Tasks}
77 The macro \texttt{Documentation/examples/runFlowTaskExample.C} is an example how to setup a flow analysis using the full ALICE Analysis Framework.