Dimuon validation tool for TK alignment

The method

Misalignments in the tracker detector can be studied using a sample of Y(1s) ->μμ or Z->μμ events looking for biases in the mass of the reconstructed muon pair.

Each selected event, with its reconstructed mass, is put in a bin according to the η,φ of the muons. Then in each bin a fit is performed with Gaussian (for f Y(1s) ->μμ ) or a Breit-Wigner convoluted with a Gaussian (for Z->μμ) and the peak value is retained as the reference mass value for that particular bin. Profiles of the mass values as a function of η, φ of the muons are then obtained, treating positive and negative muons separately, in which misalignments may reveal themselves as modulations and biases.

For the validation of the tracker alignment the ALCARECOTkAlUpsilonMuMu or ALCARECOTkAlZMuMu streams are used, which contain only the skimmed type of collections needed.

This tool uses MuScleFit package to produce the validation plots.



The following instructions refer to the CMSSW 5_3_18 stand-alone validation.

Set up CMSSW (updated for GitHub transition)

export SCRAM_ARCH=slc5_amd64_gcc462
scram p CMSSW CMSSW_5_3_18
cd CMSSW_5_3_18/src/
eval `scram r -sh`
git cms-addpkg MuonAnalysis/MomentumScaleCalibration

Prepare relevant cff for running on the selected events

Copy in MuonAnalysis/MomentumScaleCalibration/python the two attached files

and modify them as needed.

To prepare the list of input files you can use the DAS command line tool documented here and then issue (the file das_client.py can be downloaded here)

python ./das_client.py --limit=9999 --query="file dataset=/DoubleMu/Run2012A-TkAlZMuMu-v1/ALCARECO"

More options are documented here

The latest JSON file can be found in the sub directories of /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12 (e.g. /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Prompt/)

Compile and run

Compile everything

scram b -r

To run the validation job

Download to MuonAnalysis/MomentumScaleCalibration/test the configuration file and the bash script to run the validation.

For the Z->μμ:

For the Y(1s)->μμ: IMPORTANT: You have to edit the bash script to make it point to the right CMSSW_DIR

NB By default jobs are submitted to the cmscaf1nh queue. Check that you have the right privileges to use this queue.

Make the script executable chmod u+x TkAlZMuMu _validation.sh

or chmod u+x TkAlUpsilonMuMu _validation.sh

Run it with ./TkAlZMuMu_validation.sh or ./TkAlUpsilonMuMu_validation.sh


The tool is integrated into the All-in-One tool starting from CMSSW_7_4_X.

Z->μμ validation

Instructions are given for CMSSW_7_4_11 as an example.

cmsrel CMSSW_7_4_11
cd CMSSW_7_4_11/src/
git cms-addpkg MuonAnalysis/MomentumScaleCalibration
git cms-addpkg Alignment/OfflineValidation
scram b -j 12
cd Alignment/OfflineValidation/test

You should now see an exemplary file called zmumuValidate.ini. You can edit this file and do

validateAlignments.py -c zmumuValidate_test.ini -N ZmumuTest

This command will create the directory structure ZmumuTest/ZMuMuValidation/[Name given to the validation in zmumu:*]/[Name given to the alignment in alignment:*]. The macro MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc creates BiasCheck,root in each directory, which contains the mass distributions in each bin along with the fitted shape. The macro MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_Z.C makes a comparison plot of the fitted means from BiasCheck.root and a reference, imported as BiasCheck_Reference.root. A separate macro, MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C, can be used to plot different alignments on top of each other:

root -b -l -q MultiHistoOverlapAll_Z.C+("[file names]","[legend titles]")

where the file names and legend titles are comma-separated and without a space.


Ulascan Sarica usarica@cernNOSPAMPLEASE.ch

Christian Schomakers christian.schomakers@rwth-aachenNOSPAMPLEASE.de

Stefano Casasso casasso@toNOSPAMPLEASE.infn.it

Ernesto Migliore migliore@toNOSPAMPLEASE.infn.it

-- RobertoCastello - 12-Apr-2012

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt LumiList_Run2012A_cff.py.txt r1 manage 0.4 K 2012-05-07 - 18:45 ErnestoMigliore Selection of good run/lumi sections based on JSON file
Unix shell scriptsh TkAlUpsilonMuMu_validation.sh r4 r3 r2 r1 manage 2.5 K 2014-05-13 - 16:53 ErnestoMigliore bash script for submitting the Upsilon->mu mu validation on lxbatch (cmscaf queues)
Texttxt TkAlUpsilonMuMu_validation_cfg.py.txt r2 r1 manage 8.3 K 2012-09-19 - 10:41 ErnestoMigliore Main parameter set file for Y(1s)->mu mu validation
Unix shell scriptsh TkAlZMuMu_validation.sh r2 r1 manage 2.5 K 2014-05-13 - 16:53 ErnestoMigliore bash script for submitting the Z->mu mu validation on lxbatch (cmscaf queues)
Texttxt TkAlZMuMu_validation_cfg.py.txt r4 r3 r2 r1 manage 8.2 K 2014-04-07 - 11:30 ErnestoMigliore Main parameter set file for Z->mu mu validation
Texttxt data_Run2012A_TkAlUpsilonMuMu_cff.py.txt r1 manage 43.4 K 2012-09-07 - 10:26 ErnestoMigliore input list of TkAlUpsilonMuMu alcareco files
Texttxt data_Run2012A_TkAlZMuMu_cff.py.txt r2 r1 manage 27.1 K 2012-05-08 - 10:44 ErnestoMigliore Input list of TkAlZMuMu alcareco files
Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r25 - 2015-09-10 - UlascanSarica
    • 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