2 Rescale pi0 momentum
Renata Kopecná edited this page 2022-01-27 10:06:00 +01:00

Python sceript used to add a new Kstar mass using corrected pi0 momentum. The script recalculates the pi0 momentum by fixing the Bplus mass to its PDG value. Then, using this new pi0 momentum, the Kstar mass is recalculated and saved. The script loads the selected files (hardcoded paths!) for all years and polarities, adding the recalculated pi0 kinematic variables and the Kstar mass. Then, it applies a cut on the new Kstar mass (100 MeV window from its PDG mass).

Table of Contents

MakeNewKstar()

Performs the recalculation of the Kstar mass. The new pi0 momentum is saved as pi_zero_resolved_PX_scaled, pi_zero_resolved_PY_scaled, pi_zero_resolved_PZ_scaled and pi_zero_resolved_PE_scaled. The recalculated Kstar mass is saved as K_star_plus_M_scaled. The output is saved in a new file by appending _pi0rescaled to the name.

  • Parameters:
    fname = input file name
    tname = tree name
    MC = boolean, if false use data, if true use MC
  • Return: void

cutFile()

Takes the input file, applies a cut on the recalculated Kstar mass to be within 100MeV from the Kstar PDG mass, saves in a new file.

  • Parameters:
    fname = input file name
    tname = tree name
  • Return: void

mergeFiles()

Takes two input files with trees (with the same name tname) and saves the merged tree in a new file.

  • Parameters:
    fname1 = first input file name
    fname2 = second input file name
    outname = output file name
    tname = tree name
  • Return: void