29 return StatusCode::SUCCESS;
35 return StatusCode::SUCCESS;
47 if (!clusterReadHandle.
isValid())
50 return StatusCode::FAILURE;
56 float avgMu = eventInfo->actualInteractionsPerCrossing();
58 for (
auto vtx : *vertices)
66 std::vector<bool> clusterMask(clusterReadHandle->size(),
false);
73 const double energy = cluster->rawE();
77 clusterMask.at(cluster->index()) =
true;
80 std::vector<double> clusterE_ML_vec;
81 std::vector<double> clusterE_ML_Unc_vec;
88 if (clusterMask.at(cluster->index()))
90 clusterMLCalibEnergyDecor(*cluster) = clusterE_ML_vec[i];
91 clusterMLCalibEnergyUncDecor(*cluster) = clusterE_ML_Unc_vec[i];
96 clusterMLCalibEnergyDecor(*cluster) = cluster->rawE();
97 clusterMLCalibEnergyUncDecor(*cluster) = 0.0;
101 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
DataVector adapter that acts like it holds const pointers.
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode finalize() override
CaloClusterMLCalibAlgLite(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_clusterMLCalibEnergyUncDecorKey
Gaudi::Property< double > m_minClusterEnergy
SG::WriteDecorHandleKey< xAOD::CaloClusterContainer > m_clusterMLCalibEnergyDecorKey
SG::ReadHandleKey< xAOD::VertexContainer > m_verticesKey
StatusCode initialize() override
Gaudi::Property< std::vector< float > > m_rapidityRange
StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterContainerKey
ToolHandle< ICaloClusterMLCalibToolLite > m_calibTool
DataVector adapter that acts like it holds const pointers.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Handle class for adding a decoration to an object.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.