1 / 17

How to Access PAT Candidate Information

How to Access PAT Candidate Information. PAT Tutorial CERN December 2012 lecturer: Andreas Hinzmann (CERN) tutors: Guillermo Breto (UCD), Sudhir Malik ( Nebraska) and the PAT tutorial team. The Pat Tuple. In the morning section you have learned : how to find documentation

elvina
Download Presentation

How to Access PAT Candidate Information

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. How to Access PAT Candidate Information PAT Tutorial CERN December 2012 lecturer: Andreas Hinzmann (CERN)tutors: Guillermo Breto (UCD), SudhirMalik (Nebraska) and the PAT tutorial team

  2. The Pat Tuple • In themorningsectionyouhavelearned: • how to find documentation • how to produce PAT Tuples • how to inspectyourconfigurationfile • how to customizethe PAT Tupleworkflow • how to look at the PAT Tuple Event Content • Nowyou will learnhow to access to PAT Tuplesproduced in • order to performyouanalysis.

  3. The Pat Tuple A PAT Tupleis and EDM file: • Rootfilewithpredifinedfilestructure • Trees of CMS customizedDataFormats (Muon, Electron, Track) TBrowser edmDumpEventContent DataFormat ModuleLabel InstanceLabel Process

  4. Example pat::Muon Typicalclassstructuresfor HEP Collaborations http://cmssdt.cern.ch/SDT/doxygen

  5. Access PAT Tuple • Access is as to normal Rootfile. • PAT provides also moreappropriateaccessmethods: • Analysis performeddirectly on PAT Tuples (BasicAnalyzerconcept) • Withinthe Full Framework (EDAnalyzer) • With FW Lite (FWLiteAnalyzer) • Production of flatntuples (again EDM files) • Analysis performedwithyourrootmacrosorFW/FWLiteanalyzer EDMTuple PAT Tuple EDAnalyzer Full framework FWLiteAnalyzer FWLite

  6. BasicAnalyzerConcept • Decidelatewhetheryouwant to useFWLiteorfullframework • Writethecode to becompatiblewithboth BasicAnalyzer PAT Tuple EDAnalyzer Full framework FWLiteAnalyzer FWLite https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFWLiteExamples#ExampleFive

  7. Example PatMuonAnalyzer Classdeclaration: YourclassinheritsfromBasicAnalyzerclass http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h?revision=1.1&view=markup&pathrev=V00-05-26

  8. Example PatMuonAnalyzer Classimplementation: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/PhysicsTools/PatExamples/src/PatMuonAnalyzer.cc?revision=1.1&view=markup&pathrev=V00-05-26

  9. FWLite or Full Framework? BasicAnalyzer EDAnalyzer FWLite • Veryeasy to wrapthesamecodeintooneortheother • Keepbothifyoulike and usewhatfits best to thecurrentpurposes ...

  10. Recommendations FWLite: Usethisifyouneed quick turn around, whentheanalysistaskisnottoocomplex (would also fit to a singleEDAnalyzer), whenyoucan still handle all objectsthatyoucreate and destroy on your way... Full Framework: Usethiswhentheanalysistasksgrowcomplex, whenyouintend to usecraborbatchsystems, whenyouintend to usetheedm::Event to manage theamount of objectsthatyoucreate and use on the way, whenyouwant flexible (plugin-wise) use of yourcode... Advantage of bothoveryouprivate solution: Easy implementation, easy to learn and to understand, easy to maintain, maximal use of CMSSW infrastructure (i.e. DataFormats, TFileServise, Event managemente.g. no event double counting)...

  11. How to run the examples: • FWLite: • Full Framework: https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookPATAccessExercise

  12. The EDM-Tupleizer • The Analysis Tools Group (AT) also providespre-writtentools • and recommendations to makefully EDM complientflatntuples: • theCandViewNtpProducer: • Itis a genericntupledumper • Easy to configure • Don‘tneed to write c++ code to produceyourflatntuplesfromyour PAT Tuples • More info and examples in the Twiki: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideEDMNtuples

  13. The EDM-Tupleizer • Easy access via stringparsing to variables youwant to store in yourflatntuple https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideEDMNtuples

  14. The EDM-Tupleizer Output • Theoutputis a fulledmcompliantedmTuple, youcaninspectit as it was a standard PAT Tuple... It is still and EDM file: TBrowser edmDumpEventContent InstanceLabel Process ModuleLabel DataFormat

  15. The EDM-Tupleizer Output • Analyzeyour EDM flatntuplewith an interactive/compiledrootmacro • OruseFWLite/fullframwork to makeuse of full CMSSW capabilities. • In theExercise 4 you will find a guideline to deal with EDM flatntuples

  16. Remark • General Remark: • As yousee AT covers a broadbunch of usecasesforanalysisfromsmallestscale/complexity to largestscale/complexity. • Youcanmakeuse of easyaccess to datainformation, and a wholebunch of Services and tools (TFileService, PAT features, Candidate Tools, HepMCtools, POG tools) • All thesetoolsareestablished, acceptedcollaborationwide, tested, maintained, ... • ~50 peopleareworkinghard to make CMSSW youranalysissoftware (comparethis to themanpowersituation in youruniversity) • Don'twaistyour time on there-invention, re-developement, maintainance of youown private framework, spentyour time on physics! • On theother hand thereisalwaysroomfordevelopments/improvement. Joining AT developmentsisrewarded (Credit bypoints).. So, don‘thesitateifyouwish to contribute

  17. Final Remark • Everythingwhichhas beendiscussedhereispart of Exercise 4. Take your time to gothroughit and enjoy!

More Related