From 86e230e59336671556748c839975ad2fdb02d44a Mon Sep 17 00:00:00 2001 From: Mark Hodgkinson <m.hodgkinson@sheffield.ac.uk> Date: Sat, 7 Aug 2021 10:52:26 +0000 Subject: [PATCH] Remove PFO Validation Code --- .../share/PhysValPFlow_jobOptions.py | 21 - .../PFODQA/src/PFOChargedValidationPlots.cxx | 16 +- .../PFODQA/src/PFOChargedValidationPlots.h | 16 +- .../PFODQA/src/PFONeutralValidationPlots.cxx | 24 +- .../PFODQA/src/PFONeutralValidationPlots.h | 24 +- .../PFODQA/src/PFO_FE_ComparisonPlots.cxx | 95 ----- .../PFODQA/src/PFO_FE_ComparisonPlots.h | 42 -- .../PFlowValidation/PFODQA/src/PhysValFE.cxx | 58 +-- .../PFlowValidation/PFODQA/src/PhysValFE.h | 16 +- .../PFlowValidation/PFODQA/src/PhysValPFO.cxx | 99 ----- .../PFlowValidation/PFODQA/src/PhysValPFO.h | 54 --- .../PFODQA/src/components/PFODQA_entries.cxx | 2 - .../PFOHistUtils/PFOAlgPropertyPlots.h | 24 +- .../PFOHistUtils/PFOAttributePlots.h | 19 +- .../PFOHistUtils/PFOClusterMomentPlots.h | 75 +--- .../PFOHistUtils/PFOHistUtils/PFOEMPlots.h | 40 -- .../PFOHistUtils/PFOPVMatchedPlots.h | 16 +- .../PFOHistUtils/PFOHistUtils/PFOPlots.h | 22 +- .../PFO_FE_Comparison_PlotMaker.h | 58 --- .../PFOHistUtils/src/PFOAlgPropertyPlots.cxx | 63 +-- .../PFOHistUtils/src/PFOAttributePlots.cxx | 63 +-- .../src/PFOClusterMomentPlots.cxx | 231 +---------- .../PFOHistUtils/src/PFOEMPlots.cxx | 41 -- .../PFOHistUtils/src/PFOPVMatchedPlots.cxx | 48 +-- .../PFOHistUtils/src/PFOPlots.cxx | 51 +-- .../src/PFO_FE_Comparison_PlotMaker.cxx | 374 ------------------ .../test/test_mc20e_13TeV_PhysValAll.sh | 2 +- .../test/test_mc20e_13TeV_chainRecoPhysVal.sh | 2 +- Tools/Tier0ChainTests/test/test_q221.sh | 2 +- Tools/Tier0ChainTests/test/test_q221_mp.sh | 2 +- Tools/Tier0ChainTests/test/test_q221_mt1.sh | 2 +- 31 files changed, 84 insertions(+), 1518 deletions(-) delete mode 100644 PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_jobOptions.py delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.cxx delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.h delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.h delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFO_FE_Comparison_PlotMaker.h delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx delete mode 100644 Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFO_FE_Comparison_PlotMaker.cxx diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_jobOptions.py deleted file mode 100644 index f11cecbb663..00000000000 --- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_jobOptions.py +++ /dev/null @@ -1,21 +0,0 @@ -#Please note that to access LC PFlow container, one should run the below tool to combine the two neutral containers into one -#That then puts a new container in StoreGate, which PhysValPFO_neutral could be updated to access -#from PFlowUtils.PFlowUtilsConf import CombinePFO - -from PFODQA.PFODQAConf import PhysValPFO - -PhysValPFO_charged = PhysValPFO("PhysValPFO_charged") -PhysValPFO_charged.OutputLevel = WARNING -PhysValPFO_charged.DetailLevel = 10 -PhysValPFO_charged.EnableLumi = False - -monMan.AthenaMonTools += [ PhysValPFO_charged ] - -PhysValPFO_neutral_EM = PhysValPFO("PhysValPFO_neutral") -PhysValPFO_neutral_EM.OutputLevel = WARNING -PhysValPFO_neutral_EM.DetailLevel = 10 -PhysValPFO_neutral_EM.EnableLumi = False -PhysValPFO_neutral_EM.PFOContainerName="JetETMissNeutralParticleFlowObjects" -PhysValPFO_neutral_EM.useNeutralPFO = True - -monMan.AthenaMonTools += [ PhysValPFO_neutral_EM ] \ No newline at end of file diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx index 15579bab260..b4152f566cd 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx @@ -4,21 +4,13 @@ #include "PFOChargedValidationPlots.h" -PFOChargedValidationPlots::PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName,std::string sFEContainerName) : PlotBase(pParent, sDir), - m_PFOPlots(this,"",sPFOContainerName,""), - m_PFOPVMatchedPlots(this,"",sPFOContainerName,""), - m_PFOAlgPropertyPlots(this,"",sPFOContainerName,""), - m_FEPlots(this,"","",sFEContainerName), - m_FEPVMatchedPlots(this,"","",sFEContainerName), - m_FEAlgPropertyPlots(this,"","",sFEContainerName), +PFOChargedValidationPlots::PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), + m_FEPlots(this,"",sFEContainerName), + m_FEPVMatchedPlots(this,"",sFEContainerName), + m_FEAlgPropertyPlots(this,"",sFEContainerName), m_FELinkerPlots(this,"",sFEContainerName,false) {} -void PFOChargedValidationPlots::fill(const xAOD::PFO& thePFO, const xAOD::Vertex* theVertex, const xAOD::EventInfo& eventInfo ){ - m_PFOPlots.fill(thePFO,eventInfo); - m_PFOAlgPropertyPlots.fill(thePFO,eventInfo); - if (theVertex) m_PFOPVMatchedPlots.fill(thePFO, *theVertex,eventInfo); -} void PFOChargedValidationPlots::fill(const xAOD::FlowElement& theFE, const xAOD::Vertex* theVertex, const xAOD::EventInfo& eventInfo ){ m_FEPlots.fill(theFE,eventInfo); m_FEAlgPropertyPlots.fill(theFE,eventInfo); diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h index 61d49b93d60..114bf22ca9e 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h @@ -10,7 +10,6 @@ #include "PFOHistUtils/PFOPVMatchedPlots.h" #include "PFOHistUtils/PFOAlgPropertyPlots.h" #include "PFOHistUtils/FlowElement_LinkerPlots.h" -#include "xAODPFlow/PFO.h" #include "xAODPFlow/FlowElement.h" #include "xAODTracking/Vertex.h" #include "xAODEventInfo/EventInfo.h" @@ -20,20 +19,11 @@ class PFOChargedValidationPlots : public PlotBase { public: /** Standard Constructor */ - PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName,std::string sFEContainerName); + PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName); - /** fill the histograms up */ - void fill(const xAOD::PFO& thePFO, const xAOD::Vertex* theVertex, const xAOD::EventInfo& eventInfo); + /** fill the histograms up */ void fill(const xAOD::FlowElement& theFE, const xAOD::Vertex* theVertex, const xAOD::EventInfo& eventInfo); - private: - // PFO plots - /** 4-vector and charge histograms */ - PFO::PFOPlots m_PFOPlots; - /** 4-vector and charge histograms with PV match cut applied */ - PFO::PFOPVMatchedPlots m_PFOPVMatchedPlots; - /** Algorithm property plots */ - PFO::PFOAlgPropertyPlots m_PFOAlgPropertyPlots; - + private: //Flow Element Plots /** 4-vector and charge histograms */ PFO::PFOPlots m_FEPlots; diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx index de54eabc06c..da8d47985f3 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx @@ -4,27 +4,13 @@ #include "PFONeutralValidationPlots.h" -PFONeutralValidationPlots::PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), - m_PFOPlots(this,"",sPFOContainerName,""), - m_PFOClusterMomentPlots(this,"",sPFOContainerName,""), - m_PFOCalibHitClusterMomentPlots(this,"",sPFOContainerName,""), - m_PFOAttributePlots(this,"",sPFOContainerName,""), - m_PFOEMPlots(this,"",sPFOContainerName,""), - m_FEPlots(this,"","",sFEContainerName), - m_FEClusterMomentPlots(this,"","",sFEContainerName), - m_FEAttributePlots(this,"","",sFEContainerName), - m_FEEMPlots(this,"","",sFEContainerName), - m_FELinkerPlots(this,"",sFEContainerName,true) +PFONeutralValidationPlots::PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), + m_FEPlots(this,"",sFEContainerName), + m_FEClusterMomentPlots(this,"",sFEContainerName), + m_FEAttributePlots(this,"",sFEContainerName), + m_FELinkerPlots(this,"",sFEContainerName,true) {} -void PFONeutralValidationPlots::fill(const xAOD::PFO& thePFO,const xAOD::EventInfo& eventInfo){ - m_PFOPlots.fill(thePFO,eventInfo); - m_PFOClusterMomentPlots.fill(thePFO,eventInfo); - m_PFOCalibHitClusterMomentPlots.fill(thePFO,eventInfo); - m_PFOAttributePlots.fill(thePFO,eventInfo); - m_PFOEMPlots.fill(thePFO,eventInfo); -} - void PFONeutralValidationPlots::fill(const xAOD::FlowElement& theFE, const xAOD::EventInfo& eventInfo){ //overload of previous function using FlowElement m_FEPlots.fill(theFE,eventInfo); diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h index 408ce3394f2..9b11df52ef4 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h @@ -10,9 +10,7 @@ #include "PFOHistUtils/PFOClusterMomentPlots.h" #include "PFOHistUtils/PFOCalibHitClusterMomentPlots.h" #include "PFOHistUtils/PFOAttributePlots.h" -#include "PFOHistUtils/PFOEMPlots.h" #include "PFOHistUtils/FlowElement_LinkerPlots.h" -#include "xAODPFlow/PFO.h" #include "xAODPFlow/FlowElement.h" #include "xAODEventInfo/EventInfo.h" @@ -21,26 +19,12 @@ class PFONeutralValidationPlots : public PlotBase { public: /** Standard Constructor */ - PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); + PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName); - /** fill the histograms up */ - void fill(const xAOD::PFO& thePFO,const xAOD::EventInfo& eventInfo); + /** fill the histograms up */ void fill(const xAOD::FlowElement& theFE, const xAOD::EventInfo& eventInfo); private: - // objects for PFOs - /** 4-vector histograms */ - PFO::PFOPlots m_PFOPlots; - /** Cluster Moment histograms */ - PFO::PFOClusterMomentPlots m_PFOClusterMomentPlots; - /** CalibHit Cluster Moment histograms */ - PFO::PFOCalibHitClusterMomentPlots m_PFOCalibHitClusterMomentPlots; - /** PFO attributes */ - PFO::PFOAttributePlots m_PFOAttributePlots; - /** 4-vector histograms at EM scale */ - PFO::PFOEMPlots m_PFOEMPlots; - - // equivalent classes for FlowElements - separate so we can book-keep them separately /** 4-vector histograms */ PFO::PFOPlots m_FEPlots; /** Cluster Moment histograms */ @@ -48,9 +32,7 @@ class PFONeutralValidationPlots : public PlotBase { /** CalibHit Cluster Moment histograms */ /** PFO::PFOCalibHitClusterMomentPlots m_FECalibHitClusterMomentPlots; // MC doesn't generally have the relevant calibhits saved. To add at a later date if needed */ /** FE attributes */ - PFO::PFOAttributePlots m_FEAttributePlots; - /** 4-vector histograms at EM scale */ - PFO::PFOEMPlots m_FEEMPlots; + PFO::PFOAttributePlots m_FEAttributePlots; /** Flow element linkers to leptons/photons */ PFO::FlowElement_LinkerPlots m_FELinkerPlots; diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.cxx deleted file mode 100644 index 223c5bee3cb..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.cxx +++ /dev/null @@ -1,95 +0,0 @@ -#include "PFO_FE_ComparisonPlots.h" -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ -// Author: M. T. Anthony -PFO_FE_ComparisonPlots::PFO_FE_ComparisonPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName, bool isNeutral=false): - PlotBase(pParent,sDir), - asg::AsgMessaging("PFO_FE_comparison_plots"), - m_isNeutral(isNeutral), // classdef - m_PlotMaker(this,"",sPFOContainerName,sFEContainerName,m_isNeutral) -{ - ATH_MSG_VERBOSE("PFO_FE_ComparisonPlots constructor call"); -} - -bool PFO_FE_ComparisonPlots::Match (const xAOD::PFO* pfo, const xAOD::FlowElement* fe){ - //function to read off the indices of the clusters associated to NFE and NPFO and see if they match - //nullptr catches - ATH_MSG_VERBOSE("Matching function call"); - if(pfo == nullptr or fe==nullptr){ - return false; - } - // debug statement: check the charge of the FE and PFO to see if we're comparing the right things - bool fe_ischarged=fe->isCharged(); // check the charge of the FE - bool pfo_ischarged=pfo->isCharged(); // check the charge of the PFO - - if(m_isNeutral){ - // define match if PFO and FE share same cluster index - //nullptr catch - if(pfo->cluster(0)==nullptr or fe->otherObjects().size()==0 or fe->otherObjects().at(0)==nullptr){ - ATH_MSG_DEBUG("PFO vs FE validation has nullptr in cluster matching/ no clusters"); - if(pfo->cluster(0)==nullptr){ - ATH_MSG_DEBUG("PFO first cluster is a dud"); - } - if(fe->otherObjects().size()==0){ - ATH_MSG_DEBUG("FE has no clusters"); - } - if(fe->otherObjects().at(0)==nullptr){ - ATH_MSG_DEBUG("FE cluster ptr is a dud"); - } - if(pfo_ischarged or fe_ischarged){ - ATH_MSG_WARNING("pfo or FE are misconfigured - one of these is charged when it is expected to be neutral"); - } - return false; - } - size_t pfo_index=pfo->cluster(0)->index(); - size_t fe_index=fe->otherObjects().at(0)->index(); - // since size_t is basically int (technically unsigned int), return the bool - return (fe_index==pfo_index); - } - else{ - //define match if PFO and FE share same track index - //nullptr catch - if(pfo->track(0)==nullptr or fe->chargedObjects().size()==0 or fe->chargedObjects().at(0)==nullptr){ - ATH_MSG_DEBUG("PFO vs FE validation has nullptr in track matching/ no tracks"); - - if(pfo->track(0)==nullptr){ - ATH_MSG_DEBUG("PFO track is a dud"); - } - if(fe->chargedObjects().size()==0){ - ATH_MSG_DEBUG("FE has no tracks"); - } - if(fe->chargedObjects().at(0)==nullptr){ - ATH_MSG_DEBUG("FE track ptr is a dud"); - } - if(!pfo_ischarged or !fe_ischarged){ - ATH_MSG_WARNING("pfo or FE are misconfigured - one of these is neutral when it is expected to be charged"); - } - return false; - } - - size_t pfo_index=pfo->track(0)->index(); - size_t fe_index=fe->chargedObjects().at(0)->index(); - return (fe_index==pfo_index); - } -} - -void PFO_FE_ComparisonPlots::MatchAndFill(SG::ReadHandle<xAOD::FlowElementContainer>& fecont, SG::ReadHandle<xAOD::PFOContainer>& pfocont){ - // Does what it says on the tin: Matches the PFO to the FE through cluster matching - ATH_MSG_VERBOSE("PFO_FE_ComparisonPlots MatchAndFill fn"); - for (const xAOD::PFO* pfo : *pfocont){ - for(const xAOD::FlowElement* fe: *fecont){ - bool ismatched=Match(pfo, fe); - if(ismatched){ - Fill(pfo,fe); - } - } - } - -} - - -void PFO_FE_ComparisonPlots::Fill(const xAOD::PFO* pfo, const xAOD::FlowElement* fe){ - ATH_MSG_VERBOSE("PFO_FE_ComparisonPlots Fill function, assuming matched"); - m_PlotMaker.Fill(pfo,fe); -} diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.h deleted file mode 100644 index dac7fce314c..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFO_FE_ComparisonPlots.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ -// Author: M. T. Anthony -#ifndef PFO_FE_COMPARISONPLOTS_H -#define PFO_FE_COMPARISONPLOTS_H - -#include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/FlowElementContainer.h" -#include "xAODPFlow/PFOContainer.h" -#include "StoreGate/ReadHandleKey.h" -#include "AthenaMonitoring/ManagedMonitorToolBase.h" -#include "xAODPFlow/PFO.h" -#include "xAODPFlow/FlowElement.h" -// Local include(s) for msg: -#include "AsgMessaging/AsgMessaging.h" - -//tool include (to actually make the plots) -#include "PFOHistUtils/PFO_FE_Comparison_PlotMaker.h" -/* -This class is a factory class to generate comparison plots between PFO and Flow Elements, depending on if you want plots for neutral/charged objects - */ -class PFO_FE_ComparisonPlots : public PlotBase, public asg::AsgMessaging { -public: - PFO_FE_ComparisonPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName, bool isNeutral); // constructor - - - private: - bool Match(const xAOD::PFO* pfo, const xAOD::FlowElement* fe); // matching method to be called inside MatchAndFill (determined by if its neutral or not) -//PFO::PFO_FE_ComparisonPlots; - void Fill(const xAOD::PFO* pfo, const xAOD::FlowElement* fe); - bool m_isNeutral; - PFO::PFO_FE_Comparison_PlotMaker m_PlotMaker; - - - - public: // since this method depends on the above, define afterward - - void MatchAndFill(SG::ReadHandle<xAOD::FlowElementContainer>& fecont, SG::ReadHandle<xAOD::PFOContainer>& pfocont); - -}; -#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx index 40f0e7dc170..4d2603fd2f7 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx @@ -3,7 +3,6 @@ */ #include "PhysValFE.h" -#include "xAODPFlow/PFOContainer.h" #include "xAODPFlow/FlowElementContainer.h" PhysValFE::PhysValFE (const std::string& type, const std::string& name, const IInterface* parent ) : @@ -16,8 +15,7 @@ PhysValFE::PhysValFE (const std::string& type, const std::string& name, const II PhysValFE::~PhysValFE() {} StatusCode PhysValFE::initialize(){ - ATH_CHECK(ManagedMonitorToolBase::initialize()); - ATH_CHECK(m_PFOContainerHandleKey.initialize()); + ATH_CHECK(ManagedMonitorToolBase::initialize()); ATH_CHECK(m_vertexContainerReadHandleKey.initialize()); ATH_CHECK(m_FEContainerHandleKey.initialize()); @@ -33,13 +31,11 @@ StatusCode PhysValFE::initialize(){ StatusCode PhysValFE::bookHistograms(){ - std::string theName = "PFlow/FlowElement/"+m_FEContainerHandleKey.key(); - std::string PFO_name=m_PFOContainerHandleKey.key(); + std::string theName = "PFlow/FlowElement/"+m_FEContainerHandleKey.key(); std::vector<HistData> hists; - std::vector<HistData> additional_hists; - std::vector<HistData> PFO_FE_comparison_hists; + std::vector<HistData> additional_hists; if (!m_useNeutralFE){ - m_FEChargedValidationPlots.reset(new PFOChargedValidationPlots(0,theName,"", theName)); + m_FEChargedValidationPlots.reset(new PFOChargedValidationPlots(0,theName,theName)); m_FEChargedValidationPlots->setDetailLevel(100); m_FEChargedValidationPlots->initialize(); hists = m_FEChargedValidationPlots->retrieveBookedHistograms(); @@ -48,19 +44,10 @@ StatusCode PhysValFE::bookHistograms(){ m_LeptonLinkerPlots_CFE->initialize(); m_LeptonLinkerPlots_CFE->retrieveBookedHistograms(); additional_hists=m_LeptonLinkerPlots_CFE->retrieveBookedHistograms(); - - - // PFO vs FE comparison based on track matching - if(m_compareFEtoPFO){ - m_charged_PFO_FE_comparison.reset(new PFO_FE_ComparisonPlots(0,theName,theName+PFO_name,theName,false)); - m_charged_PFO_FE_comparison->setDetailLevel(100); - m_charged_PFO_FE_comparison->initialize(); - PFO_FE_comparison_hists=m_charged_PFO_FE_comparison->retrieveBookedHistograms(); - } } else if (m_useNeutralFE){ - m_FENeutralValidationPlots.reset(new PFONeutralValidationPlots(0,theName, "",theName)); + m_FENeutralValidationPlots.reset(new PFONeutralValidationPlots(0,theName, theName)); m_FENeutralValidationPlots->setDetailLevel(100); m_FENeutralValidationPlots->initialize(); hists = m_FENeutralValidationPlots->retrieveBookedHistograms(); @@ -68,24 +55,12 @@ StatusCode PhysValFE::bookHistograms(){ m_LeptonLinkerPlots_NFE.reset(new LeptonNFEValidationPlots(0,theName,theName)); m_LeptonLinkerPlots_NFE->setDetailLevel(100); m_LeptonLinkerPlots_NFE->initialize(); - additional_hists=m_LeptonLinkerPlots_NFE->retrieveBookedHistograms(); - - if(m_compareFEtoPFO){ - //PFO vs FE comparison based on cluster matching - m_neutral_PFO_FE_comparison.reset(new PFO_FE_ComparisonPlots(0,theName,theName+PFO_name,theName,true)); - m_neutral_PFO_FE_comparison->setDetailLevel(100); - m_neutral_PFO_FE_comparison->initialize(); - PFO_FE_comparison_hists=m_neutral_PFO_FE_comparison->retrieveBookedHistograms(); - } + additional_hists=m_LeptonLinkerPlots_NFE->retrieveBookedHistograms(); } - - - hists.insert(hists.end(),additional_hists.begin(),additional_hists.end()); // append lepton-FE linker plots to collection of hists - hists.insert(hists.end(),PFO_FE_comparison_hists.begin(),PFO_FE_comparison_hists.end()); // add the PFO vs FE comparison plots + hists.insert(hists.end(),additional_hists.begin(),additional_hists.end()); // append lepton-FE linker plots to collection of hists - for (auto hist : hists) { ATH_MSG_DEBUG("Processing histogram named: "<<hist.first->GetName()<<" (title) "<<hist.first->GetTitle()); ATH_CHECK(regHist(hist.first,hist.second,all)); @@ -137,11 +112,7 @@ StatusCode PhysValFE::fillHistograms(){ else if (m_useNeutralFE) m_FENeutralValidationPlots->fill(*theFE,*eventInfoReadHandle); } else ATH_MSG_WARNING("Invalid pointer to xAOD::FlowElement"); - } - - //Don't check if this is valid - we no longer create PFO by default, so its expected this will not be valid. - //Future MR will remove all PFO code from these tools - SG::ReadHandle<xAOD::PFOContainer> PFOContainerReadHandle(m_PFOContainerHandleKey); + } SG::ReadHandle<xAOD::MuonContainer> MuonContainerReadHandle(m_MuonContainerHandleKey); if(!MuonContainerReadHandle.isValid()){ @@ -183,18 +154,7 @@ StatusCode PhysValFE::fillHistograms(){ if(!m_useNeutralFE) m_LeptonLinkerPlots_CFE->fill(*Tau,*eventInfoReadHandle); else m_LeptonLinkerPlots_NFE->fill(*Tau,*eventInfoReadHandle); } - } - - if (m_compareFEtoPFO){ - if(PFOContainerReadHandle.isValid() and FEContainerReadHandle.isValid()){ - if(!m_useNeutralFE) { - m_charged_PFO_FE_comparison->MatchAndFill( FEContainerReadHandle, PFOContainerReadHandle); - } - else{ - m_neutral_PFO_FE_comparison->MatchAndFill( FEContainerReadHandle, PFOContainerReadHandle); - } - } - } + } return StatusCode::SUCCESS; diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h index 4287b09826d..3b538bfb6af 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h @@ -12,7 +12,6 @@ #include "AthenaMonitoring/ManagedMonitorToolBase.h" #include <string> #include "xAODTracking/VertexContainer.h" -#include "xAODPFlow/PFOContainer.h" #include "xAODPFlow/FlowElementContainer.h" #include "StoreGate/ReadHandleKey.h" #include "xAODMuon/MuonContainer.h" @@ -20,7 +19,6 @@ #include "xAODEgamma/PhotonContainer.h" #include "xAODTau/TauJetContainer.h" #include "xAODEventInfo/EventInfo.h" -#include "PFO_FE_ComparisonPlots.h" class PhysValFE : public ManagedMonitorToolBase { @@ -44,11 +42,7 @@ public: SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerReadHandleKey{this,"primaryVerticesName","PrimaryVertices","ReadHandleKey for the PrimaryVertices container"}; /** ReadHandle to retrieve xAOD::FlowElementContainer (charged) */ - SG::ReadHandleKey<xAOD::FlowElementContainer> m_FEContainerHandleKey{this,"FlowElementContainerName","JetETMissChargedFlowElements","ReadHandleKey for the FE container"}; - - - /** ReadHandleKey to retrieve xAOD::PFOContainer */ - SG::ReadHandleKey<xAOD::PFOContainer> m_PFOContainerHandleKey{this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"}; + SG::ReadHandleKey<xAOD::FlowElementContainer> m_FEContainerHandleKey{this,"FlowElementContainerName","JetETMissChargedFlowElements","ReadHandleKey for the FE container"}; /** ReadHandleKey to retrieve MuonContainer */ SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerHandleKey{this,"MuonContainerName","Muons","ReadHandleKey for the muon container"}; @@ -77,13 +71,7 @@ public: /** Select whether to use neutral or charged FE */ bool m_useNeutralFE; - - /** Pointer to class that deals with PFO/FE comparison plots */ - std::unique_ptr<PFO_FE_ComparisonPlots> m_charged_PFO_FE_comparison; - std::unique_ptr<PFO_FE_ComparisonPlots> m_neutral_PFO_FE_comparison; - - /** Toggle to enable plots directly comparing FE and PFO */ - Gaudi::Property<bool> m_compareFEtoPFO{this,"compareFEtoPFO",false,"Toggle to enable plots directly comparing FE and PFO "}; + }; #endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx deleted file mode 100644 index fe8b6115fe2..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "PhysValPFO.h" -#include "xAODPFlow/PFOContainer.h" - -PhysValPFO::PhysValPFO (const std::string& type, const std::string& name, const IInterface* parent ) : ManagedMonitorToolBase( type, name, parent ), m_useNeutralPFO(false) { - declareProperty("useNeutralPFO", m_useNeutralPFO, "Select whether to use neutral or charged PFO"); -} - -PhysValPFO::~PhysValPFO() {} - -StatusCode PhysValPFO::initialize(){ - ATH_CHECK(ManagedMonitorToolBase::initialize()); - - ATH_CHECK(m_vertexContainerReadHandleKey.initialize()); - ATH_CHECK(m_PFOContainerHandleKey.initialize()); - ATH_CHECK(m_eventInfoReadHandleKey.initialize()); - - return StatusCode::SUCCESS; -} - - -StatusCode PhysValPFO::bookHistograms(){ - - std::string theName = "PFlow/"+m_PFOContainerHandleKey.key(); - - std::vector<HistData> hists; - if (!m_useNeutralPFO){ - m_PFOChargedValidationPlots.reset(new PFOChargedValidationPlots(0,theName, theName,"")); - m_PFOChargedValidationPlots->setDetailLevel(100); - m_PFOChargedValidationPlots->initialize(); - hists = m_PFOChargedValidationPlots->retrieveBookedHistograms(); - } - else if (m_useNeutralPFO){ - m_PFONeutralValidationPlots.reset(new PFONeutralValidationPlots(0,theName, theName,"")); - m_PFONeutralValidationPlots->setDetailLevel(100); - m_PFONeutralValidationPlots->initialize(); - hists = m_PFONeutralValidationPlots->retrieveBookedHistograms(); - } - - for (auto hist : hists) { - ATH_CHECK(regHist(hist.first,hist.second,all)); - } - - return StatusCode::SUCCESS; - -} - -StatusCode PhysValPFO::fillHistograms(){ - - const xAOD::Vertex* theVertex = nullptr; - - if (!m_useNeutralPFO){ - SG::ReadHandle<xAOD::VertexContainer> vertexContainerReadHandle(m_vertexContainerReadHandleKey); - if(!vertexContainerReadHandle.isValid()){ - ATH_MSG_WARNING("Invalid ReadHandle for xAOD::VertexContainer with key: " << vertexContainerReadHandle.key()); - } - else { - //Vertex finding logic based on logic in JetRecTools/PFlowPseudoJetGetter tool - //Usually the 0th vertex is the primary one, but this is not always the case. So we will choose the first vertex of type PriVtx - for (auto vertex : *vertexContainerReadHandle) { - if (xAOD::VxType::PriVtx == vertex->vertexType() ) { - theVertex = vertex; - break; - }//If we have a vertex of type primary vertex - }//iterate over the vertices and check their type - - if (nullptr == theVertex) ATH_MSG_WARNING("Did not find either a PriVtx or a NoVtx in this event"); - - }//if valid read handle - } - - SG::ReadHandle<xAOD::EventInfo> eventInfoReadHandle(m_eventInfoReadHandleKey); - if (!eventInfoReadHandle.isValid()){ - ATH_MSG_WARNING("Invalid ReadHandle for xAOD::EventInfo with key: " << eventInfoReadHandle.key()); - } - - SG::ReadHandle<xAOD::PFOContainer> PFOContainerReadHandle(m_PFOContainerHandleKey); - if(!PFOContainerReadHandle.isValid()){ - ATH_MSG_WARNING("Invalid ReadHandle for xAOD::PFOContainer with key: " << PFOContainerReadHandle.key()); - return StatusCode::SUCCESS; - } - for (auto thePFO : *PFOContainerReadHandle){ - if(thePFO){ - if (!m_useNeutralPFO) m_PFOChargedValidationPlots->fill(*thePFO,theVertex,*eventInfoReadHandle); - else if (m_useNeutralPFO) m_PFONeutralValidationPlots->fill(*thePFO,*eventInfoReadHandle); - } - else ATH_MSG_WARNING("Invalid pointer to xAOD::PFO"); - } - - return StatusCode::SUCCESS; - -} - -StatusCode PhysValPFO::procHistograms(){ - return StatusCode::SUCCESS; -} diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.h deleted file mode 100644 index 1a6fd18f28f..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PHYSVALPFO_H -#define PHYSVALPFO_H - -#include "PFOChargedValidationPlots.h" -#include "PFONeutralValidationPlots.h" -#include "AthenaMonitoring/ManagedMonitorToolBase.h" -#include <string> -#include "xAODTracking/VertexContainer.h" -#include "xAODPFlow/PFOContainer.h" -#include "StoreGate/ReadHandleKey.h" -#include "xAODEventInfo/EventInfo.h" - -class PhysValPFO : public ManagedMonitorToolBase { - -public: - - /** Standard Constructor */ - PhysValPFO (const std::string& type, const std::string& name, const IInterface* parent ); - - /** Standard Destructor */ - virtual ~PhysValPFO(); - - /** Standard AlgTool Functions */ - virtual StatusCode initialize(); - virtual StatusCode bookHistograms(); - virtual StatusCode fillHistograms(); - virtual StatusCode procHistograms(); - - private: - - /** ReadHandle to retrieve xAOD::VertexContainer */ - SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainerReadHandleKey{this,"primaryVerticesName","PrimaryVertices","ReadHandleKey for the PrimaryVertices container"}; - - /** ReadHandle to retrieve xAOD::PFOContainer */ - SG::ReadHandleKey<xAOD::PFOContainer> m_PFOContainerHandleKey{this,"PFOContainerName","JetETMissChargedParticleFlowObjects","ReadHandleKey for the PFO container"}; - - /** ReadHandleKey for EventInfo */ - SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoReadHandleKey{this,"EventInfoName","EventInfo","ReadHandleKey for EventInfo"}; - - /** Pointer to class that deals with histograms for charged PFO */ - std::unique_ptr<PFOChargedValidationPlots> m_PFOChargedValidationPlots; - - /** Pointer to class that deals with histograms for neutral PFO */ - std::unique_ptr<PFONeutralValidationPlots> m_PFONeutralValidationPlots; - - /** Select whether to use neutral or charged PFO */ - bool m_useNeutralPFO; - -}; -#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx index 31c21dd697f..3fa2714dcff 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx @@ -1,6 +1,4 @@ -#include "../PhysValPFO.h" #include "../PhysValCluster.h" #include "../PhysValFE.h" -DECLARE_COMPONENT( PhysValPFO ) DECLARE_COMPONENT( PhysValFE ) DECLARE_COMPONENT( PhysValCluster ) diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h index 38df52b2baa..44337712aff 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h @@ -16,25 +16,10 @@ namespace PFO { public: - PFOAlgPropertyPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); - - void fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo); - void fill(const xAOD::FlowElement& theFE, const xAOD::EventInfo& eventInfo); - private: - /** PFO histograms */ - TH1* m_PFO_isInDenseEnvironment; - TH1* m_PFO_tracksExpectedEnergyDeposit; - - /* Same histograms in three eta bins of |eta| < 1, 1 <= |eta| < 2 and |eta| >= 2 */ - TH1* m_PFO_isInDenseEnvironment_etaBinA; - TH1* m_PFO_tracksExpectedEnergyDeposit_etaBinA; - - TH1* m_PFO_isInDenseEnvironment_etaBinB; - TH1* m_PFO_tracksExpectedEnergyDeposit_etaBinB; - - TH1* m_PFO_isInDenseEnvironment_etaBinC; - TH1* m_PFO_tracksExpectedEnergyDeposit_etaBinC; + PFOAlgPropertyPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName); + void fill(const xAOD::FlowElement& theFE, const xAOD::EventInfo& eventInfo); + private: /** Flow Element Histograms */ TH1* m_FE_isInDenseEnvironment; TH1* m_FE_tracksExpectedEnergyDeposit; @@ -50,8 +35,7 @@ namespace PFO { TH1* m_FE_tracksExpectedEnergyDeposit_etaBinC; - void initializePlots(); - std::string m_sPFOContainerName; + void initializePlots(); std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h index 7d00b67c43f..f63b01d6947 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h @@ -6,7 +6,6 @@ #define PFOATTRIBUTEPLOTS_H #include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/PFO.h" #include "xAODPFlow/FlowElement.h" #include "xAODEventInfo/EventInfo.h" @@ -16,24 +15,16 @@ namespace PFO { public: - PFOAttributePlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); - - void fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo); + PFOAttributePlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName); + void fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo); - private: - - TH1* m_PFO_LAYER_ENERGY_EM3; - TH1* m_PFO_LAYER_ENERGY_HEC0; - TH1* m_PFO_LAYER_ENERGY_HEC; - TH1* m_PFO_LAYER_ENERGY_Tile0; - TH1* m_PFO_TIMING; + private: - // only attribute available to the FE is the timing TH1* m_FE_TIMING; + TH1* m_FE_LAYER_ENERGY_Tile0; - void initializePlots(); - std::string m_sPFOContainerName; + void initializePlots(); std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h index b15210d06dd..71c4dfa134c 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h @@ -6,7 +6,6 @@ #define PFOCLUSTERMOMENTPLOTS_H #include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/PFO.h" #include "xAODPFlow/FlowElement.h" #include "xAODEventInfo/EventInfo.h" @@ -16,76 +15,11 @@ namespace PFO { public: - PFOClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); - - void fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo); + PFOClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName); + void fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo); private: - - /** Histograms inclusive in eta */ - TH1* m_PFO_SECOND_R; - TH1* m_PFO_CENTER_LAMBDA; - TH1* m_PFO_ISOLATION; - TH1* m_PFO_ENG_BAD_CELLS; - TH1* m_PFO_N_BAD_CELLS; - TH1* m_PFO_BADLARQ_FRAC; - TH1* m_PFO_ENG_POS; - TH1* m_PFO_AVG_LAR_Q; - TH1* m_PFO_AVG_TILE_Q; - TH1* m_PFO_EM_PROBABILITY; - TH1* m_PFO_SECOND_LAMBDA; - - /** Same histograms binned in eta regions */ - TH1* m_PFO_SECOND_R_etaBinA; - TH1* m_PFO_CENTER_LAMBDA_etaBinA; - TH1* m_PFO_ISOLATION_etaBinA; - TH1* m_PFO_ENG_BAD_CELLS_etaBinA; - TH1* m_PFO_N_BAD_CELLS_etaBinA; - TH1* m_PFO_BADLARQ_FRAC_etaBinA; - TH1* m_PFO_ENG_POS_etaBinA; - TH1* m_PFO_AVG_LAR_Q_etaBinA; - TH1* m_PFO_AVG_TILE_Q_etaBinA; - TH1* m_PFO_EM_PROBABILITY_etaBinA; - TH1* m_PFO_SECOND_LAMBDA_etaBinA; - - TH1* m_PFO_SECOND_R_etaBinB; - TH1* m_PFO_CENTER_LAMBDA_etaBinB; - TH1* m_PFO_ISOLATION_etaBinB; - TH1* m_PFO_ENG_BAD_CELLS_etaBinB; - TH1* m_PFO_N_BAD_CELLS_etaBinB; - TH1* m_PFO_BADLARQ_FRAC_etaBinB; - TH1* m_PFO_ENG_POS_etaBinB; - TH1* m_PFO_AVG_LAR_Q_etaBinB; - TH1* m_PFO_AVG_TILE_Q_etaBinB; - TH1* m_PFO_EM_PROBABILITY_etaBinB; - TH1* m_PFO_SECOND_LAMBDA_etaBinB; - - TH1* m_PFO_SECOND_R_etaBinC; - TH1* m_PFO_CENTER_LAMBDA_etaBinC; - TH1* m_PFO_ISOLATION_etaBinC; - TH1* m_PFO_ENG_BAD_CELLS_etaBinC; - TH1* m_PFO_N_BAD_CELLS_etaBinC; - TH1* m_PFO_BADLARQ_FRAC_etaBinC; - TH1* m_PFO_ENG_POS_etaBinC; - TH1* m_PFO_AVG_LAR_Q_etaBinC; - TH1* m_PFO_AVG_TILE_Q_etaBinC; - TH1* m_PFO_EM_PROBABILITY_etaBinC; - TH1* m_PFO_SECOND_LAMBDA_etaBinC; - - TH1* m_PFO_SECOND_R_etaBinD; - TH1* m_PFO_CENTER_LAMBDA_etaBinD; - TH1* m_PFO_ISOLATION_etaBinD; - TH1* m_PFO_ENG_BAD_CELLS_etaBinD; - TH1* m_PFO_N_BAD_CELLS_etaBinD; - TH1* m_PFO_BADLARQ_FRAC_etaBinD; - TH1* m_PFO_ENG_POS_etaBinD; - TH1* m_PFO_AVG_LAR_Q_etaBinD; - TH1* m_PFO_AVG_TILE_Q_etaBinD; - TH1* m_PFO_EM_PROBABILITY_etaBinD; - TH1* m_PFO_SECOND_LAMBDA_etaBinD; - - - // FLOW ELEMENT PLOTS + /** Histograms inclusive in eta */ TH1* m_FE_SECOND_R; TH1* m_FE_CENTER_LAMBDA; @@ -149,8 +83,7 @@ namespace PFO { TH1* m_FE_SECOND_LAMBDA_etaBinD; - void initializePlots(); - std::string m_sPFOContainerName; + void initializePlots(); std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h deleted file mode 100644 index 911e3c9004b..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef PFOEMPLOTS_H -#define PFOEMPLOTS_H - -#include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/PFO.h" -#include "xAODPFlow/FlowElement.h" -#include "xAODEventInfo/EventInfo.h" - -namespace PFO { - - class PFOEMPlots : public PlotBase { - - public: - - PFOEMPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); - - void fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo); - - private: - TH1* m_PFO_ptEM; - TH1* m_PFO_etaEM; - TH1* m_PFO_phiEM; - TH1* m_PFO_mEM; - - TH1* m_FE_ptEM; - TH1* m_FE_etaEM; - TH1* m_FE_phiEM; - TH1* m_FE_mEM; - - void initializePlots(); - std::string m_sPFOContainerName; - std::string m_sFEContainerName; - }; - -} -#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h index 2eaede24522..5d70b187ba6 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h @@ -6,7 +6,6 @@ #define PFOPVMATCHEDPLOTS_H #include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/PFO.h" #include "xAODPFlow/FlowElement.h" #include "xAODTracking/Vertex.h" #include "xAODEventInfo/EventInfo.h" @@ -17,23 +16,11 @@ namespace PFO { public: - PFOPVMatchedPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); + PFOPVMatchedPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName); - void fill(const xAOD::PFO& PFO, const xAOD::Vertex& theVertex, const xAOD::EventInfo& eventInfo); void fill(const xAOD::FlowElement& FE, const xAOD::Vertex& theVertex, const xAOD::EventInfo& eventInfo); private: - TH1* m_PFO_pt; - TH1* m_PFO_eta; - TH1* m_PFO_phi; - TH1* m_PFO_m; - TH1* m_PFO_charge; - - /** Pt Histogram binned in eta */ - TH1* m_PFO_pt_etaBinA; - TH1* m_PFO_pt_etaBinB; - TH1* m_PFO_pt_etaBinC; - TH1* m_FE_pt; TH1* m_FE_eta; TH1* m_FE_phi; @@ -46,7 +33,6 @@ namespace PFO { TH1* m_FE_pt_etaBinC; void initializePlots(); - std::string m_sPFOContainerName; std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h index 71a38ec1931..8f52f0c981e 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h @@ -16,27 +16,10 @@ namespace PFO { public: - PFOPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); + PFOPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName); - void fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo); void fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo); private: - TH1* m_PFO_pt; - TH1* m_PFO_eta; - TH1* m_PFO_phi; - TH1* m_PFO_m; - TH1* m_PFO_charge; - - /** Pt Hisrogram binned in pt */ - TH1* m_PFO_pt_low; - TH1* m_PFO_pt_middle; - TH1* m_PFO_pt_high; - - /** Pt Histogram binned in eta */ - TH1* m_PFO_pt_etaBinA; - TH1* m_PFO_pt_etaBinB; - TH1* m_PFO_pt_etaBinC; - // Flow Element histograms TH1* m_FE_pt; TH1* m_FE_eta; @@ -56,8 +39,7 @@ namespace PFO { TH1* m_FE_pt_etaBinB; TH1* m_FE_pt_etaBinC; - void initializePlots(); - std::string m_sPFOContainerName; + void initializePlots(); std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFO_FE_Comparison_PlotMaker.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFO_FE_Comparison_PlotMaker.h deleted file mode 100644 index 541550983f5..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFO_FE_Comparison_PlotMaker.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ -// Author: M. T. Anthony -#ifndef PFO_FE_COMPARISON_PLOTMAKER_H -#define PFO_FE_COMPARISON_PLOTMAKER_H - -#include "TrkValHistUtils/PlotBase.h" -#include "xAODPFlow/FlowElementContainer.h" -#include "xAODPFlow/PFOContainer.h" -#include "xAODPFlow/PFO.h" -#include "xAODPFlow/FlowElement.h" -// Local include(s) for msg: -#include "AsgMessaging/AsgMessaging.h" - -namespace PFO { - class PFO_FE_Comparison_PlotMaker: public PlotBase, public asg::AsgMessaging { - public: - PFO_FE_Comparison_PlotMaker(PlotBase* pParent,std::string sDir, std::string sPFOContainerName, std::string sFEContainerName, bool m_isNeutral=false); // constructor - void Fill(const xAOD::PFO* pfo, const xAOD::FlowElement* fe); - - private: - TH1* m_PFO_FE_ptratio; - TH1* m_PFO_FE_delta_pt; - TH1* m_PFO_FE_delta_R; - TH1* m_PFO_FE_delta_eta; - TH1* m_PFO_FE_delta_phi; - TH1* m_PFO_FE_dE; - - //cluster/neutral flow element observables - TH1* m_PFO_FE_SECOND_R_RelComparison; - TH1* m_PFO_FE_CENTER_LAMBDA_RelComparison; - TH1* m_PFO_FE_ISOLATION_RelComparison; - TH1* m_PFO_FE_ENG_BAD_CELLS_RelComparison; - TH1* m_PFO_FE_N_BAD_CELLS_RelComparison; - TH1* m_PFO_FE_BADLARQ_FRAC_RelComparison; - TH1* m_PFO_FE_ENG_POS_RelComparison; - TH1* m_PFO_FE_AVG_LAR_Q_RelComparison; - TH1* m_PFO_FE_AVG_TILE_Q_RelComparison; - TH1* m_PFO_FE_EM_PROBABILITY_RelComparison; - TH1* m_PFO_FE_SECOND_LAMBDA_RelComparison; - - TH1* m_PFO_FE_TIMING_RelComparison; - - TH1* m_PFO_FE_isInDenseEnvironment_RelComparison; - TH1* m_PFO_FE_tracksExpectedEnergyDeposit; - - - void initializePlots(); - - std::string m_sPFOContainerName; - std::string m_sFEContainerName; - bool m_isNeutral; // toggle for Neutral Flow Element/ Charged Flow Element plots - };// end of classdef -} //end of namespace - - -#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx index abb3a27f4e4..910b23fc35c 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx @@ -6,28 +6,21 @@ namespace PFO { - PFOAlgPropertyPlots::PFOAlgPropertyPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName),m_sFEContainerName(sFEContainerName){ - m_PFO_isInDenseEnvironment = nullptr; - m_PFO_tracksExpectedEnergyDeposit = nullptr; + PFOAlgPropertyPlots::PFOAlgPropertyPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sFEContainerName(sFEContainerName){ m_FE_isInDenseEnvironment = nullptr; m_FE_tracksExpectedEnergyDeposit = nullptr; - } - void PFOAlgPropertyPlots::initializePlots(){ - // Book PFO histograms - if(!m_sPFOContainerName.empty()){ - m_PFO_isInDenseEnvironment = Book1D("_isInDenseEnvironment",m_sPFOContainerName+"_isInDenseEnvironment",3,-1,2); - m_PFO_tracksExpectedEnergyDeposit = Book1D("_tracksExpectedEnergyDeposit",m_sPFOContainerName+"_tracksExpectedEnergyDeposit",11,-1,10); - - m_PFO_isInDenseEnvironment_etaBinA = Book1D("_isInDenseEnvironment_binA",m_sPFOContainerName+"_isInDenseEnvironment (|eta| < 1)",3,-1,2); - m_PFO_tracksExpectedEnergyDeposit_etaBinA = Book1D("_tracksExpectedEnergyDeposit_binA)",m_sPFOContainerName+"_tracksExpectedEnergyDeposit (|eta| < 1)",11,-1,10); + m_FE_isInDenseEnvironment_etaBinA = nullptr; + m_FE_tracksExpectedEnergyDeposit_etaBinA = nullptr; - m_PFO_isInDenseEnvironment_etaBinB = Book1D("_isInDenseEnvironment_binB",m_sPFOContainerName+"_isInDenseEnvironment (1 <= |eta| < 2)",3,-1,2); - m_PFO_tracksExpectedEnergyDeposit_etaBinB = Book1D("_tracksExpectedEnergyDeposit_binB",m_sPFOContainerName+"_tracksExpectedEnergyDeposit (1 <= |eta| < 2)",11,-1,10); + m_FE_isInDenseEnvironment_etaBinB = nullptr; + m_FE_tracksExpectedEnergyDeposit_etaBinB = nullptr; - m_PFO_isInDenseEnvironment_etaBinC = Book1D("_isInDenseEnvironment_binC",m_sPFOContainerName+"_isInDenseEnvironment (|eta| >= 2)",3,-1,2); - m_PFO_tracksExpectedEnergyDeposit_etaBinC = Book1D("_tracksExpectedEnergyDeposit_binC",m_sPFOContainerName+"_tracksExpectedEnergyDeposit (|eta| >= 2)",11,-1,10); - } + m_FE_isInDenseEnvironment_etaBinC = nullptr; + m_FE_tracksExpectedEnergyDeposit_etaBinC = nullptr; + } + + void PFOAlgPropertyPlots::initializePlots(){ // book FlowElement histograms if(!m_sFEContainerName.empty()){ m_FE_isInDenseEnvironment = Book1D("_isInDenseEnvironment",m_sFEContainerName+"_isInDenseEnvironment",3,-1,2); @@ -44,42 +37,6 @@ namespace PFO { } } - void PFOAlgPropertyPlots::fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo){ - - xAOD::PFODetails::PFOAttributes myAttribute_isInDenseEnvironment = xAOD::PFODetails::PFOAttributes::eflowRec_isInDenseEnvironment; - int isInDenseEnvironment = false; - bool gotAttribute = PFO.attribute(myAttribute_isInDenseEnvironment,isInDenseEnvironment); - if (true == gotAttribute) { - m_PFO_isInDenseEnvironment->Fill(isInDenseEnvironment,eventInfo.beamSpotWeight()); - if (fabs(PFO.eta()) < 1) m_PFO_isInDenseEnvironment_etaBinA->Fill(isInDenseEnvironment,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_isInDenseEnvironment_etaBinB->Fill(isInDenseEnvironment,eventInfo.beamSpotWeight()); - else m_PFO_isInDenseEnvironment_etaBinC->Fill(isInDenseEnvironment,eventInfo.beamSpotWeight()); - } - - else { - m_PFO_isInDenseEnvironment->Fill(-1.0,eventInfo.beamSpotWeight()); - if (fabs(PFO.eta()) < 1) m_PFO_isInDenseEnvironment_etaBinA->Fill(-1.0,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_isInDenseEnvironment_etaBinB->Fill(-1.0,eventInfo.beamSpotWeight()); - else m_PFO_isInDenseEnvironment_etaBinC->Fill(-1.0,eventInfo.beamSpotWeight()); - } - - float expectedEnergy = 0.0; - xAOD::PFODetails::PFOAttributes myAttribute_tracksExpectedEnergyDeposit = xAOD::PFODetails::PFOAttributes::eflowRec_tracksExpectedEnergyDeposit; - gotAttribute = PFO.attribute(myAttribute_tracksExpectedEnergyDeposit,expectedEnergy); - if (true == gotAttribute) { - m_PFO_tracksExpectedEnergyDeposit->Fill(expectedEnergy/1000.0,eventInfo.beamSpotWeight()); - if (fabs(PFO.eta()) < 1) m_PFO_tracksExpectedEnergyDeposit_etaBinA->Fill(expectedEnergy/1000.0,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_tracksExpectedEnergyDeposit_etaBinB->Fill(expectedEnergy/1000.0,eventInfo.beamSpotWeight()); - else m_PFO_tracksExpectedEnergyDeposit_etaBinC->Fill(expectedEnergy/1000.0,eventInfo.beamSpotWeight()); - } - else{ - m_PFO_tracksExpectedEnergyDeposit->Fill(-1.0,eventInfo.beamSpotWeight()); - if (fabs(PFO.eta()) < 1) m_PFO_tracksExpectedEnergyDeposit_etaBinA->Fill(-1.0,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_tracksExpectedEnergyDeposit_etaBinB->Fill(-1.0,eventInfo.beamSpotWeight()); - else m_PFO_tracksExpectedEnergyDeposit_etaBinC->Fill(-1.0,eventInfo.beamSpotWeight()); - } - } - void PFOAlgPropertyPlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){ static SG::AuxElement::ConstAccessor<int> acc_IsInDenseEnvironment("IsInDenseEnvironment"); diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx index 312e0ea7197..d86e8739d5c 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx @@ -6,61 +6,23 @@ #include <iostream> namespace PFO { - PFOAttributePlots::PFOAttributePlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName,std::string sFEContainerName) : PlotBase(pParent, sDir), - m_sPFOContainerName(sPFOContainerName), - m_sFEContainerName(sFEContainerName) { - m_PFO_LAYER_ENERGY_EM3 = nullptr; - m_PFO_LAYER_ENERGY_HEC0 = nullptr; - m_PFO_LAYER_ENERGY_HEC = nullptr; - m_PFO_LAYER_ENERGY_Tile0 = nullptr; - m_PFO_TIMING = nullptr; + PFOAttributePlots::PFOAttributePlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), + m_sFEContainerName(sFEContainerName) { + m_FE_LAYER_ENERGY_Tile0 = nullptr; m_FE_TIMING = nullptr; } - void PFOAttributePlots::initializePlots(){ - if(!m_sPFOContainerName.empty()){ - m_PFO_LAYER_ENERGY_EM3 = Book1D("_LAYER_ENEGRY_EM3",m_sPFOContainerName+"_LAYER_ENERGY_EM3",201,-1,100); - m_PFO_LAYER_ENERGY_HEC0 = Book1D("_LAYER_ENEGRY_HEC0",m_sPFOContainerName+"_LAYER_ENERGY_HEC0",60,-1,5); - m_PFO_LAYER_ENERGY_HEC = Book1D("_LAYER_ENEGRY_HEC",m_sPFOContainerName+"_LAYER_ENERGY_HEC",60,-1,5); - m_PFO_LAYER_ENERGY_Tile0 = Book1D("_LAYER_ENEGRY_Tile0",m_sPFOContainerName+"_LAYER_ENERGY_Tile0",60,-1,5); - m_PFO_TIMING = Book1D("_TIMING",m_sPFOContainerName+"_TIMING",10,-50,50); - } + void PFOAttributePlots::initializePlots(){ if(!m_sFEContainerName.empty()){ + m_FE_LAYER_ENERGY_Tile0 = Book1D("_LAYER_ENEGRY_HEC",m_sFEContainerName+"_LAYER_ENERGY_HEC",60,-1,5); m_FE_TIMING = Book1D("_TIMING",m_sFEContainerName+"_TIMING",10,-50,50); } } - void PFOAttributePlots::fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo){ - - float layerEnergyEM3 = 0.0; - bool gotAttribute = PFO.attribute<float>(xAOD::PFODetails::eflowRec_LAYERENERGY_EM3,layerEnergyEM3); - if (true == gotAttribute) m_PFO_LAYER_ENERGY_EM3->Fill(layerEnergyEM3,eventInfo.beamSpotWeight()); - else m_PFO_LAYER_ENERGY_EM3->Fill(-1.0); - - float layerEnergyHEC0 = 0.0; - gotAttribute = PFO.attribute<float>(xAOD::PFODetails::eflowRec_LAYERENERGY_HEC0,layerEnergyHEC0); - if (true == gotAttribute) m_PFO_LAYER_ENERGY_HEC0->Fill(layerEnergyHEC0,eventInfo.beamSpotWeight()); - else m_PFO_LAYER_ENERGY_HEC0->Fill(-1.0); - - float layerEnergyHEC = 0.0; - gotAttribute = PFO.attribute<float>(xAOD::PFODetails::eflowRec_LAYERENERGY_HEC,layerEnergyHEC); - if (true == gotAttribute) m_PFO_LAYER_ENERGY_HEC->Fill(layerEnergyHEC,eventInfo.beamSpotWeight()); - else m_PFO_LAYER_ENERGY_HEC->Fill(-1.0); - - float layerEnergyTile0 = 0.0; - gotAttribute = PFO.attribute<float>(xAOD::PFODetails::eflowRec_LAYERENERGY_Tile0,layerEnergyTile0); - if (true == gotAttribute) m_PFO_LAYER_ENERGY_Tile0->Fill(layerEnergyTile0,eventInfo.beamSpotWeight()); - else m_PFO_LAYER_ENERGY_Tile0->Fill(-1.0); - - float timing = 0.0; - gotAttribute = PFO.attribute<float>(xAOD::PFODetails::eflowRec_TIMING,timing); - if (true == gotAttribute) m_PFO_TIMING->Fill(timing,eventInfo.beamSpotWeight()); - else m_PFO_TIMING->Fill(-50); - - } + void PFOAttributePlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){ float timing=-50; - static SG::AuxElement::ConstAccessor<float>acc_FE_Timing("PF_TIMING"); + static SG::AuxElement::ConstAccessor<float>acc_FE_Timing("TIMING"); if(acc_FE_Timing.isAvailable(FE)){ timing=acc_FE_Timing(FE); m_FE_TIMING->Fill(timing,eventInfo.beamSpotWeight()); @@ -68,5 +30,16 @@ namespace PFO { else{ m_FE_TIMING->Fill(timing,eventInfo.beamSpotWeight()); } + + float E_tile0 = -50; + static SG::AuxElement::ConstAccessor<float>acc_FE_LAYER_ENERGY_Tile0("LAYERENERGY_TILE0"); + if(acc_FE_LAYER_ENERGY_Tile0.isAvailable(FE)){ + E_tile0 =acc_FE_LAYER_ENERGY_Tile0(FE); + m_FE_LAYER_ENERGY_Tile0->Fill(E_tile0 ,eventInfo.beamSpotWeight()); + } + else{ + m_FE_LAYER_ENERGY_Tile0->Fill(E_tile0 ,eventInfo.beamSpotWeight()); + } + } // end of FE fill function } // end of PFO namespace diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx index ec9e066c1c8..e259fe8a63d 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx @@ -6,69 +6,8 @@ namespace PFO { - PFOClusterMomentPlots::PFOClusterMomentPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName){ - m_PFO_SECOND_R = nullptr; - m_PFO_CENTER_LAMBDA = nullptr; - m_PFO_ISOLATION = nullptr; - m_PFO_ENG_BAD_CELLS = nullptr; - m_PFO_N_BAD_CELLS = nullptr; - m_PFO_BADLARQ_FRAC = nullptr; - m_PFO_ENG_POS = nullptr; - m_PFO_AVG_LAR_Q = nullptr; - m_PFO_AVG_TILE_Q = nullptr; - m_PFO_EM_PROBABILITY = nullptr; - m_PFO_SECOND_LAMBDA = nullptr; - - m_PFO_SECOND_R_etaBinA = nullptr; - m_PFO_CENTER_LAMBDA_etaBinA = nullptr; - m_PFO_ISOLATION_etaBinA = nullptr; - m_PFO_ENG_BAD_CELLS_etaBinA = nullptr; - m_PFO_N_BAD_CELLS_etaBinA = nullptr; - m_PFO_BADLARQ_FRAC_etaBinA = nullptr; - m_PFO_ENG_POS_etaBinA = nullptr; - m_PFO_AVG_LAR_Q_etaBinA = nullptr; - m_PFO_AVG_TILE_Q_etaBinA = nullptr; - m_PFO_EM_PROBABILITY_etaBinA = nullptr; - m_PFO_SECOND_LAMBDA_etaBinA = nullptr; - - m_PFO_SECOND_R_etaBinB = nullptr; - m_PFO_CENTER_LAMBDA_etaBinB = nullptr; - m_PFO_ISOLATION_etaBinB = nullptr; - m_PFO_ENG_BAD_CELLS_etaBinB = nullptr; - m_PFO_N_BAD_CELLS_etaBinB = nullptr; - m_PFO_BADLARQ_FRAC_etaBinB = nullptr; - m_PFO_ENG_POS_etaBinB = nullptr; - m_PFO_AVG_LAR_Q_etaBinB = nullptr; - m_PFO_AVG_TILE_Q_etaBinB = nullptr; - m_PFO_EM_PROBABILITY_etaBinB = nullptr; - m_PFO_SECOND_LAMBDA_etaBinB = nullptr; - - m_PFO_SECOND_R_etaBinC = nullptr; - m_PFO_CENTER_LAMBDA_etaBinC = nullptr; - m_PFO_ISOLATION_etaBinC = nullptr; - m_PFO_ENG_BAD_CELLS_etaBinC = nullptr; - m_PFO_N_BAD_CELLS_etaBinC = nullptr; - m_PFO_BADLARQ_FRAC_etaBinC = nullptr; - m_PFO_ENG_POS_etaBinC = nullptr; - m_PFO_AVG_LAR_Q_etaBinC = nullptr; - m_PFO_AVG_TILE_Q_etaBinC = nullptr; - m_PFO_EM_PROBABILITY_etaBinC = nullptr; - m_PFO_SECOND_LAMBDA_etaBinC = nullptr; - - m_PFO_SECOND_R_etaBinD = nullptr; - m_PFO_CENTER_LAMBDA_etaBinD = nullptr; - m_PFO_ISOLATION_etaBinD = nullptr; - m_PFO_ENG_BAD_CELLS_etaBinD = nullptr; - m_PFO_N_BAD_CELLS_etaBinD = nullptr; - m_PFO_BADLARQ_FRAC_etaBinD = nullptr; - m_PFO_ENG_POS_etaBinD = nullptr; - m_PFO_AVG_LAR_Q_etaBinD = nullptr; - m_PFO_AVG_TILE_Q_etaBinD = nullptr; - m_PFO_EM_PROBABILITY_etaBinD = nullptr; - m_PFO_SECOND_LAMBDA_etaBinD = nullptr; - - - + PFOClusterMomentPlots::PFOClusterMomentPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sFEContainerName(sFEContainerName){ + m_FE_SECOND_R = nullptr; m_FE_CENTER_LAMBDA = nullptr; m_FE_ISOLATION = nullptr; @@ -131,68 +70,7 @@ namespace PFO { } void PFOClusterMomentPlots::initializePlots(){ - if(!m_sPFOContainerName.empty()){ - m_PFO_SECOND_R = Book1D("_SECOND_R",m_sPFOContainerName + "_SECOND_R",60,-1.0,50.0); - m_PFO_CENTER_LAMBDA = Book1D("_CENTER_LAMBDA",m_sPFOContainerName + "_CENTER_LAMBDA",60,-50.0,3000.0); - m_PFO_ISOLATION = Book1D("_ISOLATION",m_sPFOContainerName + "_ISOLATION",60,-1.0,2.0); - m_PFO_ENG_BAD_CELLS = Book1D("_ENG_BAD_CELLS",m_sPFOContainerName + "_ENG_BAD_CELLS",60,-1.0,5); - m_PFO_N_BAD_CELLS = Book1D("_N_BAD_CELLS",m_sPFOContainerName + "_N_BAD_CELLS",30,-1.0,2.0); - m_PFO_BADLARQ_FRAC = Book1D("_BADLARQ_FRAC",m_sPFOContainerName + "_BADLARQ_FRAC",25,-1.0,1.5); - m_PFO_ENG_POS = Book1D("_ENG_POS",m_sPFOContainerName + "_ENG_POS",60,-100.0,10000.0); - m_PFO_AVG_LAR_Q = Book1D("_AVG_LAR_Q",m_sPFOContainerName + "_AVG_LAR_Q",31,-1000.0,30000.0); - m_PFO_AVG_TILE_Q = Book1D("_AVG_TILE_Q",m_sPFOContainerName + "_AVG_TILE_Q",21,-10.0,200.0); - m_PFO_EM_PROBABILITY = Book1D("_EM_PROBABILITY",m_sPFOContainerName + "_EM_PROBABILITY",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA = Book1D("_SECOND_LAMBDA",m_sPFOContainerName + "_SECOND_LAMBDA",60,-1.0,3000.0); - - m_PFO_SECOND_R_etaBinA = Book1D("_SECOND_R_A",m_sPFOContainerName + "_SECOND_R (|eta| < 1.5)",60,-1.0,50.0); - m_PFO_CENTER_LAMBDA_etaBinA = Book1D("_CENTER_LAMBDA_A",m_sPFOContainerName + "_CENTER_LAMBDA (|eta| < 1.5)",60,-50.0,3000.0); - m_PFO_ISOLATION_etaBinA = Book1D("_ISOLATION_A",m_sPFOContainerName + "_ISOLATION (|eta| < 1.5)",60,-1.0,2.0); - m_PFO_ENG_BAD_CELLS_etaBinA = Book1D("_ENG_BAD_CELLS_A",m_sPFOContainerName + "_ENG_BAD_CELLS (|eta| < 1.5)",60,-1.0,5); - m_PFO_N_BAD_CELLS_etaBinA = Book1D("_N_BAD_CELLS_A",m_sPFOContainerName + "_N_BAD_CELLS (|eta| < 1.5)",30,-1.0,2.0); - m_PFO_BADLARQ_FRAC_etaBinA = Book1D("_BADLARQ_FRAC_A",m_sPFOContainerName + "_BADLARQ_FRAC (|eta| < 1.5)",25,-1.0,1.5); - m_PFO_ENG_POS_etaBinA = Book1D("_ENG_POS_A",m_sPFOContainerName + "_ENG_POS (|eta| < 1.5)",60,-100.0,10000.0); - m_PFO_AVG_LAR_Q_etaBinA = Book1D("_AVG_LAR_Q_A",m_sPFOContainerName + "_AVG_LAR_Q (|eta| < 1.5)",31,-1000.0,30000.0); - m_PFO_AVG_TILE_Q_etaBinA = Book1D("_AVG_TILE_Q_A",m_sPFOContainerName + "_AVG_TILE_Q (|eta| < 1.5)",21,-10.0,200.0); - m_PFO_EM_PROBABILITY_etaBinA = Book1D("_EM_PROBABILITY_A",m_sPFOContainerName + "_EM_PROBABILITY (|eta| < 1.5)",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA_etaBinA = Book1D("_SECOND_LAMBDA_A",m_sPFOContainerName + "_SECOND_LAMBDA (|eta| < 1.5)",60,-1.0,3000.0); - - m_PFO_SECOND_R_etaBinB = Book1D("_SECOND_R_B",m_sPFOContainerName + "_SECOND_R (1.5 <= |eta| < 2.5)",60,-1.0,50.0); - m_PFO_CENTER_LAMBDA_etaBinB = Book1D("_CENTER_LAMBDA_B",m_sPFOContainerName + "_CENTER_LAMBDA (1.5 <= |eta| < 2.5)",60,-50.0,3000.0); - m_PFO_ISOLATION_etaBinB = Book1D("_ISOLATION_B",m_sPFOContainerName + "_ISOLATION (1.5 <= |eta| < 2.5)",60,-1.0,2.0); - m_PFO_ENG_BAD_CELLS_etaBinB = Book1D("_ENG_BAD_CELLS_B",m_sPFOContainerName + "_ENG_BAD_CELLS (1.5 <= |eta| < 2.5)",60,-1.0,5); - m_PFO_N_BAD_CELLS_etaBinB = Book1D("_N_BAD_CELLS_B",m_sPFOContainerName + "_N_BAD_CELLS (1.5 <= |eta| < 2.5)",30,-1.0,2.0); - m_PFO_BADLARQ_FRAC_etaBinB = Book1D("_BADLARQ_FRAC_B",m_sPFOContainerName + "_BADLARQ_FRAC (1.5 <= |eta| < 2.5)",25,-1.0,1.5); - m_PFO_ENG_POS_etaBinB = Book1D("_ENG_POS_B",m_sPFOContainerName + "_ENG_POS (1.5 <= |eta| < 2.5)",60,-100.0,10000.0); - m_PFO_AVG_LAR_Q_etaBinB = Book1D("_AVG_LAR_Q_B",m_sPFOContainerName + "_AVG_LAR_Q (1.5 <= |eta| < 2.5)",31,-1000.0,30000.0); - m_PFO_AVG_TILE_Q_etaBinB = Book1D("_AVG_TILE_Q_B",m_sPFOContainerName + "_AVG_TILE_Q (1.5 <= |eta| < 2.5)",21,-10.0,200.0); - m_PFO_EM_PROBABILITY_etaBinB = Book1D("_EM_PROBABILITY_B",m_sPFOContainerName + "_EM_PROBABILITY (1.5 <= |eta| < 2.5)",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA_etaBinB = Book1D("_SECOND_LAMBDA_B",m_sPFOContainerName + "_SECOND_LAMBDA (1.5 <= |eta| < 2.5)",60,-1.0,3000.0); - - m_PFO_SECOND_R_etaBinC = Book1D("_SECOND_R_C",m_sPFOContainerName + "_SECOND_R (2.5 <= |eta| < 3.2)",60,-1.0,50.0); - m_PFO_CENTER_LAMBDA_etaBinC = Book1D("_CENTER_LAMBDA_C",m_sPFOContainerName + "_CENTER_LAMBDA (2.5 <= |eta| < 3.2)",60,-50.0,3000.0); - m_PFO_ISOLATION_etaBinC = Book1D("_ISOLATION_C",m_sPFOContainerName + "_ISOLATION (2.5 <= |eta| < 3.2)",60,-1.0,2.0); - m_PFO_ENG_BAD_CELLS_etaBinC = Book1D("_ENG_BAD_CELLS_C",m_sPFOContainerName + "_ENG_BAD_CELLS (2.5 <= |eta| < 3.2)",60,-1.0,5); - m_PFO_N_BAD_CELLS_etaBinC = Book1D("_N_BAD_CELLS_C",m_sPFOContainerName + "_N_BAD_CELLS (2.5 <= |eta| < 3.2)",30,-1.0,2.0); - m_PFO_BADLARQ_FRAC_etaBinC = Book1D("_BADLARQ_FRAC_C",m_sPFOContainerName + "_BADLARQ_FRAC (2.5 <= |eta| < 3.2)",25,-1.0,1.5); - m_PFO_ENG_POS_etaBinC = Book1D("_ENG_POS_C",m_sPFOContainerName + "_ENG_POS (2.5 <= |eta| < 3.2)",60,-100.0,10000.0); - m_PFO_AVG_LAR_Q_etaBinC = Book1D("_AVG_LAR_Q_C",m_sPFOContainerName + "_AVG_LAR_Q (2.5 <= |eta| < 3.2)",31,-1000.0,30000.0); - m_PFO_AVG_TILE_Q_etaBinC = Book1D("_AVG_TILE_Q_C",m_sPFOContainerName + "_AVG_TILE_Q (2.5 <= |eta| < 3.2)",21,-10.0,200.0); - m_PFO_EM_PROBABILITY_etaBinC = Book1D("_EM_PROBABILITY_C",m_sPFOContainerName + "_EM_PROBABILITY (2.5 <= |eta| < 3.2)",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA_etaBinC = Book1D("_SECOND_LAMBDA_C",m_sPFOContainerName + "_SECOND_LAMBDA (2.5 <= |eta| < 3.2)",60,-1.0,3000.0); - - m_PFO_SECOND_R_etaBinD = Book1D("_SECOND_R_D",m_sPFOContainerName + "_SECOND_R (|eta| >= 3.2)",60,-1.0,50.0); - m_PFO_CENTER_LAMBDA_etaBinD = Book1D("_CENTER_LAMBDA_D",m_sPFOContainerName + "_CENTER_LAMBDA (|eta| >= 3.2)",60,-50.0,3000.0); - m_PFO_ISOLATION_etaBinD = Book1D("_ISOLATION_D",m_sPFOContainerName + "_ISOLATION (|eta| >= 3.2)",60,-1.0,2.0); - m_PFO_ENG_BAD_CELLS_etaBinD = Book1D("_ENG_BAD_CELLS_D",m_sPFOContainerName + "_ENG_BAD_CELLS (|eta| >= 3.2)",60,-1.0,5); - m_PFO_N_BAD_CELLS_etaBinD = Book1D("_N_BAD_CELLS_D",m_sPFOContainerName + "_N_BAD_CELLS (|eta| >= 3.2)",30,-1.0,2.0); - m_PFO_BADLARQ_FRAC_etaBinD = Book1D("_BADLARQ_FRAC_D",m_sPFOContainerName + "_BADLARQ_FRAC (|eta| >= 3.2)",25,-1.0,1.5); - m_PFO_ENG_POS_etaBinD = Book1D("_ENG_POS_D",m_sPFOContainerName + "_ENG_POS (|eta| >= 3.2)",60,-100.0,10000.0); - m_PFO_AVG_LAR_Q_etaBinD = Book1D("_AVG_LAR_Q_D",m_sPFOContainerName + "_AVG_LAR_Q (|eta| >= 3.2)",31,-1000.0,30000.0); - m_PFO_AVG_TILE_Q_etaBinD = Book1D("_AVG_TILE_Q_D",m_sPFOContainerName + "_AVG_TILE_Q (|eta| >= 3.2)",21,-10.0,200.0); - m_PFO_EM_PROBABILITY_etaBinD = Book1D("_EM_PROBABILITY_D",m_sPFOContainerName + "_EM_PROBABILITY (|eta| >= 3.2)",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA_etaBinD = Book1D("_SECOND_LAMBDA_D",m_sPFOContainerName + "_SECOND_LAMBDA (|eta| >= 3.2)",60,-1.0,3000.0); - } - + // FlowElement if(!m_sFEContainerName.empty()){ m_FE_SECOND_R = Book1D("_SECOND_R",m_sFEContainerName + "_SECOND_R",60,-1.0,50.0); @@ -257,108 +135,7 @@ namespace PFO { } } - void PFOClusterMomentPlots::fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo){ - - float moment_SECOND_R = -1.0; - PFO.getClusterMoment(moment_SECOND_R,xAOD::CaloCluster::SECOND_R); - m_PFO_SECOND_R->Fill(moment_SECOND_R,eventInfo.beamSpotWeight()); - - float moment_CENTER_LAMBDA = -1.0; - PFO.getClusterMoment(moment_CENTER_LAMBDA,xAOD::CaloCluster::CENTER_LAMBDA); - m_PFO_CENTER_LAMBDA->Fill(moment_CENTER_LAMBDA,eventInfo.beamSpotWeight()); - - float moment_ISOLATION = -1.0; - PFO.getClusterMoment(moment_ISOLATION,xAOD::CaloCluster::ISOLATION); - m_PFO_ISOLATION->Fill(moment_ISOLATION,eventInfo.beamSpotWeight()); - - float moment_ENG_BAD_CELLS = -1.0; - PFO.getClusterMoment(moment_ENG_BAD_CELLS,xAOD::CaloCluster::ENG_BAD_CELLS); - m_PFO_ENG_BAD_CELLS->Fill(moment_ENG_BAD_CELLS,eventInfo.beamSpotWeight()); - - float moment_N_BAD_CELLS = -1.0; - PFO.getClusterMoment(moment_N_BAD_CELLS,xAOD::CaloCluster::N_BAD_CELLS); - m_PFO_N_BAD_CELLS->Fill(moment_N_BAD_CELLS,eventInfo.beamSpotWeight()); - - float moment_BADLARQ_FRAC = -1.0; - PFO.getClusterMoment(moment_BADLARQ_FRAC,xAOD::CaloCluster::BADLARQ_FRAC); - m_PFO_BADLARQ_FRAC->Fill(moment_BADLARQ_FRAC,eventInfo.beamSpotWeight()); - - float moment_ENG_POS = -1.0; - PFO.getClusterMoment(moment_ENG_POS,xAOD::CaloCluster::ENG_POS); - m_PFO_ENG_POS->Fill(moment_ENG_POS,eventInfo.beamSpotWeight()); - - float moment_AVG_LAR_Q = -1.0; - PFO.getClusterMoment(moment_AVG_LAR_Q,xAOD::CaloCluster::AVG_LAR_Q); - m_PFO_AVG_LAR_Q->Fill(moment_AVG_LAR_Q,eventInfo.beamSpotWeight()); - - float moment_AVG_TILE_Q = -1.0; - PFO.getClusterMoment(moment_AVG_TILE_Q,xAOD::CaloCluster::AVG_TILE_Q); - m_PFO_AVG_TILE_Q->Fill(moment_AVG_TILE_Q,eventInfo.beamSpotWeight()); - - float moment_EM_PROBABILITY = -1.0; - PFO.getClusterMoment(moment_EM_PROBABILITY,xAOD::CaloCluster::EM_PROBABILITY); - m_PFO_EM_PROBABILITY->Fill(moment_EM_PROBABILITY,eventInfo.beamSpotWeight()); - - float moment_SECOND_LAMBDA = -1.0; - PFO.getClusterMoment(moment_SECOND_LAMBDA,xAOD::CaloCluster::SECOND_LAMBDA); - m_PFO_SECOND_LAMBDA->Fill(moment_SECOND_LAMBDA,eventInfo.beamSpotWeight()); - - float PFOEta = PFO.eta(); - - if (fabs(PFOEta) < 1.5){ - m_PFO_SECOND_R_etaBinA->Fill(moment_SECOND_R,eventInfo.beamSpotWeight()); - m_PFO_CENTER_LAMBDA_etaBinA->Fill(moment_CENTER_LAMBDA,eventInfo.beamSpotWeight()); - m_PFO_ISOLATION_etaBinA->Fill(moment_ISOLATION,eventInfo.beamSpotWeight()); - m_PFO_ENG_BAD_CELLS_etaBinA->Fill(moment_ENG_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_N_BAD_CELLS_etaBinA->Fill(moment_N_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_BADLARQ_FRAC_etaBinA->Fill(moment_BADLARQ_FRAC,eventInfo.beamSpotWeight()); - m_PFO_ENG_POS_etaBinA->Fill(moment_ENG_POS,eventInfo.beamSpotWeight()); - m_PFO_AVG_LAR_Q_etaBinA->Fill(moment_AVG_LAR_Q,eventInfo.beamSpotWeight()); - m_PFO_AVG_TILE_Q_etaBinA->Fill(moment_AVG_TILE_Q,eventInfo.beamSpotWeight()); - m_PFO_EM_PROBABILITY_etaBinA->Fill(moment_EM_PROBABILITY,eventInfo.beamSpotWeight()); - m_PFO_SECOND_LAMBDA_etaBinA->Fill(moment_SECOND_LAMBDA,eventInfo.beamSpotWeight()); - }//|eta| < 1.5 - else if (fabs(PFOEta) < 2.5){ - m_PFO_SECOND_R_etaBinB->Fill(moment_SECOND_R,eventInfo.beamSpotWeight()); - m_PFO_CENTER_LAMBDA_etaBinB->Fill(moment_CENTER_LAMBDA,eventInfo.beamSpotWeight()); - m_PFO_ISOLATION_etaBinB->Fill(moment_ISOLATION,eventInfo.beamSpotWeight()); - m_PFO_ENG_BAD_CELLS_etaBinB->Fill(moment_ENG_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_N_BAD_CELLS_etaBinB->Fill(moment_N_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_BADLARQ_FRAC_etaBinB->Fill(moment_BADLARQ_FRAC,eventInfo.beamSpotWeight()); - m_PFO_ENG_POS_etaBinB->Fill(moment_ENG_POS,eventInfo.beamSpotWeight()); - m_PFO_AVG_LAR_Q_etaBinB->Fill(moment_AVG_LAR_Q,eventInfo.beamSpotWeight()); - m_PFO_AVG_TILE_Q_etaBinB->Fill(moment_AVG_TILE_Q,eventInfo.beamSpotWeight()); - m_PFO_EM_PROBABILITY_etaBinB->Fill(moment_EM_PROBABILITY,eventInfo.beamSpotWeight()); - m_PFO_SECOND_LAMBDA_etaBinB->Fill(moment_SECOND_LAMBDA,eventInfo.beamSpotWeight()); - } - else if (fabs(PFOEta) < 3.2){ - m_PFO_SECOND_R_etaBinC->Fill(moment_SECOND_R,eventInfo.beamSpotWeight()); - m_PFO_CENTER_LAMBDA_etaBinC->Fill(moment_CENTER_LAMBDA,eventInfo.beamSpotWeight()); - m_PFO_ISOLATION_etaBinC->Fill(moment_ISOLATION,eventInfo.beamSpotWeight()); - m_PFO_ENG_BAD_CELLS_etaBinC->Fill(moment_ENG_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_N_BAD_CELLS_etaBinC->Fill(moment_N_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_BADLARQ_FRAC_etaBinC->Fill(moment_BADLARQ_FRAC,eventInfo.beamSpotWeight()); - m_PFO_ENG_POS_etaBinC->Fill(moment_ENG_POS,eventInfo.beamSpotWeight()); - m_PFO_AVG_LAR_Q_etaBinC->Fill(moment_AVG_LAR_Q,eventInfo.beamSpotWeight()); - m_PFO_AVG_TILE_Q_etaBinC->Fill(moment_AVG_TILE_Q,eventInfo.beamSpotWeight()); - m_PFO_EM_PROBABILITY_etaBinC->Fill(moment_EM_PROBABILITY,eventInfo.beamSpotWeight()); - m_PFO_SECOND_LAMBDA_etaBinC->Fill(moment_SECOND_LAMBDA,eventInfo.beamSpotWeight()); - } - else{ - m_PFO_SECOND_R_etaBinD->Fill(moment_SECOND_R,eventInfo.beamSpotWeight()); - m_PFO_CENTER_LAMBDA_etaBinD->Fill(moment_CENTER_LAMBDA,eventInfo.beamSpotWeight()); - m_PFO_ISOLATION_etaBinD->Fill(moment_ISOLATION,eventInfo.beamSpotWeight()); - m_PFO_ENG_BAD_CELLS_etaBinD->Fill(moment_ENG_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_N_BAD_CELLS_etaBinD->Fill(moment_N_BAD_CELLS,eventInfo.beamSpotWeight()); - m_PFO_BADLARQ_FRAC_etaBinD->Fill(moment_BADLARQ_FRAC,eventInfo.beamSpotWeight()); - m_PFO_ENG_POS_etaBinD->Fill(moment_ENG_POS,eventInfo.beamSpotWeight()); - m_PFO_AVG_LAR_Q_etaBinD->Fill(moment_AVG_LAR_Q,eventInfo.beamSpotWeight()); - m_PFO_AVG_TILE_Q_etaBinD->Fill(moment_AVG_TILE_Q,eventInfo.beamSpotWeight()); - m_PFO_EM_PROBABILITY_etaBinD->Fill(moment_EM_PROBABILITY,eventInfo.beamSpotWeight()); - m_PFO_SECOND_LAMBDA_etaBinD->Fill(moment_SECOND_LAMBDA,eventInfo.beamSpotWeight()); - } - - } + void PFOClusterMomentPlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){ float moment_SECOND_R = -1.0; float moment_CENTER_LAMBDA = -1.0; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx deleted file mode 100644 index 6031911f5e6..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "PFOHistUtils/PFOEMPlots.h" - -namespace PFO { - - PFOEMPlots::PFOEMPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName) { - m_PFO_ptEM = nullptr; - m_PFO_etaEM = nullptr; - m_PFO_phiEM = nullptr; - m_PFO_mEM = nullptr; - m_FE_ptEM = nullptr; - m_FE_etaEM = nullptr; - m_FE_phiEM = nullptr; - m_FE_mEM = nullptr; - } - - void PFOEMPlots::initializePlots(){ - if(!m_sPFOContainerName.empty()){ - m_PFO_ptEM = Book1D("_PtEM",m_sPFOContainerName + "_PtEM (Entries/1 GeV)",30,-10.0,20.0); - m_PFO_etaEM = Book1D("_EtaEM",m_sPFOContainerName + "_EtaEM (Entries/0.1)",100,-5.0,5.0); - m_PFO_phiEM = Book1D("_PhiEM",m_sPFOContainerName + "_PhiEM (Entries/0.1)",64,-3.2,3.2); - m_PFO_mEM = Book1D("_mEM",m_sPFOContainerName + "_mEM (Entries/100 MeV)",10,0.0,0.5); - } - if(!m_sFEContainerName.empty()){ - m_FE_ptEM = Book1D("_PtEM",m_sFEContainerName + "_PtEM (Entries/1 GeV)",30,-10.0,20.0); - m_FE_etaEM = Book1D("_EtaEM",m_sFEContainerName + "_EtaEM (Entries/0.1)",100,-5.0,5.0); - m_FE_phiEM = Book1D("_PhiEM",m_sFEContainerName + "_PhiEM (Entries/0.1)",64,-3.2,3.2); - m_FE_mEM = Book1D("_mEM",m_sFEContainerName + "_mEM (Entries/100 MeV)",10,0.0,0.5); - } - } - - void PFOEMPlots::fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo){ - m_PFO_ptEM->Fill(PFO.ptEM()/1000.0,eventInfo.beamSpotWeight()); - m_PFO_etaEM->Fill(PFO.etaEM(),eventInfo.beamSpotWeight()); - m_PFO_phiEM->Fill(PFO.phiEM(),eventInfo.beamSpotWeight()); - m_PFO_mEM->Fill(PFO.mEM()/1000.0,eventInfo.beamSpotWeight()); - } -} diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx index 97a6782f33a..10ce239a459 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx @@ -3,16 +3,11 @@ */ #include "PFOHistUtils/PFOPVMatchedPlots.h" +#include "xAODTracking/TrackParticle.h" namespace PFO { - PFOPVMatchedPlots::PFOPVMatchedPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName){ - m_PFO_pt = nullptr; - m_PFO_eta = nullptr; - m_PFO_phi = nullptr; - m_PFO_m = nullptr; - m_PFO_charge = nullptr; - + PFOPVMatchedPlots::PFOPVMatchedPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sFEContainerName(sFEContainerName){ m_FE_pt = nullptr; m_FE_eta = nullptr; m_FE_phi = nullptr; @@ -20,19 +15,7 @@ namespace PFO { m_FE_charge = nullptr; } - void PFOPVMatchedPlots::initializePlots(){ - // book PFO histograms - if(!m_sPFOContainerName.empty()){ - m_PFO_pt = Book1D("_PVMatched_Pt",m_sPFOContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0); - m_PFO_eta = Book1D("_PVMatched_Eta",m_sPFOContainerName + "_Eta (Entries/0.1)",100,-5.0,5.0); - m_PFO_phi = Book1D("_PVMatched_Phi",m_sPFOContainerName + "_Phi (Entries/0.1)",64,-3.2,3.2); - m_PFO_m = Book1D("_PVMatched_m",m_sPFOContainerName + "_m (Entries/100 MeV)",10,0.0,0.5); - m_PFO_charge = Book1D("_PVMatched_charge",m_sPFOContainerName + "_charge (Entries/unit charge)",5,-2,2); - - m_PFO_pt_etaBinA = Book1D("_Pt_PVMatched_A",m_sPFOContainerName + "_Pt (Entries/1 GeV, |eta| < 1 )",30,-10.0,20.0); - m_PFO_pt_etaBinB = Book1D("_Pt_PVMatched_B",m_sPFOContainerName + "_Pt (Entries/1 GeV, 1 <= |eta| < 2 )",30,-10.0,20.0); - m_PFO_pt_etaBinC = Book1D("_Pt_PVMatched_C",m_sPFOContainerName + "_Pt (Entries/1 GeV, |eta| >= 2 )",30,-10.0,20.0); - } + void PFOPVMatchedPlots::initializePlots(){ //book Flow Element histograms if(!m_sFEContainerName.empty()){ m_FE_pt = Book1D("_PVMatched_Pt",m_sFEContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0); @@ -47,31 +30,6 @@ namespace PFO { } } - void PFOPVMatchedPlots::fill(const xAOD::PFO& PFO, const xAOD::Vertex& theVertex, const xAOD::EventInfo& eventInfo){ - - const xAOD::TrackParticle* theTrack = PFO.track(0); - - if (theTrack){ - //vtz.z() provides z of that vertex w.r.t the center of the beamspot (z = 0). Thus we corrext the track z0 to be w.r.t z = 0 - float z0 = theTrack->z0() + theTrack->vz(); - z0 = z0 - theVertex.z(); - float theta = theTrack->theta(); - if ( fabs(z0*sin(theta)) < 2.0 ){ - m_PFO_pt->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - m_PFO_eta->Fill(PFO.eta(),eventInfo.beamSpotWeight()); - m_PFO_phi->Fill(PFO.phi(),eventInfo.beamSpotWeight()); - m_PFO_m->Fill(PFO.m()/1000.0,eventInfo.beamSpotWeight()); - m_PFO_charge->Fill(PFO.charge(),eventInfo.beamSpotWeight()); - - if (fabs(PFO.eta()) < 1) m_PFO_pt_etaBinA->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_pt_etaBinB->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else m_PFO_pt_etaBinC->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - }//fill histograms if track is matched to the PV - }//if valid pointer to track - } - - - void PFOPVMatchedPlots::fill(const xAOD::FlowElement& FE, const xAOD::Vertex& theVertex, const xAOD::EventInfo& eventInfo){ if(FE.nChargedObjects()==0) return; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx index 5aa19927152..f6593c077ce 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx @@ -6,21 +6,7 @@ namespace PFO { - PFOPlots::PFOPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName){ - m_PFO_pt = nullptr; - m_PFO_eta = nullptr; - m_PFO_phi = nullptr; - m_PFO_m = nullptr; - m_PFO_charge = nullptr; - - m_PFO_pt_low = nullptr; - m_PFO_pt_middle = nullptr; - m_PFO_pt_high = nullptr; - - m_PFO_pt_etaBinA = nullptr; - m_PFO_pt_etaBinB = nullptr; - m_PFO_pt_etaBinC = nullptr; - + PFOPlots::PFOPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sFEContainerName(sFEContainerName){ m_FE_pt = nullptr; m_FE_eta = nullptr; m_FE_phi = nullptr; @@ -38,23 +24,7 @@ namespace PFO { m_FE_pt_etaBinC = nullptr; } - void PFOPlots::initializePlots(){ - if(!m_sPFOContainerName.empty()){ - // book PFO histograms - m_PFO_pt = Book1D("_Pt",m_sPFOContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0); - m_PFO_eta = Book1D("_Eta",m_sPFOContainerName + "_Eta (Entries/0.1)",100,-5.0,5.0); - m_PFO_phi = Book1D("_Phi",m_sPFOContainerName + "_Phi (Entries/0.1)",64,-3.2,3.2); - m_PFO_m = Book1D("_m",m_sPFOContainerName + "_m (Entries/100 MeV)",10,0.0,0.5); - m_PFO_charge = Book1D("_charge",m_sPFOContainerName + "_charge (Entries/unit charge)",5,-2,2); - - m_PFO_pt_low = Book1D("_Pt_low",m_sPFOContainerName + "_Pt_low (Entries/1 GeV, pT <= 5 GeV)",15,-10.0,5.0); - m_PFO_pt_middle = Book1D("_Pt_middle",m_sPFOContainerName + "_Pt_middle (Entries/1 GeV), 20 > pT > 5 GeV",45,5.0,50.0); - m_PFO_pt_high = Book1D("_Pt_high",m_sPFOContainerName + "_Pt_high (Entries/1 GeV), Pt > 20 GeV",45,5.0,50.0); - - m_PFO_pt_etaBinA = Book1D("_Pt_A",m_sPFOContainerName + "_Pt (Entries/1 GeV, |eta| < 1 )",30,-10.0,20.0); - m_PFO_pt_etaBinB = Book1D("_Pt_B",m_sPFOContainerName + "_Pt (Entries/1 GeV, 1 <= |eta| < 2 )",30,-10.0,20.0); - m_PFO_pt_etaBinC = Book1D("_Pt_C",m_sPFOContainerName + "_Pt (Entries/1 GeV, |eta| >= 2 )",30,-10.0,20.0); - } + void PFOPlots::initializePlots(){ if(!m_sFEContainerName.empty()){ //book Flow Element histograms m_FE_pt = Book1D("_Pt",m_sFEContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0); @@ -74,23 +44,6 @@ namespace PFO { } } - void PFOPlots::fill(const xAOD::PFO& PFO, const xAOD::EventInfo& eventInfo){ - m_PFO_pt->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - m_PFO_eta->Fill(PFO.eta(),eventInfo.beamSpotWeight()); - m_PFO_phi->Fill(PFO.phi(),eventInfo.beamSpotWeight()); - m_PFO_m->Fill(PFO.m()/1000.0,eventInfo.beamSpotWeight()); - m_PFO_charge->Fill(PFO.charge(),eventInfo.beamSpotWeight()); - - if (PFO.pt()/1000.0 <= 5) m_PFO_pt_low->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else if (20 >= PFO.pt()/1000.0 && PFO.pt()/1000.0 > 4) m_PFO_pt_middle->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else m_PFO_pt_high->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - - if (fabs(PFO.eta()) < 1) m_PFO_pt_etaBinA->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else if (fabs(PFO.eta()) < 2) m_PFO_pt_etaBinB->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - else m_PFO_pt_etaBinC->Fill(PFO.pt()/1000.0,eventInfo.beamSpotWeight()); - - } - void PFOPlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){ m_FE_pt->Fill(FE.pt()/1000.0,eventInfo.beamSpotWeight()); m_FE_eta->Fill(FE.eta(),eventInfo.beamSpotWeight()); diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFO_FE_Comparison_PlotMaker.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFO_FE_Comparison_PlotMaker.cxx deleted file mode 100644 index 9e40a0f9efa..00000000000 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFO_FE_Comparison_PlotMaker.cxx +++ /dev/null @@ -1,374 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ -// Author: M. T. Anthony - -#include "PFOHistUtils/PFO_FE_Comparison_PlotMaker.h" -#include <math.h> -// some debug libraries for cluster moment floating point checks -#include <bitset> -#include <climits> -namespace PFO { - PFO_FE_Comparison_PlotMaker::PFO_FE_Comparison_PlotMaker(PlotBase* pParent,std::string sDir, std::string sPFOContainerName, std::string sFEContainerName, bool isNeutral): PlotBase(pParent,sDir), asg::AsgMessaging("PFO_FE_Comparison_PlotMaker"), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName), m_isNeutral(isNeutral) { - // init all hists as nullptrs - m_PFO_FE_ptratio=nullptr; - m_PFO_FE_delta_pt=nullptr; - m_PFO_FE_delta_R=nullptr; - m_PFO_FE_delta_eta=nullptr; - m_PFO_FE_delta_phi=nullptr; - m_PFO_FE_dE=nullptr; - - - // comparison of cluster observables - for want of a better solution, pick ratio as a comparison. Should be ~1 for both - m_PFO_FE_SECOND_R_RelComparison = nullptr; - m_PFO_FE_CENTER_LAMBDA_RelComparison = nullptr; - m_PFO_FE_ISOLATION_RelComparison = nullptr; - m_PFO_FE_ENG_BAD_CELLS_RelComparison = nullptr; - m_PFO_FE_N_BAD_CELLS_RelComparison = nullptr; - m_PFO_FE_BADLARQ_FRAC_RelComparison = nullptr; - m_PFO_FE_ENG_POS_RelComparison = nullptr; - m_PFO_FE_AVG_LAR_Q_RelComparison = nullptr; - m_PFO_FE_AVG_TILE_Q_RelComparison = nullptr; - m_PFO_FE_EM_PROBABILITY_RelComparison = nullptr; - m_PFO_FE_SECOND_LAMBDA_RelComparison = nullptr; - - m_PFO_FE_TIMING_RelComparison=nullptr; - - //comparison of charged PFO/FE specific variables - m_PFO_FE_isInDenseEnvironment_RelComparison=nullptr; - m_PFO_FE_tracksExpectedEnergyDeposit=nullptr; - - - - - - - } // end of constructor - - void PFO_FE_Comparison_PlotMaker::initializePlots(){ - //initialise anyway regardless of flow element/PFOs configured - since this is simple kinematics - m_PFO_FE_ptratio= Book1D("_ptratio",m_sPFOContainerName+m_sFEContainerName+"_ptratio",40,0,2); - m_PFO_FE_delta_pt= Book1D("_deltapt",m_sPFOContainerName+m_sFEContainerName+"_deltapt (GeV)",40,-200,200); - m_PFO_FE_delta_R=Book1D("_deltaR",m_sPFOContainerName+m_sFEContainerName+"_deltaR",30,0,3); - m_PFO_FE_delta_eta=Book1D("_abs_delta_eta",m_sPFOContainerName+m_sFEContainerName+"_abs_delta_eta",20,0,5); // use absolute value since we check consistency, as opposed to absolute difference - m_PFO_FE_delta_phi=Book1D("_delta_phi",m_sPFOContainerName+m_sFEContainerName+"_delta_phi",60,-3,3); - m_PFO_FE_dE=Book1D("_dE",m_sPFOContainerName+m_sFEContainerName+"_dE (GeV)",40,-200,200); - - if(m_isNeutral){ - //Neutral FE vs PFO plots - // since these are based on FEs/ PFOs which share the same topocluster, expect values very close to (if not exactly 1, so bin as finely as possible in this interval) - easier to rebin using TH1 rebin in plot generation if necessary - - m_PFO_FE_SECOND_R_RelComparison=Book1D("_SECOND_R_RelComparison",m_sPFOContainerName+m_sFEContainerName+"_SECOND_R_RelComparison",300,-1,2); - m_PFO_FE_CENTER_LAMBDA_RelComparison=Book1D("_CENTER_LAMBDA_RelComparison",m_sPFOContainerName+m_sFEContainerName+"_CENTER_LAMBDA_RelComparison",300,-1,2); - - m_PFO_FE_ISOLATION_RelComparison=Book1D("_ISOLATION_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_ISOLATION_RelComparison",300,-1,2); - m_PFO_FE_ENG_BAD_CELLS_RelComparison=Book1D("_ENG_BAD_CELLS_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_ENG_BAD_CELLS_RelComparison",300,-1,2); - m_PFO_FE_N_BAD_CELLS_RelComparison=Book1D("_N_BAD_CELLS_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_N_BAD_CELLS_RelComparison",300,-1,2); - m_PFO_FE_BADLARQ_FRAC_RelComparison=Book1D("_BADLARQ_FRAC_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_BADLARQ_FRAC_RelComparison",300,-1,2); - - m_PFO_FE_ENG_POS_RelComparison=Book1D("_ENG_POS_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_ENG_POS_RelComparison",300,-1,2); - m_PFO_FE_AVG_LAR_Q_RelComparison=Book1D("_AVG_LAR_Q_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_AVG_LAR_Q_RelComparison",300,-1,2); - m_PFO_FE_AVG_TILE_Q_RelComparison=Book1D("_AVG_TILE_Q_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_AVG_TILE_Q_RelComparison",300,-1,2); - m_PFO_FE_EM_PROBABILITY_RelComparison=Book1D("_EM_PROBABILITY_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_EM_PROBABILITY_RelComparison",300,-1,2); - m_PFO_FE_SECOND_LAMBDA_RelComparison=Book1D("_SECOND_LAMBDA_RelComparison",m_sPFOContainerName+m_sFEContainerName + "_SECOND_LAMBDA_RelComparison",300,-1.0,2); - - m_PFO_FE_TIMING_RelComparison=Book1D("_TIMING_RelComparison",m_sPFOContainerName+m_sFEContainerName+"_TIMING_RelComparison",400,-2,2); - - } // end of NFE specific block - else{ - //charged pfo/flow element comparison using track matched PFO and FE - //binning is chosen so that we can be sensitive to small variations around 1, since we expect the retrievals to be close if not identical. -1 lower bound kept to pick up misconfigurations/debug errors - m_PFO_FE_isInDenseEnvironment_RelComparison=Book1D("_isInDenseEnvironment_RelComparison",m_sPFOContainerName+m_sFEContainerName+"_isInDenseEnvironment_RelComparison",30,-1,2); - m_PFO_FE_tracksExpectedEnergyDeposit=Book1D("_tracksExpectedEnergyDeposit_RelComparison",m_sPFOContainerName+m_sFEContainerName+"_tracksExpectedEnergyDeposit_RelComparison",300,-1,2); - - - - }// end of charged flow element/pfo specific block - - - } - - void PFO_FE_Comparison_PlotMaker::Fill(const xAOD::PFO* pfo, const xAOD::FlowElement* fe){ - TLorentzVector fe_tlv=fe->p4(); - TLorentzVector pfo_tlv=pfo->p4EM(); // default PFO is LC scale, switch to EM scale for comparison - - double pfo_pt=pfo_tlv.Pt(); - double pfo_eta=pfo_tlv.Eta(); - double pfo_e=pfo_tlv.E(); // get correct scale - - double fe_pt=fe_tlv.Pt(); - double fe_eta=fe_tlv.Eta(); - double fe_e=fe_tlv.E(); - double ptratio=0; - - double deltaPt=fe_pt-pfo_pt; - if(fe_pt>0){ - ptratio = pfo_pt/fe_pt; - } - double dR=fe_tlv.DeltaR(pfo_tlv); - double abs_dEta=std::abs(fe_eta-pfo_eta); - double dphi=fe_tlv.DeltaPhi(pfo_tlv); - double dE=fe_e-pfo_e; - double ERatio=-9999999999; - if(pfo_e!=0) - ERatio=fe_e/pfo_e; - - if(m_isNeutral){ - // debug of scale - double pfo_e_LC=pfo->p4().E(); // pfo LC scale energy - double pfo_eEM=pfo->eEM(); // pfo EM scale energy - ATH_MSG_DEBUG("PFO E(): "<<pfo_e_LC<<"PFO eEM()"<<pfo_eEM<<" FE E(): "<<fe_e); - if(ERatio>-999999999) - ATH_MSG_INFO("Ratio (PFO_e/FE_e): "<<ERatio); - if(dE!=0) - ATH_MSG_INFO("FE_e - PFO_e : "<<dE); - // assume all edge cases/nullptr catches for clusters were already vetoed - double fe_clus_e=(fe->otherObjects()).at(0)->p4().E(); - double pfo_clus_e=pfo->cluster(0)->p4().E(); - - - ATH_MSG_INFO("PFO_clus E(): "<<pfo_clus_e<<" FE_clus E(): "<<fe_clus_e); - } - // now fill the histos - - m_PFO_FE_dE->Fill(dE); - m_PFO_FE_ptratio->Fill(ptratio); - m_PFO_FE_delta_pt->Fill(deltaPt); - m_PFO_FE_delta_R->Fill(dR); - m_PFO_FE_delta_eta->Fill(abs_dEta); - m_PFO_FE_delta_phi->Fill(dphi); - - if(m_isNeutral){ - // for the more complex observables, need the following - // 1) Flow Element -> Retrieve cluster moments from auxdata - // 2) PFO - > Direct function call - // 3) Calculate Ratio (excl div0) - // 4) Dump to plot - float FE_moment_SECOND_R = -1.0; - float FE_moment_CENTER_LAMBDA = -1.0; - float FE_moment_ISOLATION = -1.0; - float FE_moment_ENG_BAD_CELLS=-1.0; - float FE_moment_N_BAD_CELLS = -1.0; - float FE_moment_BADLARQ_FRAC = -1.0; - float FE_moment_ENG_POS = -1.0; - float FE_moment_AVG_LAR_Q = -1.0; - float FE_moment_AVG_TILE_Q = -1.0; - float FE_moment_EM_PROBABILITY = -1.0; - float FE_moment_SECOND_LAMBDA = -1.0; - - float FE_TIMING=-50; - - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_SECOND_R("SECOND_R"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_CENTER_LAMBDA("CENTER_LAMBDA"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ISOLATION("ISOLATION"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ENG_BAD_CELLS("ENG_BAD_CELLS"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_N_BAD_CELLS("N_BAD_CELLS"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_BADLARQ_FRAC("BADLARQ_FRAC"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ENG_POS("ENG_POS"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_AVG_LAR_Q("AVG_LAR_Q"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_AVG_TILE_Q("AVG_TILE_Q"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_EM_PROBABILITY("EM_PROBABILITY"); - static SG::AuxElement::ConstAccessor<float>acc_FE_moment_SECOND_LAMBDA("SECOND_LAMBDA"); - static SG::AuxElement::ConstAccessor<float>acc_FE_TIMING("PF_TIMING"); - - - - if(acc_FE_moment_SECOND_R.isAvailable(*fe)) - FE_moment_SECOND_R=acc_FE_moment_SECOND_R(*fe); - - if(acc_FE_moment_CENTER_LAMBDA.isAvailable(*fe)) - FE_moment_CENTER_LAMBDA=acc_FE_moment_CENTER_LAMBDA(*fe); - - if(acc_FE_moment_ISOLATION.isAvailable(*fe)) - FE_moment_ISOLATION=acc_FE_moment_ISOLATION(*fe); - - if(acc_FE_moment_ENG_BAD_CELLS.isAvailable(*fe)) - FE_moment_ENG_BAD_CELLS=acc_FE_moment_ENG_BAD_CELLS(*fe); - - if(acc_FE_moment_N_BAD_CELLS.isAvailable(*fe)) - FE_moment_N_BAD_CELLS=acc_FE_moment_N_BAD_CELLS(*fe); - - if(acc_FE_moment_BADLARQ_FRAC.isAvailable(*fe)){ - FE_moment_BADLARQ_FRAC=acc_FE_moment_BADLARQ_FRAC(*fe); - // this section is a debug of floating point compression - ATH_MSG_DEBUG("BADLARQ_FRAC "<<FE_moment_BADLARQ_FRAC); - - union{ //using union and bitset to read the binary - //representation of the floating point number (to check compression effects) - float input; // - int output; - } indata; - indata.input=FE_moment_BADLARQ_FRAC; - std::bitset<sizeof(float) * CHAR_BIT> bits(indata.output); - ATH_MSG_DEBUG("BADLARQ_FRAC bits (binary rep) "<<bits<<""); - - - } - if(acc_FE_moment_ENG_POS.isAvailable(*fe)) - FE_moment_ENG_POS=acc_FE_moment_ENG_POS(*fe); - - if(acc_FE_moment_AVG_LAR_Q.isAvailable(*fe)) - FE_moment_AVG_LAR_Q=acc_FE_moment_AVG_LAR_Q(*fe); - - if(acc_FE_moment_AVG_TILE_Q.isAvailable(*fe)) - FE_moment_AVG_TILE_Q=acc_FE_moment_AVG_TILE_Q(*fe); - - if(acc_FE_moment_EM_PROBABILITY.isAvailable(*fe)) - FE_moment_EM_PROBABILITY=acc_FE_moment_EM_PROBABILITY(*fe); - - if(acc_FE_moment_SECOND_LAMBDA.isAvailable(*fe)) - FE_moment_SECOND_LAMBDA=acc_FE_moment_SECOND_LAMBDA(*fe); - - if(acc_FE_TIMING.isAvailable(*fe)) - FE_TIMING=acc_FE_TIMING(*fe); - // now do the same for PFOs by direct function call - - float pfo_moment_SECOND_R = -1.0; - pfo->getClusterMoment(pfo_moment_SECOND_R,xAOD::CaloCluster::SECOND_R); - float pfo_moment_CENTER_LAMBDA = -1.0; - pfo->getClusterMoment(pfo_moment_CENTER_LAMBDA,xAOD::CaloCluster::CENTER_LAMBDA); - float pfo_moment_ISOLATION = -1.0; - pfo->getClusterMoment(pfo_moment_ISOLATION,xAOD::CaloCluster::ISOLATION); - float pfo_moment_ENG_BAD_CELLS = -1.0; - pfo->getClusterMoment(pfo_moment_ENG_BAD_CELLS,xAOD::CaloCluster::ENG_BAD_CELLS); - float pfo_moment_N_BAD_CELLS = -1.0; - pfo->getClusterMoment(pfo_moment_N_BAD_CELLS,xAOD::CaloCluster::N_BAD_CELLS); - float pfo_moment_BADLARQ_FRAC = -1.0; - pfo->getClusterMoment(pfo_moment_BADLARQ_FRAC,xAOD::CaloCluster::BADLARQ_FRAC); - float pfo_moment_ENG_POS = -1.0; - pfo->getClusterMoment(pfo_moment_ENG_POS,xAOD::CaloCluster::ENG_POS); - float pfo_moment_AVG_LAR_Q = -1.0; - pfo->getClusterMoment(pfo_moment_AVG_LAR_Q,xAOD::CaloCluster::AVG_LAR_Q); - float pfo_moment_AVG_TILE_Q = -1.0; - pfo->getClusterMoment(pfo_moment_AVG_TILE_Q,xAOD::CaloCluster::AVG_TILE_Q); - float pfo_moment_EM_PROBABILITY = -1.0; - pfo->getClusterMoment(pfo_moment_EM_PROBABILITY,xAOD::CaloCluster::EM_PROBABILITY); - float pfo_moment_SECOND_LAMBDA = -1.0; - pfo->getClusterMoment(pfo_moment_SECOND_LAMBDA,xAOD::CaloCluster::SECOND_LAMBDA); - float pfo_TIMING=-50; - bool gotattr=pfo->attribute<float>(xAOD::PFODetails::eflowRec_TIMING,pfo_TIMING); - if (!gotattr) // if not retrieved, reset to original value if it was changed - pfo_TIMING=-50; - - // step 3: calculate the ratios - // Ratio is PFO/FE (in this order) - // also skip Div0 errors - setting to -1 should suffice to make these debuggable - float Ratio_PFO_FE_moment_SECOND_R = -1.0; - if(FE_moment_SECOND_R!=0){ - Ratio_PFO_FE_moment_SECOND_R=pfo_moment_SECOND_R/FE_moment_SECOND_R; - } - float Ratio_PFO_FE_moment_CENTER_LAMBDA = -1.0; - if(FE_moment_CENTER_LAMBDA!=0){ - Ratio_PFO_FE_moment_CENTER_LAMBDA=pfo_moment_CENTER_LAMBDA/FE_moment_CENTER_LAMBDA; - ATH_MSG_DEBUG("CENTER_LAMBDA: (PFO) "<<pfo_moment_CENTER_LAMBDA<<" (FE) "<<FE_moment_CENTER_LAMBDA); - } - float Ratio_PFO_FE_moment_ISOLATION = -1.0; - if(FE_moment_ISOLATION!=0){ - Ratio_PFO_FE_moment_ISOLATION=pfo_moment_ISOLATION/FE_moment_ISOLATION; - } - float Ratio_PFO_FE_moment_ENG_BAD_CELLS=-1.0; - if(FE_moment_ENG_BAD_CELLS!=0){ - Ratio_PFO_FE_moment_ENG_BAD_CELLS=pfo_moment_ENG_BAD_CELLS/FE_moment_ENG_BAD_CELLS; - } - float Ratio_PFO_FE_moment_N_BAD_CELLS = -1.0; - if(FE_moment_N_BAD_CELLS!=0){ - Ratio_PFO_FE_moment_N_BAD_CELLS=pfo_moment_N_BAD_CELLS/FE_moment_N_BAD_CELLS; - } - - float Ratio_PFO_FE_moment_BADLARQ_FRAC = -1.0; - if(FE_moment_BADLARQ_FRAC!=0){ - Ratio_PFO_FE_moment_BADLARQ_FRAC=pfo_moment_BADLARQ_FRAC/FE_moment_BADLARQ_FRAC; - ATH_MSG_DEBUG("BADLARQ_FRAC: (PFO) "<<pfo_moment_BADLARQ_FRAC<<" (FE) "<<FE_moment_BADLARQ_FRAC); - } - float Ratio_PFO_FE_moment_ENG_POS = -1.0; - if(FE_moment_ENG_POS!=0){ - Ratio_PFO_FE_moment_ENG_POS=pfo_moment_ENG_POS/FE_moment_ENG_POS; - } - float Ratio_PFO_FE_moment_AVG_LAR_Q = -1.0; - if(FE_moment_AVG_LAR_Q){ - Ratio_PFO_FE_moment_AVG_LAR_Q=pfo_moment_AVG_LAR_Q/FE_moment_AVG_LAR_Q; - ATH_MSG_DEBUG("AVG_LAR_Q: (PFO) "<<pfo_moment_AVG_LAR_Q<<" (FE) "<<FE_moment_AVG_LAR_Q); - } - float Ratio_PFO_FE_moment_AVG_TILE_Q = -1.0; - if(FE_moment_AVG_TILE_Q){ - Ratio_PFO_FE_moment_AVG_TILE_Q=pfo_moment_AVG_TILE_Q/FE_moment_AVG_TILE_Q; - } - float Ratio_PFO_FE_moment_EM_PROBABILITY = -1.0; - if(FE_moment_EM_PROBABILITY!=0){ - Ratio_PFO_FE_moment_EM_PROBABILITY=pfo_moment_EM_PROBABILITY/FE_moment_EM_PROBABILITY; - } - - float Ratio_PFO_FE_moment_SECOND_LAMBDA = -1.0; - if(FE_moment_SECOND_LAMBDA!=0){ - Ratio_PFO_FE_moment_SECOND_LAMBDA=pfo_moment_SECOND_LAMBDA/FE_moment_SECOND_LAMBDA; - } - float Ratio_PFO_FE_TIMING=-2.0; // specific default value given interval of [-50,50] - if (FE_TIMING!=0){ - Ratio_PFO_FE_TIMING=pfo_TIMING/FE_TIMING; - } - // Step 4: Dump - - - m_PFO_FE_SECOND_R_RelComparison->Fill(Ratio_PFO_FE_moment_SECOND_R); - m_PFO_FE_CENTER_LAMBDA_RelComparison->Fill(Ratio_PFO_FE_moment_CENTER_LAMBDA); - m_PFO_FE_ISOLATION_RelComparison->Fill(Ratio_PFO_FE_moment_ISOLATION); - m_PFO_FE_ENG_BAD_CELLS_RelComparison->Fill(Ratio_PFO_FE_moment_ENG_BAD_CELLS); - m_PFO_FE_N_BAD_CELLS_RelComparison->Fill(Ratio_PFO_FE_moment_N_BAD_CELLS); - m_PFO_FE_BADLARQ_FRAC_RelComparison->Fill(Ratio_PFO_FE_moment_BADLARQ_FRAC); - m_PFO_FE_ENG_POS_RelComparison->Fill(Ratio_PFO_FE_moment_ENG_POS); - m_PFO_FE_AVG_LAR_Q_RelComparison->Fill(Ratio_PFO_FE_moment_AVG_LAR_Q); - m_PFO_FE_AVG_TILE_Q_RelComparison->Fill(Ratio_PFO_FE_moment_AVG_TILE_Q); - m_PFO_FE_EM_PROBABILITY_RelComparison->Fill(Ratio_PFO_FE_moment_EM_PROBABILITY); - m_PFO_FE_SECOND_LAMBDA_RelComparison->Fill(Ratio_PFO_FE_moment_SECOND_LAMBDA); - m_PFO_FE_TIMING_RelComparison->Fill(Ratio_PFO_FE_TIMING); - - } // end of NFE specific block - else{ - // Charged Flow Element specific plots - // for the more complex observables, need the following - // 1) Flow Element -> Retrieve from auxdata - // 2) PFO - > Direct function call - // 3) Calculate Ratio (excl div0) - // 4) Dump to plot - - // Step 1: CFE - static SG::AuxElement::ConstAccessor<int> acc_FE_isInDenseEnvironment("IsInDenseEnvironment"); - static SG::AuxElement::ConstAccessor<float> acc_FE_tracksExpectedEnergyDeposit("TracksExpectedEnergyDeposit"); - - float FE_isInDenseEnvironment=-1.0; - float FE_tracksExpectedEnergyDeposit=-1.0; - - if(acc_FE_isInDenseEnvironment.isAvailable(*fe)) - FE_isInDenseEnvironment=acc_FE_isInDenseEnvironment(*fe); - if(acc_FE_tracksExpectedEnergyDeposit.isAvailable(*fe)) - FE_tracksExpectedEnergyDeposit=acc_FE_tracksExpectedEnergyDeposit(*fe); - // Step 2: cPFO - xAOD::PFODetails::PFOAttributes myAttribute_isInDenseEnvironment = xAOD::PFODetails::PFOAttributes::eflowRec_isInDenseEnvironment; - int pfo_isInDenseEnvironment=false; // boolean false = 0 - bool gotattr=pfo->attribute(myAttribute_isInDenseEnvironment,pfo_isInDenseEnvironment); - if(!gotattr) // reset to default value - pfo_isInDenseEnvironment=0; - float pfo_tracksExpectedEnergyDeposit=-1.0; - xAOD::PFODetails::PFOAttributes myAttribute_tracksExpectedEnergyDeposit = xAOD::PFODetails::PFOAttributes::eflowRec_tracksExpectedEnergyDeposit; - gotattr = pfo->attribute(myAttribute_tracksExpectedEnergyDeposit,pfo_tracksExpectedEnergyDeposit); - if(!gotattr) // reset to default value if it changes - pfo_tracksExpectedEnergyDeposit=-1.0; - - // Step 3: Calculate Ratio - float Ratio_PFO_FE_isInDenseEnvironment=-1.0; - if(FE_isInDenseEnvironment!=0){ - Ratio_PFO_FE_isInDenseEnvironment=pfo_isInDenseEnvironment/FE_isInDenseEnvironment; - ATH_MSG_DEBUG("isInDenseEnvironment: (pfo) "<<pfo_isInDenseEnvironment<<" (FE) "<<FE_isInDenseEnvironment); - } - float Ratio_PFO_FE_tracksExpectedEnergyDeposit=-1.0; - if(FE_tracksExpectedEnergyDeposit!=0){ - - Ratio_PFO_FE_tracksExpectedEnergyDeposit=pfo_tracksExpectedEnergyDeposit/FE_tracksExpectedEnergyDeposit; - ATH_MSG_DEBUG("tracksExpectedEnergyDeposit: (pfo) "<<pfo_tracksExpectedEnergyDeposit<<" (FE) "<<FE_tracksExpectedEnergyDeposit); - } - // Step 4: Dump - m_PFO_FE_isInDenseEnvironment_RelComparison->Fill(Ratio_PFO_FE_isInDenseEnvironment); - m_PFO_FE_tracksExpectedEnergyDeposit->Fill(Ratio_PFO_FE_tracksExpectedEnergyDeposit); - } - } // end of fill function -}// end of PFO namespace diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_PhysValAll.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_PhysValAll.sh index 5711ac23a55..b1fade29c62 100755 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_PhysValAll.sh +++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_PhysValAll.sh @@ -6,6 +6,6 @@ # art-include: master/Athena export TRF_ECHO=True; -Reco_tf.py --inputAODFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.AOD.e4993_s3227_r12649/myAOD.pool.root --outputNTUP_PHYSVALFile physval.root --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' +Reco_tf.py --inputAODFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecJobTransformTests/mc16_13TeV/valid1/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.recon.AOD.e4993_s3227_r12649/myAOD.pool.root --outputNTUP_PHYSVALFile physval.root --validationFlags 'doExample,doMET,doPFlow_FlowElements,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' RES=$? echo "art-result: $RES Reco" diff --git a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_chainRecoPhysVal.sh b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_chainRecoPhysVal.sh index aa3f2157f1a..9af46818446 100755 --- a/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_chainRecoPhysVal.sh +++ b/Reconstruction/RecExample/RecJobTransformTests/test/test_mc20e_13TeV_chainRecoPhysVal.sh @@ -15,7 +15,7 @@ Reco_tf.py --AMI=r12806 --outputRDOFile=myRDO.pool.root --outputAODFile=myAOD.po RES=$? echo "art-result: $RES Reco" -Reco_tf.py --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile physval.root --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' +Reco_tf.py --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile physval.root --validationFlags 'doExample,doMET,doPFlow_FlowElements,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' RES=$? echo "art-result: $RES Reco" diff --git a/Tools/Tier0ChainTests/test/test_q221.sh b/Tools/Tier0ChainTests/test/test_q221.sh index 5a91026ca47..8d91a1f8487 100755 --- a/Tools/Tier0ChainTests/test/test_q221.sh +++ b/Tools/Tier0ChainTests/test/test_q221.sh @@ -24,7 +24,7 @@ echo "art-result: $rc1 Reco" rc2=-9999 if [ ${rc1} -eq 0 ] then - Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root + Reco_tf.py --validationFlags 'doExample,doMET,doPFlow_FlowElements,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root echo "art-result: $? PhysVal" ArtPackage=$1 diff --git a/Tools/Tier0ChainTests/test/test_q221_mp.sh b/Tools/Tier0ChainTests/test/test_q221_mp.sh index b50a4d67e44..d4f6cd41d15 100755 --- a/Tools/Tier0ChainTests/test/test_q221_mp.sh +++ b/Tools/Tier0ChainTests/test/test_q221_mp.sh @@ -14,7 +14,7 @@ Reco_tf.py \ echo "art-result: $? Reco" -Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root +Reco_tf.py --validationFlags 'doExample,doMET,doPFlow_FlowElements,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root echo "art-result: $? PhysVal" ArtPackage=$1 diff --git a/Tools/Tier0ChainTests/test/test_q221_mt1.sh b/Tools/Tier0ChainTests/test/test_q221_mt1.sh index 19fc5060335..a4dd74cc270 100755 --- a/Tools/Tier0ChainTests/test/test_q221_mt1.sh +++ b/Tools/Tier0ChainTests/test/test_q221_mt1.sh @@ -19,7 +19,7 @@ echo "art-result: $rc1 Reco" rc2=-9999 if [ ${rc1} -eq 0 ] then - Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root + Reco_tf.py --validationFlags 'doExample,doMET,doPFlow_FlowElements,doTau,doEgamma,doBtag,doZee,doJet,doTopoCluster,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root echo "art-result: $? PhysVal" ArtPackage=$1 -- GitLab