MET Significance


The significance of the missing transverse energy (MET) assesses, on an event by event basis, the likelihood that an observed MET is consistent with a fluctuation from zero because of detector-related limitations like finite measurement resolution.

2012 Algo: published in JME-13-003

The algorithm is explained in

An introductory explanation of the algorithm is given in these lecture slides:

Used in susy analysis during run1:

  • HH->4b CMS-SUS-13‐022
  • gamma + Emiss CMS-SUS-14-016

Instructions for >= 8_0_5

In case you want to re-run the algorithm, you have two options:

  • use the standalone producer:
    • the lastest and greatest JEC (use the corrected collection for met and jets configuring the RecoMET/METProducers/python/
    • the latest JER (from globalTag) (you need to configure and run the RecoMET/METProducers/test/
    • the metSig tuned parameter (you need to configure and run the RecoMET/METProducers/python/
  • produce a new slimmedMET collection:
    • cmsRun PhysicsTools/PatAlgos/test/ JEC and JER are defined in the globalTag.
    • make sure you have the latest metSig tuned parameter (you need to configure and run the RecoMET/METProducers/python/
    • You can then access the patMETs_slimmedMETs__RERUN.obj.metSignificance()

Look at the code here compare/CMSSW_8_0_X...cms-met:metTool80X

Instructions for 7_6_4

The algorithm is retuned with the 2015 (74X miniAOD) reconstructions/conditions. There are three main ingredients in the algo:

  • Use the latest and greated JEC for jets and met specifying there the right jet and met collection
  • MC truth JER and SF (for data): these are now stored in the globalTag.
  • METSig tuning factors: these are derived in a Z->dimuon sample in data (and are checked to be the same with MC) and take into account small differences in jet composition/etc. compared to the samples used to derive the JER (mainly the QCD sample).

The code to calculate METsignificance has been updated to include these changes, and you can find the recipe to run the algo in 76X below. This need two .db files: one for the JER and one for the JEC.

See instruction here:

cmsrel CMSSW_7_6_4
cd CMSSW_7_6_4/src
git cms-init

#echo /CommonTools/PileupAlgos/ > .git/info/sparse-checkout
#echo /CommonTools/Utils/ >> .git/info/sparse-checkout
#echo /JetMETCorrections/Configuration/ >> .git/info/sparse-checkout
#echo /JetMETCorrections/Modules/ >> .git/info/sparse-checkout
#echo /JetMETCorrections/Type1MET/ >> .git/info/sparse-checkout
#echo /PhysicsTools/PatAlgos/ >> .git/info/sparse-checkout
#echo /PhysicsTools/PatUtils/ >> .git/info/sparse-checkout
#echo /RecoMET/METAlgorithms/ >> .git/info/sparse-checkout
#echo /RecoMET/METProducers/ >> .git/info/sparse-checkout

git cms-merge-topic cms-met:metTool76X
scramv1 b -j 20

cmsRun RecoMET/METProducers/test/

Look at the code here compare/CMSSW_7_6_X...cms-met:metTool76X

In order to include the MET significance in an analyzer code:

In a dummy analyzer: void Dummy::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)

 double METSignificance_;
   edm::Handle metsig;
   METSignificance_ = metsig.failedToGet() ? -999. : *metsig;

with "Demo" the process name included in the python config file:

process = cms.Process("Demo") 

A description of how to include the MET significance producer in your process path is shown in an example python config file below. Please make sure that the MET significance producer is included in your process path before the dummy analyzer.

Instruction for Obsolete releases

Instructions for 7_4_X

The code to calculate METsignificance is in the release so no new recipe to download. The algorithm is not yet retuned for the 2015 reconstructions/conditions. Once this is done will be available directly from miniAOD.

cmsrel CMSSW_7_4_1
cd CMSSW_7_4_1/src/

git cms-addpkg RecoMET/METProducers/

cmsRun RecoMET/METProducers/

741 Test sample

eos ls -l /eos/cms/store/relval/CMSSW_7_4_1//RelValZMM_13/MINIAODSIM/MCRUN2_74_V9_extended-v2/00000 

Instructions for 7_2_X

Instructions on how to run the top miniAOD in 7_2_3

setenv SCRAM_ARCH slc6_amd64_gcc481
cmsrel CMSSW_7_2_3
cd CMSSW_7_2_3/src/

#PAT Recipe (
git cms-addpkg PhysicsTools/PatAlgos
git cms-addpkg FWCore/Version

# alternatively in case you have a sparse-checkout
#echo RecoMET/METAlgorithms/ >> .git/info/sparse-checkout
#echo RecoMET/METProducers/ >> .git/info/sparse-checkout
#git read-tree -mu HEAD

# MET Significance Recipe
git-cms-merge-topic -u cms-met:72X-MetSig-150311
scramv1 b -j 20 


The JEC are used to correct the central value, and the JER are used to evaluate how compatible a measured jet pt is within the true pt. Extra tuning factors are derived ad hoc. What at analysis level, you want to do is, change the JEC and JER within their uncertainty and recompute the metSignificance with the shifted values. This will give you an uncertainty.

Description of the code

The algorithms described above is in the package: RecoMET/METProducers/.

To run a test example:

cmsRun RecoMET/METProducers/test/ 
This should work by default and produce an output file with the significance and covariance matrix for each event. What is going on is:

Within the code, those are the relevant files:

2010 Algo: actually available RECO in 53X 62X and 71X/72X

Instructions for 53X 62X and 71X/72X (RECO)

In RECO 53X 62X and 71X/72X you find the definition based on those studies

Instruction how to re-run in the CMSSW (CMSSW_3_9_8) are below

"pfMet" collection, calculated in the RECO sequence will have significance based on resolutions of ak5PFJets and remaining ParticleFlow candidates. Samples reconstructed in CMSSW_3_11_X and later will have this significance readily available. In older releases one needs to rerun the pfMet producer, e.g. for CMSSW_3_9_8:

cmsrel CMSSW_3_9_8
cd CMSSW_3_9_8/src
cvs co -r V03-01-33 RecoMET/METAlgorithms
cvs co -r V03-01-45 RecoMET/METProducers
scramv1 -j4 b
Then rerun the pfMet producer:
process.pfMet1 = process.pfMet.clone(alias="PFMET1")
process.p = cms.Path(process.pfMet1)
Now the significance can be accessed with significance() and the corresponding 2X2 TMatrixD covariance matrix with getSignificanceMatrix() method.
edm::Handle< edm::View<reco::PFMET> > pfMEThandle;
iEvent.getByLabel("pfMet", pfMEThandle);
double significance = (pfMEThandle->front() ).significance();
double sigmaX2= (pfMEThandle->front() ).getSignificanceMatrix()(0,0);

In rare events, when accessing the significance, root raises an exception:

cms::Exception caught in cmsRun
---- FatalRootError BEGIN
Fatal Root Error: @SUB=TDecompLU::DecomposeLUCrout
matrix is singular
This problem is known and is coming from charged hadrons which have track reference with very large momentum and errors. The possible (temporary) workaround is to check that diagonal matrix elements are not very large (currently there is no protection against such case in the significance method itself), before calling significance(), e.g.:
double sigmaX2= (pfMEThandle->front() ).getSignificanceMatrix()(0,0);
double sigmaY2= (pfMEThandle->front() ).getSignificanceMatrix()(1,1);
double significance = 0;
if(sigmaX2<1.e10 && sigmaY2<1.e10) significance = (pfMEThandle->front() ).significance();

MET significance in PF2PAT

In PF2PAT missing transverse energy object may have rather different significance value (while the MET value is the same) since the input jets are cleaned from isolated muons and electrons and small(for electrons currently dummy ones) resolutions are applied on these particles. The significance and corresponding covariance matrix will be available starting from CMSSW_4_2_X and one can access them as usual in the PF2PAT MET object. Full information about PF2PAT is available at SWGuidePF2PAT. There are two points to note:

1. PF2PAT applies the PF criteria for isolated electrons, which includes a cut on the electron id boosted decision tree output (MVA). The behaviour of the significance couples tightly to whether the electrons are treated as electons (smaller resolution) or form a jet (larger resolution). As a consequence, it is important to ensure that the PF2PAT isolated electrons and the analysis' isolated electrons are consistent. If not, a cut on the significance will also be a backdoor imposition of PF's MVA cut.

2. PF2PAT sequence by default removes the pile-up particles from the jet clustering. To avoid that, one can disable it as follows:

process.pfPileUp.Enable = False
process.p = cms.Path(process.PF2PAT)

In PAT one can also add another PF2PAT sequence to have the MET significance calculated with jets including pile-up particles:

from import *
postfix = "PFlow"
usePF2PAT(process,runPF2PAT=True, jetAlgo='AK5', runOnMC=True, postfix=postfix)
postfix1 = "PFlowWithPU"
usePF2PAT(process,runPF2PAT=True, jetAlgo='AK5', runOnMC=True, postfix=postfix1)
getattr(process,"pfPileUp"+postfix1).Enable = False
process.p = cms.Path(    
    getattr(process,"patPF2PATSequence"+postfix) *
    getattr(process,"patPF2PATSequence"+postfix1) *
and use pfMETPFlowWithPU collection to access significance.

Edit | Attach | Watch | Print version | History: r31 < r30 < r29 < r28 < r27 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r31 - 2016-08-05 - MariarosariaDalfonso
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback