diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetCaloQualityTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetCaloQualityTool.h index a0d0bddcffb9cbc401ab6253a40261e388259ec4..023778e2690b00c25b9cf6c63cc5ea185c245e48 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetCaloQualityTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetCaloQualityTool.h @@ -46,11 +46,16 @@ public: virtual StatusCode initialize(); protected: - /// Names of calo quantities to compute and to add as attributes - std::vector<std::string> m_calculationNames; - /// Time cuts for Out-of-time calo quantities. - std::vector <double> m_timingTimeCuts; + Gaudi::Property<std::vector<std::string> > m_calculationNames{this, "Calculations", {}, + "Name of calo quantities to compute and add as decorations"}; + Gaudi::Property<std::vector<double> > m_timingTimeCuts{this, "TimingCuts", {}, + "Time cuts for out-of-time calo quantities"}; + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", + "SG key of input jet container"}; + + SG::WriteDecorHandleKeyArray<xAOD::JetContainer> m_writeDecorKeys{this, "OutputDecorKeys", {}, + "SG keys for output decorations (not to be configured manually!)"}; /// This objects holds a list of cluster-based calculators jet::JetCaloCalculations m_jetCalculations; @@ -58,12 +63,6 @@ public: // internal pointer to m_jetCalculations (this pointer is also used in the cell-based derived tool) jet::JetCaloCalculations * m_calcProcessor; - /// SG key for the jet container this tool will decorate. - std::string m_jetContainerName; - - // internal vector to manage WriteDecorHandleKeys - SG::WriteDecorHandleKeyArray<xAOD::JetContainer> m_writeDecorKeys; - bool m_doFracSamplingMax; // internal }; #endif diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetLArHVTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetLArHVTool.h index 1dbfd3af0bdbb54454842e41270755e0a6b8f516..9e27265345c30772e41917419cac03a93822d061 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetLArHVTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetLArHVTool.h @@ -36,9 +36,13 @@ public: private: - std::string m_jetContainerName; - SG::WriteDecorHandleKey<xAOD::JetContainer> m_fracKey; - SG::WriteDecorHandleKey<xAOD::JetContainer> m_nCellKey; + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", + "SG key for the input jet container"}; + + SG::WriteDecorHandleKey<xAOD::JetContainer> m_fracKey{this, "EnergyFracDecorKey", "LArBadHVEnergyFrac", + "SG key for energy fraction decoration (not including jet container name)"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_nCellKey{this, "NCellDecorKey", "LArBadHVNCell", + "SG key for nCell decoration (not including jet container name)"}; }; #endif diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVoronoiMomentsTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVoronoiMomentsTool.h index 95ec948384147e800b328743939e45afbf96dbb5..1a1b0142dc6de7ff1a09f3e61b1a4e44589f2e7b 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVoronoiMomentsTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVoronoiMomentsTool.h @@ -43,14 +43,19 @@ public: private: // parameters - float m_x_min; - float m_x_max; - float m_y_min; - float m_y_max; - - std::string m_jetContainerName; - SG::WriteDecorHandleKey<xAOD::JetContainer> m_voronoiAreaKey; - + Gaudi::Property<float> m_x_min{this, "AreaXmin", -10, + "Minimum x-value for Voronoi diagram"}; + Gaudi::Property<float> m_x_max{this, "AreaXmax", 10, + "Maximum x-value for Voronoi diagram"}; + Gaudi::Property<float> m_y_min{this, "AreaYmin", -4, + "Minimum y-value for Voronoi diagram"}; + Gaudi::Property<float> m_y_max{this, "AreaYmax", 4, + "Maximum y-value for Voronoi diagram"}; + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", + "SG key for the input jet container"}; + + SG::WriteDecorHandleKey<xAOD::JetContainer> m_voronoiAreaKey{this, "VoronoiAreaKey", "VoronoiArea", + "SG key for Voronoi area decoration (not including jet container name)"}; }; #endif diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetWidthTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetWidthTool.h index aed80e724f2bd2e6828a099b31568369cdd2f9c8..4851554b97ddaebd72491594e3f72dcba214b1b2 100644 --- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetWidthTool.h +++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetWidthTool.h @@ -39,9 +39,13 @@ public: private: - std::string m_jetContainerName; - SG::WriteDecorHandleKey<xAOD::JetContainer> m_widthKey; - SG::WriteDecorHandleKey<xAOD::JetContainer> m_widthPhiKey; + Gaudi::Property<std::string> m_jetContainerName{this, "JetContainer", "", + "SG key for the input jet container"}; + + SG::WriteDecorHandleKey<xAOD::JetContainer> m_widthKey{this, "WidthKey", "Width", + "SG key for width decoration (not including jet container name)"}; + SG::WriteDecorHandleKey<xAOD::JetContainer> m_widthPhiKey{this, "WidthPhiKey", "WidthPhi", + "SG key for width phi decoration (not including jet container name)"}; }; #endif diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetCaloQualityTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetCaloQualityTool.cxx index c1b1978d4575489552b492eea19c14d537b747e8..c3b12b4a38f0d084464113b587f039e88a45ce21 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetCaloQualityTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetCaloQualityTool.cxx @@ -20,14 +20,6 @@ JetCaloQualityTool::JetCaloQualityTool(const std::string& name) : asg::AsgTool(name) { declareInterface<IJetDecorator>(this); - - declareProperty("TimingCuts", m_timingTimeCuts); - declareProperty("Calculations", m_calculationNames); - declareProperty("JetContainer", m_jetContainerName); - - // This is only a property so it can communicate dependencies to the - // scheduler. User should not configure it. - declareProperty("OutputDecorKeys", m_writeDecorKeys); } diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetLArHVTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetLArHVTool.cxx index 39b24a87f7040d26698733d173c16e1762f982d6..00c67a27ab97607e88c924bf274ad4526b801c79 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetLArHVTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetLArHVTool.cxx @@ -12,12 +12,10 @@ JetLArHVTool::JetLArHVTool(const std::string& name) : asg::AsgTool(name) { declareInterface<IJetDecorator>(this); - declareProperty("JetContainer", m_jetContainerName); - // These generally shouldn't be configured by the user, unless they really - // know what they're doing. - declareProperty("EnergyFracDecorKey", m_fracKey = m_jetContainerName + ".LArBadHVEnergyFrac"); - declareProperty("NCellDecorKey", m_nCellKey = m_jetContainerName + ".LArBadHVNCell"); + // Prepend jet container name + m_fracKey = m_jetContainerName + "." + m_fracKey.key(); + m_nCellKey = m_jetContainerName + "." + m_nCellKey.key(); } diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetWidthTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetWidthTool.cxx index 12fa00fd2e95cb824e09210fbbefa8c5c3b02861..1ebf2b4da5c5afa095194b702f2cdbb4bde3d745 100644 --- a/Reconstruction/Jet/JetMomentTools/Root/JetWidthTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/Root/JetWidthTool.cxx @@ -16,19 +16,17 @@ JetWidthTool::JetWidthTool(std::string myname) : asg::AsgTool(myname) { declareInterface<IJetDecorator>(this); - declareProperty("JetContainer", m_jetContainerName); - // These generally shouldn't be configured by the user, unless they really - // know what they're doing. - declareProperty("WidthDecorKey", m_widthKey = m_jetContainerName + ".Width"); - declareProperty("WidthPhiDecorKey", m_widthPhiKey = m_jetContainerName + ".WidthPhi"); + // Prepend jet container name + m_widthKey = m_jetContainerName + "." + m_widthKey.key(); + m_widthPhiKey = m_jetContainerName + "." + m_widthPhiKey.key(); } //********************************************************************** StatusCode JetWidthTool::initialize(){ - if(m_widthKey.key().at(0) == '.' || m_widthPhiKey.key().at(0) == '.'){ + if(m_jetContainerName.empty()){ ATH_MSG_ERROR("JetWidthTool needs to have its input jet container name configured!"); return StatusCode::FAILURE; } diff --git a/Reconstruction/Jet/JetMomentTools/src/JetVoronoiMomentsTool.cxx b/Reconstruction/Jet/JetMomentTools/src/JetVoronoiMomentsTool.cxx index 6083c88f1d0c212a5ebf83fac95f649957952f84..0891ce4c320bf3c1a7fb03a621503f1f6754bbbe 100644 --- a/Reconstruction/Jet/JetMomentTools/src/JetVoronoiMomentsTool.cxx +++ b/Reconstruction/Jet/JetMomentTools/src/JetVoronoiMomentsTool.cxx @@ -21,25 +21,16 @@ using JetVoronoiDiagramHelpers::Diagram; JetVoronoiMomentsTool::JetVoronoiMomentsTool(const std::string& name) : asg::AsgTool(name) - , m_x_min(-10.) - , m_x_max( 10.) - , m_y_min(-4. ) - , m_y_max( 4. ) { declareInterface<IJetDecorator>(this); - declareProperty("AreaXmin",m_x_min); - declareProperty("AreaXmax",m_x_max); - declareProperty("AreaYmin",m_y_min); - declareProperty("AreaYmax",m_y_max); - declareProperty("JetContainer", m_jetContainerName); - // Generally shouldn't be configured by the user, unless they know what they're doing - declareProperty("VoronoiAreaDecorKey", m_voronoiAreaKey = m_jetContainerName + ".VoronoiArea"); + // Prepend jet collection name + m_voronoiAreaKey = m_jetContainerName + "." + m_voronoiAreaKey.key(); } StatusCode JetVoronoiMomentsTool::initialize() { - if(m_voronoiAreaKey.key().at(0) == '.'){ + if(m_jetContainerName.empty()){ ATH_MSG_ERROR("JetVoronoiMomentsTool needs to have its input jet container name configured!"); return StatusCode::FAILURE; }