Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed JetMET summary plot for HI DQM #25034

Merged
merged 3 commits into from Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions DQMOffline/JetMET/interface/DataCertificationJetMET.h
Expand Up @@ -84,6 +84,8 @@ class DataCertificationJetMET : public DQMEDHarvester {
bool jetTests[5][2]; //one for each type of jet certification/test type
bool metTests[5][2]; //one for each type of met certification/test type

bool isHI;

//MET: filter efficiencies, started from uncleaned directories
MonitorElement* mMET_EffHBHENoiseFilter;
MonitorElement* mMET_EffCSCTightHaloFilter;
Expand Down
6 changes: 6 additions & 0 deletions DQMOffline/JetMET/python/dataCertificationJetMET_cff.py
Expand Up @@ -3,3 +3,9 @@
from DQMOffline.JetMET.dataCertificationJetMET_cfi import *

dataCertificationJetMETSequence = cms.Sequence(qTesterJet + qTesterMET + dataCertificationJetMET)

dataCertificationJetMETSequenceHI = cms.Sequence(qTesterJet + qTesterMET + dataCertificationJetMETHI)

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018

pp_on_AA_2018.toReplaceWith( dataCertificationJetMETSequence, dataCertificationJetMETSequenceHI )
6 changes: 5 additions & 1 deletion DQMOffline/JetMET/python/dataCertificationJetMET_cfi.py
Expand Up @@ -61,6 +61,10 @@
tcMETMeanTest = cms.untracked.bool(False),
tcMETKSTest = cms.untracked.bool(False),

isHI = cms.untracked.bool(False),
)


dataCertificationJetMETHI = dataCertificationJetMET.clone(
isHI = cms.untracked.bool(True),
jetAlgo = cms.untracked.string("ak"),
)
122 changes: 89 additions & 33 deletions DQMOffline/JetMET/src/DataCertificationJetMET.cc
Expand Up @@ -61,6 +61,8 @@ DataCertificationJetMET::DataCertificationJetMET(const edm::ParameterSet& iConfi
metTests[1][1] = conf_.getUntrackedParameter<bool>("pfMETKSTest",false);
metTests[2][0] = conf_.getUntrackedParameter<bool>("tcMETMeanTest",true);
metTests[2][1] = conf_.getUntrackedParameter<bool>("tcMETKSTest",false);

isHI = conf_.getUntrackedParameter<bool>("isHI",false);

if (verbose_) std::cout << ">>> Constructor (DataCertificationJetMET) <<<" << std::endl;

Expand Down Expand Up @@ -603,43 +605,84 @@ DataCertificationJetMET::dqmEndJob(DQMStore::IBooker& ibook_, DQMStore::IGetter&
MonitorElement *meJetEMFrac[4];
MonitorElement *meJetConstituents[4];
RunDir = "";
if (RunDir == "") newHistoName = "JetMET/Jet/";
if (RunDir.empty()) newHistoName = "JetMET/Jet/";
else newHistoName = RunDir+"/JetMET/Runsummary/Jet/";
std::string cleaningdir = "";
cleaningdir = "Cleaned";

//Jet Phi histos
meJetPhi[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Barrel");
meJetPhi[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_EndCap");
meJetPhi[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Forward");
meJetPhi[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Phi");
//meJetPhi[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Phi");

//Jet Eta histos
meJetEta[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
meJetEta[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
meJetEta[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EtaFirst");
meJetEta[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Eta");
//meJetEta[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Eta");

//Jet Pt histos
meJetPt[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Barrel");
meJetPt[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_EndCap");
meJetPt[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Forward");
meJetPt[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Pt_2");

////Jet Constituents histos
meJetConstituents[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Barrel");
meJetConstituents[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_EndCap");
meJetConstituents[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Forward");
meJetConstituents[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Constituents");
//
////Jet EMFrac histos
meJetEMFrac[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Barrel");
meJetEMFrac[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_EndCap");
meJetEMFrac[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Forward");
meJetEMFrac[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/EFrac");
// Read different histograms for PbPb and pp collisions

if(isHI){ // Histograms for heavy ions

newHistoName = "JetMET/HIJetValidation/";
cleaningdir = "";

//Jet Phi histos
meJetPhi[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Cs4PFJets/Phi");
meJetPhi[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu3PFJets/Phi");
meJetPhi[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4PFJets/Phi");
meJetPhi[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4CaloJets/Phi");

//Jet Eta histos
meJetEta[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Cs4PFJets/Eta");
meJetEta[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu3PFJets/Eta");
meJetEta[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4PFJets/Eta");
meJetEta[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4CaloJets/Eta");

//Jet Pt histos
meJetPt[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Cs4PFJets/Pt");
meJetPt[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu3PFJets/Pt");
meJetPt[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4PFJets/Pt");
meJetPt[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4CaloJets/Pt");

//Jet Constituents histos
meJetConstituents[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Cs4PFJets/Constituents");
meJetConstituents[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu3PFJets/Constituents");
meJetConstituents[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4PFJets/Constituents");
meJetConstituents[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"Pu4CaloJets/Constituents");

//There are no jet EMFrac histograms for HI. Dummy paths will pass the tests by default
meJetEMFrac[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"dummy/dummy");
meJetEMFrac[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"dummy/dummy");
meJetEMFrac[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"dummy/dummy");
meJetEMFrac[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"dummy/dummy");


} else { // Histograms for protons

//Jet Phi histos
meJetPhi[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Barrel");
meJetPhi[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_EndCap");
meJetPhi[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Forward");
meJetPhi[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Phi");
//meJetPhi[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Phi");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removable?

Suggested change
//meJetPhi[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Phi");

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess so. That is the pp part of the code that I did not touch in this commit (except by moving it inside the else block).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a backport of #24993 and that PR is already merged to master, I would prefer not to remove these commented out parts of code here either for consistency.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vargasa Do you think it is better to keep the code consistent with #24993 or remove these two lines of commented code? It does no harm to remove them from the backport if necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jusaviin Please double check nothing is broken in the repo history by removing them, and if so. I'd suggest to remove them. So we can keep the code cleaner :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that those lines have been commented out sometime in 2014. Most likely not needed ever again. I removed the lines and committed the update.


//Jet Eta histos
meJetEta[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
meJetEta[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
meJetEta[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EtaFirst");
meJetEta[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Eta");
//meJetEta[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Eta");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess so. That is the pp part of the code that I did not touch in this commit (except by moving it inside the else block).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a backport of #24993 and that PR is already merged to master, I would prefer not to remove these commented out parts of code here either for consistency.


//Jet Pt histos
meJetPt[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Barrel");
meJetPt[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_EndCap");
meJetPt[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Forward");
meJetPt[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Pt_2");

//Jet Constituents histos
meJetConstituents[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Barrel");
meJetConstituents[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_EndCap");
meJetConstituents[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Forward");
meJetConstituents[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Constituents");

//Jet EMFrac histos
meJetEMFrac[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Barrel");
meJetEMFrac[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_EndCap");
meJetEMFrac[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Forward");
meJetEMFrac[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/EFrac");

}

//------------------------------------------------------------------------------
//--- Extract quality test results and fill data certification results for Jets
Expand Down Expand Up @@ -870,6 +913,12 @@ DataCertificationJetMET::dqmEndJob(DQMStore::IBooker& ibook_, DQMStore::IGetter&
reportSummaryMap->Fill(2, 4-jtyp, dc_Jet[jtyp]);
}

// There is nothing on the first row for HI, so mark the unfilled
if(isHI){
CertificationSummaryMap->Fill(2, 0, -2);
reportSummaryMap->Fill(2, 0, -2);
}

//-----------------------------
// MET DQM Data Certification
//-----------------------------
Expand All @@ -882,7 +931,7 @@ DataCertificationJetMET::dqmEndJob(DQMStore::IBooker& ibook_, DQMStore::IGetter&
MonitorElement *meMETPhi[2];

RunDir = "";
if (RunDir == "") newHistoName = "JetMET/MET/";
if (RunDir.empty()) newHistoName = "JetMET/MET/";
else newHistoName = RunDir+"/JetMET/Runsummary/MET/";

metFolder = "Cleaned";
Expand Down Expand Up @@ -1090,6 +1139,13 @@ DataCertificationJetMET::dqmEndJob(DQMStore::IBooker& ibook_, DQMStore::IGetter&
reportSummaryMap->Fill(1, 4-mtyp, dc_MET[mtyp]);
}

// There is nothing on the first three rows for HI, so mark them unfilled
if(isHI){
for(int i = 0; i < 3; i++){
CertificationSummaryMap->Fill(1, i, -2);
reportSummaryMap->Fill(1, i, -2);
}
}

//----------------------------------------------------------------------------
//--- Extract quality test results and fill data certification results for MET
Expand Down
13 changes: 13 additions & 0 deletions DQMOffline/JetMET/test/JetQualityTests.xml
Expand Up @@ -48,15 +48,28 @@
<TestName activate="true">KolmogorovTest</TestName>
</LINK>

<LINK name="JetMET/HIJetValidation/*/Eta*">
<TestName activate="true">KolmogorovTest</TestName>
</LINK>

<LINK name="JetMET/Jet/*/Phi*">
<TestName activate="true">KolmogorovTest</TestName>
</LINK>

<LINK name="JetMET/HIJetValidation/*/Phi*">
<TestName activate="true">KolmogorovTest</TestName>
</LINK>

<LINK name="JetMET/Jet/*/Pt*">
<TestName activate="true">KolmogorovTest</TestName>
<TestName activate="true">meanJetPtTest</TestName>
</LINK>

<LINK name="JetMET/HIJetValidation/*/Pt*">
<TestName activate="true">KolmogorovTest</TestName>
<TestName activate="true">meanJetPtTest</TestName>
</LINK>

<LINK name="JetMET/Jet/*/Constituents*">
<TestName activate="true">KolmogorovTest</TestName>
<TestName activate="true">meanJetConstituentsTest</TestName>
Expand Down