Extension of the Analysis Framework for the MSSM Hbb all-hadronic and semileptonic analyses in CMS
See also the code documentation Doxygen page
This package inherits from the Analysis/Tools package
Installation
The codes as well as the ntuples are independent of CMSSW. However, in order to compile it uses scram
. So the latest version in any architecture should be fine.
5 git clone https://github.com/desy-cms/analysis-tools.git Analysis/Tools
6 git clone https://github.com/desy-cms/analysis-calibrations.git Analysis/Tools/data/calibrations
7 git clone https://github.com/desy-cms/analysis-ntuples.git Analysis/Tools/data/ntuples
8 git clone https://github.com/desy-cms/analysis-mssmhbb.git Analysis/MssmHbb
10 scram b -j4 USER_CXXFLAGS="-Wno-misleading-indentation"
:zzz: The USER_CXXFLAGS="-Wno-misleading-indentation"
prevents a large number of warnings from misleading identation in modules of the boost library.
:zzz: More information about the additional packages, calibration
, ntuples
etc can be found in the Analysis/Tools
https://github.com/desy-cms/analysis-tools/blob/develop/README.md "README.md".
Running the analysis
A macro with the full analysis workflow for both semileptonic and all-hadronic channels can be found in Analysis/MssmHbb/bin/MssmHbbAnalysis.cc
Semileptonic channel
The configuration file for the semileptonic analysis with 2017 data is available in the file Analysis/MssmHbb/test/mssmhbb_semilep_2017.cfg.
The semileptonic standard selection
:warning: Unfortunately Github markdown does not render Latex equations :rage:
- Trigger
- HLT: HLT_Mu12_DoublePFJets40MaxDeta1p6_DoubleCaloBTagCSV_p33_v
- L1: L1_Mu12er2p3_Jet40er2p3_dR_Max0p4_DoubleJet40er2p3_dEta_Max1p6)
- Jet
- Jet energy corrections applied
- b-jet energy regression applied
- Jet ID: tight
- Jet PU ID: loose
- Jet 1: $p_{T} > 60$ GeV; $|| < 2.2$; BTag: DeepFlavour Medium WP; matched to trigger objects
- Jet 2: $p_{T} > 50$ GeV; $|| < 2.2$; BTag: DeepFlavour Medium WP; matched to trigger objects
- Jet 3: $p_{T} > 30$ GeV; $|| < 2.2$; BTag: DeepFlavour Medium WP
- Reverse btag Loose WP in control region
- $(jet_1,jet_2) < 1.5$
- $ R (jet_{i},jet_{j}) > 1$ ; $i,j=1,2,3$ ; $i j$
- Muon
- Muon ID: tight
- Muon: $p_{T} > 13$ GeV; $|| < 2.2$; matched to trigger objects
- Muon-Jet
- At least one selected muon must be within one of the two leading jet: $ R(,jet)<0.4$
All-hadronic channel
The configuration file for the semileptonic analysis is available in the file Analysis/MssmHbb/test/mssmhbb_semilep_2017.cfg.
The all-hadronic standard selection
TO DO
:warning: Unfortunately Github markdown does not render Latex equations :rage:
Main macro
The structure of the macro is as follows:
int main(
int argc,
char ** argv)
{
TH1::SetDefaultSumw2();
for ( int i = 0 ; i < mssmhbb.nEvents() ; ++i )
{
if ( ! mssmhbb.event(i) ) continue;
if ( ! mssmhbb.triggerSelection () ) continue;
if ( ! mssmhbb.preselection() ) continue;
if ( ! mssmhbb.jetCorrections() ) continue;
if ( ! mssmhbb.muonSelection() ) continue;
if ( ! mssmhbb.jetSelection() ) continue;
if ( ! mssmhbb.muonJet() ) continue;
if ( ! mssmhbb.btagSelection() ) continue;
mssmhbb.endSelection();
}
}
Compared to the Analysis/Tools example this is much simplified, for the individual selections were grouped and included in methods of the MssmHbbAnalyser
class. However some flexibility to re-order the workflow is still allowed. Of course, the user can also replace any of the if
statements above and enable more detailed steps of the selections, or add other steps to the workflow.
Event selection detailed description
MSSMHBBAnalyser::event(i)
When calling the method event(i)
, the entry i
is read from the TTree
of the ntuple. If running on data, the event is checked whether it is valid from a list of certified data given by the provided JSON file.
When running on Monte Carlo, generated event weights are applied. Pileup re-weighing is also applied if re-weigh file is provided in the configuration file in the [Corrections]
section, e.g.:
2 Pileup.reweight = calibrations/2017/pileup/PileupWeight_Run2017_Mix_2017.root
MSSMHBBAnalyser::triggerSelection()
It returns true
if the event passes both the HLT and L1 triggers, which are given in the configuration file section and whose results are in the TriggerResults
collection, thus
2 results = TriggerResults
3 hltPath = HLT_Mu12_DoublePFJets40MaxDeta1p6_DoubleCaloBTagCSV_p33_v
4 l1Seed = L1_Mu12er2p3_Jet40er2p3_dR_Max0p4_DoubleJet40er2p3_dEta_Max1p6
MSSMHBBAnalyser::preselection()
This method will prepare a vector of muons and a vector of jets that pass the identification criteria, namely muon id for muons, and jet id and jet pileup id for jets. It will return false
if any of those vectors has zero entries.
The identification criteria is defined in the configuration file as, for example
MSSMHBBAnalyser::jetCorrections()
This method will apply b-jet energy regression corrections to all the jets in the event, if requested in the configuration file:
2 Jets.bRegression = true
It will also smear the jet $p_{t}$ according to the jet energy resolution scale factors, if the relevant calibration files are provided in the configuration, e.g.:
2 Jets.bRegression = true
3 Jets.jerPtRes = calibrations/2017/jer/Fall17_V3_MC_PtResolution_AK4PFchs.txt
4 Jets.jerSF = calibrations/2017/jer/Fall17_V3_MC_SF_AK4PFchs.txt
In the jetCorrections
method the returned value is always true
.
MSSMHBBAnalyser::muonSelection()
The muonSelection
method selects events according to the minimum number of muons required. It also skims the vector of muons to contain only muons with the required kinematics and matching to muon trigger objects.
Example of the requirements give in the configuration:
2 Muons.L1 = hltL1Mu12er2p3Jet40er2p3dRMax0p4DoubleJet40er2p3dEtaMax1p6_l1muon
3 Muons.L3 = hltL3fL1sMu12Dijet40L1f0L2f8L3Filtered12
MSSMHBBAnalyser::jetSelection()
The jetSelection
method selects events according to the minimum number of jets required. It also checks whether the event fulfils the required kinematic selection and matching of the two leading jets to jet trigger objects. It returns false
if any of the requirements is not fulfilled.
For a selection, in which:
- Jet 1: $p_{t} > 60$ GeV; $|| < 2.2$
- Jet 2: $p_{t} > 50$ GeV; $|| < 2.2$
- Jet 3: $p_{t} > 30$ GeV; $|| < 2.2$
- $(jet_1,jet_2) < 1.5$
- $ R (jet_{i},jet_{j}) > 1$ ; $i,j=1,2,3$ ; $i j$
the configuration reads
:warning: Notice that the order matters! First ptMin
entry is for the leading jet, second ptMin
is for the second leading jet, ...
2 Jets.L1 = hltL1Mu12er2p3Jet40er2p3dRMax0p4DoubleJet40er2p3dEtaMax1p6_l1jet
3 Jets.Calo = hltDoubleCaloBJets30eta2p3
4 Jets.PF = hltDoublePFBJets40Eta2p3
MSSMHBBAnalyser::muonJet()
The muonJet
method returns true if either of the two leading jets contains at least one of the selected muons.
MSSMHBBAnalyser::btagSelection()
If the leading jets fulfil the required b-tag working point selection and matching of the two leading jets to the corresponding trigger objects, the btagSelection
method returns true
. The requirements are controlled in the configuration file. For example, select events with three leading jets passing the medium
working point of the deepflavour algorithm.
6 algorithm = deepflavour
where wp
if the working point of each required b-tagged jet.
:warning: Notice that the order matters! First wp
entry is for the leading jet, second wp
is for the second leading jet, ...
The values of the WP's must be given in the configuration file:
Because in the MSSM Hbb analysis, the background modelling is performed in a control region, in which on the b-tagged jets has its b-tagging requirement reversed, one can apply this possibility in the configuration files by setting the flag
and defininig reverse b tag WP and the rank of the jet to have the reverse b-tag applied, e.g. reverse b tag of the 3rd leading jet with loose
WP:
The matching to trigger object is done given the appropriate trigger object collection, e.g.
2 BTag.Calo = hltBTagCalo30x8CSVp0p92DoubleWithMatching
Configuration file
The structure of the configuration file is defined by the Analysis/Tools
package. More details can be found in the Analysis/Tools
README.md.
Workflow
The workflow of the main macro for DATA is
1 +----------------------------------------------------------------------------------------------+
3 +----------------------------------------------------------------------------------------------+
4 | 0 - Total events read |
5 | 1 - Certified data: Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt |
6 | 2 - Using Jet collection: MssmHbb/Events/updatedPatJets |
7 | 3 - Using Muon collection: MssmHbb/Events/slimmedMuons |
8 | 4 - HLT_Mu12_DoublePFJets40MaxDeta1p6_DoubleCaloBTagCSV_p33_v |
9 | 5 - L1_Mu12er2p3_Jet40er2p3_dR_Max0p4_DoubleJet40er2p3_dEta_Max1p6 |
12 | 8 - JetPileupId: loose |
13 | 9 - b jet energy regression |
15 | 11 - Muons selected: pt > 13.0 GeV and |eta| < 2.2 |
16 | 12 - Muons selected: Online muon matching (L1 and L3) |
18 | 14 - Jet 1: pt > 60.0 GeV and |eta| < 2.2 |
19 | 15 - Jet 1: online jet match |
20 | 16 - Jet 2: pt > 50.0 GeV and |eta| < 2.2 |
21 | 17 - Jet 2: online jet match |
22 | 18 - Jet 3: pt > 30.0 GeV and |eta| < 2.2 |
23 | 19 - MSSMHbb Semileptonic: Jet-muon association |
24 | 20 - Jet 1: deepflavour btag > 0.3033 (medium) |
25 | 21 - Jet 1: online b jet match |
26 | 22 - Jet 2: deepflavour btag > 0.3033 (medium) |
27 | 23 - Jet 2: online b jet match |
28 | 24 - Jet 3: deepflavour btag < 0.0521 (loose) [reverse btag] |
29 | 25 - *** Filling jets histograms - final_selection |
30 | 26 - Fill MssmHbb Histograms |
31 | 27 - Fill MssmHbb tree |
32 +----------------------------------------------------------------------------------------------+
where as for the Monte Carlo it is
1 +----------------------------------------------------------------------------------------------+
2 | Workflow Monte Carlo |
3 +----------------------------------------------------------------------------------------------+
4 | 0 - Total events read |
5 | 1 - Generated weighted events (sign of weights) |
6 | 2 - Using GenParticles collection: MssmHbb/Events/prunedGenParticles |
7 | 3 - Using GenJets collection: MssmHbb/Events/slimmedGenJets |
8 | 4 - Using Jet collection: MssmHbb/Events/updatedPatJets |
9 | 5 - Using Muon collection: MssmHbb/Events/slimmedMuons |
10 | 6 - Pileup weight (PileupWeight_Run2017_Mix_2017.root) |
11 | 7 - HLT_Mu12_DoublePFJets40MaxDeta1p6_DoubleCaloBTagCSV_p33_v |
12 | 8 - L1_Mu12er2p3_Jet40er2p3_dR_Max0p4_DoubleJet40er2p3_dEta_Max1p6 |
15 | 11 - JetPileupId: loose |
16 | 12 - b jet energy regression |
17 | 13 - JER smearing (Fall17_V3_MC_PtResolution_AK4PFchs.txt,Fall17_V3_MC_SF_AK4PFchs.txt) |
19 | 15 - Muons selected: pt > 13.0 GeV and |eta| < 2.2 |
20 | 16 - Muons selected: Online muon matching (L1 and L3) |
22 | 18 - Jet 1: pt > 60.0 GeV and |eta| < 2.2 |
23 | 19 - Jet 1: online jet match |
24 | 20 - Jet 2: pt > 50.0 GeV and |eta| < 2.2 |
25 | 21 - Jet 2: online jet match |
26 | 22 - Jet 3: pt > 30.0 GeV and |eta| < 2.2 |
27 | 23 - MSSMHbb Semileptonic: Jet-muon association |
28 | 24 - Jet 1: deepflavour btag > 0.3033 (medium) |
29 | 25 - Jet 1: btag SF applied (deepflavour medium WP) |
30 | 26 - Jet 1: online b jet match |
31 | 27 - Jet 2: deepflavour btag > 0.3033 (medium) |
32 | 28 - Jet 2: btag SF applied (deepflavour medium WP) |
33 | 29 - Jet 2: online b jet match |
34 +----------------------------------------------------------------------------------------------+
Output
The macro produces a root file containing a directory with jet-related histograms and a TTree containing the dijet mass $m_{bb}$ of the two leading b-tagged jets and the event weights after the full selection.
MssmHbbAnalyser class
:warning: To do