Previous page
Exclusive tt analysis using full run II CMS data
Overview
This page contain analysis instructions (in development)
On this page:
Usefull Links
- Analysis twiki: ExclusiveTop
- Exclusive ttbar talk (LHC WG on Forward Physics and Diffraction): link
Data and MC samples
Sample |
Xsec |
/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIISummer19UL17MiniAOD-106X_mc2017_realistic_v6-v2/MINIAODSIM |
832 |
These samples produced privately and can be found in CERN EOS
Sample |
Xsec [fb] |
/eos/cms/store/cmst3/group/top/exclusive_top/excl_ttbar_QED/MINIAOD/excl_ttbar_WmLep_QED/ |
0.064 |
/eos/cms/store/cmst3/group/top/exclusive_top/excl_ttbar_QED/MINIAOD/excl_ttbar_WpLep_QED/ |
0.064 |
Configuration file can be found in the
attachment . It consist of several steps:
- Simulation with FPMC of exclusive γγ→tt events
- Interfacing of FPMC output with MadSpin such that only one top quark decays leptonically (including taus)
- Interfacing MadSpin output with Pythia8
- Processing events after hadronization with full CMS detector simulation following by reconstruction
Execute
run.sh
script with correct arguments. The output files will be of a
miniAOD.root
format.
TO UPDATE
Stream |
Lumi |
/MuonEG/Run2017F-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleMuon/Run2017B-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleMuon/Run2017C-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleMuon/Run2017D-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleMuon/Run2017E-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleMuon/Run2017F-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleElectron/Run2017B-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleElectron/Run2017C-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleElectron/Run2017D-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleElectron/Run2017E-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/SingleElectron/Run2017F-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleMuon/Run2017B-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleMuon/Run2017C-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleMuon/Run2017D-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleMuon/Run2017E-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleMuon/Run2017F-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleEG/Run2017B-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleEG/Run2017C-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleEG/Run2017D-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleEG/Run2017E-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/DoubleEG/Run2017F-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/MuonEG/Run2017B-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/MuonEG/Run2017C-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/MuonEG/Run2017D-09Aug2019_UL2017-v1/MINIAOD |
XXX |
/MuonEG/Run2017E-09Aug2019_UL2017-v1/MINIAOD |
XXX |
NTuple production
proton reconstruction and Ntuplizer
Production is performed using
TopLJets2015
analysis package which use PPS reconstruction data. The full instruction for simulating the forward protons can be found in
TaggedProtonsDirectSimulation twiki. The configuration file is attached (
ProtonReco.zip).
scram project CMSSW CMSSW_10_6_10
cd CMSSW_10_6_10/src
cmsenv
git cms-init
git remote add ctpps git@github.com:CTPPS/cmssw.git
git fetch ctpps pps_zx_mc_10_6
git checkout -b test ctpps/pps_zx_mc_10_6
git cms-addpkg IOMC/EventVertexGenerators SimCTPPS/Generators
scram b -r -j8
# ---- Settings for TopLJets2016 ----
#EGM id
git cms-merge-topic cms-egamma:EgammaPostRecoTools
scram b -j8
#B-fragmentation analyzer
mkdir TopQuarkAnalysis
cd TopQuarkAnalysis
git clone -b 94x https://gitlab.cern.ch/psilva/BFragmentationAnalyzer.git
cd -
scram b -j8
#TopLJets package
git clone https://github.com/michael-pitt/TopLJets2015.git -b 106_protonreco
cd TopLJets2015
git remote add upstream https://github.com/pfs/TopLJets2015.git
git checkout 106_protonreco
cd -
scram b -j8
# --------------------------
cd ../..
The following lines should be executed (
CMSSW
should point to your CMSSW setup as explained
here): The code will run both PPS reconstruction and ntuplizer. Option of exclude PU protons from reconstruction is
doPUProtons=False
. To switch off event skimming (defined in
MiniAnalyzer.cc
) you can set
applyFilt=False
.
cd ${CMSSW}/src
eval `scram r -sh`
cd -
cmsRun ${CMSSW_BASE}/src/TopLJets2015/TopAnalysis/test/runMiniAnalyzer_cfg.py runOnData=False era=era2017 inputFile=file:miniAOD.root outFilename=nanoAOD.root maxEvents=-1 runProtonFastSim=120 noParticleLevel=True
NOTE: several options should be considered:
- miniAOD w/o proton reco: The proton simulation should be executed, this is done with
runProtonFastSim=120
option.
- miniAOD with protonreco: No need to proton simulation, just define the inputs properly:
RecoProtons=True
- data: for data use: XXXXXX
- proton simulation: if you wish not to use the PU protons you can add
doPUProtons=False
option
to process miniAOD, one should change the collection name to:
cms.InputTag("prunedGenParticles")
Making validation plots
miniAOD
Helper: set up few Aliases for shorter Draw commands:
Events->SetAlias("genpar","recoGenParticles_prunedGenParticles__PAT.obj")
Events->SetAlias("PUproton","recoGenParticles_genPUProtons_genPUProtons_HLT.obj")
Events->SetAlias("proton","recoForwardProtons_ctppsProtons_singleRP_CTPPSTestAcceptance.obj")
Events->SetAlias("lhe","LHEEventProduct_source__LHEFile.obj.hepeup()")
- To plot top - anti-top invariant mass from the samples, either directly from tops or from the protons
Events->Draw("sqrt((genpar.energy()[2]+genpar.energy()[3])**2-(genpar.px()[2]+genpar.px()[3])**2-(genpar.py()[2]+genpar.py()[3])**2-(genpar.pz()[2]+genpar.pz()[3])**2)")
Events->Draw("2*sqrt( (6500.-genpar.pz()[0])*(6500.+genpar.pz()[1]))")
Events->Scan("lhe.IDUP :lhe.ISTUP")
- To plot proton pZ vs reconstructed pZ (similarly can be made for ξ):
Events->Draw("proton.pz() : genpar.pz()[0]","proton.pz() > 0")
For more variables see
reco::ForwardProton
or
TaggedProtonsGettingStarted.
nanoAOD
To access the output, and plot for example the m
tt spectra run:
root -l nanoAOD.root
TTree * tree = (TTree*)analysis->Get("data")
tree->SetAlias("Et1","sqrt(gtop_pt[2]*gtop_pt[2]*cosh(gtop_eta[2])*cosh(gtop_eta[2])+gtop_m[2]*gtop_m[2])")
tree->SetAlias("Et2","sqrt(gtop_pt[5]*gtop_pt[5]*cosh(gtop_eta[5])*cosh(gtop_eta[5])+gtop_m[5]*gtop_m[5])")
tree->SetAlias("Pzt1","gtop_pt[2]*sinh(gtop_eta[2])")
tree->SetAlias("Pzt2","gtop_pt[5]*sinh(gtop_eta[5])")
tree->Draw("sqrt(gtop_m[2]*gtop_m[2]+gtop_m[5]*gtop_m[5]+2*(Et1*Et2-gtop_pt[2]*gtop_pt[5]*cos(gtop_phi[2]-gtop_phi[5]) - Pzt1*Pzt2))")
//OR
tree->Draw("sqrt(gtop_m[2]*gtop_m[2]+gtop_m[5]*gtop_m[5]+2*(sqrt(gtop_pt[2]*gtop_pt[2]*cosh(gtop_eta[2])*cosh(gtop_eta[2])+gtop_m[2]*gtop_m[2])*sqrt(gtop_pt[5]*gtop_pt[5]*cosh(gtop_eta[5])*cosh(gtop_eta[5])+gtop_m[5]*gtop_m[5]) - gtop_pt[2]*gtop_pt[5]*cos(gtop_phi[2]-gtop_phi[5])) - gtop_pt[2]*gtop_pt[5]*(cosh(gtop_eta[2]+gtop_eta[5])-cosh(gtop_eta[2]-gtop_eta[5])))")
Making flat ntuples
To process the ntuples (nanoAODs) execute the following:
ln -s /eos/cms/store/cmst3/group/top/exclusive_top/excl_ttbar_QED/NanoAOD/excl_ttbar_WmLep_QED.root MiniEvents.root
python $CMSSW_BASE/src/TopLJets2015/TopAnalysis/scripts/runLocalAnalysis.py -i MiniEvents.root -o ntuple.root --njobs 1 -q local --era era2017 -m RunExclusiveTop2020 --skimtree True
PPS reconstruction (data)
Submit to grid
After the local tests are successful, one can process all the data on the grid. Run the following code:
python $CMSSW_BASE/src/TopLJets2015/TopAnalysis/scripts/submitToGrid.py --lfn /store/group/cmst3/user/mpitt/ttbar -j samples.json -c ${CMSSW_BASE}/src/TopLJets2015/TopAnalysis/test/runMiniAnalyzer_cfg.py --only MC --workDir grid --xangle=120
There is a public area to write the output:
/eos/cms/store/group/phys_top/TTbarCentralExclProd
or in private area
/eos/cms/store/cmst3/user/mpitt/ttbar
samples.json
is a file that contains list of MC samples to be submitted to the grid, for example:
{
"MC13TeV_2017_TTJets_v1" : [832, 0, "/TTJets_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIISummer19UL17MiniAOD-106X_mc2017_realistic_v6-v2/MINIAODSIM", "t#bar{t}", 920, true, false, 1]
}
Inspect crab option in
grid/MC13TeV_2017_TTJets_v1_cfg.py
, and submit the jobs with
crab submit -c grid/MC13TeV_2017_TTJets_v1_cfg.py
- Inspect the submission process proceeds:
crab status -d grid/crab_MC13TeV_2017_TTJets_v1
- In case of errors, use
crab status --verboseErrors
for details
- To resubmit failed jobs with extra options:
crab resubmit -d grid/crab_MC13TeV_2017_TTJets_v1 --maxmemory=4000 --maxjobruntime=360 --numcores=1
- To kill the current job:
crab kill -d grid/crab_MC13TeV_2017_TTJets_v1
- The results will appear in
cat grid/MC13TeV_2017_TTJets_v1_cfg.py | grep config.Data.outLFNDirBase | awk '{print $3}' | sed -e 's/"\//\/eos\/cms\//g' | sed -e 's/\/group//g' | sed -e 's/"//g'
Analysis
Plots
execute this and that
Inference
execute this and that
--
MichaelPitt - 2019-12-07