1 / 10

Lecture 2.2: PAT Embedding

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

gianna
Télécharger la présentation

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 April 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 in <= CMSSW_3_7_X • Before CMSSW_3_8_X release, the PAT embedding was implemented by • hard-copying the referencedobjects into 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 in >= CMSSW_3_8_X In >=CMSSW 3_8_X the implementation of the embedding has changed resulting in an improvement of the performance in accessing the pat::Object. Let’s see a concrete example: the pat::Jets and the CaloTowers. In 3_8_X a separate collection containing all the CaloTowers clustered to the pat::Jets is stored. Of course its size is sensibly smaller w.r.t. the collection of ALL CaloTowers! But how much space we can gain embedding CaloTowers in pat::Jet collection? Let’s go to the next slide! Configure the input

  9. Embed CaloTowers in pat::Jets What about the size of patJets + CaloTowers w/o embedding and keeping all calo towers ? With CaloTowers embedded patJets_cleanPatJets__PAT. 31604.5 4873.3 CaloTowers_selectedPatJets_caloTowers_PAT. 17484.8 6156.24 Without CaloTowers embedded patJets_cleanPatJets__PAT. 20543 4059.32 CaloTowers_selectedPatJets_caloTowers_PAT. 426.82 289.85 Configure the input Without embedded keeping all the CaloTowers CaloTowersSorted_towerMaker__RECO. 114410 21532.8 patJets_cleanPatJets__PAT. 20543 4059.32 the size of the pat::Jets with calo towers has decreased from 11kB per event with embedding of CaloTowers to 4kBper event without embedded CaloTowers. Keeping all CaloTowers causes an increasing in the size of about 25kBper event More details going through the exercise section 6

  10. 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