diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_FlowElements_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_FlowElements_jobOptions.py new file mode 100644 index 0000000000000000000000000000000000000000..9ad51b052a3ef48074cf7502b19d66035bfb2481 --- /dev/null +++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValPFlow_FlowElements_jobOptions.py @@ -0,0 +1,42 @@ +#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 # get plots from PFO + +# charged PFO +#PhysValPFO_charged = PhysValPFO("PhysValPFO_charged") +#PhysValPFO_charged.OutputLevel = WARNING +#PhysValPFO_charged.DetailLevel = 10 +#PhysValPFO_charged.EnableLumi = False +#PhysValPFO_charged.PFOContainerName="JetETMissChargedParticleFlowObjects" +#monMan.AthenaMonTools += [ PhysValPFO_charged ] + +# neutral PFO +#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 ] +#charged Flow Element +from PFODQA.PFODQAConf import PhysValFE # get plots from FE +PhysValFE_charged=PhysValFE("PhysValFE_charged") +PhysValFE_charged.OutputLevel= WARNING +PhysValFE_charged.DetailLevel= 10 +PhysValFE_charged.EnableLumi=False +PhysValFE_charged.FlowElementContainerName="JetETMissChargedFlowElements" +PhysValFE_charged.PFOContainerName="JetETMissChargedParticleFlowObjects" +PhysValFE_charged.useNeutralFE= False +monMan.AthenaMonTools += [ PhysValFE_charged ] + +PhysValFE_neutral=PhysValFE("PhysValFE_neutral") +PhysValFE_neutral.OutputLevel= WARNING +PhysValFE_neutral.DetailLevel= 10 +PhysValFE_neutral.EnableLumi=False +PhysValFE_neutral.FlowElementContainerName="JetETMissNeutralFlowElements" +PhysValFE_neutral.PFOContainerName="JetETMissNeutralParticleFlowObjects" +PhysValFE_neutral.useNeutralFE=True +monMan.AthenaMonTools += [ PhysValFE_neutral ] diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx index 989af84adf5e8f022f2343817c930bf3639ea134..f84f585699ed0a13500b712fcd276f1c69282caa 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.cxx @@ -4,10 +4,14 @@ #include "PFOChargedValidationPlots.h" -PFOChargedValidationPlots::PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), - m_PFOPlots(this,"",sPFOContainerName), - m_PFOPVMatchedPlots(this,"",sPFOContainerName), - m_PFOAlgPropertyPlots(this,"",sPFOContainerName) +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), + m_FELinkerPlots(this,"",sFEContainerName,false) {} void PFOChargedValidationPlots::fill(const xAOD::PFO& thePFO, const xAOD::Vertex* theVertex ){ @@ -15,5 +19,11 @@ void PFOChargedValidationPlots::fill(const xAOD::PFO& thePFO, const xAOD::Vertex m_PFOAlgPropertyPlots.fill(thePFO); if (theVertex) m_PFOPVMatchedPlots.fill(thePFO, *theVertex); } +void PFOChargedValidationPlots::fill(const xAOD::FlowElement& theFE, const xAOD::Vertex* theVertex ){ + m_FEPlots.fill(theFE); + m_FEAlgPropertyPlots.fill(theFE); + if (theVertex) m_FEPVMatchedPlots.fill(theFE, *theVertex); + m_FELinkerPlots.fill(theFE); +} diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h index 898d9ec15452d251cb6287b4d61cb5f31860fb03..705fe466e90f62aba0e1c48cc0a7e63844b1352b 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFOChargedValidationPlots.h @@ -9,7 +9,9 @@ #include "PFOHistUtils/PFOPlots.h" #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" class PFOChargedValidationPlots : public PlotBase { @@ -17,17 +19,29 @@ class PFOChargedValidationPlots : public PlotBase { public: /** Standard Constructor */ - PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName); + PFOChargedValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName,std::string sFEContainerName); /** fill the histograms up */ void fill(const xAOD::PFO& thePFO, const xAOD::Vertex* theVertex); - + void fill(const xAOD::FlowElement& theFE, const xAOD::Vertex* theVertex); 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; + + //Flow Element Plots + /** 4-vector and charge histograms */ + PFO::PFOPlots m_FEPlots; + /** 4-vector and charge histograms with PV match cut applied */ + PFO::PFOPVMatchedPlots m_FEPVMatchedPlots; + /** Algorithm property plots */ + PFO::PFOAlgPropertyPlots m_FEAlgPropertyPlots; + + //Flow Element specific plots (linker algs) + PFO::FlowElement_LinkerPlots m_FELinkerPlots; }; #endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx index cf32e228f821f44400f79f65a9653fc611c3c030..b4ad18fc4fd8f800a758c78f4f34d40b5d9fd4dc 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.cxx @@ -4,12 +4,17 @@ #include "PFONeutralValidationPlots.h" -PFONeutralValidationPlots::PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), - m_PFOPlots(this,"",sPFOContainerName), - m_PFOClusterMomentPlots(this,"",sPFOContainerName), - m_PFOCalibHitClusterMomentPlots(this,"",sPFOContainerName), - m_PFOAttributePlots(this,"",sPFOContainerName), - m_PFOEMPlots(this,"",sPFOContainerName) +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) {} void PFONeutralValidationPlots::fill(const xAOD::PFO& thePFO){ @@ -20,4 +25,12 @@ void PFONeutralValidationPlots::fill(const xAOD::PFO& thePFO){ m_PFOEMPlots.fill(thePFO); } - +void PFONeutralValidationPlots::fill(const xAOD::FlowElement& theFE){ + //overload of previous function using FlowElement + m_FEPlots.fill(theFE); + m_FEClusterMomentPlots.fill(theFE); + //m_FECalibHitClusterMomentPlots.fill(theFE); // MC doesn't generally have the relevant calibhits saved. To add at a later date if needed + m_FEAttributePlots.fill(theFE); + //m_FEEMPlots.fill(theFE); + m_FELinkerPlots.fill(theFE); +} diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h index 7d2b6a4b15a5ee6b58052cc6aadb7976e600dd4b..daab3ec0b85bcea58a086fbe2f3007ee465d255f 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PFONeutralValidationPlots.h @@ -11,19 +11,23 @@ #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" class PFONeutralValidationPlots : public PlotBase { public: /** Standard Constructor */ - PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName); + PFONeutralValidationPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); /** fill the histograms up */ void fill(const xAOD::PFO& thePFO); + void fill(const xAOD::FlowElement& theFE); private: + // objects for PFOs /** 4-vector histograms */ PFO::PFOPlots m_PFOPlots; /** Cluster Moment histograms */ @@ -35,5 +39,20 @@ class PFONeutralValidationPlots : public PlotBase { /** 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 */ + PFO::PFOClusterMomentPlots m_FEClusterMomentPlots; + /** 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; + + /** Flow element linkers to leptons/photons */ + PFO::FlowElement_LinkerPlots m_FELinkerPlots; + }; #endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b0c9f4d2a3680727cfd67a3fb51c9d6fe6791291 --- /dev/null +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.cxx @@ -0,0 +1,108 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "PhysValFE.h" +#include "xAODPFlow/PFOContainer.h" +#include "xAODPFlow/FlowElementContainer.h" + +PhysValFE::PhysValFE (const std::string& type, const std::string& name, const IInterface* parent ) : + ManagedMonitorToolBase( type, name, parent ), + m_useNeutralFE(false) +{ + declareProperty("useNeutralFE", m_useNeutralFE, "Select whether to use neutral or charged FE"); +} + +PhysValFE::~PhysValFE() {} + +StatusCode PhysValFE::initialize(){ + ATH_CHECK(ManagedMonitorToolBase::initialize()); + ATH_CHECK(m_PFOContainerHandleKey.initialize()); + ATH_CHECK(m_vertexContainerReadHandleKey.initialize()); + ATH_CHECK(m_FEContainerHandleKey.initialize()); + + return StatusCode::SUCCESS; +} + + +StatusCode PhysValFE::bookHistograms(){ + + std::string theName = "PFlow/FlowElement/"+m_FEContainerHandleKey.key(); + + std::vector<HistData> hists; + if (!m_useNeutralFE){ + m_FEChargedValidationPlots.reset(new PFOChargedValidationPlots(0,theName,"", theName)); + m_FEChargedValidationPlots->setDetailLevel(100); + m_FEChargedValidationPlots->initialize(); + hists = m_FEChargedValidationPlots->retrieveBookedHistograms(); + } + else if (m_useNeutralFE){ + m_FENeutralValidationPlots.reset(new PFONeutralValidationPlots(0,theName, "",theName)); + m_FENeutralValidationPlots->setDetailLevel(100); + m_FENeutralValidationPlots->initialize(); + hists = m_FENeutralValidationPlots->retrieveBookedHistograms(); + } + + for (auto hist : hists) { + ATH_CHECK(regHist(hist.first,hist.second,all)); + } + + return StatusCode::SUCCESS; + +} + +StatusCode PhysValFE::fillHistograms(){ + + const xAOD::Vertex* theVertex = nullptr; + + if (!m_useNeutralFE){ + 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::FlowElementContainer> FEContainerReadHandle(m_FEContainerHandleKey); + if(!FEContainerReadHandle.isValid()){ + ATH_MSG_WARNING("Invalid ReadHandle for xAOD::FlowElementContainer with key: " << FEContainerReadHandle.key()); + return StatusCode::SUCCESS; + } + bool readMatches=false; + + for (auto theFE : *FEContainerReadHandle){ + if(theFE){ + if (!m_useNeutralFE) m_FEChargedValidationPlots->fill(*theFE,theVertex); + else if (m_useNeutralFE) m_FENeutralValidationPlots->fill(*theFE); + if(readMatches){ + std::cout<<"Element link reading functionality to be added"<<std::endl; + } + } + else ATH_MSG_WARNING("Invalid pointer to xAOD::FlowElement"); + } + + SG::ReadHandle<xAOD::PFOContainer> PFOContainerReadHandle(m_PFOContainerHandleKey); + if(!PFOContainerReadHandle.isValid()){ + ATH_MSG_WARNING("PFO readhandle is a dud"); + return StatusCode::SUCCESS; + } + + return StatusCode::SUCCESS; + +} + +StatusCode PhysValFE::procHistograms(){ + return StatusCode::SUCCESS; +} diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h new file mode 100644 index 0000000000000000000000000000000000000000..046476493cefd91d7b477f537d79014075982e74 --- /dev/null +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValFE.h @@ -0,0 +1,55 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef PHYSVALFE_H +#define PHYSVALFE_H + +#include "PFOChargedValidationPlots.h" +#include "PFONeutralValidationPlots.h" +#include "AthenaMonitoring/ManagedMonitorToolBase.h" +#include <string> +#include "xAODTracking/VertexContainer.h" +#include "xAODPFlow/PFOContainer.h" +#include "xAODPFlow/FlowElementContainer.h" +#include "StoreGate/ReadHandleKey.h" + +class PhysValFE : public ManagedMonitorToolBase { + +public: + + /** Standard Constructor */ + PhysValFE (const std::string& type, const std::string& name, const IInterface* parent ); + + /** Standard Destructor */ + virtual ~PhysValFE(); + + /** 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::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"}; + + /** Pointer to class that deals with histograms for charged FE */ + std::unique_ptr<PFOChargedValidationPlots> m_FEChargedValidationPlots; + + /** Pointer to class that deals with histograms for neutral FE */ + std::unique_ptr<PFONeutralValidationPlots> m_FENeutralValidationPlots; + + /** Select whether to use neutral or charged FE */ + bool m_useNeutralFE; + +}; +#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx index f902b53156fdfe7504aac2d0c39d3da706190196..b9956c137599825fe1a37cb4de1d512cd6835258 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/PhysValPFO.cxx @@ -27,13 +27,13 @@ StatusCode PhysValPFO::bookHistograms(){ std::vector<HistData> hists; if (!m_useNeutralPFO){ - m_PFOChargedValidationPlots.reset(new PFOChargedValidationPlots(0,theName, theName)); + 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.reset(new PFONeutralValidationPlots(0,theName, theName,"")); m_PFONeutralValidationPlots->setDetailLevel(100); m_PFONeutralValidationPlots->initialize(); hists = m_PFONeutralValidationPlots->retrieveBookedHistograms(); @@ -76,7 +76,6 @@ StatusCode PhysValPFO::fillHistograms(){ 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); diff --git a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx index 7c08e9e2dbfc5da86defab74387e9c7e3392dade..d18f3461f6cfd708e8e9558319699cefac18ee26 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFODQA/src/components/PFODQA_entries.cxx @@ -1,6 +1,7 @@ #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/CMakeLists.txt b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/CMakeLists.txt index 0851308a4ff589d9792c33968e8cebc9f3360d7b..3ed74998c49b85067a8a329a2c0c798b020e20e3 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/CMakeLists.txt +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/CMakeLists.txt @@ -7,4 +7,4 @@ atlas_subdir( PFOHistUtils ) atlas_add_library( PFOHistUtils src/*.cxx PUBLIC_HEADERS PFOHistUtils - LINK_LIBRARIES xAODCaloEvent xAODPFlow xAODTracking TrkValHistUtils ) + LINK_LIBRARIES xAODCaloEvent xAODPFlow xAODMuon xAODEgamma xAODTau xAODTracking TrkValHistUtils) diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/FlowElement_LinkerPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/FlowElement_LinkerPlots.h new file mode 100644 index 0000000000000000000000000000000000000000..d2f3ba1222c60b7c71312ffece3816b414b0a8f3 --- /dev/null +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/FlowElement_LinkerPlots.h @@ -0,0 +1,69 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef FLOWELEMENT_LINKERPLOTS_H +#define FLOWELEMENT_LINKERPLOTS_H + + +#include "TrkValHistUtils/PlotBase.h" +#include "xAODPFlow/FlowElement.h" +#include <string> + +namespace PFO{ + + class FlowElement_LinkerPlots : public PlotBase { + + public: + FlowElement_LinkerPlots(PlotBase *pParent, std::string sDir, std::string sFEContainerName, bool doNeutralFE); +//~FlowElement_LinkerPlots(); + + + + void fill(const xAOD::FlowElement& FE); + + private: + + + TH1* m_CFE_tau_dR; + TH1* m_CFE_tau_NMatchedTau; + TH1* m_CFE_tau_tauNMatchedFE; + + TH1* m_NFE_tau_dR; + TH1* m_NFE_tau_NMatchedTau; + TH1* m_NFE_tau_tauNMatchedFE; + + + TH1* m_CFE_muon_dR; + TH1* m_CFE_muon_NMatchedMuon; + TH1* m_CFE_muon_muonNMatchedFE; + + TH1* m_NFE_muon_dR; + TH1* m_NFE_muon_NMatchedMuon; + TH1* m_NFE_muon_muonNMatchedFE; + + + TH1* m_CFE_photon_dR; + TH1* m_CFE_photon_NMatchedPhoton; + TH1* m_CFE_photon_photonNMatchedFE; + + TH1* m_NFE_photon_dR; + TH1* m_NFE_photon_NMatchedPhoton; + TH1* m_NFE_photon_photonNMatchedFE; + + + TH1* m_CFE_electron_dR; + TH1* m_CFE_electron_NMatchedElectron; + TH1* m_CFE_electron_electronNMatchedFE; + + TH1* m_NFE_electron_dR; + TH1* m_NFE_electron_NMatchedElectron; + TH1* m_NFE_electron_electronNMatchedFE; + + void initializePlots(); + std::string m_sFEContainerName; + bool m_doNeutralFE; + }; + +} +#endif diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h index ffab78a96c1f415a7175379df3de8fa0d4f8e04f..7b2c325911a44e95330f55ea43fe687677bb8121 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAlgPropertyPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,29 +15,44 @@ namespace PFO { public: - PFOAlgPropertyPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOAlgPropertyPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); - + void fill(const xAOD::FlowElement& theFE); private: - - 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; - - - void initializePlots(); - std::string m_sPFOContainerName; - + /** 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; + + /** Flow Element Histograms */ + TH1* m_FE_isInDenseEnvironment; + TH1* m_FE_tracksExpectedEnergyDeposit; + + /* Same histograms in three eta bins of |eta| < 1, 1 <= |eta| < 2 and |eta| >= 2 */ + TH1* m_FE_isInDenseEnvironment_etaBinA; + TH1* m_FE_tracksExpectedEnergyDeposit_etaBinA; + + TH1* m_FE_isInDenseEnvironment_etaBinB; + TH1* m_FE_tracksExpectedEnergyDeposit_etaBinB; + + TH1* m_FE_isInDenseEnvironment_etaBinC; + TH1* m_FE_tracksExpectedEnergyDeposit_etaBinC; + + + void initializePlots(); + std::string m_sPFOContainerName; + std::string m_sFEContainerName; + }; } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h index 60fbf0d5df4ead727bad62723cf39b28112269ad..52428bb0900590e0aeacfb3cacd1d190c1a6c7ea 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOAttributePlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,9 +15,10 @@ namespace PFO { public: - PFOAttributePlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOAttributePlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); + void fill(const xAOD::FlowElement& FE); private: @@ -26,8 +28,12 @@ namespace PFO { TH1* m_PFO_LAYER_ENERGY_Tile0; TH1* m_PFO_TIMING; + // only attribute available to the FE is the timing + TH1* m_FE_TIMING; + void initializePlots(); std::string m_sPFOContainerName; + std::string m_sFEContainerName; }; diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOCalibHitClusterMomentPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOCalibHitClusterMomentPlots.h index 3c4b0400fbe92d63c4c5f76b18e0b799e719cad8..a278e31ee447eff0c600962c5fa29ce09124749f 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOCalibHitClusterMomentPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOCalibHitClusterMomentPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,12 +15,12 @@ namespace PFO { public: - PFOCalibHitClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOCalibHitClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); + void fill(const xAOD::FlowElement& FE); private: - /** Histograms inclusive in eta */ TH1* m_PFO_ENG_CALIB_FRAC_EM = nullptr; TH1* m_PFO_ENG_CALIB_FRAC_HAD = nullptr; @@ -44,7 +45,7 @@ namespace PFO { void initializePlots(); std::string m_sPFOContainerName; - + std::string m_sFEContainerName; }; } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h index 8296d0e347f5ca07b31827efc8c8b679fa50621b..1dd38dce1faccc3d73fc890eb70cf25c81310f9c 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOClusterMomentPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,10 +15,10 @@ namespace PFO { public: - PFOClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOClusterMomentPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); - + void fill(const xAOD::FlowElement& FE); private: /** Histograms inclusive in eta */ @@ -30,7 +31,7 @@ namespace PFO { TH1* m_PFO_ENG_POS; TH1* m_PFO_AVG_LAR_Q; TH1* m_PFO_AVG_TILE_Q; - TH1* m_PFO_EM_PROBABILTY; + TH1* m_PFO_EM_PROBABILITY; TH1* m_PFO_SECOND_LAMBDA; /** Same histograms binned in eta regions */ @@ -43,7 +44,7 @@ namespace PFO { TH1* m_PFO_ENG_POS_etaBinA; TH1* m_PFO_AVG_LAR_Q_etaBinA; TH1* m_PFO_AVG_TILE_Q_etaBinA; - TH1* m_PFO_EM_PROBABILTY_etaBinA; + TH1* m_PFO_EM_PROBABILITY_etaBinA; TH1* m_PFO_SECOND_LAMBDA_etaBinA; TH1* m_PFO_SECOND_R_etaBinB; @@ -55,7 +56,7 @@ namespace PFO { TH1* m_PFO_ENG_POS_etaBinB; TH1* m_PFO_AVG_LAR_Q_etaBinB; TH1* m_PFO_AVG_TILE_Q_etaBinB; - TH1* m_PFO_EM_PROBABILTY_etaBinB; + TH1* m_PFO_EM_PROBABILITY_etaBinB; TH1* m_PFO_SECOND_LAMBDA_etaBinB; TH1* m_PFO_SECOND_R_etaBinC; @@ -67,7 +68,7 @@ namespace PFO { TH1* m_PFO_ENG_POS_etaBinC; TH1* m_PFO_AVG_LAR_Q_etaBinC; TH1* m_PFO_AVG_TILE_Q_etaBinC; - TH1* m_PFO_EM_PROBABILTY_etaBinC; + TH1* m_PFO_EM_PROBABILITY_etaBinC; TH1* m_PFO_SECOND_LAMBDA_etaBinC; TH1* m_PFO_SECOND_R_etaBinD; @@ -79,12 +80,77 @@ namespace PFO { TH1* m_PFO_ENG_POS_etaBinD; TH1* m_PFO_AVG_LAR_Q_etaBinD; TH1* m_PFO_AVG_TILE_Q_etaBinD; - TH1* m_PFO_EM_PROBABILTY_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; + TH1* m_FE_ISOLATION; + TH1* m_FE_ENG_BAD_CELLS; + TH1* m_FE_N_BAD_CELLS; + TH1* m_FE_BADLARQ_FRAC; + TH1* m_FE_ENG_POS; + TH1* m_FE_AVG_LAR_Q; + TH1* m_FE_AVG_TILE_Q; + TH1* m_FE_EM_PROBABILITY; + TH1* m_FE_SECOND_LAMBDA; + + /** Same histograms binned in eta regions */ + TH1* m_FE_SECOND_R_etaBinA; + TH1* m_FE_CENTER_LAMBDA_etaBinA; + TH1* m_FE_ISOLATION_etaBinA; + TH1* m_FE_ENG_BAD_CELLS_etaBinA; + TH1* m_FE_N_BAD_CELLS_etaBinA; + TH1* m_FE_BADLARQ_FRAC_etaBinA; + TH1* m_FE_ENG_POS_etaBinA; + TH1* m_FE_AVG_LAR_Q_etaBinA; + TH1* m_FE_AVG_TILE_Q_etaBinA; + TH1* m_FE_EM_PROBABILITY_etaBinA; + TH1* m_FE_SECOND_LAMBDA_etaBinA; + + TH1* m_FE_SECOND_R_etaBinB; + TH1* m_FE_CENTER_LAMBDA_etaBinB; + TH1* m_FE_ISOLATION_etaBinB; + TH1* m_FE_ENG_BAD_CELLS_etaBinB; + TH1* m_FE_N_BAD_CELLS_etaBinB; + TH1* m_FE_BADLARQ_FRAC_etaBinB; + TH1* m_FE_ENG_POS_etaBinB; + TH1* m_FE_AVG_LAR_Q_etaBinB; + TH1* m_FE_AVG_TILE_Q_etaBinB; + TH1* m_FE_EM_PROBABILITY_etaBinB; + TH1* m_FE_SECOND_LAMBDA_etaBinB; + + TH1* m_FE_SECOND_R_etaBinC; + TH1* m_FE_CENTER_LAMBDA_etaBinC; + TH1* m_FE_ISOLATION_etaBinC; + TH1* m_FE_ENG_BAD_CELLS_etaBinC; + TH1* m_FE_N_BAD_CELLS_etaBinC; + TH1* m_FE_BADLARQ_FRAC_etaBinC; + TH1* m_FE_ENG_POS_etaBinC; + TH1* m_FE_AVG_LAR_Q_etaBinC; + TH1* m_FE_AVG_TILE_Q_etaBinC; + TH1* m_FE_EM_PROBABILITY_etaBinC; + TH1* m_FE_SECOND_LAMBDA_etaBinC; + + TH1* m_FE_SECOND_R_etaBinD; + TH1* m_FE_CENTER_LAMBDA_etaBinD; + TH1* m_FE_ISOLATION_etaBinD; + TH1* m_FE_ENG_BAD_CELLS_etaBinD; + TH1* m_FE_N_BAD_CELLS_etaBinD; + TH1* m_FE_BADLARQ_FRAC_etaBinD; + TH1* m_FE_ENG_POS_etaBinD; + TH1* m_FE_AVG_LAR_Q_etaBinD; + TH1* m_FE_AVG_TILE_Q_etaBinD; + TH1* m_FE_EM_PROBABILITY_etaBinD; + TH1* m_FE_SECOND_LAMBDA_etaBinD; + void initializePlots(); std::string m_sPFOContainerName; - + std::string m_sFEContainerName; }; } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h index b1d661e8513b0daa1a0ceb910ecde0a2e0dc6520..f1010ec66076de6da5c88114281511817c76a580 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOEMPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,19 +15,25 @@ namespace PFO { public: - PFOEMPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOEMPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); - + void fill(const xAOD::FlowElement& FE); + 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; }; } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h index 1d45c54d77adfbab2d89bda663ae116804c33267..3faf7295868cc6bc8bb46913bd44c85057095a82 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPVMatchedPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" #include "xAODTracking/Vertex.h" namespace PFO { @@ -15,9 +16,10 @@ namespace PFO { public: - PFOPVMatchedPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOPVMatchedPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO, const xAOD::Vertex& theVertex); + void fill(const xAOD::FlowElement& FE, const xAOD::Vertex& theVertex); private: TH1* m_PFO_pt; @@ -31,9 +33,20 @@ namespace PFO { TH1* m_PFO_pt_etaBinB; TH1* m_PFO_pt_etaBinC; + TH1* m_FE_pt; + TH1* m_FE_eta; + TH1* m_FE_phi; + TH1* m_FE_m; + TH1* m_FE_charge; + + /** Pt Histogram binned in eta */ + TH1* m_FE_pt_etaBinA; + TH1* m_FE_pt_etaBinB; + 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 c539d62602d476ca30f414551a60fc2ad39f291d..3bee6b4aacc262dd94fbff90451463cfe338cfa1 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/PFOHistUtils/PFOPlots.h @@ -7,6 +7,7 @@ #include "TrkValHistUtils/PlotBase.h" #include "xAODPFlow/PFO.h" +#include "xAODPFlow/FlowElement.h" namespace PFO { @@ -14,10 +15,10 @@ namespace PFO { public: - PFOPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName); + PFOPlots(PlotBase *pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName); void fill(const xAOD::PFO& PFO); - + void fill(const xAOD::FlowElement& FE); private: TH1* m_PFO_pt; TH1* m_PFO_eta; @@ -29,10 +30,22 @@ namespace PFO { 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; + TH1* m_FE_phi; + TH1* m_FE_m; + TH1* m_FE_charge; + + /** Pt Histogram binned in eta */ + TH1* m_FE_pt_etaBinA; + TH1* m_FE_pt_etaBinB; + TH1* m_FE_pt_etaBinC; void initializePlots(); std::string m_sPFOContainerName; - + std::string m_sFEContainerName; }; } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/FlowElement_LinkerPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/FlowElement_LinkerPlots.cxx new file mode 100644 index 0000000000000000000000000000000000000000..d6d2a725f0176b5cf415fdb6f04fa20a57e36108 --- /dev/null +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/FlowElement_LinkerPlots.cxx @@ -0,0 +1,216 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "PFOHistUtils/FlowElement_LinkerPlots.h" +#include <iostream> +#include "xAODMuon/MuonContainer.h" +#include "xAODEgamma/ElectronContainer.h" +#include "xAODEgamma/PhotonContainer.h" +#include "xAODTau/TauJetContainer.h" +#include "AthLinks/ElementLink.h" + +namespace PFO { + + FlowElement_LinkerPlots::FlowElement_LinkerPlots(PlotBase* pParent, std::string sDir, std::string sFEContainerName, bool doNeutralFE): + PlotBase(pParent, sDir), + m_sFEContainerName(sFEContainerName), + m_doNeutralFE(doNeutralFE) + { + m_CFE_tau_dR=nullptr; + m_CFE_tau_NMatchedTau=nullptr; + m_CFE_tau_tauNMatchedFE=nullptr; + + m_NFE_tau_dR=nullptr; + m_NFE_tau_NMatchedTau=nullptr; + m_NFE_tau_tauNMatchedFE=nullptr; + + + m_CFE_muon_dR=nullptr; + m_CFE_muon_NMatchedMuon=nullptr; + m_CFE_muon_muonNMatchedFE=nullptr; + + m_NFE_muon_dR=nullptr; + m_NFE_muon_NMatchedMuon=nullptr; + m_NFE_muon_muonNMatchedFE=nullptr; + + + m_CFE_photon_dR=nullptr; + m_CFE_photon_NMatchedPhoton=nullptr; + m_CFE_photon_photonNMatchedFE=nullptr; + + m_NFE_photon_dR=nullptr; + m_NFE_photon_NMatchedPhoton=nullptr; + m_NFE_photon_photonNMatchedFE=nullptr; + + + m_CFE_electron_dR=nullptr; + m_CFE_electron_NMatchedElectron=nullptr; + m_CFE_electron_electronNMatchedFE=nullptr; + + m_NFE_electron_dR=nullptr; + m_NFE_electron_NMatchedElectron=nullptr; + m_NFE_electron_electronNMatchedFE=nullptr; + + + } + + void FlowElement_LinkerPlots::initializePlots(){ + // init only the histograms we're going to use (m_doNeutralFE is the switch) + //tau + if(!m_doNeutralFE){ + m_CFE_tau_dR=Book1D("_CFE_tau_dR",m_sFEContainerName+"_CFE_tau_dR",40,0,5); + m_CFE_tau_NMatchedTau=Book1D("_CFE_tau_NMatchedTau",m_sFEContainerName+"_CFE_tau_NMatchedTau",20,0,20); + m_CFE_tau_tauNMatchedFE=Book1D("_CFE_tau_tauNMatchedFE",m_sFEContainerName+"_CFE_tau_tauNMatchedFE",20,0,20); + } + else{ + m_NFE_tau_dR=Book1D("_NFE_tau_dR",m_sFEContainerName+"_NFE_tau_dR",40,0,5); + m_NFE_tau_NMatchedTau=Book1D("_NFE_tau_NMatchedTau",m_sFEContainerName+"_NFE_tau_NMatchedTau",20,0,20); + m_NFE_tau_tauNMatchedFE=Book1D("_NFE_tau_tauNMatchedFE",m_sFEContainerName+"_NFE_tau_tauNMatchedFE",20,0,20); + } + //electron + if(!m_doNeutralFE){ + m_CFE_electron_dR=Book1D("_CFE_electron_dR",m_sFEContainerName+"_CFE_electron_dR",40,0,5); + m_CFE_electron_NMatchedElectron=Book1D("_CFE_electron_NMatchedElectron",m_sFEContainerName+"_CFE_electron_NMatchedElectron",20,0,20); + m_CFE_electron_electronNMatchedFE=Book1D("_CFE_electron_electronNMatchedFE",m_sFEContainerName+"_CFE_electron_electronNMatchedFE",20,0,20); + } + else{ + m_NFE_electron_dR=Book1D("_NFE_electron_dR",m_sFEContainerName+"_NFE_electron_dR",40,0,5); + m_NFE_electron_NMatchedElectron=Book1D("_NFE_electron_NMatchedElectron",m_sFEContainerName+"_NFE_electron_NMatchedElectron",20,0,20); + m_NFE_electron_electronNMatchedFE=Book1D("_NFE_electron_electronNMatchedFE",m_sFEContainerName+"_NFE_electron_electronNMatchedFE",20,0,20); + } + //muon + if(!m_doNeutralFE){ + m_CFE_muon_dR=Book1D("_CFE_muon_dR",m_sFEContainerName+"_CFE_muon_dR",40,0,5); + m_CFE_muon_NMatchedMuon=Book1D("_CFE_muon_NMatchedMuon",m_sFEContainerName+"_CFE_muon_NMatchedMuon",20,0,20); + m_CFE_muon_muonNMatchedFE=Book1D("_CFE_muon_muonNMatchedFE",m_sFEContainerName+"_CFE_muon_muonNMatchedFE",20,0,20); + } + else{ + m_NFE_muon_dR=Book1D("_NFE_muon_dR",m_sFEContainerName+"_NFE_muon_dR",40,0,5); + m_NFE_muon_NMatchedMuon=Book1D("_NFE_muon_NMatchedMuon",m_sFEContainerName+"_NFE_muon_NMatchedMuon",20,0,20); + m_NFE_muon_muonNMatchedFE=Book1D("_NFE_muon_muonNMatchedFE",m_sFEContainerName+"_NFE_muon_muonNMatchedFE",20,0,20); + } + //photon + if(!m_doNeutralFE){ + m_CFE_photon_dR=Book1D("_CFE_photon_dR",m_sFEContainerName+"_CFE_photon_dR",40,0,5); + m_CFE_photon_NMatchedPhoton=Book1D("_CFE_photon_NMatchedPhoton",m_sFEContainerName+"_CFE_photon_NMatchedPhoton",20,0,20); + m_CFE_photon_photonNMatchedFE=Book1D("_CFE_photon_photonNMatchedFE",m_sFEContainerName+"_CFE_photon_photonNMatchedFE",20,0,20); + } + else{ + m_NFE_photon_dR=Book1D("_NFE_photon_dR",m_sFEContainerName+"_NFE_photon_dR",40,0,5); + m_NFE_photon_NMatchedPhoton=Book1D("_NFE_photon_NMatchedPhoton",m_sFEContainerName+"_NFE_photon_NMatchedPhoton",20,0,20); + m_NFE_photon_photonNMatchedFE=Book1D("_NFE_photon_photonNMatchedFE",m_sFEContainerName+"_NFE_photon_photonNMatchedFE",20,0,20); + } + } + void FlowElement_LinkerPlots::fill(const xAOD::FlowElement& FE){ + // methods work for both CFE and NFE since the auxvars are named the same + SG::AuxElement::ConstAccessor< std::vector < ElementLink< xAOD::MuonContainer > > > acc_muon_FE_Link("FE_MuonLinks"); + SG::AuxElement::ConstAccessor< std::vector < ElementLink< xAOD::PhotonContainer > > > acc_photon_FE_Link("FE_PhotonLinks"); + SG::AuxElement::ConstAccessor< std::vector < ElementLink< xAOD::ElectronContainer > > > acc_electron_FE_Link("FE_ElectronLinks"); + SG::AuxElement::ConstAccessor< std::vector < ElementLink< xAOD::TauJetContainer > > > acc_tau_FE_Link("FE_TauLinks"); + + TLorentzVector FE_fourvec=FE.p4(); + // Muon block + if(acc_muon_FE_Link.isAvailable(FE)){ + std::vector< ElementLink < xAOD::MuonContainer > > MuonLinks=acc_muon_FE_Link(FE); + int nMuons_per_FE=MuonLinks.size(); + if(nMuons_per_FE>0){ // skip cases w/o match + if(m_doNeutralFE) + m_NFE_muon_NMatchedMuon->Fill(nMuons_per_FE); + else + m_CFE_muon_NMatchedMuon->Fill(nMuons_per_FE); + } + + + for (ElementLink<xAOD::MuonContainer> MuonLink: MuonLinks){ + //get Muon from link by de-referencing it + const xAOD::Muon* muon = *MuonLink; + TLorentzVector muon_fourvec=muon->p4(); + double deltaR=muon_fourvec.DeltaR(FE_fourvec); + if(muon->muonType()==4) // skip forward muons, as have tracklets which mis-link to FE. + continue; + if(m_doNeutralFE) + m_NFE_muon_dR->Fill(deltaR); + else + m_CFE_muon_dR->Fill(deltaR); + } + }// end of muon acc block + + + + + // Electron block + if(acc_electron_FE_Link.isAvailable(FE)){ + std::vector< ElementLink < xAOD::ElectronContainer > > ElectronLinks=acc_electron_FE_Link(FE); + int nElectrons_per_FE=ElectronLinks.size(); + if(nElectrons_per_FE>0){ // skip cases w/o match + if(m_doNeutralFE) + m_NFE_electron_NMatchedElectron->Fill(nElectrons_per_FE); + else + m_CFE_electron_NMatchedElectron->Fill(nElectrons_per_FE); + } + + + for (ElementLink<xAOD::ElectronContainer> ElectronLink: ElectronLinks){ + //get Electron from link by de-referencing it + const xAOD::Electron* electron = *ElectronLink; + TLorentzVector electron_fourvec=electron->p4(); + double deltaR=electron_fourvec.DeltaR(FE_fourvec); + if(m_doNeutralFE) + m_NFE_electron_dR->Fill(deltaR); + else + m_CFE_electron_dR->Fill(deltaR); + } + }// end of electron acc block + + // Photon block + if(acc_photon_FE_Link.isAvailable(FE)){ + std::vector< ElementLink < xAOD::PhotonContainer > > PhotonLinks=acc_photon_FE_Link(FE); + int nPhotons_per_FE=PhotonLinks.size(); + if(nPhotons_per_FE>0){ // skip cases w/o match + if(m_doNeutralFE) + m_NFE_photon_NMatchedPhoton->Fill(nPhotons_per_FE); + else + m_CFE_photon_NMatchedPhoton->Fill(nPhotons_per_FE); + } + + + for (ElementLink<xAOD::PhotonContainer> PhotonLink: PhotonLinks){ + //get Photon from link by de-referencing it + const xAOD::Photon* photon = *PhotonLink; + TLorentzVector photon_fourvec=photon->p4(); + double deltaR=photon_fourvec.DeltaR(FE_fourvec); + if(m_doNeutralFE) + m_NFE_photon_dR->Fill(deltaR); + else + m_CFE_photon_dR->Fill(deltaR); + } + }// end of photon acc block + + // Taujet block + if(acc_tau_FE_Link.isAvailable(FE)){ + std::vector< ElementLink < xAOD::TauJetContainer > > TaujetLinks=acc_tau_FE_Link(FE); + int nTaujets_per_FE=TaujetLinks.size(); + if(nTaujets_per_FE>0){ // skip cases w/o match + if(m_doNeutralFE) + m_NFE_tau_NMatchedTau->Fill(nTaujets_per_FE); + else + m_CFE_tau_NMatchedTau->Fill(nTaujets_per_FE); + } + + TLorentzVector FE_fourvec=FE.p4(); + for (ElementLink<xAOD::TauJetContainer> TaujetLink: TaujetLinks){ + //get Taujet from link by de-referencing it + const xAOD::TauJet* taujet = *TaujetLink; + TLorentzVector taujet_fourvec=taujet->p4(); + double deltaR=taujet_fourvec.DeltaR(FE_fourvec); + if(m_doNeutralFE) + m_NFE_tau_dR->Fill(deltaR); + else + m_CFE_tau_dR->Fill(deltaR); + } + }// end of taujet acc block + + + } // end of fill statement +} // end of PFO namespace diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx index d19482b2be12d8c8d25ce4786878eadf2e7c1508..60588aa20d06636cc0bfa7449294098ecd8c37b4 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAlgPropertyPlots.cxx @@ -6,26 +6,42 @@ namespace PFO { - PFOAlgPropertyPlots::PFOAlgPropertyPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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; + 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_PFO_isInDenseEnvironment = Book1D("_isInDenseEnvironment",m_sPFOContainerName+"_isInDenseEnvironment",3,-1,2); - m_PFO_tracksExpectedEnergyDeposit = Book1D("_tracksExpectedEnergyDeposit",m_sPFOContainerName+"_tracksExpectedEnergyDeposit",11,-1,10); + 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_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_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); + } + // book FlowElement histograms + if(!m_sFEContainerName.empty()){ + m_FE_isInDenseEnvironment = Book1D("_isInDenseEnvironment",m_sFEContainerName+"_isInDenseEnvironment",3,-1,2); + m_FE_tracksExpectedEnergyDeposit = Book1D("_tracksExpectedEnergyDeposit",m_sFEContainerName+"_tracksExpectedEnergyDeposit",11,-1,10); - 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_etaBinA = Book1D("_isInDenseEnvironment_binA",m_sFEContainerName+"_isInDenseEnvironment (|eta| < 1)",3,-1,2); + m_FE_tracksExpectedEnergyDeposit_etaBinA = Book1D("_tracksExpectedEnergyDeposit_binA)",m_sFEContainerName+"_tracksExpectedEnergyDeposit (|eta| < 1)",11,-1,10); + + m_FE_isInDenseEnvironment_etaBinB = Book1D("_isInDenseEnvironment_binB",m_sFEContainerName+"_isInDenseEnvironment (1 <= |eta| < 2)",3,-1,2); + m_FE_tracksExpectedEnergyDeposit_etaBinB = Book1D("_tracksExpectedEnergyDeposit_binB",m_sFEContainerName+"_tracksExpectedEnergyDeposit (1 <= |eta| < 2)",11,-1,10); - 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 = Book1D("_isInDenseEnvironment_binC",m_sFEContainerName+"_isInDenseEnvironment (|eta| >= 2)",3,-1,2); + m_FE_tracksExpectedEnergyDeposit_etaBinC = Book1D("_tracksExpectedEnergyDeposit_binC",m_sFEContainerName+"_tracksExpectedEnergyDeposit (|eta| >= 2)",11,-1,10); + } } void PFOAlgPropertyPlots::fill(const xAOD::PFO& PFO){ @@ -63,4 +79,43 @@ namespace PFO { else m_PFO_tracksExpectedEnergyDeposit_etaBinC->Fill(-1.0); } } -} + + void PFOAlgPropertyPlots::fill(const xAOD::FlowElement& FE){ + + static SG::AuxElement::ConstAccessor<int> acc_IsInDenseEnvironment("IsInDenseEnvironment"); + // dump the "isInDenseEnvironment + if(acc_IsInDenseEnvironment.isAvailable(FE)){ + int isInDenseEnvironment=acc_IsInDenseEnvironment(FE); + m_FE_isInDenseEnvironment->Fill(isInDenseEnvironment); + if (fabs(FE.eta()) < 1) m_FE_isInDenseEnvironment_etaBinA->Fill(isInDenseEnvironment); + else if (fabs(FE.eta()) < 2) m_FE_isInDenseEnvironment_etaBinB->Fill(isInDenseEnvironment); + else m_FE_isInDenseEnvironment_etaBinC->Fill(isInDenseEnvironment); + } + else{ + m_FE_isInDenseEnvironment->Fill(-1.0); + if (fabs(FE.eta()) < 1) m_FE_isInDenseEnvironment_etaBinA->Fill(-1.0); + else if (fabs(FE.eta()) < 2) m_FE_isInDenseEnvironment_etaBinB->Fill(-1.0); + else m_FE_isInDenseEnvironment_etaBinC->Fill(-1.0); + } + static SG::AuxElement::ConstAccessor<float> acc_FE_tracksExpectedEnergyDeposit("TracksExpectedEnergyDeposit"); + + if(acc_FE_tracksExpectedEnergyDeposit.isAvailable(FE)){ + float expectedEnergy=acc_FE_tracksExpectedEnergyDeposit(FE); + m_FE_tracksExpectedEnergyDeposit->Fill(expectedEnergy/1000.0); + if(fabs(FE.eta())<1) + m_FE_tracksExpectedEnergyDeposit_etaBinA->Fill(expectedEnergy/1000.0); + else if(fabs(FE.eta())<2) + m_FE_tracksExpectedEnergyDeposit_etaBinB->Fill(expectedEnergy/1000.0); + else + m_FE_tracksExpectedEnergyDeposit_etaBinC->Fill(expectedEnergy/1000.0); + }// end of accessor block on tracks expected energy deposit + else{ + m_FE_tracksExpectedEnergyDeposit->Fill(-1.0); + if( fabs(FE.eta())<1) m_FE_tracksExpectedEnergyDeposit_etaBinA->Fill(-1.0); + else if ((fabs(FE.eta())<2)) m_FE_tracksExpectedEnergyDeposit_etaBinB->Fill(-1.0); + else + m_FE_tracksExpectedEnergyDeposit_etaBinC->Fill(-1.0); + } + + } // end of PFOAlgPropertyPlots::fill(const xAOD::FlowElement& FE) +} // end of namespace PFO diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx index 4c8d00e3a871614b4520c00073de5f290419a8f1..e6108a698796742077191ea264cda18316525840 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOAttributePlots.cxx @@ -1,27 +1,33 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "PFOHistUtils/PFOAttributePlots.h" #include <iostream> namespace PFO { - PFOAttributePlots::PFOAttributePlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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; + m_FE_TIMING = nullptr; } void PFOAttributePlots::initializePlots(){ - - 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); - + 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); + } + if(!m_sFEContainerName.empty()){ + m_FE_TIMING = Book1D("_TIMING",m_sFEContainerName+"_TIMING",10,-50,50); + } } void PFOAttributePlots::fill(const xAOD::PFO& PFO){ @@ -52,5 +58,15 @@ namespace PFO { else m_PFO_TIMING->Fill(-50); } - -} + void PFOAttributePlots::fill(const xAOD::FlowElement& FE){ + float timing=-50; + static SG::AuxElement::ConstAccessor<float>acc_FE_Timing("PF_TIMING"); + if(acc_FE_Timing.isAvailable(FE)){ + timing=acc_FE_Timing(FE); + m_FE_TIMING->Fill(timing); + } + else{ + m_FE_TIMING->Fill(timing); + } + } // end of FE fill function +} // end of PFO namespace diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOCalibHitClusterMomentPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOCalibHitClusterMomentPlots.cxx index b830d5fabb79cd0bcae66b90a13efaa627ad76f1..78edba6489b67b183714bfa974903d41af4ebc84 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOCalibHitClusterMomentPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOCalibHitClusterMomentPlots.cxx @@ -5,12 +5,11 @@ #include "PFOHistUtils/PFOCalibHitClusterMomentPlots.h" namespace PFO { - - PFOCalibHitClusterMomentPlots::PFOCalibHitClusterMomentPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ +PFOCalibHitClusterMomentPlots::PFOCalibHitClusterMomentPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName, std::string sFEContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName), m_sFEContainerName(sFEContainerName){ } void PFOCalibHitClusterMomentPlots::initializePlots(){ - + if(!m_sPFOContainerName.empty()){ m_PFO_ENG_CALIB_FRAC_EM = Book1D("_ENG_CALIB_FRAC_EM",m_sPFOContainerName + "_ENG_CALIB_FRAC_EM",22,0,1.1); m_PFO_ENG_CALIB_FRAC_HAD = Book1D("_ENG_CALIB_FRAC_HAD",m_sPFOContainerName + "_ENG_CALIB_FRAC_HAD",22,0,1.1); m_PFO_ENG_CALIB_FRAC_REST = Book1D("_ENG_CALIB_FRAC_REST",m_sPFOContainerName + "_ENG_CALIB_FRAC_REST",22,0,1.1); @@ -30,7 +29,10 @@ namespace PFO { m_PFO_ENG_CALIB_FRAC_EM_etaBinD = Book1D("_ENG_CALIB_FRAC_EM_D",m_sPFOContainerName + "_ENG_CALIB_FRAC_EM (|eta| >= 3.2)",22,0,1.1); m_PFO_ENG_CALIB_FRAC_HAD_etaBinD = Book1D("_ENG_CALIB_FRAC_HAD_D",m_sPFOContainerName + "_ENG_CALIB_FRAC_HAD (|eta| >= 3.2)",22,0,1.1); m_PFO_ENG_CALIB_FRAC_REST_etaBinD = Book1D("_ENG_CALIB_FRAC_REST_D",m_sPFOContainerName + "_ENG_CALIB_FRAC_REST (|eta| >= 3.2)",22,0,1.1); - + } +if(!m_sFEContainerName.empty()){ + std::cout<<"PFOCalibHitClusterMomentPlots: You're trying to book histograms for flow elements based on calibration hits which are not available in most MC samples - sorry"<<std::endl; + } } void PFOCalibHitClusterMomentPlots::fill(const xAOD::PFO& PFO){ @@ -71,5 +73,10 @@ namespace PFO { } } - + void PFOCalibHitClusterMomentPlots::fill(const xAOD::FlowElement& FE){ + std::cout<<"PFOCalibHitClusterMomentPlots - Calib Hits not available in most MC, so will be dropped"<<std::endl; + // dump pt just to remove -wunused parameter warnings - remove if this function is actually needed + std::cout<<"FE pt"<<FE.pt()<<std::endl; + + } } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx index e6ea7278c09a568833e0c18e7e44cd5ebc55b5e5..00f3e6f3135d9aebf273bbd3b9513381e658ffa3 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOClusterMomentPlots.cxx @@ -6,7 +6,7 @@ namespace PFO { - PFOClusterMomentPlots::PFOClusterMomentPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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; @@ -16,7 +16,7 @@ namespace PFO { m_PFO_ENG_POS = nullptr; m_PFO_AVG_LAR_Q = nullptr; m_PFO_AVG_TILE_Q = nullptr; - m_PFO_EM_PROBABILTY = nullptr; + m_PFO_EM_PROBABILITY = nullptr; m_PFO_SECOND_LAMBDA = nullptr; m_PFO_SECOND_R_etaBinA = nullptr; @@ -28,7 +28,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinA = nullptr; m_PFO_AVG_LAR_Q_etaBinA = nullptr; m_PFO_AVG_TILE_Q_etaBinA = nullptr; - m_PFO_EM_PROBABILTY_etaBinA = nullptr; + m_PFO_EM_PROBABILITY_etaBinA = nullptr; m_PFO_SECOND_LAMBDA_etaBinA = nullptr; m_PFO_SECOND_R_etaBinB = nullptr; @@ -40,7 +40,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinB = nullptr; m_PFO_AVG_LAR_Q_etaBinB = nullptr; m_PFO_AVG_TILE_Q_etaBinB = nullptr; - m_PFO_EM_PROBABILTY_etaBinB = nullptr; + m_PFO_EM_PROBABILITY_etaBinB = nullptr; m_PFO_SECOND_LAMBDA_etaBinB = nullptr; m_PFO_SECOND_R_etaBinC = nullptr; @@ -52,7 +52,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinC = nullptr; m_PFO_AVG_LAR_Q_etaBinC = nullptr; m_PFO_AVG_TILE_Q_etaBinC = nullptr; - m_PFO_EM_PROBABILTY_etaBinC = nullptr; + m_PFO_EM_PROBABILITY_etaBinC = nullptr; m_PFO_SECOND_LAMBDA_etaBinC = nullptr; m_PFO_SECOND_R_etaBinD = nullptr; @@ -64,72 +64,197 @@ namespace PFO { m_PFO_ENG_POS_etaBinD = nullptr; m_PFO_AVG_LAR_Q_etaBinD = nullptr; m_PFO_AVG_TILE_Q_etaBinD = nullptr; - m_PFO_EM_PROBABILTY_etaBinD = nullptr; + m_PFO_EM_PROBABILITY_etaBinD = nullptr; m_PFO_SECOND_LAMBDA_etaBinD = nullptr; + + + + m_FE_SECOND_R = nullptr; + m_FE_CENTER_LAMBDA = nullptr; + m_FE_ISOLATION = nullptr; + m_FE_ENG_BAD_CELLS = nullptr; + m_FE_N_BAD_CELLS = nullptr; + m_FE_BADLARQ_FRAC = nullptr; + m_FE_ENG_POS = nullptr; + m_FE_AVG_LAR_Q = nullptr; + m_FE_AVG_TILE_Q = nullptr; + m_FE_EM_PROBABILITY = nullptr; + m_FE_SECOND_LAMBDA = nullptr; + + m_FE_SECOND_R_etaBinA = nullptr; + m_FE_CENTER_LAMBDA_etaBinA = nullptr; + m_FE_ISOLATION_etaBinA = nullptr; + m_FE_ENG_BAD_CELLS_etaBinA = nullptr; + m_FE_N_BAD_CELLS_etaBinA = nullptr; + m_FE_BADLARQ_FRAC_etaBinA = nullptr; + m_FE_ENG_POS_etaBinA = nullptr; + m_FE_AVG_LAR_Q_etaBinA = nullptr; + m_FE_AVG_TILE_Q_etaBinA = nullptr; + m_FE_EM_PROBABILITY_etaBinA = nullptr; + m_FE_SECOND_LAMBDA_etaBinA = nullptr; + + m_FE_SECOND_R_etaBinB = nullptr; + m_FE_CENTER_LAMBDA_etaBinB = nullptr; + m_FE_ISOLATION_etaBinB = nullptr; + m_FE_ENG_BAD_CELLS_etaBinB = nullptr; + m_FE_N_BAD_CELLS_etaBinB = nullptr; + m_FE_BADLARQ_FRAC_etaBinB = nullptr; + m_FE_ENG_POS_etaBinB = nullptr; + m_FE_AVG_LAR_Q_etaBinB = nullptr; + m_FE_AVG_TILE_Q_etaBinB = nullptr; + m_FE_EM_PROBABILITY_etaBinB = nullptr; + m_FE_SECOND_LAMBDA_etaBinB = nullptr; + + m_FE_SECOND_R_etaBinC = nullptr; + m_FE_CENTER_LAMBDA_etaBinC = nullptr; + m_FE_ISOLATION_etaBinC = nullptr; + m_FE_ENG_BAD_CELLS_etaBinC = nullptr; + m_FE_N_BAD_CELLS_etaBinC = nullptr; + m_FE_BADLARQ_FRAC_etaBinC = nullptr; + m_FE_ENG_POS_etaBinC = nullptr; + m_FE_AVG_LAR_Q_etaBinC = nullptr; + m_FE_AVG_TILE_Q_etaBinC = nullptr; + m_FE_EM_PROBABILITY_etaBinC = nullptr; + m_FE_SECOND_LAMBDA_etaBinC = nullptr; + + m_FE_SECOND_R_etaBinD = nullptr; + m_FE_CENTER_LAMBDA_etaBinD = nullptr; + m_FE_ISOLATION_etaBinD = nullptr; + m_FE_ENG_BAD_CELLS_etaBinD = nullptr; + m_FE_N_BAD_CELLS_etaBinD = nullptr; + m_FE_BADLARQ_FRAC_etaBinD = nullptr; + m_FE_ENG_POS_etaBinD = nullptr; + m_FE_AVG_LAR_Q_etaBinD = nullptr; + m_FE_AVG_TILE_Q_etaBinD = nullptr; + m_FE_EM_PROBABILITY_etaBinD = nullptr; + m_FE_SECOND_LAMBDA_etaBinD = nullptr; } void PFOClusterMomentPlots::initializePlots(){ - - 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_PROBABILTY = Book1D("_EM_PROBABILTY",m_sPFOContainerName + "_EM_PROBABILTY",21,-1.0,1.0); - m_PFO_SECOND_LAMBDA = Book1D("_SECOND_LAMBDA",m_sPFOContainerName + "_SECOND_LAMBDA",60,-1.0,3000.0); + 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_PROBABILTY_etaBinA = Book1D("_EM_PROBABILTY_A",m_sPFOContainerName + "_EM_PROBABILTY (|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_PROBABILTY_etaBinB = Book1D("_EM_PROBABILTY_B",m_sPFOContainerName + "_EM_PROBABILTY (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_PROBABILTY_etaBinC = Book1D("_EM_PROBABILTY_C",m_sPFOContainerName + "_EM_PROBABILTY (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_PROBABILTY_etaBinD = Book1D("_EM_PROBABILTY_D",m_sPFOContainerName + "_EM_PROBABILTY (|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); - + 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); + m_FE_CENTER_LAMBDA = Book1D("_CENTER_LAMBDA",m_sFEContainerName + "_CENTER_LAMBDA",60,-50.0,3000.0); + m_FE_ISOLATION = Book1D("_ISOLATION",m_sFEContainerName + "_ISOLATION",60,-1.0,2.0); + m_FE_ENG_BAD_CELLS = Book1D("_ENG_BAD_CELLS",m_sFEContainerName + "_ENG_BAD_CELLS",60,-1.0,5); + m_FE_N_BAD_CELLS = Book1D("_N_BAD_CELLS",m_sFEContainerName + "_N_BAD_CELLS",30,-1.0,2.0); + m_FE_BADLARQ_FRAC = Book1D("_BADLARQ_FRAC",m_sFEContainerName + "_BADLARQ_FRAC",25,-1.0,1.5); + m_FE_ENG_POS = Book1D("_ENG_POS",m_sFEContainerName + "_ENG_POS",60,-100.0,10000.0); + m_FE_AVG_LAR_Q = Book1D("_AVG_LAR_Q",m_sFEContainerName + "_AVG_LAR_Q",31,-1000.0,30000.0); + m_FE_AVG_TILE_Q = Book1D("_AVG_TILE_Q",m_sFEContainerName + "_AVG_TILE_Q",21,-10.0,200.0); + m_FE_EM_PROBABILITY = Book1D("_EM_PROBABILITY",m_sFEContainerName + "_EM_PROBABILITY",21,-1.0,1.0); + m_FE_SECOND_LAMBDA = Book1D("_SECOND_LAMBDA",m_sFEContainerName + "_SECOND_LAMBDA",60,-1.0,3000.0); + + m_FE_SECOND_R_etaBinA = Book1D("_SECOND_R_A",m_sFEContainerName + "_SECOND_R (|eta| < 1.5)",60,-1.0,50.0); + m_FE_CENTER_LAMBDA_etaBinA = Book1D("_CENTER_LAMBDA_A",m_sFEContainerName + "_CENTER_LAMBDA (|eta| < 1.5)",60,-50.0,3000.0); + m_FE_ISOLATION_etaBinA = Book1D("_ISOLATION_A",m_sFEContainerName + "_ISOLATION (|eta| < 1.5)",60,-1.0,2.0); + m_FE_ENG_BAD_CELLS_etaBinA = Book1D("_ENG_BAD_CELLS_A",m_sFEContainerName + "_ENG_BAD_CELLS (|eta| < 1.5)",60,-1.0,5); + m_FE_N_BAD_CELLS_etaBinA = Book1D("_N_BAD_CELLS_A",m_sFEContainerName + "_N_BAD_CELLS (|eta| < 1.5)",30,-1.0,2.0); + m_FE_BADLARQ_FRAC_etaBinA = Book1D("_BADLARQ_FRAC_A",m_sFEContainerName + "_BADLARQ_FRAC (|eta| < 1.5)",25,-1.0,1.5); + m_FE_ENG_POS_etaBinA = Book1D("_ENG_POS_A",m_sFEContainerName + "_ENG_POS (|eta| < 1.5)",60,-100.0,10000.0); + m_FE_AVG_LAR_Q_etaBinA = Book1D("_AVG_LAR_Q_A",m_sFEContainerName + "_AVG_LAR_Q (|eta| < 1.5)",31,-1000.0,30000.0); + m_FE_AVG_TILE_Q_etaBinA = Book1D("_AVG_TILE_Q_A",m_sFEContainerName + "_AVG_TILE_Q (|eta| < 1.5)",21,-10.0,200.0); + m_FE_EM_PROBABILITY_etaBinA = Book1D("_EM_PROBABILITY_A",m_sFEContainerName + "_EM_PROBABILITY (|eta| < 1.5)",21,-1.0,1.0); + m_FE_SECOND_LAMBDA_etaBinA = Book1D("_SECOND_LAMBDA_A",m_sFEContainerName + "_SECOND_LAMBDA (|eta| < 1.5)",60,-1.0,3000.0); + + m_FE_SECOND_R_etaBinB = Book1D("_SECOND_R_B",m_sFEContainerName + "_SECOND_R (1.5 <= |eta| < 2.5)",60,-1.0,50.0); + m_FE_CENTER_LAMBDA_etaBinB = Book1D("_CENTER_LAMBDA_B",m_sFEContainerName + "_CENTER_LAMBDA (1.5 <= |eta| < 2.5)",60,-50.0,3000.0); + m_FE_ISOLATION_etaBinB = Book1D("_ISOLATION_B",m_sFEContainerName + "_ISOLATION (1.5 <= |eta| < 2.5)",60,-1.0,2.0); + m_FE_ENG_BAD_CELLS_etaBinB = Book1D("_ENG_BAD_CELLS_B",m_sFEContainerName + "_ENG_BAD_CELLS (1.5 <= |eta| < 2.5)",60,-1.0,5); + m_FE_N_BAD_CELLS_etaBinB = Book1D("_N_BAD_CELLS_B",m_sFEContainerName + "_N_BAD_CELLS (1.5 <= |eta| < 2.5)",30,-1.0,2.0); + m_FE_BADLARQ_FRAC_etaBinB = Book1D("_BADLARQ_FRAC_B",m_sFEContainerName + "_BADLARQ_FRAC (1.5 <= |eta| < 2.5)",25,-1.0,1.5); + m_FE_ENG_POS_etaBinB = Book1D("_ENG_POS_B",m_sFEContainerName + "_ENG_POS (1.5 <= |eta| < 2.5)",60,-100.0,10000.0); + m_FE_AVG_LAR_Q_etaBinB = Book1D("_AVG_LAR_Q_B",m_sFEContainerName + "_AVG_LAR_Q (1.5 <= |eta| < 2.5)",31,-1000.0,30000.0); + m_FE_AVG_TILE_Q_etaBinB = Book1D("_AVG_TILE_Q_B",m_sFEContainerName + "_AVG_TILE_Q (1.5 <= |eta| < 2.5)",21,-10.0,200.0); + m_FE_EM_PROBABILITY_etaBinB = Book1D("_EM_PROBABILITY_B",m_sFEContainerName + "_EM_PROBABILITY (1.5 <= |eta| < 2.5)",21,-1.0,1.0); + m_FE_SECOND_LAMBDA_etaBinB = Book1D("_SECOND_LAMBDA_B",m_sFEContainerName + "_SECOND_LAMBDA (1.5 <= |eta| < 2.5)",60,-1.0,3000.0); + + m_FE_SECOND_R_etaBinC = Book1D("_SECOND_R_C",m_sFEContainerName + "_SECOND_R (2.5 <= |eta| < 3.2)",60,-1.0,50.0); + m_FE_CENTER_LAMBDA_etaBinC = Book1D("_CENTER_LAMBDA_C",m_sFEContainerName + "_CENTER_LAMBDA (2.5 <= |eta| < 3.2)",60,-50.0,3000.0); + m_FE_ISOLATION_etaBinC = Book1D("_ISOLATION_C",m_sFEContainerName + "_ISOLATION (2.5 <= |eta| < 3.2)",60,-1.0,2.0); + m_FE_ENG_BAD_CELLS_etaBinC = Book1D("_ENG_BAD_CELLS_C",m_sFEContainerName + "_ENG_BAD_CELLS (2.5 <= |eta| < 3.2)",60,-1.0,5); + m_FE_N_BAD_CELLS_etaBinC = Book1D("_N_BAD_CELLS_C",m_sFEContainerName + "_N_BAD_CELLS (2.5 <= |eta| < 3.2)",30,-1.0,2.0); + m_FE_BADLARQ_FRAC_etaBinC = Book1D("_BADLARQ_FRAC_C",m_sFEContainerName + "_BADLARQ_FRAC (2.5 <= |eta| < 3.2)",25,-1.0,1.5); + m_FE_ENG_POS_etaBinC = Book1D("_ENG_POS_C",m_sFEContainerName + "_ENG_POS (2.5 <= |eta| < 3.2)",60,-100.0,10000.0); + m_FE_AVG_LAR_Q_etaBinC = Book1D("_AVG_LAR_Q_C",m_sFEContainerName + "_AVG_LAR_Q (2.5 <= |eta| < 3.2)",31,-1000.0,30000.0); + m_FE_AVG_TILE_Q_etaBinC = Book1D("_AVG_TILE_Q_C",m_sFEContainerName + "_AVG_TILE_Q (2.5 <= |eta| < 3.2)",21,-10.0,200.0); + m_FE_EM_PROBABILITY_etaBinC = Book1D("_EM_PROBABILITY_C",m_sFEContainerName + "_EM_PROBABILITY (2.5 <= |eta| < 3.2)",21,-1.0,1.0); + m_FE_SECOND_LAMBDA_etaBinC = Book1D("_SECOND_LAMBDA_C",m_sFEContainerName + "_SECOND_LAMBDA (2.5 <= |eta| < 3.2)",60,-1.0,3000.0); + + m_FE_SECOND_R_etaBinD = Book1D("_SECOND_R_D",m_sFEContainerName + "_SECOND_R (|eta| >= 3.2)",60,-1.0,50.0); + m_FE_CENTER_LAMBDA_etaBinD = Book1D("_CENTER_LAMBDA_D",m_sFEContainerName + "_CENTER_LAMBDA (|eta| >= 3.2)",60,-50.0,3000.0); + m_FE_ISOLATION_etaBinD = Book1D("_ISOLATION_D",m_sFEContainerName + "_ISOLATION (|eta| >= 3.2)",60,-1.0,2.0); + m_FE_ENG_BAD_CELLS_etaBinD = Book1D("_ENG_BAD_CELLS_D",m_sFEContainerName + "_ENG_BAD_CELLS (|eta| >= 3.2)",60,-1.0,5); + m_FE_N_BAD_CELLS_etaBinD = Book1D("_N_BAD_CELLS_D",m_sFEContainerName + "_N_BAD_CELLS (|eta| >= 3.2)",30,-1.0,2.0); + m_FE_BADLARQ_FRAC_etaBinD = Book1D("_BADLARQ_FRAC_D",m_sFEContainerName + "_BADLARQ_FRAC (|eta| >= 3.2)",25,-1.0,1.5); + m_FE_ENG_POS_etaBinD = Book1D("_ENG_POS_D",m_sFEContainerName + "_ENG_POS (|eta| >= 3.2)",60,-100.0,10000.0); + m_FE_AVG_LAR_Q_etaBinD = Book1D("_AVG_LAR_Q_D",m_sFEContainerName + "_AVG_LAR_Q (|eta| >= 3.2)",31,-1000.0,30000.0); + m_FE_AVG_TILE_Q_etaBinD = Book1D("_AVG_TILE_Q_D",m_sFEContainerName + "_AVG_TILE_Q (|eta| >= 3.2)",21,-10.0,200.0); + m_FE_EM_PROBABILITY_etaBinD = Book1D("_EM_PROBABILITY_D",m_sFEContainerName + "_EM_PROBABILITY (|eta| >= 3.2)",21,-1.0,1.0); + m_FE_SECOND_LAMBDA_etaBinD = Book1D("_SECOND_LAMBDA_D",m_sFEContainerName + "_SECOND_LAMBDA (|eta| >= 3.2)",60,-1.0,3000.0); + } } void PFOClusterMomentPlots::fill(const xAOD::PFO& PFO){ @@ -170,9 +295,9 @@ namespace PFO { PFO.getClusterMoment(moment_AVG_TILE_Q,xAOD::CaloCluster::AVG_TILE_Q); m_PFO_AVG_TILE_Q->Fill(moment_AVG_TILE_Q); - float moment_EM_PROBABILTY = -1.0; - PFO.getClusterMoment(moment_EM_PROBABILTY,xAOD::CaloCluster::EM_PROBABILITY); - m_PFO_EM_PROBABILTY->Fill(moment_EM_PROBABILTY); + float moment_EM_PROBABILITY = -1.0; + PFO.getClusterMoment(moment_EM_PROBABILITY,xAOD::CaloCluster::EM_PROBABILITY); + m_PFO_EM_PROBABILITY->Fill(moment_EM_PROBABILITY); float moment_SECOND_LAMBDA = -1.0; PFO.getClusterMoment(moment_SECOND_LAMBDA,xAOD::CaloCluster::SECOND_LAMBDA); @@ -190,7 +315,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinA->Fill(moment_ENG_POS); m_PFO_AVG_LAR_Q_etaBinA->Fill(moment_AVG_LAR_Q); m_PFO_AVG_TILE_Q_etaBinA->Fill(moment_AVG_TILE_Q); - m_PFO_EM_PROBABILTY_etaBinA->Fill(moment_EM_PROBABILTY); + m_PFO_EM_PROBABILITY_etaBinA->Fill(moment_EM_PROBABILITY); m_PFO_SECOND_LAMBDA_etaBinA->Fill(moment_SECOND_LAMBDA); }//|eta| < 1.5 else if (fabs(PFOEta) < 2.5){ @@ -203,7 +328,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinB->Fill(moment_ENG_POS); m_PFO_AVG_LAR_Q_etaBinB->Fill(moment_AVG_LAR_Q); m_PFO_AVG_TILE_Q_etaBinB->Fill(moment_AVG_TILE_Q); - m_PFO_EM_PROBABILTY_etaBinB->Fill(moment_EM_PROBABILTY); + m_PFO_EM_PROBABILITY_etaBinB->Fill(moment_EM_PROBABILITY); m_PFO_SECOND_LAMBDA_etaBinB->Fill(moment_SECOND_LAMBDA); } else if (fabs(PFOEta) < 3.2){ @@ -216,7 +341,7 @@ namespace PFO { m_PFO_ENG_POS_etaBinC->Fill(moment_ENG_POS); m_PFO_AVG_LAR_Q_etaBinC->Fill(moment_AVG_LAR_Q); m_PFO_AVG_TILE_Q_etaBinC->Fill(moment_AVG_TILE_Q); - m_PFO_EM_PROBABILTY_etaBinC->Fill(moment_EM_PROBABILTY); + m_PFO_EM_PROBABILITY_etaBinC->Fill(moment_EM_PROBABILITY); m_PFO_SECOND_LAMBDA_etaBinC->Fill(moment_SECOND_LAMBDA); } else{ @@ -229,10 +354,137 @@ namespace PFO { m_PFO_ENG_POS_etaBinD->Fill(moment_ENG_POS); m_PFO_AVG_LAR_Q_etaBinD->Fill(moment_AVG_LAR_Q); m_PFO_AVG_TILE_Q_etaBinD->Fill(moment_AVG_TILE_Q); - m_PFO_EM_PROBABILTY_etaBinD->Fill(moment_EM_PROBABILTY); + m_PFO_EM_PROBABILITY_etaBinD->Fill(moment_EM_PROBABILITY); m_PFO_SECOND_LAMBDA_etaBinD->Fill(moment_SECOND_LAMBDA); } } + void PFOClusterMomentPlots::fill(const xAOD::FlowElement& FE){ + float moment_SECOND_R = -1.0; + float moment_CENTER_LAMBDA = -1.0; + float moment_ISOLATION = -1.0; + float moment_ENG_BAD_CELLS=-1.0; + float moment_N_BAD_CELLS = -1.0; + float moment_BADLARQ_FRAC = -1.0; + float moment_ENG_POS = -1.0; + float moment_AVG_LAR_Q = -1.0; + float moment_AVG_TILE_Q = -1.0; + float moment_EM_PROBABILITY = -1.0; + float moment_SECOND_LAMBDA = -1.0; + + //as opposed to PFO which uses specific functions to grab the cluster moments, the auxdata is used + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_SECOND_R("moment_SECOND_R"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_CENTER_LAMBDA("moment_CENTER_LAMBDA"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ISOLATION("moment_ISOLATION"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ENG_BAD_CELLS("moment_ENG_BAD_CELLS"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_N_BAD_CELLS("moment_N_BAD_CELLS"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_BADLARQ_FRAC("moment_BADLARQ_FRAC"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_ENG_POS("moment_ENG_POS"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_AVG_LAR_Q("moment_AVG_LAR_Q"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_AVG_TILE_Q("moment_AVG_TILE_Q"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_EM_PROBABILITY("moment_EM_PROBABILITY"); + static SG::AuxElement::ConstAccessor<float>acc_FE_moment_SECOND_LAMBDA("moment_SECOND_LAMBDA"); + + //use accessors to retrieve the auxvars + if(acc_FE_moment_SECOND_R.isAvailable(FE)) + moment_SECOND_R=acc_FE_moment_SECOND_R(FE); + + if(acc_FE_moment_CENTER_LAMBDA.isAvailable(FE)) + moment_CENTER_LAMBDA=acc_FE_moment_CENTER_LAMBDA(FE); + + if(acc_FE_moment_ISOLATION.isAvailable(FE)) + moment_ISOLATION=acc_FE_moment_ISOLATION(FE); + + if(acc_FE_moment_ENG_BAD_CELLS.isAvailable(FE)) + moment_ENG_BAD_CELLS=acc_FE_moment_ENG_BAD_CELLS(FE); + + if(acc_FE_moment_N_BAD_CELLS.isAvailable(FE)) + moment_N_BAD_CELLS=acc_FE_moment_N_BAD_CELLS(FE); + + if(acc_FE_moment_BADLARQ_FRAC.isAvailable(FE)) + moment_BADLARQ_FRAC=acc_FE_moment_BADLARQ_FRAC(FE); + + if(acc_FE_moment_ENG_POS.isAvailable(FE)) + moment_ENG_POS=acc_FE_moment_ENG_POS(FE); + + if(acc_FE_moment_AVG_LAR_Q.isAvailable(FE)) + moment_AVG_LAR_Q=acc_FE_moment_AVG_LAR_Q(FE); + + if(acc_FE_moment_AVG_TILE_Q.isAvailable(FE)) + moment_AVG_TILE_Q=acc_FE_moment_AVG_TILE_Q(FE); + + if(acc_FE_moment_EM_PROBABILITY.isAvailable(FE)) + moment_EM_PROBABILITY=acc_FE_moment_EM_PROBABILITY(FE); + + if(acc_FE_moment_SECOND_LAMBDA.isAvailable(FE)) + moment_SECOND_LAMBDA=acc_FE_moment_SECOND_LAMBDA(FE); + + float FE_eta=FE.eta(); + m_FE_SECOND_R->Fill(moment_SECOND_R); + m_FE_CENTER_LAMBDA->Fill(moment_CENTER_LAMBDA); + m_FE_ISOLATION->Fill(moment_ISOLATION); + m_FE_ENG_BAD_CELLS->Fill(moment_ENG_BAD_CELLS); + m_FE_N_BAD_CELLS->Fill(moment_N_BAD_CELLS); + m_FE_BADLARQ_FRAC->Fill(moment_BADLARQ_FRAC); + m_FE_ENG_POS->Fill(moment_ENG_POS); + m_FE_AVG_LAR_Q->Fill(moment_AVG_LAR_Q); + m_FE_AVG_TILE_Q->Fill(moment_AVG_TILE_Q); + m_FE_EM_PROBABILITY->Fill(moment_EM_PROBABILITY); + m_FE_SECOND_LAMBDA->Fill(moment_SECOND_LAMBDA); + if (fabs(FE_eta) < 1.5){ + m_FE_SECOND_R_etaBinA->Fill(moment_SECOND_R); + m_FE_CENTER_LAMBDA_etaBinA->Fill(moment_CENTER_LAMBDA); + m_FE_ISOLATION_etaBinA->Fill(moment_ISOLATION); + m_FE_ENG_BAD_CELLS_etaBinA->Fill(moment_ENG_BAD_CELLS); + m_FE_N_BAD_CELLS_etaBinA->Fill(moment_N_BAD_CELLS); + m_FE_BADLARQ_FRAC_etaBinA->Fill(moment_BADLARQ_FRAC); + m_FE_ENG_POS_etaBinA->Fill(moment_ENG_POS); + m_FE_AVG_LAR_Q_etaBinA->Fill(moment_AVG_LAR_Q); + m_FE_AVG_TILE_Q_etaBinA->Fill(moment_AVG_TILE_Q); + m_FE_EM_PROBABILITY_etaBinA->Fill(moment_EM_PROBABILITY); + m_FE_SECOND_LAMBDA_etaBinA->Fill(moment_SECOND_LAMBDA); + }//|eta| < 1.5 + else if (fabs(FE_eta) < 2.5){ + m_FE_SECOND_R_etaBinB->Fill(moment_SECOND_R); + m_FE_CENTER_LAMBDA_etaBinB->Fill(moment_CENTER_LAMBDA); + m_FE_ISOLATION_etaBinB->Fill(moment_ISOLATION); + m_FE_ENG_BAD_CELLS_etaBinB->Fill(moment_ENG_BAD_CELLS); + m_FE_N_BAD_CELLS_etaBinB->Fill(moment_N_BAD_CELLS); + m_FE_BADLARQ_FRAC_etaBinB->Fill(moment_BADLARQ_FRAC); + m_FE_ENG_POS_etaBinB->Fill(moment_ENG_POS); + m_FE_AVG_LAR_Q_etaBinB->Fill(moment_AVG_LAR_Q); + m_FE_AVG_TILE_Q_etaBinB->Fill(moment_AVG_TILE_Q); + m_FE_EM_PROBABILITY_etaBinB->Fill(moment_EM_PROBABILITY); + m_FE_SECOND_LAMBDA_etaBinB->Fill(moment_SECOND_LAMBDA); + } + else if (fabs(FE_eta) < 3.2){ + m_FE_SECOND_R_etaBinC->Fill(moment_SECOND_R); + m_FE_CENTER_LAMBDA_etaBinC->Fill(moment_CENTER_LAMBDA); + m_FE_ISOLATION_etaBinC->Fill(moment_ISOLATION); + m_FE_ENG_BAD_CELLS_etaBinC->Fill(moment_ENG_BAD_CELLS); + m_FE_N_BAD_CELLS_etaBinC->Fill(moment_N_BAD_CELLS); + m_FE_BADLARQ_FRAC_etaBinC->Fill(moment_BADLARQ_FRAC); + m_FE_ENG_POS_etaBinC->Fill(moment_ENG_POS); + m_FE_AVG_LAR_Q_etaBinC->Fill(moment_AVG_LAR_Q); + m_FE_AVG_TILE_Q_etaBinC->Fill(moment_AVG_TILE_Q); + m_FE_EM_PROBABILITY_etaBinC->Fill(moment_EM_PROBABILITY); + m_FE_SECOND_LAMBDA_etaBinC->Fill(moment_SECOND_LAMBDA); + } + else{ + m_FE_SECOND_R_etaBinD->Fill(moment_SECOND_R); + m_FE_CENTER_LAMBDA_etaBinD->Fill(moment_CENTER_LAMBDA); + m_FE_ISOLATION_etaBinD->Fill(moment_ISOLATION); + m_FE_ENG_BAD_CELLS_etaBinD->Fill(moment_ENG_BAD_CELLS); + m_FE_N_BAD_CELLS_etaBinD->Fill(moment_N_BAD_CELLS); + m_FE_BADLARQ_FRAC_etaBinD->Fill(moment_BADLARQ_FRAC); + m_FE_ENG_POS_etaBinD->Fill(moment_ENG_POS); + m_FE_AVG_LAR_Q_etaBinD->Fill(moment_AVG_LAR_Q); + m_FE_AVG_TILE_Q_etaBinD->Fill(moment_AVG_TILE_Q); + m_FE_EM_PROBABILITY_etaBinD->Fill(moment_EM_PROBABILITY); + m_FE_SECOND_LAMBDA_etaBinD->Fill(moment_SECOND_LAMBDA); + } + + + } } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx index dd367e972862aa54a6f05f01aea9b6b170ab665c..5da9a68cdb9947aaaf8c910d9579e9216333245b 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOEMPlots.cxx @@ -6,20 +6,30 @@ namespace PFO { - PFOEMPlots::PFOEMPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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(){ - - 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_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){ @@ -28,5 +38,13 @@ namespace PFO { m_PFO_phiEM->Fill(PFO.phiEM()); m_PFO_mEM->Fill(PFO.mEM()/1000.0); } - + void PFOEMPlots::fill(const xAOD::FlowElement& FE){ + std::cout<<"PFOEMPlots To be filled if needed"<<std::endl; + // dump pt just to remove -wunused parameter warnings - remove if this function is actually needed + std::cout<<"FE pt"<<FE.pt()<<std::endl; + // m_FE_ptEM->Fill(FE.pt()/1000.0); // temporary assignment, will need to change to match above EM function calls soon + // m_FE_etaEM->Fill(FE.eta()); + // m_FE_phiEM->Fill(FE.phi()); + // m_FE_mEM->Fill(FE.m()/1000.0); + } } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx index bb19cf0c465b4159c9887fe4e183c18c824d890d..8d0904a768c942724bb4ff2504e0bd37283c2a49 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPVMatchedPlots.cxx @@ -6,25 +6,45 @@ namespace PFO { - PFOPVMatchedPlots::PFOPVMatchedPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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; + + m_FE_pt = nullptr; + m_FE_eta = nullptr; + m_FE_phi = nullptr; + m_FE_m = nullptr; + m_FE_charge = nullptr; } void PFOPVMatchedPlots::initializePlots(){ - - 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); + // 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); + } + //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); + m_FE_eta = Book1D("_PVMatched_Eta",m_sFEContainerName + "_Eta (Entries/0.1)",100,-5.0,5.0); + m_FE_phi = Book1D("_PVMatched_Phi",m_sFEContainerName + "_Phi (Entries/0.1)",64,-3.2,3.2); + m_FE_m = Book1D("_PVMatched_m",m_sFEContainerName + "_m (Entries/100 MeV)",10,0.0,0.5); + m_FE_charge = Book1D("_PVMatched_charge",m_sFEContainerName + "_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); + m_FE_pt_etaBinA = Book1D("_Pt_PVMatched_A",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| < 1 )",30,-10.0,20.0); + m_FE_pt_etaBinB = Book1D("_Pt_PVMatched_B",m_sFEContainerName + "_Pt (Entries/1 GeV, 1 <= |eta| < 2 )",30,-10.0,20.0); + m_FE_pt_etaBinC = Book1D("_Pt_PVMatched_C",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| >= 2 )",30,-10.0,20.0); + } } void PFOPVMatchedPlots::fill(const xAOD::PFO& PFO, const xAOD::Vertex& theVertex){ @@ -50,4 +70,31 @@ namespace PFO { }//if valid pointer to track } + + + void PFOPVMatchedPlots::fill(const xAOD::FlowElement& FE, const xAOD::Vertex& theVertex){ + if(FE.nChargedObjects()==0) + return; + const xAOD::TrackParticle* theTrack =static_cast<const xAOD::TrackParticle*>(FE.chargedObjects().at(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_FE_pt->Fill(FE.pt()/1000.0); + m_FE_eta->Fill(FE.eta()); + m_FE_phi->Fill(FE.phi()); + m_FE_m->Fill(FE.m()/1000.0); + m_FE_charge->Fill(FE.charge()); + + if (fabs(FE.eta()) < 1) m_FE_pt_etaBinA->Fill(FE.pt()/1000.0); + else if (fabs(FE.eta()) < 2) m_FE_pt_etaBinB->Fill(FE.pt()/1000.0); + else m_FE_pt_etaBinC->Fill(FE.pt()/1000.0); + }//fill histograms if track is matched to the PV + }//if valid pointer to track + } + + } diff --git a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx index fcb972bf81349820021cd9844e366fcd02482f74..a4c450652f8baf1d6d3ffdb484af74d79f836cb0 100644 --- a/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx +++ b/Reconstruction/PFlow/PFlowValidation/PFOHistUtils/src/PFOPlots.cxx @@ -6,7 +6,7 @@ namespace PFO { - PFOPlots::PFOPlots(PlotBase* pParent, std::string sDir, std::string sPFOContainerName) : PlotBase(pParent, sDir), m_sPFOContainerName(sPFOContainerName){ + 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; @@ -15,7 +15,8 @@ namespace PFO { } 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); @@ -25,6 +26,19 @@ namespace PFO { 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); + } + if(!m_sFEContainerName.empty()){ + //book Flow Element histograms + m_FE_pt = Book1D("_Pt",m_sFEContainerName + "_Pt (Entries/1 GeV)",30,-10.0,20.0); + m_FE_eta = Book1D("_Eta",m_sFEContainerName + "_Eta (Entries/0.1)",100,-5.0,5.0); + m_FE_phi = Book1D("_Phi",m_sFEContainerName + "_Phi (Entries/0.1)",64,-3.2,3.2); + m_FE_m = Book1D("_m",m_sFEContainerName + "_m (Entries/100 MeV)",10,0.0,0.5); + m_FE_charge = Book1D("_charge",m_sFEContainerName + "_charge (Entries/unit charge)",5,-2,2); + + m_FE_pt_etaBinA = Book1D("_Pt_A",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| < 1 )",30,-10.0,20.0); + m_FE_pt_etaBinB = Book1D("_Pt_B",m_sFEContainerName + "_Pt (Entries/1 GeV, 1 <= |eta| < 2 )",30,-10.0,20.0); + m_FE_pt_etaBinC = Book1D("_Pt_C",m_sFEContainerName + "_Pt (Entries/1 GeV, |eta| >= 2 )",30,-10.0,20.0); + } } void PFOPlots::fill(const xAOD::PFO& PFO){ @@ -40,4 +54,17 @@ namespace PFO { } + void PFOPlots::fill(const xAOD::FlowElement& FE){ + m_FE_pt->Fill(FE.pt()/1000.0); + m_FE_eta->Fill(FE.eta()); + m_FE_phi->Fill(FE.phi()); + m_FE_m->Fill(FE.m()/1000.0); + m_FE_charge->Fill(FE.charge()); + + if (fabs(FE.eta()) < 1) m_FE_pt_etaBinA->Fill(FE.pt()/1000.0); + else if (fabs(FE.eta()) < 2) m_FE_pt_etaBinB->Fill(FE.pt()/1000.0); + else m_FE_pt_etaBinC->Fill(FE.pt()/1000.0); + + } + } diff --git a/Reconstruction/eflowRec/CMakeLists.txt b/Reconstruction/eflowRec/CMakeLists.txt index 4cbac95c78053158d3b1ac8deb09d004c61075e9..96b7a4c01dde1e31914a0760fe7f409595f46f81 100644 --- a/Reconstruction/eflowRec/CMakeLists.txt +++ b/Reconstruction/eflowRec/CMakeLists.txt @@ -3,6 +3,45 @@ # Declare the package name: atlas_subdir( eflowRec ) +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Calorimeter/CaloEvent + Calorimeter/CaloIdentifier + Calorimeter/CaloRec + Control/AthContainers + Control/AthLinks + Control/AthenaBaseComps + Control/AthenaKernel + Control/CxxUtils + DetectorDescription/GeoPrimitives + Event/xAOD/xAODCaloEvent + Event/xAOD/xAODCore + Event/xAOD/xAODEgamma + Event/xAOD/xAODMuon + Event/xAOD/xAODPFlow + Event/xAOD/xAODTracking + Event/xAOD/xAODTau + GaudiKernel + InnerDetector/InDetDetDescr/InDetReadoutGeometry + InnerDetector/InDetDetDescr/TRT_ReadoutGeometry + InnerDetector/InDetRecTools/InDetTrackSelectionTool + InnerDetector/InDetRecTools/TrackVertexAssociationTool + Reconstruction/Particle + Reconstruction/RecoTools/RecoToolInterfaces + Tracking/TrkEvent/TrkParameters + PRIVATE + Calorimeter/CaloDetDescr + Calorimeter/CaloUtils + Control/StoreGate + Event/FourMomUtils + Tools/PathResolver + Tracking/TrkEvent/TrkCaloExtension + Tracking/TrkEvent/TrkParametersIdentificationHelpers + Reconstruction/PFODQA + Reconstruction/PFOHistUtils + PhysicsAnalysis/PhysicsValidation/PhysValMonitoring + ) + # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) @@ -10,8 +49,8 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) atlas_add_component( eflowRec src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloIdentifier CaloRecLib AthContainers AthLinks AthenaBaseComps CxxUtils AthenaKernel GeoPrimitives Identifier xAODBase xAODCaloEvent xAODCore xAODEgamma xAODMuon xAODPFlow xAODTau xAODTracking GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry Particle RecoToolInterfaces TrkParameters CaloDetDescrLib CaloUtilsLib StoreGateLib FourMomUtils PathResolver TrkCaloExtension TrkParametersIdentificationHelpers InDetTrackSelectionToolLib AthenaMonitoringKernelLib ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier CaloRecLib AthContainers AthLinks AthenaBaseComps CxxUtils AthenaKernel GeoPrimitives xAODCaloEvent xAODCore xAODEgamma xAODMuon xAODPFlow xAODTau xAODTracking GaudiKernel InDetReadoutGeometry TRT_ReadoutGeometry TrackVertexAssociationToolLib Particle RecoToolInterfaces TrkParameters CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests FourMomUtils PathResolver TrkCaloExtension TrkParametersIdentificationHelpers InDetTrackSelectionToolLib AthenaMonitoringKernelLib) # Install files from the package: atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Reconstruction/eflowRec/python/eflowRecFlags.py b/Reconstruction/eflowRec/python/eflowRecFlags.py index eb2c341c3968eb4b4a9913746d93302daa7d3423..33a0bb32caccfe2edce967bc2931ba6af1802680 100644 --- a/Reconstruction/eflowRec/python/eflowRecFlags.py +++ b/Reconstruction/eflowRec/python/eflowRecFlags.py @@ -141,6 +141,12 @@ class useFlowElements(JobProperty): allowedTypes = ['bool'] StoredValue = False +class doFlowElementValidation(JobProperty): + """Flag to turn on Validation plots for Flow Elements (only works if useFlowElements also set ON)""" + statusOn=True + allowedTypes= ['bool'] + StoredValue= False + # Defines the container for the eflowRec flags class eflowRecFlags(JobPropertyContainer): @@ -151,7 +157,7 @@ class eflowRecFlags(JobPropertyContainer): # add the flags container to the top container jobproperties.add_Container(eflowRecFlags) -eflowJobProperties = [eflowAlgType,CalType,useLocalHadWeightsOOCC,useOverLapShowerCells,useSplitShowers,useEEtaFirstInt,recoverIsolatedTracks,UseElectronHadronID,runTauMode, useLeptons,storeLeptonCells, useLCInput, useUpdated2015ChargedShowerSubtraction,useAODReductionClusterMomentList,useCalibHitTruth,usePFEGammaPFOAssoc,usePFTauFlowElementAssoc,provideShowerSubtractedClusters, useFlowElements] +eflowJobProperties = [eflowAlgType,CalType,useLocalHadWeightsOOCC,useOverLapShowerCells,useSplitShowers,useEEtaFirstInt,recoverIsolatedTracks,UseElectronHadronID,runTauMode, useLeptons,storeLeptonCells, useLCInput, useUpdated2015ChargedShowerSubtraction,useAODReductionClusterMomentList,useCalibHitTruth,usePFEGammaPFOAssoc,usePFTauFlowElementAssoc,provideShowerSubtractedClusters, useFlowElements, doFlowElementValidation] for i in eflowJobProperties : jobproperties.eflowRecFlags.add_JobProperty(i) diff --git a/Reconstruction/eflowRec/share/PFlowMTConfig.py b/Reconstruction/eflowRec/share/PFlowMTConfig.py index cf4ffd01ab9aad49d8bb8cbd7ef540b721ac96c0..4fe88b2e26b735e6e09dbb07f507f0909eee7577 100644 --- a/Reconstruction/eflowRec/share/PFlowMTConfig.py +++ b/Reconstruction/eflowRec/share/PFlowMTConfig.py @@ -283,6 +283,37 @@ if jobproperties.eflowRecFlags.useFlowElements: PFMuonFlowElementAssocAlg.m_UseMuonTopoClusters=False # requires m_LinkNeutralFEClusters=True and if set to True= Retrieves TopoClusters from Aux. If not, cell-match muon calocluster to NFE topocluster. topSequence += PFMuonFlowElementAssocAlg + + if jobproperties.eflowRecFlags.doFlowElementValidation: + # since FE are not added at Tier0 yet, need to add it to the eflowRec routine + from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager + monMan = AthenaMonManager( "PhysValMonManager" ) + monMan.ManualDataTypeSetup = True + monMan.DataType = "monteCarlo" + monMan.Environment = "altprod" + monMan.ManualRunLBSetup = True + monMan.Run = 1 + monMan.LumiBlock = 1 + monMan.FileKey = "PhysVal" + + + + include("PhysValMonitoring/PhysValPFlow_FlowElements_jobOptions.py") + + for tool in monMan.AthenaMonTools: + tool.EnableLumi = False + tool.ManagerName = 'PhysValMonManager' + + from AthenaCommon.AppMgr import ServiceMgr + from GaudiSvc.GaudiSvcConf import THistSvc + ServiceMgr += THistSvc() + svcMgr.THistSvc.Output += ["PhysVal DATAFILE='PhysVal.root' OPT='RECREATE'"] + topSequence += monMan + + + + + diff --git a/Reconstruction/eflowRec/share/run_ESDStandardReco_FlowElements.py b/Reconstruction/eflowRec/share/run_ESDStandardReco_FlowElements.py index a852100484dd0aae89d967ba9ea3a0b80703511d..e2bdac309d246131b8586e3e1bdde989c17f98b6 100644 --- a/Reconstruction/eflowRec/share/run_ESDStandardReco_FlowElements.py +++ b/Reconstruction/eflowRec/share/run_ESDStandardReco_FlowElements.py @@ -2,15 +2,17 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags athenaCommonFlags.FilesInput=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/mc16_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s3170_r10572_homeMade.pool.root"] - doDumpProperties=True from RecExConfig.RecAlgsFlags import recAlgs recAlgs.doEFlow.set_Value_and_Lock(True) from eflowRec.eflowRecFlags import jobproperties +jobproperties.eflowRecFlags.useCalibHitTruth.set_Value_and_Lock(True) +#include FlowElements in run jobproperties.eflowRecFlags.useFlowElements.set_Value_and_Lock(True) - +#include FlowElement validation plots +jobproperties.eflowRecFlags.doFlowElementValidation.set_Value_and_Lock(True) from RecExConfig.RecFlags import rec rec.doTrigger.set_Value_and_Lock(False) @@ -24,7 +26,18 @@ jobproperties.CaloRecFlags.doCaloTopoCluster.set_Value_and_Lock(True) #Turn of TAG rec.doWriteTAG.set_Value_and_Lock(False) -athenaCommonFlags.EvtMax=30 -#Run pflow jet finding - this cannot be enabled via reconstruction flags currently! (without enabling other things we don't want) +include("LArConditionsCommon/LArIdMap_MC_jobOptions.py") +from CaloRec import CaloClusterTopoCoolFolder +from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg +CaloNoiseCondAlg() +CaloNoiseCondAlg(noisetype="electronicNoise") + +athenaCommonFlags.EvtMax=10 +#Run pflopw jet finding - this cannot be enabled via reconstruction flags currently! (without enabling other things we don't want) UserAlgs = ["eflowRec/jetAlgs.py"] include ("RecExCommon/RecExCommon_topOptions.py") + +ServiceMgr.MessageSvc.defaultLimit = 9999999 +include ("METReconstruction/METReconstruction_jobOptions.py") + + diff --git a/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx b/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx index d61b6eff0d944bfd9ad8ad84fd95185bc7cda04d..c006a9cbbd96f78da394b06483510abd4bfb4bff 100644 --- a/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx +++ b/Reconstruction/eflowRec/src/PFMuonFlowElementAssoc.cxx @@ -56,7 +56,6 @@ StatusCode PFMuonFlowElementAssoc::initialize() { ATH_MSG_VERBOSE("Initialization completed successfully"); - return StatusCode::SUCCESS; } @@ -196,7 +195,6 @@ StatusCode PFMuonFlowElementAssoc::execute(const EventContext & ctx) const ATH_MSG_WARNING("Muon Calo cluster's TopoCluster link not found, skip"); continue; } - const xAOD::CaloCluster* MuonTopoCluster=*TopoClusterLink; // de-ref the link to get the topo-cluster size_t MuonTopoCluster_index=MuonTopoCluster->index(); if(MuonTopoCluster_index==FEclusterindex){ @@ -299,7 +297,6 @@ StatusCode PFMuonFlowElementAssoc::execute(const EventContext & ctx) const // For debug of the muon clusters used, add also: dR between caloclusters and number of caloclusters associated to each muon. //retrieve element link again to cluster const ElementLink<xAOD::CaloClusterContainer> ClusterContLink=muon->clusterLink(); - if(!ClusterContLink.isValid()){ ATH_MSG_DEBUG("Muon cluster link is invalid, skip"); continue; @@ -315,7 +312,6 @@ StatusCode PFMuonFlowElementAssoc::execute(const EventContext & ctx) const } }// end of experimental block ATH_MSG_VERBOSE("Execute completed successfully"); - return StatusCode::SUCCESS; }