--
CandanDozen - 2022-01-06
This is a description of the
NanoAOD framework for advanced development of Tprime and
SingleTop analyses for RUNII.
The code consists of the main class
NanoAODAnalyzerrdframe and two child classes
TprimeAnalayser and
SingleTopAnalyser
There is one .h header file and one .cpp source file for it. The class has several methods:
Object definitions (These objects could be electrons, muons, jets, missing energy, etc...)
Additional derived variables definition (defineMoreVars)
Histogram definitions (bookHists)
Selections (defineCuts)
Some utility methods/functions (gen4vec, readjson, removeOverlaps, helper_1DHistCreator, createHists)
Users should modify: object definitions, define additional variables, histogram definitions, selections.
RECIPE:
Event Selection:
The first event selection requirements: select triggers and minimal selection criteria.
The "defineCuts" function in "TprimeAnalyser" is a Filter method of RDF. As an example In the "definecuts" function, we require that each event have one muon.
C++
void
TprimeAnalyser::defineCuts()
addCuts("numberof_muon_pass
= 1 && numberof_veto_electron_pass =
0 && numberof_veto_muons == 0","0");
Users should add more Filter statements according to the analysis requirements.
Lepton Selection Criteria:
What constitutes a good electron?
For any physics object, the selection criteria typically include:
kinematic constraints (momentum, pseudorapidity, masses of object pairs, etc)
identification requirements (loose, medium, tight quality levels). We have stored all of these labels as boolean pass/fail variables.
isolations requirements (loose, medium, tight isolation levels).
Select Electrons based on ID selection:
Electron ID reference pages:
Run II recomendation - cutbased:
https://twiki.cern.ch/twiki/bin/view/CMS/CutBasedElectronIdentificationRun2
Run II recommendation:
https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaRunIIRecommendations
C++
std::string
TprimeAnalyser::ElectronID(std::string cutbasedID){
if(_isRun17 || _isRun18) {
if (cutbasedID=="Loose"){
Electron_cutBasedID=2;
......other cuts if it is different than working points..
}else if(cutbasedID=="Medium"){
Electron_cutBasedID=3;
......other cuts if it is different than working points..
}else if(cutbasedID=="Tight"){
Electron_cutBasedID=4;
......other cuts if it is different than working points..
}
}
//write output in a string format with selection criteria on electron momentum, pseudorapidity, identification level, and isolation level.
string output = Form("Electron_pt>%f && abs(Electron_eta)<%f && Electron_cutBased == %d && ((abs(Electron_deltaEtaSC<=%f) && abs(Electron_dxy) < %f && abs(Electron_dz) < %f ) || (abs(Electron_deltaEtaSC>%f) && abs(Electron_dxy) < %f && abs(Electron_dz) < %f))",cutdb->Md_Electron_pT,cutdb->Md_Electron_eta,Electron_cutBasedID,Cut_Electron_deltaEtaSC,Cut_dxy,Cut_dz,Cut_Electron_deltaEtaSC,Cut_dxy,Cut_dz);
return output;
Find Good Electrons:
Define goodelectrons/new variables in the "selectElectrons" function as follow:
void
TprimeAnalyser::selectElectrons(){
_rlm = _rlm.Define("goodElectrons",
ElectronID("Loose"));
_rlm = _rlm.Define("Selected_electron_pt", "Electron_pt[goodElectrons]") // define new variables
....
}
Baseline muon selections:
https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideMuonSelection
Jet Identification for the 13
TeV UL data:
https://twiki.cern.ch/twiki/bin/view/CMS/JetID13TeVUL#Recommendations_for_the_13_T_AN1
useful links for analysis.
Electrons
https://twiki.cern.ch/twiki/bin/view/CMS/EgammaPOG
https://twiki.cern.ch/twiki/bin/view/CMS/EgammaRunIIRecommendations
https://twiki.cern.ch/twiki/bin/view/CMS/EgammaIDRecipesRun2
https://twiki.cern.ch/twiki/bin/view/CMS/CutBasedElectronIdentificationRun2
Muons
https://twiki.cern.ch/twiki/bin/view/CMS/MuonPOG
https://twiki.cern.ch/twiki/bin/view/CMS/MuonHLT
Taus
https://twiki.cern.ch/twiki/bin/view/CMS/Tau
https://twiki.cern.ch/twiki/bin/viewauth/CMS/TauIDRecommendationForRun2
https://twiki.cern.ch/twiki/bin/view/CMS/TauTrigger
https://github.com/cms-tau-pog/TauIDSFs
Jet/MET
https://twiki.cern.ch/twiki/bin/view/CMS/JetID
https://twiki.cern.ch/twiki/bin/view/CMS/MissingETUncertaintyPrescription
https://twiki.cern.ch/twiki/bin/view/CMS/JERCReference
https://twiki.cern.ch/twiki/bin/view/CMS/JECDataMC
https://twiki.cern.ch/twiki/bin/view/CMS/JetResolution
https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetEnergyScale
https://twiki.cern.ch/twiki/bin/view/CMS/IntroToJEC
B-jets
https://twiki.cern.ch/twiki/bin/viewauth/CMS/BtagPOG
https://twiki.cern.ch/twiki/bin/view/CMS/BtagRecommendation
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideBTagging
How to create a website with nanoAOD content
To create nice websites like this one with the content of nanoAOD, use the inspectNanoFile.py file from the
PhysicsTools/nanoAOD package as:
cmsrel CMSSW_11_2_1
cd CMSSW_11_2_1/src
cmsenv
git cms-addpkg
PhysicsTools/NanoAOD/
cd CMSSW_11_2_1/src/PhysicsTools/NanoAOD/test