Using Overlap Removal in Analysis

Last update: 14 Nov 2022 [History] [Edit]

The OLR procedure is similar to that of MET. It makes use of object containers with preselection criteria applied. The difference is that as an output, the OLR analysis sequence adds a decoration to every object, indicating whether it is removed or if it can be used in analysis.

The OLR procedure is analysis dependent and only needs to include objects that are needed for the analysis. In our case, the analysis does not use photons or tau leptons, so they are not included in the OLR procedure.

tip The OLR tool assumes all types of objects are used by default. If you want to skip any objects, they need to be turned off explicitly when calling makeOverlapAnalysisSequence.

tip It is sometimes necessary to include objects in OLR that are not part of the final state used in your analysis. If your analysis will be included in a combination, it is often necessary to implement vetoes on other types of objects to ensure orthogonality between channels.

Schedule OLR analysis sequence

Add the following code to makeSequence() in MyAnalysisAlgorithms.py after the preselection algorithms:

    # Include and set up the OLR analysis sequence:
    from AsgAnalysisAlgorithms.OverlapAnalysisSequence import makeOverlapAnalysisSequence
    overlapSequence = makeOverlapAnalysisSequence( dataType, doMuPFJetOR=True,
                                                   doTaus=False, doPhotons=False,
                                                   shallowViewOutput = False,
                                                   inputLabel = 'preselection', outputLabel = 'passOR' )
    overlapSequence.configure(inputName = { 'electrons' : 'AnaElectrons_%SYS%',
                                            'muons'     : 'AnaMuons_%SYS%',
                                            'jets'      : 'AnaJets_%SYS%' },
                              outputName = { } )

    # Add the OLR analysis sequence to the job:
    algSeq += overlapSequence

tip makeOverlapAnalysisSequence automatically treats inputLabel and outputLabel as char, so it is not necessary to include ,as_char.

tip The OLR and MET sequences are scheduled independently of one another. This is because the MET calculation uses a specific overlap removal that is done automatically by the MET tools.

Apply OLR selection to ntuples

Now that the OLR decorations have been added, we need to propagate this to the object selection that is used for filling the ntuples. In execute() in MyxAODAnalysis.cxx, within each object loop (electrons, muons, and jets), add an additional check on the value of passOR.

Test and commit changes

Rerun your job and check the output to make sure it behaves as expected. When you are satisfied that it is working properly, commit and push your changes.