Particle identification in ALICE: a Bayesian approach

We present a Bayesian approach to particle identification (PID) within the ALICE experiment. The aim is to more effectively combine the particle identification capabilities of its various detectors. After a brief explanation of the adopted methodology and formalism, the performance of the Bayesian PID approach for charged pions, kaons and protons in the central barrel of ALICE is studied. PID is performed via measurements of specific energy loss ($\mathrm{d}E/\mathrm{d}x$) and time-of-flight. PID efficiencies and misidentification probabilities are extracted and compared with Monte Carlo simulations using high-purity samples of identified particles in the decay channels ${\rm K}^0_S \rightarrow \pi^-\pi^+$, $\phi \rightarrow {\rm K}^-{\rm K}^+$, and $\Lambda \rightarrow {\rm p}\pi^-$ in p-Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ TeV. In order to thoroughly assess the validity of the Bayesian approach, this methodology was used to obtain corrected $p_{\rm T}$ spectra of pions, kaons, protons, and D$^0$ mesons in pp collisions at $\sqrt{s}=7$ TeV. In all cases, the results using Bayesian PID were found to be consistent with previous measurements performed by ALICE using a standard PID approach. For the measurement of D$^0 \rightarrow {\rm K}^-\pi^+$, it was found that a Bayesian PID approach gave a higher signal-to-background ratio and a similar or larger statistical significance when compared with standard PID selections, despite a reduced identification efficiency. Finally, we present an exploratory study of the measurement of $\Lambda_{\rm c}^{+}\rightarrow {\rm p} {\rm K}^-\pi^+$ in pp collisions at $\sqrt{s}=7$ TeV, using the Bayesian approach for the identification of its decay products.


Introduction
Particle Identification (PID) provides information about the mass and flavour composition of particle production in high-energy physics experiments. In the context of ALICE (A Large Ion Collider Experiment) [1], identified particle yields and spectra give access to the properties of the state of matter formed at extremely high energy densities in ultra-relativistic heavy-ion collisions. Modern experiments usually consist of a variety of detectors featuring different PID techniques. Bayesian approaches to the problem of combining PID signals from different detectors have already been used by several experiments, e.g. NA27 [2], HADES [3] and BESII [4]. This technique was proposed for ALICE during its early planning stages [5] and then used extensively to prepare the ALICE Physics Performance Report [6,7]. An analogous method is also used to combine the PID signals from the different layers of the ALICE Transition Radiation Detector. The ALICE detector system is composed of a central part that covers the mid-rapidity region |η| < 1 (the 'central barrel'), and a muon spectrometer that covers the forward rapidity region −4 < η < −2.5. The central barrel detectors that have full coverage in azimuth (ϕ) are, from small to large radii, the Inner Tracking System (ITS), the Time Projection Chamber (TPC), the Transition Radiation Detector (TRD) 1 and the Time Of Flight system (TOF). Further dedicated PID detectors with limited acceptance in ϕ and η are also located in the central barrel. These are the Electromagnetic Calorimeter (EMCal), the Photon Spectrometer (PHOS), and a Cherenkov system for High-Momentum Particle Identification (HMPID).
The central barrel detectors provide complementary PID information and the capability to separate particle species in different momentum intervals. At low momenta (p 3-4 GeV/c), a track-by-track separation of pions, kaons and protons is made possible by combining the PID signals from different detectors. At higher momenta, statistical unfolding based on the relativistic rise of the TPC signal can be performed for PID. Given the wide range of momenta covered, ALICE has the strongest PID capabilities of any of the LHC experiments. More details about the identification possibilities of the single detectors can be found in [1].
Several different PID methods were applied for analyses of data collected by ALICE during the RUN 1 data taking period of the LHC (2009)(2010)(2011)(2012)(2013). A non-exhaustive list of examples of PID in ALICE is given in the following. Results were published on the transverse momentum (p T ) distributions of charged pion, kaon and proton production [8,9,10] in different collision systems and centre-of-mass energies using the ITS, TPC, TOF and HMPID detectors. Electron measurements from semileptonic heavy-flavour hadron decays took advantage of the TPC, TOF, TRD and EMCal detectors [11,12]. Neutral pion production was studied via photon detection in the PHOS and the detection of e + e − pairs from gamma conversions in the TPC. PID detectors were also used extensively to improve the signal-to-background ratios when studying the production of certain particles based on the reconstruction of their decay products, such as D mesons [13], φ and K * resonances [14]; in studies of particle correlations, such as femtoscopy [15]; and to identify light nuclei [16]. In all analyses where PID was used, selections were applied based on individual detector signals and later combined.
In this paper we describe results obtained during RUN 1 in pp collisions at √ s = 7 TeV, Pb-Pb collisions at √ s NN = 2.76 TeV and p-Pb collisions at √ s NN = 5.02 TeV. In particular, we focus on the hadron identification capabilities of the central barrel detectors that had full azimuthal coverage during RUN 1. These are the ITS, TPC and TOF detectors, which are described in more detail below. The other central barrel detectors are not discussed here.
The ITS is formed of six concentric cylindrical layers of silicon detectors: two layers each of Silicon Pixel (SPD), Silicon Drift (SDD) and Silicon Strip Detectors (SSD). The SDD and the SSD provide a read-out of the signal amplitude, and thus contribute to the PID by measuring the specific energy loss (dE/dx) of the traversing particle. A truncated mean of the (up to) four signals is calculated, resulting in a relative dE/dx resolution of approximately 12% [1].
The TPC [17] is the main tracking device of ALICE. Particle identification is performed by measuring the specific energy loss (dE/dx) in the detector gas 2 in up to 159 read-out pad rows. A truncated mean that rejects the 40% largest cluster charges is built, resulting in a Gaussian dE/dx response. The dE/dx resolution ranges between 5-8% depending on the track inclination angle and drift distance, the energy loss itself, and the centrality in p-Pb and Pb-Pb collisions due to the differing detector occupancy.
The TOF detector [18] is based on Multigap Resistive Plate Chamber technology. It measures the flight times of particles with an intrinsic resolution of ∼80 ps. The expected flight time for each particle species is calculated during the reconstruction, and then PID is performed via a comparison between the measured and expected times.
Other forward-rapidity detectors are also relevant to the data analyses presented in this paper. The V0 plastic scintillator arrays, V0A (covering 2.8 < η < 5.1) and V0C (−3.7 < η < −1.7), are required in the minimum-bias trigger. The V0 signals are also used to determine the centrality of p-Pb and Pb-Pb collisions. The T0 detector is a quartz Cherenkov detector that is used for start-time estimation with a resolution of ∼40 ps in pp collisions and 20-25 ps in Pb-Pb collisions.
A thorough understanding of the detector response is crucial for any particle identification method. In the case of dE/dx, this means a well parameterised description of the average energy loss (according to the Bethe-Bloch formula [19]) and a reliable estimate of the signal resolution. For the TOF measurement, the start-time information, start-time resolution, track reconstruction resolution, and intrinsic detector resolution need to be known [18].
Combining the PID signals of the individual detectors using a Bayesian approach [20] makes effective use of the full PID capabilities of ALICE. However, using combined probabilities to perform particle identification may result in unintuitive, non-trivial track selections. It is therefore important to benchmark the Bayesian PID method, compare efficiencies in data and Monte Carlo, and validate that this technique does not introduce a systematic bias with respect to previously published results. This paper focuses on the verification of the Bayesian PID approach on the basis of various data analyses. Section 2 describes the Bayesian approach (2.1), the definitions of efficiency and contamination in the context of PID (2.2), the extraction and application of prior distributions (2.3), and different strategies for using the resulting probabilities (2.4). Section 3 presents benchmark analyses of high-purity samples of pions, kaons, and protons from the two-prong decays of K 0 S mesons, φ mesons and Λ baryons. Section 4 presents validations of the Bayesian approach for two full analyses: the measurement of the transverse momentum spectra of pions, kaons and protons (4.1), and the analysis of D 0 → K − π + (4.2). Section 5 illustrates the application of the Bayesian PID approach to maximise the statistical significance when analysing the production of Λ + c baryons. Finally, a conclusion and outlook are given in Section 6.

Bayesian PID in ALICE
Simple selections based on the individual PID signals of each detector do not take full advantage of the PID capabilities of ALICE. An example of this is illustrated in Fig. 1, which shows the separation of the expected TPC and TOF signals for pions, kaons and protons with transverse momenta in the range 2.5 < p T < 3 GeV/c. Clearly, the separation in the two-dimensional plane (the peak-to-peak distance) of e.g. pions and kaons is larger than the separation of each individual one-dimensional projection. A natural way of combining the information of independent detectors is to express the signals in terms of probabilities. An additional advantage of this method is that detectors with non-Gaussian responses can also be included in a straightforward way. A Bayesian approach makes use of the full PID capabilities by folding the probabilities with the expected abundances (priors) of each particle species. This section outlines the standard 'n σ ' PID approach, before presenting the method used to combine the signals from the different detectors when adopting a Bayesian PID approach.

PID signals in ALICE
The response of each detector can be expressed in terms of its raw signal, S. One of the simplest ways of performing PID is to directly select based on S. Examples of S include the flight-time information from the TOF detector, t TOF , and the specific energy loss dE/dx in detector gas or silicon, respectively measured by the TPC and the ITS. A more advantageous approach would be to use a discriminating variable, ξ , which makes use of the expected detector response R: where R can have functional dependences on the properties of the particle tracks, typically the momentum p, the charge Z, or the track length L. The detector response functions are usually complex parameterisations expressing an in-depth knowledge of subtle detector effects.
For a detector with a Gaussian response, R is given by the expected average signalŜ(H i ) for a given particle species H i and the expected signal resolution σ . The index i usually refers to electrons, muons, pions, kaons or protons, but may also include light nuclei such as deuterons, tritons, 3 He nuclei and 4 He nuclei. The most commonly used discriminating variable for PID is the n σ variable, defined as the deviation of the measured signal from that expected for a species H i , in terms of the detector resolution: where α = (ITS, TPC, ...). The resolution is given here as σ i α , as it depends both on the detector and the species being measured. In the following, σ i α is simply referred to as 'σ '. The n σ PID approach corresponds to a 'true/false' decision on whether a particle belongs to a given species. A certain identity is assigned to a track if this value lies within a certain range around the expectation (typically 2 or 3σ ). Depending on the detector separation power, a track can be compatible with more than one identity.
For a given detector α with a Gaussian response, it is possible to define the conditional probability that a particle of species H i will produce a signal S as In the case of a non-Gaussian response, the probability is described by an alternative parameterisation appropriate to the detector. The advantage of using probabilities is that the probabilities from different detectors, P α , with and without Gaussian responses, can then be combined as a product: where S = (S ITS , S TPC , ...).
The probability estimate P( S|H i ) (either for a single detector, or combined over many) can be interpreted as the conditional probability that the set of detector signals S will be seen for a given particle species H i . However, the variable of interest is the conditional probability that the particle is of species H i , given some measured detector signal (i.e. P(H i | S)). The relation between the two for a combined set of detectors can be expressed using Bayes' theorem [20]: Here, C(H i ) is an a priori probability of measuring the particle species H i , also known as the prior, and the conditional probability P(H i | S) is known as the posterior probability.
The priors (which are discussed in more detail in Section 2.3) serve as a 'best guess' of the true particle yields per event. When such a definition is adopted for the priors, a selection based on the Bayesian probability calculated with Eq. 5 then corresponds to a request on the purity (defined as the ratio between the number of correctly identified particles and the total selected). Additionally, priors can be used to reject certain particle species that are not relevant to a given analysis. Most commonly in the context of the ALICE central barrel, the prior for muons is set to zero. Due to the similarity between the pion and muon mass, the two species are almost indistinguishable over a broad momentum range; the efficiency of detecting a pion would thus be reduced if muons were not neglected. At the same time, this influences the number of particles wrongly identified as pions, since the true abundance of muons (roughly 2% of all particles, estimated using Monte Carlo simulations) is neglected. This case is further discussed in the following sections.

PID efficiency and contamination
In order to obtain the physical quantity of interest (typically a cross section or a spectrum) from a raw yield, it is necessary to (a) compute the efficiency due to other selections applied before PID, and (b) compute the efficiency of the PID strategy. The PID efficiency is defined as the proportion of particles of a given species that are identified correctly by the PID selections. Both kinds of efficiency are usually estimated via Monte Carlo techniques. To precisely compute the efficiency of a given PID strategy, it is of utmost importance that an accurate description of the actual signals present in the data is provided by the Monte Carlo simulation. Special care must be given to the 'tuning' of Monte Carlo simulations to reproduce all of the features and dependences observed in data for PID signals.
It is possible to define a ε PID matrix that contains the probability to identify a species i as a species j. If only pions, kaons and protons are considered, the 3 × 3 ε PID matrix is defined as where the diagonal elements ε ii are the PID efficiencies, and the non-diagonal elements (ε i j , i = j) represent the probability of misidentifying a species i as a different species j.
The abundance vectors for pions, kaons and protons are defined as where the elements of A meas ( A true ) represent the measured (true) abundances of each species. The diagonal elements ε ii of the PID matrix are then defined as Techniques to estimate the matrix elements are discussed in Section 3. The abundance vectors A meas and A true are linked by the following relation: Inverting the ε PID matrix, the physical quantities are then extracted via: The ε PID matrix elements have functional dependences on many variables, primarily p T and collision system. Other second-order dependences (for example pseudorapidity, event multiplicity, and centrality) can also be studied depending on the specific track selections and PID strategies applied.
The contamination of the species j due to a different species i (c ji ) is the number of particles belonging to species i that are wrongly identified as j (N i identified as j ), divided by the total number of identified j particles (A j meas ) [7]: Contamination should not be confused with the misidentification probabilities defined in Eq. 6, which do not depend on the real abundances. The connection between contamination and misidentification is: There is usually a trade-off between efficiency and contamination. Both depend on the PID strategy (e.g. choice of detectors), the detector response, and the priors used, all of which are momentum-dependent. The contamination is additionally driven by the real abundances.
An accurate estimate of the contamination c ji depends on the real abundances, and it must be determined with data-driven techniques (or with Monte Carlo simulations with abundances corresponding to what is found in the data).
Although the PID matrix elements are independent of the real abundances, they still depend on the choice of priors. They are therefore evaluated consistently as long as the same set of priors is used both in the data analysis and for the Monte Carlo simulations, provided that the detector responses are simulated correctly. In addition, a choice of priors that lies closer to the true abundances allows the best compromise to be found between the maximisation of the efficiency and the minimisation of the contamination probabilities. Considering that any systematic uncertainties in the detector response will be amplified if the efficiency is low or if the contamination probabilities are large, the method becomes more effective as the priors tend closer to reality. An extreme example of this would be the identification of pions and muons using equal priors for all species, as the two species are difficult to distinguish from each other (ε ππ ≈ ε µ µ ≈ 0.5 and ε π µ ≈ ε µπ ≈ 0.5). In such a case, even a small discrepancy in the description of the detector response in Monte Carlo would cause a fluctuation in ε i j , leading to a large uncertainty in the estimate of the pion yield; a choice of priors corresponding to the true abundances would prevent this from happening.
In cases where the detector responses are well separated between different species, the priors do not need to correspond to the true abundances, and could even be flat. The differences between different choices can then be used to provide an estimate of the systematic uncertainties depending on the current knowledge of the detector response. The influence of the choice of priors is further discussed as part of the analyses presented in Section 4.
The combination of probabilities can also be used to identify and reduce the level of unphysical background that may arise in PID analyses due to track misassociation between detectors. For example, the fraction of TPC tracks that are not correctly associated with the corresponding TOF hit increases with the multiplicity of the event, and depends on the spatial matching window used in the reconstruction to associate a TOF hit to a track. In ALICE this effect only plays a role in Pb-Pb and p-Pb collisions, and even in the most central Pb-Pb collisions it remains below 10% for tracks with momentum above 1 GeV/c. In these cases, a mismatch probability can be defined based on e.g. the measured flight time being uncorrelated with the track reconstructed with the ITS and TPC due to the TOF hit being produced by another particle.

Priors in ALICE
As discussed in Section 2.1, an analysis using the Bayesian approach is expected to be moderately dependent on the choice of priors. Separate sets of priors were evaluated for each collision system. They were evaluated by means of an iterative procedure on data taken in 2010 and 2013 from pp, Pb-Pb, and p-Pb collisions at √ s = 7 TeV, √ s NN = 2.76 TeV and √ s NN = 5.02 TeV, respectively, and were computed as a function of transverse momentum. Priors were also determined as a function of centrality for Pb-Pb collisions, and of the multiplicity class (based on the signal in the V0A detector) for p-Pb data. All of the priors were obtained at mid-rapidity, |η| < 0.8.
The absolute normalisation of the priors is arbitrary, and was chosen so as to normalise all of the priors to the abundance of pions. The value of the priors for pions is thereby set to unity for all p T . Flat priors (i.e. 1 for all species) are applied at the beginning of the iterative procedure. Bayesian posterior probabilities P n (H i |S) are computed using the priors obtained in step n, as defined in Eq. 5. These probabilities are then used in turn as weights to fill identified p T spectra Y (H i , p T ) for the step n + 1 starting from the inclusive (unidentified) measured p T spectra: where the summation is performed for all signals S induced by particles of a given p T in the sample. It is then possible to obtain a new set of priors C n+1 from the relative ratios of the identified spectra according to The procedure is then iterated, and the extracted prior values converge progressively with each iteration. The values of the priors are shown in the left panel of Fig. 2 for the K/π ratio obtained using data from p-Pb collisions. The convergence of this procedure is illustrated in the right-hand panel, as a ratio of the priors for successive steps. A satisfactory convergence is obtained after 6-7 iterations. Step 0 = equal priors Step 1 Step 2 Step 3 Step 4 Step 5, 6, 7

Fig. 2:
An example of the iterative prior extraction procedure for p-Pb data (for the 10-20% V0A multiplicity class). The extracted K/π ratio of the priors is shown as a function of p T at each step of the iteration (left) and as a ratio of the value between each successive step (right).
Step 0 refers to the initial ratio, which is set to 1.
A set of priors was obtained for global tracks, defined as tracks reconstructed in both the ITS and TPC. This set is referred to in the following as C(H i ) TPC (the "standard priors"). This set of priors is then propagated to other detectors using "propagation factors" F α , which are detector-specific and dependent on transverse momentum. In some cases these multiplicative factors can also be charge-dependent (this is true for EMCal, for example). F α , which is obtained for each detector via Monte Carlo, takes into account the particles reaching the outer detectors, as well as the acceptances of the outer detectors and their corresponding energy thresholds. The abundances measured by TOF and TPC will differ due to these effects. The requirement of a given detector therefore changes the priors. For an outer detector α, the priors for a track with momentum p T are determined as Priors are currently propagated for TRD, TOF, EMCal and HMPID. Priors were also generated for tracks that are obtained using only ITS hits. These were used for the spectrum analysis at low momentum [9].
In the analyses presented in this paper, the propagation procedure of priors from TPC to TOF was tested extensively.
Since the priors correspond to relative particle abundances, it is possible to directly compare the priors obtained from the iterative procedure with the abundances measured by ALICE [8,10,21]. Comparisons between the priors and the measured p/π and K/π ratios are shown in Fig. 3 for pp and Pb-Pb collisions at √ s = 7 TeV and √ s NN = 2.76 TeV, respectively, and in Fig. 4 for p-Pb collisions at √ s NN = 5.02 TeV. In some cases the priors cover a larger range than the measurements made by ALICE.
In order to make these comparisons, the priors were corrected by several factors to take into account the different selections used in the physics analyses and in the priors computation. Since the standard priors are provided for the TPC case, only the tracking efficiency correction was applied. Additional conversions from pseudorapidity intervals (used for the priors) to rapidity intervals (used for the measurement) were also applied, as well as an average feed-down correction derived from the Pb-Pb analysis [10]. This feed-down mainly applies to protons from the decays of Λ baryons.
The priors (open symbols) and the measured abundances (filled symbols) are consistent with one another within roughly 10% over a wide momentum range for all centrality ranges (for Pb-Pb collisions) and V0A multiplicity classes (for p-Pb collisions). The choice to use feed-down corrections evaluated in a given system leads to better agreement at low momenta in Pb-Pb collisions than in p-Pb collisions. However, at high momenta, where the PID performance is better exploited, the results are independent of this correction. The overall level of agreement is satisfactory, as the priors represent a realistic description of the various particle abundances. It is also important to test whether there is any dependence of the final result on the set of priors used. To perform these tests, it is possible to use alternative sets of priors as well as flat priors, which essentially combine the probabilities from the different detectors without weighting them with Bayesian priors. Slightly different sets of priors can be obtained by varying the track selection parameters. An example The proton/pion ratio (left) and kaon/pion ratio (right), as measured by ALICE [21] using TPC and TOF (filled symbols), compared with the standard priors obtained with an iterative procedure (open symbols) for p-Pb collisions for different V0A multiplicity classes. Particle ratios are calculated for mid-rapidity, |y| < 0.5 with respect to the centre-of-mass system. The double ratios (the measured abundances divided by the Bayesian priors) are shown in the lower panels. of a systematic check on the dependence on varying the set of priors is discussed in Section 4.2 for the D 0 case.

Bayesian PID strategies
Once the Bayesian probability for each species (p, K, π, etc.) has been calculated for a given track, the PID selection may be applied with a variety of selection criteria. The three criteria applied in this paper are: -Fixed threshold: The track is accepted as belonging to a species if the probability for this is greater than some pre-defined value. As an example, the choice of a 50% threshold means that a particle will only be accepted as a kaon if its Bayesian probability of being a kaon is greater than 50%. Note that this strategy is not necessarily exclusive, as a threshold of less than 50% could lead to multiple possible identities. As already discussed, a selection on the Bayesian probability corresponds to a purity requirement of the signal if the priors reflect the true particle abundances.
-Maximum probability: The track is accepted as the most likely species (i.e. the species with the highest probability).
-Weighted: All tracks reaching the PID step of the analysis are accepted, with a weight different from unity applied to their yield. The weight is defined as the product of the Bayesian probabilities obtained for the tracks involved (e.g. in D 0 → K − π + , this is the kaon probability of the negative track multiplied by the pion probability of the positive track). The final result is corrected for the average weight determined in Monte Carlo simulations in the same way as is done for the PID efficiency in other methods.
The fixed threshold method is compared with n σ PID as part of the benchmark analysis (see Section 3). The maximum probability method is used in the single-particle spectrum analysis described in Sec-tion 4.1 and for the Λ + c baryon analysis in Section 5. Finally, all three of the aforementioned methods are tested for the analysis of D 0 → K − π + in Section 4.2.

Benchmark analysis on two-prong decay channels
High-purity samples of identified particles were selected via the study of specific decay channels. These samples served as a baseline for validating the Monte Carlo tools that are normally used to estimate the efficiencies and misidentification probabilities (i.e. the ε PID matrix discussed in Section 2) of the Bayesian PID approach. The methodology developed in this section was also applied to the n σ PID approach, providing an important cross-check.

Description of the method
The following decays were used to obtain high-purity samples of three different species: -K 0 S → π − π + to study charged pions; -Λ → pπ − (and respective charge conjugates) to study protons; and φ → K − K + to study charged kaons.
The first two cases are true V 0 decays, comprising two charged prongs originating from a secondary vertex displaced from the interaction point, whereas the daughters of the φ meson originate from the primary interaction vertex due to its shorter lifetime. For conciseness, all of these are referred to as V 0 decays in this paper.
Here we report results based on the p-Pb data set, testing the PID method using both TPC and TOF. The p-Pb data sample is less affected by background uncertainties than the Pb-Pb sample when performing fits of the invariant mass spectra, due to the smaller amount of combinatorial background. This is especially true for the φ analysis.
Different track selection criteria were applied in order to select daughter particles coming either from the primary vertex (for the φ case) or from a secondary vertex (for the K 0 S and Λ cases). For a given V 0 , a fit of the combinatorial invariant mass distribution allows the background to be subtracted and the yield of V 0 decays to be extracted. The estimated yield is considered to be a pure sample of a given species (a precise measurement of the total number of particles of a given species in a given data set). This estimation was done without applying any PID selections. Then the exercise was repeated applying PID selections on each of the two prongs, selecting between pions, kaons and protons. The comparison with the number of positively identified secondary prongs determines the efficiency and the misidentification with respect to the values estimated when not applying PID. Figure 5 shows examples of the fitting procedure for the K 0 S invariant masses for 2 < p π T < 3 GeV/c. From left to right, the panels show the analysis without PID and then requiring the identification of a positive pion, kaon, or proton, respectively. The K 0 S signal (and background) fitted in the latter three cases, compared with the results without applying PID, allow the extraction of the identification efficiency and misidentification probabilities.
In order to reduce the background for the φ analysis, before starting the procedure, one of the two decay tracks was 'tagged' using a PID selection requiring compatibility with the kaon hypothesis and then the PID selection under study is applied on the other track. The tagging was performed with a 2σ selection on a combination of the TPC and TOF signals.
The TPC and TOF signals are combined as |n Comb σ ( j)| = (n TPC σ ( j) 2 + n TOF σ ( j) 2 )/2. The same method was also applied on the simulated sample in order to check the agreement between Monte Carlo and data on the estimated quantities. This serves as a validation for the Monte Carlo estimation of the efficiency of a given PID strategy, as well as for the subsequent corrections required in order to extract physics results.

Comparison of PID efficiencies between data and Monte Carlo
The PID matrix elements obtained for different Bayesian probability thresholds are presented here. An example for the highest purity case considered in this work (Bayesian probability greater than 80%) is shown in Fig. 6. Each plot represents a row of the ε PID matrix for a given species i, with the i = j points corresponding to the PID efficiencies (ε ii ) and the i = j points corresponding to the misidentification probabilities (ε i j ). The matrix was evaluated separately for positively and negatively charged tracks. As no difference was found between the two cases, the results shown here were averaged over both charges. For Monte Carlo, the PID hypothesis was tested both via the true particle identity available in the simulation and by applying the same procedure as for the data. As can be seen from Fig. 6, the efficiencies and misidentification probabilities can be evaluated very precisely. The agreement between data and Monte Carlo is good, both in shape and absolute value. The general features of the PID strategies are also described well, and behave as expected: using a high threshold maximises the purity, but also sharply reduces the efficiency. Nevertheless, even for P ≥ 80%, where the efficiency estimate is more sensitive to the description of the detector responses in the simulations, the agreement with Monte Carlo remains within 5% below 3 GeV/c. The analysis was repeated using 2σ and 3σ selections on the combined TOF and TPC signals, as discussed above, to identify the three hadron species. The result is shown in Fig. 7 for the 2σ case. As expected, the ε PID matrix elements have different values from the 80% Bayesian probability threshold (given that the n Comb σ selection is somewhat more inclusive), and the probability of misidentification increases accordingly. The agreement between Monte Carlo and data for the misidentification probabilities is worse in the n σ case than in the Bayesian case for kaons misidentified as pions. However, there remains a good agreement between Monte Carlo and data overall. The efficiencies are below the values expected from a perfectly Gaussian signal; a Monte Carlo or data-driven evaluation of the PID strategy efficiency is therefore mandatory. The non-Gaussian tail of the TOF signal [18], caused by charge induction on pairs of neighbouring readout pads, plays a significant role in this discrepancy. The mismatch fraction is also not negligible in p-Pb collisions, being ∼2% above 1 GeV/c. For a more detailed comparison, the ratios between data and Monte Carlo are presented in Figs. 8 and 9 for efficiencies obtained using different Bayesian probability thresholds, and a 2σ or 3σ PID selection, respectively. The agreement is very similar (within ∼5%) for both methods. A larger difference is seen for kaons when using a very high Bayesian probability threshold (corresponding to a "high purity" strategy). However, such an approach could still be beneficial in physics analyses where an efficiency correction is not needed (such as analyses investigating Bose-Einstein correlations [15] or the flow of identified particles [22]). The uncertainties reported in these plots are purely statistical. Apart from the case of kaons extracted from φ decays, the statistical uncertainties on the Monte Carlo simulations give the largest contribution to the uncertainties shown here. The φ -meson invariant mass plots are affected by a larger combinatorial background in the data sample when PID is not requested (i.e. in the denominator of the efficiency). As the ratios of data to Monte Carlo for both Bayesian and n σ PID are close to unity in Figs. 8 and 9, it can be concluded that the systematic uncertainties from the PID procedure are well under control in both cases.
In summary, the V 0 analysis technique described in this section serves not only as a validation of the quality of the Monte Carlo description of the various detector responses, but can also be used in data and simulations to validate different PID strategies and track selections for any kind of analysis. Finally, it provides a tool to investigate the systematic uncertainties that arise due to the PID selection.

Bayesian approach applied to physics analyses
In this section we present validations of the Bayesian PID approach for two analyses already published by the ALICE Collaboration in pp collisions at √ s = 7 TeV: identified pion, kaon and proton spectra [8] and D 0 → K − π + [13]. While the previous papers remain the proper references for the extraction of the physical quantities such as cross sections, and for theory comparisons, this paper shows the results obtained by applying the Bayesian approach to the PID part of those analyses.

Identified hadron spectra
The consistency of the Bayesian PID technique was tested using the tools described in the previous sections to obtain the p T spectra of pions, kaons and protons. This analysis used a data sample of 1.2 × 10 8 inelastic pp collisions at √ s = 7 TeV that was collected in 2010.
The results are compared here with similar measurements that were already reported in [8]. In the quoted paper, different PID techniques were used depending on the detectors involved in different p T ranges (n σ for ITS only and for the combined TPC and TOF signals, and unfolding techniques for TOF and HMPID separately). Charged kaon spectra were also measured via the identification of their decays (measurement of the kink topology). Full details of the original analysis, including the event selection criteria (which were also used here) and the procedure used to merge the various PID techniques and detectors, can be found in [8].
The efficiency, detector acceptance, and other correction factors, were estimated using Monte Carlo samples that simulated the detector conditions run-by-run. The simulation was based on the PYTHIA6.4 event generator [23] using the Perugia0 tune [24], with events propagated through the detector using GEANT3 [25].
Only the TPC and TOF detectors were used for PID. The particle species were identified using the maximum probability method outlined in Section 2.4. The identification of charged hadrons used different detector combinations in different momentum ranges, as shown in Table 1. Although a Bayesian approach does not necessarily require such a division, it was chosen in order to make a closer comparison with the analysis presented in [8]. In particular, the TOF efficiency drops very steeply at low momentum due to the acceptance, meaning that the systematic uncertainty on the TOF efficiency would become dominant and make the comparison difficult. Table 1: PID detectors and transverse momentum ranges (in GeV/c) used for the analysis of identified hadron spectra.
The PID efficiency is higher than 95% for pions and protons, while for kaons it begins to decrease from 100% at 1 GeV/c to 75% at 2.5 GeV/c. The misidentification percentage is below 5% for pions and protons for all p T , and reaches 20% for kaons at p T = 2.5 GeV/c. In order to avoid the dependence of the corrections on the relative abundances of each hadron species in the event generator, the spectra were corrected for their respective PID efficiencies and for contamination using the ε PID matrix method described in Section 2.2. A 4×4 matrix (also including electrons) was defined for each p T interval. These matrices were then inverted and used in Eq. 10 in order to obtain the spectra. In addition, the spectra were corrected for the tracking, TPC-TOF matching and primary vertex determination efficiencies. The contributions from secondary particles that were not removed by a selection based on the distance of closest approach to the vertex were determined using a data-driven method, as explained in [8], and were subtracted from the final spectra. Figure 10 compares the minimum-bias charged hadron spectra from pp collisions at √ s = 7 TeV obtained from this analysis with the published result. A very good agreement within the uncertainties can be observed between the p T spectra obtained using these different approaches. For this comparison, the statistical uncertainties are shown for both analyses, while the systematic uncertainties that are not only related to PID were only considered for the results published in [8]. The ratios of the spectra, presented in the lower panels of Fig. 10, show an agreement within ±5% for all species.
A further check was performed testing the stability of the method against the priors used. The analysis was repeated using flat priors, i.e. equal probabilities for the four particle species that are included in the PID matrix (electrons, pions, kaons and protons). The muon priors were set to zero, their percentage being negligible (with standard priors, they are estimated to be less than 2% with respect to all other particle species). Despite considering quite an extreme case here in terms of varying the priors, the pion and proton abundances were consistent with the result obtained with standard priors within 3%. A decrease in the estimated pion abundance at p T > 1 GeV/c resulted in a variation of up to 10% for kaons in some p T intervals. The observed variations can be interpreted as being due to remaining uncertainties in the detector response; a naive set of priors, such as a set of flat priors, is generally expected to amplify such effects.

Analysis of
This section presents a comprehensive overview of a variety of Bayesian PID strategies applied to the analysis of D 0 → K − π + (and charge conjugates) in pp collisions at √ s = 7 TeV. The analysis was based on a data sample of roughly 3 × 10 8 events collected during RUN 1. The geometrical selections on the displaced decay vertex topology matched those used in the ALICE measurement of D 0 → K − π + in pp collisions reported in [13].
In order to make a detailed assessment of the Bayesian method, this analysis compares the results obtained using each of the PID strategies outlined in Section 2.4. In each case, the PID method relied on selecting an oppositely charged pair of tracks corresponding to a kaon and a pion. The TPC and TOF detectors were used in conjunction with one another. For tracks without TOF information, the PID was based on information from the TPC only.
For the fixed-threshold method, probability thresholds of 40%, 50%, 70%, and 80% were tested. Note that in the case of the 40% threshold, there is the possibility that a daughter track may be compatible with both the kaon and pion hypothesis; in such cases, the track was accepted as possibly belonging to either species. For the maximum-probability and fixed-threshold methods, once the daughter tracks were analysed, the candidate was accepted or rejected according to the following criteria: -if both daughters were identified as possible kaons, the candidate was accepted both as a D 0 and a D 0 ; -if one daughter was identified as a kaon and the other as a pion, the candidate was accepted as a D 0 if the negative track was a kaon and the positive track was a pion, and vice-versa for D 0 ; -if neither daughter was identified as a kaon, the candidate was rejected; -if either daughter was not compatible with the kaon or the pion hypothesis, the candidate was rejected.
The weighted method was implemented as defined in Section 2.4, whereby the invariant mass distributions were filled for each candidate with weights W i . These weights are defined as where P i corresponds to the Bayesian probability assigned to each track for a given species i. In this case, the PID efficiency from Monte Carlo corresponded to the average weight that was assigned to simulated D 0 mesons in each p T interval.
Once the invariant mass distributions in each p T interval had been obtained, the yields were fitted using a Gaussian function for the signal and an exponential function to estimate the background. The raw signal was extracted according to the integral of the fit to the signal distribution. In order to ensure the stability of the fitting procedure, the width and mean of the Gaussian functions were kept the same in each p T interval for all PID methods. To do this, the fit parameters were first determined for the n σ PID method in each p T interval, and then fixed to those values in the fitting procedure for each other PID method.
Example invariant mass distributions obtained without PID, with n σ PID, and with Bayesian PID using the maximum-probability strategy are shown in Fig. 11, with a logarithmic scale on the vertical axis.
There is a clearly visible increase in the signal-to-background ratio when using n σ PID as compared to the analysis without PID, and a further increase when applying a Bayesian selection with the maximumprobability strategy. Due to the large background and low statistical significance, it was not possible to extract a stable yield for 1 < p T < 2 GeV/c without PID. For this reason, the results obtained without PID are excluded for this p T interval in the following comparisons.  Fig. 11: A comparison of the invariant mass distributions in three p T intervals for D 0 candidates obtained without PID, with n σ PID, and with Bayesian PID using the maximum probability condition. Due to the low statistical significance, it was not possible to extract a stable signal without PID for 1 < p T < 2 GeV/c, therefore this fit and its results are not shown.
Full comparisons of the signal-to-background ratio and significance obtained for different PID strategies are shown in Fig. 12. The statistical significance is defined as the signal divided by the square root of the sum of the signal and background. The signal-to-background ratio increases significantly for all p T when using the n σ PID approach, as compared to not making a PID selection. A similar increase, of a factor of at least 2, was seen in each of the Bayesian methods when compared with n σ PID.
As expected, the statistical significance of the signal was higher for the n σ PID than when no PID selection was applied. At low p T , all but the strictest Bayesian selections (i.e. 80% probability threshold) gave a further increase in significance over the n σ PID method, while at higher p T the significance of these methods became similar to that of n σ PID. The 80% probability threshold yielded a lower statistical significance than n σ PID for p T > 3 GeV/c, whereas the performance of the two methods is equivalent for p T ≤ 3 GeV/c.  Fig. 12: (Left) Signal-to-background ratio and (right) statistical significance as a function of p T for various methods of particle identification. Note that the increase in significance at 8 < p T < 12 GeV/c is an effect of the width of the p T interval increasing from 1 to 4 GeV/c. The efficiencies for each particle identification method were obtained using charm-enriched Monte Carlo simulations, as described in [13]. The PID efficiency was defined as the proportion of simulated D mesons that passed the PID selection criteria, having already passed the other selections. In the case of the weighted Bayesian PID method, as previously mentioned, the PID efficiency corresponded to an average weight for true D 0 candidates, and for the purposes of corrections was used in the same way as the other PID efficiencies. The PID efficiencies obtained for each method are shown in Fig. 13. When a stricter PID selection was applied (for example, an 80% probability threshold as compared to a 70% threshold), the PID efficiency fell correspondingly. All of the Bayesian methods gave a lower PID efficiency than the n σ method. The observed significances and efficiencies highlight a benefit and a potential drawback in using a strict Bayesian PID strategy: while a tighter PID selection gives a yield of higher purity, it also requires a greater reliance on the Monte Carlo simulation to give an accurate correction due to the reduced PID efficiency. However, it is important to note that this is not necessarily inherent to the Bayesian PID method. For example, a very narrow n σ selection (e.g. at 0.5σ ) would also yield a lower efficiency, leading to a similar degree of reliance on the Monte Carlo simulations; even a 2σ selection reduces the PID efficiency to 80%.
The corrected yields obtained using each particle identification method are compared in Fig. 14. In each case, the ratio shown is the corrected yield divided by that obtained using n σ PID. As the candidates selected by each of the Bayesian methods are a subset of those selected by the n σ approach, the uncertainties on the corrected yields are assumed to be fully correlated and so almost cancel out in the ratio.  Fig. 14: Ratios of corrected yields obtained using various Bayesian PID methods to that obtained using n σ PID, for (left) fixed probability thresholds, and (right) maximum probability and weighted Bayesian PID, and no PID. The 5% systematic uncertainty on the n σ PID method is shown as a blue box at 0.5 GeV/c. It was found that there is a relatively good agreement between the Bayesian PID method and the n σ PID method, even when very different probability thresholds are applied. Averaging over p T , the fixed probability threshold methods give a systematic difference between 5 and 9%, increasing for the lower probability thresholds. For the weighted and maximum-probability methods, the average deviations from n σ are 3% and 7%, respectively. In every case this difference is of a similar order to the systematic uncertainty of the n σ PID approach (∼5%) [13].
In effect, the difference of the corrected yield from the n σ result represents the systematic uncertainty due to the choice of Bayesian PID method. Therefore it can be concluded that the PID systematic uncertainties for the Bayesian approach are not much larger than those from the n σ approach. The observed deviations also contain systematic contributions related to the yield extraction procedure.
A final check was made to ensure that the results remained independent of the choice of the prior probability distribution used. Ideally, the requirement of an external input should guide the measurement, and fluctuations in these priors should not have a substantial effect on the final result that is obtained. In order to test this, two modified sets of priors were prepared, with the proportion of kaons scaled up and down by 10% for all p T . An analysis using these modified sets of priors was then performed and compared to the analysis with the standard priors. The corrected yields using the modified priors were divided by the yields using the standard set of priors for each Bayesian analysis method. It was found that the average deviations from unity remained within roughly 2% for each set of alternative priors with all of the Bayesian PID strategies. The smallest deviations were observed for the maximum probability and weighted methods, and for lower fixed probability thresholds.
In conclusion, since the corrected yield is largely independent of the choice of PID method, and considering the improvement in signal-to-background ratio and (at low p T ) significance, we conclude that the Bayesian PID method is a valid choice for the analysis of D 0 → K − π + . However, it must be noted that although the stricter Bayesian methods give a purer signal, they also create an increased reliance on the Monte Carlo simulations to correct for the lower efficiencies, as well as introducing a greater dependence on the choice of priors in those p T intervals that have lower statistical significance.

Application of Bayesian PID for Λ + c analysis
In this section we present an exploratory study of Λ + c → pK − π + in pp collisions at √ s = 7 TeV using a Bayesian PID approach. This decay channel suffers from a high level of combinatorial background, even in the relatively low-multiplicity environment of a pp collision. Due to the short decay length of the Λ + c (cτ = 59.9 µm [26]) and current limitations in the spatial resolution of the ITS, topological and geometrical selections alone are not sufficient to reduce this background and extract a signal. This means that a robust PID strategy is required to select Λ + c candidates. Here we compare analyses of Λ + c → pK − π + using the n σ approach, a Bayesian approach using the maximum-probability criterion, and an alternative "minimum-σ " approach that mimics the Bayesian strategy. This analysis used ∼3 × 10 8 events from pp collisions at √ s = 7 TeV collected during RUN 1.
Both the TPC and TOF responses were used for the n σ approach. A 3σ selection was applied on the TOF signal for kaons, pions and protons at all p T , while in the TPC a p T -dependent n σ selection (between 2 and 3σ ) was applied for protons and kaons, and a 3σ selection was applied for pions at all p T . If the track had a valid TOF signal, only this was used for the PID; otherwise the TPC response was used. For the Bayesian PID method, the TPC and TOF responses were combined; in cases where the TOF signal was not available, only the TPC response was used.
The minimum-σ strategy serves as a middle ground between the n σ analysis and the Bayesian approach. It is also based on the deviation from the expected detector signal, but in this case only the species resulting in the smallest n σ value is chosen for each track, making this an exclusive selection. The TPC and TOF responses are combined by adding their respective n σ values in quadrature. The potential benefit of this approach is that it uses similar logic to the Bayesian approach, without requiring the input of any priors.
In order to build Λ + c candidates, triplets of tracks were reconstructed and selected, based on PID and topological selections. Pairs of oppositely charged tracks were reconstructed from the set of selected tracks, and a secondary (decay) vertex was computed. Selections were applied to each pair based on the distance of closest approach between the two tracks, and the distance between the primary and the secondary vertex of the reconstructed pair. A third track was then associated to each selected pair to form a triplet. The secondary vertex of the triplet was calculated and the Λ + c candidates were selected using: -the quality of the reconstructed vertex, which was determined using the quadratic sum of the distances of the single tracks from the calculated secondary vertex; -the distance between the primary and the secondary vertex of the triplet (decay length); and -the cosine of the pointing angle. The pointing angle is the angle between the momentum vector of the reconstructed Λ + c candidate and the Λ + c flight line reconstructed from the line joining the primary and secondary vertices.
The invariant mass plots for pKπ candidates with 2 < p T < 6 GeV/c are shown in the left-hand panel of Fig. 15 for the standard n σ PID approach (top), the alternative minimum-σ approach (middle) and   and c.c. Fig. 15: Invariant mass spectra of Λ + c → pK − π + using n σ PID, minimum-σ PID and Bayesian PID for (left) 2 < p T < 6 GeV/c and (right) 3 < p T < 4 GeV/c. Due to the low statistical significance, it was not possible to extract a stable signal for n σ PID for 3 < p T < 4 GeV/c, therefore this fit and its results are not shown.
Bayesian PID (bottom). Over this p T interval, the statistical significance determined from the yield extraction (as defined in Section 4.2) is 4.4 ± 1.0 for n σ PID, 5.1 ± 1.0 for minimum-σ PID and 6.0 ± 1.1 for Bayesian PID. In addition, the signal-to-background ratio is three times higher in the Bayesian case than for n σ PID, with a background that is reduced by a factor of approximately seven. On the other hand, the Bayesian PID method yields fewer Λ + c candidates in the peak, indicating a lower selection efficiency.
The equivalent invariant mass distributions for 3 < p T < 4 GeV/c are shown in the right-hand panel of Fig. 15. In this case, the n σ PID approach yields an insufficient statistical significance to extract a stable yield. As with the p T -integrated case, the statistical significance improves when using the other two methods (2.7 ± 1.0 for minimum-σ and 4.4 ± 1.1 for Bayesian PID), and we again find a marked improvement in the signal-to-background ratio for these two approaches. From this we conclude that the Bayesian approach represents the best candidate PID method for future measurements of the Λ + c production cross section.

Conclusions and outlook
A Bayesian method for particle identification has been presented and validated for a variety of analyses. A comparison between different PID selection methods in ALICE was performed, with a focus on testing the suitability of Bayesian PID techniques. A selection based on the Bayesian probability can be interpreted as a request on the purity, and therefore the main benefit of these techniques is that they increase the purity of the extracted signal by combining information from different detectors via a relatively simple technique.
The iterative procedure used to extract the prior probabilities (corresponding to the relative particle abundances) was outlined for pp collisions at √ s = 7 TeV, p-Pb collisions at √ s NN = 5.02 TeV and Pb-Pb collisions at √ s NN = 2.76 TeV. In each collision system, and for every centrality and multiplicity class studied in Pb-Pb and p-Pb collisions, the extracted priors were found to be consistent with the true particle abundances seen in data.
The ability of Monte Carlo simulations to compute efficiencies and misidentification probabilities was tested via high-purity samples of pions, kaons and protons from the two-prong decays K 0 S → π − π + , Λ → pπ − , and φ → K − K + in p-Pb collisions at √ s NN = 5.02 TeV. Equivalent analyses were also performed using n σ PID. It was found that the variation in the result when using Bayesian PID as opposed to n σ PID was on the order of 5% in each case.
Comparisons between the Bayesian approach and PID methods used in measurements already published by ALICE in pp collisions at √ s = 7 TeV were performed for the analysis of the p T -differential yields of identified pions, kaons and protons. In this case, the previous analysis used a combination of n σ PID, unfolding methods and spectra obtained with kinks. A simple maximum-probability Bayesian PID method was used in this analysis. When compared, the results from n σ PID and Bayesian PID were found to be consistent with one another within uncertainties.
A detailed comparison of different Bayesian PID strategies was performed for the analysis of D 0 → K − π + in pp collisions at √ s = 7 TeV. Through the use of different probability thresholds, the trade-off between selecting a purer sample and having a stronger dependence on the description of the detectors in Monte Carlo simulations was demonstrated. An increase in the signal-to-background ratio over the n σ PID method was seen for all p T for all of the tested Bayesian strategies. The statistical significance was found to be similar or greater than n σ PID for all of the Bayesian methods other than a strict 80% probability threshold. In every case, the corrected yield was found to be stable against the choice of PID method when comparing with the n σ PID method used for D 0 mesons. The dependence on the choice of priors was also investigated, and it was found that the uncertainty on the corrected yield due to the choice of priors was within ∼2%. We conclude that the systematic uncertainties arising from the choice of Bayesian PID method are of a similar order to those of the n σ approach. In summary, a good level of consistency is seen in both of the full analyses considered in Sections 4.1 and 4.2 with respect to previously reported results. Because of this, we conclude that the validity of the Bayesian PID approach has been successfully assessed.
Furthermore, the improved performance of the Bayesian PID approach in certain scenarios will prove beneficial for future analyses. The case of the Λ + c baryon was presented as an example where a simple n σ approach is unable to yield a stable signal, while the Bayesian approach is able to combine information from the different detectors effectively without the need to develop a complex variable-σ selection. This presents a promising option for a more comprehensive study of the Λ + c production cross section in pp and p-Pb collisions.
The analyses presented here are currently limited to charged hadrons detected in the TPC and TOF detectors. However, the method can be extended to other particle species and detectors within the ALICE central barrel, and we expect to further test and refine these techniques in future. In particular, it will be possible to examine the performance of the Bayesian approach for electron identification with the TRD at full azimuthal coverage in RUN 2.