Creating a collection of reco::Muons from the muon PFCandidates
Overview
The PFCandidates of type muon are a subset of the official reco::Muon collection provided by the muon PAG.
The particle flow algorithm can thus be considered as a muon selection, and it is possible to commission this kind of selection
in the same way as the other standard muon selections in CMS.
This page provides a recipe to run an EDProducer:
- reading the standard collection of PFCandidates from the particle flow
- creating a new collection of reco::Muons, from which the muon PFCandidates have been built.
Getting the code and running
scram project CMSSW CMSSW_3_6_1_patch2
cd CMSSW_3_6_1_patch2/src
cmsenv
cvs co -r Colin_RecoMuFromPF_Working RecoParticleFlow/PFProducer
scram b -j 4
cd RecoParticleFlow/PFProducer/test
cmsRun cmsRun createRecoMuonsFromPFCandidates_cfg.py
You get a new collection of muons in the event:
recoMuons_recoMuonFromPFProducer__ANALYSIS
Run the following macro:
root plotRecoMuons.C
It plots the charge of the PFCandidates of type muons, and the charge of the muons in recoMuons_recoMuonFromPFProducer__ANALYSIS.
It is just a check that all PFCandidates of type muons give rise to a reco::Muon candidate in this collection.
Using this code in your analysis.
Just check
RecoParticleFlow/PFProducer/test/createRecoMuonsFromPFCandidates_cfg.py
, which is self-documented.
--
ColinBernet - 26-May-2010