Skip to the content.

D0, D+, Ds+, D*+-meson, and Λc+-baryon analysis code

Code for the measurement of Ds+, D+, D*+-meson, and Λc+-baryon pT-differential yields starting from the outputs of the AliPhysics tasks AliAnalysisTaskSEDs.cxx, AliAnalysisTaskSEDplus.cxx, and AliAnalysisTaskSENonPromptLc.cxx, using rectangular or ML selections

Run analysis tasks

Creation of files with selections to be applied on the tasks

Run D+, Ds+, and Λc+ tasks with private jobs

The AliAnalysisTaskSEDplus.cxx, AliAnalysisTaskSEDs.cxx and AliAnalysisTaskSENonPromptLc.cxx tasks can be run with private jobs using the RunAnalysisDplusDsLcTask.cc script in the runanalysistask folder:

root -l RunAnalysisDplusDsLcTask.cc+(TString configfilename = configfile.yml, TString runMode = "full", bool mergeviajdl = true)

where configfile.yml is a configuration file (such as runAnalysis_config_LHC17p_cent.yml) with the information about the dataset, the AliPhysics version, and the task options to be used. The tasks options include the possibility to create a tree for the ML studies or apply a ML model trained with xgboost or scikit learn. The ML model application is not supported by the Λc+ task.

Train output merge

Main analysis with THnSparses

Pre-filter ThnSparses

Projection of invariant-mass distributions from THnSparses

To apply pT weights in case of MC the --ptweights argument followed by the name of the input file with the pT weights and the name of the pT-weights histogram should be parsed. In this case, the pT weights are applied to both the prompt and the FD distributions. If also the --ptweightsB argument followed by the name of the input file with the pTB weights and the name of the pTB-weights histogram is parsed, the pT weights for the FD are computed from the B-mother pT

Main analysis with TTrees or dataframes

Filter trees to prepare data sets for ML studies

To filter trees produced with the Ds+and D+ tasks and divide each category (data, MC prompt D, MC feed-down D, MC background) in a separated file (tree or dataframe) to prepare the datasets for the ML analyses, the FilterTrees4ML.cc and FilterTrees4ML.py scripts in the filterdata folder can be used:

root -l FilterTrees4ML.cc+(TString configfilename = configfile.yml)

or

python3 FilterTrees4ML.py configfile.yml

where configfile.yml is a configuration file (such as config_Dplus_data_skim_pp5TeV.yml) that contains the information about the decay channel, the input files, the preselections to apply, the features to keep and the output files. The output files are by default root files in the c++ script and parquet in the python script. If the --root option is used, the output data are saved into root files instead of parquet files.

Machine Learning analsyis for D-meson candidate selections

To be added

Projection of invariant-mass distributions from TTrees

To apply pT weights in case of MC the --ptweights argument followed by the name of the input file with the pT weights and the name of the pT-weights histogram should be parsed. In this case, the pT weights are applied to both the prompt and the FD distributions. If also the --ptweightsB argument followed by the name of the input file with the pTB weights and the name of the pTB-weights histogram is parsed, the pT weights for the FD are computed from the B-mother pT

Common analysis

The following steps can be performed after having projected THnSparse or TTree (dataframe) objects

Raw yield extraction

To perform raw-yield extraction either a ROOT or a python script can be used.

Efficiency-times-acceptance computation

The efficiency-times-acceptance computation is done in two steps:

both can be run with the --batch argument to avoid the canvas window

Standard analysis with theory-driven prompt fraction evaluation

Cross section

Nuclear modification factor

Corrected yield

Analysis with data-driven evaluation of prompt / feed-down fraction

Prompt / feed-down fraction

python3 ComputeCutVarPromptFrac.py cfgFileName.yml outFileName.root

where cfgFileName.yml is a configuration file such as config_Dplus_PromptFrac_pp5TeV.yml). The method requires several raw yields and efficiency files obtained with different topological selections applied to enrich/reduce the prompt or the feed-down contribution.

Cross section

Run full analysis

Significance optimisation

Optimisation with TTrees

Systematic uncertainties

All the code for the evaluation of the systematic uncertainties is in the systematics directory.

Selection efficiency

Once the analysis has been repeated for all the sets of selections, the systematic uncertainty can be evaluated using the script in the systematics/seleff directory:

root -l PlotCutVariationsOnePtBin.cc+(TString cfgFileName = "cfgFile.yml")

where the config file cfgFile.yml includes all the information of the sets of selections to be used and the quality criteria that has to be applied, such as config_cutvar_DsFD_pp.yml.

Raw-yield extraction

Generated MC pT shape

Test and validation of alternative code for production of TTrees (AliAnalysisTaskSEHFTreeCreator.cxx)

The validation of the code for production of trees used in ML studies can be done using the scripts in the runanalysistask folder