umd-lhcb / lhcb-ntuples-gen

ntuples generation with DaVinci and in-house offline components
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Try to fix DDX Dalitz variation #124

Closed yipengsun closed 1 year ago

yipengsun commented 1 year ago

This should fix #123

I change the following:

Here's mDD for D0 chan test_d0

mDD for D* chan test_dst

@afernez @CoffeeIntoScience Please review my changes to see if they make sense.

CoffeeIntoScience commented 1 year ago

The is_ddx_mu seems to be actually checking if it is a 3-body decay rather than a two-body decay. Are you sure that the two-body muonic B->DD decays still go through to the template with the correct BF weights and all?

I admit this should be more obvious to me but I'm not used to parsing the YML setup

CoffeeIntoScience commented 1 year ago

The is_ddx_mu seems to be actually checking if it is a 3-body decay rather than a two-body decay. Are you sure that the two-body muonic B->DD decays still go through to the template with the correct BF weights and all?

I admit this should be more obvious to me but I'm not used to parsing the YML setup

The logical issue is that you're selecting out the DDX muonic, then requiring ALL pass a cut that will only be expected to be passed by DDK. There's still DD and DDs that are muonic and will not and should not pass this cut, but also should not receive dalitz weights.

So in that light

For muonic DDX only, add the following global cut: The min(mDD) is set to 18642 for D0 chan, 2010 + 1864 for D chan The max(mDD) is set such that there is enough phase space to produce a K

is at best dangerous logic for the template building stage if you aren't aware that this cut removes the two-body and you don't think to keep it.

I think it's not just academic either because the 2body muonic needs to always have dalitz weights =1 and I don't see how the updated code achieves that

yipengsun commented 1 year ago

Now I remove this global selection of ONLY selecting muonic DDK and removing D_s / two-body DD.

Instead, now I have a flag called is_dal_variable meaning the particular event is subject to Dalitz variation. If so, the event will receive a Dalitz weight from WT_DALITZ. Otherwise the event will have a weight of 1 (i.e. no Dalitz variation).

CoffeeIntoScience commented 1 year ago

Looks good to me now. I only left a note that it would be good for @afernez to specifically check the MC IDs enumerated for your one flag since it would be much faster for y'all to track that down than for me to go try to dig it up myself

yipengsun commented 1 year ago

Some more debugging plots.

mDD

test_d0 test_dst

linear Dalitz variations, minus

There's a bunch of events w/ weight 1 indicating that they are NOT variated wdal_lp_d0 wdal_lp_dst