diff --git a/Reconstruction/eflowRec/eflowRec/PFNeutralFlowElementCreatorAlgorithm.h b/Reconstruction/eflowRec/eflowRec/PFNeutralFlowElementCreatorAlgorithm.h new file mode 100644 index 0000000000000000000000000000000000000000..23d3d16172359908f158ce4d00a9f16836b5c9c5 --- /dev/null +++ b/Reconstruction/eflowRec/eflowRec/PFNeutralFlowElementCreatorAlgorithm.h @@ -0,0 +1,63 @@ +#ifndef PFNEUTRALFLOWELEMENTCREATORALGORITHM_H +#define PFNEUTRALFLOWELEMENTCREATORALGORITHM_H + +#include "eflowRec/eflowCaloObject.h" + +#include "AthenaBaseComps/AthReentrantAlgorithm.h" +#include "GaudiKernel/ToolHandle.h" +#include "StoreGate/DataHandle.h" + +#include "xAODCaloEvent/CaloCluster.h" +#include "xAODPFlow/FlowElement.h" +#include "xAODPFlow/FlowElementContainer.h" +#include "xAODPFlow/PFODefs.h" + +class PFNeutralFlowElementCreatorAlgorithm : public AthReentrantAlgorithm { + +public: + + PFNeutralFlowElementCreatorAlgorithm(const std::string& name,ISvcLocator* pSvcLocator); + + ~PFNeutralFlowElementCreatorAlgorithm() {} + + static const InterfaceID& interfaceID(); + + StatusCode initialize(); + StatusCode execute(const EventContext& ctx) const; + StatusCode finalize(); + +private: + + /** Create the chargedneutral PFO */ + StatusCode createNeutralFlowElement(const eflowCaloObject& energyFlowCaloObject, xAOD::FlowElementContainer* neutralFEContainer, xAOD::FlowElementContainer* neutralFEContainer_nonModified) const; + + /** Function to add cluster moments onto PFO */ + void addMoment(const xAOD::CaloCluster::MomentType& momentType, const xAOD::PFODetails::PFOAttributes& pfoAttribute, const xAOD::CaloCluster& theCluster, xAOD::FlowElement& theFE) const; + + /** Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed */ + Gaudi::Property<bool> m_eOverPMode{this,"EOverPMode",false,"Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"}; + + /** Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input */ + Gaudi::Property<bool> m_LCMode{this,"LCMode",false,"Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input"}; + + /** Bool to toggle which jetetmiss configuration we are in - EM cluster input or LC cluster input */ + Gaudi::Property<bool> m_doClusterMoments{this,"DoClusterMoments",true,"Bool to toggle whether cluster moments are added to the PFOs"}; + + /** Toggle usage of calibration hit truth - false by default */ + Gaudi::Property<bool> m_useCalibHitTruth{this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"}; + + /** Toggle addition of charged shower subtracted CaloCluster links to neutral PFO - false by default */ + Gaudi::Property<bool> m_addShowerSubtractedClusters{this,"AddShowerSubtractedClusters",false,"Toggle addition of charged shower subtracted CaloCluster links to neutral PFO - false by default"}; + + /** ReadHandleKey for eflowCaloObjectContainer */ + SG::ReadHandleKey<eflowCaloObjectContainer> m_eflowCaloObjectContainerReadHandleKey{this,"eflowCaloObjectContainerName","eflowCaloObjects","ReadHandleKey for eflowCaloObjectContainer"}; + + /** WriteHandleKey for neutral PFO */ + SG::WriteHandleKey<xAOD::FlowElementContainer> m_neutralFEContainerWriteHandleKey{this,"FEOutputName","JetETMissNeutralFlowElements","WriteHandleKey for neutral FlowElements"}; + + /** WriteHandleKey for non-modified neutral PFO - only used in LC mode */ + SG::WriteHandleKey<xAOD::FlowElementContainer> m_neutralFEContainerWriteHandleKey_nonModified{this,"FEOutputName_nonModified","JetETMissNeutralFlowElements_nonModified"," WriteHandleKey for non-modified neutral FlowElements - only used in LC mode"}; + + +}; +#endif diff --git a/Reconstruction/eflowRec/src/PFNeutralFlowElementCreatorAlgorithm.cxx b/Reconstruction/eflowRec/src/PFNeutralFlowElementCreatorAlgorithm.cxx new file mode 100644 index 0000000000000000000000000000000000000000..b89214ad46ad02631775dfd5075830c79de1b2cc --- /dev/null +++ b/Reconstruction/eflowRec/src/PFNeutralFlowElementCreatorAlgorithm.cxx @@ -0,0 +1,20 @@ +#include "eflowRec/PFNeutralFlowElementCreatorAlgorithm.h" + +PFNeutralFlowElementCreatorAlgorithm::PFNeutralFlowElementCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) +{ +} + +StatusCode PFNeutralFlowElementCreatorAlgorithm::initialize(){ + return StatusCode::SUCCESS; +} + +StatusCode PFNeutralFlowElementCreatorAlgorithm::execute(const EventContext& ctx) const { + return StatusCode::SUCCESS; +} + +StatusCode PFNeutralFlowElementCreatorAlgorithm::finalize(){ return StatusCode::SUCCESS;} + +StatusCode PFNeutralFlowElementCreatorAlgorithm::createNeutralFlowElement(const eflowCaloObject& energyFlowCaloObject, xAOD::FlowElementContainer* neutralFEContainer, xAOD::FlowElementContainer* neutralFEContainer_nonModified) const { + return StatusCode::SUCCESS; +} \ No newline at end of file diff --git a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx index be5d5b4687c7905c79e50fb685cc4d459ff76836..02fee8a80a5c566b9c64fe33098d1b2695ef1ec3 100644 --- a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx +++ b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx @@ -10,6 +10,7 @@ #include "eflowRec/PFClusterSelectorTool.h" #include "eflowRec/PFAlgorithm.h" #include "eflowRec/PFChargedFlowElementCreatorAlgorithm.h" +#include "eflowRec/PFNeutralFlowElementCreatorAlgorithm.h" #include "eflowRec/PFCellLevelSubtractionTool.h" #include "eflowRec/PFRecoverSplitShowersTool.h" #include "eflowRec/PFMomentCalculatorTool.h" @@ -26,6 +27,7 @@ DECLARE_COMPONENT( PFClusterSelectorTool ) DECLARE_COMPONENT( PFTrackSelector ) DECLARE_COMPONENT( PFAlgorithm ) DECLARE_COMPONENT( PFChargedFlowElementCreatorAlgorithm) +DECLARE_COMPONENT( PFNeutralFlowElementCreatorAlgorithm) DECLARE_COMPONENT( PFOChargedCreatorAlgorithm ) DECLARE_COMPONENT( PFONeutralCreatorAlgorithm ) DECLARE_COMPONENT( PFCellLevelSubtractionTool )