Commit c018055a authored by Rachid Mazini's avatar Rachid Mazini
Browse files

Merge branch '21.0-remove-empty-electron-plots' into '21.0'

Reduction of egammaValidation histograms related to TruthElectronHistograms which were empty.

See merge request !43722
parents ffd120f2 2970f181
......@@ -27,15 +27,12 @@ namespace egammaMonitoring {
gROOT->ForceStyle();
gStyle->SetOptStat(0);
for ( const auto &p : pass->histoMap ){
TH1D *efficiency = (TH1D*) p.second->Clone(Form("%s_%s",m_name.c_str(),p.first.c_str()));
efficiency->Divide(p.second, total->histoMap[p.first], 1, 1, "B");
for ( const auto &p : total->histoMap ){
TH1D *efficiency = (TH1D*) pass->histoMap[p.first]->Clone(Form("%s_%s",m_name.c_str(),p.first.c_str()));
efficiency->Divide(pass->histoMap[p.first], p.second, 1, 1, "B");
efficiency->GetYaxis()->SetTitle("Efficiency");
efficiency->GetYaxis()->SetRangeUser(0,1.1);
ATH_CHECK(m_rootHistSvc->regHist(Form("%sEff_%s", m_folder.c_str(), p.first.c_str()), efficiency));
}
......
......@@ -61,7 +61,6 @@ StatusCode EgammaMonitoring::initialize() {
ATH_CHECK(isolationAll->initializePlots());
if ("electron" == m_sampleType) {
truthElectronAll = std::make_unique<egammaMonitoring::TruthElectronHistograms>(
"truthElectronAll","All Truth Electrons", "/MONITORING/truthElectronAll/", rootHistSvc);
......@@ -96,16 +95,16 @@ StatusCode EgammaMonitoring::initialize() {
"recoElectronIsoFixedCutTightTrackOnly","Isolation Fixed Cut Tight Track Only Electrons Reco Electron", "/MONITORING/recoElectronIsoFixedCutTightTrackOnly/", rootHistSvc);
ATH_CHECK(recoElectronAll->initializePlots());
ATH_CHECK(truthRecoElectronLooseLH->initializePlots());
ATH_CHECK(truthRecoElectronMediumLH->initializePlots());
ATH_CHECK(truthRecoElectronTightLH->initializePlots());
ATH_CHECK(truthElectronAll->initializePlots());
ATH_CHECK(truthPromptElectronAll->initializePlots());
ATH_CHECK(truthElectronRecoElectronAll->initializePlots());
ATH_CHECK(truthPromptElectronWithTrack->initializePlots());
ATH_CHECK(truthPromptElectronWithGSFTrack->initializePlots());
ATH_CHECK(truthPromptElectronWithReco->initializePlots());
ATH_CHECK(recoElectronIsoFixedCutTightTrackOnly->initializePlots());
ATH_CHECK(truthRecoElectronLooseLH->initializePlots(false));
ATH_CHECK(truthRecoElectronMediumLH->initializePlots(false));
ATH_CHECK(truthRecoElectronTightLH->initializePlots(false));
ATH_CHECK(truthElectronAll->initializePlots(true));
ATH_CHECK(truthPromptElectronAll->initializePlots(true));
ATH_CHECK(truthElectronRecoElectronAll->initializePlots(false));
ATH_CHECK(truthPromptElectronWithTrack->initializePlots(true));
ATH_CHECK(truthPromptElectronWithGSFTrack->initializePlots(true));
ATH_CHECK(truthPromptElectronWithReco->initializePlots(false));
ATH_CHECK(recoElectronIsoFixedCutTightTrackOnly->initializePlots(false));
} // electron Hists
......
......@@ -10,28 +10,26 @@
using namespace egammaMonitoring;
StatusCode TruthElectronHistograms::initializePlots() {
StatusCode TruthElectronHistograms::initializePlots(bool reducedHistSet) {
histoMap["deltaPhi2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhi2"), ";deltaPhi2; Events", 40, -0.06, 0.06);
histoMap["deltaEta2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaEta2"), ";deltaEta2; Events", 40, -0.04, 0.04);
histoMap["deltaPhiRescaled2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhiRescaled2"), ";deltaPhi2; Events", 40, -0.04, 0.04);
if (!reducedHistSet) {
histoMap["deltaPhi2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhi2"), ";deltaPhi2; Events", 40, -0.06, 0.06);
histoMap["deltaEta2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaEta2"), ";deltaEta2; Events", 40, -0.04, 0.04);
histoMap["deltaPhiRescaled2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhiRescaled2"), ";deltaPhi2; Events", 40, -0.04, 0.04);
histoMap["d0Oversigmad0"] = new TH1D(Form("%s_%s",m_name.c_str(),"d0Oversigmad0"), "; d0Oversigmad0; Events", 40, -10, 10);
histoMap["qOverp_resolution"] = new TH1D(Form("%s_%s",m_name.c_str(),"qOverp_resolution"), ";(q/P reco - q/P truth)/ q/p truth; Events", 60, -1, 1.5);
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaPhi2", histoMap["deltaPhi2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaEta2", histoMap["deltaEta2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaPhiRescaled2", histoMap["deltaPhiRescaled2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"d0Oversigmad0", histoMap["d0Oversigmad0"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"qOverp_resolution", histoMap["qOverp_resolution"]));
histoMap["d0Oversigmad0"] = new TH1D(Form("%s_%s",m_name.c_str(),"d0Oversigmad0"), "; d0Oversigmad0; Events", 40, -10, 10);
histoMap["qOverp_resolution"] = new TH1D(Form("%s_%s",m_name.c_str(),"qOverp_resolution"), ";(q/P reco - q/P truth)/ q/p truth; Events", 60, -1, 1.5);
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaPhi2", histoMap["deltaPhi2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaEta2", histoMap["deltaEta2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaPhiRescaled2", histoMap["deltaPhiRescaled2"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"d0Oversigmad0", histoMap["d0Oversigmad0"]));
ATH_CHECK(m_rootHistSvc->regHist(m_folder+"qOverp_resolution", histoMap["qOverp_resolution"]));
}
ATH_CHECK(ParticleHistograms::initializePlots());
m_reducedHistSet = reducedHistSet;
return StatusCode::SUCCESS;
......@@ -43,7 +41,7 @@ void TruthElectronHistograms::fill(const xAOD::TruthParticle *truth, const xAOD:
ParticleHistograms::fill(*truth);
if (!electron) return;
if (!electron || m_reducedHistSet) return;
const xAOD::TrackParticle* track = electron->trackParticle();
......
......@@ -23,7 +23,7 @@ namespace egammaMonitoring {
using ParticleHistograms::ParticleHistograms;
using ParticleHistograms::initializePlots;
StatusCode initializePlots();
StatusCode initializePlots(bool reducedHistSet);
using ParticleHistograms::fill;
......@@ -31,6 +31,7 @@ namespace egammaMonitoring {
private:
bool m_reducedHistSet;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment