80 likes | 234 Views
Writing user configuration files. Start from PAT default configuration Configure PAT to your needs Change parameters Apply PAT tools Add user modules, sequences. Config Editor. User code. PAT tutorial March 2010 Writing user configuration. Andreas Hinzmann. 1.
E N D
Writing userconfigurationfiles • Start from PAT defaultconfiguration • ConfigurePAT toyourneeds • Change parameters • Apply PAT tools • Add user modules, sequences Config Editor User code PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 1
Write configuration with Config Editor • Getting started with Config Editor and Manual:https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideConfigEditor • Step 0: Setup CMSSW environment • cmsrel CMSSW_3_5_4 • cd CMSSW_3_5_4/src • cmsenv • Step 1: Run Config Editor • edmConfigEditor • Step 2: Create new user configuration file starting fromPAT default configuration • File -> New configurationfile • Config -> Import Config -> patLayer1_fromAOD_full_cfg.py PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 2
Screenshot of Config Editor User configuration code Browse user configuration PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 3
Changing parameters • Step 3: Embed tracks in patElectrons • In centerviewConnection structureclickpatElectrons • In propertyview(on theright) changeparameterembedTracktoTrue Change parameter here Resulting user configuration code PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 4
Applying PAT tools • Step 4: Remove all PAT objects but patElectrons • Config -> Applytool • Select coreTools.removeAllPATObjectsButtoolandreaddesciption • Move mouseoverparameternamestoshowallowedvaluesastool-tip • Set parameternamesto[‘Electrons‘] • Apply Tool description List of PAT tools Change parameter here Parameter description tool-tip PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 5
Modifying user configuration • Step 5: Modify tool to keep patMuonsas well • Select userconfigurationlineremoveAllPATObjectsBut(process,…) • Change parameternamesto[‘Electrons‘,‘Muons‘] Change parameter here Resulting user configuration code PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 6
Resulting user configuration • Step 6: Save userconfigurationandinspectthecode • File -> Save as -> my_cfg.py • Step 7: Run userconfigurationand check output • cmsRun my_cfg.py • edmDumpEventContent PATLayer1_Output.fromAOD_full.root • vector<pat::Electron> “selectedPatElectrons“ ““ “PAT.“ • vector<pat::Muon> “selectedPatMuons“ ““ “PAT.“ • or inspect PATLayer1_Output.fromAOD_full.root with ROOT::TBrowser using FWLite PAT default Modifications PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 7
Remarks • User configurationcreatedbyConfig Editor canbesavedandloaded back intoConfig Editor • Onceyouneedtoaddusermodules, sequences: • Makeuseoftools, modulesandparametersinformationofConfig Editor tocreate a userconfigurationfile • Write yourownconfigurationfileandcopymodificationsfromConfig Editor intoit PAT tutorial March 2010 Writing user configuration Andreas Hinzmann 8