The Rest of Event (ROE)

3.4.3. The Rest of Event (ROE)#

After the reconstruction of the signal particle list it is very useful to look into the the particles that are not associated to the signal particle list. In basf2 these particles are called “Rest of Event” and this is the main topic of the chapter.

The Rest of Event (ROE) can contain a lot of information: in case of B-physics, the ROE of one B-meson includes particles from the partner B-meson and in case of charm and tau analysis, the ROE of the lepton has the partner lepton.

Exercise

Find the documentation of the ROE module. What are its use cases for tagged and untagged analyses?

Basics#

In this chapter we will continue our work on the steering file from the last lesson. Remember that you have reconstructed a \(B^0\) particle list. We now want to reconstruct the Rest of Event of the \(B^0\).

Exercise

Look up how to create a Rest Of Event for your particle list (it’s a single line of code). Add the fillWithMostLikely=True option.

That’s it, the ROE has been reconstructed! Behind these python curtains, a RestOfEvent object is created for each particle in the \(B^0\) particle list and it includes all other charged or neutral particles, that have not been associated to the corresponding signal candidate. By default, the charged particles are assumed to be pions, and the neutral particles use the photon or \(K_L^0\) hypothesis.

ROE variables#

In principle, one can already try to use some of the Rest of Event variables.

Exercise

Find documentation for the Rest Of Event variables.

Among the most universal and useful are ROE invariant mass roeM or ROE energy roeE. Also, one can call nROE_Charged or nROE_Photons to know how many charged particles or photons entered the ROE.

Remember that we were collecting all variables in the b_vars list. Let’s include the following lines to have a useful selection of them:

# ROE variables [S20|S50]
roe_kinematics = ["roeE()", "roeM()", "roeP()", "roeMbc()", "roeDeltae()"]
roe_multiplicities = [
    "nROE_Charged()",
    "nROE_Photons()",
    "nROE_NeutralHadrons()",
]
b_vars += roe_kinematics + roe_multiplicities  # [E20]

Exercise

Run your steering file and check that it completes without error.

In principle we could already start to do an analysis. However, the ROE variables that we have just defined are not quite useful yet: we first need to “clean up” the ROE. For this, we define ROE masks.

ROE masks#

The main philosophy of the ROE is to include every particle in the event, that has not been associated to the signal candidate. That is why a typical ROE contains not only the partner particle (e.g. the tag or signal B), but also all other particles, like hadron split-off particles, \(\delta\)-rays, unused radiative photons, beam-induced background particles or products of kaon or pion decays. It is up to the analyst to decide what particles actually matter for the analysis. This is called “cleaning up” the ROE. For this procedure, ROE masks are used.

ROE masks are just sets of selection cuts to be applied on the ROE particles.

For our example, let’s start by defining the following selection cut strings:

# build the rest of the event [S10|S30|S40]
ma.buildRestOfEvent("B0", fillWithMostLikely=True, path=main)  # [E10]
track_based_cuts = "thetaInCDCAcceptance and pt > 0.075 and dr < 5 and abs(dz) < 10"
ecl_based_cuts = "thetaInCDCAcceptance and E > 0.05"  # [E30]

Here we created different cuts for charged particles, like electrons or charged pions, and for photons, because of different methods of measurement used to detect these particles.

Tip

These are example cuts, please use official guidelines from Charged or Neutral Performance groups to set up your own selection in a “real” analysis.

Exercise

Create a ROE mask using the charged_cuts and photon_cuts strings with the appendROEMask or appendROEMasks function.

Now we have created a mask with a name my_mask, that will only allow track-based particles that pass selection cuts track_based_cuts and ECL-based particles, that pass ecl_based_cuts.

The analyst can create as many ROE masks as needed and use them in different ROE-dependent algorithms or ROE variables. For ROE variables, the mask is specified as an argument, like roeM(my_mask) or roeE(my_mask).

In the last section, we defined two lists of ROE variables (roe_kinematics and roe_multiplicities). Now we want to have the same variables but with the my_mask argument. Since we’re lazy, we use a python loop to insert this argument.

Exercise

Write a for loop that runs over roe_kinematics + roe_multiplicities and replaces the () of each variable with (my_mask). Add these new variables to the b_vars list.

Tip

There are also KLM-based hadrons in ROE, like \(K_L^0\) or neutrons, but they are not participating in ROE 4-momentum computation, because of various temporary difficulties in KLM reconstruction. Nevertheless, one can count them using nROE_NeutralHadrons variable.

Exercise

Your steering file is now complete. Run it!

Quick plots#

Exercise

Plot ROE invariant mass and number of charged particles in ROE distributions and compare masked and unmasked ROE. Column names in the ntuple:

roeM

nROE_Charged

Unmasked ROE

roeM__bo__bc

nROE_Charged__bo__bc

ROE with my_mask

roeM__bomy_mask__bc

nROE_Charged__bomy_mask__bc

ROE mask comparison

Fig. 3.23 Distributions of ROE invariant mass (left) and number of charged ROE particles (right).#

Fig. 3.23 shows a comparison of roeM and nROE_Charged distributions for ROE with mask my_mask case and ROE with no mask applied.

Exercise

Take another look at Fig. 3.23 and describe what you see. Can you explain the differences between the masked and unmasked variables?

This concludes the Rest of Event setup as a middle stage algorithm to run Continuum Suppression (CS), Flavor tagging or tag Vertex fitting.

Key points

  • The ROE of a selection is build with buildRestOfEvent

  • ROE masks are added with appendROEMask or appendROEMasks. Use them to clean up beam-induced or other background particles.

  • For many analyses ROE is used as middleware to get tag vertex fit, continuum suppression or flavor tag.

  • Usage of ROE without a mask is not recommended.

Authors of this lesson

Sviatoslav Bilokin, Kilian Lieret