1 / 14

An Introduction to PAT (1.2 How to access PAT candidates)

An Introduction to PAT (1.2 How to access PAT candidates). Hamed Bakhshian PAT Tutorial 20.09.10. Outline. How to use PAT ? Installation recipes How to run PAT How to analyze PAT output Support and documentation Exercise. Installation recipes. It is very easy :

dutch
Download Presentation

An Introduction to PAT (1.2 How to access PAT candidates)

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. An Introduction to PAT(1.2 How to access PAT candidates) HamedBakhshian PAT Tutorial 20.09.10

  2. Outline • How to use PAT ? • Installation recipes • How to run PAT • How to analyze PAT output • Support and documentation • Exercise

  3. Installation recipes • It is very easy : • In CMSSW_3_8_X, no installation needed ! • The most recent release of PAT is linked to. • To see which version of PAT works with your version of CMSSW, have a look at SWGuidePATRecipes • PAT is regularly updated. Using last version is recommended • Release Notes is also provided

  4. How to run PAT (an example) • The simplest config file so far: test_cfg.py • In this simple config file, you can set the input file(s) and the number of events to be PATified and also the name of output file. • Default settings of PAT can be modified after loading them. • Running this file by cmsRun, generates the PAT.rootfile. This file will be the input file for next analysis.

  5. How to change PAT defaults • Read the default values of settings, using PYTHON The file created in last page Full name of a module The module contents CTRL+D to exit • To change the settings, edit the config file :

  6. How to analyze PAT output The PatBasicAnalyer • For the here explained example have a look at:WorkBookPATAccessExercise • You run the PatBasicAnalyzer using the analyzePatBasics_cfg.py file. Load the PAT Tuple. We will continue mostly with the pat::Jet Load the most important PAT Candidate collections into the analyzer

  7. How to analyze PAT output The PatBasicAnalyer • You find the implementation of the module in plugins/PatBasicAnalyzer.cc: Make the data formats known to the module Read in the InputTags We do this in the constructor of the module Receive the jet collection by label Loop the jet collection

  8. Using FWLite to analyze the output file • For an examples with a FWLiteAnalyzer have a look at: • WorkBookPATExampleFWLite • You can find this FWLite executable in bin/PatBasicFWLiteAnalyzer.cc. • To tell scram that is should compile the source code we need aBuildFile.xml of the following type int the same directory: Here we make the needed libraries known to the compiler This line tells scram to compile our executable

  9. Using FWLite to analyze the output file • You can also make use of a few cfg file features also in FWLite in the meantime. • You can find the parameters for the executable in analyzePatFWLite_cfg.py file: • You see that the cfg file looks pretty much like cfg file in the full framework. In PatBasicFWLiteAnalyzer the parameters are read in like this:

  10. Using FWLite to analyze the output file • Also the rest of the executable has become pretty similar to an EDAnalyzer: Book histograms using the TFileService Loop the events of an input file This is one of the few differences wrtfull framework Receive the Muon collection by edm::Handle

  11. PAT in Real World • This simple recipe works also on the real data : • IMPORTANT : • Turn off MCMatching when work with real-data . from PhysicsTools.PatAlgos.tools.coreTools import * removeMCMatching(process, 'All')

  12. Documentation • SWGuidePATMain documentation page • SWGuidePATRecipesInstallation recipes • WorkBookModule configuration • WorkBookpat::Candidate description • WorkBookTools for event size estimate • WorkBookPAT workflow description • SWGuidePATToolsDescription of workflow configuration tools • WorkBookPATTutorialTutorials and examples to get started • And last but not least: This Tutorial...

  13. Support • For more information on support have a look at SWGuidePAT: • Lecturers & Tutors • Hyper news • Community • POG/PAG contacts • Developers

  14. Exercise • Preparing a work environment • Setup the CMSSW_3_8_4 • All of the exercises are listed in: • https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookPATTutorial • The codes discussed in this lecture can be found at: • Making PATuple • https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookPATTupleCreationExercise • Analyze the output with PatBasicAnalyzer • https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookPATAccessExercise • Use FWLite to analyze the PATuple • https://twiki.cern.ch/twiki/bin/view/CMS/WorkBookPATExampleFWLite

More Related