Particle Flow in PAT (PF2PAT)

Complete: 3 (missing doc for the new top projection and for the isolation system)

Tutorial: WorkBookPF2PAT

Current Status (25 Aug)

  • PF2PAT+PAT has been adapted to 3_1_X
    • Due to lack of manpower, we have to focus on this release, and to stop maintaining PF2PAT for 2_2_X.
  • PF2PAT+PAT is now producing pat::Electrons corresponding to the PFCandidates of type electron.
  • Migration to the IsoDeposit system done for electrons and muons
    • The particle-based lepton isolation must be studied and tuned! Right now, it is set to a very loose working point in PF2PAT.
  • Core PF2PAT tools (TopProjector) generalization done.

Open subjects

  • neutral particles
    • vertex determination.
  • muons
    • waiting for tracker muons: identification to be done in PFAlgo
    • waiting standalone muons: put in PFBlockAlgo, do something in PFAlgo
    • particle-based isolation to be studied and tuned (volunteer welcome!)
  • electrons
    • isolation to be studied (volunteer welcome)
  • jet energy correction for particle flow jets from PF2PAT (volunteer welcome)
  • b tagging
    • integrate b tagging in PF2PAT+PAT (volunteer welcome)


The PAT (Physics Analysis Toolkit)

An essential goal of the PAT is to provide the analyst with a clean global view of the event, with no double counting of the energy between the various particles in the event. The edm::Event consists of various collections of objects, like electrons, jets, or taus. These collections are reconstructed independently, and can overlap. For example, an isolated electron will very often be reconstructed as a jet as well.

The PAT cleaning procedure for the standard reconstruction consists in:

  • matching the reconstructed objects together
  • decide what is the object to keep in case of overlap
  • produce clean collections with no overlap

Particle flow in the PAT : PF2PAT

Particle flow can be used in the PAT in two different ways. The first way is to replace the standard reconstruction objects by the particle flow objects in the input of PAT layer 0, which will perform the standard Physics objects cleaning. This goal of this cleaning is to avoid that a given object appears in different collections. For example, an isolated electron will also give rise to a CaloJet. The cleaning removes the corresponding jet from the collection of CaloJets.

The second way is PF2PAT, which basically replaces the standard layer 0 of PAT, but is in fact much more than this.

PF2PAT starts from the collection of particles reconstructed by the particle flow.

From this input, it uses the standard reco algorithms to produce the following particle-based Physics objects:

These objects can then be used in input of the PAT layer 1, which will convert them to PAT objects.

PF2PAT makes use of the following features of particle flow to provide clean collections of Physics objects:

  • there is no double counting of the energy in the list of particles, if we assume a perfect particle flow reconstruction.
  • all the particle-based Physics objects are built directly or indirectly from this list of particles.

Software Packages

Top projection, or avoiding double-counting

Event History

The edm::Event is an ensemble of collections, with an apparently flat structure. However, most of the objects stored in these collections keep track of the source objects used in their construction. For example:

  • A PFJet keeps references to its constituents, that are the PFCandidates clustered in the jet.
  • A PFTau keeps a reference to the corresponding PFJet.

This information constitutes the event history, which is made visible in a uniform way by the functions

unsigned             Candidate::numberOfSourceCandidatePtrs()  const;
CandidatePtr      Candidate::sourceCandidatePtr(unsigned i) const;

Which are overloaded in the child Candidate classes, as needed. The event history is analyzed in the so-called top projection.

Binary top projection

A binary top projection module is a producer:

  • with two input collections: the top collection, and the bottom collection.
  • which produces a subset of the bottom collection. An object in the bottom collection is said to be masked if it can be found in the history of at least one of the objects in the top collection. Unmasked objects are the only ones to be copied to the output collection.

Top projection producers are built from the template class TopProjector.

The template class is specialized in the file, which contains the top projection classes used in PF2PAT. The corresponding python configuration files can be found in the PhysicsTools/PFCandProducer/python/TopProjectors directory.

Other top projection classes can be added in the same way, in any client package.

Chained top projection

In PF2PAT, the collection of PFCandidates sent to jet clustering are the ones which:

  • are not flagged as pile-up AND
  • are not an isolated electron AND
  • are not an isolated muon.

The collection of PFCandidates verifying these 3 conditions is obtained by chaining binary top projection modules. Please refer to the PF2PAT sequence.

Particle based algorithms

Particle selectors

The following particle selectors are implemented using the generic selector mechanism:

  • PtMinPFCandidateSelector : select PFCandidates with a pT>pTmin
  • PdgIdPFCandidateSelector : select PFCandidates from the given pdgIds

These selectors keep track of the source PFCandidate, which is necessary to preserve the event history.

Particle based MET

MET is computed by the PFMET module from a collection of PCandidates, by simply doing the vector sum of the PFCandidates transverse energy, and taking the opposite.

Particle based isolation

Tip, idea Particle based isolation in PF2PAT has been refurbished, and migrated to the IsoDeposit system. Documentation to be written.

Pile-up candidate masking

Pile-up PFCandidates are identified in the PFPileUp module. This module reads

  • a collection of PFCandidates
  • a collection of reco::Vertex.
and associates a vertex to the charged PFCandidates. The association is done in two steps. First, the module tries to find a vertex that refers to the same reco::Track as the PFCandidate. If such a vertex can be found, it is associated to the charged PFCandidate. If not, the charged PFCandidate is associated to the closest reco::Vertex in z.

PFCandidates that are associated to a vertex that is not the primary vertex (which is the first vertex in the reco::Vertex collection) are considered as pile-up PFCandidates.

A PileUpPFCandidate is created for each of them, and put into the event. This object contains a reference to the vertex the PFCandidate is associated to.

Non pile-up PFCandidates do not have a reference to the primary vertex, which can anyway always be found at the beginning of the reco::Vertex collection.

ALERT! Neutrals do not get flagged as PileUpPFCandidates, since there is currently no way to identify the neutral pile-up particles.

External algorithms

Jet reconstruction

Standard PFJet reconstruction is used, but the reconstruction is driven by the PF2PAT configuration. This allows the user to decide which particles enter the jets. For example, one can exclude pile up particles from jet reconstruction in the following way:

# noPileUp is the name of a module that produces a collection 
# of non--pile-up [[%PFCANDIDATE%][PFCandidates]]

include "FastSimulation/Configuration/data/FamosSequences.cff"
module kt10PFJetsNoPileUp = kt10PFJets from "RecoJets/JetProducers/data/kt10PFJets.cff"
replace kt10PFJetsNoPileUp.src = noPileUp

The jets in this collection will be used as an input to PAT layer 1, and mask PFCandidates used in the jets.

Tau ID

The PF2PAT jets are fed into the tandard PFTau identification, which produces PFTauDiscriminators. Then, a PFTauSelector is used to create a new collection of PFTaus containing only the PFTaus that passed the discimination.

The taus in this collection will be used as an input to PAT layer 1, and mask the PF2PAT jets they come from.

b tagging

Not yet in place


Warning, important This section is obsolete.

In red are shown the collections that will be used as an input to PAT. The other collections are for detailed studies.

  • Electrons
    • recoPFCandidates_pfAllElectrons__PF2PAT. All electrons
    • recoPFCandidates_pfElectronsPtGt5__PF2PAT. Electrons with pT>5 GeV/c
    • recoIsolatedPFCandidates_pfElectrons__PF2PAT. Isolated electrons
  • Muons
    • recoPFCandidates_pfAllMuons__PF2PAT. All muons
    • recoPFCandidates_pfMuonsPtGt5__PF2PAT. Muons with pT>5 GeV/c
    • recoIsolatedPFCandidates_pfMuons__PF2PAT. Isolated muons
  • Taus
    • recoPFTaus_pfTaus__PF2PAT. Taus passing the discriminator by isolation
  • Jets
    • recoPFJets_pfJets__PF2PAT. All Jets
    • recoPFJets_pfTopProjection_PFJets_PF2PAT. Jets not masked by a tau
  • MET
    • recoMETs_pfMET__PF2PAT. MET
  • Particles
    • recoPileUpPFCandidates_pfPileUp__PF2PAT. Pile-up particles
    • recoPFCandidates_pfNoPileUp_PFCandidates_PF2PAT. Non pile-up particles
    • recoPFCandidates_pfTopProjection_PFCandidates_PF2PAT. Unmasked particles

Analysis Examples




Links to more information

Review status

Responsible: ColinBernet

Reviewer/Editor and Date (copy from screen) CommentsSorted ascending
Last reviewed by: ColinBernet - 18 Mar 2008 created the page

-- ColinBernet - 18 Mar 2008

Edit | Attach | Watch | Print version | History: r26 | r19 < r18 < r17 < r16 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r17 - 2009-08-26 - ColinBernet

    • 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-2020 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