TWiki
>
CMSPublic Web
>
SWGuide
>
SWGuideMuons
>
SWGuideMuonSystemRecoTutorials
>
SWGuideStandAloneMuonReco
(2009-03-04,
unknown
)
(raw view)
E
dit
A
ttach
P
DF
---+!! Stand-Alone Muon Reconstruction %COMPLETE5% %BR% %TOC{title="Contents:"}% ---++ Goals of this page This tutorial shows how to run the reconstruction of muon tracks in the CMS muon spectrometer (muon system alone) and to analyze its output. ---++ Contacts Riccardo Bellan (Riccardo.Bellan@cern.ch) #InTro ---++ Introduction The muon reconstruction chain starts with the "local reconstruction", i.e. the reconstruction of hits in DTs, CSCs and RPCs. Hits within each DT and CSC chamber are then matched to form "segments" (track stubs). %INCLUDE{"WorkBookMuonAnalysis" pattern="(?:.*?<!--STOPWORKBOOK-->){0}.*?<!--STARTWORKBOOK-->(.*?)<!--STOPWORKBOOK-->.*"}% Standalone muon tracks are then matched with tracker tracks to form [[WorkBookMuonAnalysis#GlobalMu]["global muons"]]. A schematic view of the steps of muon reconstruction is shown below. <img alt="MuonReco.gif" src="%ATTACHURL%/MuonReco.gif"></img> The local reconstruction chain and all details of the production of DT and CSC segments are presented in the [[SWGuideMuonLocalReco][tutorial on local muon reconstruction]]. In the present tutorial we focus on the standalone muon track reconstruction, starting from a data file containing already reconstructed segments. #SetEnv ---++ Set up your environment %INCLUDE{"WorkBookEnvIncludeNew" pattern=".*?<!--STARTWORKBOOK-->(.*?WBRELEASENEW.*?)<!--STOPWORKBOOK-->.*"}% You don't need to checkout and compile any package to run the reconstruction, you simply need an input sample and a configuration file. ---++ Samples You can use your favorite already-available sample, or generate one from scratch. The output of the [[SWGuideMuonLocalReco][tutorial on local muon reconstruction]] can be used as input for this step. For this tutorial we assume that the sample used in the following already contains: * the DT segments * the CSC segments * the RPC rechits. #ConFig ---++ Configuration file Checkout the following package: <verbatim> addpkg RecoMuon/StandAloneMuonProducer cvs co -r V01-00-05-04 RecoMuon/StandAloneMuonProducer/test/StandAloneMuon_cfg.py </verbatim> This package contains the blocks of configuration files and sequences needed to run the standalone muon reconstruction. These files contain default values for the parameters, and can be included in user's configuration files. The user is not supposed to modify these files directly, but can override a card modifying the values of parameters in the cfg file. * =python/= directory: contains =cff= files that you can include in your =cfg= file to run the standalone muon reconstruction; * =test/= directory: provides some =cfg= files as example. In the following we will use the =StandAloneMuon_cfg.py= configuration file. #ProdChain ---++ The Production Chain In general, to run the Standalone Muon production starting from the output of the local muon reconstruction the cfg file needs to contain: * the =Source= block to specify a file containing DT, CSC and RPC segments and rechits * the magnetic field and geometry =cfi= files, and some services * the module blocks included as =cfi= files for the actual reconstruction: * the Muon Seed producer module (=MuonSeed=) * the Standalone Muon Track producer module (=standAloneMuons=) * the =OutputModule= to define an output file * the =Path= defining the sequence of modules to be executed * =process.p = cms.Path(process.MuonSeed * process.standAloneMuons)= You can get the configuration files for these modules with the simple include statement: <verbatim> process.load("RecoMuon.Configuration.RecoMuon_cff") </verbatim> You may also want to add one or more analyzer modules. To do this you have to specify them and to add them at the end of the execution path. #RunProd ---++ Run an Example Production Job In the following we will run the example job: <verbatim> RecoMuon/StandAloneMuonProducer/test/StandAloneMuon_cfg.py </verbatim> which produces the Muon Seeds and Standalone Muon Tracks. To run the job you must: 1. Modify the =StandAloneMuon_cfg.py= file in order to use your sample and decide where to write the output file: i. Modify the =Source= section to point to your favorite sample i. Modify the =OutputModule=: =fileName = cms.untracked.string('/tmp/RecoSTAMuons.root')= 1. Run the job: =cmsRun -p !StandAloneMuon_cfg.py > & ! $SCRATCH/StandAloneMuon.out &= At the end of the job the =/tmp/StandAloneMuon.root= output file will contain all the objects produced by the standalone muon reconstruction. You can then analyze it either using a CMSSW analyzer or browsing it with a ROOT TBrowser. #RunAna ---++ Run An Example Analyzer We also add a simple analyzer to fill a histogram of the p<sub>T</sub> resolution of the muons. It is implemented in: =RecoMuon/StandAloneMuonProducer/test/= [[http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoMuon/StandAloneMuonProducer/test/STAMuonAnalyzer.h?rev=HEAD&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup][STAMuonAnalyzer.h]] and [[http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoMuon/StandAloneMuonProducer/test/STAMuonAnalyzer.cc?rev=HEAD&cvsroot=CMSSW&content-type=text/vnd.viewcvs-markup][STAMuonAnalyzer.cc]]. *Note:* you can have a look at the code to find an example about how to access the collection of muon =reco::Track= in the event, loop on it and extract relevant information. In the configuration file, the analyzer is specified as: <verbatim> process.STAMuonAnalyzer = cms.EDAnalyzer("STAMuonAnalyzer", DataType = cms.untracked.string('SimData'), StandAloneTrackCollectionLabel = cms.untracked.string('standAloneMuons'), MuonSeedCollectionLabel = cms.untracked.string('MuonSeed'), rootFileName = cms.untracked.string('STAMuonAnalyzer.root') ) </verbatim> You can add it to the =path= defined in the production cfg file to combine reconstruction and histogramming tasks in the same job. *Note:* you will find both the analyzer module and the corresponding path _commented_ in =StandAloneMuon_cfg.py=. You only need to uncomment them (and comment the default path) to have the analyzer run. The analyzer produces the output file <nop>STAMuonAnalyzer.root containing the p<sub>T</sub> and 1/p<sub>T</sub> resolution plots. <img src="%ATTACHURLPATH%/res.gif" alt="res.gif" width='500' height='400' /> #ReviewStatus ---++!! Review status | *Reviewer/Editor and Date (copy from screen)* | *Comments* | | Main.RiccardoBellan - 30 Nov 2006 | Added initial info | | Main.GianlucaCerminara - 09 Feb 2007 | Update to CMSSW_1_2_2 | | Main.JennyWilliams - 23 Mar 2007 | reinstated manual contents to enable pdf generation | | Main.DanieleTrocino - 24 Feb 2009 | Update to CMSSW_2_1_12, cfg moved to !StandAloneMuonProducer package | %RESPONSIBLE% Main.RiccardoBellan, Nicola Amapane %BR% %REVIEW% Main.SlavaValuev - 04 Mar 2009
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
gif
MuonReco.gif
r1
manage
4.7 K
2006-11-27 - 11:12
UnknownUser
gif
res.gif
r1
manage
10.2 K
2006-11-27 - 11:12
UnknownUser
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r29
<
r28
<
r27
<
r26
<
r25
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r29 - 2009-03-04
-
unknown
Log In
CMSPublic
CMSPublic Web
CMSPrivate Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Offline SW Guide
Summary of Changes
Site Map
Preface
Contributors Guide
Developers Guide
Offline Workbook
Glossary/Index
User Support
Reference Manual
Main Areas
Framework and EDM
Detector Description
Event Generation
Full Simulation
Fast Simulation
Calibration and Alignment
Conditions Database
High Level Trigger
L1 Trigger
Online Selection
Reconstruction
Detector Reco Objects
Tracks
Ecal Reco
Hcal Reco
Muon System Reco
Vertex Reco
Physics Reco Objects
Muons
Electrons/Photons
Jets, missing ET
b Tagging
Particle flow
Tau-ID
Analysis/Software Tools
Physics Tools
MC Truth Tools
Visualization
Trouble Shooting
Code Performance
Port to New Release
CRAB
Analysis Examples
Higgs
SUSY/BSM
Electroweak
Top
Heavy Ions
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