diff --git a/Rescale-pi0-momentum.md b/Rescale-pi0-momentum.md new file mode 100644 index 0000000..5fa8ebe --- /dev/null +++ b/Rescale-pi0-momentum.md @@ -0,0 +1,29 @@ +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). + +### 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 \ No newline at end of file