Skip to content

Commit

Permalink
Merge pull request cms-sw#955 from slava77/comparisons-27Feb2018
Browse files Browse the repository at this point in the history
reco comparisons: map updated for miniAOD workflows; plots for pat::MET
  • Loading branch information
smuzaffar authored Feb 28, 2018
2 parents 9e77e59 + b77ade5 commit c4aa7ad
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 9 deletions.
5 changes: 4 additions & 1 deletion comparisons/matrix_RE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ SingleMu13Pt1000wf1322p0 1322.0_SingleMuPt1000_UP15+*/step3.root RECO
TTbar13wf1325p0 1325.0_TTbar_13+TTbar_13*/step3.root RECO
TTbar13wf11325p0 11325.0_TTbar_13_unsch+TTbar_13*/step3.root RECO
TTbar13reMINIAODwf1325p5 1325.5_TTbar_13_reminiaod*/step2.root PAT
TTbar13nanoAODwf1325p7 1325.7_TTbar_13_94XNanoAODINPUT+*/step2.root DQM
ZEE13reMINIAODwf1325p5 1325.5_ProdZEE_13_reminiaod*/step2.root PAT
TTbar13reMINIAODwf1325p51 1325.51_TTbar_13_94Xreminiaod*/step2.root PAT
TTbar13nanoAODwf1325p7 1325.7_TTbar_13_94XNanoAOD*/step2.root DQM
ZMM13TeVwf1330p0 1330.0_ZMM_13+*/step3.root RECO
H125GG13TeVwf1332p0 1332.0_H125GGgluonfusion_13+*/step3.root RECO
VBFH125BB13TeVwf1363p0 1363.0_VBFHToBB_M125_Pow_py8_Evt_13*/step3.root RECO
Expand Down Expand Up @@ -132,6 +134,7 @@ RunSinglePh2017B136p788 136.788_RunSinglePh2017B+*/step3.root reRECO
RunDoubleEG2017Fwf136p829 136.829_RunDoubleEG2017F+*/step3.root reRECO
RunDoubleMuon2017Fwf136p83 136.83_RunDoubleMuon2017F+*/step3.root reRECO
RunJetHT2017F136p831 136.831_RunJetHT2017F+*/step3.root reRECO
RunJetHT2017FreMINIAOD136p8311 136.8311_RunJetHT2017F_reminiaod+*/step2.root PAT
RunMET2017F136p832 136.832_RunMET2017F+*/step3.root reRECO
#
# 2017 workflows follow
Expand Down
52 changes: 44 additions & 8 deletions comparisons/validate.C
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ double plotvar(TString v,TString cut="", bool tryCatch = false){
return countDiff;
}


void jet(TString type, TString algo, TString var, bool log10Var = false, bool trycatch = false, bool notafunction = false){
TString v = type+"_"+algo+(algo.Contains("_")? "_" : "__")+recoS+".obj."+var+(notafunction? "" : "()");
if (log10Var) v = "log10(" + v + ")";
Expand Down Expand Up @@ -331,10 +330,10 @@ void calomet(TString algo, TString var, bool doLog10 = false){
plotvar(v);
}

void met(TString var, TString cName = "tcMet_", TString tName = "recoMETs_", bool notafunction=false){
TString v=notafunction ? tName+cName+"_"+recoS+".obj."+var:
tName+cName+"_"+recoS+".obj."+var+"()";
plotvar(v);
void met(TString var, TString cName = "tcMet_", TString tName = "recoMETs_", bool log10Var = false, bool trycatch = false, bool notafunction=false){
TString v = tName+cName+"_"+recoS+".obj."+var+(notafunction? "" : "()");
if (log10Var) v = "log10(" + v + ")";
plotvar(v, "", trycatch);
}

void metVars(TString cName = "tcMet_", TString tName = "recoMETs_") {
Expand All @@ -347,6 +346,37 @@ void metVars(TString cName = "tcMet_", TString tName = "recoMETs_") {
met("significance",cName,tName);
}

void patMetVars(TString cName){
const TString tName = "patMETs_";
metVars(cName, tName);

met("[email protected]", cName, tName);
for (int i = 0; i< 32; ++i){
plotvar(tName+cName+"_"+recoS+Form(".obj[0].userFloats_[%d]",i), "", true);
}
met("[email protected]", cName, tName);
for (int i = 0; i< 32; ++i){
plotvar(tName+cName+"_"+recoS+Form(".obj[0].userInts_[%d]",i), "", true);
}
met("[email protected]", cName, tName);

met("pfMET_[0].NeutralEMFraction", cName, tName, false, true, true);
met("pfMET_[0].NeutralHadFraction", cName, tName, false, true, true);
met("pfMET_[0].ChargedEMFraction", cName, tName, false, true, true);
met("pfMET_[0].ChargedHadFraction", cName, tName, false, true, true);
met("pfMET_[0].MuonFraction", cName, tName, false, true, true);
met("pfMET_[0].Type6Fraction", cName, tName, false, true, true);
met("pfMET_[0].Type7Fraction", cName, tName, false, true, true);

for (int i = 0; i< 24; ++i){
plotvar(tName+cName+"_"+recoS+Form(".obj[0].uncertainties_[%d].dpx()",i), tName+cName+"_"+recoS+Form(".obj[0][email protected]()>%d",i), true);
plotvar(tName+cName+"_"+recoS+Form(".obj[0].uncertainties_[%d].dsumEt()",i), tName+cName+"_"+recoS+Form(".obj[0][email protected]()>%d",i), true);

plotvar(tName+cName+"_"+recoS+Form(".obj[0].corrections_[%d].dpx()",i), tName+cName+"_"+recoS+Form(".obj[0][email protected]()>%d",i), true);
plotvar(tName+cName+"_"+recoS+Form(".obj[0].corrections_[%d].dsumEt()",i), tName+cName+"_"+recoS+Form(".obj[0][email protected]()>%d",i), true);
}
}

void tau(TString var, TString cName = "hpsPFTauProducer_", TString tName = "recoPFTaus_",
bool log10Var = false, bool trycatch = false, bool notafunction = false){
TString v=notafunction ? tName+cName+"_"+recoS+".obj."+var:
Expand Down Expand Up @@ -2291,6 +2321,12 @@ void validateEvents(TString step, TString file, TString refFile, TString r="RECO
plotvar("log10(recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.energy())");
plotvar("recoPFRecHits_particleFlowRecHitHO_Cleaned_"+recoS+".obj.time()");

plotvar("recoPFRecHits_particleFlowRecHitECAL__"+recoS+"[email protected]()");
plotvar("recoPFRecHits_particleFlowRecHitECAL__"+recoS+".obj.position_.eta()");
plotvar("recoPFRecHits_particleFlowRecHitECAL__"+recoS+".obj.position_.phi()");
plotvar("log10(recoPFRecHits_particleFlowRecHitECAL__"+recoS+".obj.energy())");
plotvar("recoPFRecHits_particleFlowRecHitECAL__"+recoS+".obj.time()");

plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+"[email protected]()");
plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position_.eta()");
plotvar("recoPFRecHits_particleFlowRecHitECAL_Cleaned_"+recoS+".obj.position_.phi()");
Expand Down Expand Up @@ -2488,10 +2524,10 @@ void validateEvents(TString step, TString file, TString refFile, TString r="RECO
metVars("htMetAK7_");

// miniaod
metVars("slimmedMETs_","patMETs_");
metVars("slimmedMETsPuppi_","patMETs_");
patMetVars("slimmedMETs_");
patMetVars("slimmedMETsPuppi_");
// miniaod debug
metVars("patMETsPuppi_","patMETs_");
patMetVars("patMETsPuppi_");
metVars("pfMetT1Puppi_","recoPFMETs_");
metVars("pfMetPuppi_","recoPFMETs_");

Expand Down

0 comments on commit c4aa7ad

Please sign in to comment.