susy2015 / ZInvisible

Calculate the Z to neutrinos background for the CMS all-hadronic stop search.
0 stars 4 forks source link

Testing v6 ntuples #290

Open caleb-james-smith opened 4 years ago

caleb-james-smith commented 4 years ago

Using the v6 nuples and the top tagger “discriminator filter” module and the top candidates from the ntuple, we have agreement in number of tops for all events in: SMS_T1tttt_mGluino2000_mLSP100fullsim(2016,2017,2018)

However, when running over Data_SinglePhoton_2016_PeriodB, we see this problem:

cmslpc129.fnal.gov Tools # (dev_v6) time ./makePlots -st -D Data_SinglePhoton_2016_PeriodB -Y 2016 -E 20000 -R Data_MET_2016 | grep -v LHAPDF 
Using luminosity 35815.2
Processing file(s): /eos/uscms/store/user/lpcsusyhad/Stop_production/Summer16_94X_v3/PostProcessed_25Apr2019_v6
    root://cmseos.fnal.gov//eos/uscms/store/user/lpcsusyhad/Stop_production/Summer16_94X_v3/PostProcessed_25Apr2019_v6/Data_SinglePhoton_2016_PeriodB/Data_SinglePhoton_2016_PeriodB_0.root
Event #: 1000
Event #: 2000
Event #: 3000
Event #: 4000
Event #: 5000
Event #: 6000
Event #: 7000
Event #: 8000
Event #: 9000
Event #: 10000
Event #: 11000
Event #: 12000
Event #: 13000
Event #: 14000
Event #: 15000
Event #: 16000
Event #: 17000
Event #: 18000
-----------------------------------------------------------------------------------------
firstSpec=_jetpt30; run=273725; luminosityBlock=283; CMS_event=408075618; ntuple_event=18033
hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
hui_Pass_highDM          = 0 and caleb_SAT_Pass_highDM           = 0 
hui_Pass_lowDM_mid_dPhi  = 0 and caleb_SAT_Pass_lowDM_mid_dPhi   = 0 
hui_Pass_highDM_mid_dPhi = 0 and caleb_SAT_Pass_highDM_mid_dPhi  = 0 
    hui_Pass_LeptonVeto    = 1 and caleb_SAT_Pass_LeptonVeto       = 1 
    hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 1 
    hui_Pass_EventFilter   = 1 and caleb_Pass_EventFilter          = 1 
    hui_Pass_CaloMETRatio  = 1 and caleb_Pass_CaloMETRatio         = 1 
    hui_Pass_MET           = 1 and caleb_SAT_Pass_MET              = 0  --- NOT_EQUAL --- 
    hui_Pass_HT            = 1 and caleb_SAT_Pass_HT               = 1 
    hui_Pass_NJets         = 1 and caleb_SAT_Pass_NJets            = 1 
    hui_Pass_dPhiMETLowDM  = 1 and caleb_SAT_Pass_dPhiMETLowDM     = 1 
    hui_Pass_dPhiMETMedDM  = 0 and caleb_SAT_Pass_mid_dPhiMETLowDM = 0 
    hui_Pass_dPhiMETHighDM = 1 and caleb_SAT_Pass_dPhiMETHighDM    = 1 
    hui_MET_pt             = 0.000000000000000 and caleb_met                   = 0.000000000000000 
    hui_Stop0l_HT          = 922.187500000000000 and caleb_HT                    = 922.187500000000000 
    hui_Stop0l_ISRJetPt    = 745.500000000000000 and caleb_ISRJetPt              = 745.500000000000000 
    hui_Stop0l_METSig      = 18.934177398681641 and caleb_S_met                 = 0.000000000000000  --- NOT_EQUAL --- 
    hui_Stop0l_Mtb         = 0.000000000000000 and caleb_mtb                   = 0.000000000000000 
    hui_Stop0l_Ptb         = 0.000000000000000 and caleb_ptb                   = 0.000000000000000 
    hui_Stop0l_nJets       = 3 and caleb_nJets                     = 3 
    hui_Stop0l_nSoftb      = 0 and caleb_nSoftBottoms              = 0 
    hui_Stop0l_nbtags      = 0 and caleb_nBottoms                  = 0 
    hui_Stop0l_nTop        = 0 and caleb_nMergedTops               = 0 
    hui_Stop0l_nW          = 0 and caleb_nWs                       = 0 
    hui_Stop0l_nResolved   = 0 and caleb_nResolvedTops             = 0 
    caleb_MergedTopTotalSF    = 1.000000000000000
    caleb_WTotalSF            = 1.000000000000000
    caleb_ResolvedTopTotalSF  = 1.000000000000000
------------- hui resolved top candidates -------------
------------- hui tagged resolved tops -------------
------------- caleb top candidates -------------
------------- caleb tagged tops -------------
------------- caleb met, jets, dphi -------------
met = 0.00000
metphi = 1.71509
jet index=0, sorted_index=0
jet index=1, sorted_index=1
jet index=2, sorted_index=2
Jet_0: pt=669.00000, eta=-0.23300, phi=-1.29810, mass=38.09375
Jet_1: pt=189.25000, eta=0.07217, phi=2.57422, mass=37.06250
Jet_2: pt=63.93750, eta=-0.87903, phi=-1.11304, mass=13.07812
Jet_3: pt=16.07812, eta=4.21484, phi=0.20523, mass=4.37500
Jet_4: pt=15.53125, eta=1.55396, phi=1.34180, mass=3.86523
dPhi_0 = 1.29810
dPhi_1 = 2.57422
dPhi_2 = 1.11304
dPhi_3 = 999.00000
dPhi_4 = 999.00000
------------- hui and caleb fat jets -------------
FatJet_0: (pt=745.50000, eta=-0.29321, phi=-1.28345, mass=149.12500), type=0, mt-disc=0.00077, w-disc=0.03769, msoftdrop=2.72852
        sub jet 0: (pt=335.00000, eta=-0.22491, phi=-1.30518, mass=-0.00001)
        sub jet 1: (pt=263.50000, eta=-0.23276, phi=-1.30103, mass=0.46509)
FatJet_1: (pt=205.12500, eta=0.10249, phi=2.55957, mass=48.43750), type=0, mt-disc=0.00001, w-disc=0.01128, msoftdrop=43.68750
        sub jet 0: (pt=164.50000, eta=0.04475, phi=2.59180, mass=26.89062)
        sub jet 1: (pt=32.37500, eta=0.38184, phi=2.38672, mass=5.91016)
FatJet 0: p_t = 745.500000000000000000000000000000, eta = -0.293212890624999944488848768742, phi = -1.283447265625000000000000000000, mass = 149.125000000000000000000000000000, btag_disc = 0.093383789062500000000000000000
ISR jet pt 745.500000000000000000000000000000 is greater than 200.000000000000000000000000000000.
myISRJetIndex = 0
caleb-james-smith commented 4 years ago

My condor jobs have finished for v6, and I am starting to look at the logs. So far I have looked at logs for 2016. There are many events in all data sets (MET, Photon, Electron, and Muon) which have MET_pt = 0.0. However, these events also have Pass_MET in the ntuple set to true. And also the events have non zero Smet, as in Stop0l_METSig > 0.0.

caleb-james-smith commented 4 years ago

There are 151590 data events (from all 2016 data sets combined) which are suspect and may have this issue.

/uscms_data/d3/caleb/SusyAnalysis/CMSSW_10_2_9/src/ZInvisible/Tools/firstSpec_2016_v6.log
caleb-james-smith commented 4 years ago

Ok, it looks like 151573 events have MET_pt = 0.0.

cmslpc129.fnal.gov Tools # (dev_v6) grep "hui_MET_pt             = 0.000000000000000" condor/DataMC_2016_submission_2020-03-05_17-31-46/logs/*.stdout | wc                        
 151573 1212584 31398513
caleb-james-smith commented 4 years ago

2018 Data event with disagreement in passing MET cut

 542 -----------------------------------------------------------------------------------------
 543 firstSpec=_jetpt30; run=321461; luminosityBlock=75; CMS_event=108423349; ntuple_event=496730
 544 hui_Pass_lowDM           = 0 and caleb_SAT_Pass_lowDM            = 1  --- NOT_EQUAL ---
 545 hui_Pass_highDM          = 0 and caleb_SAT_Pass_highDM           = 0
 546 hui_Pass_lowDM_mid_dPhi  = 0 and caleb_SAT_Pass_lowDM_mid_dPhi   = 0
 547 hui_Pass_highDM_mid_dPhi = 0 and caleb_SAT_Pass_highDM_mid_dPhi  = 0
 548     hui_Pass_LeptonVeto    = 1 and caleb_SAT_Pass_LeptonVeto       = 1
 549     hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 1
 550     hui_Pass_EventFilter   = 1 and caleb_Pass_EventFilter          = 1
 551     hui_Pass_CaloMETRatio  = 1 and caleb_Pass_CaloMETRatio         = 1
 552     hui_Pass_MET           = 0 and caleb_SAT_Pass_MET              = 1  --- NOT_EQUAL ---
 553     hui_Pass_HT            = 1 and caleb_SAT_Pass_HT               = 1
 554     hui_Pass_NJets         = 1 and caleb_SAT_Pass_NJets            = 1
 555     hui_Pass_dPhiMETLowDM  = 1 and caleb_SAT_Pass_dPhiMETLowDM     = 1
 556     hui_Pass_dPhiMETMedDM  = 0 and caleb_SAT_Pass_mid_dPhiMETLowDM = 0
 557     hui_Pass_dPhiMETHighDM = 0 and caleb_SAT_Pass_dPhiMETHighDM    = 0
 558     hui_MET_pt             = 250.000000000000000 and caleb_met                   = 250.000000000000000
 559     hui_Stop0l_HT          = 498.088867187500000 and caleb_HT                    = 498.088867187500000
 560     hui_Stop0l_ISRJetPt    = 347.500000000000000 and caleb_ISRJetPt              = 347.500000000000000
 561     hui_Stop0l_METSig      = 11.201767921447754 and caleb_S_met                 = 11.201767921447754
 562     hui_Stop0l_Mtb         = 0.000000000000000 and caleb_mtb                   = 0.000000000000000
 563     hui_Stop0l_Ptb         = 0.000000000000000 and caleb_ptb                   = 0.000000000000000
 564     hui_Stop0l_nJets       = 3 and caleb_nJets                     = 3
 565     hui_Stop0l_nSoftb      = 0 and caleb_nSoftBottoms              = 0
 566     hui_Stop0l_nbtags      = 0 and caleb_nBottoms                  = 0
 567     hui_Stop0l_nTop        = 0 and caleb_nMergedTops               = 0
 568     hui_Stop0l_nW          = 0 and caleb_nWs                       = 0
 569     hui_Stop0l_nResolved   = 0 and caleb_nResolvedTops             = 0
 570     caleb_MergedTopTotalSF    = 1.000000000000000
 571     caleb_WTotalSF            = 1.000000000000000
 572     caleb_ResolvedTopTotalSF  = 1.000000000000000
caleb-james-smith commented 4 years ago

This is probably a ">" vs. ">=" issue for this 2018 event.

The MET_pt = 0.0 issue for Data is only seen in 2016.

caleb-james-smith commented 4 years ago

Definition of Pass_MET stored in ntuples:

https://github.com/susy2015/NanoSUSY-tools/blob/dev_v6/python/modules/Stop0lBaselineProducer.py#L225

Definition of SAT_Pass_MET in SusyAnaTools:

https://github.com/susy2015/SusyAnaTools/blob/master/Tools/baselineDef.cc#L689

caleb-james-smith commented 4 years ago

Both definitions use "met >= 250" . This may be a rounding issue... maybe the full precision value was less than 250, but the rounded value saved in the ntuples is 250.0.

caleb-james-smith commented 4 years ago

Testing 2016 for tag PostProcessed_StopNtuple_v6.1.1.

Events with difference in selection (framework vs. ntuples):

64659028_2352_makePlots_TTbarSingleLepT_2016_5.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=228541; CMS_event=191097657; ntuple_event=382253
64659028_2386_makePlots_TTbarSingleLepT_2016_39.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=227025; CMS_event=189830139; ntuple_event=932407
64659028_2571_makePlots_ST_t_top_2016_71.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=90778; CMS_event=17444487; ntuple_event=30589
64659028_2662_makePlots_WZG_2016_0.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=978; CMS_event=194756; ntuple_event=574915
64659028_2663_makePlots_TTZToLLNuNu_2016_0.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=20478; CMS_event=4008414; ntuple_event=604689
64659028_2674_makePlots_TTZToLLNuNu_2016_11.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=1797; CMS_event=310814; ntuple_event=138383
64659028_2747_makePlots_ZZTo2L2Nu_2016_30.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=274739; CMS_event=46522349; ntuple_event=33398
64659028_2784_makePlots_GJets_HT_600ToInf_2016_6.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=75986; CMS_event=257743413; ntuple_event=548229
64659028_2889_makePlots_QCD_HT_1000to1500_2016_4.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=5394; CMS_event=17978541; ntuple_event=668893
64659028_2904_makePlots_QCD_HT_700to1000_2016_4.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=92379; CMS_event=273130922; ntuple_event=387443
64659028_2907_makePlots_QCD_HT_700to1000_2016_7.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=139281; CMS_event=411802962; ntuple_event=283265
64659028_2933_makePlots_QCD_HT_700to1000_2016_33.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=21564; CMS_event=63756041; ntuple_event=560939
64659028_3123_makePlots_WJetsToLNu_HT_1200to2500_2016_5.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=7421; CMS_event=9941012; ntuple_event=645390
64659028_3149_makePlots_WJetsToLNu_HT_600to800_2016_17.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=68902; CMS_event=154167918; ntuple_event=842354
64659028_3150_makePlots_WJetsToLNu_HT_600to800_2016_18.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=32917; CMS_event=73650828; ntuple_event=71740
64659028_3253_makePlots_TTbarInc_2016_2.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=36710; CMS_event=25109153; ntuple_event=750003
64659028_3280_makePlots_ZJetsToNuNu_HT_600to800_2016_0.stdout:firstSpec=_jetpt30; run=1; luminosityBlock=34763; CMS_event=57938151; ntuple_event=158787
caleb-james-smith commented 4 years ago

Instances of NOT_EQUAL:

64659028_2352_makePlots_TTbarSingleLepT_2016_5.stdout:  hui_Stop0l_nResolved   = 0 and caleb_nResolvedTops             = 1  --- NOT_EQUAL --- 
64659028_2386_makePlots_TTbarSingleLepT_2016_39.stdout:hui_Pass_highDM          = 1 and caleb_SAT_Pass_highDM           = 0  --- NOT_EQUAL --- 
64659028_2386_makePlots_TTbarSingleLepT_2016_39.stdout: hui_Stop0l_Mtb         = 8.156532287597656 and caleb_mtb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_2386_makePlots_TTbarSingleLepT_2016_39.stdout: hui_Stop0l_Ptb         = 20.000000000000000 and caleb_ptb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_2386_makePlots_TTbarSingleLepT_2016_39.stdout: hui_Stop0l_nbtags      = 1 and caleb_nBottoms                  = 0  --- NOT_EQUAL --- 
64659028_2571_makePlots_ST_t_top_2016_71.stdout:    hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2662_makePlots_WZG_2016_0.stdout:hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
64659028_2662_makePlots_WZG_2016_0.stdout:  hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 0  --- NOT_EQUAL --- 
64659028_2663_makePlots_TTZToLLNuNu_2016_0.stdout:  hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2674_makePlots_TTZToLLNuNu_2016_11.stdout:hui_Pass_highDM          = 1 and caleb_SAT_Pass_highDM           = 0  --- NOT_EQUAL --- 
64659028_2674_makePlots_TTZToLLNuNu_2016_11.stdout: hui_Stop0l_Mtb         = 97.908569335937500 and caleb_mtb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_2674_makePlots_TTZToLLNuNu_2016_11.stdout: hui_Stop0l_Ptb         = 20.000000000000000 and caleb_ptb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_2674_makePlots_TTZToLLNuNu_2016_11.stdout: hui_Stop0l_nbtags      = 1 and caleb_nBottoms                  = 0  --- NOT_EQUAL --- 
64659028_2747_makePlots_ZZTo2L2Nu_2016_30.stdout:hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
64659028_2747_makePlots_ZZTo2L2Nu_2016_30.stdout:   hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 0  --- NOT_EQUAL --- 
64659028_2784_makePlots_GJets_HT_600ToInf_2016_6.stdout:    hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2889_makePlots_QCD_HT_1000to1500_2016_4.stdout:    hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2904_makePlots_QCD_HT_700to1000_2016_4.stdout: hui_Stop0l_ISRJetPt    = 0.000000000000000 and caleb_ISRJetPt              = 346.500000000000000  --- NOT_EQUAL --- 
64659028_2904_makePlots_QCD_HT_700to1000_2016_4.stdout: hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2907_makePlots_QCD_HT_700to1000_2016_7.stdout: hui_Stop0l_ISRJetPt    = 0.000000000000000 and caleb_ISRJetPt              = 261.500000000000000  --- NOT_EQUAL --- 
64659028_2907_makePlots_QCD_HT_700to1000_2016_7.stdout: hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_2933_makePlots_QCD_HT_700to1000_2016_33.stdout:    hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_3123_makePlots_WJetsToLNu_HT_1200to2500_2016_5.stdout:hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
64659028_3123_makePlots_WJetsToLNu_HT_1200to2500_2016_5.stdout: hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 0  --- NOT_EQUAL --- 
64659028_3149_makePlots_WJetsToLNu_HT_600to800_2016_17.stdout:hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
64659028_3149_makePlots_WJetsToLNu_HT_600to800_2016_17.stdout:  hui_Pass_JetID         = 1 and caleb_SAT_Pass_JetID            = 0  --- NOT_EQUAL --- 
64659028_3150_makePlots_WJetsToLNu_HT_600to800_2016_18.stdout:hui_Pass_highDM          = 1 and caleb_SAT_Pass_highDM           = 0  --- NOT_EQUAL --- 
64659028_3150_makePlots_WJetsToLNu_HT_600to800_2016_18.stdout:  hui_Stop0l_Mtb         = 130.419418334960938 and caleb_mtb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_3150_makePlots_WJetsToLNu_HT_600to800_2016_18.stdout:  hui_Stop0l_Ptb         = 20.000000000000000 and caleb_ptb                   = 0.000000000000000  --- NOT_EQUAL --- 
64659028_3150_makePlots_WJetsToLNu_HT_600to800_2016_18.stdout:  hui_Stop0l_nbtags      = 1 and caleb_nBottoms                  = 0  --- NOT_EQUAL --- 
64659028_3253_makePlots_TTbarInc_2016_2.stdout: hui_Stop0l_nResolved   = 1 and caleb_nResolvedTops             = 0  --- NOT_EQUAL --- 
64659028_3280_makePlots_ZJetsToNuNu_HT_600to800_2016_0.stdout:hui_Pass_lowDM           = 1 and caleb_SAT_Pass_lowDM            = 0  --- NOT_EQUAL --- 
64659028_3280_makePlots_ZJetsToNuNu_HT_600to800_2016_0.stdout:  hui_Stop0l_Mtb         = 33.736454010009766 and caleb_mtb                   = 209.524398803710938  --- NOT_EQUAL --- 
64659028_3280_makePlots_ZJetsToNuNu_HT_600to800_2016_0.stdout:  hui_Stop0l_Ptb         = 49.906250000000000 and caleb_ptb                   = 29.906250000000000  --- NOT_EQUAL --- 
64659028_3280_makePlots_ZJetsToNuNu_HT_600to800_2016_0.stdout:  hui_Stop0l_nbtags      = 2 and caleb_nBottoms                  = 1  --- NOT_EQUAL ---