cmsrel CMSSW_7_4_10 cd CMSSW_7_4_10/src cmsenvget the core packages and compile them:
git cms-merge-topic -u gpetruc:TnP-747-Bare scramv1 b -j 8then add the T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbeand compile it:
cd MuonAnalysis/TagAndProbe git checkout 74X-v3 scram b -j 8 cd ../../ scram b -j12The T&P package is now ready to be used. The recipe may change as the package will get updated. This section keeps track of the recipe for the different version of the code.
config.py
). The configuration files used in this tutorial are located in /CMSSW_7_4_10/src/MuonAnalysis/TagAndProbe/test/zmumu
. Two configuration files for the producer are tp_from_aod_Data.py
and tp_from_aod_MC.py
, producing Ntuples from Data and MC samples, respectively. For more details on the structure of the producer config files, have a look at this page. The production step is performed by the command
cmsRun MuonAnalysis/TagAndProbe/test/zmumu/tp_from_aod_MC.pyThe end of the output should be like
MessageLogger Summary type category sev module subroutine count total ---- -------------------- -- ---------------- ---------------- ----- ----- 1 XrdAdaptor -w file_open 6 6 2 fileAction -s file_close 6 6 3 fileAction -s file_open 12 12 type category Examples: run/evt run/evt run/evt ---- -------------------- ---------------- ---------------- ---------------- 1 XrdAdaptor pre-events PostProcessEvent PostProcessEvent 2 fileAction PostProcessEvent PostProcessEvent PostEndRun 3 fileAction pre-events pre-events PostProcessEvent Severity # Occurrences Total Occurrences -------- ------------- ----------------- Warning 6 6 System 18 18and the output file
tnpZ_MC.root
saved in the current directory. This file contains the Ntuples taken as an input by the analyser.
fitMuonID_Simple.py
, which will compute the PF (Loose ID) and relative isolation efficiency for RECO muons as function of pt, eta and the number of vertices. However, the default input Ntuples in this config file don't correspond to the one we just produced, so we have to perform the following modification in fitMuonID_Simple.py
: replace
InputFileNames = cms.vstring("root://eoscms//eos/cms/store/cmst3/user/botta/TnPtrees/tnpZ_Data.190456-193557.root", #"file:tnpZ_MC.root" ), ## can put more than oneby
InputFileNames = cms.vstring("root://eoscms//eos/cms/store/group/phys_muon/TagAndProbe/tnpZ_Data_25ns_Run2015C_v3.root", #"file:tnpZ_MC.root" ), ## can put more than onewhere the modified string correspond to the path of the Ntuple produced in the previous section. Additionally, the following block from line 59 need to be removed (this produce an error when the code is executed )
vpvPlusExpo = cms.vstring( "Voigtian::signal1(mass, mean1[90,80,100], width[2.495], sigma1[2,1,3])", "Voigtian::signal2(mass, mean2[90,80,100], width, sigma2[4,2,10])", "SUM::signal(vFrac[0.8,0,1]*signal1, signal2)", "Exponential::backgroundPass(mass, lp[-0.1,-1,0.1])", "Exponential::backgroundFail(mass, lf[-0.1,-1,0.1])", "efficiency[0.9,0,1]", "signalFractionInPassing[0.9]" ),After this modifications the analyser can be run.
cmsRun MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyThe output is stored in two root files in the current directory:
TnP_Muon_ID_Simple.root
and TnP_Muon_ID_Simple.root
. They contain the efficiency distribution as well as the fit canvases for each bin.
cmsrel CMSSW_7_6_3_patch2 cd CMSSW_7_6_3_patch2/src/ cmsenvget core packages:
git cms-merge-topic gpetruc:fix-muon-associator-hltTracksIter git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbe cd MuonAnalysis/TagAndProbe git checkout 76Xcompile the package
cmsenv cd ../../ scramv1 b -j 10the tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.py
cmsrel CMSSW_7_4_10 cd CMSSW_7_4_10/src cmsenvget core packages:
git cms-merge-topic -u gpetruc:TnP-747-Bare scramv1 b -j 8get the Muon T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbe cd MuonAnalysis/TagAndProbe git remote add HughGit git@github.com:HuguesBrun/MuonAnalysis-TagAndProbe.git git fetch HughGit git checkout 74X-v3.2_fixedcompile the code
scram b -j 8 cd ../../ scram b -j12the tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyRecipe V3.1 set up the release:
cmsrel CMSSW_7_4_10 cd CMSSW_7_4_10/src cmsenvget core packages:
git cms-merge-topic -u gpetruc:TnP-747-Bare scramv1 b -j 8get the Muon T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbe cd MuonAnalysis/TagAndProbe git checkout 74X-v3.1compile the code
scram b -j 8 cd ../../ scram b -j12the tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyRecipe V3 set up the release:
cmsrel CMSSW_7_4_10 cd CMSSW_7_4_10/src cmsenvget core packages:
git cms-merge-topic -u gpetruc:TnP-747-Bare scramv1 b -j 8get the Muon T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbecompile the code
cd MuonAnalysis/TagAndProbe git checkout 74X-v3 scram b -j 8 cd ../../ scram b -j12the tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyRecipe V2 set up the release:
cmsrel CMSSW_7_4_7 cd CMSSW_7_4_7/src cmsenvget core packages:
git cms-merge-topic -u gpetruc:TnP-747-Bareget the Muon T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbecompile the code
scram b -j12the tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyRecipe V1 set up the release:
cmsrel CMSSW_7_4_1 cd CMSSW_7_4_1/src cmsenvget core packages:
git cms-merge-topic -u gpetruc:TnP-74X-Bareget the Muon T&P package:
git clone https://github.com/cms-analysis/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbethe tree production can be test using the config. files:
MuonAnalysis/TagAndProbe/test/zmumu/{tp_from_aod_Data/MC}.pyand the analyser using the config. file:
MuonAnalysis/TagAndProbe/test/zmumu/fitMuonID_Simple.pyRecipe V0
cmsrel CMSSW_7_4_0 cd CMSSW_7_4_0/src cmsenv git clone https://github.com/gpetruc/MuonAnalysis-TagAndProbe.git MuonAnalysis/TagAndProbe ...
weight
to the tree with the proper weight. Given one MC tree MC.root
and one or more Data trees, simply do
root.exe -b -l -q MC.root DATA.root [DATA2.root ... DATAn.root ] addNVtxWeight.cxx+This spits out a "tnpZ_withNVtxWeights.root" tree with a new branch "weight", and also a "nVtx.png" plot for checking. You also need to modify the fitter configuration in three points:
Variables
PSet, declare weight = cms.vstring("weight","0","10","")
WeightVariable = cms.string("weight")
"weight"
variable name to the list of UnbineedVariables
in each PSet under Efficiency
Recipe | Run range | lumi | JSON | Description | Sample/reprocessing | Location/files | Known issues |
---|---|---|---|---|---|---|---|
3.1 | 256630-258159 | 550.1 /pb | Cert_246908-258159_13TeV_PromptReco_Collisions15_25ns_JSON_v2 | JSON file of 9th October | /SingleMuon/Run2015D-PromptReco-v3/AOD | /store/group/phys_muon/TagAndProbe/tnpZ_Data_25ns_run2015D_v3p1.root | see * |
3 | - | JSON_6 | /SingleMuon/Run2015C-PromptReco-v1/AOD | /store/group/phys_muon/TagAndProbe/tnpZ_Data_25ns_Run2015C_v3.root | |||
3 | - | JSON_6 | /SingleMuon/Run2015D-PromptReco-v3/AOD | /store/group/phys_muon/TagAndProbe/tnpZ_Data_25ns_run2015D_v3.root | |||
3 | 246908-255031 | JSON_5 | Run2015C PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_25ns_goldenJSON_246908-255031_withFixes.root | |||
2 | 246908-251883 | JSON_2 | Trigger: HLT_IsoMu20 | Run2015B PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_goldenJSON_246908-251883_HLT_IsoMu20.root | 86.2 % processed | |
2 | 254833 | JSON_4 | Trigger: HLT_IsoMu20 | Run2015C PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_50ns_goldenJSON_254833.root | ||
2 | 254790-254879 | JSON_3 | Trigger: HLT_IsoMu20 | Run2015C PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_25ns_goldenJSON_254790-254879.root | ||
2 | 246908-251883 | JSON_2 | Run2015B PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_goldenJSON.root | 39.647 /pb out of 40.03/pb processed | ||
2 | 251244-251562 | JSON_1 | Run2015B PromptReco | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_251244_to_251562.root | |||
1 | Filtered using trigger: IsoMu24_eta2p1 | /afs/cern.ch/user/g/gpetrucc/public/tnp/tnpZ_Data_run251168.root /afs/cern.ch/user/g/gpetrucc/public/tnp/tnpZ_Data_run251244.root /afs/cern.ch/user/g/gpetrucc/public/tnp/tnpZ_Data_run251251.root /afs/cern.ch/user/g/gpetrucc/public/tnp/tnpZ_Data_run251252.root |
MC Production | Recipe | Sample | Location/files | Known issues |
---|---|---|---|---|
3 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v3/AODSIM | /store/group/phys_muon/TnP_trees_aod747_DY_amcatnlo_50ns_withFixes.root | ||
3 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v1/AODSIM | /store/group/phys_muon/TnP_trees_aod747_DY_LOmadgraph_50ns_withFixes.root | ||
2 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v1/AODSIM | /store/group/phys_muon/TnP_trees_aod747_DY_LOmadgraph_25ns_withFixes.root | ||
2 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v3/AODSIM | /store/group/phys_muon/TnP_trees_aod747_DY_amcatnlo_25ns_withFixes.root | ||
2 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/RunIISpring15DR74-Asympt50ns_MCRUN2_74_V9A-v1/AODSIM | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_DY_LOmadgraph.root | ||
2 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt50ns_MCRUN2_74_V9A-v2/AODSIM | /store/group/phys_muon/TagAndProbe/TnP_trees_aod747_DY.root | ||
1 | configuration in /afs/cern.ch/user/m/mirena/public/TnP/ | /store/relval/CMSSW_7_4_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_MCRUN2_74_V7_gs7115_puProd-v1/ | /eos/cms/store/group/phys_muon/TagAndProbe/ | |
1 | configuration in /afs/cern.ch/user/m/mirena/public/TnP/ | /store/relval/CMSSW_7_4_0/RelValZMM_13/GEN-SIM-RECO/PU25ns_MCRUN2_74_V7_gs7115_puProd-v1/ | /eos/cms/store/group/phys_muon/TagAndProbe/ | |
1 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt50ns_MCRUN2_74_V9A-v2/AODSIM | /store/group/phys_muon/perrin/Ntuples/DYJetsToLL_1/tree.root | ||
1 | /DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/RunIISpring15DR74-Asympt25ns_MCRUN2_74_V9-v3/AODSIM | /store/group/phys_muon/perrin/Ntuples/DYJetsToLL_2/tree.root |