Missing Transverse Energy needs to be calculated separately for each analysis because it is determined by the exact object definitions used. To do this, we first need to define a new type of container that allows the MET tools to use only the objects we want and then the MET sequence is scheduled.
At a minimum, the MET tools require a user-defined jet collection for calculation. Additionally, users can define other object collections to be used in MET calculation, but this is not required. Any energy in the detector that is not associated with user-defined object collections is independently incorporated into the MET calculation.
Now that we have our selected object containers, it is time
to schedule the MET calculation. Add the following lines to the config.yaml
file:
# Add MissingET and specify what objects are used in the calculation.
MissingET:
- containerName: 'AnaMET'
jets: 'AnaJets'
electrons: 'AnaElectrons.loose'
muons: 'AnaMuons.medium'
Here, we specify MET calculation on our input object containers with their appropriate selections.
We need to get the correct instance of MET and then write some information to the ntuple. Since MET is a vector in the transverse plane, it can be represented with only two variables.
The most common representation is the most human-readable and consists of the total MET (a scalar quantity) and the azimuthal angle (φ) of the MET. This allows you to quickly assess the magnitude of the MET and its direction.
To define the scalar and azimuthal angle of the MET, add the following
line to the config.yaml
file, in the Output
block:
Output:
...
# Variables associated with MissingET container
metVars: []
...
containers:
...
'met_': 'AnaMET'
The metVars
are specified separately from the other vars
because they
are calculated differently from the other vars
. Once again, we do not ask
for any such additional variables/branches for this ntuple.
Once again, after re-running the code, examine the output ntuple to see branches corresponding to MET information. Commit and push your changes when everything is running correctly.