Raised error when accessing the PFNs of a production with several samples when all the filters are applied (solved: new custom tag added)
In my production, as the analysis includes Ks particles, there are 2 reconstructed tracks cases (DD and LL). When accessing the data an error is raised because there are 2 samples fulfilling the filters (polarity, eventtype, year, ...), i.e. there is an ambiguity:
>>> datasets(config="mc", datatype=["2011","2012"], eventtype="13106101", check_data=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2541/stable/linux-64/lib/python3.9/site-packages/apd/analysis_data.py", line 289, in __call__
raise ValueError("Error loading data: " + error_txt)
ValueError: Error loading data: 2 problem(s) found
So a new custom tag is added track_type
to avoid this ambiguity:
In [1]: import apd
...: datasets = apd.AnalysisData("bnoc", "b2kspipipi", polarity=["magdown", "magup"])
...: datasets(config="mc", datatype=["2011","2012"], eventtype="13106101", track_type="dd")
Out[1]:
['root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2011/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166929/0000/00166929_00000001_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root',
'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2012/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166925/0000/00166925_00000001_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root',
'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2012/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166925/0000/00166925_00000002_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root',
'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2011/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166921/0000/00166921_00000001_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root',
'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2012/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166917/0000/00166917_00000001_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root',
'root://eoslhcb.cern.ch//eos/lhcb/grid/prod/lhcb/MC/2012/BNOC_B2KSPIPIPI_PARTRECBKG_MC_DD_DVTUPLE.ROOT/00166917/0000/00166917_00000002_1.bnoc_b2kspipipi_partrecbkg_mc_dd_dvtuple.root']