Lecture 2.2: PAT Embedding Andreas Hinzmann Annapaola de Cosa PAT ¡Tutorial, ¡June ¡2010 ¡
Embedding in PAT � The Embedding in PAT is a very useful tool to perform a physics analysis in a “light way”. � 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 � PAT ¡Tutorial, ¡June ¡2010 ¡ 2 ¡
EventSize � • The typical event size of a standard PAT output, is ~ 6-60 KB � − It depends on the user's choice, � − 15M events need about 250 GB → analysis on the laptop... � • There are some tools to estimate the event size. They can be useful when you want to decide which content of event to be kept or dropped � Run this command and see the output file � edmEventSize -a -v -p myEventSize.ps -s myEvtSize.root inputFile.root � Have a look at SWGuidePATEventSize for more details: � https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATEventSize � PAT ¡Tutorial, ¡June ¡2010 ¡ 3 ¡
The problem of references To ¡save ¡disc ¡space ¡ reco::Objects contain 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. � PAT ¡Tutorial, ¡June ¡2010 ¡ 4 ¡
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. � PAT ¡Tutorial, ¡June ¡2010 ¡ 5 ¡
The PAT Answer � Embedding of objects into pat::Candidates: � � i.e. hard-copying the referenced objects into the pat::Candidate on the user's will � • The following objects can be embedded: � gsfTrackandSuperCluster in Electron, � All of the tracks in Muon � Calo towers in JETS � calling the member function will check for embedding internally and return the Configure the input ¡ according references (completely user transparent). � You can safely drop the embedded collection(you should indeed).It's considered in PATEventContent. � 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. PAT ¡Tutorial, ¡June ¡2010 ¡ 6 ¡
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. � Configure the input ¡ • 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! � PAT ¡Tutorial, ¡June ¡2010 ¡ 7 ¡
Recommend
More recommend