TWiki
>
CMSPublic Web
>
SWGuide
>
WorkBook
>
WorkBookPAT
>
WorkBookPATTutorial
>
WorkBookPATExampleElectron
(revision 8) (raw view)
Edit
Attach
PDF
---+ 7.4.1 PAT Examples: Electron Example <!-- See CMS/WorkBookContributors --> <style type="text/css" media="all"> pre { text-align: left; padding: 10px;margin-left: 20px; color: black; } pre.command {background-color: lightgrey;} pre.cfg {background-color: lightblue;} pre.code {background-color: lightpink;} pre.output {background-color: lightgreen;} pre.task {background-color: yellow;} </style> %COMPLETE5% %BR% [[#ReviewStatus][Detailed Review status]] ---++ Contents %TOC{title="Content"}% #InTro ---++ Introduction In this example you will find how to make a simple analysis (including some more physics contents) with pat::Electrons within a simple EDAnalyzer. You can find the EDAnalyzer and the configuration file in the [[http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/CMS.PhysicsTools/PatExamples/][PatExamples]] package. It will provide you with the following information: * how to access information from the pat::Electron. * how to determine an electron reconstruction efficiency from simulation. * how to estimate an !electronID efficiency applying a simple tag and probe method. It is required that you have a clear picture of: * how to write an EDAnalyzer (in principle). * how to read in parameters from the configuration file. * how to clone modules with different parameters in python. * how to access a pat::Candidate collection from the event content with an EDAnalyzer. ---++ Run the EDAnalyzer example If you've done the setup for the [ggNtuplizer][https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookElectronAnalysis#Create_Ntuples_using_the_ggNtupl], you should already have the necessary files to run an EDAnalyzer example. <pre class="command"> cd CMSSW_9_4_4/src cmsenv </pre> The relevant files for this workbook are in =PhysicsTools/PatExamples and they have the following functionality: * plugins/PatElectronAnalyzer.cc: the main module to book and fill histograms. * python/PatElectronAnalyzer_cfi.py: initialising configuration file for the plugin. * python/tagAndProbeAnalysis_cff.py: simple configuration example for a tag and probe analysis with CMSSW. * test/analyzePatElectron_cfg.py: main configuration file for cmsRun * test/patElectron_recoEfficiency.C: root macro to display the electron reconstruction efficiency from simulation. * test/patElectron_eidEfficiency.C: root macro to display the electronID efficiency from the tag and probe method. <pre class="command"> cmsRun PhysicsTools/PatExamples/test/analyzePatElectron_cfg.py </pre> Compile and run the example as given below: <verbatim> scram b cmsRun PhysicsTools/PatExamples/test/analyzePatElectron_cfg.py </verbatim> You can inspect the outcome using the two root macros which are provided with the example: <verbatim> root -l .x patElectron_recoEfficiency.C .x patElectron_eidEfficiency.C </verbatim> #ReviewStatus ---++ Review status | *Reviewer/Editor and Date (copy from screen)* | *Comments* | | Main.UzzielPerez - 2-Dec-2018 | Update for Run 2, CMSSW 94x | | Main.RogerWolf - 11 june 2009 | Moved from !SWGuidePATExamples | %RESPONSIBLE% Main.RogerWolf %BR% %REVIEW% most recent reviewer and date -- Main.RogerWolf - 11 Jun 2009
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r12
|
r10
<
r9
<
r8
<
r7
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r8 - 2018-12-03
-
CiliciaUzzielPerez
Log In
CMSPublic
CMSPublic Web
CMSPrivate Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Create
a LeftBar
Public webs
Public webs
ABATBEA
ACPP
ADCgroup
AEGIS
AfricaMap
AgileInfrastructure
ALICE
AliceEbyE
AliceSPD
AliceSSD
AliceTOF
AliFemto
ALPHA
ArdaGrid
ASACUSA
AthenaFCalTBAna
Atlas
AtlasLBNL
AXIALPET
CAE
CALICE
CDS
CENF
CERNSearch
CLIC
Cloud
CloudServices
CMS
Controls
CTA
CvmFS
DB
DefaultWeb
DESgroup
DPHEP
DM-LHC
DSSGroup
EGEE
EgeePtf
ELFms
EMI
ETICS
FIOgroup
FlukaTeam
Frontier
Gaudi
GeneratorServices
GuidesInfo
HardwareLabs
HCC
HEPIX
ILCBDSColl
ILCTPC
IMWG
Inspire
IPv6
IT
ItCommTeam
ITCoord
ITdeptTechForum
ITDRP
ITGT
ITSDC
LAr
LCG
LCGAAWorkbook
Leade
LHCAccess
LHCAtHome
LHCb
LHCgas
LHCONE
LHCOPN
LinuxSupport
Main
Medipix
Messaging
MPGD
NA49
NA61
NA62
NTOF
Openlab
PDBService
Persistency
PESgroup
Plugins
PSAccess
PSBUpgrade
R2Eproject
RCTF
RD42
RFCond12
RFLowLevel
ROXIE
Sandbox
SocialActivities
SPI
SRMDev
SSM
Student
SuperComputing
Support
SwfCatalogue
TMVA
TOTEM
TWiki
UNOSAT
Virtualization
VOBox
WITCH
XTCA
Cern Search
TWiki Search
Google Search
CMSPublic
All webs
Copyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use
Discourse
or
Send feedback