1 / 9

Lecture 2.2: PAT Embedding

Lecture 2.2: PAT Embedding. Andreas Hinzmann RWTH Aachen University PAT Tutorial @ CERN, 4-8 July 2011. Embedding in PAT. This lecture is about a mechanism in PAT introduced to optimize the event size of a pat::Tuple : Embedding

mary
Download Presentation

Lecture 2.2: PAT Embedding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 2.2:PAT Embedding Andreas Hinzmann RWTH Aachen University PAT Tutorial @ CERN, 4-8 July 2011

  2. Embedding in PAT • This lecture is about a mechanism in PAT introduced to optimize the event size of a pat::Tuple: Embedding • In order to save disk space we have to reduce the EventContent to what is really needed. This means to drop some collections from our output pat::Tuple. • But one may want to retain some collections for later uses. • PAT embedding has been conceived for retain useful information without burdening on pat::Tuple size. • We will see: • how to get infos on event size using edmEventSizeTool • what is the issue of internal references • what is the PAT solution – the embedding

  3. EventSize • The typical event size of a standard PAT output, is ~ 6-60 KB • It depends on the user's choice • There are some tools to estimate the event size. They can be useful when you want to decide which content of the event to be kept or dropped • Run this command and see the output file • Have a look at SWGuidePATEventSizefor more details: • https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATEventSize edmEventSize –v patTuple.root

  4. The problem of references • To save disc space reco::Objectscontain pointer references: • Note: • when dropping collections all pointer relations to them turn invalid! • have to know all pointer relations to estimate the consequences. • even when the target collections are still in the event not all ref’s can be resolved in FWLite.

  5. Examples : Jets & CaloTowers • CaloJets keep references to the CaloTowers they were produced from: • NOTE : • when dropping the CaloTower collection the references will turn in valid. • calling the corresponding member function will cause an edm::Exception.

  6. The PAT Answer • The PAT answer is the Embedding of objects into pat::Objects when is required to access them. • The following objects can be embedded: • gsfTrackandSuperCluster in Electron • All of the tracks in Muon • Calo towers in Jets • etc. • You can safely use the’ reference pointer 'in FWLite • Note: Embedding is fully supported in compiled FWLite. Note that some functionality is for the moment not available in InteractiveFWLite (CINT) or PyFWLite. Therefore it is safer to use compiled FWLite code. Configure the input

  7. Embedding Mechanism: pat::Muons/Electrons • There are two different implementations of embedding in PAT. • For pat::Muons/Electrons: • The referencedobjects are hard-copyiedinto the pat::Objects! • Calling the member function for the pat::Objectwill check for embedding internally and return the according references (completely user transparent). • You can safely drop the embedded collection (you should indeed) by the EventContent reducing the size of the pat::Tuple and refer to the embedding objects that became part of the pat::Object itself. Configure the input

  8. Embedding Mechanism: pat::Jets For improved performance, the large pat::Jet objects use a different implementation for embedding: Separate collections containing all the CaloTowers / PFCandidates which were clustered into thepat::Jets are stored. The size of these collections is sensibly smaller w.r.t. the collection of ALL CaloTowers / PFCandidates. The event content then looks like this: patJets_cleanPatJets__PAT CaloTowers_selectedPatJets_caloTowers_PAT PFCandidates_selectedPatJets_pfCandidates_PAT How much space we can gain embedding CaloTowers in pat::Jet collection? You will evaluate this in the exercise! Configure the input

  9. Explain Exercise n°6 • You are ready to go to Exercise 6 section: • https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATEmbeddingExercise • where you will learn: • what the problem of internal references is within the EDM. • how PAT solves this situation. • how to embed extra information into a pat::Candidate. • You will find some Exercises to practice what you have learnt. Please go through all of them and fill the answers into the • e-learning results for this section. • Have fun! Configure the input

More Related