WARNING: This twiki is outdated , please refer to the main PAT twiki SWGuidePAT

PAT cleaning

Introduction

This page gives an overview of the subject of event cleaning (cleaning). It will answer the following questions:

  • What is cleaning?
  • What are the collections of concern?
  • How to set about the the cleaning for typical candidates of object collections?
  • How does PAT deal with the issue of object cleaning?

It will furthermore provide a small exercise page at the end of this page, which the user may follow on his/her own.

What is event cleaning?

CMSSW provides the user with different high level analysis objects like tracks, muons, electrons, jets or missing transverse energy MET. There are dedicated working groups on the reconstruction of these objects, the Physics Object Groups (POG), with the aim to reconstruct a single object class (e.g. electrons). It may happen that detector information like reconstructed tracks or energy deposits in the calorimeters may appear several times in the event content.

As an example an isolated electron consists of a cluster in the electromagnetic calorimeter (ECAL) accompanied by a track which points to it. The energy deposit in the calorimeter might also appear as a jet (based on calorimetric objects) in the event. Whether these ambiguities should be resolved or not and how this should be done depends on the given type of analysis:

  • In the above example an analysis interested in QCD multijet events will keep the jet. There will be little interest in the rare cases in a multijet event selection were a jet might exist of an isolated electron only.
  • For an analysis of the jet multiplicity in top anti-top events in the semi-leptonic decay channel with an electron in the final state it is vital not to count the isolated electron as an additional jet. It is important to take the corresponding jet out of the jet collection.
  • Analyses which have a natural interest in MET (like the analyses of SUSY signatures) might even have an interest in disentangling non-isolated electrons or muons within jets from the hadronic part of the jet. Though this subject is quite Physics Analysis Group (PAG) specific and will not be covered here.

In the very consequence cleaning would lead to the development of particle flow, which aims at an unambiguous identification and interpretation of each single particle in the event.

Object's class inherent object disambiguation

A related subject, which is not directly part of the event cleaning is the disambiguation of objects, within a single collection. It concerns objects, which are composed of reconstructed information based on different sub-detector components as given in the table below:

object component component reco algorithm
muon TRACKING system MUON system SWGuideMuons
electron TRACKING system ECAL SWGuideEgamma

Here ambiguities might arise from combinatorial issues as part of the linking of the information from the different sub-detectors and the corresponding reconstruction algorithms.

  • E.g. more then one track in the tracking system might point to a super cluster in the ECAL thus leading to more then one electron candidate.
  • Or the reconstructed track segments in the muon system might appear as a so called Standalone Muon or as part of a refitted Global Muon due to the reconstruction algorithms used in the muon POG.

These ambiguities are generally taken care of in the corresponding POG's and sensible default behaviour is provided. Nevertheless your analysis might e.g. require to refine certain id flags, indicated as SelectionType in the reco::Muon structure.

What are the collections of concern?

Typical object collections of concern for event cleaning are given in the table below:

collection of interest to be cleaned from relevance
jets photons analyses with jets and isolated (prompt) photons
jets electrons analyses with jets and isolated electrons
jets muons analyses with jets and muons
jets taus analyses with jets and taus
photon electron analyses of (prompt) photons

The example which will be discussed in the following is the cleaning of jets from isolated electrons, which is most common throughout analyses with isolated leptons.

Object cleaning in PAT

In PAT event cleaning may be applied via python configuration during the PAT Layer1 production. The corresponding python files can be found in

  • CMS.PhysicsTools/PatAlgos/python/cleaningLayer0

be aware that this subject is still under development. Especially all configuration files in the cleaningLayer1 directory belong to a recent systematic remodelling of the event cleaning and are not yet part of the exercises below. The physics principle which has been followed is relatively simple though and therefore not too difficult to understand:

The user may choose to flag an object or element from a given collection as Overlap as soon as an overlap with a specific other collection within a user defined radius in deltaR occurs. The object may just remain flagged (and selected at a later time during the analysis) or discarded from the event content.

As an example have a look at the PAT Layer0 caloJetCleaner_cfi.py. You will find there the following section:

    removeOverlaps = cms.PSet(
        ## Flag or discard jets that match with clean electrons
        electrons = cms.PSet( 
            collection = cms.InputTag("allLayer0Electrons"), ## 
            deltaR = cms.double(0.3), ##
            cut = cms.string('pt > 10'),              ## as in LeptonJetIsolationAngle
            flags = cms.vstring('Isolation/Tracker'), ## request the item to be marked as isolated in the tracker
                                                      ## by the PATElectronCleaner
        ),
        ## Flag or discard jets that match with Taus. Off, as it was not there in TQAF
        #taus = cms.PSet(     
        #    collection = cms.InputTag("allLayer0Taus")
        #    deltaR     = cms.double(0.3)
        #)
        ## flag or discard jets that match with Photons. Off, as it was not there in TQAF
        #photons = cms.PSet(
        #    collection = cms.InputTag("allLayer0Photons")
        #    deltaR     = cms.double(0.3)
        #)
        #muons = cms.PSet( ... ) // supported, but it's not likely you want it
        #jets  = cms.PSet( ... ) // same as above   
        user = cms.VPSet()

Per default jets will be checked for overlap with electrons with the following specifications:

  • the considered electrons are allLayer0Electrons
  • the pt of the electrons should be above 10 GeV
  • the electrons should be flagged as isolated in the tracker (Isolation/Tracker)
  • the electrons are considered as overlap if the distance between the electron and the jet in deltaR is below 0.3

To check the definition of isolation for the allLayer0Electrons collection have a look in the corresponding electronCleaner_cfi.py in the same directory. To check all available flags within PAT have a look into the Flags structure. The logic, which is of relevance for you is given by the Overlap and Isolation bits.

You will further find this section (comment lines have been dropped for the sake of a better overview):

    markItems      = cms.bool(True),    
    bitsToIgnore   = cms.vstring('Overlap/All'), 
    saveRejected   = cms.string(''),
    saveAll        = cms.string(''),

The common default behaviour is to flag jets as Overlap according to the algorithms explained above but to keep them in the original collection (markItems = True, bitsToIgnore = ['Overlap/All']). The flagged jets may be treated at a later point in the analysis. Have a look to the SWGuidePATFAQs to find out how to ask for flagged objects in your analysis.

Alternatively you could have saved an extra collection of rejected objects or the collection of all objects in addition to the selected objects by specifying appropriate collection names in the corresponding section (saveRejected = 'myRejectedJets', saveAll = 'myAllJets'). Furthermore you could easily extend the default overlap algorithm also to check for taus, photons or muons by un-commenting the corresponding parts in the configuration file. Be aware though of what you are doing.

PAT exercises

You can find a a view exercises on the SWGuidePATCrossObjectCollectionExercise.

-- FredericRonga - 12 Jan 2009

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2011-12-02 - RogerWolf
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback