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

Add new skims, fit variables without vertex smearing, truthmatching to step 2 ntuples #133

Closed manuelfs closed 2 weeks ago

manuelfs commented 1 month ago

A new production of step 2 ntuples is needed with the following features

afernez commented 1 month ago

For the $\phi$-enriched sample, the cuts/weights the angular analysis use are essentially the DD cut/weight times this: $1015 \lt m_{KK} \lt 1023$ MeV + oppositely charged tracks (and require long tracks).

manuelfs commented 1 month ago

Thanks for finding their cuts.

He calls them pions, but since they pass ProbNNk_Greater cuts and the main way to reconstruct $\phi$ mesons is via their $\phi \rightarrow KK$ decay, I think they are kaons.

afernez commented 1 month ago

Yeah, you're right, I just wasn't thinking. Edited my comment

afernez commented 1 month ago

Working on finishing the yml file up with all these things included, and then I'll start the step-2 production, but first to check: are the HLT flags/weights you're referring to just k_hlt1_trackmva_tos(_emu), pi_hlt1_trackmva_tos(_emu), d0_hlt1_twotrackmva_tos(_emu)? Because these are already included in our step-2 tuples.

manuelfs commented 1 month ago

Ah, great. I checked the yml file, and it doesn't have the emu versions, but I now realize that they may be added via auxiliary files.

manuelfs commented 1 month ago

I committed a first version of the weights for the proton sample with the Brunel_MC15TuneV1_ProbNNp > 0.4 cut. This i the PID variable that we use for protons in the misID unfold. I also added a few words about PID weights to the README.

I'm thinking that the weights will be different for the D** if we want to use them to mock up the Lambdas.

manuelfs commented 1 month ago

By the way, I noticed that wskim_dd_new is not consistent with is_dd_new due to a missing GhostProb cut.

manuelfs commented 1 month ago

I checked the DDX truthmatching. It now separates 4 kinds of DDX adding up the codes here. The code looks good.

On a pure DDspi file like 11894400, 100% of events satisfy truthmatch == 120000, as expected.

On a D0mu sample DDX file like 11894600, I get

image

given the breakdown of decays in the .dec file shown below, the truthmatching seems indeed fine if we allow for the DDspi efficiency to be about twice as high as for the other modes, and the DD efficiency to be lower.

dd_3body_k   = 10000;  -->  52.12% of total
  0.10951      MyOtherD*- MyD*0 K+             PHSP;
  0.07331      MyD*- MyOtherD*0 K+             PHSP;
  0.05011      MyD*+ MyOtherD*- K0             PHSP;
  0.03990      MyD*+ MyD- K0                   PHSP;
  0.03062      MyD*- MyOtherD*0 K*+            PHSP;
  0.03062      MyD*+ MyOtherD*- anti-K*0       PHSP;
  0.02320      MyD- MyD0 K*+                   PHSP;
  0.02320      MyD- MyD*0 K*+                  PHSP;
  0.02227      MyD*0 MyOtheranti-D*0 K0        PHSP;
  0.01856      MyD*- MyOtherD0 K+              PHSP;
  0.01670      MyD*- MyD+ anti-K0              PHSP;
  0.01670      MyD*- MyOtherD0 K*+             PHSP;
  0.01578      MyD*+ MyD- anti-K*0             PHSP;
  0.01021      MyD0 MyOtheranti-D*0 K0         PHSP;
  0.00993      MyD- MyD0 K+                    PHSP;
  0.00928      MyD*0 MyOtheranti-D*0 K*0       PHSP;
  0.00464      MyD*0 MyOtheranti-D0 K0         PHSP;
  0.00464      MyD0 MyOtheranti-D0 K*0         PHSP;
  0.00464      MyD0 MyOtheranti-D*0 K*0        PHSP;
  0.00464      MyD*0 MyOtheranti-D0 K*0        PHSP;
  0.00278      MyD0 MyOtheranti-D0 K0          PHSP;

dd_2body_Ds  = 2000;  -->  35.85% of total
  0.10951      MyD*- MyD_s*+                   SVV_HELAMP  0.4904 0.0 0.7204 0.0 0.4904 0.0;
  0.05754      MyD*+ MyD_s1-                   SVV_HELAMP  0.4904 0.0 0.7204 0.0 0.4904 0.0;
  0.04919      MyD*- MyD_s+                    SVS;
  0.03898      MyD_2*- MyD_s+                  STS;
  0.03712      MyD_2*- MyD_s*+                 PHSP;
  0.02227      MyD_1- MyD_s*+                  SVV_HELAMP  0.48 0.0 0.734 0.0 0.48 0.0;
  0.01114      MyD'_1- MyD_s*+                 SVV_HELAMP  0.48 0.0 0.734 0.0 0.48 0.0;
  0.01114      MyD_1- MyD_s+                   SVS;
  0.00928      MyD*+ MyD_s0*-                  SVS;
  0.00557      MyD'_1- MyD_s+                  SVS;
  0.00371      MyOtherD'_s1- MyD+              SVS;
  0.00306      MyD*+ MyD'_s1-                  SVV_HELAMP  0.4904 0.0 0.7204 0.0 0.4904 0.0;

dd_34body_pi = 20000;  -->  10.95% of total
  0.03434      MyD_s*+ Myanti-D0 pi-           PHSP;
  0.03434      MyD_s+ Myanti-D0 pi-            PHSP;
  0.02042      MyD_s*+ Myanti-D0 pi- pi0       PHSP;
  0.02042      MyD_s+ Myanti-D0 pi- pi0        PHSP;

dd_2body     = 1000;  -->  1.07% of total
  0.00508      MyD*+ MyOtherD*-                SVV_HELAMP  0.47 0.0 0.96 0.0 0.56 0.0;
  0.00377      MyD*- MyD+                      SVS;
  0.00188      MyD*+ MyD-                      SVS;
manuelfs commented 1 month ago

I added the variable phi_m with the invariant mass of the two least isolated opposite-charge long tracks. Alex added useful branches to select a phi-enriched sample in data (is_phi) and in MC (wphi).

Running over 10 data files we get a phi peak similar to Run 1's (Fig. 119 in the ANA note), albeit with a bit more background.

image

Since the cuts are the same as in the dd skim, the kaon may not be actually used to form the invariant mass. If we wanted less background we could require that 1 or 2 of the tracks in the invariant mass satisfy the kaon PID, but that would require calculating new weights and performing a standalone fit, so it is easier to keep the dd selection.

image

Events in the 1015 < phi_m < 1023 mass region are 1-1.5% of the total events in the dd skim, depending on the PID cuts.

I checked the branches in D0mu sample DDX MC 11894600 as well.

image