-
Notifications
You must be signed in to change notification settings - Fork 2
/
reweighting_recipe.txt
83 lines (70 loc) · 4.55 KB
/
reweighting_recipe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Reweighting (Recipe: https://twiki.cern.ch/twiki/bin/view/CMS/PileupJSONFileforData):
- Get the JSON file corresponding to the processed dataset (/MinimumBias/Run2012C-22Jan2013-v1/RECO)
- Get the latest official 2012 pileup JSON file
- Generate Pileup Histo for data
+ "--minBiasXsec" option to set it to the approved value of 68000 (for 2011) or 69400 (for 2012)
- Get Pileup distribution from MC
-------------------------
CMSSW 5X
-------------------------
cmsrel CMSSW_5_3_11
cd CMSSW_5_3_11/src
cmsenv
git cms-addpkg RecoLuminosity/LumiDB
git cms-addpkg PhysicsTools/Utilities
git clone -b CMSSW-5X https://github.com/jkarancs/PixelTimingStudy DPGAnalysis/PixelTimingStudy
scram b -j 20
- Quick test of the method
cp /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/PileUp/pileup_latest.txt .
dbs search --query "find run, lumi where file=/store/Run2012C/MinimumBias/RECO/22Jan2013-v1/20006/04E396DF-9172-E211-B250-003048FEAF90.root"
echo '{"202504": [[127, 128], [249, 253]]}' > test_input_JSON.txt
RecoLuminosity/LumiDB/scripts/pileupCalc.py -i test_input_JSON.txt --inputLumiJSON pileup_latest.txt --calcMode true --minBiasXsec 69400 --maxPileupBin 50 --numPileupBins 50 DPGAnalysis/PixelTimingStudy/PileupHistogram_test.root
cd DPGAnalysis/PixelTimingStudy
cmsStage /store/user/taroni/Pixel/PUComparisonE/STEP2_normalized.root STEP2_normalized.root .
root STEP2_normalized.root
TH1D* mcpileup = new TH1D("mcpileup","MC Pileup", 50, 0, 50);
Events->Draw("(TrueNumInteractions_)>>mcpileup");
TFile *f= new TFile("PileupHistogram_test.root","update");
mcpileup->Write();
- or Specifify the Imput pileup distribution for MC
- to be used with the MixingModule to recreate the same pileup distribution as in data
root
TFile *f = new TFile("DPGAnalysis/PixelTimingStudy/PileupHistogram_test.root","update");
TH1D* mc_input = new TH1D("mc_input","MC Input Pileup", 50, 0, 50);
TH1D* mcpileup = new TH1D("mcpileup","MC Pileup", 50, 0, 50);
for (int i=1; i<=50; i++) { mcpileup->SetBinContent(i,pileup->GetBinContent(i)); }
for (int i=2; i<=50; i++) { mc_input->SetBinContent(i-1,mcpileup->GetBinContent(i)); }
mcpileup->Write();
mc_input->Write();
cmsRun test/TimingStudy_RecoData_cfg.py
root test/reweight_test.C
- Run 201278 case
cp /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/PileUp/pileup_latest.txt .
echo '{"201278": [[62, 163], [166, 229], [232, 256], [259, 316], [318, 595], [598, 938], [942, 974], [976, 1160], [1163, 1304], [1306, 1793], [1796, 1802], [1805, 1906], [1909, 1929], [1932, 2174]]}' > 201278_input_JSON.txt
RecoLuminosity/LumiDB/scripts/pileupCalc.py -i 201278_input_JSON.txt --inputLumiJSON pileup_latest.txt --calcMode true --minBiasXsec 69400 --maxPileupBin 50 --numPileupBins 50 DPGAnalysis/PixelTimingStudy/PileupHistogram_201278.root
-------------------------
CMSSW 7X
-------------------------
scram project CMSSW CMSSW_7_0_0_pre11
cd CMSSW_7_0_0_pre11/src/
cmsenv
git cms-addpkg RecoLuminosity/LumiDB
git cms-addpkg PhysicsTools/Utilities
echo "cp -r /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimGeneral ."
git cms-addpkg SimGeneral/MixingModule
git cms-addpkg SimTracker/SiPixelDigitizer
cp /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.h SimTracker/SiPixelDigitizer/plugins/
cp /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc SimTracker/SiPixelDigitizer/plugins/
cp /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.h SimTracker/SiPixelDigitizer/plugins/
cp /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.cc SimTracker/SiPixelDigitizer/plugins/
cp /data/hazia/ineff/CMSSW_7_1_0_pre1/src/SimGeneral/MixingModule/python/mix_2012_201278_1_cfi.py SimGeneral/MixingModule/python/
git clone https://github.com/jkarancs/PixelTimingStudy DPGAnalysis/PixelTimingStudy
scram b -j 20
cd DPGAnalyis/PixelTimingStudy
cp /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/Reprocessing/Cert_190456-208686_8TeV_22Jan2013ReReco_Collisions12_JSON.txt input_dataset_JSON.txt
cp /afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions12/8TeV/PileUp/pileup_latest.txt .
RecoLuminosity/LumiDB/scripts/pileupCalc.py -i input_dataset_JSON.txt --inputLumiJSON pileup_latest.txt --calcMode true --minBiasXsec 69400 --maxPileupBin 50 --numPileupBins 50 DPGAnalysis/PixelTimingStudy/PileupHistogram.root
- Make new Branch for CMSSW-5X
git clone https://github.com/jkarancs/PixelTimingStudy
cd PixelTimingStudy
git checkout -b CMSSW-5X ba712ae661