![]() |
AliPhysics
d497afb (d497afb)
|
Written and adapted for the big screen by Redmer Bertens with excerpts from other manuals, authors of those are mentioned in text. This text is parsed to markdown from the old documentation on the TWIKI page, here and there parsing errors may (probably do) still exist.
What is considered the FLOW package
is all code in
This manual will explain how the framework is designed and how it can be used to do analysis in either ROOT or AliROOT.
The ALICE flow package
[1] contains most known flow analysis methods. The package itself consists of two parts
ALICE
interface to the package and takes care of e.g. track cuts, event cuts, etc;ROOT
and can be used on any type of input data.This manual is designed to get you started with using the flow package. It is written in the following way:
AliPhysics
)’ part of the flow package (i.e. event cuts, track cuts, PID, etc), but it is also explained how to do flow analysis in ROOT
only on a TTree
;What this manual is not designed for is letting the analyzer use the flow package as a ‘black box’. It is supposed to be a starting point, to give an overview of the design of the software and point you to relevant classes, but in the end, the analyzer is responsible for understanding what is happening and using the software in a proper way. Configurations of the package which may work on a technical level (i.e. produce output) do not necessarily mean that the output is what you expect it to be! Always make sure that you understand what you are doing, and when in doubt, browse through the source code or consult an expert. The package is not a static entity, users are encouraged to make additions, be it track cuts, bug fixes, additional analysis methods, etc, etc. If you have suggestions, questions, commit requests, send an email to the flow-pag mailing list or to rbertens @ cern
.
We’ll begin with a hands-on exercise in which you’ll get acquainted with some aspects of the flow package in a few minutes. We’ll do this by generating a few simple toy Monte Carlo events and performing a flow analysis on these simulated events without writing them (the events) to disk, a so called ‘flow analysis on-the-fly’[2].
The steps which will be followed in this example will be the same as the steps we take when performing an analysis on data[3]:
(Ali)ROOT
session by loaded the necessary librariesIn this Monte Carlo exercise, the flow event class will not receive data from a detector, but instead generate toy events itself.
We will now go through these step one-by-one. All the code that is used can also be found in the macro runFlowOnTheFlyExample.C
[4].
(Ali)ROOT
:Particles will be selected as either POI or RP depending on whether or not they pass these cuts.
Now we are ready to start the analysis. For a quick start we create a toy Monte Carlo event, tag the reference particles and particles of interest (which means that, if a particle passes the POI or RP cuts, it is flagged as ‘POI’ or ‘RP’) and pass it to the two flow methods.
Since we want to analyze more than one event, this step is performed in loop. First define the number of events that need to be created, their multiplicity, and a value v2 value, which can either be supplied as a fixed number (no pT dependence) or a function (to generate pT differential flow[5]
Now we have all the ingredients to our first flow analysis
Please note that this will create a new output file, and overwrite any existing file called AnalysisResults.root
.
Note that AnalysisResults.root
is the default name given to analyses in AliROOT
. Many macros in AliROOT
will expect a file AnalyisResults.root
as input, so for most users it will be convenient to follow this convention.
When done with running the analysis, do not forget to write the file to disk by calling
Now we have written the results into a file, but what is in there?
Although the output of different flow analysis techniques might differ slightly as a result of their different approaches at estimating v2, the output files containers are always constructed in a similar way.
Objects of two types are stored in the output of the flow analysis[6]
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:This information is from the header file of the AliFlowCommonHist object[7]
AliFlowCommonHistResults
is an object designed to hold the common results of the flow analysis[8]. The possible common histograms stored in this object areThe 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 ROOT’s TBrowser
.
The AliFlowCommonHist
and AliFlowCommonHistResults
classes are derived from the generic TNamed
ROOT
object and can be written to a ROOT
file. The flow analysis tasks will, as output, write the complete AliFlowCommonHist
and AliFlowCommonHistResults
objects to file at the end of an analysis. To read the content of these objects, the libPWGflowBase
library must be loaded in your ROOT
session.
A convenient way of comparing the results of the different flow analysis strategies that have been used is invoking the macro compareFlowResults.C
[9]. This macro will read the analysis output file 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 data-set that we have just generated, simply do
The basic idea behind the flow package is that from whatever input you have, a 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 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 `Examples` gives a step-by-step example of doing a π ± v2 analysis in the AliROOT
analysis framework.
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 AliFlowEventSimple
object). This flow event holds a collection of flow tracks (AliFlowTrackSimple
objects) which are passed to flow analysis methods. The only steps of this flow chart which depend on AliROOT
libraries are the ones handling ALICE
data types (the ESDs or AODs). The rest of the analysis chain (the AliFlowEventSimple
and the analysis methods) have no specific AliROOT
dependence and are just simple c++
objects. Therefore, the flow package is split into two libraries
AliROOT
dependencies. This library holds objects such as the AliFlowEventSimple
and AliFlowTrackSimple
, and analysis methods classes. The analysis methods classes follow the naming scheme: `AliFlowAnalysisWith* where * denotes a specific analysis method. All classes which end up in the shared object can be found in $ALICE_PHYSICS/PWG/FLOW/Base
;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 AliROOT
specific classes. This ranges from classes to read the AOD or ESD input data (important examples are the AliFlowEvent
and AliFlowTrackCuts
, which will be discussed later on in this chapter) and the AliAnalysisTask\*
classes, which are analysis tasks, derived from AliAnalysisTaskSE
which can be used in the AliROOT
analysis framework and are actually just interface classes to the underlying flow analysis methods of libPWGflowBase. The classes which are bundled into the shared object can be found in $ALICE_PHYSICS/PWG/FLOW/Tasks
;Some tools, such as the flow event or track cuts, have a ‘base’ component which name ends with the suffix ‘simple’, and an ‘tasks’ (AliROOT
) component which does not have this suffix. The ‘tasks’ class in these cases inherits from the ‘base’ class.
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. In the next section it will be explained how the flow event can be filled with ALICE
data in the AliROOT
analysis framework. The section after that will explain how the flow event can be filled with any type of data using just ROOT
In this section, you will see how a flow analysis can be performed in the AliROOT
analysis framework.
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 reference particles (or RP’s), which are particles that are used to build the Q vector(s), and particles of interest (or 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!
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 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 v2(p*t*) and then retrieve the same v2(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.
Filling a flow event from data can be performed either ‘by-hand’ (which is covered in section `Exotic` on more exotic analyses), but the most commonly used method of filling a flow event in the AliROOT
analysis framework is using the dedicated task AliAnalysisTaskFlowEvent
.
The idea behind this is the following:
AliAnalysisTaskFlowEvent
task to receive input events (e.g. AODs
, ESDs
, MC
, …;AliAnalysisTaskFlowEvent
;AliAnalysisTaskFlowEvent
will convert the tracks of each input event to a set of AliFlowSimpleTracks
. Depending on whether or not a track passes the track selection for POI’s or RP’s, the AliFlowSimpleTrack
is labeled as a POI or RP (or both. In the case where a track does not meet any of the track selection criteria, it is omitted from the AliFlowSimpleTrack
collection and not added to the flow event);AliFlowSimpleTracks
are added to the flow event which is passed to the flow analysis methods.When using the AliAnalysisTaskFlowEvent
task to create your flow event, the AliAnalysisTaskFlowEvent
task is responsible for ensuring that only good quality tracks enter into your analysis by making sensible track selections. The first step however at safeguarding track quality is making sure that the events that are accepted by AliAnalysisTaskFlowEvent
pass sane event selection criteria.
A certain combination a of detector signals (a trigger) is required for an event to be written to storage. Different types of analyses might require different types of events, and hence, different types of triggers.
You can set a trigger by calling
where offlineTriggerMask
is the trigger mask corresponding to the desired trigger. A list of all available triggers, with a short descrption, can be found in the header file of the AliVEvent
class[10]. This function, however, is not implement in the AliAnalysisTaskFlowEvent
itself, but rather in the base class of which most of the analysis task classes within AliROOT
are derived: the AliAnalysisTaskSE
class (which is designed to handle a single event, hence the suffix ‘SE’). For each event that is written from a file, but function AliAnalysisTaskSE::Exec()
is called, which - among other things - checks if an event passes the requested trigger selection, and if so, calls the UserExec()
function of your analysis task. In the case of the AliAnalysisTaskFlowEvent
this is the AliAnalysisTaskFlowEvent::UserExec()
, which creates AliFlowSimpleTracks
and fills the flow event.
A general remark about trigger selection in flow analyses is that the non-uniform acceptance correction methods that are implemented in the flow package assume a flat Q vector distribution. Specific triggers (e.g. EMCal triggers) result in a Q vector bias which should not be corrected as they invalidate that assumption. A safe approach is therefore using a minimum bias trigger for your analysis (such as AliVEvent::kMB
), other triggers selections will not a-priori lead to problems, but use them with caution!
In addition to trigger selection, generally one wants to perform additional event (quality) selection. The flow package contains an event cuts class which can be used to perform event selection, the AliFlowEventCuts
object[11].
To use the event cuts object in combination with the AliAnalysisTaskFlowEvent
task, simply create the event cuts object, configure it and pass it to the AliAnalysisTaskFlowEvent
:
The available cut parameters in the flow event cuts object are
all of which are accessible via dedicated setters,
Some caveats and remarks about using the event cuts object
Default behavior By default, the event cuts object accepts all events. All desired cuts have to be set by the user. This is also reflected in the design of the setters: most of the setters will, when called, set a Bool_t
to true which enables a cut on a certain parameter;
Applicability of cuts to different data types Not all the cuts can be applied to all input data types. In e.g. the process of filtering AODs
from ESDs
, ‘technical’ event cuts are made and not all events are stored in the AOD
format. Because of this, information that can be required from ESDs
might not be available (as it is not necessary) in AODs
. To see whether or not a cut you set is actually applied to the data type you’re using, take a look at
This function determines whether or not an event is accepted: it starts by converting the virtual event type that is passed as argument to either an ESD
or AOD
event, and goes through selection criteria accordingly.
Event cuts outside of the AliAnalysisTaskFlowEvent
class When you perform a flow analysis without using the AliAnalysisTaskFlowEvent
class (which is done e.g. in the analyses explained in section `Exotic`, you can still use the event cuts class by creating an instance of the object, passing it to your analysis class and ‘manually’ checking the return value of the function
Data taking period Most event cuts will be tuned specifically to the LHC10h or LHC11h data taking periods. The event cuts class might need to be updated to accommodate specific cuts for different periods - do not hesitate write patches for this!
for e.g. each event that is passed to your ::UserExec()
function.
As explained in the previous subsection, flow events are filled with tracks which fulfill certain track selection criteria. These criteria are checked using the AliFlowTrackCuts
class. The AliFlowTrackCuts
class can handle different types of input from different data-types (e.g. ESD
or AOD
) and information from different sub-detector systems. All input is in the end converted to AliFlowSimpleTracks
which are added to the flow event. To understand how the AliFlowTrackCuts
object works and how it should be configured, it is good to make a few distinctions and remarks.
The term ‘track’ is generally used for reconstructed particle trajectories which are constructed from information coming from the tracking detectors in central barrel of the ALICE
detector (more specifically from information from the ITS
and TPC
detectors). Tracks are the most commonly used data source, and the translation from ‘track’ to AliFlowTrackSimple
is trivial, as it merely comprises copying kinematic information (p*t*, *φ*, *η*) from the barrel track to the AliFlowTrackSimple
object.
When using information that is not coming from tracking detectors, e.g. information from the VZERO
system, this procedure of simply copying variables is not suitable as the VZERO
system does not measure p*t*, *φ*, *η* of particles, but is an array of scintillators with limited spatial resolution. Nevertheless, the AliFlowTrackCuts
class converts the VZERO
signal to AliFlowTrackSimples
which are, to the flow event, indistinguishable from barrel tracks. As the procedure of accepting these tracks is very different from the procedure of accepting barrel tracks, they will be treated separately in the following subsections.
The safest and most convenient way of using ESD
tracks as a data source is by using one of the pre-defined track cuts sets that are available in the AliFlowTrackCuts
class. These sets of track cuts mimic the cuts that are defined in the AliESDtrackCuts
class[12]. The following default track cuts sets are available:
All these are static methods which create a new track cuts object and configure it properly, so to use these track cuts it suffices to type e.g.
To get a better understanding of what the AliFlowTrackCuts
class actually does, let’s take a look at what how the cut object is configured in this case:
The configuration falls into three categories:
AliFlowTrackCuts::SetParamType()
(in this case to AliFlowTrackCuts::kGlobal
). This last step is of particular importance as it takes care disentangling the POI and RP selection and removing a v*n* bias due to auto-correlations. When the flow event is filled (the relevant piece of code is printed under section `Fill, a check is done to see if the POI’s and RP’s are of the same type. If not, a track cannot be a POI and RP at the same time (as they are from different sources). However, if POI’s and RP’s originate from the same source, an AliFlowTrackSimple
can be both a POI and RP at the same time if it satisfies both the POI and RP track selection criteria. By specifying the parameter type by calling AliFlowTrackCuts::SetParamType()
the flow event is configured to properly deal with overlapping or exclusive POI and RP selections. A wrongly configured parameter type can lead to double counting of tracks and nonsensical analysis results! The following list of track parameter types is available as an enum
in AliFlowTrackCuts.h
Note that kV0
is reserved to denote a decay vertex of a neutral particle, and kVZERO
is used to indicate the VZERO detector system. kUserA and kUserB are additional flags which can selected for ‘custom’ track selection sets.
AOD
tracks are derived from ESD
tracks via process called ‘filtering’. If an ESD
track meets a pre-defined set of track cuts, it is converted to an AOD
track which is stored in an AOD
event. The AOD
track carries a specific flag (called filterbit
) which corresponds to the specific set of cuts that was applied to create accept the track. A full list of track selection criteria corresponding to distinct filterbits can be found [here](). Note that different AOD
productions might have different filterbit definitions!
In AOD
analysis it generally suffices to select tracks of a certain filterbit, instead of checking quality criteria ‘by-hand’ as is done in ESD
analyses (some variables which one would cut on in ESD
tracks might not even be available in the AOD
tracks as the AOD
is designed to be a light-weight ‘end-user’ data format). To get an instance of the AliFlowTrackCuts
object which only selects tracks based on a specific filterbit, one can call
which is defined as
The SetMinimalTPCdedx(-999999999);
is kept here for backward-compatibility.
Note that also in the case of analyses the parameter type is set to (if necessary) decouple POI and RP selections.
As stated, input data needn’t necessarily come in the form of barrel tracks - we can use other detector systems as well. When dealing with barrel tracks, quality criteria might not be the only thing you want to select your tracks on: perhaps you want to do analysis on identified particles. The following sub-sections explain how the AliFlowTrackCuts
object can be used to achieve this.
The AliFlowTrackCuts
object can do particle selection for a number of particles that are defined in the AliPID[13]. To enable particle identification as a selection criterion, call the function
The first argument specifies the particle species that will be selected via the EParticleType
enum. The total list of particles as defined in the AliPID
class reads
Note that not all these particles may be available for selection via AliFlowTrackCuts
!
The second argument tells the AliFlowTrackCuts
class which particle identification method should be used. The available methods are
The third argument (with a default value of 0.9) gives the analyzer control over the purity of the particle sample by setting a lower bound on the probability that a particle is of a certain species (where 0 would mean no selection and 1 -theoretically - means a 100% pure sample). To see how - and if - this parameter is used in a certain identification routine, take a look at the source code.
The best way of understanding how particles are identified is by just browsing the relevant pieces of the code in the AliFlowTrackCuts.cxx
file (look at the list of Passes\*Cuts()
, but to give a very short overview:
kTPCpid Return particle identity as stored in the AliESDtrack
, TPC information only;
kTOFpid Return particle identify as stored in the AliESDtrack
, TOF information only;
AliESDtrack
,AliESDtrack
;AliFlowTrackCuts
class does its selection. To enable the PID response task, add the following lines to your run macro:The default value for nσ is 3, but it can be set to a different value using
Applicability of cuts to different data types Just as not all event and track cuts that are available for all data types. For the track quality cuts this has been explained in the previous subsections, but one has to realize that in addition, not all particle identification methods are available for all types of data. At the time of writing, the ESD
particle identification is more elaborate than the AOD
counterpart. To see which PID methods exist for the different data types, check the AliFlowTrackCuts::Passes\*pidCut()
functions, printed below for your convenience.
In general, particle identification is not a trivial procedure, and one needs to find a balance between purity and efficiency. Which particle identification to choose depends heavily on the desired outcome of the analysis. In case of e.g. a high-precision measurement of π v2, a method which has a very high purity but low efficiency can be chosen: π’s are an abundant particle species and high precision requires high purity. On the other hand, if one does selection for kaons to reconstruct *φ*-mesons, loose cuts with high efficiency can be chosen, as the φ-meson is a rare probe and invariant mass requirements on the kaon pairs will take care of mis-identifications.
To get access to QA information on track selection before and after PID cuts, the QA mode of the AliFlowTrackCuts
can be selected.
Track cuts outside of the AliAnalysisTaskFlowEvent
class Just as the flow event cuts can be used outside of the AliAnalysisTaskFlowEvent
class, one can use the AliFlowTrackCuts
class in a similar way, by calling, for each track,
or directly one of the PassesCuts(\*)
functions which IsSelected()
calls.
Now that the barrel tracks have been explained, let’s continue to the treatment of VZERO information. The VZERO detector consists of two scintillator arrays at opposite sides of the interaction point (VZEROA and VZEROC) each containing 32 readout channels. To convert the VZERO information to AliFlowTrackCuts
, two steps are taken:
As there is no straightforward way to convert VZERO multiplicity to p*t*, the VZERO signal can in principle not be used as POI in the flow analysis, neither can a p*t* range be selected when using the VZERO as RP selection. In addition to this, the ‘raw’ VZERO signal itself cannot be used directly for flow analysis but needs to be calibrated tile-by-tile. To understand how this calibration is performed in the flow package, we need to go into a little bit of detail on how to build a Q vector.
In general, a Q vector is defined as Q = ∑trackswiexp(inφ) where wi is a track weight, n is the harmonic, and φ is the azimuthal angle of a track. As explained, in the case of VZERO tiles, φ is derived from the position of the VZERO tile and wi is the VZERO signal which is proportional to multiplicity. However, not all VZERO tiles are equally sensitive, and the sensitivity (can have) a run-number dependence, which results in a non-flat VZERO Q vector distribution. As this effect might be different run-by-run, it cannot be corrected by applying a non-uniform acceptance correction at the end of your analysis, as an analysis generally comprises running over multiple run-numbers and the non-uniform acceptance correction corrects only for non-uniformity which is equal for all runs. Hence, the VZERO non-uniformity needs to be corrected at the time of the construction of the Q vectors.
The functions in the flow package which are responsible for building the Q vectors (or sub-event Q vectors, the use of which will be described in subsection `Scalar Product` are
These functions are called by the flow analysis tasks and generally not by the user directly, but it is good to know where they can be found. The first two functions merely loop over all tracks in a flow event and fill the Q vector. The last function is designed for building a Q vector from VZERO information, applying a calibration step to the VZERO signal. To make life complicated, the calibration of the VZERO Q vector in LHC10h is not the same as the calibration of the VZERO Q vector LHC11h data. Let’s start by taking a look at the LHC10h case.
LHC10h The calibration of LHC10h data is a two-step procedure.
TProfile
with average multiplicity per cell (these profiles are stored in a OADB
file for each run-number)Note that the calibration is only available for n = 2 and n = 3. For higher harmonics, the flow package will use the equalized VZERO multiplicity
to build the Q vectors, whether this is satisfactory for an analysis, or if non-uniform acceptance effects can be reverted by performing a correction on a run-by-run basis is up to the analyzer. The Q vector distributions of total Q vectors and sub-event vectors can always be checked via the AliFlowCommonHists
classes (see section `Common Hists` via
LHC11h The calibration of the LHC11h VZERO information is not performed by the flow package, but by an external class, name the VZEROEPselection task, which will store the corrected Q vectors in the AliVEvent header, from which they are retrieved by the AliFlowTrackCuts class. To use this method, make sure that you run this VZEROEPselection task before your flow analysis tasks in an analysis train. To enable this task, add the following lines to your analysis macro
Note that for LHC11h data, calibration is performed only for the second harmonic (n = 2). For higher harmonics, the flow package uses equalized VZERO multiplicity to build Q vectors (as indicated for the LHC10h data).
After describing how and why calibration is performed, it is now time to indicate how to set up this calibration routine. Just as selecting barrel tracks, this can be done by creating an AliFlowTrackCuts
object via a static
access method,
At run-time, the flow package will detector whether LHC10h or LHC11h data is used by reading the analyzed events’ run-number. This can be convenient when having these cuts defined in a script which is designed to run on multiple types of input data. However, one can also call the LHC10h or LHC11h specific cuts directly via dedicated functions, which are reprinted here as the comments are important
Using the VZERO as reference detector in a flow analysis certainly has its benefits (such as suppressing the non-flow contribution to the v*n* signal) but a few remarks have to be made
Applicability to flow analysis methods As the calibration affects the information that is returned by the function
only flow analysis methods which call this function (and thus use sub-events) can use the calibrated VZERO signal. Most notably, this is the scalar product method. In combination with this, one should keep in mind that the two VZERO detectors have different *η* coverage. For the recent ALICE
paper on the flow of identified particles, the scalar product method with VZERO sub-events was used, where the two VZERO detectors comprised the two sub-events. For more information on this, take a look at the description of the scalar product method in subsection `Scalar Product`.
VZERO as RP source The VZERO signal should only be used as source for reference flow. Although technically there is no objection to using the VZERO signal as POI’s (you will probably get output) there is no guarantee that this makes sense from a ‘physics’ viewpoint;
Tuning of the calibration The calibration in the LHC11h data is taken from an external class and therefore, as far as the flow package is considered, as-is (although the calibration can be disabled). The LHC10h calibration however is done within the package, and can be tuned quite a bit.
Tuning the calibration is done by functions of the AliFlowTrackCuts
class. Some of these functions apply to both LHC10h and LHC11h data but can have slightly different effects:
Be warned however: the databases which are read during the calibration however are tuned to the combination of re-weighting of all rings with re-centering. Changing this combination might lead to biases in the Q vector distribution, so: playing with the calibration settings might be interesting for e.g. evaluating systematic uncertainties, but keep an eye on the control histograms!
<a name="trackweights>
When it is a-priori know that a track sample needs to be weighted in φ, η or pT (e.g. to correct for a non-uniform acceptance bias in azimuth by using weight which are inversely proportional to the azimuthal track distribution) histograms with weight distributions can be supplied to the flow package. The weights are supplied to flow analysis tasks, which then apply these weights by passing them to the Q
vector calculation functions which are printed in the previous subsection.
The weights have to be supplied as TH1F
objects (or objects which can be dynamically cast to a TH1F
encapsulated in TList
. The histograms have to have specific names: phi_weights
for φ weights, pt_weights
for pT weights and eta_weights
for η weights. The binning of the histograms is not important, as long as bins are of equal width. The weights are disabled by default and have to be passed to specific flow analysis tasks (as not all tasks support weights) via
and are applied to total Q
vectors and sub-event Q
vectors.
The tasks which support weights are
For details on how the weighting is implemented (and defined) the user is referred to the specific Q
vector evaluation functions given in the previous subsection.
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 pT ranges of histograms, the number of bins, etc, etc - all flow analysis methods initialize their output containers using variables from a static (global) instance of the AliFlowCommonConstants
class. This object, which can be obtained via the a static function
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
will result in an analysis which is performed in 100 p*t* bins of 0.1 GeV/*c* width. The full set of histogram sizes and limits that can be set is
via the setters
Note that the common constants object is static
, meaning that, within a process (e.g. an analysis train) just one instance of the object is created. The histogram limits and sizes that are set via the common constants object therefore affect all histograms within an analysis chain.
Both the AliFlowCommonHist
and AliFlowCommonHistResults
classes do not only contain (pointers to) histograms and profiles, but also have a collection of ‘getters’[14] which you can use to retrieve histograms of profiles using the ROOT
command line in stead of the TBrowser
, which may come in handy when one needs to read the output of the flow analysis tasks in a macro.
Using the output file that was generated in the example given in the previous sections of this chapter, reading the objects of the common histogram classes is done in the following way. First, start an (Ali)ROOT
session, and load the prerequisite libraries,
Then, open the analysis file and grab the common histogram objects
The TList
that you have just obtained holds not only the common histogram objects, but can also hold additional information that has been added to the analysis output by a specific flow analysis task. To read the entire content of the TList
, you can type
However, in this example we want to retrieve the common histogram objects. To do so, type
Once you have retrieved the pointers to the AliFlowCommonHist
or AliFlowCommonHistResults
objects, you can use the getters to retrieve a histogram. To e.g. draw the *η* distribution of POI’s, type
The following getters are available in AliFlowCommonHist
and in AliFlowCommonHistResults
To e.g. test your analysis setup, an ‘afterburner’ can be called which adds user-defined flow to (isotropic) events. Two afterburner techniques are implemented.
The first technique injects differential v2 into events, using the following steps: As a starting point, an isotropic distribution of tracks is used $$\frac{dN}{d\varphi_0} = \frac{1}{2 \pi}.$$ Adding a periodic azimuthal modulation, this is translated to $$\frac{dN}{d\varphi} = \frac{1}{2\pi}\left( 1 + v_2 \cos \left[ 2 \left( \varphi - \Psi \right) \right] \right)$$ which can be re-written as $$\frac{dN}{d\varphi} = \frac{dN}{d\varphi_0}\frac{d\varphi_0}{d\varphi} = \frac{1}{2\pi}\frac{d\varphi_0}{d\varphi}$$ so that for each track the following equation can be solved by Newton-Raphson iteration $$\varphi = \varphi_0 - v_2 \sin \left[ 2 \left( \varphi - \Psi \right) \right]$$
The second option is adding integrated vn by sampling the azimuthal distribution of an event from a Fourier series $$\frac{dN}{d\varphi} \propto 1 + \frac{1}{2} \sum_n v_n \left( n \Delta \varphi \right).$$
In the ‘quick start’ of this manual you have already see how you can generate flow events with a certain v*n* value by generating flow events by hand. The afterburner routine can also be called from the AliAnalysisTaskFlowEvent
via the functions
To introduce non-flow effects to using the afterburner, tracks can be cloned. To clone, for each event, a given number n of tracks, enable the afterburner and call
Effectively this will result in n tracks appearing twice in the track sample, mimicking the effects of e.g. resonance decays of track splitting on v*n*.
The best way of getting familiar with the flow package is perhaps browsing the source code, but it can be difficult to find a good starting point for this. Two relevant pieces of code have been selected here which are at the heart of the flow package:
This function is called for each event.
This function fills the flow event with AliFlowSimpleTracks
. One important thing to notice here, is that both POI’s and RP’s are stored in a common array of flow tracks, internally only referred to as POI’s. What distinguishes the POI’s and RP’s is their type: RP’s are stored as type 0 POI’s, and POI’s are stored as non-zero type POI’s (where nonzero means 1, 2, 3 ...).
Many of the classes which are described in the previous section deal with ALICE
data (e.g. event and track selection). Generally, this data is analyzed in ALICE
analysis framework. This framework is setup in the following way
analysis manager
is created;.xml
files which point to data on GRID
storage elements);In this case of the flow package, the most common way of using this framework is
AliAnalysisTaskFlowEvent
;AliROOT
interface to the generic flow analysis tasks.All analysis tasks that are called by the analysis manager have to be derived from a common class, the AliAnalysisTaskSE
[15] (where the suffix ‘SE’ stands for ‘single event’). AliAnalysisTaskSE
has a few virtual functions which can be called in user tasks by the analysis manager at specific times. Most notably these are
UserCreateOutputObjects This function is called before the analysis starts;
UserExec This function is called for each event;
Terminate Called at the end of the analysis (after the last event has been processed).
So, why is this important for the flow package? As said, the analysis manager can only handle tasks that derive from AliAnalysisTaskSE
. Therefore, all flow analysis in the flow package consist of two classes:
AliAnalysisTask * These can be found in the ‘tasks’ directory of the flow package and are derived of AliAnalysisTaskSE
. These classes interface with AliROOT
;
AliFlowAnalysisWith * These can be found in the ‘base’ folder of the flow package and perform the actual flow analysis.
In chapter `On The Fly` of this manual, you have seen that, using just the AliFlowAnalysisWith\ast
class, a flow analysis basically follows the path
Init()
: called once to initialize the task and histograms;Make()
: called for each event, does the analysis;Finish()
: wrap up the analysis.When doing the analysis in the analysis framework, you will not use the AliFlowAnalysisWith\*
class, but instead use the AliAnalysisTask\*
which calls the AliFlowAnalysisWith\*
class for you via the calls from AliAnalysisTaskSE
. To be more specific:
Init()
is called in UserCreateOutputObjects()
;Make()
is called in UserExec()
;Finish()
is called in Terminate()
.All of this may still seem a bit abstract at this point, but in principle you now know all you need to know about the structure of the flow package. It is recommended however that you take a look at the example in `Examples`, to get a step-by-step explanation of how these things work in the real world.
As explained in `On The Fly` and in the previous subsection, a flow analysis is finished by a call to Finish()
. Although the exact implementation of Finish()
is different for each flow analysis method, the general principle method in most methods is that calculations on event-averaged values are performed to end up with a final value for an observable.
When an analysis is run in parallel on many nodes (e.g. when running on GRID
) the output of the flow analysis tasks in AnalysisResults.root
is typically wrong, as merging files via ROOT’s
TFileMerger
will trivially sum up results in all histograms.
The redoFinish.C
[16] macro re-evaluates all output that cannot trivially be merged and re-calls the Finish()
method. To use redoFinish.C
, make sure your analysis output file is called mergedAnalysisResults.root
and simply run the macro
redoFinish.C
will produce a new AnalysisResults.root
file with the corrected results by calling the ::Finish()
function on all known output structures in the mergedAnalysisResults.root
file. Additionally redoFinish.C
can be used to repeat the call to ::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).
The macro itself is well documented and lists several options that are available at the time of running:
Flow analysis output is recognized by keywords in output list names (e.g. a Q-cumulant output needs to have the letters ‘QC’ somewhere in the name to be recognized).
When your analysis output is in the form of a merged file, always run redoFinish.C
to get your results!
As an example of how to do a flow analysis using the flow package within the AliROOT
analysis framework, this section will guide you through the process of measuring π ± v2, v3 and v4 step-by-step, using the Q-vector cumulant flow analysis method.
Generally, doing an analysis in the AliROOT
is a ‘two-file process’, where one runs a run.C script in AliROOT
(colloquially referred to as ‘steering macro’), which sets up the analysis framework and takes care of the interface to the analysis GRID
, and calls an AddTask\*.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 AliROOT
command line when doing analysis. We will not run this test on GRID
, but assume that you have some 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. Some of the variables that are set in the code examples below are actually also set by default. This may seem a little bit redundant, but it is done to make the reader aware of the fact that they exist.
A script which contains all the steps described below and should work ‘out-of-the-box’ can be found at $ALICE_PHYSICS/PWGCF/FLOW/Documentation/examples/manual/runFlowOnDataExample.C
.
Preparing the session First, we need to prepare the framework and root session (these steps would go into your run.C macro). Launch AliROOT
and load the necessary libraries
Creating the manager and connecting input data Create an analysis manager and create a TChain
which we will point to the data you have stored locally on your machine
Great, at this point we have created an analysis manager, which will read events from a chain of AliAOD.root files.
The next step will be adding specific analyses to the analysis manager. This is usually done by calling an 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 AddTask\ast.C
macro.
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 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[17]:
Setting up the flow event task The manager and input data are present, so we can create the flow event task and do some basic configuration
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 Q vector distribution. Specific triggers (e.g. EMCal triggers) result in a Q vector bias which should not be corrected as they invalidate that assumption[18].
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
Track selection 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 AliFlowTrackCuts
objects which are passed to the AliAnalysisTaskFlowEvent
task which does the actual selection based on the passed criteria. So, let’s create some track selection objects!
Starting with the RP’s, for which we’ll just use a uniform selection of charged tracks,
The particles in this example of which we want to measure the differential v2 (the POI’s) are the charged pions. To measure the v2 of charged pions, one must of course identify tracks are pions: for this we will use the AliFlowTrackCuts
class. First, we do the basic setup, creating the cut object and setting some kinematic variables:
Once this is done, the particle identification routine is defined. In this example, the particle identification will be done using a Bayesian approach, combining the signals from the TPC and TOF detectors.
Now that the track cuts for both POI’s and RP’s are defined, we can connect them to the flow event task,
Connecting input and output At this point, the event and track cuts have been set and connected to the flow event task. The next step will be connecting the flow event task to the analysis manager (so that it can receive input events) and subsequently connecting the flow event task to flow analysis tasks, so that the flow events can be analyzed by our favorite flow analysis methods.
Flow analysis tasks Now that the flow event task is connected to input data, the flow analysis tasks can be set up:
Launching the analysis With this, the AddTask\ast.C
is concluded. The only thing that is left to do, is (from the run.C
macro) see if all tasks and containers are properly connected and initialized and launch the analysis locally:
As stated at the beginning of this chapter, every flow analysis in the flow package starts by filling the flow event. The flow event base class, AliFlowEventSimple
, is a class in libPWGflowBase
which has no dependencies other than some ROOT
libraries; the same is true for the implementation of the flow analysis methods. This means that when you do not need the AliROOT
interface for e.g. track and event selection, the flow package can be used by just invoking the libPWGflowBase.so
library in ROOT
[19]. The steps that are necessary to use the flow package in a bare ROOT
environment are similar to those explained in chapter `On The Fly`, with the exception that instead of generating events on-the-fly, we need to fill the flow event with information from the source of data which we want to analyze. In the next two subsections we will take a look at how to do a flow analysis on generic data in just ROOT
. To start, pseudo-code of how to setup an analysis on a TTree
will filled with particles be given. This example can be used as a starting point for running the flow package on any kind of input data. After this, we will work through an example of reading and analyzing STAR
data. The last subsection of this chapter will point you to a fully working starting point for doing flow analysis on TTree
’s, which firstly converts data to a TTree
and after this reads the stored TTree
from file and performs flow analysis in it in ROOT
.
In this example, an analysis on a TTree
is performed by deriving a class from the flow event class , MyFlowEvent
, which can read a specific input format (in this case a branchTTree!branch
of a TTree
) and fills the flow event from this input. Of course you can design your task in a different way, but in this section we will stick to that example. Note that the following suggestions are all written in pseudo-code, so copy-pasting it will lead to nothing ...
Let’s start with writing an an event loop. In this example the assumption is made that you have a TTree
with events, called ‘myTree’, which contains a branch holding a TClonesArray
of ‘myParticle’ objects, which contain kinematic information. The ‘myParticle’ class could look a bit like
Note that the members of this class (p*t*, *η*, *φ*, charge) are all the information that an AliFlowTrackSimple
needs to hold.
In the event loop, we’ll retrieve the track array from the TTree
and pass it to your derived flow event class. As we have seen in earlier examples, tracks in a flow event are classified as POI’s or RP’s via track cuts objects. We’ll initialize these classes as well.
So what is ‘the magic’? This is filling your flow event from the TTree
. As we have seen in the previous sections, filling means that need to select our tracks, tag them as POI’s and RP’s, and add them to the flow event. Our derived class, AliFlowEventSimple::MyFlowEvent will take care of this. A possible constructor for this class, which performs the ‘magic’, could look like the following piece of pseudo-code:
That’s it! Following (variations on) these steps, you’ll be able to connect any type of input data to the flow package. Note that compiling the scripts in which you define these steps will be much faster than running your code in the interpreter mode of ROOT
. The next subsection will show these steps in action in the for of a flow analysis on STAR
data.
The following section will show you how to use non-ALICE
data in a realistic example, using events from the STAR
experiment at RHIC
. STAR
data is stored in a TTree
. To use the flow package for flow analysis on this data, the information from the TTree
needs to be converted into an AliFlowEventSimple
. In the specific case of the STAR
data, things are a bit more complicated than in the pseudo-code example given in the previous section. Event- and track-level cuts still have to be applied to the STAR
data, therefore a reader
class is written which reads data from file, applies track and event cuts and converts the STAR
data to ‘star flow events’. This reading is left to a dedicated class, AliStarEventReader
, which reads a TTree
and for each event creates an AliStarEvent
. The AliStarEvent
is a derived class which inherits from AliFlowEventSimple
(similar to the MyFlowEvent
class from the example in the previous subsection). To understand this process a bit better, we’ll take a look at a few code snippets from the relevant classes and macros which are currently present in AliROOT
. A macro which reads STAR
data and performs a flow analysis can be found at $ALICE_PHYSICS/PWGCF/FLOW/macros/runStarFlowAnalysis.C
.
The most important piece of the code snippet printed here is the routine where the AliFlowEventSimple
is formed from the AliStarEvent
. What happens in the AliFlowEventStar
class is the following:
To get started with flow analysis on TTree’s
yourself, a set of example macros and classes is provided at $ALICE_PHYSICS/PWGCF/FLOW/Documentation/examples/manual/ttree
. These classes and macros will guide you through creating a TTree
with data from ALICE
events in the analysis framework, and performing a flow analysis on them using only ROOT
. The example is set up as follows:
AliROOT
) and fills a with kinematic info from AliVEvent
ROOT
) the info and performs a flow analysis with the flow packageAliFlowTTreeEvent
, a simple event classAliFlowTTreeTrack
, a simple track classAs these are helper classes designed to get the user started, they are not compiled by default. The run and read macro will them compile on-the-fly.
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 $ALICE_PHYSICS/PWGCF/FLOW/Documentation/otherdocs/
Scalar Product Method
EventPlaneMethod/FlowMethodsPV.pdf
GFCumulants/Borghini_GFCumulants_PracticalGuide.pdf
Q-vector Cumulant method
QCumulants/QCpaperdraft.pdf
Lee-Yang Zero Method
LeeYangZeroes/Borghini_LYZ_PracticalGuide.pdf
Lee-Yang Zero Method
LeeYangZeroesEP/LYZ_RP.pdf
The structure of this chapter is as follows: of each of the available methods a short description is given in the theory
subsection (for more detailed information, see the papers listed above) followed by details which are specific to the implementation in the subsection implementation
. Caveats, possible issues, etc, are listed in the caveats
subsections.
From the .cxx
of the task:
This method can be used to check what v*n* was generated in an on-the-fly flow study or using the AliAnalysisTaskFlowEvent
with afterburner.
There is no specific information on the implementation here, for details the reader is referred to the source code.
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 (https://twiki.cern.ch/twiki/bin/view/ALICE/FlowPackageHowto). This section is copied from the twiki page (and may therefore overlap with other parts of this manual).
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
Essentially, you have to do two things:
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.
If you have landed successfully, you will get an output AnalysisResults.root, where the results from each method are structured in directories.
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:
Next important remark, if you want to browse through AnalysisResults.root, make sure that in AliROOT prompt you have loaded the FLOW library:
In the AnalysisResults.root, the QC output is stored in “outputQCanalysis”. Just browse there, browse in “cobjQC”, and you will see the directory structure. “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; “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*)” I hope that the names for all other things you might need are self-explanatory. You configure QC method in the steering macro via setters:
You can make QC output lighter by setting
(to book only basic control histograms, and disabling lot of 2D beasts), and
(if not interested in differential flow vs eta ⇒ this will make the final output smaller) 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). 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. 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”. 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. 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.
The scalar product method estimates v*n* directly from Q vectors: $$\label{sp_func} v_n = \frac{\langle u \cdotp Q \rangle }{\sqrt{\langle Q_A \cdotp Q_B \rangle}}$$ The denominator of equation [sp_func] consists of two sub-event Q vectors, **Q*****A* and **Q*****B*. Sub-events are built from RP’s. These sub-event vectors are in the flow package defined as coming from different *η* ranges.
To setup the different *η* ranges, one can use the AliAnalysisTaskFlowEvent
directly by calling
Sub-events can be re-tagged using the filter task, which will be described in section `Exotic`. Internally, the tagging is performed by the function
which should be called when you fill your flow events ‘by-hand’ and want to tag sub-events.
The numerator of equation [sp_func] is the correlator of the POI Q vector (u) and a sub-event Q vector which is generally referred to as the reference detector. In the flow package, this sub-event Q vector is called ‘total q-vector’. The user of the task needs to specify what part of the RP selection (that is, which sub-events) are used as total Q vector. Passing this information to the scalar product task is done in the following way
where the following options are available
In general, one has to be a bit careful with setting up sub-events. Make sure that the combination of reference detector and sub-events is mathematically sound! An example of how to deal with complex setups is given in the next section.
The VZEROA and VZEROC detectors have different *η* coverage w.r.t the TPC, so to evaluate v2 from VZERO-SP, do $$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}}}$$
What is up for debate is the following: how do we defined the POI’s?
In the elliptic flow analysis of identified particles, majority vote has yielded the following:
so that in the end the published points were obtained using $$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}}}$$ Note that this requires running two scalar product tasks in the flow package (one for each reference detector) the output v2 of which was in turn multiplied point-by-point in pT.
By normalizing the Q vectors, the scalar product method is essentially reduced to the ‘classic’ event plane method. Normalization of the Q vectors can be set using
There is no specific information on the implementation here, for details the reader is referred to the source code. Do not confuse this method with the often used Q-cumulant method!
There is no specific information on the theory here, for details the reader is referred to the source code.
There is no specific information on the implementation here, for details the reader is referred to the source code.
There is no specific information on the implementation here, for details the reader is referred to the source code.
There is no specific information on the implementation here, for details the reader is referred to the source code.
There is no specific information on the implementation here, for details the reader is referred to the source code. This method requires two passes over the data. You can take a look at the on-the-fly analysis example macro to see how these two steps can be set up:
There is no specific information on the implementation here, for details the reader is referred to the source code.
Of course this list of flow analysis methods could be extended. Adding a new flow analysis method means developing two classes: a ‘base’ class where the method is implemented and a ‘tasks’ class to interface with the analysis manager. As a starting point, ‘templates’ have been developed, which are just empty base and task classes in the flow package. You can find these at
base $ALICE_PHYSICS/PWG/FLOW/Base/AliFlowAnalysisTemplate.cxx (h)
tasks $ALICE_PHYSICS/PWG/FLOW/Tasks/AliAnalysisTaskTemplate.cxx (h)
This chapter deals with more ‘exotic’ uses of the flow package.
To save resources, it is beneficial to construct analysis trains in which just one flow event is created which is passed to multiple analysis tasks. This can be inconvenient when the different analysis tasks require different POI and RP selections[20]. To overcome this, a filter task, AliAnalysisTaskFilterFE
, has been developed, which can run between the AliAnalysisTaskFlowEvent
and a specific flow analysis task, and can re-tag POI’s and RP’s. The re-tagging is performed by looping over all tracks in an event and checking whether or not these tracks pass a selection of simple cuts. The filter task can only re-tag existing tracks in the flow event, it cannot add new tracks to the flow event. To illustrate the functionality of the filtertask, we’ll take the example of section `Examples` but perform the analysis using different |*η*| windows for RP’s.
The first step towards filtering is setting up the filtering criteria. These are defined using the AliFlowTrackSimpleCuts
object:
All available filtering options in AliFlowTrackSimpleCuts
are:
All cuts are disabled by default.
The second step is constructing the filter class object itself:
Sub-events can also be re-defined using the filter task. To do so, call
If yo use the filter task for a flow analysis method which uses sub-events, make sure that you set the correct *η* ranges! Otherwise, the default values will be used, which may (or may not) be correct for your analysis.
The UserExec()
of the filter task is as follows:
Now that the filter task has been configured, it needs to be added to the analysis chain. As stated, the task needs to be put in between the flow event task and the flow analysis method.
Note that the filter task will change the tags of the flow tracks in the flow event. Every analysis task that runs after the filter task in an analysis train will therefore be affected by the re-taggging that is performed by the filter task. Often it can be useful to run multiple filter tasks with different configurations in an analysis train.
One notable case in which the filter task is useful, is the flow analysis of rapidly decaying particles via the invariant mass method. If a particle decays to daughter particles, e.g. Λ → *π* + *p* one can do an invariant mass flow analysis, which basically comprises
Under the assumption that signal and background flow are additive, their contributions can be disentangled by solving $$v_2^{T}(m_{inv}) = v_2^{S} \frac{N^{S} }{N^{S} + N^{B}}(m_{inv}) + v_2^{B}(m_{inv}) \frac{ N^{B}}{N^{S} + N^{B}}(m_{inv})$$ for v2*S*. To do so, v2*T*(m*i**n**v*) must be measured. This can be done by measuring the v2 of all possible *π* + *p* pairs in different invariant mass intervals. When a flow event is filled by-hand with *π* + *p* pairs, the filter task can then be in turn be used to split the flow event into invariant mass intervals and perform flow analysis on those separately, thereby extracting all necessary information. Examples of such analyses are e.g. the $\varhi$-meson flow analysis ($ALICE_PHYSICS/PWG/FLOW/Tasks/AliAnalylsisTaskPhiFlow
) or the Λ and K0 flow task ($ALICE_PHYSICS/PWG/FLOW/Tasks/AliAnalysisTaskFlowStrange
).
In practice a detector can have inefficiencies which result in a non-uniform acceptance which might bias the measured vn signal. One way of compensating for this is using track weights (as explained in section `Track Weights`. Another way of correcting for these effects is by adjusting the Q
vectors based on the assumption that the underlying Q
vector distribution itself is flat.
By default all necessary information to perform such a correction is stored when running a flow analysis task. The actual correction itself is performed when Finish()
is called, depending whether or not the flag to perform the correction is set to kTRUE
.
The effects of the acceptance correction can always be checked by running the redoFinish.C
macro, by toggling the flag
Bool_t bApplyCorrectionForNUA = kFALSE; // apply correction for non-uniform acceptance
to either false or true.
The non-uniform acceptance correction is based on the assumption that the physical Q
vector distribution in your event sample is flat. This works for minimum bias events, but might not work for e.g. triggered events or for event samples where the detector efficiency varies event-by-event. Details pertaining to the implementation can be found in the Finish()
methods of the various flow analysis tasks.
After reading the documentation, you should have a general feeling of how the flow package is organized and be able to do a standard flow analysis. This however is just where the fun begins! Connect your classes, write a new method, add new routines ⋯ and publish your paper!
99
[1] The ALICE
flow package is part of AliROOT
, the ALICE extension of the ROOT
framework, which can be obtained from http://git.cern.ch/pub/AliRoot. The flow package itself is located in the folder $ALICE_PHYSICS/PWG/FLOW/
, where $ALICE_PHYSICS
refers to the source directory of AliROOT
.
[2] In this example the AliFlowEventSimple
class will be used to generate toy events (which is described in detail in section `Program`).
[3] In data, some of these steps are actually taken care of by an analysis task, but this will be described in more detail in the next chapter.
[4] In aliroot, this macro can be found at $ALICE_PHYSICS/PWGCF/FLOW/Documentation/examples/manual/runFlowOnTheFlyExample
[5] The on the fly event generator is not limited to the generation of the second harmonic v2, but to get started, this is a nice example.
[6] Make sure that libPWGflowBase.so
is loaded in your (Ali)ROOT
session, otherwise these objects will be unknown.
[7] The headers of both output objects can be found in $ALICE_PHYSICS/PWG/FLOW/Base/
.
[8] The word common here is used to indicate histograms that hold observables which are evaluated in all flow analysis methods. Specific analysis methods may however store additional histograms which are not covered in this list!
[9] $ALICE_PHYSICS/PWGCF/FLOW/macros/compareFlowResults.C
[10] $ALICE_PHYSICS/...
[11] $ALICE_PHYSICS/PWG/FLOW/Tasks/AliFlowEventCuts.cxx
[12] $ALICE_ROOT/ANALYSIS/AliESDtrackCuts.cxx
[13] $ALICE_ROOT/STEER/STEERBas/AliPID.h
[14] A ‘getter’ in this manual will be used to describe a function of the form Get\*()
which returns a (pointer to) a member of a class and is used to interface with the class.
[15] This section is very brief an incomplete, but keep in mind that this is a flow package manual, and not an AliROOT
tutorial.
[16] $ALICE_PHYSICS/PWGCF/FLOW/macros/refoFinish.C
[17] In the example macro this is a not necessary as you already have a pointer to the manager in your macro. However, if you split the macro into a steering macro and AddTask macro, the AddTask macro needs to retrieve a pointer to the manager which is created in the steering macro.
[18] The actual event selection based on triggers is done in the AliAnalysisTaskSE
class (to be specific, the trigger is checked in AliAnalysisTaskSE::Exec()
) from which the AliAnalysisTaskFlowEvent
is derived. The full set of available triggers can be found in the virtual event header AliVEvent.h
.
[19] A makefile to compile the libPWGflowBase.so
library from the command line will be added to $ALICE_ROOT/PWGCF/FLOW/macros/ ...
[20] A notable example of this is doing an invariant mass analysis, which will briefly be touched in the next section.
[21] http://alisoft.cern.ch/viewvc/trunk/PWG2/FLOW/?root=AliRoot .