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

DD "Dalitz" correction #101

Closed manuelfs closed 2 years ago

manuelfs commented 2 years ago

Discussed with Phoebe how this is implemented. It is simply linear and a quadratic corrections as a function of the invariant mass of the two charm hadrons direct daughter from the B. Code here

They also experimented with other corrections, for instance one from DDK* decays, but those are not used in the nominal fit

Svende commented 2 years ago

Phoebe adds several corrections to the DD sample:

  1. nominal histograms are h_dDDmufor B0 defined here and h_uDDmu for B+ defined here. Where weightD is applied from here. Not clear to me where this is coming from. And mcWeight is the weight applied to all MC samples from here
  2. In the Control fitting code she adds an OverSys parameter to float the relative fraction between the B0 and B+ components: here with parameter alpha_D[st]D_uvsd, this is then fixed in the signal fit to what is found in the Control fit step 1 &2 using the flag: fixshape_ud_DDbkg here
  3. The Dalitz correction mentioned above is done as the linear and quadratic corrections to m(DD), with weights specified in the link above, the histograms used in the fitting code are defined here. The corresponding histograms are shown in Fig. 63 of the Run1 Note, this corresponds to the flag useDDShapeUncerts in the fitting code giving additional output parameters alpha_[D_]dalitz_projection[_quad] in the Control fit step2.
  4. There is an additional flag added in the fitting code floatDD2B here which weights up events with m(X)>620 MeV to get the correct K* vs. K fraction in the 3 body decays. The corresponding histograms are called h_uDDmu_2B[p/m] which are defined here and here. The parameter DD2B is defined here. This gives the parameters alpha_D[st]_2B in the log file after the 2nd step of the Control fit. It's also not really clear to me what this does the way it's implemented in Phoebe's code above.

The latter two parameters are fixed to the values found in the Control fit using the fixshapesDD parameter. Also Dalitz corrections are only applied to the DDmu templates, for the DDtau there is one additional OverallSys added called D[st]DtauIsolation which constrains the relative tau vs. muon fraction near it's nominal value with a 30% uncertainty.

manuelfs commented 2 years ago

Thank you very much for tracking all of this down. I wonder whether weightD is some BF correction. By the way, Can you clarify the sentence?

Also no Dalitz corrections are only applied to the DDmu templates

Svende commented 2 years ago

I meant to say (corrected above):

Also Dalitz corrections are only applied to the DDmu templates.

The nominal histograms for the DDtau sample are defined here without the additional weights: weightD & Daltweight[p/m]. So those Dalitz corrections are NOT applied to the tau histograms. The fitting code is here. From discussions with Phoebe this is due to the tau decays are quasi 2-body decays correctly implemented in Evtgen in our decay files whereas the DDmu modes are mainly multi-body decays such as D()D()K which are generated via PHSP.

Svende commented 2 years ago

I clarified some of my questions with Phoebe's help:

  1. Manuel guessed right: weightD is applied depending on the mother of the muon being a D+, D0 or Ds. Those weights account for the inclusive D->muX bf as measured by the PDG, since the cocktail files don't have the appropriate relative weights between them included. Checking the PDG I find slightly different values for D+: 17.6% and D0: 6.8% whereas Phoebe's code seems to use rather the inclusive electron bf for D+: 16.07% & D0: 6.49% (?).
  2. m(DD) is defined here for Dst and here for the D0. This is the invariant mass of the true mother or grandmother (if coming from a Dst) of the muon and the Dst momentum in the former and the muon mother or grandmother and D or D mother (if coming from a Dst) for the latter. The Dalitz weights depend on the kinematical phase space of the decay, by adjusting the min parameters here and here between D0 and Dst.
  3. K*/K fraction weights are independent of the Dalitz weights but Phoebe only applies them in addition to Dalitz weights because of the way the code evolved. The way the DD2B parameter and the histograms are defined, this corresponds to 2 additional histograms with variations of (0-2) of the nominal h_[u/d]UDDmu histograms. Phoebe's explanation: ''The _2Bp histogram corresponds to doubling the contribution of these guys, and the _2Bm corresponds to zeroing out their contribution, such that the valid range for alpha is [-1, infinity]. This choice is by no means unique. I think I started out with the weight being (1+0.2xDD2B) or (1+0.5xDD2B) so it corresponded to giving the selected events weights of 1.2 (0.8 on the other side) or 1.5 (0.5 on the other side). I've ended up here simply because with linear interpolation (and being careful about not forcing normalizations) this is equivalent to Greg's non-interpolated weight exactly and so you can just read off and compare numbers with zero conversion.'' m(X) is defined here and here as the rest mass depending if the muon has a mother or gm and the D0 is coming from a Dst or not.
yipengsun commented 2 years ago

For m(DD), would it be more "correct" if we just use the true masses of the D mesons that are direct daughters of the B meson (I think so)?

Svende commented 2 years ago

not sure I understand, this is the same as what Phoebe is doing. She checks if the muon and D meson have further mother/grandmothers and if they have them they are used in the calculation. Do you mean to ask in addition that they are coming from the B-meson?

manuelfs commented 2 years ago

Thank you very much Svende, that clarifies a lot of things!

For m(DD), would it be more "correct" if we just use the true masses of the D mesons that are direct daughters of the B meson (I think so)?

@yipengsun If by "true masses" you mean "true 4-momenta" then it would indeed be more correct if it was a correction based on a theoretical calculation. Since it is ad-hoc, it is probably better to just do whatever Phoebe did, and see if it works for us as well.

Svende commented 2 years ago

Phoebe uses the true 4-momenta as defined here: https://github.com/umd-lhcb/RDRDstRun1AnalysisPreservation/blob/7fc28713eb8ff359bd6a4a6f0f7d188118f78afd/proc/AddB.C#L3498-L3500

manuelfs commented 2 years ago

Ah, then I don't know what Yipeng was asking.

yipengsun commented 2 years ago

I mean, true momenta of the D mesons of the B daughters, instead of using mother/ gd mother true momenta of the muon and Dst.

But as you said, since it's ad-hoc, we'll just stick with the mother/gd mother approach and call it m(DD)

yipengsun commented 2 years ago

OK, I made some changes to Svende's code and make it run.

To test it out, pull the latest changes w/ git pull, then in the project root of lhcb-ntuples-gen:

make rdx-ntuple-run2-mc-demo-ddx

The generated ntuples are located at:

gen/rdx-ntuple-run2-mc-demo-ddx/ntuple

Phoebe's method and ours give different mDD, mDX.

NOTE: I also renamed & relocated Svende's functions:

yipengsun commented 2 years ago

The fit converged w/ DDX templates replaced. Closed for now.