Software for ZToMuMu analysis

People Involved

All the code used in the skim and the analysis, and in general the analysis algorithm has been developed by: A.De Cosa, M.De Gruttola, S.Di Guida, F.Fabozzi, L. Lista, P.Noli, D.Piccolo.

The analysis strategy is explained in details in CMS AN2009/005. That's been approved by the CMS collaboration and the results/plots for 10 pb-1 start-up simulation data led to the CMS PAS-EWK/001.

Introduction

This page collects up-to-date recipes to run the software for the steps of the ZToMuMu analysis, from the skimming to the final fit. The software for the analysis is released in two packages:

ElectroWeakAnalysis/Skimmimg
ElectroWeakAnalysis/ZMuMu

The former package contains the configuration files for the dimuon skim, while the latter contains modules and configurations files for the ZMuMu selection and fit.

Recipe for CMSSW_3_1_X

The following recipes work in CMSSW_3_1_4 and later versions

Dimuon skim

The dimuon skim performs event preselection based on HLT, builds up several collections of dimuons candidates, and store them into the event. An event is selected if it passes the following HLT paths:

"HLT_Mu9"

The configuration files for the dimuon skim are contained into ElectroWeakAnalysis/Skimming/python Note that the skim does not use any modules in the /plugins directory.

The "main" python to run the skim is: ElectroWeakAnalysis/Skimming/test/EWK_ZMuMuSubskim.py The analyzer can run odirectly on RECO or on already muon skimmed samples.

scramv1 project CMSSW CMSSW_3_1_X
cd CMSSW_3_1_X/src
eval `scramv1 run -csh`
cvs co -r V01-00-04   ElectroWeakAnalysis/Skimming
scramv1 b
cd ElectroWeakAnalysis/Skimming/test
cmsRun EWK_ZMuMuSubskim.py

In addition, only the branches useful for the final analysis are kept. The output of the subskim are reduced collections that are suitable for exporting to local T3 sites for the final analysis.

ZToMuMu final selection and histogramming

The final selection and the production of a root file containing the histograms to be used for the fit is made by some configurable modules defined in ElectroWeakAnalysis/ZMuMu/plugins.

The cuts are the following:

dimuon charge = 0
both muons: pT > 20 & |eta| < 2.1
dimuon mass > 20
Iso< 3 (one may choose either tracker or  combined iso, absolute or relative...)

The configuration file is ElectroWeakAnalysis/ZMuMu/test/zToMuMuAnalysis.py.


scramv1 project CMSSW CMSSW_3_1_4
cd CMSSW_3_1_4/src
eval `scramv1 run -csh`
cvs co -r  V01-00-00  ElectroWeakAnalysis/Skimming
scramv1 b
cd ElectroWeakAnalysis/Skimming/test
cmsRun zToMuMuAnalysis.py

Recipe for CMSSW_3_5_X

The following recipes work in CMSSW_3_5_1 and later versions

Dimuon skim

The dimuon skim performs event preselection based on HLT, builds up several collections of dimuons candidates, and store them into the event. An event is selected if it passes the following HLT paths:

"HLT_Mu9"

The configuration files for the dimuon skim are contained into ElectroWeakAnalysis/Skimming/python Note that the skim does not use any modules in the /plugins directory.

The "main" python to run the skim is: ElectroWeakAnalysis/Skimming/test/EWK_ZMuMuSubskim.py The analyzer can run odirectly on RECO or on already muon skimmed samples.

scramv1 project CMSSW CMSSW_3_5_1
cd CMSSW_3_5_1/src
eval `scramv1 run -csh`
cvs co -r  V01-01-04  ElectroWeakAnalysis/Skimming
scramv1 b
cd ElectroWeakAnalysis/Skimming/test
cmsRun EWK_ZMuMuSubskim.py

In addition, only the branches useful for the final analysis are kept. The output of the subskim are reduced collections that are suitable for exporting to local T3 sites for the final analysis.

ZToMuMu final selection and histogramming

The final selection and the production of a root file containing the histograms to be used for the fit is made by some configurable modules defined in ElectroWeakAnalysis/ZMuMu/plugins.

The cuts are the following:

dimuon charge = 0
both muons: pT > 20 & |eta| < 2.1
dimuon mass > 20
Iso< 3 (one may choose either tracker or  combined iso, absolute or relative...)

The configuration file is ElectroWeakAnalysis/ZMuMu/test/zToMuMuAnalysis.py.

cd CMSSW_3_5_1/src
eval `scramv1 run -csh`
cvs co -r  V01-03-02  ElectroWeakAnalysis/ZMuMu
scramv1 b
cd ElectroWeakAnalysis/ZMuMu/test
cmsRun zToMuMuAnalysis.py

New features from 35X

zMuMuGolden selector cfi

A ZMuMuGolden Selector is available to everybody to select golden dimuons (global + global, isolated and matched to the trigger path), i.e. adding just the sequence process.load("ElectroWeakAnalysis.ZMuMu.ZMuMuGolden_cfi”) and including the process.ewkZMuMuGoldenSequence in your path.

This selector can be used by anyone is interested in a physics channel with Z(mumu), for examples Z+Njets, ZW, W'->WZ, ...: it is possible to select all the events having a Zmumu golden (i.d. with the given cuts) and going on looking for other features of the event, with the possibility to save/plot the selected Z candidate(s).

ntuples generation

edm Ntuples generations (besides the histograms) with loose and tight cuts (to study the optimization of each analysis cuts ). The ntuples for each categories contains standard variables (Zmass, Zpt, ZY,.., muonPt, muonEta,…), quality variables (NofHit, chi2,…), isolation (trkIso, ecalIdo,..), triggerBit (fired or not)… All the variables are defined in a EdProducer ad hoc and added to the edm Ntuples.

A standard macro (plot.C) ha been written to create from the ntuples all histograms we think are relevant for the analysis invariant mass, isolation, quality variables, …

cvs co -r HEAD ElectroWeakAnalysis/ZMuMu/test/zToMuMuAnalysis_ntuple.py 
cmsRun zToMuMuAnalysis_ntuple.py
root -l plot.C

edmNtpProducer
new edmNtpProducer is being implemented in order to let the user produce his own edmNtuple via cfg using CandViewNtpProducer ( which has been modified to allow more flexibility)

re-modeling of the code via cff

All the analysis has been remodeled via _cff to be included or not (histogram plotting, ntuples creation, vertex refitting) in the main cfg ZMuMutes/test/ZMuMuCategories_cfg.py
cmsRun ZMuMuCategories_cfg.py

Skimming + analysis in one step

The skim + analysis can be done one-shot including the various _cff from EWK/Skimming and EWK/ZMuMu into the main cfg ZMuMu/test/EWK_ZMuMuAnalysis.py

cmsRun EWK_ZMuMuAnalysis.py

Histogram merging

Histograms can be merged with the utilitiy:

ZToMuMu final fit

Upgrade to the latest utilities, and build the updated fitter program:

addpkg PhysicsTools/Utilities V07-04-02  (needed only in 31X, and not form 35X and newer releases)  
scram b 
cd ElectroWeakAnalysis/ZMuMu/test

Run the fitter on the merged signal + background histogram output file:

zChi2Fit -i histo.root 

More options are available (e.g.: to change the plot format):

zChi2Fit -h

Usage: options_description [options]
Allowed options:
  -h [ --help ]                  produce help message
  -i [ --input-file ] arg        input file
  -m [ --min ] arg (=60)         minimum value for fit range
  -M [ --max ] arg (=120)        maximum value for fit range
  -p [ --plot-format ] arg (=ps) output plot format

Check of Geometrical acceptance

The geometrical acceptance of Zmumu selection can be checked with the analyzer in ElectroWeakAnalysis/ZMuMu/plugins/MCAcceptanceAnalyzer.cc This anylzer run on MC Zmumu signal sample without skim applied.

The analyzer configuration file is ElectroWeakAnalysis/ZMuMu/test/mcAcceptance.py.

cmsRun mcAcceptance.py

systematics on Zmumu


to be filled ------

Output Examples

This code was used for the EWKZMM October Exercise.

Example of plots and efficiencies for signal and background can be seen in the twiki https://twiki.cern.ch/twiki/bin/viewauth/CMS/ZmumuOctoberExercise

Responsible: MicheleDegruttola

-- MicheleDegruttola - 04-Dec-2009

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r8 - 2010-04-30 - MicheleDegruttola
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback